The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
sandbox custom react components (#73941)
Jakub Chodorowiczd4be5e5c3f72
diff --git a/e2e/support/helpers/e2e-custom-viz-helpers.ts b/e2e/support/helpers/e2e-custom-viz-helpers.tsindex cbbe8aca8a6..48f772ef8f1 100644--- a/e2e/support/helpers/e2e-custom-viz-helpers.ts+++ b/e2e/support/helpers/e2e-custom-viz-helpers.ts@@ -10,6 +10,10 @@ export const CUSTOM_VIZ_FIXTURE_TGZ_3_SECURITY =Cypress.config("projectRoot") +"/e2e/support/assets/example_custom_viz_plugin_3_security.tgz";+export const CUSTOM_VIZ_FIXTURE_TGZ_4_SECURITY_COMPONENT =+ Cypress.config("projectRoot") ++ "/e2e/support/assets/example_custom_viz_plugin_4_security_component.tgz";+// Identifier comes from the manifest's `name` field in the packaged bundle.export const CUSTOM_VIZ_IDENTIFIER = "demo-viz";@@ -17,6 +21,9 @@ export const CUSTOM_VIZ_IDENTIFIER_2 = "demo-viz-2";export const CUSTOM_VIZ_IDENTIFIER_3_SECURITY = "demo-viz-security";+export const CUSTOM_VIZ_IDENTIFIER_4_SECURITY_COMPONENT =+ "demo-viz-security-component";+// Frontend display type: "custom:{identifier}"export const CUSTOM_VIZ_DISPLAY = `custom:${CUSTOM_VIZ_IDENTIFIER}` as const;diff --git a/e2e/test/scenarios/visualizations-charts/custom-viz.cy.spec.ts b/e2e/test/scenarios/visualizations-charts/custom-viz.cy.spec.tsindex 5def64a54f4..63658adfadc 100644--- a/e2e/test/scenarios/visualizations-charts/custom-viz.cy.spec.ts+++ b/e2e/test/scenarios/visualizations-charts/custom-viz.cy.spec.ts@@ -2560,4 +2560,42 @@ describe("sandbox", () => {),);});++ it("sandboxes React component setting widgets", () => {+ H.addCustomVizPlugin(H.CUSTOM_VIZ_FIXTURE_TGZ_4_SECURITY_COMPONENT);++ H.createQuestion(+ {+ name: "Custom Viz Component Widget Security Test",+ query: {+ "source-table": SAMPLE_DB_TABLES.STATIC_ORDERS_ID,+ aggregation: [["count"]],+ },+ display: "table",+ },+ { wrapId: true, idAlias: "questionId" },+ );++ H.visitQuestion("@questionId", {+ onBeforeLoad(win) {+ cy.spy(win.console, "error").as("consoleError");+ },+ });++ cy.findByTestId("viz-type-button").click();+ cy.findByTestId("custom-viz-plugins-toggle").click();+ cy.findByTestId(+ `${H.CUSTOM_VIZ_IDENTIFIER_4_SECURITY_COMPONENT}-button`,+ ).click();+ cy.findByTestId("viz-type-button").click();++ cy.log("open viz settings to mount the custom component widget");+ cy.findByTestId("viz-settings-button").click();++ cy.log("the sandbox blocks the component's forbidden <input> element");+ cy.get("@consoleError").should(+ "have.been.calledWithMatch",+ /render failed: \[plugin \d+\] blocked createElement: input/,+ );+ });});diff --git a/enterprise/frontend/src/custom-viz/fixtures/build-example-custom-viz.mjs b/enterprise/frontend/src/custom-viz/fixtures/build-example-custom-viz.mjsindex 4ef34ac4ccd..d0093f17d18 100644--- a/enterprise/frontend/src/custom-viz/fixtures/build-example-custom-viz.mjs+++ b/enterprise/frontend/src/custom-viz/fixtures/build-example-custom-viz.mjs@@ -35,6 +35,14 @@ const visualizations = [manifest: resolve(PLUGIN_ROOT, "manifests/demo-viz-security.json"),out: resolve(E2E_ASSETS, "example_custom_viz_plugin_3_security.tgz"),},+ {+ index: resolve(PLUGIN_ROOT, "src/index-widget-security-component.tsx"),+ manifest: resolve(PLUGIN_ROOT, "manifests/demo-viz-security-component.json"),+ out: resolve(+ E2E_ASSETS,+ "example_custom_viz_plugin_4_security_component.tgz",+ ),+ },];export async function buildCustomVizFixtures() {diff --git a/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/manifests/demo-viz-security-component.json b/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/manifests/demo-viz-security-component.jsonnew file mode 100644index 00000000000..f032234815e--- /dev/null+++ b/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/manifests/demo-viz-security-component.json@@ -0,0 +1,7 @@+{+ "name": "demo-viz-security-component",+ "icon": "icon.svg",+ "metabase": {+ "version": ">=0.57.0"+ }+}diff --git a/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/index-widget-security-component.tsx b/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/index-widget-security-component.tsxnew file mode 100644index 00000000000..42b4317e003--- /dev/null+++ b/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/index-widget-security-component.tsx@@ -0,0 +1,44 @@+import React from "react";++import { defineConfig } from "../../../src/index";+import type { CreateCustomVisualization } from "../../../src/types/viz";++type Settings = {+ forbiddenWidget?: string | null;+};++function ForbiddenSettingWidget() {+ return (+ <form>+ <input />+ </form>+ );+}++const createVisualization: CreateCustomVisualization<Settings> = ({+ defineSetting,+}) => {+ return defineConfig<Settings>({+ id: "example_custom_viz_plugin",+ getName: () => "example_custom_viz_plugin",+ minSize: { width: 2, height: 2 },+ checkRenderable(series) {+ if (series.length !== 1) {+ throw new Error("Only 1 series is supported");+ }+ },+ settings: {+ forbiddenWidget: defineSetting({+ id: "forbiddenWidget",+ title: "Forbidden widget",+ widget: ForbiddenSettingWidget,+ getDefault() {+ return null;+ },+ }),+ },+ VisualizationComponent: () => <h1>Custom viz rendered successfully</h1>,+ });+};++export default createVisualization;diff --git a/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/index-widget-security.tsx b/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/index-widget-security.tsxindex 58d17c561f2..c73eb46798f 100644--- a/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/index-widget-security.tsx+++ b/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/index-widget-security.tsx@@ -3,6 +3,20 @@ import type { CreateCustomVisualization } from "../../../src/types/viz";import { Visualization } from "./Visualization";import { Settings } from "./types";+// A custom React component used as a setting widget. It renders a forbidden+// element (`<form>`) — rendering it makes React call+// `document.createElement("form")`. When the widget is a component, the host+// wraps it into a sandboxed mount, so the near-membrane sandbox must block the+// element the same way it does for the visualization component itself — the+// SDK's PluginErrorBoundary then reports the failure.+function ForbiddenSettingWidget() {+ return (+ <form>+ <input />+ </form>+ );+}+const createVisualization: CreateCustomVisualization<Settings> = ({defineSetting,locale,@@ -35,6 +49,14 @@ const createVisualization: CreateCustomVisualization<Settings> = ({};},}),+ customWidget: defineSetting({+ id: "customWidget",+ title: "Custom widget",+ widget: ForbiddenSettingWidget,+ getDefault() {+ return null;+ },+ }),},VisualizationComponent: (props) => (<Visualization {...props} locale={locale} />diff --git a/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/types.ts b/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/types.tsindex 3058efa51dc..45b959348c7 100644--- a/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/types.ts+++ b/enterprise/frontend/src/custom-viz/fixtures/example_custom_viz_plugin/src/types.ts@@ -1,3 +1,4 @@export type Settings = {threshold?: number;+ customWidget?: string | null;};diff --git a/enterprise/frontend/src/custom-viz/package.json b/enterprise/frontend/src/custom-viz/package.jsonindex 9cf8d22cdd9..6bd04479709 100644--- a/enterprise/frontend/src/custom-viz/package.json+++ b/enterprise/frontend/src/custom-viz/package.json@@ -1,6 +1,6 @@{"name": "@metabase/custom-viz",- "version": "1.0.3",+ "version": "1.0.4","description": "Creating custom visualizations for Metabase","type": "module","bin": {diff --git a/enterprise/frontend/src/custom-viz/src/define-config.tsx b/enterprise/frontend/src/custom-viz/src/define-config.tsxindex 597ff36794d..1db9422c45b 100644--- a/enterprise/frontend/src/custom-viz/src/define-config.tsx+++ b/enterprise/frontend/src/custom-viz/src/define-config.tsx@@ -14,7 +14,7 @@ export type CustomVisualizationOpts<TSettings extends Record<string, unknown>> =};class PluginErrorBoundary extends Component<- { children: ReactNode },+ { children: ReactNode; label: string },{ error: Error | null }> {state: { error: Error | null } = { error: null };@@ -25,7 +25,9 @@ class PluginErrorBoundary extends Component<componentDidCatch(error: Error) {const { message, stack } = error;- console.error(`[plugin] visualization render failed: ${message}\n${stack}`);+ console.error(+ `[plugin] ${this.props.label} render failed: ${message}\n${stack}`,+ );}render() {@@ -39,26 +41,26 @@ class PluginErrorBoundary extends Component<export function defineConfig<TSettings extends Record<string, unknown>>(opts: CustomVisualizationOpts<TSettings>,): CustomVisualization<TSettings> {- const { VisualizationComponent, ...rest } = opts;-return {- ...rest,- VisualizationComponent,- mount(+ ...opts,+ mount<P extends object>(+ Component: ComponentType<P>,container: Element,- initial: CustomVisualizationProps<TSettings>,- ): CustomVisualizationMountHandle<CustomVisualizationProps<TSettings>> {+ initialProps: P,+ ): CustomVisualizationMountHandle<P> {const root = createRoot(container);- const render = (props: CustomVisualizationProps<TSettings>) => {+ const render = (props: P) => {root.render(- <PluginErrorBoundary>- <VisualizationComponent {...props} />+ <PluginErrorBoundary+ label={Component.displayName ?? Component.name ?? "plugin"}+ >+ <Component {...props} /></PluginErrorBoundary>,);};- render(initial);+ render(initialProps);return {update: render,diff --git a/enterprise/frontend/src/custom-viz/src/templates/README.md b/enterprise/frontend/src/custom-viz/src/templates/README.mdindex 588703101e6..5d4d399ab2a 100644--- a/enterprise/frontend/src/custom-viz/src/templates/README.md+++ b/enterprise/frontend/src/custom-viz/src/templates/README.md@@ -176,7 +176,7 @@ settings: {| `group` | Sub-heading within a section for grouping related settings. || `index` | Display order within a group. || `inline` | When `true`, renders the widget on the same line as `title` (useful for `"toggle"`). |-| `widget` | Built-in widget name (see below). |+| `widget` | Built-in widget name or a custom React component. || `getDefault(series, settings)` | Computes the default value when none is stored. || `getValue(series, settings)` | Always-computed value — overrides stored value on every render. || `getProps(series, settings)` | Returns widget-specific props. |@@ -201,6 +201,8 @@ settings: {| `"field"` | `{ columns, options: { name, value }[], showColumnSetting? }` | Single column picker || `"fields"` | `{ columns, options: { name, value }[], addAnother?, showColumnSetting? }` | Multi-column picker |+You can also pass a **custom React component** as `widget`. Its props (minus the base props injected by Metabase) are returned by `getProps`.+---## Using Imagesdiff --git a/enterprise/frontend/src/custom-viz/src/types/viz-settings.ts b/enterprise/frontend/src/custom-viz/src/types/viz-settings.tsindex f23863303f2..a918d915700 100644--- a/enterprise/frontend/src/custom-viz/src/types/viz-settings.ts+++ b/enterprise/frontend/src/custom-viz/src/types/viz-settings.ts@@ -1,10 +1,34 @@-import type { ReactNode } from "react";+import type { ComponentType, ReactNode } from "react";import type { Column, Series } from "./data";-import type { ClickBehavior } from "./viz";+import type { BaseWidgetProps, ClickBehavior } from "./viz";export type WidgetName = keyof Widgets;+/**+ * Handle returned by a custom widget's mount call.+ *+ * The host drives the widget's lifecycle through this handle: `update` pushes+ * fresh props after re-renders, `unmount` tears down the widget's React tree.+ */+export type WidgetMountHandle<TProps> = {+ update(props: TProps): void;+ unmount(): void;+};++/**+ * Mount adapter for a custom-component setting widget.+ *+ * When a setting's `widget` is a React component, the host wraps it into a+ * `WidgetMount` so it renders within the plugin's sandbox. The host gives the+ * plugin a container element; the plugin renders into it using its own React+ * instance and returns a handle the host can `update` / `unmount`.+ */+export type WidgetMount<TProps = Record<string, unknown>> = (+ container: Element,+ initialProps: TProps,+) => WidgetMountHandle<TProps>;+export type Widgets = {input: InputProps;number: NumberProps;@@ -88,7 +112,18 @@ export type MultiselectProps = {placeholderNoOptions?: string;};-type PropsFromWidget<W extends WidgetName> = Widgets[W];+type OmitBaseWidgetProps<P> = keyof BaseWidgetProps<+ unknown,+ Record<string, unknown>+> extends keyof P+ ? Omit<P, keyof BaseWidgetProps<unknown, Record<string, unknown>>>+ : P;++type PropsFromWidget<W> = W extends WidgetName+ ? Widgets[W]+ : W extends ComponentType<infer P>+ ? OmitBaseWidgetProps<P>+ : never;type CommonVisualizationSettings = {"card.title"?: string | undefined | null;@@ -102,7 +137,10 @@ export type CustomVisualizationSettings<> = TSettings & CommonVisualizationSettings;export type CreateDefineSetting<TSettings extends Record<string, unknown>> =- () => <W extends WidgetName, Key extends keyof TSettings>(settingDefinition: {+ () => <+ W extends WidgetName | ComponentType<any>,+ Key extends keyof TSettings,+ >(settingDefinition: {/*** Unique key that identifies this setting. Must match the key used in your* `CustomVisualizationSettings` type and in the `settings` map passed to@@ -191,10 +229,16 @@ export type CreateDefineSetting<TSettings extends Record<string, unknown>> =eraseDependencies?: string[];/**- * Widget to render for this setting. Must be one of the built-in widget- * names (see `WidgetName`). Custom React components are not supported:- * plugin code must run inside the sandbox, and a custom widget would be- * rendered host-side, bypassing it.+ * Widget to render for this setting: either a built-in widget name+ * (`WidgetName`) or a custom React component (`React.ComponentType<P>`).+ *+ * When using a custom component, `getProps` should return only the+ * non-base props; base widget props are provided by the settings+ * renderer.+ *+ * Custom-component widgets are rewritten internally to a `WidgetMount`+ * before the definition leaves the plugin sandbox, so the host never+ * receives a plain React component reference.*/widget: W;@@ -244,7 +288,9 @@ export type CreateDefineSetting<TSettings extends Record<string, unknown>> =* dropdown's `options` list from the available columns.** The return type is inferred from the `widget` value: props of the named- * built-in widget. Omit `getProps` entirely when the widget has no+ * built-in widget when `widget` is a `WidgetName`, or the component's own+ * props (minus the base props the engine injects) when `widget` is a custom+ * React component. Omit `getProps` entirely when the widget has no* configurable props (`ToggleProps` is `never`).** @param series - The current query result (rows + column metadata).diff --git a/enterprise/frontend/src/custom-viz/src/types/viz.ts b/enterprise/frontend/src/custom-viz/src/types/viz.tsindex f6bcd8fdf00..1a880018396 100644--- a/enterprise/frontend/src/custom-viz/src/types/viz.ts+++ b/enterprise/frontend/src/custom-viz/src/types/viz.ts@@ -75,11 +75,12 @@ export type CustomVisualization<TSettings extends Record<string, unknown>> = {) => void | never;/**- * Mount the visualization into the container. Called once per visualization- * instance. Return a handle whose update() receives new props and unmount()- * tears down the React tree.+ * Mount a plugin-supplied React component into the host-provided+ * container. The host uses this to render both the visualization itself+ * and per-setting widgets; in all cases the render uses the plugin's+ * React instance (because `mount` is constructed inside the sandbox).*/- mount: CustomVisualizationMount<TSettings>;+ mount: CustomVisualizationMount;/*** Static visualization renderer (server-side PNG/PDF path, not sandboxed).@@ -130,15 +131,15 @@ export type CustomVisualizationMountHandle<TProps> = {};/**- * Mount adapter signature. Plugin owns its React tree and renders into- * the host-provided container. All DOM writes originate sandbox-side.+ * Generic mount adapter. The plugin owns its React tree and renders the+ * supplied `Component` into the host-provided container using the+ * plugin's React. Reused for the visualization and per-setting widgets.*/-export type CustomVisualizationMount<- TSettings extends Record<string, unknown>,-> = (+export type CustomVisualizationMount = <P extends object>(+ Component: ComponentType<P>,container: Element,- initialProps: CustomVisualizationProps<TSettings>,-) => CustomVisualizationMountHandle<CustomVisualizationProps<TSettings>>;+ initialProps: P,+) => CustomVisualizationMountHandle<P>;export type ClickObject<TSettings extends Record<string, unknown>> = {/** The raw value of the clicked cell. */@@ -264,3 +265,15 @@ declare const ClickBehaviorSymbol: unique symbol;export type ClickBehavior = {readonly [ClickBehaviorSymbol]: "ClickBehavior";};++export type BaseWidgetProps<+ TValue,+ TSettings extends Record<string, unknown>,+> = {+ id: string;+ value: TValue | undefined;+ onChange: (value?: TValue | null) => void;+ onChangeSettings: (+ settings: Partial<CustomVisualizationSettings<TSettings>>,+ ) => void;+};diff --git a/enterprise/frontend/src/metabase-enterprise/custom_viz/components/CustomVizSettingWidget.tsx b/enterprise/frontend/src/metabase-enterprise/custom_viz/components/CustomVizSettingWidget.tsxnew file mode 100644index 00000000000..30d80c54dcd--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/custom_viz/components/CustomVizSettingWidget.tsx@@ -0,0 +1,25 @@+import type { WidgetMount } from "custom-viz";++import { usePluginMount } from "../use-plugin-mount";+import { getWidgetMountPluginId } from "../widget-mount";++type Props = {+ mount: WidgetMount<Record<string, unknown>>;+ widgetProps: Record<string, unknown>;+};++/**+ * Host-side container for a custom-component setting widget.+ */+export function CustomVizSettingWidget({ mount, widgetProps }: Props) {+ const pluginId = getWidgetMountPluginId(mount);+ const containerRef = usePluginMount(mount, widgetProps);++ return (+ <div+ ref={containerRef}+ data-plugin-sandbox={pluginId}+ style={{ width: "100%" }}+ />+ );+}diff --git a/enterprise/frontend/src/metabase-enterprise/custom_viz/components/CustomVizSettingWidget.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/custom_viz/components/CustomVizSettingWidget.unit.spec.tsxnew file mode 100644index 00000000000..514975bbd6a--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/custom_viz/components/CustomVizSettingWidget.unit.spec.tsx@@ -0,0 +1,128 @@+import { render, screen, waitFor } from "@testing-library/react";+import type { WidgetMount } from "custom-viz";+import type { ComponentType } from "react";+import { createRoot } from "react-dom/client";++import { wrapPluginWidget } from "../widget-mount";++import { CustomVizSettingWidget } from "./CustomVizSettingWidget";++type TestWidgetProps = { title?: string; value?: number };++function TestWidget({ title }: TestWidgetProps) {+ return (+ <div data-testid="plugin-widget">+ <h1>{title}</h1>+ </div>+ );+}++/** Plugin mount that mirrors SDK `defineConfig` widget lifecycle. */+function makePluginWidgetMount(+ Widget: ComponentType<TestWidgetProps>,+): WidgetMount<TestWidgetProps> {+ return (container, initialProps) => {+ const root = createRoot(container);+ const renderWidget = (props: TestWidgetProps) => {+ root.render(<Widget {...props} />);+ };++ renderWidget(initialProps);++ return {+ update: renderWidget,+ unmount: () => root.unmount(),+ };+ };+}++function prepareWidget(pluginId = 1) {+ let mountCalls = 0;+ let widgetContainer: Element | null = null;+ const pluginMount = makePluginWidgetMount(TestWidget);+ const widgetMount: WidgetMount<TestWidgetProps> = (+ container,+ initialProps,+ ) => {+ mountCalls += 1;+ widgetContainer = container;+ return pluginMount(container, initialProps);+ };+ const mount = wrapPluginWidget(widgetMount, pluginId);+ return {+ mount,+ getMountCalls: () => mountCalls,+ getWidgetContainer: () => widgetContainer,+ };+}++function setup({+ pluginId = 1,+ widgetProps = { title: "Setting 1" },+}: {+ widgetProps?: TestWidgetProps;+ pluginId?: number;+}) {+ const { mount, getMountCalls, getWidgetContainer } = prepareWidget(pluginId);++ const { rerender, unmount } = render(+ <CustomVizSettingWidget mount={mount} widgetProps={widgetProps} />,+ );++ return {+ getMountCalls,+ mount,+ rerender,+ unmount,+ getWidgetContainer,+ };+}++describe("CustomVizSettingWidget", () => {+ it("calls mount once with the container element and initial props", () => {+ const { getMountCalls } = setup({});++ expect(getMountCalls()).toBe(1);+ expect(+ screen.getByRole("heading", { name: "Setting 1" }),+ ).toBeInTheDocument();+ });++ it("calls update (not mount again) on prop change", () => {+ const { rerender, mount, getMountCalls } = setup({});++ rerender(+ <CustomVizSettingWidget+ mount={mount}+ widgetProps={{ title: "Settings 2" }}+ />,+ );++ expect(getMountCalls()).toBe(1);+ expect(+ screen.getByRole("heading", { name: "Settings 2" }),+ ).toBeInTheDocument();+ });++ it("properly tears down the widget", () => {+ const { unmount } = setup({});++ expect(+ screen.getByRole("heading", { name: "Setting 1" }),+ ).toBeInTheDocument();++ unmount();++ expect(+ screen.queryByRole("heading", { name: "Setting 1" }),+ ).not.toBeInTheDocument();+ });++ it("stamps data-plugin-sandbox with the pluginId carried by the trusted mount", async () => {+ const { getWidgetContainer } = setup({ pluginId: 11 });++ await waitFor(() => {+ expect(getWidgetContainer()).toHaveAttribute("data-plugin-sandbox", "11");+ });+ });+});diff --git a/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-common.ts b/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-common.tsindex 5c02b950f90..186d0215971 100644--- a/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-common.ts+++ b/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-common.ts@@ -1,23 +1,40 @@import type { CustomVisualization } from "custom-viz";import type { Visualization } from "metabase/visualizations/types/visualization";+import type { CustomVizPluginId } from "metabase-types/api";++import { sanitizePluginSettings } from "./custom-viz-settings";/*** Assign properties derived from a vizDef onto a Visualization component* and merge in caller-specific overrides.+ *+ * `vizDef.settings` arrives as a near-membrane proxy from the plugin+ * sandbox. Before the host visualization layer can read setting widget+ * values, every function-shaped `widget` must be re-wrapped in a+ * host-allocated `WidgetMount`. Because the host always allocates this+ * wrapper itself, its plugin-id marker is host-controlled by construction —+ * letting the host later distinguish mount-driven widgets from plain React+ * components.*/export function applyDefaultVisualizationProps(Component: Visualization,vizDef: CustomVisualization<Record<string, unknown>>,settings: {identifier: string;+ pluginId: CustomVizPluginId;getUiName: () => string;iconUrl?: string | undefined;isDev?: boolean;},) {Object.assign(Component, {- settings: vizDef.settings ?? {},+ settings:+ sanitizePluginSettings(+ vizDef.settings,+ vizDef.mount,+ settings.pluginId,+ ) ?? {},checkRenderable: vizDef.checkRenderable,noHeader: vizDef.noHeader ?? false,canSavePng: vizDef.canSavePng ?? false,diff --git a/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-plugins.tsx b/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-plugins.tsxindex 14fc7f9ca77..39047c44df5 100644--- a/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-plugins.tsx+++ b/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-plugins.tsx@@ -1,15 +1,12 @@import type {CreateCustomVisualizationProps,CustomVisualization,- CustomVisualizationMountHandle,CustomVisualizationProps,CustomVisualizationSettingDefinition,ClickObject as CustomVizClickObject,HoverObject as CustomVizHoverObject,- Widgets,} from "custom-viz";import { useCallback, useEffect, useRef, useState } from "react";-import { useUnmount } from "react-use";import { t } from "ttag";import { ExplicitSize } from "metabase/common/components/ExplicitSize";@@ -40,6 +37,7 @@ import { trackCustomVizSelected } from "./analytics";import { applyDefaultVisualizationProps } from "./custom-viz-common";import { ensureVizApi } from "./custom-viz-globals";import type { SandboxMode } from "./sandbox";+import { usePluginMount } from "./use-plugin-mount";// Track which plugins have already been loaded to avoid re-execution.// Maps plugin id → { identifier, hash } so we can detect when a re-uploaded@@ -330,12 +328,14 @@ export async function loadCustomVizPlugin();}- assertValidSettingWidgets(vizDef.settings);-// Build a Metabase-compatible identifier, prefixed to avoid collisionsconst identifier = getCustomPluginIdentifier(plugin);- const Wrapper = createCustomVizWrapper(vizDef.mount, plugin.id);+ const Wrapper = createCustomVizWrapper(+ vizDef.mount,+ vizDef.VisualizationComponent,+ plugin.id,+ );// Attach the required static properties onto the component functionconst Component = ExplicitSize<VisualizationProps>({ wrapped: true })(@@ -343,6 +343,7 @@ export async function loadCustomVizPlugin() as Visualization;applyDefaultVisualizationProps(Component, vizDef, {identifier,+ pluginId: plugin.id,getUiName: () => plugin.display_name,iconUrl: getPluginAssetUrl(plugin.id, plugin.icon),isDev: Boolean(plugin.dev_bundle_url),@@ -405,47 +406,14 @@ export const useCustomVizPluginsIcon = () => {type GenericVizDefinition = CustomVisualization<Record<string, unknown>>;type GenericVizMount = GenericVizDefinition["mount"];type GenericVizPluginProps = CustomVisualizationProps<Record<string, unknown>>;-type GenericVizMountHandle =- CustomVisualizationMountHandle<GenericVizPluginProps>;function isValidVizDefinition(value: unknown): value is GenericVizDefinition {return isObject(value) && typeof value.mount === "function";}-const ALLOWED_WIDGET_NAMES: Array<keyof Widgets> = [- "input",- "number",- "radio",- "select",- "toggle",- "segmentedControl",- "field",- "fields",- "color",- "multiselect",-] as const;--function assertValidSettingWidgets(- settings: GenericVizDefinition["settings"] | undefined,-): void {- if (!settings) {- return;- }- for (const [settingId, def] of Object.entries(settings)) {- const widget = (def as { widget?: unknown }).widget;- if (- typeof widget !== "string" ||- !ALLOWED_WIDGET_NAMES.some((w) => w === widget)- ) {- throw new Error(- t`Setting "${settingId}" has unsupported widget. Use one of: ${ALLOWED_WIDGET_NAMES.join(", ")}.`,- );- }- }-}-function createCustomVizWrapper(mount: GenericVizMount,+ VisualizationComponent: GenericVizDefinition["VisualizationComponent"],pluginId: CustomVizPluginId,) {return function CustomVizWrapper({@@ -457,8 +425,6 @@ function createCustomVizWrapper(onHoverChange,}: VisualizationProps) {const { resolvedColorScheme } = useColorScheme();- const containerRef = useRef<HTMLDivElement | null>(null);- const handleRef = useRef<GenericVizMountHandle | null>(null);const pluginProps: GenericVizPluginProps = {width,@@ -474,21 +440,10 @@ function createCustomVizWrapper() => void,};- useEffect(() => {- if (!containerRef.current) {- return;- }- if (!handleRef.current) {- handleRef.current = mount(containerRef.current, pluginProps);- } else {- handleRef.current.update(pluginProps);- }- });-- useUnmount(() => {- handleRef.current?.unmount();- handleRef.current = null;- });+ const containerRef = usePluginMount<GenericVizPluginProps>(+ (container, props) => mount(VisualizationComponent, container, props),+ pluginProps,+ );return (<divdiff --git a/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-settings.ts b/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-settings.tsnew file mode 100644index 00000000000..e625f01351e--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/custom_viz/custom-viz-settings.ts@@ -0,0 +1,92 @@+import type {+ CustomVisualization,+ CustomVisualizationMount,+ CustomVisualizationSettingDefinition,+ Widgets,+} from "custom-viz";+import type { ComponentType } from "react";+import { t } from "ttag";++import type { CustomVizPluginId } from "metabase-types/api";+import { isObject } from "metabase-types/guards";++import { wrapPluginWidget } from "./widget-mount";++/**+ * Walk a plugin's `vizDef.settings` and rewrite every Component-shaped+ * `widget` into a host-trusted `WidgetMount` whose body delegates to the+ * plugin's shared `mount` function (i.e., its sandbox-side `createRoot`+ * render path). Built-in `WidgetName` strings pass through unchanged.+ */+export function sanitizePluginSettings(+ settings:+ | CustomVisualization<Record<string, unknown>>["settings"]+ | undefined,+ mount: CustomVisualizationMount,+ pluginId: CustomVizPluginId,+): CustomVisualization<Record<string, unknown>>["settings"] {+ if (!settings) {+ return settings;+ }++ assertValidSettingWidgets(settings);++ const sanitizedSettings: CustomVisualization<+ Record<string, unknown>+ >["settings"] = {};++ for (const [settingId, value] of Object.entries(settings)) {+ if (!isObject(value)) {+ // settings definitions should be objects+ continue;+ }++ if ("widget" in value && typeof value.widget === "function") {+ const Widget = value.widget as ComponentType<Record<string, unknown>>;+ sanitizedSettings[settingId] = {+ ...value,+ widget: wrapPluginWidget(+ (container, initialProps) => mount(Widget, container, initialProps),+ pluginId,+ ),+ } as unknown as CustomVisualizationSettingDefinition<+ Record<string, unknown>+ >;+ } else {+ sanitizedSettings[settingId] = value;+ }+ }+ return sanitizedSettings;+}++const ALLOWED_WIDGET_NAMES: Array<keyof Widgets> = [+ "input",+ "number",+ "radio",+ "select",+ "toggle",+ "segmentedControl",+ "field",+ "fields",+ "color",+ "multiselect",+] as const;++function assertValidSettingWidgets(+ settings: CustomVisualization<Record<string, unknown>>["settings"],+): void {+ if (!settings) {+ return;+ }+ for (const [settingId, def] of Object.entries(settings)) {+ const widget = (def as { widget?: unknown }).widget;+ if (+ typeof widget === "string" &&+ !ALLOWED_WIDGET_NAMES.some((w) => w === widget)+ ) {+ throw new Error(+ t`Setting "${settingId}" has unsupported widget ${widget}. Use one of: ${ALLOWED_WIDGET_NAMES.join(", ")}.`,+ );+ }+ }+}diff --git a/enterprise/frontend/src/metabase-enterprise/custom_viz/index.ts b/enterprise/frontend/src/metabase-enterprise/custom_viz/index.tsindex c5a0d08af64..d347cba90c8 100644--- a/enterprise/frontend/src/metabase-enterprise/custom_viz/index.ts+++ b/enterprise/frontend/src/metabase-enterprise/custom_viz/index.ts@@ -5,6 +5,7 @@ import { isCustomVizDisplay } from "metabase-types/guards/visualization";import { CustomVizDevPage } from "./components/CustomVizDevPage";import { CustomVizPage } from "./components/CustomVizPage";+import { CustomVizSettingWidget } from "./components/CustomVizSettingWidget";import { ManageCustomVizPage } from "./components/ManageCustomVizPage";import {loadCustomVizPlugin,@@ -12,6 +13,7 @@ import {useCustomVizPlugins,useCustomVizPluginsIcon,} from "./custom-viz-plugins";+import { isWidgetMount } from "./widget-mount";export function initializePlugin() {if (hasPremiumFeature("custom-viz")) {@@ -25,6 +27,8 @@ export function initializePlugin() {getPluginAssetUrl,useCustomVizPluginsIcon,isCustomVizDisplay,+ isWidgetMount,+ CustomVizSettingWidget,});}}diff --git a/enterprise/frontend/src/metabase-enterprise/custom_viz/use-plugin-mount.ts b/enterprise/frontend/src/metabase-enterprise/custom_viz/use-plugin-mount.tsnew file mode 100644index 00000000000..4360b2b371e--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/custom_viz/use-plugin-mount.ts@@ -0,0 +1,28 @@+import type { WidgetMountHandle } from "custom-viz";+import { useEffect, useRef } from "react";+import { useUnmount } from "react-use";++type PerformMount<P> = (container: Element, props: P) => WidgetMountHandle<P>;++export function usePluginMount<P>(performMount: PerformMount<P>, props: P) {+ const containerRef = useRef<HTMLDivElement | null>(null);+ const widgetMountRef = useRef<WidgetMountHandle<P> | null>(null);++ useEffect(() => {+ if (!containerRef.current) {+ return;+ }+ if (!widgetMountRef.current) {+ widgetMountRef.current = performMount(containerRef.current, props);+ } else {+ widgetMountRef.current.update(props);+ }+ }, [performMount, props]);++ useUnmount(() => {+ widgetMountRef.current?.unmount();+ widgetMountRef.current = null;+ });++ return containerRef;+}diff --git a/enterprise/frontend/src/metabase-enterprise/custom_viz/widget-mount.ts b/enterprise/frontend/src/metabase-enterprise/custom_viz/widget-mount.tsnew file mode 100644index 00000000000..5f3d1a3704b--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/custom_viz/widget-mount.ts@@ -0,0 +1,50 @@+import type { WidgetMount } from "custom-viz";+import type { ComponentType } from "react";++import type { CustomVizPluginId } from "metabase-types/api";++/**+ * A host-allocated `WidgetMount` tagged with the id of the plugin it renders.+ */+type WidgetMountWithPlugin = WidgetMount & {+ pluginId: CustomVizPluginId;+};++/**+ * Wrap a plugin-supplied function-shaped widget in a host-allocated+ * `WidgetMount` tagged with its plugin id.+ */+export function wrapPluginWidget(+ pluginWidget: WidgetMount,+ pluginId: CustomVizPluginId,+): WidgetMountWithPlugin {+ const mount: WidgetMount = (container, initialProps) =>+ pluginWidget(container, initialProps);++ return Object.assign(mount, { pluginId });+}++export function isWidgetMount(+ value:+ | string+ | WidgetMount+ | ComponentType<{+ id: string;+ }>,+): value is WidgetMountWithPlugin {+ return typeof value === "function" && "pluginId" in value;+}++/**+ * Recover the plugin id tagged onto a host-allocated mount by+ * `wrapPluginWidget`.+ */+export function getWidgetMountPluginId(+ maybeWidgetMount: WidgetMount,+): CustomVizPluginId | undefined {+ if (!isWidgetMount(maybeWidgetMount)) {+ return undefined;+ }++ return maybeWidgetMount.pluginId;+}diff --git a/frontend/src/metabase/plugins/oss/custom-viz.ts b/frontend/src/metabase/plugins/oss/custom-viz.tsindex 87cc59851b2..435250d6f46 100644--- a/frontend/src/metabase/plugins/oss/custom-viz.ts+++ b/frontend/src/metabase/plugins/oss/custom-viz.ts@@ -1,3 +1,4 @@+import type { WidgetMount } from "custom-viz";import type { ComponentType } from "react";import type { IconData } from "metabase/common/utils/icon";@@ -44,6 +45,16 @@ const getDefaultPluginCustomViz = () => ({// Must be functional in OSS — pure string check used by getSensibleVisualizationsisCustomVizDisplay,++ /**+ * Always false in OSS as there is no plugin to produce a mount handle.+ */+ isWidgetMount: (_value: unknown): _value is WidgetMount => false,++ CustomVizSettingWidget: PluginPlaceholder<{+ mount: WidgetMount;+ widgetProps: Record<string, unknown>;+ }>,});export const PLUGIN_CUSTOM_VIZ = getDefaultPluginCustomViz();diff --git a/frontend/src/metabase/visualizations/components/ChartSettingsWidget.tsx b/frontend/src/metabase/visualizations/components/ChartSettingsWidget.tsxindex c4f16cf8814..4fafe89a436 100644--- a/frontend/src/metabase/visualizations/components/ChartSettingsWidget.tsx+++ b/frontend/src/metabase/visualizations/components/ChartSettingsWidget.tsx@@ -1,7 +1,9 @@import cx from "classnames";+import type { WidgetMount } from "custom-viz";import type { CSSProperties, ComponentType } from "react";import FormS from "metabase/css/components/form.module.css";+import { PLUGIN_CUSTOM_VIZ } from "metabase/plugins";import { Box, Group, Icon, Text, Tooltip } from "metabase/ui";import { Root } from "./ChartSettingsWidget.styled";@@ -11,7 +13,7 @@ type Props = {description?: string;hint?: string;hidden?: boolean;- widget?: string | ComponentType<{ id: string }>;+ widget?: string | ComponentType<{ id: string }> | WidgetMount;inline?: boolean;props?: Record<string, unknown>;variant?: "default" | "form-field";@@ -71,7 +73,15 @@ const ChartSettingsWidget = ({{description}</Box>)}- {Widget && <Widget {...extraWidgetProps} {...props} />}+ {Widget &&+ (PLUGIN_CUSTOM_VIZ.isWidgetMount(Widget) ? (+ <PLUGIN_CUSTOM_VIZ.CustomVizSettingWidget+ mount={Widget}+ widgetProps={{ ...extraWidgetProps, ...props }}+ />+ ) : (+ <Widget {...extraWidgetProps} {...props} />+ ))}</Root>);};diff --git a/frontend/test/__support__/custom-viz-fixtures/calendar-heatmap/index.js b/frontend/test/__support__/custom-viz-fixtures/calendar-heatmap/index.jsindex 8914990a12a..f6339718c68 100644--- a/frontend/test/__support__/custom-viz-fixtures/calendar-heatmap/index.js+++ b/frontend/test/__support__/custom-viz-fixtures/calendar-heatmap/index.js@@ -5,7 +5,7 @@ var __customVizPlugin__=(function(){var e=Object.defineProperty,t=(e,t)=>()=>(t|`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{le=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?ce(e):``}function de(e){switch(e.tag){case 5:return ce(e.type);case 16:return ce(`Lazy`);case 13:return ce(`Suspense`);case 19:return ce(`SuspenseList`);case 0:case 2:case 15:return e=ue(e.type,!1),e;case 11:return e=ue(e.type.render,!1),e;case 1:return e=ue(e.type,!0),e;default:return``}}function fe(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case E:return`Fragment`;case T:return`Portal`;case O:return`Profiler`;case D:return`StrictMode`;case ee:return`Suspense`;case te:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case A:return(e.displayName||`Context`)+`.Consumer`;case k:return(e._context.displayName||`Context`)+`.Provider`;case j:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case M:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}function pe(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return fe(t);case 8:return t===D?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function me(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function he(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function ge(e){var t=he(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _e(e){e._valueTracker||=ge(e)}function ve(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=he(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function ye(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function be(e,t){var n=t.checked;return oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function xe(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=me(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function Se(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function Ce(e,t){Se(e,t);var n=me(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Te(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Te(e,t.type,me(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function we(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Te(e,t,n){(t!==`number`||ye(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Ee=Array.isArray;function De(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+me(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Oe(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return oe({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function ke(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(Ee(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:me(n)}}function Ae(e,t){var n=me(t.value),r=me(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function je(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function N(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Me(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?N(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Ne,Pe=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Ne||=document.createElement(`div`),Ne.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Ne.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ie={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Le=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ie).forEach(function(e){Le.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ie[t]=Ie[e]})});function Re(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ie.hasOwnProperty(e)&&Ie[e]?(``+t).trim():t+`px`}function ze(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Re(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Be=oe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ve(e,t){if(t){if(Be[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function He(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ue=null;function We(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ge=null,Ke=null,qe=null;function Je(e){if(e=Pi(e)){if(typeof Ge!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Ii(t),Ge(e.stateNode,e.type,t))}}function Ye(e){Ke?qe?qe.push(e):qe=[e]:Ke=e}function Xe(){if(Ke){var e=Ke,t=qe;if(qe=Ke=null,Je(e),t)for(e=0;e<t.length;e++)Je(t[e])}}function Ze(e,t){return e(t)}function Qe(){}var $e=!1;function et(e,t,n){if($e)return e(t,n);$e=!0;try{return Ze(e,t,n)}finally{$e=!1,(Ke!==null||qe!==null)&&(Qe(),Xe())}}function tt(e,t){var n=e.stateNode;if(n===null)return null;var i=Ii(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var P=!1;if(u)try{var nt={};Object.defineProperty(nt,`passive`,{get:function(){P=!0}}),window.addEventListener(`test`,nt,nt),window.removeEventListener(`test`,nt,nt)}catch{P=!1}function rt(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var F=!1,I=null,it=!1,at=null,ot={onError:function(e){F=!0,I=e}};function st(e,t,n,r,i,a,o,s,c){F=!1,I=null,rt.apply(ot,arguments)}function L(e,t,n,i,a,o,s,c,l){if(st.apply(this,arguments),F){if(F){var u=I;F=!1,I=null}else throw Error(r(198));it||(it=!0,at=u)}}function R(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ct(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function lt(e){if(R(e)!==e)throw Error(r(188))}function ut(e){var t=e.alternate;if(!t){if(t=R(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return lt(a),e;if(o===i)return lt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function dt(e){return e=ut(e),e===null?null:ft(e)}function ft(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ft(e);if(t!==null)return t;e=e.sibling}return null}var z=n.unstable_scheduleCallback,pt=n.unstable_cancelCallback,B=n.unstable_shouldYield,V=n.unstable_requestPaint,H=n.unstable_now,mt=n.unstable_getCurrentPriorityLevel,ht=n.unstable_ImmediatePriority,U=n.unstable_UserBlockingPriority,gt=n.unstable_NormalPriority,_t=n.unstable_LowPriority,vt=n.unstable_IdlePriority,yt=null,bt=null;function xt(e){if(bt&&typeof bt.onCommitFiberRoot==`function`)try{bt.onCommitFiberRoot(yt,e,void 0,(e.current.flags&128)==128)}catch{}}var St=Math.clz32?Math.clz32:wt,Ct=Math.log,W=Math.LN2;function wt(e){return e>>>=0,e===0?32:31-(Ct(e)/W|0)|0}var Tt=64,Et=4194304;function Dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ot(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Dt(a))):r=Dt(s)}else o=n&~i,o===0?a!==0&&(r=Dt(a)):r=Dt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-St(t),i=1<<n,r|=e[n],t&=~i;return r}function kt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function At(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-St(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=kt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function jt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Mt(){var e=Tt;return Tt<<=1,!(Tt&4194240)&&(Tt=64),e}function Nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-St(t),e[t]=n}function Ft(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-St(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function G(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-St(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var It=0;function Lt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Rt,K,zt,Bt,Vt,Ht=!1,Ut=[],Wt=null,Gt=null,Kt=null,qt=new Map,Jt=new Map,Yt=[],Xt=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function Zt(e,t){switch(e){case`focusin`:case`focusout`:Wt=null;break;case`dragenter`:case`dragleave`:Gt=null;break;case`mouseover`:case`mouseout`:Kt=null;break;case`pointerover`:case`pointerout`:qt.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Jt.delete(t.pointerId)}}function Qt(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Pi(t),t!==null&&K(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function $t(e,t,n,r,i){switch(t){case`focusin`:return Wt=Qt(Wt,e,t,n,r,i),!0;case`dragenter`:return Gt=Qt(Gt,e,t,n,r,i),!0;case`mouseover`:return Kt=Qt(Kt,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return qt.set(a,Qt(qt.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Jt.set(a,Qt(Jt.get(a)||null,e,t,n,r,i)),!0}return!1}function en(e){var t=Ni(e.target);if(t!==null){var n=R(t);if(n!==null){if(t=n.tag,t===13){if(t=ct(n),t!==null){e.blockedOn=t,Vt(e.priority,function(){zt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function tn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ue=r,n.target.dispatchEvent(r),Ue=null}else return t=Pi(n),t!==null&&K(t),e.blockedOn=n,!1;t.shift()}return!0}function nn(e,t,n){tn(e)&&n.delete(t)}function rn(){Ht=!1,Wt!==null&&tn(Wt)&&(Wt=null),Gt!==null&&tn(Gt)&&(Gt=null),Kt!==null&&tn(Kt)&&(Kt=null),qt.forEach(nn),Jt.forEach(nn)}function an(e,t){e.blockedOn===t&&(e.blockedOn=null,Ht||(Ht=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,rn)))}function on(e){function t(t){return an(t,e)}if(0<Ut.length){an(Ut[0],e);for(var n=1;n<Ut.length;n++){var r=Ut[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Wt!==null&&an(Wt,e),Gt!==null&&an(Gt,e),Kt!==null&&an(Kt,e),qt.forEach(t),Jt.forEach(t),n=0;n<Yt.length;n++)r=Yt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Yt.length&&(n=Yt[0],n.blockedOn===null);)en(n),n.blockedOn===null&&Yt.shift()}var sn=C.ReactCurrentBatchConfig,cn=!0;function ln(e,t,n,r){var i=It,a=sn.transition;sn.transition=null;try{It=1,dn(e,t,n,r)}finally{It=i,sn.transition=a}}function un(e,t,n,r){var i=It,a=sn.transition;sn.transition=null;try{It=4,dn(e,t,n,r)}finally{It=i,sn.transition=a}}function dn(e,t,n,r){if(cn){var i=pn(e,t,n,r);if(i===null)ai(e,t,r,fn,n),Zt(e,r);else if($t(i,e,t,n,r))r.stopPropagation();else if(Zt(e,r),t&4&&-1<Xt.indexOf(e)){for(;i!==null;){var a=Pi(i);if(a!==null&&Rt(a),a=pn(e,t,n,r),a===null&&ai(e,t,r,fn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else ai(e,t,r,null,n)}}var fn=null;function pn(e,t,n,r){if(fn=null,e=We(r),e=Ni(e),e!==null)if(t=R(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ct(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return fn=e,null}function mn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(mt()){case ht:return 1;case U:return 4;case gt:case _t:return 16;case vt:return 536870912;default:return 16}default:return 16}}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return _n=i.slice(e,1<r?1-r:void 0)}function yn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bn(){return!0}function xn(){return!1}function Sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?bn:xn,this.isPropagationStopped=xn,this}return oe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=bn)},persist:function(){},isPersistent:bn}),t}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wn=Sn(Cn),Tn=oe({},Cn,{view:0,detail:0}),En=Sn(Tn),Dn,On,kn,An=oe({},Tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==kn&&(kn&&e.type===`mousemove`?(Dn=e.screenX-kn.screenX,On=e.screenY-kn.screenY):On=Dn=0,kn=e),Dn)},movementY:function(e){return`movementY`in e?e.movementY:On}}),jn=Sn(An),Mn=Sn(oe({},An,{dataTransfer:0})),Nn=Sn(oe({},Tn,{relatedTarget:0})),Pn=Sn(oe({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0})),Fn=Sn(oe({},Cn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),In=Sn(oe({},Cn,{data:0})),Ln={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Rn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Bn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zn[e])?!!t[e]:!1}function Vn(){return Bn}var Hn=Sn(oe({},Tn,{key:function(e){if(e.key){var t=Ln[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=yn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Rn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vn,charCode:function(e){return e.type===`keypress`?yn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?yn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Un=Sn(oe({},An,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Wn=Sn(oe({},Tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vn})),Gn=Sn(oe({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Kn=Sn(oe({},An,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),qn=[9,13,27,32],Jn=u&&`CompositionEvent`in window,q=null;u&&`documentMode`in document&&(q=document.documentMode);var Yn=u&&`TextEvent`in window&&!q,Xn=u&&(!Jn||q&&8<q&&11>=q),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!Jn&&$n(e,t)?(e=vn(),_n=gn=hn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){Ye(r),t=si(t,`onChange`),0<t.length&&(n=new wn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,J=null;function cr(e){$r(e,0)}function lr(e){if(ve(Fi(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(u){var fr;if(u){var pr=`oninput`in document;if(!pr){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),pr=typeof mr.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function hr(){sr&&(sr.detachEvent(`onpropertychange`,gr),J=sr=null)}function gr(e){if(e.propertyName===`value`&&lr(J)){var t=[];or(t,J,e,We(e)),et(cr,t)}}function _r(e,t,n){e===`focusin`?(hr(),sr=t,J=n,sr.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(J)}function yr(e,t){if(e===`click`)return lr(t)}function br(e,t){if(e===`input`||e===`change`)return lr(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(){for(var e=window,t=ye();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=ye(e.document)}return t}function Or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function kr(e){var t=Dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Er(n.ownerDocument.documentElement,n)){if(r!==null&&Or(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Tr(n,a);var o=Tr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ar=u&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==ye(r)||(r=jr,`selectionStart`in r&&Or(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&Cr(Nr,r)||(Nr=r,r=si(Mr,`onSelect`),0<r.length&&(t=new wn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ir(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Lr={animationend:Ir(`Animation`,`AnimationEnd`),animationiteration:Ir(`Animation`,`AnimationIteration`),animationstart:Ir(`Animation`,`AnimationStart`),transitionend:Ir(`Transition`,`TransitionEnd`)},Rr={},zr={};u&&(zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),`TransitionEvent`in window||delete Lr.transitionend.transition);function Br(e){if(Rr[e])return Rr[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zr)return Rr[e]=t[n];return e}var Vr=Br(`animationend`),Hr=Br(`animationiteration`),Ur=Br(`animationstart`),Wr=Br(`transitionend`),Gr=new Map,Kr=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function qr(e,t){Gr.set(e,t),c(t,[e])}for(var Jr=0;Jr<Kr.length;Jr++){var Yr=Kr[Jr];qr(Yr.toLowerCase(),`on`+(Yr[0].toUpperCase()+Yr.slice(1)))}qr(Vr,`onAnimationEnd`),qr(Hr,`onAnimationIteration`),qr(Ur,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Wr,`onTransitionEnd`),l(`onMouseEnter`,[`mouseout`,`mouseover`]),l(`onMouseLeave`,[`mouseout`,`mouseover`]),l(`onPointerEnter`,[`pointerout`,`pointerover`]),l(`onPointerLeave`,[`pointerout`,`pointerover`]),c(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),c(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),c(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),c(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),c(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),c(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Xr=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Zr=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(Xr));function Qr(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,L(r,t,void 0,e),e.currentTarget=null}function $r(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;Qr(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;Qr(i,s,l),a=c}}}if(it)throw e=at,it=!1,at=null,e}function ei(e,t){var n=t[Ai];n===void 0&&(n=t[Ai]=new Set);var r=e+`__bubble`;n.has(r)||(ii(t,e,2,!1),n.add(r))}function ti(e,t,n){var r=0;t&&(r|=4),ii(n,e,r,t)}var ni=`_reactListening`+Math.random().toString(36).slice(2);function ri(e){if(!e[ni]){e[ni]=!0,a.forEach(function(t){t!==`selectionchange`&&(Zr.has(t)||ti(t,!1,e),ti(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ni]||(t[ni]=!0,ti(`selectionchange`,!1,t))}}function ii(e,t,n,r){switch(mn(t)){case 1:var i=ln;break;case 4:i=un;break;default:i=dn}n=i.bind(null,t,n,e),i=void 0,!P||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function ai(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ni(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}et(function(){var r=a,i=We(n),o=[];a:{var s=Gr.get(e);if(s!==void 0){var c=wn,l=e;switch(e){case`keypress`:if(yn(n)===0)break a;case`keydown`:case`keyup`:c=Hn;break;case`focusin`:l=`focus`,c=Nn;break;case`focusout`:l=`blur`,c=Nn;break;case`beforeblur`:case`afterblur`:c=Nn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Mn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Wn;break;case Vr:case Hr:case Ur:c=Pn;break;case Wr:c=Gn;break;case`scroll`:c=En;break;case`wheel`:c=Kn;break;case`copy`:case`cut`:case`paste`:c=Fn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Un}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=tt(p,f),h!=null&&u.push(oi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ue&&(l=n.relatedTarget||n.fromElement)&&(Ni(l)||l[ki]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ni(l):null,l!==null&&(d=R(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=jn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=Un,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Fi(c),m=l==null?s:Fi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ni(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=ci(m))p++;for(m=0,h=f;h;h=ci(h))m++;for(;0<p-m;)u=ci(u),p--;for(;0<m-p;)f=ci(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=ci(u),f=ci(f)}u=null}else u=null;c!==null&&li(o,s,c,u,!1),l!==null&&d!==null&&li(o,d,l,u,!0)}}a:{if(s=r?Fi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=ur;else if(ar(s))if(dr)g=br;else{g=vr;var _=_r}else (c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=yr);if(g&&=g(e,r)){or(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Te(s,`number`,s.value)}switch(_=r?Fi(r):window,e){case`focusin`:(ar(_)||_.contentEditable===`true`)&&(jr=_,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:Pr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Pr=!1,Fr(o,n,i);break;case`selectionchange`:if(Ar)break;case`keydown`:case`keyup`:Fr(o,n,i)}var v;if(Jn)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else tr?$n(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(Xn&&n.locale!==`ko`&&(tr||y!==`onCompositionStart`?y===`onCompositionEnd`&&tr&&(v=vn()):(hn=i,gn=`value`in hn?hn.value:hn.textContent,tr=!0)),_=si(r,y),0<_.length&&(y=new In(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=er(n),v!==null&&(y.data=v)))),(v=Yn?nr(e,n):rr(e,n))&&(r=si(r,`onBeforeInput`),0<r.length&&(i=new In(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}$r(o,t)})}function oi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function si(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=tt(e,n),a!=null&&r.unshift(oi(e,a,i)),a=tt(e,t),a!=null&&r.push(oi(e,a,i))),e=e.return}return r}function ci(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function li(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=tt(n,a),c!=null&&o.unshift(oi(n,c,s))):i||(c=tt(n,a),c!=null&&o.push(oi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ui=/\r\n?/g,di=/\u0000|\uFFFD/g;function fi(e){return(typeof e==`string`?e:``+e).replace(ui,``).replace(di,``)}function pi(e,t,n){if(t=fi(t),fi(e)!==t&&n)throw Error(r(425))}function mi(){}var hi=null,gi=null;function _i(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vi=typeof setTimeout==`function`?setTimeout:void 0,yi=typeof clearTimeout==`function`?clearTimeout:void 0,bi=typeof Promise==`function`?Promise:void 0,xi=typeof queueMicrotask==`function`?queueMicrotask:bi===void 0?vi:function(e){return bi.resolve(null).then(e).catch(Si)};function Si(e){setTimeout(function(){throw e})}function Ci(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),on(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);on(t)}function wi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ti(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Ei=Math.random().toString(36).slice(2),Di=`__reactFiber$`+Ei,Oi=`__reactProps$`+Ei,ki=`__reactContainer$`+Ei,Ai=`__reactEvents$`+Ei,ji=`__reactListeners$`+Ei,Mi=`__reactHandles$`+Ei;function Ni(e){var t=e[Di];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ki]||n[Di]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ti(e);e!==null;){if(n=e[Di])return n;e=Ti(e)}return t}e=n,n=e.parentNode}return null}function Pi(e){return e=e[Di]||e[ki],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Ii(e){return e[Oi]||null}var Li=[],Ri=-1;function zi(e){return{current:e}}function Bi(e){0>Ri||(e.current=Li[Ri],Li[Ri]=null,Ri--)}function Vi(e,t){Ri++,Li[Ri]=e.current,e.current=t}var Hi={},Ui=zi(Hi),Wi=zi(!1),Gi=Hi;function Ki(e,t){var n=e.type.contextTypes;if(!n)return Hi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function qi(e){return e=e.childContextTypes,e!=null}function Ji(){Bi(Wi),Bi(Ui)}function Yi(e,t,n){if(Ui.current!==Hi)throw Error(r(168));Vi(Ui,t),Vi(Wi,n)}function Xi(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,pe(e)||`Unknown`,a));return oe({},n,i)}function Zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hi,Gi=Ui.current,Vi(Ui,e),Vi(Wi,Wi.current),!0}function Qi(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=Xi(e,t,Gi),i.__reactInternalMemoizedMergedChildContext=e,Bi(Wi),Bi(Ui),Vi(Ui,e)):Bi(Wi),Vi(Wi,n)}var $i=null,ea=!1,ta=!1;function na(e){$i===null?$i=[e]:$i.push(e)}function ra(e){ea=!0,na(e)}function ia(){if(!ta&&$i!==null){ta=!0;var e=0,t=It;try{var n=$i;for(It=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}$i=null,ea=!1}catch(t){throw $i!==null&&($i=$i.slice(e+1)),z(ht,ia),t}finally{It=t,ta=!1}}return null}var aa=[],oa=0,sa=null,ca=0,la=[],ua=0,da=null,fa=1,pa=``;function ma(e,t){aa[oa++]=ca,aa[oa++]=sa,sa=e,ca=t}function ha(e,t,n){la[ua++]=fa,la[ua++]=pa,la[ua++]=da,da=e;var r=fa;e=pa;var i=32-St(r)-1;r&=~(1<<i),n+=1;var a=32-St(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,fa=1<<32-St(t)+i|n<<i|r,pa=a+e}else fa=1<<a|n<<i|r,pa=e}function ga(e){e.return!==null&&(ma(e,1),ha(e,1,0))}function _a(e){for(;e===sa;)sa=aa[--oa],aa[oa]=null,ca=aa[--oa],aa[oa]=null;for(;e===da;)da=la[--ua],la[ua]=null,pa=la[--ua],la[ua]=null,fa=la[--ua],la[ua]=null}var va=null,ya=null,ba=!1,xa=null;function Sa(e,t){var n=Xl(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ca(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,va=e,ya=wi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,va=e,ya=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=da===null?null:{id:fa,overflow:pa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,va=e,ya=null,!0);default:return!1}}function wa(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Ta(e){if(ba){var t=ya;if(t){var n=t;if(!Ca(e,t)){if(wa(e))throw Error(r(418));t=wi(n.nextSibling);var i=va;t&&Ca(e,t)?Sa(i,n):(e.flags=e.flags&-4097|2,ba=!1,va=e)}}else{if(wa(e))throw Error(r(418));e.flags=e.flags&-4097|2,ba=!1,va=e}}}function Ea(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;va=e}function Da(e){if(e!==va)return!1;if(!ba)return Ea(e),ba=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!_i(e.type,e.memoizedProps)),t&&=ya){if(wa(e))throw Oa(),Error(r(418));for(;t;)Sa(e,t),t=wi(t.nextSibling)}if(Ea(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){ya=wi(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}ya=null}}else ya=va?wi(e.stateNode.nextSibling):null;return!0}function Oa(){for(var e=ya;e;)e=wi(e.nextSibling)}function ka(){ya=va=null,ba=!1}function Aa(e){xa===null?xa=[e]:xa.push(e)}var ja=C.ReactCurrentBatchConfig;function Ma(e,t){if(e&&e.defaultProps){for(var n in t=oe({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Na=zi(null),Pa=null,Fa=null,Ia=null;function La(){Ia=Fa=Pa=null}function Ra(e){var t=Na.current;Bi(Na),e._currentValue=t}function za(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ba(e,t){Pa=e,Ia=Fa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ps=!0),e.firstContext=null)}function Va(e){var t=e._currentValue;if(Ia!==e)if(e={context:e,memoizedValue:t,next:null},Fa===null){if(Pa===null)throw Error(r(308));Fa=e,Pa.dependencies={lanes:0,firstContext:e}}else Fa=Fa.next=e;return t}var Ha=null;function Ua(e){Ha===null?Ha=[e]:Ha.push(e)}function Wa(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ua(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ga(e,r)}function Ga(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ka=!1;function qa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ja(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ya(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Xa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Wc&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ga(e,n)}return i=r.interleaved,i===null?(t.next=t,Ua(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ga(e,n)}function Za(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,G(e,n)}}function Qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $a(e,t,n,r){var i=e.updateQueue;Ka=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=oe({},d,f);break a;case 2:Ka=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Qc|=o,e.lanes=o,e.memoizedState=d}}function eo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var to=new t.Component().refs;function no(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ro={isMounted:function(e){return(e=e._reactInternals)?R(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gl(),i=_l(e),a=Ya(r,i);a.payload=t,n!=null&&(a.callback=n),t=Xa(e,a,i),t!==null&&(vl(t,e,i,r),Za(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gl(),i=_l(e),a=Ya(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Xa(e,a,i),t!==null&&(vl(t,e,i,r),Za(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gl(),r=_l(e),i=Ya(n,r);i.tag=2,t!=null&&(i.callback=t),t=Xa(e,i,r),t!==null&&(vl(t,e,r,n),Za(t,e,r))}};function io(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Cr(n,r)||!Cr(i,a):!0}function ao(e,t,n){var r=!1,i=Hi,a=t.contextType;return typeof a==`object`&&a?a=Va(a):(i=qi(t)?Gi:Ui.current,r=t.contextTypes,a=(r=r!=null)?Ki(e,i):Hi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ro,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function oo(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ro.enqueueReplaceState(t,t.state,null)}function so(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=to,qa(e);var a=t.contextType;typeof a==`object`&&a?i.context=Va(a):(a=qi(t)?Gi:Ui.current,i.context=Ki(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(no(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&ro.enqueueReplaceState(i,i.state,null),$a(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function co(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;t===to&&(t=a.refs={}),e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function lo(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function uo(e){var t=e._init;return t(e._payload)}function fo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=$l(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ru(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===E?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ne&&uo(i)===t.type)?(r=a(t,n.props),r.ref=co(e,t,n),r.return=e,r):(r=eu(n.type,n.key,n.props,null,e.mode,r),r.ref=co(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=iu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=tu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=ru(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=eu(t.type,t.key,t.props,null,e.mode,n),n.ref=co(e,null,t),n.return=e,n;case T:return t=iu(t,e.mode,n),t.return=e,t;case ne:var r=t._init;return f(e,r(t._payload),n)}if(Ee(t)||ae(t))return t=tu(t,e.mode,n,null),t.return=e,t;lo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case T:return n.key===i?u(e,t,n,r):null;case ne:return i=n._init,p(e,t,i(n._payload),r)}if(Ee(n)||ae(n))return i===null?d(e,t,n,r,null):null;lo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case T:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ne:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Ee(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);lo(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),ba&&ma(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ba&&ma(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),ba&&ma(r,h),l}function g(a,s,c,l){var u=ae(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ba&&ma(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ba&&ma(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ba&&ma(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===E&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===E){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===ne&&uo(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=co(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===E?(r=tu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=eu(i.type,i.key,i.props,null,e.mode,o),o.ref=co(e,r,i),o.return=e,e=o)}return s(e);case T:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=iu(i,e.mode,o),r.return=e,e=r}return s(e);case ne:return l=i._init,_(e,r,l(i._payload),o)}if(Ee(i))return h(e,r,i,o);if(ae(i))return g(e,r,i,o);lo(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=ru(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var po=fo(!0),mo=fo(!1),ho={},go=zi(ho),_o=zi(ho),vo=zi(ho);function yo(e){if(e===ho)throw Error(r(174));return e}function bo(e,t){switch(Vi(vo,t),Vi(_o,e),Vi(go,ho),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Me(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Me(t,e)}Bi(go),Vi(go,t)}function xo(){Bi(go),Bi(_o),Bi(vo)}function So(e){yo(vo.current);var t=yo(go.current),n=Me(t,e.type);t!==n&&(Vi(_o,e),Vi(go,n))}function Co(e){_o.current===e&&(Bi(go),Bi(_o))}var wo=zi(0);function To(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Eo=[];function Do(){for(var e=0;e<Eo.length;e++)Eo[e]._workInProgressVersionPrimary=null;Eo.length=0}var Oo=C.ReactCurrentDispatcher,ko=C.ReactCurrentBatchConfig,Ao=0,jo=null,Mo=null,No=null,Po=!1,Fo=!1,Io=0,Lo=0;function Ro(){throw Error(r(321))}function zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function Bo(e,t,n,i,a,o){if(Ao=o,jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Oo.current=e===null||e.memoizedState===null?xs:Ss,e=n(i,a),Fo){o=0;do{if(Fo=!1,Io=0,25<=o)throw Error(r(301));o+=1,No=Mo=null,t.updateQueue=null,Oo.current=Cs,e=n(i,a)}while(Fo)}if(Oo.current=bs,t=Mo!==null&&Mo.next!==null,Ao=0,No=Mo=jo=null,Po=!1,t)throw Error(r(300));return e}function Vo(){var e=Io!==0;return Io=0,e}function Ho(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return No===null?jo.memoizedState=No=e:No=No.next=e,No}function Y(){if(Mo===null){var e=jo.alternate;e=e===null?null:e.memoizedState}else e=Mo.next;var t=No===null?jo.memoizedState:No.next;if(t!==null)No=t,Mo=e;else{if(e===null)throw Error(r(310));Mo=e,e={memoizedState:Mo.memoizedState,baseState:Mo.baseState,baseQueue:Mo.baseQueue,queue:Mo.queue,next:null},No===null?jo.memoizedState=No=e:No=No.next=e}return No}function Uo(e,t){return typeof t==`function`?t(e):t}function Wo(e){var t=Y(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Mo,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Ao&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,jo.lanes|=d,Qc|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Sr(i,t.memoizedState)||(Ps=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,jo.lanes|=o,Qc|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Go(e){var t=Y(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Sr(o,t.memoizedState)||(Ps=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Ko(){}function qo(e,t){var n=jo,i=Y(),a=t(),o=!Sr(i.memoizedState,a);if(o&&(i.memoizedState=a,Ps=!0),i=i.queue,as(Xo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||No!==null&&No.memoizedState.tag&1){if(n.flags|=2048,es(9,Yo.bind(null,n,i,a,t),void 0,null),Gc===null)throw Error(r(349));Ao&30||Jo(n,t,a)}return a}function Jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=jo.updateQueue,t===null?(t={lastEffect:null,stores:null},jo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yo(e,t,n,r){t.value=n,t.getSnapshot=r,Zo(t)&&Qo(e)}function Xo(e,t,n){return n(function(){Zo(t)&&Qo(e)})}function Zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Qo(e){var t=Ga(e,1);t!==null&&vl(t,e,1,-1)}function $o(e){var t=Ho();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:e},t.queue=e,e=e.dispatch=gs.bind(null,jo,e),[t.memoizedState,e]}function es(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=jo.updateQueue,t===null?(t={lastEffect:null,stores:null},jo.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ts(){return Y().memoizedState}function ns(e,t,n,r){var i=Ho();jo.flags|=e,i.memoizedState=es(1|t,n,void 0,r===void 0?null:r)}function rs(e,t,n,r){var i=Y();r=r===void 0?null:r;var a=void 0;if(Mo!==null){var o=Mo.memoizedState;if(a=o.destroy,r!==null&&zo(r,o.deps)){i.memoizedState=es(t,n,a,r);return}}jo.flags|=e,i.memoizedState=es(1|t,n,a,r)}function is(e,t){return ns(8390656,8,e,t)}function as(e,t){return rs(2048,8,e,t)}function X(e,t){return rs(4,2,e,t)}function os(e,t){return rs(4,4,e,t)}function ss(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cs(e,t,n){return n=n==null?null:n.concat([e]),rs(4,4,ss.bind(null,t,e),n)}function ls(){}function us(e,t){var n=Y();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ds(e,t){var n=Y();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fs(e,t,n){return Ao&21?(Sr(n,t)||(n=Mt(),jo.lanes|=n,Qc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ps=!0),e.memoizedState=n)}function ps(e,t){var n=It;It=n!==0&&4>n?n:4,e(!0);var r=ko.transition;ko.transition={};try{e(!1),t()}finally{It=n,ko.transition=r}}function ms(){return Y().memoizedState}function hs(e,t,n){var r=_l(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_s(e))vs(t,n);else if(n=Wa(e,t,n,r),n!==null){var i=gl();vl(n,e,r,i),ys(n,t,r)}}function gs(e,t,n){var r=_l(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_s(e))vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Sr(s,o)){var c=t.interleaved;c===null?(i.next=i,Ua(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=Wa(e,t,i,r),n!==null&&(i=gl(),vl(n,e,r,i),ys(n,t,r))}}function _s(e){var t=e.alternate;return e===jo||t!==null&&t===jo}function vs(e,t){Fo=Po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ys(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,G(e,n)}}var bs={readContext:Va,useCallback:Ro,useContext:Ro,useEffect:Ro,useImperativeHandle:Ro,useInsertionEffect:Ro,useLayoutEffect:Ro,useMemo:Ro,useReducer:Ro,useRef:Ro,useState:Ro,useDebugValue:Ro,useDeferredValue:Ro,useTransition:Ro,useMutableSource:Ro,useSyncExternalStore:Ro,useId:Ro,unstable_isNewReconciler:!1},xs={readContext:Va,useCallback:function(e,t){return Ho().memoizedState=[e,t===void 0?null:t],e},useContext:Va,useEffect:is,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ns(4194308,4,ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){return ns(4,2,e,t)},useMemo:function(e,t){var n=Ho();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ho();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=hs.bind(null,jo,e),[r.memoizedState,e]},useRef:function(e){var t=Ho();return e={current:e},t.memoizedState=e},useState:$o,useDebugValue:ls,useDeferredValue:function(e){return Ho().memoizedState=e},useTransition:function(){var e=$o(!1),t=e[0];return e=ps.bind(null,e[1]),Ho().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=jo,a=Ho();if(ba){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Gc===null)throw Error(r(349));Ao&30||Jo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Xo.bind(null,i,o,e),[e]),i.flags|=2048,es(9,Yo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Ho(),t=Gc.identifierPrefix;if(ba){var n=pa,r=fa;n=(r&~(1<<32-St(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Io++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Lo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Ss={readContext:Va,useCallback:us,useContext:Va,useEffect:as,useImperativeHandle:cs,useInsertionEffect:X,useLayoutEffect:os,useMemo:ds,useReducer:Wo,useRef:ts,useState:function(){return Wo(Uo)},useDebugValue:ls,useDeferredValue:function(e){return fs(Y(),Mo.memoizedState,e)},useTransition:function(){return[Wo(Uo)[0],Y().memoizedState]},useMutableSource:Ko,useSyncExternalStore:qo,useId:ms,unstable_isNewReconciler:!1},Cs={readContext:Va,useCallback:us,useContext:Va,useEffect:as,useImperativeHandle:cs,useInsertionEffect:X,useLayoutEffect:os,useMemo:ds,useReducer:Go,useRef:ts,useState:function(){return Go(Uo)},useDebugValue:ls,useDeferredValue:function(e){var t=Y();return Mo===null?t.memoizedState=e:fs(t,Mo.memoizedState,e)},useTransition:function(){return[Go(Uo)[0],Y().memoizedState]},useMutableSource:Ko,useSyncExternalStore:qo,useId:ms,unstable_isNewReconciler:!1};function ws(e,t){try{var n=``,r=t;do n+=de(r),r=r.return;while(r);var i=n}catch(e){i=`Error generating stack: `+e.message+`-`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ts(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Es(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ds=typeof WeakMap==`function`?WeakMap:Map;function Os(e,t,n){n=Ya(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ol||(ol=!0,sl=r),Es(e,t)},n}function ks(e,t,n){n=Ya(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Es(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Es(e,t),typeof r!=`function`&&(cl===null?cl=new Set([this]):cl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function As(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ds;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ul.bind(null,e,t,n),t.then(e,e))}function js(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Ms(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ya(-1,1),t.tag=2,Xa(n,t,1))),n.lanes|=1),e)}var Ns=C.ReactCurrentOwner,Ps=!1;function Fs(e,t,n,r){t.child=e===null?mo(t,null,n,r):po(t,e.child,n,r)}function Is(e,t,n,r,i){n=n.render;var a=t.ref;return Ba(t,i),r=Bo(e,t,n,r,a,i),n=Vo(),e!==null&&!Ps?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nc(e,t,i)):(ba&&n&&ga(t),t.flags|=1,Fs(e,t,r,i),t.child)}function Ls(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Zl(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Rs(e,t,a,r,i)):(e=eu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return nc(e,t,i)}return t.flags|=1,e=$l(a,r),e.ref=t.ref,e.return=t,t.child=e}function Rs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(Ps=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ps=!0);else return t.lanes=e.lanes,nc(e,t,i)}return Vs(e,t,n,r,i)}function zs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Vi(Yc,Jc),Jc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Vi(Yc,Jc),Jc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Vi(Yc,Jc),Jc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Vi(Yc,Jc),Jc|=r;return Fs(e,t,i,n),t.child}function Bs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vs(e,t,n,r,i){var a=qi(n)?Gi:Ui.current;return a=Ki(t,a),Ba(t,i),n=Bo(e,t,n,r,a,i),r=Vo(),e!==null&&!Ps?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nc(e,t,i)):(ba&&r&&ga(t),t.flags|=1,Fs(e,t,n,i),t.child)}function Hs(e,t,n,r,i){if(qi(n)){var a=!0;Zi(t)}else a=!1;if(Ba(t,i),t.stateNode===null)tc(e,t),ao(t,n,r),so(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=Va(l):(l=qi(n)?Gi:Ui.current,l=Ki(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&oo(t,o,r,l),Ka=!1;var f=t.memoizedState;o.state=f,$a(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Wi.current||Ka?(typeof u==`function`&&(no(t,n,u,r),c=t.memoizedState),(s=Ka||io(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ja(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ma(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Va(c):(c=qi(n)?Gi:Ui.current,c=Ki(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&oo(t,o,r,c),Ka=!1,f=t.memoizedState,o.state=f,$a(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||Wi.current||Ka?(typeof p==`function`&&(no(t,n,p,r),m=t.memoizedState),(l=Ka||io(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Us(e,t,n,r,a,i)}function Us(e,t,n,r,i,a){Bs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&Qi(t,n,!1),nc(e,t,a);r=t.stateNode,Ns.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=po(t,e.child,null,a),t.child=po(t,null,s,a)):Fs(e,t,s,a),t.memoizedState=r.state,i&&Qi(t,n,!0),t.child}function Ws(e){var t=e.stateNode;t.pendingContext?Yi(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Yi(e,t.context,!1),bo(e,t.containerInfo)}function Gs(e,t,n,r,i){return ka(),Aa(i),t.flags|=256,Fs(e,t,n,r),t.child}var Ks={dehydrated:null,treeContext:null,retryLane:0};function qs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Js(e,t,n){var r=t.pendingProps,i=wo.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Vi(wo,i&1),e===null)return Ta(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=nu(o,r,0,null),e=tu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=qs(n),t.memoizedState=Ks,e):Ys(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Zs(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=$l(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=tu(a,o,n,null),a.flags|=2):a=$l(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?qs(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Ks,r}return a=e.child,e=a.sibling,r=$l(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ys(e,t){return t=nu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function Xs(e,t,n,r){return r!==null&&Aa(r),po(t,e.child,null,n),e=Ys(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zs(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Ts(Error(r(422))),Xs(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=nu({mode:`visible`,children:i.children},a,0,null),o=tu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&po(t,e.child,null,s),t.child.memoizedState=qs(s),t.memoizedState=Ks,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return Xs(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Ts(o,i,void 0),Xs(e,t,s,i)}if(c=(s&e.childLanes)!==0,Ps||c){if(i=Gc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,Ga(e,a),vl(i,e,a,-1))}return Ml(),i=Ts(Error(r(421))),Xs(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Gl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,ya=wi(a.nextSibling),va=t,ba=!0,xa=null,e!==null&&(la[ua++]=fa,la[ua++]=pa,la[ua++]=da,fa=e.id,pa=e.overflow,da=t),t=Ys(t,i.children),t.flags|=4096,t)}function Qs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),za(e.return,t,n)}function $s(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Fs(e,t,r.children,n),r=wo.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qs(e,n,t);else if(e.tag===19)Qs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Vi(wo,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&To(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$s(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&To(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$s(t,!0,n,null,a);break;case`together`:$s(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function tc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=$l(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$l(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rc(e,t,n){switch(t.tag){case 3:Ws(t),ka();break;case 5:So(t);break;case 1:qi(t.type)&&Zi(t);break;case 4:bo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Vi(Na,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Vi(wo,wo.current&1),e=nc(e,t,n),e===null?null:e.sibling):Js(e,t,n):(Vi(wo,wo.current&1),t.flags|=128,null);Vi(wo,wo.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Vi(wo,wo.current),r)break;return null;case 22:case 23:return t.lanes=0,zs(e,t,n)}return nc(e,t,n)}var ic=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ac=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,yo(go.current);var a=null;switch(n){case`input`:i=be(e,i),r=be(e,r),a=[];break;case`select`:i=oe({},i,{value:void 0}),r=oe({},r,{value:void 0}),a=[];break;case`textarea`:i=Oe(e,i),r=Oe(e,r),a=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=mi)}Ve(n,r);var o;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(o in c)c.hasOwnProperty(o)&&(n||={},n[o]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(s.hasOwnProperty(u)?a||=[]:(a||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(o in c)!c.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||={},n[o]=``);for(o in l)l.hasOwnProperty(o)&&c[o]!==l[o]&&(n||={},n[o]=l[o])}else n||(a||=[],a.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(a||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(a||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(s.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&ei(`scroll`,e),a||c===l||(a=[])):(a||=[]).push(u,l))}n&&(a||=[]).push(`style`,n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},oc=function(e,t,n,r){n!==r&&(t.flags|=4)};function sc(e,t){if(!ba)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function cc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function lc(e,t,n){var i=t.pendingProps;switch(_a(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cc(t),null;case 1:return qi(t.type)&&Ji(),cc(t),null;case 3:return i=t.stateNode,xo(),Bi(Wi),Bi(Ui),Do(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Da(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,xa!==null&&(Sl(xa),xa=null))),cc(t),null;case 5:Co(t);var a=yo(vo.current);if(n=t.type,e!==null&&t.stateNode!=null)ac(e,t,n,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return cc(t),null}if(e=yo(go.current),Da(t)){i=t.stateNode,n=t.type;var o=t.memoizedProps;switch(i[Di]=t,i[Oi]=o,e=(t.mode&1)!=0,n){case`dialog`:ei(`cancel`,i),ei(`close`,i);break;case`iframe`:case`object`:case`embed`:ei(`load`,i);break;case`video`:case`audio`:for(a=0;a<Xr.length;a++)ei(Xr[a],i);break;case`source`:ei(`error`,i);break;case`img`:case`image`:case`link`:ei(`error`,i),ei(`load`,i);break;case`details`:ei(`toggle`,i);break;case`input`:xe(i,o),ei(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!o.multiple},ei(`invalid`,i);break;case`textarea`:ke(i,o),ei(`invalid`,i)}for(var c in Ve(n,o),a=null,o)if(o.hasOwnProperty(c)){var l=o[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==o.suppressHydrationWarning&&pi(i.textContent,l,e),a=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==o.suppressHydrationWarning&&pi(i.textContent,l,e),a=[`children`,``+l]):s.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&ei(`scroll`,i)}switch(n){case`input`:_e(i),we(i,o,!0);break;case`textarea`:_e(i),je(i);break;case`select`:case`option`:break;default:typeof o.onClick==`function`&&(i.onclick=mi)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=a.nodeType===9?a:a.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=N(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Di]=t,e[Oi]=i,ic(e,t,!1,!1),t.stateNode=e;a:{switch(c=He(n,i),n){case`dialog`:ei(`cancel`,e),ei(`close`,e),a=i;break;case`iframe`:case`object`:case`embed`:ei(`load`,e),a=i;break;case`video`:case`audio`:for(a=0;a<Xr.length;a++)ei(Xr[a],e);a=i;break;case`source`:ei(`error`,e),a=i;break;case`img`:case`image`:case`link`:ei(`error`,e),ei(`load`,e),a=i;break;case`details`:ei(`toggle`,e),a=i;break;case`input`:xe(e,i),a=be(e,i),ei(`invalid`,e);break;case`option`:a=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},a=oe({},i,{value:void 0}),ei(`invalid`,e);break;case`textarea`:ke(e,i),a=Oe(e,i),ei(`invalid`,e);break;default:a=i}for(o in Ve(n,a),l=a,l)if(l.hasOwnProperty(o)){var u=l[o];o===`style`?ze(e,u):o===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Pe(e,u)):o===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Fe(e,u):typeof u==`number`&&Fe(e,``+u):o!==`suppressContentEditableWarning`&&o!==`suppressHydrationWarning`&&o!==`autoFocus`&&(s.hasOwnProperty(o)?u!=null&&o===`onScroll`&&ei(`scroll`,e):u!=null&&S(e,o,u,c))}switch(n){case`input`:_e(e),we(e,i,!1);break;case`textarea`:_e(e),je(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+me(i.value));break;case`select`:e.multiple=!!i.multiple,o=i.value,o==null?i.defaultValue!=null&&De(e,!!i.multiple,i.defaultValue,!0):De(e,!!i.multiple,o,!1);break;default:typeof a.onClick==`function`&&(e.onclick=mi)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return cc(t),null;case 6:if(e&&t.stateNode!=null)oc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=yo(vo.current),yo(go.current),Da(t)){if(i=t.stateNode,n=t.memoizedProps,i[Di]=t,(o=i.nodeValue!==n)&&(e=va,e!==null))switch(e.tag){case 3:pi(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&pi(i.nodeValue,n,(e.mode&1)!=0)}o&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Di]=t,t.stateNode=i}return cc(t),null;case 13:if(Bi(wo),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ba&&ya!==null&&t.mode&1&&!(t.flags&128))Oa(),ka(),t.flags|=98560,o=!1;else if(o=Da(t),i!==null&&i.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o===null?null:o.dehydrated,!o)throw Error(r(317));o[Di]=t}else ka(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;cc(t),o=!1}else xa!==null&&(Sl(xa),xa=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||wo.current&1?Xc===0&&(Xc=3):Ml())),t.updateQueue!==null&&(t.flags|=4),cc(t),null);case 4:return xo(),e===null&&ri(t.stateNode.containerInfo),cc(t),null;case 10:return Ra(t.type._context),cc(t),null;case 17:return qi(t.type)&&Ji(),cc(t),null;case 19:if(Bi(wo),o=t.memoizedState,o===null)return cc(t),null;if(i=(t.flags&128)!=0,c=o.rendering,c===null)if(i)sc(o,!1);else{if(Xc!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=To(e),c!==null){for(t.flags|=128,sc(o,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)o=n,e=i,o.flags&=14680066,c=o.alternate,c===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=c.childLanes,o.lanes=c.lanes,o.child=c.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=c.memoizedProps,o.memoizedState=c.memoizedState,o.updateQueue=c.updateQueue,o.type=c.type,e=c.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Vi(wo,wo.current&1|2),t.child}e=e.sibling}o.tail!==null&&H()>il&&(t.flags|=128,i=!0,sc(o,!1),t.lanes=4194304)}else{if(!i)if(e=To(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sc(o,!0),o.tail===null&&o.tailMode===`hidden`&&!c.alternate&&!ba)return cc(t),null}else 2*H()-o.renderingStartTime>il&&n!==1073741824&&(t.flags|=128,i=!0,sc(o,!1),t.lanes=4194304);o.isBackwards?(c.sibling=t.child,t.child=c):(n=o.last,n===null?t.child=c:n.sibling=c,o.last=c)}return o.tail===null?(cc(t),null):(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=H(),t.sibling=null,n=wo.current,Vi(wo,i?n&1|2:n&1),t);case 22:case 23:return Ol(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Jc&1073741824&&(cc(t),t.subtreeFlags&6&&(t.flags|=8192)):cc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function uc(e,t){switch(_a(t),t.tag){case 1:return qi(t.type)&&Ji(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xo(),Bi(Wi),Bi(Ui),Do(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Co(t),null;case 13:if(Bi(wo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Bi(wo),null;case 4:return xo(),null;case 10:return Ra(t.type._context),null;case 22:case 23:return Ol(),null;case 24:return null;default:return null}}var dc=!1,fc=!1,pc=typeof WeakSet==`function`?WeakSet:Set,mc=null;function hc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Hl(e,t,n)}else n.current=null}function gc(e,t,n){try{n()}catch(n){Hl(e,t,n)}}var _c=!1;function vc(e,t){if(hi=cn,e=Dr(),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(gi={focusedElem:e,selectionRange:n},cn=!1,mc=t;mc!==null;)if(t=mc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,mc=e;else for(;mc!==null;){t=mc;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ma(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Hl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,mc=e;break}mc=t.return}return h=_c,_c=!1,h}function yc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&gc(t,n,a)}i=i.next}while(i!==r)}}function bc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Sc(e){var t=e.alternate;t!==null&&(e.alternate=null,Sc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Di],delete t[Oi],delete t[Ai],delete t[ji],delete t[Mi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Cc(e){return e.tag===5||e.tag===3||e.tag===4}function wc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Cc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mi));else if(r!==4&&(e=e.child,e!==null))for(Tc(e,t,n),e=e.sibling;e!==null;)Tc(e,t,n),e=e.sibling}function Ec(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ec(e,t,n),e=e.sibling;e!==null;)Ec(e,t,n),e=e.sibling}var Dc=null,Oc=!1;function kc(e,t,n){for(n=n.child;n!==null;)Ac(e,t,n),n=n.sibling}function Ac(e,t,n){if(bt&&typeof bt.onCommitFiberUnmount==`function`)try{bt.onCommitFiberUnmount(yt,n)}catch{}switch(n.tag){case 5:fc||hc(n,t);case 6:var r=Dc,i=Oc;Dc=null,kc(e,t,n),Dc=r,Oc=i,Dc!==null&&(Oc?(e=Dc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Dc.removeChild(n.stateNode));break;case 18:Dc!==null&&(Oc?(e=Dc,n=n.stateNode,e.nodeType===8?Ci(e.parentNode,n):e.nodeType===1&&Ci(e,n),on(e)):Ci(Dc,n.stateNode));break;case 4:r=Dc,i=Oc,Dc=n.stateNode.containerInfo,Oc=!0,kc(e,t,n),Dc=r,Oc=i;break;case 0:case 11:case 14:case 15:if(!fc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&gc(n,t,o),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!fc&&(hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Hl(n,t,e)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(fc=(r=fc)||n.memoizedState!==null,kc(e,t,n),fc=r):kc(e,t,n);break;default:kc(e,t,n)}}function jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new pc),t.forEach(function(t){var r=Kl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Mc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Dc=c.stateNode,Oc=!1;break a;case 3:Dc=c.stateNode.containerInfo,Oc=!0;break a;case 4:Dc=c.stateNode.containerInfo,Oc=!0;break a}c=c.return}if(Dc===null)throw Error(r(160));Ac(o,s,a),Dc=null,Oc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Hl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Nc(t,e),t=t.sibling}function Nc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Mc(t,e),Pc(e),i&4){try{yc(3,e,e.return),bc(3,e)}catch(t){Hl(e,e.return,t)}try{yc(5,e,e.return)}catch(t){Hl(e,e.return,t)}}break;case 1:Mc(t,e),Pc(e),i&512&&n!==null&&hc(n,n.return);break;case 5:if(Mc(t,e),Pc(e),i&512&&n!==null&&hc(n,n.return),e.flags&32){var a=e.stateNode;try{Fe(a,``)}catch(t){Hl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&Se(a,o),He(c,s);var u=He(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?ze(a,f):d===`dangerouslySetInnerHTML`?Pe(a,f):d===`children`?Fe(a,f):S(a,d,f,u)}switch(c){case`input`:Ce(a,o);break;case`textarea`:Ae(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?De(a,!!o.multiple,o.multiple?[]:``,!1):De(a,!!o.multiple,o.defaultValue,!0)):De(a,!!o.multiple,m,!1)}a[Oi]=o}catch(t){Hl(e,e.return,t)}}break;case 6:if(Mc(t,e),Pc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Hl(e,e.return,t)}}break;case 3:if(Mc(t,e),Pc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{on(t.containerInfo)}catch(t){Hl(e,e.return,t)}break;case 4:Mc(t,e),Pc(e);break;case 13:Mc(t,e),Pc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(rl=H())),i&4&&jc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(fc=(u=fc)||d,Mc(t,e),fc=u):Mc(t,e),Pc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(mc=e,d=e.child;d!==null;){for(f=mc=d;mc!==null;){switch(p=mc,m=p.child,p.tag){case 0:case 11:case 14:case 15:yc(4,p,p.return);break;case 1:hc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Hl(i,n,e)}}break;case 5:hc(p,p.return);break;case 22:if(p.memoizedState!==null){Rc(f);continue}}m===null?Rc(f):(m.return=p,mc=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Re(`display`,s))}catch(t){Hl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Hl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Mc(t,e),Pc(e),i&4&&jc(e);break;case 21:break;default:Mc(t,e),Pc(e)}}function Pc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Cc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Fe(a,``),i.flags&=-33),Ec(e,wc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Tc(e,wc(e),o);break;default:throw Error(r(161))}}catch(t){Hl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fc(e,t,n){mc=e,Ic(e,t,n)}function Ic(e,t,n){for(var r=(e.mode&1)!=0;mc!==null;){var i=mc,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||dc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||fc;s=dc;var l=fc;if(dc=o,(fc=c)&&!l)for(mc=i;mc!==null;)o=mc,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?zc(i):(c.return=o,mc=c);for(;a!==null;)mc=a,Ic(a,t,n),a=a.sibling;mc=i,dc=s,fc=l}Lc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,mc=a):Lc(e,t,n)}}function Lc(e){for(;mc!==null;){var t=mc;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:fc||bc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!fc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ma(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&eo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}eo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&on(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}fc||t.flags&512&&xc(t)}catch(e){Hl(t,t.return,e)}}if(t===e){mc=null;break}if(n=t.sibling,n!==null){n.return=t.return,mc=n;break}mc=t.return}}function Rc(e){for(;mc!==null;){var t=mc;if(t===e){mc=null;break}var n=t.sibling;if(n!==null){n.return=t.return,mc=n;break}mc=t.return}}function zc(e){for(;mc!==null;){var t=mc;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bc(4,t)}catch(e){Hl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Hl(t,i,e)}}var a=t.return;try{xc(t)}catch(e){Hl(t,a,e)}break;case 5:var o=t.return;try{xc(t)}catch(e){Hl(t,o,e)}}}catch(e){Hl(t,t.return,e)}if(t===e){mc=null;break}var s=t.sibling;if(s!==null){s.return=t.return,mc=s;break}mc=t.return}}var Bc=Math.ceil,Vc=C.ReactCurrentDispatcher,Hc=C.ReactCurrentOwner,Uc=C.ReactCurrentBatchConfig,Wc=0,Gc=null,Kc=null,qc=0,Jc=0,Yc=zi(0),Xc=0,Zc=null,Qc=0,$c=0,el=0,tl=null,nl=null,rl=0,il=1/0,al=null,ol=!1,sl=null,cl=null,ll=!1,ul=null,dl=0,fl=0,pl=null,ml=-1,hl=0;function gl(){return Wc&6?H():ml===-1?ml=H():ml}function _l(e){return e.mode&1?Wc&2&&qc!==0?qc&-qc:ja.transition===null?(e=It,e===0?(e=window.event,e=e===void 0?16:mn(e.type),e):e):(hl===0&&(hl=Mt()),hl):1}function vl(e,t,n,i){if(50<fl)throw fl=0,pl=null,Error(r(185));Pt(e,n,i),(!(Wc&2)||e!==Gc)&&(e===Gc&&(!(Wc&2)&&($c|=n),Xc===4&&wl(e,qc)),yl(e,i),n===1&&Wc===0&&!(t.mode&1)&&(il=H()+500,ea&&ia()))}function yl(e,t){var n=e.callbackNode;At(e,t);var r=Ot(e,e===Gc?qc:0);if(r===0)n!==null&&pt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&pt(n),t===1)e.tag===0?ra(Tl.bind(null,e)):na(Tl.bind(null,e)),xi(function(){!(Wc&6)&&ia()}),n=null;else{switch(Lt(r)){case 1:n=ht;break;case 4:n=U;break;case 16:n=gt;break;case 536870912:n=vt;break;default:n=gt}n=Jl(n,bl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function bl(e,t){if(ml=-1,hl=0,Wc&6)throw Error(r(327));var n=e.callbackNode;if(Bl()&&e.callbackNode!==n)return null;var i=Ot(e,e===Gc?qc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Nl(e,i);else{t=i;var a=Wc;Wc|=2;var o=jl();(Gc!==e||qc!==t)&&(al=null,il=H()+500,kl(e,t));do try{Fl();break}catch(t){Al(e,t)}while(1);La(),Vc.current=o,Wc=a,Kc===null?(Gc=null,qc=0,t=Xc):t=0}if(t!==0){if(t===2&&(a=jt(e),a!==0&&(i=a,t=xl(e,a))),t===1)throw n=Zc,kl(e,0),wl(e,i),yl(e,H()),n;if(t===6)wl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Cl(a)&&(t=Nl(e,i),t===2&&(o=jt(e),o!==0&&(i=o,t=xl(e,o))),t===1))throw n=Zc,kl(e,0),wl(e,i),yl(e,H()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Rl(e,nl,al);break;case 3:if(wl(e,i),(i&130023424)===i&&(t=rl+500-H(),10<t)){if(Ot(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){gl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=vi(Rl.bind(null,e,nl,al),t);break}Rl(e,nl,al);break;case 4:if(wl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-St(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=H()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Bc(i/1960))-i,10<i){e.timeoutHandle=vi(Rl.bind(null,e,nl,al),i);break}Rl(e,nl,al);break;case 5:Rl(e,nl,al);break;default:throw Error(r(329))}}}return yl(e,H()),e.callbackNode===n?bl.bind(null,e):null}function xl(e,t){var n=tl;return e.current.memoizedState.isDehydrated&&(kl(e,t).flags|=256),e=Nl(e,t),e!==2&&(t=nl,nl=n,t!==null&&Sl(t)),e}function Sl(e){nl===null?nl=e:nl.push.apply(nl,e)}function Cl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Sr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wl(e,t){for(t&=~el,t&=~$c,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-St(t),r=1<<n;e[n]=-1,t&=~r}}function Tl(e){if(Wc&6)throw Error(r(327));Bl();var t=Ot(e,0);if(!(t&1))return yl(e,H()),null;var n=Nl(e,t);if(e.tag!==0&&n===2){var i=jt(e);i!==0&&(t=i,n=xl(e,i))}if(n===1)throw n=Zc,kl(e,0),wl(e,t),yl(e,H()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rl(e,nl,al),yl(e,H()),null}function El(e,t){var n=Wc;Wc|=1;try{return e(t)}finally{Wc=n,Wc===0&&(il=H()+500,ea&&ia())}}function Dl(e){ul!==null&&ul.tag===0&&!(Wc&6)&&Bl();var t=Wc;Wc|=1;var n=Uc.transition,r=It;try{if(Uc.transition=null,It=1,e)return e()}finally{It=r,Uc.transition=n,Wc=t,!(Wc&6)&&ia()}}function Ol(){Jc=Yc.current,Bi(Yc)}function kl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,yi(n)),Kc!==null)for(n=Kc.return;n!==null;){var r=n;switch(_a(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ji();break;case 3:xo(),Bi(Wi),Bi(Ui),Do();break;case 5:Co(r);break;case 4:xo();break;case 13:Bi(wo);break;case 19:Bi(wo);break;case 10:Ra(r.type._context);break;case 22:case 23:Ol()}n=n.return}if(Gc=e,Kc=e=$l(e.current,null),qc=Jc=t,Xc=0,Zc=null,el=$c=Qc=0,nl=tl=null,Ha!==null){for(t=0;t<Ha.length;t++)if(n=Ha[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Ha=null}return e}function Al(e,t){do{var n=Kc;try{if(La(),Oo.current=bs,Po){for(var i=jo.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Po=!1}if(Ao=0,No=Mo=jo=null,Fo=!1,Io=0,Hc.current=null,n===null||n.return===null){Xc=1,Zc=t,Kc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=qc,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=js(s);if(m!==null){m.flags&=-257,Ms(m,s,c,o,t),m.mode&1&&As(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){As(o,u,t),Ml();break a}l=Error(r(426))}}else if(ba&&c.mode&1){var _=js(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ms(_,s,c,o,t),Aa(ws(l,c));break a}}o=l=ws(l,c),Xc!==4&&(Xc=2),tl===null?tl=[o]:tl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Os(o,l,t);Qa(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(cl===null||!cl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=ks(o,c,t);Qa(o,x);break a}}o=o.return}while(o!==null)}Ll(n)}catch(e){t=e,Kc===n&&n!==null&&(Kc=n=n.return);continue}break}while(1)}function jl(){var e=Vc.current;return Vc.current=bs,e===null?bs:e}function Ml(){(Xc===0||Xc===3||Xc===2)&&(Xc=4),Gc===null||!(Qc&268435455)&&!($c&268435455)||wl(Gc,qc)}function Nl(e,t){var n=Wc;Wc|=2;var i=jl();(Gc!==e||qc!==t)&&(al=null,kl(e,t));do try{Pl();break}catch(t){Al(e,t)}while(1);if(La(),Wc=n,Vc.current=i,Kc!==null)throw Error(r(261));return Gc=null,qc=0,Xc}function Pl(){for(;Kc!==null;)Il(Kc)}function Fl(){for(;Kc!==null&&!B();)Il(Kc)}function Il(e){var t=ql(e.alternate,e,Jc);e.memoizedProps=e.pendingProps,t===null?Ll(e):Kc=t,Hc.current=null}function Ll(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=uc(n,t),n!==null){n.flags&=32767,Kc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xc=6,Kc=null;return}}else if(n=lc(n,t,Jc),n!==null){Kc=n;return}if(t=t.sibling,t!==null){Kc=t;return}Kc=t=e}while(t!==null);Xc===0&&(Xc=5)}function Rl(e,t,n){var r=It,i=Uc.transition;try{Uc.transition=null,It=1,zl(e,t,n,r)}finally{Uc.transition=i,It=r}return null}function zl(e,t,n,i){do Bl();while(ul!==null);if(Wc&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Ft(e,o),e===Gc&&(Kc=Gc=null,qc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ll||(ll=!0,Jl(gt,function(){return Bl(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Uc.transition,Uc.transition=null;var s=It;It=1;var c=Wc;Wc|=4,Hc.current=null,vc(e,n),Nc(n,e),kr(gi),cn=!!hi,gi=hi=null,e.current=n,Fc(n,e,a),V(),Wc=c,It=s,Uc.transition=o}else e.current=n;if(ll&&(ll=!1,ul=e,dl=a),o=e.pendingLanes,o===0&&(cl=null),xt(n.stateNode,i),yl(e,H()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(ol)throw ol=!1,e=sl,sl=null,e;return dl&1&&e.tag!==0&&Bl(),o=e.pendingLanes,o&1?e===pl?fl++:(fl=0,pl=e):fl=0,ia(),null}function Bl(){if(ul!==null){var e=Lt(dl),t=Uc.transition,n=It;try{if(Uc.transition=null,It=16>e?16:e,ul===null)var i=!1;else{if(e=ul,ul=null,dl=0,Wc&6)throw Error(r(331));var a=Wc;for(Wc|=4,mc=e.current;mc!==null;){var o=mc,s=o.child;if(mc.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(mc=u;mc!==null;){var d=mc;switch(d.tag){case 0:case 11:case 15:yc(8,d,o)}var f=d.child;if(f!==null)f.return=d,mc=f;else for(;mc!==null;){d=mc;var p=d.sibling,m=d.return;if(Sc(d),d===u){mc=null;break}if(p!==null){p.return=m,mc=p;break}mc=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}mc=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,mc=s;else b:for(;mc!==null;){if(o=mc,o.flags&2048)switch(o.tag){case 0:case 11:case 15:yc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,mc=v;break b}mc=o.return}}var y=e.current;for(mc=y;mc!==null;){s=mc;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,mc=b;else b:for(s=y;mc!==null;){if(c=mc,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:bc(9,c)}}catch(e){Hl(c,c.return,e)}if(c===s){mc=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,mc=x;break b}mc=c.return}}if(Wc=a,ia(),bt&&typeof bt.onPostCommitFiberRoot==`function`)try{bt.onPostCommitFiberRoot(yt,e)}catch{}i=!0}return i}finally{It=n,Uc.transition=t}}return!1}function Vl(e,t,n){t=ws(n,t),t=Os(e,t,1),e=Xa(e,t,1),t=gl(),e!==null&&(Pt(e,1,t),yl(e,t))}function Hl(e,t,n){if(e.tag===3)Vl(e,e,n);else for(;t!==null;){if(t.tag===3){Vl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(cl===null||!cl.has(r))){e=ws(n,e),e=ks(t,e,1),t=Xa(t,e,1),e=gl(),t!==null&&(Pt(t,1,e),yl(t,e));break}}t=t.return}}function Ul(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=gl(),e.pingedLanes|=e.suspendedLanes&n,Gc===e&&(qc&n)===n&&(Xc===4||Xc===3&&(qc&130023424)===qc&&500>H()-rl?kl(e,0):el|=n),yl(e,t)}function Wl(e,t){t===0&&(e.mode&1?(t=Et,Et<<=1,!(Et&130023424)&&(Et=4194304)):t=1);var n=gl();e=Ga(e,t),e!==null&&(Pt(e,t,n),yl(e,n))}function Gl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wl(e,n)}function Kl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Wl(e,n)}var ql=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Wi.current)Ps=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Ps=!1,rc(e,t,n);Ps=!!(e.flags&131072)}else Ps=!1,ba&&t.flags&1048576&&ha(t,ca,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;tc(e,t),e=t.pendingProps;var a=Ki(t,Ui.current);Ba(t,n),a=Bo(null,t,i,e,a,n);var o=Vo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qi(i)?(o=!0,Zi(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,qa(t),a.updater=ro,t.stateNode=a,a._reactInternals=t,so(t,i,e,n),t=Us(null,t,i,!0,o,n)):(t.tag=0,ba&&o&&ga(t),Fs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(tc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Ql(i),e=Ma(i,e),a){case 0:t=Vs(null,t,i,e,n);break a;case 1:t=Hs(null,t,i,e,n);break a;case 11:t=Is(null,t,i,e,n);break a;case 14:t=Ls(null,t,i,Ma(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ma(i,a),Vs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ma(i,a),Hs(e,t,i,a,n);case 3:a:{if(Ws(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,Ja(e,t),$a(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=ws(Error(r(423)),t),t=Gs(e,t,i,n,a);break a}else if(i!==a){a=ws(Error(r(424)),t),t=Gs(e,t,i,n,a);break a}else for(ya=wi(t.stateNode.containerInfo.firstChild),va=t,ba=!0,xa=null,n=mo(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ka(),i===a){t=nc(e,t,n);break a}Fs(e,t,i,n)}t=t.child}return t;case 5:return So(t),e===null&&Ta(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,_i(i,a)?s=null:o!==null&&_i(i,o)&&(t.flags|=32),Bs(e,t),Fs(e,t,s,n),t.child;case 6:return e===null&&Ta(t),null;case 13:return Js(e,t,n);case 4:return bo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=po(t,null,i,n):Fs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ma(i,a),Is(e,t,i,a,n);case 7:return Fs(e,t,t.pendingProps,n),t.child;case 8:return Fs(e,t,t.pendingProps.children,n),t.child;case 12:return Fs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,Vi(Na,i._currentValue),i._currentValue=s,o!==null)if(Sr(o.value,s)){if(o.children===a.children&&!Wi.current){t=nc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=Ya(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),za(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),za(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Fs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Ba(t,n),a=Va(a),i=i(a),t.flags|=1,Fs(e,t,i,n),t.child;case 14:return i=t.type,a=Ma(i,t.pendingProps),a=Ma(i.type,a),Ls(e,t,i,a,n);case 15:return Rs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ma(i,a),tc(e,t),t.tag=1,qi(i)?(e=!0,Zi(t)):e=!1,Ba(t,n),ao(t,i,a),so(t,i,a,n),Us(null,t,i,!0,e,n);case 19:return ec(e,t,n);case 22:return zs(e,t,n)}throw Error(r(156,t.tag))};function Jl(e,t){return z(e,t)}function Yl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xl(e,t,n,r){return new Yl(e,t,n,r)}function Zl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ql(e){if(typeof e==`function`)return+!!Zl(e);if(e!=null){if(e=e.$$typeof,e===j)return 11;if(e===M)return 14}return 2}function $l(e,t){var n=e.alternate;return n===null?(n=Xl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function eu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)Zl(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case E:return tu(n.children,a,o,t);case D:s=8,a|=8;break;case O:return e=Xl(12,n,t,a|2),e.elementType=O,e.lanes=o,e;case ee:return e=Xl(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=Xl(19,n,t,a),e.elementType=te,e.lanes=o,e;case re:return nu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case k:s=10;break a;case A:s=9;break a;case j:s=11;break a;case M:s=14;break a;case ne:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Xl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function tu(e,t,n,r){return e=Xl(7,e,r,t),e.lanes=n,e}function nu(e,t,n,r){return e=Xl(22,e,r,t),e.elementType=re,e.lanes=n,e.stateNode={isHidden:!1},e}function ru(e,t,n){return e=Xl(6,e,null,t),e.lanes=n,e}function iu(e,t,n){return t=Xl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function au(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Nt(0),this.expirationTimes=Nt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ou(e,t,n,r,i,a,o,s,c){return e=new au(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Xl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},qa(a),e}function su(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function cu(e){if(!e)return Hi;e=e._reactInternals;a:{if(R(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(qi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(qi(n))return Xi(e,n,t)}return t}function lu(e,t,n,r,i,a,o,s,c){return e=ou(n,r,!0,e,i,a,o,s,c),e.context=cu(null),n=e.current,r=gl(),i=_l(n),a=Ya(r,i),a.callback=t??null,Xa(n,a,i),e.current.lanes=i,Pt(e,i,r),yl(e,r),e}function uu(e,t,n,r){var i=t.current,a=gl(),o=_l(i);return n=cu(n),t.context===null?t.context=n:t.pendingContext=n,t=Ya(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Xa(i,t,o),e!==null&&(vl(e,i,o,a),Za(e,i,o)),o}function du(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function fu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pu(e,t){fu(e,t),(e=e.alternate)&&fu(e,t)}function mu(){return null}var hu=typeof reportError==`function`?reportError:function(e){console.error(e)};function gu(e){this._internalRoot=e}_u.prototype.render=gu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));uu(e,t,null,null)},_u.prototype.unmount=gu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dl(function(){uu(null,e,null,null)}),t[ki]=null}};function _u(e){this._internalRoot=e}_u.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yt.length&&t!==0&&t<Yt[n].priority;n++);Yt.splice(n,0,e),n===0&&en(e)}};function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function bu(){}function xu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=du(o);a.call(e)}}var o=lu(t,r,e,0,null,!1,!1,``,bu);return e._reactRootContainer=o,e[ki]=o.current,ri(e.nodeType===8?e.parentNode:e),Dl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=du(c);s.call(e)}}var c=ou(e,0,!1,null,null,!1,!1,``,bu);return e._reactRootContainer=c,e[ki]=c.current,ri(e.nodeType===8?e.parentNode:e),Dl(function(){uu(t,c,n,r)}),c}function Su(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=du(o);s.call(e)}}uu(t,o,e,i)}else o=xu(n,t,e,i,r);return du(o)}Rt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Dt(t.pendingLanes);n!==0&&(G(t,n|1),yl(t,H()),!(Wc&6)&&(il=H()+500,ia()))}break;case 13:Dl(function(){var t=Ga(e,1);t!==null&&vl(t,e,1,gl())}),pu(e,1)}},K=function(e){if(e.tag===13){var t=Ga(e,134217728);t!==null&&vl(t,e,134217728,gl()),pu(e,134217728)}},zt=function(e){if(e.tag===13){var t=_l(e),n=Ga(e,t);n!==null&&vl(n,e,t,gl()),pu(e,t)}},Bt=function(){return It},Vt=function(e,t){var n=It;try{return It=e,t()}finally{It=n}},Ge=function(e,t,n){switch(t){case`input`:if(Ce(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Ii(i);if(!a)throw Error(r(90));ve(i),Ce(i,a)}}}break;case`textarea`:Ae(e,n);break;case`select`:t=n.value,t!=null&&De(e,!!n.multiple,t,!1)}},Ze=El,Qe=Dl;var Cu={usingClientEntryPoint:!1,Events:[Pi,Fi,Ii,Ye,Xe,El]},wu={findFiberByHostInstance:Ni,bundleType:0,version:`18.2.0`,rendererPackageName:`react-dom`},Tu={bundleType:wu.bundleType,version:wu.version,rendererPackageName:wu.rendererPackageName,rendererConfig:wu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=dt(e),e===null?null:e.stateNode},findFiberByHostInstance:wu.findFiberByHostInstance||mu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.2.0-next-9e3b772b8-20220608`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eu.isDisabled&&Eu.supportsFiber)try{yt=Eu.inject(Tu),bt=Eu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vu(t))throw Error(r(200));return su(e,t,null,n)},e.createRoot=function(e,t){if(!vu(e))throw Error(r(299));var n=!1,i=``,a=hu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=ou(e,1,!1,null,null,n,!1,i,a),e[ki]=t.current,ri(e.nodeType===8?e.parentNode:e),new gu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=dt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Dl(e)},e.hydrate=function(e,t,n){if(!yu(t))throw Error(r(200));return Su(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!vu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=hu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=lu(t,null,e,1,n??null,a,!1,o,s),e[ki]=t.current,ri(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new _u(t)},e.render=function(e,t,n){if(!yu(t))throw Error(r(200));return Su(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!yu(e))throw Error(r(40));return e._reactRootContainer?(Dl(function(){Su(null,null,e,!1,function(){e._reactRootContainer=null,e[ki]=null})}),!0):!1},e.unstable_batchedUpdates=El,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!yu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Su(e,t,n,!1,i)},e.version=`18.2.0-next-9e3b772b8-20220608`})),c=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=t((e=>{var t=c();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),u=t((e=>{var t=i(),n=Symbol.for(`react.element`),r=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,i){var s,c={},l=null,u=null;for(s in i!==void 0&&(l=``+i),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)r.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.jsx=s,e.jsxs=s})),d=t(((e,t)=>{t.exports=u()})),f=i(),p=l(),m=d();function h(){let e=window.__METABASE_VIZ_API__;if(!e)throw Error(`Metabase Viz API not initialized. Column type functions can only be called inside a running Metabase instance.`);return e.columnTypes}var g=e=>h().isDate(e),_=e=>h().isNumeric(e),v=(e,t)=>{let n=window.__METABASE_VIZ_API__;if(!n)throw Error(`Metabase Viz API not initialized. formatValue can only be called inside a running Metabase instance.`);return n.formatValue(e,t)},y=[`minute`,`hour`,`day`,`week`,`month`,`quarter`,`year`],b=[`minute-of-hour`,`hour-of-day`,`day-of-week`,`day-of-month`,`day-of-year`,`week-of-year`,`month-of-year`,`quarter-of-year`];[...y,...b];var x=class extends f.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){let{message:t,stack:n}=e;console.error(`[plugin] visualization render failed: ${t}\n${n}`)}render(){return this.state.error?null:this.props.children}};function S(e){let{VisualizationComponent:t,...n}=e;return{...n,VisualizationComponent:t,mount(e,n){let r=(0,p.createRoot)(e),i=e=>{r.render((0,m.jsx)(x,{children:(0,m.jsx)(t,{...e})}))};return i(n),{update:i,unmount:()=>r.unmount()}}}}var C={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let e in C)Object.freeze(C[e]);var w=Object.freeze(C),T=Object.create(null);for(let e in w)Object.hasOwn(w,e)&&(T[w[e]]=e);var E={to:{},get:{}};E.get=function(e){let t=e.slice(0,3).toLowerCase(),n,r;switch(t){case`hsl`:n=E.get.hsl(e),r=`hsl`;break;case`hwb`:n=E.get.hwb(e),r=`hwb`;break;default:n=E.get.rgb(e),r=`rgb`;break}return n?{model:r,value:n}:null},E.get.rgb=function(e){if(!e)return null;let t=/^#([a-f\d]{3,4})$/i,n=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,i=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,a=/^(\w+)$/,o=[0,0,0,1],s,c,l;if(s=e.match(n)){for(l=s[2],s=s[1],c=0;c<3;c++){let e=c*2;o[c]=Number.parseInt(s.slice(e,e+2),16)}l&&(o[3]=Number.parseInt(l,16)/255)}else if(s=e.match(t)){for(s=s[1],l=s[3],c=0;c<3;c++)o[c]=Number.parseInt(s[c]+s[c],16);l&&(o[3]=Number.parseInt(l+l,16)/255)}else if(s=e.match(r)){for(c=0;c<3;c++)o[c]=Number.parseFloat(s[c+1]);s[4]&&(o[3]=s[5]?Number.parseFloat(s[4])*.01:Number.parseFloat(s[4]))}else if(s=e.match(i)){for(c=0;c<3;c++)o[c]=Math.round(Number.parseFloat(s[c+1])*2.55);s[4]&&(o[3]=s[5]?Number.parseFloat(s[4])*.01:Number.parseFloat(s[4]))}else if(s=e.toLowerCase().match(a))return s[1]===`transparent`?[0,0,0,0]:Object.hasOwn(w,s[1])?(o=w[s[1]].slice(),o[3]=1,o):null;else return null;for(c=0;c<3;c++)o[c]=D(o[c],0,255);return o[3]=D(o[3],0,1),o},E.get.hsl=function(e){if(!e)return null;let t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){let e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,D(Number.parseFloat(t[2]),0,100),D(Number.parseFloat(t[3]),0,100),D(Number.isNaN(e)?1:e,0,1)]}return null},E.get.hwb=function(e){if(!e)return null;let t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){let e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,D(Number.parseFloat(t[2]),0,100),D(Number.parseFloat(t[3]),0,100),D(Number.isNaN(e)?1:e,0,1)]}return null},E.to.hex=function(...e){return`#`+O(e[0])+O(e[1])+O(e[2])+(e[3]<1?O(Math.round(e[3]*255)):``)},E.to.rgb=function(...e){return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},E.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+r+`%)`:`rgba(`+t+`%, `+n+`%, `+r+`%, `+e[3]+`)`},E.to.hsl=function(...e){return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},E.to.hwb=function(...e){let t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},E.to.keyword=function(...e){return T[e.slice(0,3)]};function D(e,t,n){return Math.min(Math.max(t,e),n)}function O(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}var k={};for(let e of Object.keys(w))k[w[e]]=e;var A={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},oklab:{channels:3,labels:[`okl`,`oka`,`okb`]},lch:{channels:3,labels:`lch`},oklch:{channels:3,labels:[`okl`,`okc`,`okh`]},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}},j=(6/29)**3;function ee(e){let t=e>.0031308?1.055*e**(1/2.4)-.055:e*12.92;return Math.min(Math.max(0,t),1)}function te(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}for(let e of Object.keys(A)){if(!(`channels`in A[e]))throw Error(`missing channels property: `+e);if(!(`labels`in A[e]))throw Error(`missing channel labels property: `+e);if(A[e].labels.length!==A[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=A[e];delete A[e].channels,delete A[e].labels,Object.defineProperty(A[e],`channels`,{value:t}),Object.defineProperty(A[e],`labels`,{value:n})}A.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;switch(a){case i:s=0;break;case t:s=(n-r)/o;break;case n:s=2+(r-t)/o;break;case r:s=4+(t-n)/o;break}s=Math.min(s*60,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,c*100,l*100]},A.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+1/2};if(u===0)i=0,a=0;else{switch(a=u/l,t=d(o),n=d(s),r=d(c),l){case o:i=r-n;break;case s:i=1/3+t-r;break;case c:i=2/3+n-t;break}i<0?i+=1:i>1&&--i}return[i*360,a*100,l*100]},A.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=A.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,a*100,r*100]},A.rgb.oklab=function(e){let t=te(e[0]/255),n=te(e[1]/255),r=te(e[2]/255),i=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),a=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),o=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r),s=.2104542553*i+.793617785*a-.0040720468*o,c=1.9779984951*i-2.428592205*a+.4505937099*o,l=.0259040371*i+.7827717662*a-.808675766*o;return[s*100,c*100,l*100]},A.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),a=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[a*100,o*100,s*100,i*100]};function M(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}A.rgb.keyword=function(e){let t=k[e];if(t)return t;let n=1/0,r;for(let t of Object.keys(w)){let i=w[t],a=M(e,i);a<n&&(n=a,r=t)}return r},A.keyword.rgb=function(e){return[...w[e]]},A.rgb.xyz=function(e){let t=te(e[0]/255),n=te(e[1]/255),r=te(e[2]/255),i=t*.4124564+n*.3575761+r*.1804375,a=t*.2126729+n*.7151522+r*.072175,o=t*.0193339+n*.119192+r*.9503041;return[i*100,a*100,o*100]},A.rgb.lab=function(e){let t=A.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>j?n**(1/3):7.787*n+16/116,r=r>j?r**(1/3):7.787*r+16/116,i=i>j?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},A.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a;if(n===0)return a=r*255,[a,a,a];let o=r<.5?r*(1+n):r+n-r*n,s=2*r-o,c=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,a=6*i<1?s+(o-s)*6*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,c[e]=a*255;return c},A.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a;let o=(r+n)/2;return[t,(r===0?2*i/(a+i):2*n/(r+n))*100,o*100]},A.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},A.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,a*100,o*100]},A.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,o&1&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c;break}return[l*255,u*255,d*255]},A.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[a*255,o*255,s*255]},A.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=t*3.2404542+n*-1.5371385+r*-.4985314,a=t*-.969266+n*1.8760108+r*.041556,o=t*.0556434+n*-.2040259+r*1.0572252,i=ee(i),a=ee(a),o=ee(o),[i*255,a*255,o*255]},A.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>j?t**(1/3):7.787*t+16/116,n=n>j?n**(1/3):7.787*n+16/116,r=r>j?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},A.xyz.oklab=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=Math.cbrt(.8189330101*t+.3618667424*n-.1288597137*r),a=Math.cbrt(.0329845436*t+.9293118715*n+.0361456387*r),o=Math.cbrt(.0482003018*t+.2643662691*n+.633851707*r),s=.2104542553*i+.793617785*a-.0040720468*o,c=1.9779984951*i-2.428592205*a+.4505937099*o,l=.0259040371*i+.7827717662*a-.808675766*o;return[s*100,c*100,l*100]},A.oklab.oklch=function(e){return A.lab.lch(e)},A.oklab.xyz=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=(.999999998*t+.396337792*n+.215803758*r)**3,a=(1.000000008*t-.105561342*n-.063854175*r)**3,o=(1.000000055*t-.089484182*n-1.291485538*r)**3,s=1.227013851*i-.55779998*a+.281256149*o,c=-.040580178*i+1.11225687*a-.071676679*o,l=-.076381285*i-.421481978*a+1.58616322*o;return[s*100,c*100,l*100]},A.oklab.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=(t+.3963377774*n+.2158037573*r)**3,a=(t-.1055613458*n-.0638541728*r)**3,o=(t-.0894841775*n-1.291485548*r)**3,s=ee(4.0767416621*i-3.3077115913*a+.2309699292*o),c=ee(-1.2684380046*i+2.6097574011*a-.3413193965*o),l=ee(-.0041960863*i-.7034186147*a+1.707614701*o);return[s*255,c*255,l*255]},A.oklch.oklab=function(e){return A.lch.lab(e)},A.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;a=(t+16)/116,i=n/500+a,o=a-r/200;let s=a**3,c=i**3,l=o**3;return a=s>j?s:(a-16/116)/7.787,i=c>j?c:(i-16/116)/7.787,o=l>j?l:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]},A.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},A.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},A.rgb.ansi16=function(e,t=null){let[n,r,i]=e,a=t===null?A.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(o+=60),o},A.hsv.ansi16=function(e){return A.rgb.ansi16(A.hsv.rgb(e),e[2])},A.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t>>4==n>>4&&n>>4==r>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},A.ansi16.rgb=function(e){e=e[0];let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(Math.trunc(e>50)+1)*.5;return[(t&1)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},A.ansi256.rgb=function(e){if(e=e[0],e>=232){let t=(e-232)*10+8;return[t,t,t]}e-=16;let t;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},A.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return`000000`.slice(t.length)+t},A.hex.rgb=function(e){let t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},A.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c=o<1?a/(1-o):0;return s=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,s/=6,s%=1,[s*360,o*100,c*100]},A.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]},A.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},A.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]},A.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],r*100,n*100]},A.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],r*100,n*100]},A.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],(n-t)*100,(1-n)*100]},A.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},A.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},A.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},A.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},A.gray.hsl=function(e){return[0,0,e[0]]},A.gray.hsv=A.gray.hsl,A.gray.hwb=function(e){return[0,100,e[0]]},A.gray.cmyk=function(e){return[0,0,0,e[0]]},A.gray.lab=function(e){return[e[0],0,0]},A.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.slice(n.length)+n},A.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function ne(){let e={},t=Object.keys(A);for(let{length:n}=t,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function re(e){let t=ne(),n=[e];for(t[e].distance=0;n.length>0;){let e=n.pop(),r=Object.keys(A[e]);for(let{length:i}=r,a=0;a<i;a++){let i=r[a],o=t[i];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(i))}}return t}function ie(e,t){return function(n){return t(e(n))}}function ae(e,t){let n=[t[e].parent,e],r=A[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=ie(A[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}function oe(e){let t=re(e),n={},r=Object.keys(t);for(let{length:e}=r,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=ae(e,t))}return n}var se={},ce=Object.keys(A);function le(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}function ue(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let{length:e}=r,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}for(let e of ce){se[e]={},Object.defineProperty(se[e],`channels`,{value:A[e].channels}),Object.defineProperty(se[e],`labels`,{value:A[e].labels});let t=oe(e),n=Object.keys(t);for(let r of n){let n=t[r];se[e][r]=ue(n),se[e][r].raw=le(n)}}var de=[`keyword`,`gray`,`hex`],fe={};for(let e of Object.keys(se))fe[[...se[e].labels].sort().join(``)]=e;var pe={};function me(e,t){if(!(this instanceof me))return new me(e,t);if(t&&t in de&&(t=null),t&&!(t in se))throw Error(`Unknown model: `+t);let n,r;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof me)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=E.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,r=se[this.model].channels,this.color=t.value.slice(0,r),this.valpha=typeof t.value[r]==`number`?t.value[r]:1}else if(e.length>0){this.model=t||`rgb`,r=se[this.model].channels;let n=Array.prototype.slice.call(e,0,r);this.color=be(n,r),this.valpha=typeof e[r]==`number`?e[r]:1}else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let r=t.sort().join(``);if(!(r in fe))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=fe[r];let{labels:i}=se[this.model],a=[];for(n=0;n<i.length;n++)a.push(e[i[n]]);this.color=be(a)}if(pe[this.model])for(r=se[this.model].channels,n=0;n<r;n++){let e=pe[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}me.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in E.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let n=t.valpha===1?t.color:[...t.color,this.valpha];return E.to[t.model](...n)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return E.to.rgb.percent(...n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=se[this.model],{labels:n}=se[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new me([...this.color.map(ge(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new me([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:_e(`rgb`,0,ve(255)),green:_e(`rgb`,1,ve(255)),blue:_e(`rgb`,2,ve(255)),hue:_e([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:_e(`hsl`,1,ve(100)),lightness:_e(`hsl`,2,ve(100)),saturationv:_e(`hsv`,1,ve(100)),value:_e(`hsv`,2,ve(100)),chroma:_e(`hcg`,1,ve(100)),gray:_e(`hcg`,2,ve(100)),white:_e(`hwb`,1,ve(100)),wblack:_e(`hwb`,2,ve(100)),cyan:_e(`cmyk`,0,ve(100)),magenta:_e(`cmyk`,1,ve(100)),yellow:_e(`cmyk`,2,ve(100)),black:_e(`cmyk`,3,ve(100)),x:_e(`xyz`,0,ve(95.047)),y:_e(`xyz`,1,ve(100)),z:_e(`xyz`,2,ve(108.833)),l:_e(`lab`,0,ve(100)),a:_e(`lab`,1),b:_e(`lab`,2),keyword(e){return e===void 0?se[this.model].keyword(this.color):new me(e)},hex(e){return e===void 0?E.to.hex(...this.rgb().round().color):new me(e)},hexa(e){if(e!==void 0)return new me(e);let t=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n=`0`+n),E.to.hex(...t)+n},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return me.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,c=1-s;return me.rgb(s*n.red()+c*r.red(),s*n.green()+c*r.green(),s*n.blue()+c*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(se)){if(de.includes(e))continue;let{channels:t}=se[e];me.prototype[e]=function(...t){return this.model===e?new me(this):t.length>0?new me(t,e):new me([...ye(se[this.model][e].raw(this.color)),this.valpha],e)},me[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=be(n,t)),new me(r,e)}}function he(e,t){return Number(e.toFixed(t))}function ge(e){return function(t){return he(t,e)}}function _e(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(pe[r]||=[])[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function ve(e){return function(t){return Math.max(0,Math.min(e,t))}}function ye(e){return Array.isArray(e)?e:[e]}function be(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}var xe=`#57606a`,Se=`#c9d1d9`,Ce=`#85b8e8`,we=`#ebedf0`,Te=`#21262d`;function Ee(e,t,n){let r=me(e).rgb().array(),i=me(t).rgb().array(),a=Math.round(r[0]+(i[0]-r[0])*n),o=Math.round(r[1]+(i[1]-r[1])*n),s=Math.round(r[2]+(i[2]-r[2])*n);return me.rgb(a,o,s).string()}var De=92,Oe=.2,ke=.1;function Ae(e){let t=me(e).lightness(De).saturate(ke),n=me(e).darken(Oe).saturate(ke),r=t.string(),i=n.string(),a=e=>Ee(r,i,e),o=[0,.25,.5,.75,1].map(e=>a(e));return{empty:o[0],low:o[1],"medium-low":o[2],"medium-high":o[3],high:o[4]}}var je=function(e,t){return je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},je(e,t)};function N(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);je(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Me=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Ne=new(function(){function e(){this.browser=new Me,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(Ne.wxa=!0,Ne.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Ne.worker=!0:!Ne.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Ne.node=!0,Ne.svgSupported=!0):Pe(navigator.userAgent,Ne);function Pe(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Fe=`12px sans-serif`,Ie=20,Le=100,Re=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ze(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-Ie)/Le}return t}var Be=ze(Re),Ve={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Ve.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=Be[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},He=ct([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),Ue=ct([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),We=Object.prototype.toString,Ge=Array.prototype,Ke=Ge.forEach,qe=Ge.filter,Je=Ge.slice,Ye=Ge.map,Xe=function(){}.constructor,Ze=Xe?Xe.prototype:null,Qe=`__proto__`,$e=2311;function et(){return $e++}function tt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=We.call(e);if(n===`[object Array]`){if(!jt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=P(e[r])}}else if(Ue[n]){if(!jt(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!He[n]&&!jt(e)&&!vt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==Qe&&(t[o]=P(e[o]));return t}function nt(e,t,n){if(!U(t)||!U(e))return n?P(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==Qe){var i=e[r],a=t[r];U(a)&&U(i)&&!B(a)&&!B(i)&&!vt(a)&&!vt(i)&&!gt(a)&&!gt(i)&&!jt(a)&&!jt(i)?nt(i,a,n):(n||!(r in e))&&(e[r]=P(t[r]))}return e}function rt(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=nt(n,e[r],t);return n}function F(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==Qe&&(e[n]=t[n]);return e}function I(e,t,n){for(var r=dt(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}Ve.createCanvas;function it(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function at(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function ot(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else I(e,t,n)}function st(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function L(e,t,n){if(e&&t)if(e.forEach&&e.forEach===Ke)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function R(e,t,n){if(!e)return[];if(!t)return Tt(e);if(e.map&&e.map===Ye)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function ct(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function lt(e,t,n){if(!e)return[];if(!t)return Tt(e);if(e.filter&&e.filter===qe)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function ut(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function dt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function ft(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(Je.call(arguments)))}}var z=Ze&&V(Ze.bind)?Ze.call.bind(Ze.bind):ft;function pt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(Je.call(arguments)))}}function B(e){return Array.isArray?Array.isArray(e):We.call(e)===`[object Array]`}function V(e){return typeof e==`function`}function H(e){return typeof e==`string`}function mt(e){return We.call(e)===`[object String]`}function ht(e){return typeof e==`number`}function U(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function gt(e){return!!He[We.call(e)]}function _t(e){return!!Ue[We.call(e)]}function vt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function yt(e){return e.colorStops!=null}function bt(e){return e.image!=null}function xt(e){return We.call(e)===`[object RegExp]`}function St(e){return e!==e}function Ct(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function W(e,t){return e??t}function wt(e,t,n){return e??t??n}function Tt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Je.apply(e,t)}function Et(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function Dt(e,t){if(!e)throw Error(t)}function Ot(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var kt=`__ec_primitive__`;function At(e){e[kt]=!0}function jt(e){return e[kt]}var Mt=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return dt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Nt=typeof Map==`function`;function Pt(){return Nt?new Map:new Mt}var Ft=function(){function e(t){var n=B(t);this.data=Pt();var r=this;t instanceof e?t.each(i):t&&L(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Nt?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function G(e){return new Ft(e)}function It(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Lt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&F(n,t),n}function Rt(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function K(e,t){return e.hasOwnProperty(t)}function zt(){}var Bt=180/Math.PI;function Vt(e,t){return e??=0,t??=0,[e,t]}function Ht(e,t){return e[0]=t[0],e[1]=t[1],e}function Ut(e){return[e[0],e[1]]}function Wt(e,t,n){return e[0]=t,e[1]=n,e}function Gt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Kt(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function qt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Jt(e){return Math.sqrt(Yt(e))}function Yt(e){return e[0]*e[0]+e[1]*e[1]}function Xt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Zt(e,t){var n=Jt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Qt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var $t=Qt;function en(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var tn=en;function nn(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function rn(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function an(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function on(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var sn=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),cn=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new sn(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new sn(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new sn(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new sn(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new sn(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new sn(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),ln=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=r.length,s=0;s<o;s++){var c=r[s];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(a){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,t[0]);break;case 2:c.h.call(c.ctx,t[0],t[1]);break;default:c.h.apply(c.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=t[a-1],s=r.length,c=0;c<s;c++){var l=r[c];if(!(i&&i.filter&&l.query!=null&&!i.filter(e,l.query)))switch(a){case 0:l.h.call(o);break;case 1:l.h.call(o,t[0]);break;case 2:l.h.call(o,t[0],t[1]);break;default:l.h.apply(o,t.slice(1,a-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),un=Math.log(2);function dn(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/un);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*dn(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function fn(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=dn(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*dn(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var pn=`___zrEVENTSAVED`,mn=[];function hn(e,t,n,r,i){return _n(mn,t,r,i,!0)&&_n(e,n,mn[0],mn[1])}function gn(e,t){e&&n(e),t&&n(t);function n(e){var t=e[pn];t&&(t.clearMarkers&&t.clearMarkers(),delete e[pn])}}function _n(e,t,n,r,i){if(t.getBoundingClientRect&&Ne.domSupported&&!bn(t)){var a=t[pn]||(t[pn]={}),o=yn(vn(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function vn(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){L(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function yn(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?fn(s,o):fn(o,s))}function bn(e){return e.nodeName.toUpperCase()===`CANVAS`}var xn=/([&<>"'])/g,Sn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Cn(e){return e==null?``:(e+``).replace(xn,function(e,t){return Sn[t]})}var wn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Tn=[],En=Ne.browser.firefox&&+Ne.browser.version.split(`.`)[0]<39;function Dn(e,t,n,r){return n||={},r?On(e,t,n):En&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?On(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function On(e,t,n){if(Ne.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(bn(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(_n(Tn,e,r,i)){n.zrX=Tn[0],n.zrY=Tn[1];return}}n.zrX=n.zrY=0}function kn(e){return e||window.event}function An(e,t,n){if(t=kn(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Dn(e,i,t,n)}else{Dn(e,t,t,n);var a=jn(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&wn.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function jn(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Mn(e,t,n,r){e.addEventListener(t,n,r)}function Nn(e,t,n,r){e.removeEventListener(t,n,r)}var Pn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Fn(e){return e.which===2||e.which===3}var In=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=Dn(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in zn)if(zn.hasOwnProperty(t)){var n=zn[t](this._track,e);if(n)return n}},e}();function Ln(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function Rn(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var zn={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=Ln(r)/Ln(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Rn(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function Bn(){return[1,0,0,1,0,0]}function Vn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Hn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Un(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Wn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Gn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function Kn(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function qn(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function Jn(e){var t=Bn();return Hn(t,e),t}var q=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Yn=Math.min,Xn=Math.max,Zn=Math.abs,Qn=[`x`,`y`],$n=[`width`,`height`],er=new q,tr=new q,nr=new q,rr=new q,ir=dr(),ar=ir.minTv,or=ir.maxTv,sr=[0,0],J=function(){function e(t,n,r,i){e.set(this,t,n,r,i)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Yn(e.x,this.x),n=Yn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Xn(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Xn(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=Bn();return Wn(i,i,[-t.x,-t.y]),Kn(i,i,[n,r]),Wn(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&q.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=e.set(cr,t.x,t.y,t.width,t.height)),n instanceof e||(n=e.set(lr,n.x,n.y,n.width,n.height));var s=!!r;ir.reset(i,s);var c=ir.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(sr[0]=1/0,sr[1]=0,ur(l,u,p,m,0,s,a,o),ur(d,f,h,g,1,s,a,o),s&&q.copy(r,_?ir.useDir?ir.dirMinTv:ar:or)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}er.x=nr.x=n.x,er.y=rr.y=n.y,tr.x=rr.x=n.x+n.width,tr.y=nr.y=n.y+n.height,er.transform(r),rr.transform(r),tr.transform(r),nr.transform(r),t.x=Yn(er.x,tr.x,nr.x,rr.x),t.y=Yn(er.y,tr.y,nr.y,rr.y);var c=Xn(er.x,tr.x,nr.x,rr.x),l=Xn(er.y,tr.y,nr.y,rr.y);t.width=c-t.x,t.height=l-t.y},e}(),cr=new J(0,0,0,0),lr=new J(0,0,0,0);function ur(e,t,n,r,i,a,o,s){var c=Zn(t-n),l=Zn(r-e),u=Yn(c,l),d=Qn[i],f=Qn[1-i],p=$n[i];t<n||r<e?c<l?(a&&(or[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(or[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=Xn(e,n),o[p]=Yn(t,r)-o[d]),a&&(u<sr[0]||ir.useDir)&&(sr[0]=Yn(u,sr[0]),(c<l||!ir.bidirectional)&&(ar[d]=c,ar[f]=0,ir.useDir&&ir.calcDirMTV()),(c>=l||!ir.bidirectional)&&(ar[d]=-l,ar[f]=0,ir.useDir&&ir.calcDirMTV())))}function dr(){var e=0,t=new q,n=new q,r={minTv:new q,maxTv:new q,useDir:!1,dirMinTv:new q,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Xn(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(e){return Zn(e)<1e-10}return r}var fr=`silent`;function pr(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:mr}}function mr(){Pn(this.event)}var hr=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(ln),gr=function(){function e(e,t){this.x=e,this.y=t}return e}(),_r=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],vr=new J(0,0,0,0),yr=function(e){N(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new gr(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new hr,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new cn(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(L(_r,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Sr(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new gr(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new gr(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=pr(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new gr(e,t);if(xr(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new J(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(vr.copy(u.getBoundingRect()),u.transform&&vr.applyTransform(u.transform),vr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(xr(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new In;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new gr;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(ln);L([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){yr.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Sr(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||$t(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function br(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return i?fr:!0}return!1}function xr(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=br(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==fr)){t.target=o;break}}}function Sr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var Cr=32,wr=7;function Tr(e){for(var t=0;e>=Cr;)t|=e&1,e>>=1;return e+t}function Er(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;Dr(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Dr(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Or(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function kr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Ar(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function jr(e,t){var n=wr,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Ar(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=kr(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Ar(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=kr(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=wr||m>=wr);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Ar(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-kr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=wr||g>=wr);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Mr(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<Cr){a=Er(e,n,r,t),Or(e,n,r,n+a,t);return}var o=jr(e,t),s=Tr(i);do{if(a=Er(e,n,r,t),a<s){var c=i;c>s&&(c=s),Or(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Nr=!1;function Pr(){Nr||(Nr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Fr(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Ir=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Fr}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Mr(n,Fr)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(Pr(),p.z=0),isNaN(p.z2)&&(Pr(),p.z2=0),isNaN(p.zlevel)&&(Pr(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=it(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Lr=Ne.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Rr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Rr.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Rr.bounceIn(e*2)*.5:Rr.bounceOut(e*2-1)*.5+.5}},zr=Math.pow,Br=Math.sqrt,Vr=1e-8,Hr=1e-4,Ur=Br(3),Wr=1/3,Gr=Vt(),Kr=Vt(),qr=Vt();function Jr(e){return e>-Vr&&e<Vr}function Yr(e){return e>Vr||e<-Vr}function Xr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Zr(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Qr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Jr(u)&&Jr(d))if(Jr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(Jr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Br(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-zr(-y,Wr):zr(y,Wr),b=b<0?-zr(-b,Wr):zr(b,Wr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Br(u*u*u)),S=Math.acos(x)/3,C=Br(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Ur*Math.sin(S)))/(3*o),T=(-s+C*(w-Ur*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function $r(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Jr(o)){if(Yr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Jr(u))i[0]=-a/(2*o);else if(u>0){var d=Br(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function ei(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function ti(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Gr[0]=c,Gr[1]=l;for(var v=0;v<1;v+=.05)Kr[0]=Xr(e,n,i,o,v),Kr[1]=Xr(t,r,a,s,v),g=tn(Gr,Kr),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Hr);y++)m=d-f,h=d+f,Kr[0]=Xr(e,n,i,o,m),Kr[1]=Xr(t,r,a,s,m),g=tn(Kr,Gr),m>=0&&g<p?(d=m,p=g):(qr[0]=Xr(e,n,i,o,h),qr[1]=Xr(t,r,a,s,h),_=tn(qr,Gr),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Xr(e,n,i,o,d),u[1]=Xr(t,r,a,s,d)),Br(p)}function ni(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=Xr(e,n,i,o,m),g=Xr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function ri(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function ii(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function ai(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(Jr(a)){if(Yr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Jr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Br(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function oi(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function si(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function ci(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Gr[0]=o,Gr[1]=s;for(var f=0;f<1;f+=.05){Kr[0]=ri(e,n,i,f),Kr[1]=ri(t,r,a,f);var p=tn(Gr,Kr);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Hr);m++){var h=l-u,g=l+u;Kr[0]=ri(e,n,i,h),Kr[1]=ri(t,r,a,h);var p=tn(Kr,Gr);if(h>=0&&p<d)l=h,d=p;else{qr[0]=ri(e,n,i,g),qr[1]=ri(t,r,a,g);var _=tn(qr,Gr);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=ri(e,n,i,l),c[1]=ri(t,r,a,l)),Br(d)}function li(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=ri(e,n,i,f),m=ri(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var ui=/cubic-bezier\(([0-9,\.e ]+)\)/;function di(e){var t=e&&ui.exec(e);if(t){var n=t[1].split(`,`),r=+Ot(n[0]),i=+Ot(n[1]),a=+Ot(n[2]),o=+Ot(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:Qr(0,r,a,1,e,s)&&Xr(0,i,o,1,s[0])}}}var fi=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||zt,this.ondestroy=e.ondestroy||zt,this.onrestart=e.onrestart||zt,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=V(e)?e:Rr[e]||di(e)},e}(),pi=function(){function e(e){this.value=e}return e}(),mi=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new pi(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),hi=function(){function e(e){this._list=new mi,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new pi(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),gi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _i(e){return e=Math.round(e),e<0?0:e>255?255:e}function vi(e){return e=Math.round(e),e<0?0:e>360?360:e}function yi(e){return e<0?0:e>1?1:e}function bi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?_i(parseFloat(t)/100*255):_i(parseInt(t,10))}function xi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?yi(parseFloat(t)/100):yi(parseFloat(t))}function Si(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Ci(e,t,n){return e+(t-e)*n}function wi(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Ti(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ei=new hi(20),Di=null;function Oi(e,t){Di&&Ti(Di,t),Di=Ei.put(e,Di||t.slice())}function ki(e,t){if(e){t||=[];var n=Ei.get(e);if(n)return Ti(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in gi)return Ti(t,gi[r]),Oi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){wi(t,0,0,0,1);return}return wi(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Oi(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){wi(t,0,0,0,1);return}return wi(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Oi(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?wi(t,+l[0],+l[1],+l[2],1):wi(t,0,0,0,1);u=xi(l.pop());case`rgb`:if(l.length>=3)return wi(t,bi(l[0]),bi(l[1]),bi(l[2]),l.length===3?u:xi(l[3])),Oi(e,t),t;wi(t,0,0,0,1);return;case`hsla`:if(l.length!==4){wi(t,0,0,0,1);return}return l[3]=xi(l[3]),Ai(l,t),Oi(e,t),t;case`hsl`:if(l.length!==3){wi(t,0,0,0,1);return}return Ai(l,t),Oi(e,t),t;default:return}}wi(t,0,0,0,1)}}function Ai(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=xi(e[1]),i=xi(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],wi(t,_i(Si(o,a,n+1/3)*255),_i(Si(o,a,n)*255),_i(Si(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function ji(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Mi(e,t){var n=ki(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Li(n,n.length===4?`rgba`:`rgb`)}}function Ni(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=_i(Ci(o[0],s[0],c)),n[1]=_i(Ci(o[1],s[1],c)),n[2]=_i(Ci(o[2],s[2],c)),n[3]=yi(Ci(o[3],s[3],c)),n}}function Pi(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=ki(t[i]),s=ki(t[a]),c=r-i,l=Li([_i(Ci(o[0],s[0],c)),_i(Ci(o[1],s[1],c)),_i(Ci(o[2],s[2],c)),yi(Ci(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Fi(e,t,n,r){var i=ki(e);if(e)return i=ji(i),t!=null&&(i[0]=vi(V(t)?t(i[0]):t)),n!=null&&(i[1]=xi(V(n)?n(i[1]):n)),r!=null&&(i[2]=xi(V(r)?r(i[2]):r)),Li(Ai(i),`rgba`)}function Ii(e,t){var n=ki(e);if(n&&t!=null)return n[3]=yi(t),Li(n,`rgba`)}function Li(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Ri(e,t){var n=ki(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var zi=new hi(100);function Bi(e){if(H(e)){var t=zi.get(e);return t||(t=Mi(e,-.1),zi.put(e,t)),t}else if(yt(e)){var n=F({},e);return n.colorStops=R(e.colorStops,function(e){return{offset:e.offset,color:Mi(e.color,-.1)}}),n}return e}var Vi=Math.round;function Hi(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=ki(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var Ui=1e-4;function Wi(e){return e<Ui&&e>-Ui}function Gi(e){return Vi(e*1e3)/1e3}function Ki(e){return Vi(e*1e4)/1e4}function qi(e){return`matrix(`+Gi(e[0])+`,`+Gi(e[1])+`,`+Gi(e[2])+`,`+Gi(e[3])+`,`+Ki(e[4])+`,`+Ki(e[5])+`)`}var Ji={left:`start`,right:`end`,center:`middle`,middle:`middle`};function Yi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function Xi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Zi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function Qi(e){return e&&!!e.image}function $i(e){return e&&!!e.svgElement}function ea(e){return Qi(e)||$i(e)}function ta(e){return e.type===`linear`}function na(e){return e.type===`radial`}function ra(e){return e&&(e.type===`linear`||e.type===`radial`)}function ia(e){return`url(#`+e+`)`}function aa(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function oa(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Bt,i=W(e.scaleX,1),a=W(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Vi(o*Bt)+`deg, `+Vi(s*Bt)+`deg)`),c.join(` `)}var sa=(function(){return Ne.hasGlobalWindow&&V(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return null}})(),ca=Array.prototype.slice;function la(e,t,n){return(t-e)*n+e}function ua(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=la(t[a],n[a],r);return e}function da(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=la(t[o][s],n[o][s],r)}return e}function fa(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function pa(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function ma(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function ha(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o)if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:ca.call(i[s]));for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function ga(e){if(st(e)){var t=e.length;if(st(e[0])){for(var n=[],r=0;r<t;r++)n.push(ca.call(e[r]));return n}return ca.call(e)}return e}function _a(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function va(e){return st(e&&e[0])?2:1}var ya=0,ba=1,xa=2,Sa=3,Ca=4,wa=5,Ta=6;function Ea(e){return e===Ca||e===wa}function Da(e){return e===ba||e===xa}var Oa=[0,0,0,0],ka=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Ta,s=t;if(st(t)){var c=va(t);o=c,(c===1&&!ht(t[0])||c===2&&!ht(t[0][0]))&&(a=!0)}else if(ht(t)&&!St(t))o=ya;else if(H(t))if(!isNaN(+t))o=ya;else{var l=ki(t);l&&(s=l,o=Sa)}else if(yt(t)){var u=F({},s);u.colorStops=R(t.colorStops,function(e){return{offset:e.offset,color:ki(e.color)}}),ta(t)?o=Ca:na(t)&&(o=wa),s=u}i===0?this.valType=o:(o!==this.valType||o===Ta)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=V(n)?n:Rr[n]||di(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Da(r),c=Ea(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?ha(d,f,r):c&&ma(d.colorStops,f.colorStops))}if(!o&&r!==wa&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===ya?n[l].additiveValue=n[l].value-p:r===Sa?n[l].additiveValue=fa([],n[l].value,p,-1):Da(r)&&(n[l].additiveValue=r===ba?fa([],n[l].value,p,-1):pa([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Sa,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Oa:e[s];if((Da(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Da(i))i===ba?ua(g,f[r],p[r],h):da(g,f[r],p[r],h);else if(Ea(i)){var _=f[r],v=p[r],y=i===Ca;e[s]={type:y?`linear`:`radial`,x:la(_.x,v.x,h),y:la(_.y,v.y,h),colorStops:R(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:la(e.offset,n.offset,h),color:_a(ua([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=la(_.x2,v.x2,h),e[s].y2=la(_.y2,v.y2,h)):e[s].r=la(_.r,v.r,h)}else if(c)ua(g,f[r],p[r],h),n||(e[s]=_a(g));else{var b=la(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ya?e[n]=e[n]+r:t===Sa?(ki(e[n],Oa),fa(Oa,Oa,r,1),e[n]=_a(Oa)):t===ba?fa(e[n],e[n],r,1):t===xa&&pa(e[n],e[n],r,1)},e}(),Aa=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){tt(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,dt(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new ka(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Sa&&c&&(c=_a(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,ga(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ga(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}if(n.length||this._force){var d=new fi({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return R(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=ga(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=dt(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function ja(){return new Date().getTime()}var Ma=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=ja()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Lr(t),!e._paused&&e.update())}Lr(t)},t.prototype.start=function(){this._running||(this._time=ja(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=ja(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=ja()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Aa(e,t.loop);return this.addAnimator(n),n},t}(ln),Na=300,Pa=Ne.domSupported,Fa=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:R(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Ia={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},La=!1;function Ra(e){var t=e.pointerType;return t===`pen`||t===`touch`}function za(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Ba(e){e&&(e.zrByTouch=!0)}function Va(e,t){return An(e.dom,new Ua(e,t),!0)}function Ha(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Ua=function(){function e(e,t){this.stopPropagation=zt,this.stopImmediatePropagation=zt,this.preventDefault=zt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Wa={mousedown:function(e){e=An(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=An(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=An(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=An(this.dom,e);var t=e.toElement||e.relatedTarget;Ha(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){La=!0,e=An(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){La||(e=An(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=An(this.dom,e),Ba(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Wa.mousemove.call(this,e),Wa.mousedown.call(this,e)},touchmove:function(e){e=An(this.dom,e),Ba(e),this.handler.processGesture(e,`change`),Wa.mousemove.call(this,e)},touchend:function(e){e=An(this.dom,e),Ba(e),this.handler.processGesture(e,`end`),Wa.mouseup.call(this,e),new Date-+this.__lastTouchMoment<Na&&Wa.click.call(this,e)},pointerdown:function(e){Wa.mousedown.call(this,e)},pointermove:function(e){Ra(e)||Wa.mousemove.call(this,e)},pointerup:function(e){Wa.mouseup.call(this,e)},pointerout:function(e){Ra(e)||Wa.mouseout.call(this,e)}};L([`click`,`dblclick`,`contextmenu`],function(e){Wa[e]=function(t){t=An(this.dom,t),this.trigger(e,t)}});var Ga={pointermove:function(e){Ra(e)||Ga.mousemove.call(this,e)},pointerup:function(e){Ga.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function Ka(e,t){var n=t.domHandlers;Ne.pointerEventsSupported?L(Fa.pointer,function(r){Ja(t,r,function(t){n[r].call(e,t)})}):(Ne.touchEventsSupported&&L(Fa.touch,function(r){Ja(t,r,function(i){n[r].call(e,i),za(t)})}),L(Fa.mouse,function(r){Ja(t,r,function(i){i=kn(i),t.touching||n[r].call(e,i)})}))}function qa(e,t){Ne.pointerEventsSupported?L(Ia.pointer,n):Ne.touchEventsSupported||L(Ia.mouse,n);function n(n){function r(r){r=kn(r),Ha(e,r.target)||(r=Va(e,r),t.domHandlers[n].call(e,r))}Ja(t,n,r,{capture:!0})}}function Ja(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Mn(e.domTarget,t,n,r)}function Ya(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Nn(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Xa=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),Za=function(e){N(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new Xa(t,Wa),Pa&&(r._globalHandlerScope=new Xa(document,Ga)),Ka(r,r._localHandlerScope),r}return t.prototype.dispose=function(){Ya(this._localHandlerScope),Pa&&Ya(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Pa&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?qa(this,t):Ya(t)}},t}(ln),Qa=1;Ne.hasGlobalWindow&&(Qa=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var $a=Qa,eo=.4,to=`#333`,no=`#ccc`,ro=`#eee`,io=Vn,ao=5e-5;function oo(e){return e>ao||e<-ao}var so=[],co=[],lo=Bn(),uo=Math.abs,fo=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return oo(this.rotation)||oo(this.x)||oo(this.y)||oo(this.scaleX-1)||oo(this.scaleY-1)||oo(this.skewX)||oo(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(io(n),this.invTransform=null);return}n||=Bn(),t?this.getLocalTransform(n):io(n),e&&(t?Un(n,e,n):Hn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(so);var n=so[0]<0?-1:1,r=so[1]<0?-1:1,i=((so[0]-n)*t+n)/so[0]||0,a=((so[1]-r)*t+r)/so[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||Bn(),qn(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Bn(),Un(co,e.invTransform,t),t=co);var n=this.originX,r=this.originY;(n||r)&&(lo[4]=n,lo[5]=r,Un(co,t,lo),co[4]-=n,co[5]-=r,t=co),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&rn(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&rn(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&uo(e[0]-1)>1e-10&&uo(e[3]-1)>1e-10?Math.sqrt(uo(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){mo(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Gn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),po=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function mo(e,t){for(var n=0;n<po.length;n++){var r=po[n];e[r]=t[r]}}function ho(e){go||=new hi(100),e||=`12px sans-serif`;var t=go.get(e);return t||(t={font:e,strWidthCache:new hi(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ve.measureText(`国`,e).width,asciiCharWidth:Ve.measureText(`a`,e).width},go.put(e,t)),t}var go;function _o(e){if(!(vo>=yo)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Ve.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?vo=yo:i>2&&vo++,t}}var vo=0,yo=5;function bo(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=_o(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function xo(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Ve.measureText(t,e.font).width,n.put(t,r)),r}function So(e,t,n,r){var i=xo(ho(t),e),a=Eo(t);return new J(wo(0,i,n),To(0,a,r),i,a)}function Co(e,t,n,r){var i=((e||``)+``).split(`+`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ts(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Es(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ds=typeof WeakMap==`function`?WeakMap:Map;function Os(e,t,n){n=Ya(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ol||(ol=!0,sl=r),Es(e,t)},n}function ks(e,t,n){n=Ya(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Es(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Es(e,t),typeof r!=`function`&&(cl===null?cl=new Set([this]):cl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function As(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ds;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ul.bind(null,e,t,n),t.then(e,e))}function js(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Ms(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ya(-1,1),t.tag=2,Xa(n,t,1))),n.lanes|=1),e)}var Ns=C.ReactCurrentOwner,Ps=!1;function Fs(e,t,n,r){t.child=e===null?mo(t,null,n,r):po(t,e.child,n,r)}function Is(e,t,n,r,i){n=n.render;var a=t.ref;return Ba(t,i),r=Bo(e,t,n,r,a,i),n=Vo(),e!==null&&!Ps?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nc(e,t,i)):(ba&&n&&ga(t),t.flags|=1,Fs(e,t,r,i),t.child)}function Ls(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Zl(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Rs(e,t,a,r,i)):(e=eu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return nc(e,t,i)}return t.flags|=1,e=$l(a,r),e.ref=t.ref,e.return=t,t.child=e}function Rs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(Ps=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ps=!0);else return t.lanes=e.lanes,nc(e,t,i)}return Vs(e,t,n,r,i)}function zs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Vi(Yc,Jc),Jc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Vi(Yc,Jc),Jc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Vi(Yc,Jc),Jc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Vi(Yc,Jc),Jc|=r;return Fs(e,t,i,n),t.child}function Bs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vs(e,t,n,r,i){var a=qi(n)?Gi:Ui.current;return a=Ki(t,a),Ba(t,i),n=Bo(e,t,n,r,a,i),r=Vo(),e!==null&&!Ps?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nc(e,t,i)):(ba&&r&&ga(t),t.flags|=1,Fs(e,t,n,i),t.child)}function Hs(e,t,n,r,i){if(qi(n)){var a=!0;Zi(t)}else a=!1;if(Ba(t,i),t.stateNode===null)tc(e,t),ao(t,n,r),so(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=Va(l):(l=qi(n)?Gi:Ui.current,l=Ki(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&oo(t,o,r,l),Ka=!1;var f=t.memoizedState;o.state=f,$a(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Wi.current||Ka?(typeof u==`function`&&(no(t,n,u,r),c=t.memoizedState),(s=Ka||io(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ja(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ma(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Va(c):(c=qi(n)?Gi:Ui.current,c=Ki(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&oo(t,o,r,c),Ka=!1,f=t.memoizedState,o.state=f,$a(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||Wi.current||Ka?(typeof p==`function`&&(no(t,n,p,r),m=t.memoizedState),(l=Ka||io(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Us(e,t,n,r,a,i)}function Us(e,t,n,r,i,a){Bs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&Qi(t,n,!1),nc(e,t,a);r=t.stateNode,Ns.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=po(t,e.child,null,a),t.child=po(t,null,s,a)):Fs(e,t,s,a),t.memoizedState=r.state,i&&Qi(t,n,!0),t.child}function Ws(e){var t=e.stateNode;t.pendingContext?Yi(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Yi(e,t.context,!1),bo(e,t.containerInfo)}function Gs(e,t,n,r,i){return ka(),Aa(i),t.flags|=256,Fs(e,t,n,r),t.child}var Ks={dehydrated:null,treeContext:null,retryLane:0};function qs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Js(e,t,n){var r=t.pendingProps,i=wo.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Vi(wo,i&1),e===null)return Ta(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=nu(o,r,0,null),e=tu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=qs(n),t.memoizedState=Ks,e):Ys(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Zs(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=$l(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=tu(a,o,n,null),a.flags|=2):a=$l(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?qs(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Ks,r}return a=e.child,e=a.sibling,r=$l(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ys(e,t){return t=nu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function Xs(e,t,n,r){return r!==null&&Aa(r),po(t,e.child,null,n),e=Ys(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zs(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Ts(Error(r(422))),Xs(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=nu({mode:`visible`,children:i.children},a,0,null),o=tu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&po(t,e.child,null,s),t.child.memoizedState=qs(s),t.memoizedState=Ks,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return Xs(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Ts(o,i,void 0),Xs(e,t,s,i)}if(c=(s&e.childLanes)!==0,Ps||c){if(i=Gc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,Ga(e,a),vl(i,e,a,-1))}return Ml(),i=Ts(Error(r(421))),Xs(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Gl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,ya=wi(a.nextSibling),va=t,ba=!0,xa=null,e!==null&&(la[ua++]=fa,la[ua++]=pa,la[ua++]=da,fa=e.id,pa=e.overflow,da=t),t=Ys(t,i.children),t.flags|=4096,t)}function Qs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),za(e.return,t,n)}function $s(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Fs(e,t,r.children,n),r=wo.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qs(e,n,t);else if(e.tag===19)Qs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Vi(wo,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&To(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$s(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&To(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$s(t,!0,n,null,a);break;case`together`:$s(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function tc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=$l(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$l(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rc(e,t,n){switch(t.tag){case 3:Ws(t),ka();break;case 5:So(t);break;case 1:qi(t.type)&&Zi(t);break;case 4:bo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Vi(Na,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Vi(wo,wo.current&1),e=nc(e,t,n),e===null?null:e.sibling):Js(e,t,n):(Vi(wo,wo.current&1),t.flags|=128,null);Vi(wo,wo.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Vi(wo,wo.current),r)break;return null;case 22:case 23:return t.lanes=0,zs(e,t,n)}return nc(e,t,n)}var ic=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ac=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,yo(go.current);var a=null;switch(n){case`input`:i=be(e,i),r=be(e,r),a=[];break;case`select`:i=oe({},i,{value:void 0}),r=oe({},r,{value:void 0}),a=[];break;case`textarea`:i=Oe(e,i),r=Oe(e,r),a=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=mi)}Ve(n,r);var o;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(o in c)c.hasOwnProperty(o)&&(n||={},n[o]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(s.hasOwnProperty(u)?a||=[]:(a||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(o in c)!c.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||={},n[o]=``);for(o in l)l.hasOwnProperty(o)&&c[o]!==l[o]&&(n||={},n[o]=l[o])}else n||(a||=[],a.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(a||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(a||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(s.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&ei(`scroll`,e),a||c===l||(a=[])):(a||=[]).push(u,l))}n&&(a||=[]).push(`style`,n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},oc=function(e,t,n,r){n!==r&&(t.flags|=4)};function sc(e,t){if(!ba)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function cc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function lc(e,t,n){var i=t.pendingProps;switch(_a(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cc(t),null;case 1:return qi(t.type)&&Ji(),cc(t),null;case 3:return i=t.stateNode,xo(),Bi(Wi),Bi(Ui),Do(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Da(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,xa!==null&&(Sl(xa),xa=null))),cc(t),null;case 5:Co(t);var a=yo(vo.current);if(n=t.type,e!==null&&t.stateNode!=null)ac(e,t,n,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return cc(t),null}if(e=yo(go.current),Da(t)){i=t.stateNode,n=t.type;var o=t.memoizedProps;switch(i[Di]=t,i[Oi]=o,e=(t.mode&1)!=0,n){case`dialog`:ei(`cancel`,i),ei(`close`,i);break;case`iframe`:case`object`:case`embed`:ei(`load`,i);break;case`video`:case`audio`:for(a=0;a<Xr.length;a++)ei(Xr[a],i);break;case`source`:ei(`error`,i);break;case`img`:case`image`:case`link`:ei(`error`,i),ei(`load`,i);break;case`details`:ei(`toggle`,i);break;case`input`:xe(i,o),ei(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!o.multiple},ei(`invalid`,i);break;case`textarea`:ke(i,o),ei(`invalid`,i)}for(var c in Ve(n,o),a=null,o)if(o.hasOwnProperty(c)){var l=o[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==o.suppressHydrationWarning&&pi(i.textContent,l,e),a=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==o.suppressHydrationWarning&&pi(i.textContent,l,e),a=[`children`,``+l]):s.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&ei(`scroll`,i)}switch(n){case`input`:_e(i),we(i,o,!0);break;case`textarea`:_e(i),je(i);break;case`select`:case`option`:break;default:typeof o.onClick==`function`&&(i.onclick=mi)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=a.nodeType===9?a:a.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=N(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Di]=t,e[Oi]=i,ic(e,t,!1,!1),t.stateNode=e;a:{switch(c=He(n,i),n){case`dialog`:ei(`cancel`,e),ei(`close`,e),a=i;break;case`iframe`:case`object`:case`embed`:ei(`load`,e),a=i;break;case`video`:case`audio`:for(a=0;a<Xr.length;a++)ei(Xr[a],e);a=i;break;case`source`:ei(`error`,e),a=i;break;case`img`:case`image`:case`link`:ei(`error`,e),ei(`load`,e),a=i;break;case`details`:ei(`toggle`,e),a=i;break;case`input`:xe(e,i),a=be(e,i),ei(`invalid`,e);break;case`option`:a=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},a=oe({},i,{value:void 0}),ei(`invalid`,e);break;case`textarea`:ke(e,i),a=Oe(e,i),ei(`invalid`,e);break;default:a=i}for(o in Ve(n,a),l=a,l)if(l.hasOwnProperty(o)){var u=l[o];o===`style`?ze(e,u):o===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Pe(e,u)):o===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Fe(e,u):typeof u==`number`&&Fe(e,``+u):o!==`suppressContentEditableWarning`&&o!==`suppressHydrationWarning`&&o!==`autoFocus`&&(s.hasOwnProperty(o)?u!=null&&o===`onScroll`&&ei(`scroll`,e):u!=null&&S(e,o,u,c))}switch(n){case`input`:_e(e),we(e,i,!1);break;case`textarea`:_e(e),je(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+me(i.value));break;case`select`:e.multiple=!!i.multiple,o=i.value,o==null?i.defaultValue!=null&&De(e,!!i.multiple,i.defaultValue,!0):De(e,!!i.multiple,o,!1);break;default:typeof a.onClick==`function`&&(e.onclick=mi)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return cc(t),null;case 6:if(e&&t.stateNode!=null)oc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=yo(vo.current),yo(go.current),Da(t)){if(i=t.stateNode,n=t.memoizedProps,i[Di]=t,(o=i.nodeValue!==n)&&(e=va,e!==null))switch(e.tag){case 3:pi(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&pi(i.nodeValue,n,(e.mode&1)!=0)}o&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Di]=t,t.stateNode=i}return cc(t),null;case 13:if(Bi(wo),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ba&&ya!==null&&t.mode&1&&!(t.flags&128))Oa(),ka(),t.flags|=98560,o=!1;else if(o=Da(t),i!==null&&i.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o===null?null:o.dehydrated,!o)throw Error(r(317));o[Di]=t}else ka(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;cc(t),o=!1}else xa!==null&&(Sl(xa),xa=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||wo.current&1?Xc===0&&(Xc=3):Ml())),t.updateQueue!==null&&(t.flags|=4),cc(t),null);case 4:return xo(),e===null&&ri(t.stateNode.containerInfo),cc(t),null;case 10:return Ra(t.type._context),cc(t),null;case 17:return qi(t.type)&&Ji(),cc(t),null;case 19:if(Bi(wo),o=t.memoizedState,o===null)return cc(t),null;if(i=(t.flags&128)!=0,c=o.rendering,c===null)if(i)sc(o,!1);else{if(Xc!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=To(e),c!==null){for(t.flags|=128,sc(o,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)o=n,e=i,o.flags&=14680066,c=o.alternate,c===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=c.childLanes,o.lanes=c.lanes,o.child=c.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=c.memoizedProps,o.memoizedState=c.memoizedState,o.updateQueue=c.updateQueue,o.type=c.type,e=c.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Vi(wo,wo.current&1|2),t.child}e=e.sibling}o.tail!==null&&H()>il&&(t.flags|=128,i=!0,sc(o,!1),t.lanes=4194304)}else{if(!i)if(e=To(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sc(o,!0),o.tail===null&&o.tailMode===`hidden`&&!c.alternate&&!ba)return cc(t),null}else 2*H()-o.renderingStartTime>il&&n!==1073741824&&(t.flags|=128,i=!0,sc(o,!1),t.lanes=4194304);o.isBackwards?(c.sibling=t.child,t.child=c):(n=o.last,n===null?t.child=c:n.sibling=c,o.last=c)}return o.tail===null?(cc(t),null):(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=H(),t.sibling=null,n=wo.current,Vi(wo,i?n&1|2:n&1),t);case 22:case 23:return Ol(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Jc&1073741824&&(cc(t),t.subtreeFlags&6&&(t.flags|=8192)):cc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function uc(e,t){switch(_a(t),t.tag){case 1:return qi(t.type)&&Ji(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xo(),Bi(Wi),Bi(Ui),Do(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Co(t),null;case 13:if(Bi(wo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Bi(wo),null;case 4:return xo(),null;case 10:return Ra(t.type._context),null;case 22:case 23:return Ol(),null;case 24:return null;default:return null}}var dc=!1,fc=!1,pc=typeof WeakSet==`function`?WeakSet:Set,mc=null;function hc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Hl(e,t,n)}else n.current=null}function gc(e,t,n){try{n()}catch(n){Hl(e,t,n)}}var _c=!1;function vc(e,t){if(hi=cn,e=Dr(),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(gi={focusedElem:e,selectionRange:n},cn=!1,mc=t;mc!==null;)if(t=mc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,mc=e;else for(;mc!==null;){t=mc;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ma(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Hl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,mc=e;break}mc=t.return}return h=_c,_c=!1,h}function yc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&gc(t,n,a)}i=i.next}while(i!==r)}}function bc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Sc(e){var t=e.alternate;t!==null&&(e.alternate=null,Sc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Di],delete t[Oi],delete t[Ai],delete t[ji],delete t[Mi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Cc(e){return e.tag===5||e.tag===3||e.tag===4}function wc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Cc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mi));else if(r!==4&&(e=e.child,e!==null))for(Tc(e,t,n),e=e.sibling;e!==null;)Tc(e,t,n),e=e.sibling}function Ec(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ec(e,t,n),e=e.sibling;e!==null;)Ec(e,t,n),e=e.sibling}var Dc=null,Oc=!1;function kc(e,t,n){for(n=n.child;n!==null;)Ac(e,t,n),n=n.sibling}function Ac(e,t,n){if(bt&&typeof bt.onCommitFiberUnmount==`function`)try{bt.onCommitFiberUnmount(yt,n)}catch{}switch(n.tag){case 5:fc||hc(n,t);case 6:var r=Dc,i=Oc;Dc=null,kc(e,t,n),Dc=r,Oc=i,Dc!==null&&(Oc?(e=Dc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Dc.removeChild(n.stateNode));break;case 18:Dc!==null&&(Oc?(e=Dc,n=n.stateNode,e.nodeType===8?Ci(e.parentNode,n):e.nodeType===1&&Ci(e,n),on(e)):Ci(Dc,n.stateNode));break;case 4:r=Dc,i=Oc,Dc=n.stateNode.containerInfo,Oc=!0,kc(e,t,n),Dc=r,Oc=i;break;case 0:case 11:case 14:case 15:if(!fc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&gc(n,t,o),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!fc&&(hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Hl(n,t,e)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(fc=(r=fc)||n.memoizedState!==null,kc(e,t,n),fc=r):kc(e,t,n);break;default:kc(e,t,n)}}function jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new pc),t.forEach(function(t){var r=Kl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Mc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Dc=c.stateNode,Oc=!1;break a;case 3:Dc=c.stateNode.containerInfo,Oc=!0;break a;case 4:Dc=c.stateNode.containerInfo,Oc=!0;break a}c=c.return}if(Dc===null)throw Error(r(160));Ac(o,s,a),Dc=null,Oc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Hl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Nc(t,e),t=t.sibling}function Nc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Mc(t,e),Pc(e),i&4){try{yc(3,e,e.return),bc(3,e)}catch(t){Hl(e,e.return,t)}try{yc(5,e,e.return)}catch(t){Hl(e,e.return,t)}}break;case 1:Mc(t,e),Pc(e),i&512&&n!==null&&hc(n,n.return);break;case 5:if(Mc(t,e),Pc(e),i&512&&n!==null&&hc(n,n.return),e.flags&32){var a=e.stateNode;try{Fe(a,``)}catch(t){Hl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&Se(a,o),He(c,s);var u=He(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?ze(a,f):d===`dangerouslySetInnerHTML`?Pe(a,f):d===`children`?Fe(a,f):S(a,d,f,u)}switch(c){case`input`:Ce(a,o);break;case`textarea`:Ae(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?De(a,!!o.multiple,o.multiple?[]:``,!1):De(a,!!o.multiple,o.defaultValue,!0)):De(a,!!o.multiple,m,!1)}a[Oi]=o}catch(t){Hl(e,e.return,t)}}break;case 6:if(Mc(t,e),Pc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Hl(e,e.return,t)}}break;case 3:if(Mc(t,e),Pc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{on(t.containerInfo)}catch(t){Hl(e,e.return,t)}break;case 4:Mc(t,e),Pc(e);break;case 13:Mc(t,e),Pc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(rl=H())),i&4&&jc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(fc=(u=fc)||d,Mc(t,e),fc=u):Mc(t,e),Pc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(mc=e,d=e.child;d!==null;){for(f=mc=d;mc!==null;){switch(p=mc,m=p.child,p.tag){case 0:case 11:case 14:case 15:yc(4,p,p.return);break;case 1:hc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Hl(i,n,e)}}break;case 5:hc(p,p.return);break;case 22:if(p.memoizedState!==null){Rc(f);continue}}m===null?Rc(f):(m.return=p,mc=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Re(`display`,s))}catch(t){Hl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Hl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Mc(t,e),Pc(e),i&4&&jc(e);break;case 21:break;default:Mc(t,e),Pc(e)}}function Pc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Cc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Fe(a,``),i.flags&=-33),Ec(e,wc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Tc(e,wc(e),o);break;default:throw Error(r(161))}}catch(t){Hl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fc(e,t,n){mc=e,Ic(e,t,n)}function Ic(e,t,n){for(var r=(e.mode&1)!=0;mc!==null;){var i=mc,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||dc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||fc;s=dc;var l=fc;if(dc=o,(fc=c)&&!l)for(mc=i;mc!==null;)o=mc,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?zc(i):(c.return=o,mc=c);for(;a!==null;)mc=a,Ic(a,t,n),a=a.sibling;mc=i,dc=s,fc=l}Lc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,mc=a):Lc(e,t,n)}}function Lc(e){for(;mc!==null;){var t=mc;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:fc||bc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!fc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ma(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&eo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}eo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&on(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}fc||t.flags&512&&xc(t)}catch(e){Hl(t,t.return,e)}}if(t===e){mc=null;break}if(n=t.sibling,n!==null){n.return=t.return,mc=n;break}mc=t.return}}function Rc(e){for(;mc!==null;){var t=mc;if(t===e){mc=null;break}var n=t.sibling;if(n!==null){n.return=t.return,mc=n;break}mc=t.return}}function zc(e){for(;mc!==null;){var t=mc;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bc(4,t)}catch(e){Hl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Hl(t,i,e)}}var a=t.return;try{xc(t)}catch(e){Hl(t,a,e)}break;case 5:var o=t.return;try{xc(t)}catch(e){Hl(t,o,e)}}}catch(e){Hl(t,t.return,e)}if(t===e){mc=null;break}var s=t.sibling;if(s!==null){s.return=t.return,mc=s;break}mc=t.return}}var Bc=Math.ceil,Vc=C.ReactCurrentDispatcher,Hc=C.ReactCurrentOwner,Uc=C.ReactCurrentBatchConfig,Wc=0,Gc=null,Kc=null,qc=0,Jc=0,Yc=zi(0),Xc=0,Zc=null,Qc=0,$c=0,el=0,tl=null,nl=null,rl=0,il=1/0,al=null,ol=!1,sl=null,cl=null,ll=!1,ul=null,dl=0,fl=0,pl=null,ml=-1,hl=0;function gl(){return Wc&6?H():ml===-1?ml=H():ml}function _l(e){return e.mode&1?Wc&2&&qc!==0?qc&-qc:ja.transition===null?(e=It,e===0?(e=window.event,e=e===void 0?16:mn(e.type),e):e):(hl===0&&(hl=Mt()),hl):1}function vl(e,t,n,i){if(50<fl)throw fl=0,pl=null,Error(r(185));Pt(e,n,i),(!(Wc&2)||e!==Gc)&&(e===Gc&&(!(Wc&2)&&($c|=n),Xc===4&&wl(e,qc)),yl(e,i),n===1&&Wc===0&&!(t.mode&1)&&(il=H()+500,ea&&ia()))}function yl(e,t){var n=e.callbackNode;At(e,t);var r=Ot(e,e===Gc?qc:0);if(r===0)n!==null&&pt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&pt(n),t===1)e.tag===0?ra(Tl.bind(null,e)):na(Tl.bind(null,e)),xi(function(){!(Wc&6)&&ia()}),n=null;else{switch(Lt(r)){case 1:n=ht;break;case 4:n=U;break;case 16:n=gt;break;case 536870912:n=vt;break;default:n=gt}n=Jl(n,bl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function bl(e,t){if(ml=-1,hl=0,Wc&6)throw Error(r(327));var n=e.callbackNode;if(Bl()&&e.callbackNode!==n)return null;var i=Ot(e,e===Gc?qc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Nl(e,i);else{t=i;var a=Wc;Wc|=2;var o=jl();(Gc!==e||qc!==t)&&(al=null,il=H()+500,kl(e,t));do try{Fl();break}catch(t){Al(e,t)}while(1);La(),Vc.current=o,Wc=a,Kc===null?(Gc=null,qc=0,t=Xc):t=0}if(t!==0){if(t===2&&(a=jt(e),a!==0&&(i=a,t=xl(e,a))),t===1)throw n=Zc,kl(e,0),wl(e,i),yl(e,H()),n;if(t===6)wl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Cl(a)&&(t=Nl(e,i),t===2&&(o=jt(e),o!==0&&(i=o,t=xl(e,o))),t===1))throw n=Zc,kl(e,0),wl(e,i),yl(e,H()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Rl(e,nl,al);break;case 3:if(wl(e,i),(i&130023424)===i&&(t=rl+500-H(),10<t)){if(Ot(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){gl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=vi(Rl.bind(null,e,nl,al),t);break}Rl(e,nl,al);break;case 4:if(wl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-St(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=H()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Bc(i/1960))-i,10<i){e.timeoutHandle=vi(Rl.bind(null,e,nl,al),i);break}Rl(e,nl,al);break;case 5:Rl(e,nl,al);break;default:throw Error(r(329))}}}return yl(e,H()),e.callbackNode===n?bl.bind(null,e):null}function xl(e,t){var n=tl;return e.current.memoizedState.isDehydrated&&(kl(e,t).flags|=256),e=Nl(e,t),e!==2&&(t=nl,nl=n,t!==null&&Sl(t)),e}function Sl(e){nl===null?nl=e:nl.push.apply(nl,e)}function Cl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Sr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wl(e,t){for(t&=~el,t&=~$c,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-St(t),r=1<<n;e[n]=-1,t&=~r}}function Tl(e){if(Wc&6)throw Error(r(327));Bl();var t=Ot(e,0);if(!(t&1))return yl(e,H()),null;var n=Nl(e,t);if(e.tag!==0&&n===2){var i=jt(e);i!==0&&(t=i,n=xl(e,i))}if(n===1)throw n=Zc,kl(e,0),wl(e,t),yl(e,H()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rl(e,nl,al),yl(e,H()),null}function El(e,t){var n=Wc;Wc|=1;try{return e(t)}finally{Wc=n,Wc===0&&(il=H()+500,ea&&ia())}}function Dl(e){ul!==null&&ul.tag===0&&!(Wc&6)&&Bl();var t=Wc;Wc|=1;var n=Uc.transition,r=It;try{if(Uc.transition=null,It=1,e)return e()}finally{It=r,Uc.transition=n,Wc=t,!(Wc&6)&&ia()}}function Ol(){Jc=Yc.current,Bi(Yc)}function kl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,yi(n)),Kc!==null)for(n=Kc.return;n!==null;){var r=n;switch(_a(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ji();break;case 3:xo(),Bi(Wi),Bi(Ui),Do();break;case 5:Co(r);break;case 4:xo();break;case 13:Bi(wo);break;case 19:Bi(wo);break;case 10:Ra(r.type._context);break;case 22:case 23:Ol()}n=n.return}if(Gc=e,Kc=e=$l(e.current,null),qc=Jc=t,Xc=0,Zc=null,el=$c=Qc=0,nl=tl=null,Ha!==null){for(t=0;t<Ha.length;t++)if(n=Ha[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Ha=null}return e}function Al(e,t){do{var n=Kc;try{if(La(),Oo.current=bs,Po){for(var i=jo.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Po=!1}if(Ao=0,No=Mo=jo=null,Fo=!1,Io=0,Hc.current=null,n===null||n.return===null){Xc=1,Zc=t,Kc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=qc,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=js(s);if(m!==null){m.flags&=-257,Ms(m,s,c,o,t),m.mode&1&&As(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){As(o,u,t),Ml();break a}l=Error(r(426))}}else if(ba&&c.mode&1){var _=js(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ms(_,s,c,o,t),Aa(ws(l,c));break a}}o=l=ws(l,c),Xc!==4&&(Xc=2),tl===null?tl=[o]:tl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Os(o,l,t);Qa(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(cl===null||!cl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=ks(o,c,t);Qa(o,x);break a}}o=o.return}while(o!==null)}Ll(n)}catch(e){t=e,Kc===n&&n!==null&&(Kc=n=n.return);continue}break}while(1)}function jl(){var e=Vc.current;return Vc.current=bs,e===null?bs:e}function Ml(){(Xc===0||Xc===3||Xc===2)&&(Xc=4),Gc===null||!(Qc&268435455)&&!($c&268435455)||wl(Gc,qc)}function Nl(e,t){var n=Wc;Wc|=2;var i=jl();(Gc!==e||qc!==t)&&(al=null,kl(e,t));do try{Pl();break}catch(t){Al(e,t)}while(1);if(La(),Wc=n,Vc.current=i,Kc!==null)throw Error(r(261));return Gc=null,qc=0,Xc}function Pl(){for(;Kc!==null;)Il(Kc)}function Fl(){for(;Kc!==null&&!B();)Il(Kc)}function Il(e){var t=ql(e.alternate,e,Jc);e.memoizedProps=e.pendingProps,t===null?Ll(e):Kc=t,Hc.current=null}function Ll(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=uc(n,t),n!==null){n.flags&=32767,Kc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xc=6,Kc=null;return}}else if(n=lc(n,t,Jc),n!==null){Kc=n;return}if(t=t.sibling,t!==null){Kc=t;return}Kc=t=e}while(t!==null);Xc===0&&(Xc=5)}function Rl(e,t,n){var r=It,i=Uc.transition;try{Uc.transition=null,It=1,zl(e,t,n,r)}finally{Uc.transition=i,It=r}return null}function zl(e,t,n,i){do Bl();while(ul!==null);if(Wc&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Ft(e,o),e===Gc&&(Kc=Gc=null,qc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ll||(ll=!0,Jl(gt,function(){return Bl(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Uc.transition,Uc.transition=null;var s=It;It=1;var c=Wc;Wc|=4,Hc.current=null,vc(e,n),Nc(n,e),kr(gi),cn=!!hi,gi=hi=null,e.current=n,Fc(n,e,a),V(),Wc=c,It=s,Uc.transition=o}else e.current=n;if(ll&&(ll=!1,ul=e,dl=a),o=e.pendingLanes,o===0&&(cl=null),xt(n.stateNode,i),yl(e,H()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(ol)throw ol=!1,e=sl,sl=null,e;return dl&1&&e.tag!==0&&Bl(),o=e.pendingLanes,o&1?e===pl?fl++:(fl=0,pl=e):fl=0,ia(),null}function Bl(){if(ul!==null){var e=Lt(dl),t=Uc.transition,n=It;try{if(Uc.transition=null,It=16>e?16:e,ul===null)var i=!1;else{if(e=ul,ul=null,dl=0,Wc&6)throw Error(r(331));var a=Wc;for(Wc|=4,mc=e.current;mc!==null;){var o=mc,s=o.child;if(mc.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(mc=u;mc!==null;){var d=mc;switch(d.tag){case 0:case 11:case 15:yc(8,d,o)}var f=d.child;if(f!==null)f.return=d,mc=f;else for(;mc!==null;){d=mc;var p=d.sibling,m=d.return;if(Sc(d),d===u){mc=null;break}if(p!==null){p.return=m,mc=p;break}mc=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}mc=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,mc=s;else b:for(;mc!==null;){if(o=mc,o.flags&2048)switch(o.tag){case 0:case 11:case 15:yc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,mc=v;break b}mc=o.return}}var y=e.current;for(mc=y;mc!==null;){s=mc;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,mc=b;else b:for(s=y;mc!==null;){if(c=mc,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:bc(9,c)}}catch(e){Hl(c,c.return,e)}if(c===s){mc=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,mc=x;break b}mc=c.return}}if(Wc=a,ia(),bt&&typeof bt.onPostCommitFiberRoot==`function`)try{bt.onPostCommitFiberRoot(yt,e)}catch{}i=!0}return i}finally{It=n,Uc.transition=t}}return!1}function Vl(e,t,n){t=ws(n,t),t=Os(e,t,1),e=Xa(e,t,1),t=gl(),e!==null&&(Pt(e,1,t),yl(e,t))}function Hl(e,t,n){if(e.tag===3)Vl(e,e,n);else for(;t!==null;){if(t.tag===3){Vl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(cl===null||!cl.has(r))){e=ws(n,e),e=ks(t,e,1),t=Xa(t,e,1),e=gl(),t!==null&&(Pt(t,1,e),yl(t,e));break}}t=t.return}}function Ul(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=gl(),e.pingedLanes|=e.suspendedLanes&n,Gc===e&&(qc&n)===n&&(Xc===4||Xc===3&&(qc&130023424)===qc&&500>H()-rl?kl(e,0):el|=n),yl(e,t)}function Wl(e,t){t===0&&(e.mode&1?(t=Et,Et<<=1,!(Et&130023424)&&(Et=4194304)):t=1);var n=gl();e=Ga(e,t),e!==null&&(Pt(e,t,n),yl(e,n))}function Gl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wl(e,n)}function Kl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Wl(e,n)}var ql=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Wi.current)Ps=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Ps=!1,rc(e,t,n);Ps=!!(e.flags&131072)}else Ps=!1,ba&&t.flags&1048576&&ha(t,ca,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;tc(e,t),e=t.pendingProps;var a=Ki(t,Ui.current);Ba(t,n),a=Bo(null,t,i,e,a,n);var o=Vo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qi(i)?(o=!0,Zi(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,qa(t),a.updater=ro,t.stateNode=a,a._reactInternals=t,so(t,i,e,n),t=Us(null,t,i,!0,o,n)):(t.tag=0,ba&&o&&ga(t),Fs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(tc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Ql(i),e=Ma(i,e),a){case 0:t=Vs(null,t,i,e,n);break a;case 1:t=Hs(null,t,i,e,n);break a;case 11:t=Is(null,t,i,e,n);break a;case 14:t=Ls(null,t,i,Ma(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ma(i,a),Vs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ma(i,a),Hs(e,t,i,a,n);case 3:a:{if(Ws(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,Ja(e,t),$a(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=ws(Error(r(423)),t),t=Gs(e,t,i,n,a);break a}else if(i!==a){a=ws(Error(r(424)),t),t=Gs(e,t,i,n,a);break a}else for(ya=wi(t.stateNode.containerInfo.firstChild),va=t,ba=!0,xa=null,n=mo(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ka(),i===a){t=nc(e,t,n);break a}Fs(e,t,i,n)}t=t.child}return t;case 5:return So(t),e===null&&Ta(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,_i(i,a)?s=null:o!==null&&_i(i,o)&&(t.flags|=32),Bs(e,t),Fs(e,t,s,n),t.child;case 6:return e===null&&Ta(t),null;case 13:return Js(e,t,n);case 4:return bo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=po(t,null,i,n):Fs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ma(i,a),Is(e,t,i,a,n);case 7:return Fs(e,t,t.pendingProps,n),t.child;case 8:return Fs(e,t,t.pendingProps.children,n),t.child;case 12:return Fs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,Vi(Na,i._currentValue),i._currentValue=s,o!==null)if(Sr(o.value,s)){if(o.children===a.children&&!Wi.current){t=nc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=Ya(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),za(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),za(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Fs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Ba(t,n),a=Va(a),i=i(a),t.flags|=1,Fs(e,t,i,n),t.child;case 14:return i=t.type,a=Ma(i,t.pendingProps),a=Ma(i.type,a),Ls(e,t,i,a,n);case 15:return Rs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ma(i,a),tc(e,t),t.tag=1,qi(i)?(e=!0,Zi(t)):e=!1,Ba(t,n),ao(t,i,a),so(t,i,a,n),Us(null,t,i,!0,e,n);case 19:return ec(e,t,n);case 22:return zs(e,t,n)}throw Error(r(156,t.tag))};function Jl(e,t){return z(e,t)}function Yl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xl(e,t,n,r){return new Yl(e,t,n,r)}function Zl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ql(e){if(typeof e==`function`)return+!!Zl(e);if(e!=null){if(e=e.$$typeof,e===j)return 11;if(e===M)return 14}return 2}function $l(e,t){var n=e.alternate;return n===null?(n=Xl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function eu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)Zl(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case E:return tu(n.children,a,o,t);case D:s=8,a|=8;break;case O:return e=Xl(12,n,t,a|2),e.elementType=O,e.lanes=o,e;case ee:return e=Xl(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=Xl(19,n,t,a),e.elementType=te,e.lanes=o,e;case re:return nu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case k:s=10;break a;case A:s=9;break a;case j:s=11;break a;case M:s=14;break a;case ne:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Xl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function tu(e,t,n,r){return e=Xl(7,e,r,t),e.lanes=n,e}function nu(e,t,n,r){return e=Xl(22,e,r,t),e.elementType=re,e.lanes=n,e.stateNode={isHidden:!1},e}function ru(e,t,n){return e=Xl(6,e,null,t),e.lanes=n,e}function iu(e,t,n){return t=Xl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function au(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Nt(0),this.expirationTimes=Nt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ou(e,t,n,r,i,a,o,s,c){return e=new au(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Xl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},qa(a),e}function su(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function cu(e){if(!e)return Hi;e=e._reactInternals;a:{if(R(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(qi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(qi(n))return Xi(e,n,t)}return t}function lu(e,t,n,r,i,a,o,s,c){return e=ou(n,r,!0,e,i,a,o,s,c),e.context=cu(null),n=e.current,r=gl(),i=_l(n),a=Ya(r,i),a.callback=t??null,Xa(n,a,i),e.current.lanes=i,Pt(e,i,r),yl(e,r),e}function uu(e,t,n,r){var i=t.current,a=gl(),o=_l(i);return n=cu(n),t.context===null?t.context=n:t.pendingContext=n,t=Ya(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Xa(i,t,o),e!==null&&(vl(e,i,o,a),Za(e,i,o)),o}function du(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function fu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pu(e,t){fu(e,t),(e=e.alternate)&&fu(e,t)}function mu(){return null}var hu=typeof reportError==`function`?reportError:function(e){console.error(e)};function gu(e){this._internalRoot=e}_u.prototype.render=gu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));uu(e,t,null,null)},_u.prototype.unmount=gu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dl(function(){uu(null,e,null,null)}),t[ki]=null}};function _u(e){this._internalRoot=e}_u.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yt.length&&t!==0&&t<Yt[n].priority;n++);Yt.splice(n,0,e),n===0&&en(e)}};function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function bu(){}function xu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=du(o);a.call(e)}}var o=lu(t,r,e,0,null,!1,!1,``,bu);return e._reactRootContainer=o,e[ki]=o.current,ri(e.nodeType===8?e.parentNode:e),Dl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=du(c);s.call(e)}}var c=ou(e,0,!1,null,null,!1,!1,``,bu);return e._reactRootContainer=c,e[ki]=c.current,ri(e.nodeType===8?e.parentNode:e),Dl(function(){uu(t,c,n,r)}),c}function Su(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=du(o);s.call(e)}}uu(t,o,e,i)}else o=xu(n,t,e,i,r);return du(o)}Rt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Dt(t.pendingLanes);n!==0&&(G(t,n|1),yl(t,H()),!(Wc&6)&&(il=H()+500,ia()))}break;case 13:Dl(function(){var t=Ga(e,1);t!==null&&vl(t,e,1,gl())}),pu(e,1)}},K=function(e){if(e.tag===13){var t=Ga(e,134217728);t!==null&&vl(t,e,134217728,gl()),pu(e,134217728)}},zt=function(e){if(e.tag===13){var t=_l(e),n=Ga(e,t);n!==null&&vl(n,e,t,gl()),pu(e,t)}},Bt=function(){return It},Vt=function(e,t){var n=It;try{return It=e,t()}finally{It=n}},Ge=function(e,t,n){switch(t){case`input`:if(Ce(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Ii(i);if(!a)throw Error(r(90));ve(i),Ce(i,a)}}}break;case`textarea`:Ae(e,n);break;case`select`:t=n.value,t!=null&&De(e,!!n.multiple,t,!1)}},Ze=El,Qe=Dl;var Cu={usingClientEntryPoint:!1,Events:[Pi,Fi,Ii,Ye,Xe,El]},wu={findFiberByHostInstance:Ni,bundleType:0,version:`18.2.0`,rendererPackageName:`react-dom`},Tu={bundleType:wu.bundleType,version:wu.version,rendererPackageName:wu.rendererPackageName,rendererConfig:wu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=dt(e),e===null?null:e.stateNode},findFiberByHostInstance:wu.findFiberByHostInstance||mu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.2.0-next-9e3b772b8-20220608`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eu.isDisabled&&Eu.supportsFiber)try{yt=Eu.inject(Tu),bt=Eu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vu(t))throw Error(r(200));return su(e,t,null,n)},e.createRoot=function(e,t){if(!vu(e))throw Error(r(299));var n=!1,i=``,a=hu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=ou(e,1,!1,null,null,n,!1,i,a),e[ki]=t.current,ri(e.nodeType===8?e.parentNode:e),new gu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=dt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Dl(e)},e.hydrate=function(e,t,n){if(!yu(t))throw Error(r(200));return Su(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!vu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=hu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=lu(t,null,e,1,n??null,a,!1,o,s),e[ki]=t.current,ri(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new _u(t)},e.render=function(e,t,n){if(!yu(t))throw Error(r(200));return Su(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!yu(e))throw Error(r(40));return e._reactRootContainer?(Dl(function(){Su(null,null,e,!1,function(){e._reactRootContainer=null,e[ki]=null})}),!0):!1},e.unstable_batchedUpdates=El,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!yu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Su(e,t,n,!1,i)},e.version=`18.2.0-next-9e3b772b8-20220608`})),c=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=t((e=>{var t=c();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),u=t((e=>{var t=i(),n=Symbol.for(`react.element`),r=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,i){var s,c={},l=null,u=null;for(s in i!==void 0&&(l=``+i),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)r.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.jsx=s,e.jsxs=s})),d=t(((e,t)=>{t.exports=u()})),f=i(),p=l(),m=d();function h(){let e=window.__METABASE_VIZ_API__;if(!e)throw Error(`Metabase Viz API not initialized. Column type functions can only be called inside a running Metabase instance.`);return e.columnTypes}var g=e=>h().isDate(e),_=e=>h().isNumeric(e),v=(e,t)=>{let n=window.__METABASE_VIZ_API__;if(!n)throw Error(`Metabase Viz API not initialized. formatValue can only be called inside a running Metabase instance.`);return n.formatValue(e,t)},y=[`minute`,`hour`,`day`,`week`,`month`,`quarter`,`year`],b=[`minute-of-hour`,`hour-of-day`,`day-of-week`,`day-of-month`,`day-of-year`,`week-of-year`,`month-of-year`,`quarter-of-year`];[...y,...b];var x=class extends f.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){let{message:t,stack:n}=e;console.error(`[plugin] ${this.props.label} render failed: ${t}\n${n}`)}render(){return this.state.error?null:this.props.children}};function S(e){return{...e,mount(e,t,n){let r=(0,p.createRoot)(t),i=t=>{r.render((0,m.jsx)(x,{label:e.displayName??e.name??`plugin`,children:(0,m.jsx)(e,{...t})}))};return i(n),{update:i,unmount:()=>r.unmount()}}}}var C={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let e in C)Object.freeze(C[e]);var w=Object.freeze(C),T=Object.create(null);for(let e in w)Object.hasOwn(w,e)&&(T[w[e]]=e);var E={to:{},get:{}};E.get=function(e){let t=e.slice(0,3).toLowerCase(),n,r;switch(t){case`hsl`:n=E.get.hsl(e),r=`hsl`;break;case`hwb`:n=E.get.hwb(e),r=`hwb`;break;default:n=E.get.rgb(e),r=`rgb`;break}return n?{model:r,value:n}:null},E.get.rgb=function(e){if(!e)return null;let t=/^#([a-f\d]{3,4})$/i,n=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,i=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,a=/^(\w+)$/,o=[0,0,0,1],s,c,l;if(s=e.match(n)){for(l=s[2],s=s[1],c=0;c<3;c++){let e=c*2;o[c]=Number.parseInt(s.slice(e,e+2),16)}l&&(o[3]=Number.parseInt(l,16)/255)}else if(s=e.match(t)){for(s=s[1],l=s[3],c=0;c<3;c++)o[c]=Number.parseInt(s[c]+s[c],16);l&&(o[3]=Number.parseInt(l+l,16)/255)}else if(s=e.match(r)){for(c=0;c<3;c++)o[c]=Number.parseFloat(s[c+1]);s[4]&&(o[3]=s[5]?Number.parseFloat(s[4])*.01:Number.parseFloat(s[4]))}else if(s=e.match(i)){for(c=0;c<3;c++)o[c]=Math.round(Number.parseFloat(s[c+1])*2.55);s[4]&&(o[3]=s[5]?Number.parseFloat(s[4])*.01:Number.parseFloat(s[4]))}else if(s=e.toLowerCase().match(a))return s[1]===`transparent`?[0,0,0,0]:Object.hasOwn(w,s[1])?(o=w[s[1]].slice(),o[3]=1,o):null;else return null;for(c=0;c<3;c++)o[c]=D(o[c],0,255);return o[3]=D(o[3],0,1),o},E.get.hsl=function(e){if(!e)return null;let t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){let e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,D(Number.parseFloat(t[2]),0,100),D(Number.parseFloat(t[3]),0,100),D(Number.isNaN(e)?1:e,0,1)]}return null},E.get.hwb=function(e){if(!e)return null;let t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){let e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,D(Number.parseFloat(t[2]),0,100),D(Number.parseFloat(t[3]),0,100),D(Number.isNaN(e)?1:e,0,1)]}return null},E.to.hex=function(...e){return`#`+O(e[0])+O(e[1])+O(e[2])+(e[3]<1?O(Math.round(e[3]*255)):``)},E.to.rgb=function(...e){return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},E.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+r+`%)`:`rgba(`+t+`%, `+n+`%, `+r+`%, `+e[3]+`)`},E.to.hsl=function(...e){return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},E.to.hwb=function(...e){let t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},E.to.keyword=function(...e){return T[e.slice(0,3)]};function D(e,t,n){return Math.min(Math.max(t,e),n)}function O(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}var k={};for(let e of Object.keys(w))k[w[e]]=e;var A={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},oklab:{channels:3,labels:[`okl`,`oka`,`okb`]},lch:{channels:3,labels:`lch`},oklch:{channels:3,labels:[`okl`,`okc`,`okh`]},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}},j=(6/29)**3;function ee(e){let t=e>.0031308?1.055*e**(1/2.4)-.055:e*12.92;return Math.min(Math.max(0,t),1)}function te(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}for(let e of Object.keys(A)){if(!(`channels`in A[e]))throw Error(`missing channels property: `+e);if(!(`labels`in A[e]))throw Error(`missing channel labels property: `+e);if(A[e].labels.length!==A[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=A[e];delete A[e].channels,delete A[e].labels,Object.defineProperty(A[e],`channels`,{value:t}),Object.defineProperty(A[e],`labels`,{value:n})}A.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;switch(a){case i:s=0;break;case t:s=(n-r)/o;break;case n:s=2+(r-t)/o;break;case r:s=4+(t-n)/o;break}s=Math.min(s*60,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,c*100,l*100]},A.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+1/2};if(u===0)i=0,a=0;else{switch(a=u/l,t=d(o),n=d(s),r=d(c),l){case o:i=r-n;break;case s:i=1/3+t-r;break;case c:i=2/3+n-t;break}i<0?i+=1:i>1&&--i}return[i*360,a*100,l*100]},A.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=A.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,a*100,r*100]},A.rgb.oklab=function(e){let t=te(e[0]/255),n=te(e[1]/255),r=te(e[2]/255),i=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),a=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),o=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r),s=.2104542553*i+.793617785*a-.0040720468*o,c=1.9779984951*i-2.428592205*a+.4505937099*o,l=.0259040371*i+.7827717662*a-.808675766*o;return[s*100,c*100,l*100]},A.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),a=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[a*100,o*100,s*100,i*100]};function M(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}A.rgb.keyword=function(e){let t=k[e];if(t)return t;let n=1/0,r;for(let t of Object.keys(w)){let i=w[t],a=M(e,i);a<n&&(n=a,r=t)}return r},A.keyword.rgb=function(e){return[...w[e]]},A.rgb.xyz=function(e){let t=te(e[0]/255),n=te(e[1]/255),r=te(e[2]/255),i=t*.4124564+n*.3575761+r*.1804375,a=t*.2126729+n*.7151522+r*.072175,o=t*.0193339+n*.119192+r*.9503041;return[i*100,a*100,o*100]},A.rgb.lab=function(e){let t=A.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>j?n**(1/3):7.787*n+16/116,r=r>j?r**(1/3):7.787*r+16/116,i=i>j?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},A.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a;if(n===0)return a=r*255,[a,a,a];let o=r<.5?r*(1+n):r+n-r*n,s=2*r-o,c=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,a=6*i<1?s+(o-s)*6*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,c[e]=a*255;return c},A.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a;let o=(r+n)/2;return[t,(r===0?2*i/(a+i):2*n/(r+n))*100,o*100]},A.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},A.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,a*100,o*100]},A.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,o&1&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c;break}return[l*255,u*255,d*255]},A.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[a*255,o*255,s*255]},A.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=t*3.2404542+n*-1.5371385+r*-.4985314,a=t*-.969266+n*1.8760108+r*.041556,o=t*.0556434+n*-.2040259+r*1.0572252,i=ee(i),a=ee(a),o=ee(o),[i*255,a*255,o*255]},A.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>j?t**(1/3):7.787*t+16/116,n=n>j?n**(1/3):7.787*n+16/116,r=r>j?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},A.xyz.oklab=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=Math.cbrt(.8189330101*t+.3618667424*n-.1288597137*r),a=Math.cbrt(.0329845436*t+.9293118715*n+.0361456387*r),o=Math.cbrt(.0482003018*t+.2643662691*n+.633851707*r),s=.2104542553*i+.793617785*a-.0040720468*o,c=1.9779984951*i-2.428592205*a+.4505937099*o,l=.0259040371*i+.7827717662*a-.808675766*o;return[s*100,c*100,l*100]},A.oklab.oklch=function(e){return A.lab.lch(e)},A.oklab.xyz=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=(.999999998*t+.396337792*n+.215803758*r)**3,a=(1.000000008*t-.105561342*n-.063854175*r)**3,o=(1.000000055*t-.089484182*n-1.291485538*r)**3,s=1.227013851*i-.55779998*a+.281256149*o,c=-.040580178*i+1.11225687*a-.071676679*o,l=-.076381285*i-.421481978*a+1.58616322*o;return[s*100,c*100,l*100]},A.oklab.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=(t+.3963377774*n+.2158037573*r)**3,a=(t-.1055613458*n-.0638541728*r)**3,o=(t-.0894841775*n-1.291485548*r)**3,s=ee(4.0767416621*i-3.3077115913*a+.2309699292*o),c=ee(-1.2684380046*i+2.6097574011*a-.3413193965*o),l=ee(-.0041960863*i-.7034186147*a+1.707614701*o);return[s*255,c*255,l*255]},A.oklch.oklab=function(e){return A.lch.lab(e)},A.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;a=(t+16)/116,i=n/500+a,o=a-r/200;let s=a**3,c=i**3,l=o**3;return a=s>j?s:(a-16/116)/7.787,i=c>j?c:(i-16/116)/7.787,o=l>j?l:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]},A.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},A.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},A.rgb.ansi16=function(e,t=null){let[n,r,i]=e,a=t===null?A.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(o+=60),o},A.hsv.ansi16=function(e){return A.rgb.ansi16(A.hsv.rgb(e),e[2])},A.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t>>4==n>>4&&n>>4==r>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},A.ansi16.rgb=function(e){e=e[0];let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(Math.trunc(e>50)+1)*.5;return[(t&1)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},A.ansi256.rgb=function(e){if(e=e[0],e>=232){let t=(e-232)*10+8;return[t,t,t]}e-=16;let t;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},A.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return`000000`.slice(t.length)+t},A.hex.rgb=function(e){let t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},A.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c=o<1?a/(1-o):0;return s=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,s/=6,s%=1,[s*360,o*100,c*100]},A.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]},A.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},A.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]},A.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],r*100,n*100]},A.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],r*100,n*100]},A.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],(n-t)*100,(1-n)*100]},A.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},A.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},A.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},A.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},A.gray.hsl=function(e){return[0,0,e[0]]},A.gray.hsv=A.gray.hsl,A.gray.hwb=function(e){return[0,100,e[0]]},A.gray.cmyk=function(e){return[0,0,0,e[0]]},A.gray.lab=function(e){return[e[0],0,0]},A.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.slice(n.length)+n},A.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function ne(){let e={},t=Object.keys(A);for(let{length:n}=t,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function re(e){let t=ne(),n=[e];for(t[e].distance=0;n.length>0;){let e=n.pop(),r=Object.keys(A[e]);for(let{length:i}=r,a=0;a<i;a++){let i=r[a],o=t[i];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(i))}}return t}function ie(e,t){return function(n){return t(e(n))}}function ae(e,t){let n=[t[e].parent,e],r=A[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=ie(A[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}function oe(e){let t=re(e),n={},r=Object.keys(t);for(let{length:e}=r,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=ae(e,t))}return n}var se={},ce=Object.keys(A);function le(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}function ue(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let{length:e}=r,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}for(let e of ce){se[e]={},Object.defineProperty(se[e],`channels`,{value:A[e].channels}),Object.defineProperty(se[e],`labels`,{value:A[e].labels});let t=oe(e),n=Object.keys(t);for(let r of n){let n=t[r];se[e][r]=ue(n),se[e][r].raw=le(n)}}var de=[`keyword`,`gray`,`hex`],fe={};for(let e of Object.keys(se))fe[[...se[e].labels].sort().join(``)]=e;var pe={};function me(e,t){if(!(this instanceof me))return new me(e,t);if(t&&t in de&&(t=null),t&&!(t in se))throw Error(`Unknown model: `+t);let n,r;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof me)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=E.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,r=se[this.model].channels,this.color=t.value.slice(0,r),this.valpha=typeof t.value[r]==`number`?t.value[r]:1}else if(e.length>0){this.model=t||`rgb`,r=se[this.model].channels;let n=Array.prototype.slice.call(e,0,r);this.color=be(n,r),this.valpha=typeof e[r]==`number`?e[r]:1}else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let r=t.sort().join(``);if(!(r in fe))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=fe[r];let{labels:i}=se[this.model],a=[];for(n=0;n<i.length;n++)a.push(e[i[n]]);this.color=be(a)}if(pe[this.model])for(r=se[this.model].channels,n=0;n<r;n++){let e=pe[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}me.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in E.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let n=t.valpha===1?t.color:[...t.color,this.valpha];return E.to[t.model](...n)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return E.to.rgb.percent(...n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=se[this.model],{labels:n}=se[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new me([...this.color.map(ge(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new me([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:_e(`rgb`,0,ve(255)),green:_e(`rgb`,1,ve(255)),blue:_e(`rgb`,2,ve(255)),hue:_e([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:_e(`hsl`,1,ve(100)),lightness:_e(`hsl`,2,ve(100)),saturationv:_e(`hsv`,1,ve(100)),value:_e(`hsv`,2,ve(100)),chroma:_e(`hcg`,1,ve(100)),gray:_e(`hcg`,2,ve(100)),white:_e(`hwb`,1,ve(100)),wblack:_e(`hwb`,2,ve(100)),cyan:_e(`cmyk`,0,ve(100)),magenta:_e(`cmyk`,1,ve(100)),yellow:_e(`cmyk`,2,ve(100)),black:_e(`cmyk`,3,ve(100)),x:_e(`xyz`,0,ve(95.047)),y:_e(`xyz`,1,ve(100)),z:_e(`xyz`,2,ve(108.833)),l:_e(`lab`,0,ve(100)),a:_e(`lab`,1),b:_e(`lab`,2),keyword(e){return e===void 0?se[this.model].keyword(this.color):new me(e)},hex(e){return e===void 0?E.to.hex(...this.rgb().round().color):new me(e)},hexa(e){if(e!==void 0)return new me(e);let t=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n=`0`+n),E.to.hex(...t)+n},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return me.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,c=1-s;return me.rgb(s*n.red()+c*r.red(),s*n.green()+c*r.green(),s*n.blue()+c*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(se)){if(de.includes(e))continue;let{channels:t}=se[e];me.prototype[e]=function(...t){return this.model===e?new me(this):t.length>0?new me(t,e):new me([...ye(se[this.model][e].raw(this.color)),this.valpha],e)},me[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=be(n,t)),new me(r,e)}}function he(e,t){return Number(e.toFixed(t))}function ge(e){return function(t){return he(t,e)}}function _e(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(pe[r]||=[])[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function ve(e){return function(t){return Math.max(0,Math.min(e,t))}}function ye(e){return Array.isArray(e)?e:[e]}function be(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}var xe=`#57606a`,Se=`#c9d1d9`,Ce=`#85b8e8`,we=`#ebedf0`,Te=`#21262d`;function Ee(e,t,n){let r=me(e).rgb().array(),i=me(t).rgb().array(),a=Math.round(r[0]+(i[0]-r[0])*n),o=Math.round(r[1]+(i[1]-r[1])*n),s=Math.round(r[2]+(i[2]-r[2])*n);return me.rgb(a,o,s).string()}var De=92,Oe=.2,ke=.1;function Ae(e){let t=me(e).lightness(De).saturate(ke),n=me(e).darken(Oe).saturate(ke),r=t.string(),i=n.string(),a=e=>Ee(r,i,e),o=[0,.25,.5,.75,1].map(e=>a(e));return{empty:o[0],low:o[1],"medium-low":o[2],"medium-high":o[3],high:o[4]}}var je=function(e,t){return je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},je(e,t)};function N(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);je(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Me=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Ne=new(function(){function e(){this.browser=new Me,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(Ne.wxa=!0,Ne.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Ne.worker=!0:!Ne.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Ne.node=!0,Ne.svgSupported=!0):Pe(navigator.userAgent,Ne);function Pe(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Fe=`12px sans-serif`,Ie=20,Le=100,Re=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ze(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-Ie)/Le}return t}var Be=ze(Re),Ve={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Ve.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=Be[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},He=ct([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),Ue=ct([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),We=Object.prototype.toString,Ge=Array.prototype,Ke=Ge.forEach,qe=Ge.filter,Je=Ge.slice,Ye=Ge.map,Xe=function(){}.constructor,Ze=Xe?Xe.prototype:null,Qe=`__proto__`,$e=2311;function et(){return $e++}function tt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=We.call(e);if(n===`[object Array]`){if(!jt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=P(e[r])}}else if(Ue[n]){if(!jt(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!He[n]&&!jt(e)&&!vt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==Qe&&(t[o]=P(e[o]));return t}function nt(e,t,n){if(!U(t)||!U(e))return n?P(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==Qe){var i=e[r],a=t[r];U(a)&&U(i)&&!B(a)&&!B(i)&&!vt(a)&&!vt(i)&&!gt(a)&&!gt(i)&&!jt(a)&&!jt(i)?nt(i,a,n):(n||!(r in e))&&(e[r]=P(t[r]))}return e}function rt(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=nt(n,e[r],t);return n}function F(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==Qe&&(e[n]=t[n]);return e}function I(e,t,n){for(var r=dt(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}Ve.createCanvas;function it(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function at(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function ot(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else I(e,t,n)}function st(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function L(e,t,n){if(e&&t)if(e.forEach&&e.forEach===Ke)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function R(e,t,n){if(!e)return[];if(!t)return Tt(e);if(e.map&&e.map===Ye)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function ct(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function lt(e,t,n){if(!e)return[];if(!t)return Tt(e);if(e.filter&&e.filter===qe)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function ut(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function dt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function ft(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(Je.call(arguments)))}}var z=Ze&&V(Ze.bind)?Ze.call.bind(Ze.bind):ft;function pt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(Je.call(arguments)))}}function B(e){return Array.isArray?Array.isArray(e):We.call(e)===`[object Array]`}function V(e){return typeof e==`function`}function H(e){return typeof e==`string`}function mt(e){return We.call(e)===`[object String]`}function ht(e){return typeof e==`number`}function U(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function gt(e){return!!He[We.call(e)]}function _t(e){return!!Ue[We.call(e)]}function vt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function yt(e){return e.colorStops!=null}function bt(e){return e.image!=null}function xt(e){return We.call(e)===`[object RegExp]`}function St(e){return e!==e}function Ct(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function W(e,t){return e??t}function wt(e,t,n){return e??t??n}function Tt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Je.apply(e,t)}function Et(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function Dt(e,t){if(!e)throw Error(t)}function Ot(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var kt=`__ec_primitive__`;function At(e){e[kt]=!0}function jt(e){return e[kt]}var Mt=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return dt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Nt=typeof Map==`function`;function Pt(){return Nt?new Map:new Mt}var Ft=function(){function e(t){var n=B(t);this.data=Pt();var r=this;t instanceof e?t.each(i):t&&L(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Nt?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function G(e){return new Ft(e)}function It(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Lt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&F(n,t),n}function Rt(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function K(e,t){return e.hasOwnProperty(t)}function zt(){}var Bt=180/Math.PI;function Vt(e,t){return e??=0,t??=0,[e,t]}function Ht(e,t){return e[0]=t[0],e[1]=t[1],e}function Ut(e){return[e[0],e[1]]}function Wt(e,t,n){return e[0]=t,e[1]=n,e}function Gt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Kt(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function qt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Jt(e){return Math.sqrt(Yt(e))}function Yt(e){return e[0]*e[0]+e[1]*e[1]}function Xt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Zt(e,t){var n=Jt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Qt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var $t=Qt;function en(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var tn=en;function nn(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function rn(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function an(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function on(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var sn=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),cn=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new sn(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new sn(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new sn(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new sn(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new sn(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new sn(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),ln=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=r.length,s=0;s<o;s++){var c=r[s];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(a){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,t[0]);break;case 2:c.h.call(c.ctx,t[0],t[1]);break;default:c.h.apply(c.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=t[a-1],s=r.length,c=0;c<s;c++){var l=r[c];if(!(i&&i.filter&&l.query!=null&&!i.filter(e,l.query)))switch(a){case 0:l.h.call(o);break;case 1:l.h.call(o,t[0]);break;case 2:l.h.call(o,t[0],t[1]);break;default:l.h.apply(o,t.slice(1,a-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),un=Math.log(2);function dn(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/un);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*dn(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function fn(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=dn(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*dn(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var pn=`___zrEVENTSAVED`,mn=[];function hn(e,t,n,r,i){return _n(mn,t,r,i,!0)&&_n(e,n,mn[0],mn[1])}function gn(e,t){e&&n(e),t&&n(t);function n(e){var t=e[pn];t&&(t.clearMarkers&&t.clearMarkers(),delete e[pn])}}function _n(e,t,n,r,i){if(t.getBoundingClientRect&&Ne.domSupported&&!bn(t)){var a=t[pn]||(t[pn]={}),o=yn(vn(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function vn(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){L(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function yn(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?fn(s,o):fn(o,s))}function bn(e){return e.nodeName.toUpperCase()===`CANVAS`}var xn=/([&<>"'])/g,Sn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Cn(e){return e==null?``:(e+``).replace(xn,function(e,t){return Sn[t]})}var wn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Tn=[],En=Ne.browser.firefox&&+Ne.browser.version.split(`.`)[0]<39;function Dn(e,t,n,r){return n||={},r?On(e,t,n):En&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?On(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function On(e,t,n){if(Ne.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(bn(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(_n(Tn,e,r,i)){n.zrX=Tn[0],n.zrY=Tn[1];return}}n.zrX=n.zrY=0}function kn(e){return e||window.event}function An(e,t,n){if(t=kn(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Dn(e,i,t,n)}else{Dn(e,t,t,n);var a=jn(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&wn.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function jn(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Mn(e,t,n,r){e.addEventListener(t,n,r)}function Nn(e,t,n,r){e.removeEventListener(t,n,r)}var Pn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Fn(e){return e.which===2||e.which===3}var In=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=Dn(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in zn)if(zn.hasOwnProperty(t)){var n=zn[t](this._track,e);if(n)return n}},e}();function Ln(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function Rn(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var zn={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=Ln(r)/Ln(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Rn(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function Bn(){return[1,0,0,1,0,0]}function Vn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Hn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Un(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Wn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Gn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function Kn(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function qn(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function Jn(e){var t=Bn();return Hn(t,e),t}var q=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Yn=Math.min,Xn=Math.max,Zn=Math.abs,Qn=[`x`,`y`],$n=[`width`,`height`],er=new q,tr=new q,nr=new q,rr=new q,ir=dr(),ar=ir.minTv,or=ir.maxTv,sr=[0,0],J=function(){function e(t,n,r,i){e.set(this,t,n,r,i)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Yn(e.x,this.x),n=Yn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Xn(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Xn(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=Bn();return Wn(i,i,[-t.x,-t.y]),Kn(i,i,[n,r]),Wn(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&q.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=e.set(cr,t.x,t.y,t.width,t.height)),n instanceof e||(n=e.set(lr,n.x,n.y,n.width,n.height));var s=!!r;ir.reset(i,s);var c=ir.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(sr[0]=1/0,sr[1]=0,ur(l,u,p,m,0,s,a,o),ur(d,f,h,g,1,s,a,o),s&&q.copy(r,_?ir.useDir?ir.dirMinTv:ar:or)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}er.x=nr.x=n.x,er.y=rr.y=n.y,tr.x=rr.x=n.x+n.width,tr.y=nr.y=n.y+n.height,er.transform(r),rr.transform(r),tr.transform(r),nr.transform(r),t.x=Yn(er.x,tr.x,nr.x,rr.x),t.y=Yn(er.y,tr.y,nr.y,rr.y);var c=Xn(er.x,tr.x,nr.x,rr.x),l=Xn(er.y,tr.y,nr.y,rr.y);t.width=c-t.x,t.height=l-t.y},e}(),cr=new J(0,0,0,0),lr=new J(0,0,0,0);function ur(e,t,n,r,i,a,o,s){var c=Zn(t-n),l=Zn(r-e),u=Yn(c,l),d=Qn[i],f=Qn[1-i],p=$n[i];t<n||r<e?c<l?(a&&(or[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(or[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=Xn(e,n),o[p]=Yn(t,r)-o[d]),a&&(u<sr[0]||ir.useDir)&&(sr[0]=Yn(u,sr[0]),(c<l||!ir.bidirectional)&&(ar[d]=c,ar[f]=0,ir.useDir&&ir.calcDirMTV()),(c>=l||!ir.bidirectional)&&(ar[d]=-l,ar[f]=0,ir.useDir&&ir.calcDirMTV())))}function dr(){var e=0,t=new q,n=new q,r={minTv:new q,maxTv:new q,useDir:!1,dirMinTv:new q,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Xn(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(e){return Zn(e)<1e-10}return r}var fr=`silent`;function pr(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:mr}}function mr(){Pn(this.event)}var hr=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(ln),gr=function(){function e(e,t){this.x=e,this.y=t}return e}(),_r=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],vr=new J(0,0,0,0),yr=function(e){N(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new gr(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new hr,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new cn(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(L(_r,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Sr(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new gr(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new gr(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=pr(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new gr(e,t);if(xr(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new J(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(vr.copy(u.getBoundingRect()),u.transform&&vr.applyTransform(u.transform),vr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(xr(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new In;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new gr;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(ln);L([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){yr.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Sr(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||$t(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function br(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return i?fr:!0}return!1}function xr(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=br(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==fr)){t.target=o;break}}}function Sr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var Cr=32,wr=7;function Tr(e){for(var t=0;e>=Cr;)t|=e&1,e>>=1;return e+t}function Er(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;Dr(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Dr(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Or(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function kr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Ar(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function jr(e,t){var n=wr,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Ar(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=kr(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Ar(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=kr(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=wr||m>=wr);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Ar(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-kr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=wr||g>=wr);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Mr(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<Cr){a=Er(e,n,r,t),Or(e,n,r,n+a,t);return}var o=jr(e,t),s=Tr(i);do{if(a=Er(e,n,r,t),a<s){var c=i;c>s&&(c=s),Or(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Nr=!1;function Pr(){Nr||(Nr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Fr(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Ir=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Fr}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Mr(n,Fr)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(Pr(),p.z=0),isNaN(p.z2)&&(Pr(),p.z2=0),isNaN(p.zlevel)&&(Pr(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=it(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Lr=Ne.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Rr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Rr.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Rr.bounceIn(e*2)*.5:Rr.bounceOut(e*2-1)*.5+.5}},zr=Math.pow,Br=Math.sqrt,Vr=1e-8,Hr=1e-4,Ur=Br(3),Wr=1/3,Gr=Vt(),Kr=Vt(),qr=Vt();function Jr(e){return e>-Vr&&e<Vr}function Yr(e){return e>Vr||e<-Vr}function Xr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Zr(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Qr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Jr(u)&&Jr(d))if(Jr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(Jr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Br(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-zr(-y,Wr):zr(y,Wr),b=b<0?-zr(-b,Wr):zr(b,Wr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Br(u*u*u)),S=Math.acos(x)/3,C=Br(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Ur*Math.sin(S)))/(3*o),T=(-s+C*(w-Ur*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function $r(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Jr(o)){if(Yr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Jr(u))i[0]=-a/(2*o);else if(u>0){var d=Br(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function ei(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function ti(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Gr[0]=c,Gr[1]=l;for(var v=0;v<1;v+=.05)Kr[0]=Xr(e,n,i,o,v),Kr[1]=Xr(t,r,a,s,v),g=tn(Gr,Kr),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Hr);y++)m=d-f,h=d+f,Kr[0]=Xr(e,n,i,o,m),Kr[1]=Xr(t,r,a,s,m),g=tn(Kr,Gr),m>=0&&g<p?(d=m,p=g):(qr[0]=Xr(e,n,i,o,h),qr[1]=Xr(t,r,a,s,h),_=tn(qr,Gr),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Xr(e,n,i,o,d),u[1]=Xr(t,r,a,s,d)),Br(p)}function ni(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=Xr(e,n,i,o,m),g=Xr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function ri(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function ii(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function ai(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(Jr(a)){if(Yr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Jr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Br(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function oi(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function si(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function ci(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Gr[0]=o,Gr[1]=s;for(var f=0;f<1;f+=.05){Kr[0]=ri(e,n,i,f),Kr[1]=ri(t,r,a,f);var p=tn(Gr,Kr);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Hr);m++){var h=l-u,g=l+u;Kr[0]=ri(e,n,i,h),Kr[1]=ri(t,r,a,h);var p=tn(Kr,Gr);if(h>=0&&p<d)l=h,d=p;else{qr[0]=ri(e,n,i,g),qr[1]=ri(t,r,a,g);var _=tn(qr,Gr);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=ri(e,n,i,l),c[1]=ri(t,r,a,l)),Br(d)}function li(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=ri(e,n,i,f),m=ri(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var ui=/cubic-bezier\(([0-9,\.e ]+)\)/;function di(e){var t=e&&ui.exec(e);if(t){var n=t[1].split(`,`),r=+Ot(n[0]),i=+Ot(n[1]),a=+Ot(n[2]),o=+Ot(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:Qr(0,r,a,1,e,s)&&Xr(0,i,o,1,s[0])}}}var fi=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||zt,this.ondestroy=e.ondestroy||zt,this.onrestart=e.onrestart||zt,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=V(e)?e:Rr[e]||di(e)},e}(),pi=function(){function e(e){this.value=e}return e}(),mi=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new pi(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),hi=function(){function e(e){this._list=new mi,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new pi(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),gi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _i(e){return e=Math.round(e),e<0?0:e>255?255:e}function vi(e){return e=Math.round(e),e<0?0:e>360?360:e}function yi(e){return e<0?0:e>1?1:e}function bi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?_i(parseFloat(t)/100*255):_i(parseInt(t,10))}function xi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?yi(parseFloat(t)/100):yi(parseFloat(t))}function Si(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Ci(e,t,n){return e+(t-e)*n}function wi(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Ti(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ei=new hi(20),Di=null;function Oi(e,t){Di&&Ti(Di,t),Di=Ei.put(e,Di||t.slice())}function ki(e,t){if(e){t||=[];var n=Ei.get(e);if(n)return Ti(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in gi)return Ti(t,gi[r]),Oi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){wi(t,0,0,0,1);return}return wi(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Oi(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){wi(t,0,0,0,1);return}return wi(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Oi(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?wi(t,+l[0],+l[1],+l[2],1):wi(t,0,0,0,1);u=xi(l.pop());case`rgb`:if(l.length>=3)return wi(t,bi(l[0]),bi(l[1]),bi(l[2]),l.length===3?u:xi(l[3])),Oi(e,t),t;wi(t,0,0,0,1);return;case`hsla`:if(l.length!==4){wi(t,0,0,0,1);return}return l[3]=xi(l[3]),Ai(l,t),Oi(e,t),t;case`hsl`:if(l.length!==3){wi(t,0,0,0,1);return}return Ai(l,t),Oi(e,t),t;default:return}}wi(t,0,0,0,1)}}function Ai(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=xi(e[1]),i=xi(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],wi(t,_i(Si(o,a,n+1/3)*255),_i(Si(o,a,n)*255),_i(Si(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function ji(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Mi(e,t){var n=ki(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Li(n,n.length===4?`rgba`:`rgb`)}}function Ni(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=_i(Ci(o[0],s[0],c)),n[1]=_i(Ci(o[1],s[1],c)),n[2]=_i(Ci(o[2],s[2],c)),n[3]=yi(Ci(o[3],s[3],c)),n}}function Pi(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=ki(t[i]),s=ki(t[a]),c=r-i,l=Li([_i(Ci(o[0],s[0],c)),_i(Ci(o[1],s[1],c)),_i(Ci(o[2],s[2],c)),yi(Ci(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Fi(e,t,n,r){var i=ki(e);if(e)return i=ji(i),t!=null&&(i[0]=vi(V(t)?t(i[0]):t)),n!=null&&(i[1]=xi(V(n)?n(i[1]):n)),r!=null&&(i[2]=xi(V(r)?r(i[2]):r)),Li(Ai(i),`rgba`)}function Ii(e,t){var n=ki(e);if(n&&t!=null)return n[3]=yi(t),Li(n,`rgba`)}function Li(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Ri(e,t){var n=ki(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var zi=new hi(100);function Bi(e){if(H(e)){var t=zi.get(e);return t||(t=Mi(e,-.1),zi.put(e,t)),t}else if(yt(e)){var n=F({},e);return n.colorStops=R(e.colorStops,function(e){return{offset:e.offset,color:Mi(e.color,-.1)}}),n}return e}var Vi=Math.round;function Hi(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=ki(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var Ui=1e-4;function Wi(e){return e<Ui&&e>-Ui}function Gi(e){return Vi(e*1e3)/1e3}function Ki(e){return Vi(e*1e4)/1e4}function qi(e){return`matrix(`+Gi(e[0])+`,`+Gi(e[1])+`,`+Gi(e[2])+`,`+Gi(e[3])+`,`+Ki(e[4])+`,`+Ki(e[5])+`)`}var Ji={left:`start`,right:`end`,center:`middle`,middle:`middle`};function Yi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function Xi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Zi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function Qi(e){return e&&!!e.image}function $i(e){return e&&!!e.svgElement}function ea(e){return Qi(e)||$i(e)}function ta(e){return e.type===`linear`}function na(e){return e.type===`radial`}function ra(e){return e&&(e.type===`linear`||e.type===`radial`)}function ia(e){return`url(#`+e+`)`}function aa(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function oa(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Bt,i=W(e.scaleX,1),a=W(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Vi(o*Bt)+`deg, `+Vi(s*Bt)+`deg)`),c.join(` `)}var sa=(function(){return Ne.hasGlobalWindow&&V(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return null}})(),ca=Array.prototype.slice;function la(e,t,n){return(t-e)*n+e}function ua(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=la(t[a],n[a],r);return e}function da(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=la(t[o][s],n[o][s],r)}return e}function fa(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function pa(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function ma(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function ha(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o)if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:ca.call(i[s]));for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function ga(e){if(st(e)){var t=e.length;if(st(e[0])){for(var n=[],r=0;r<t;r++)n.push(ca.call(e[r]));return n}return ca.call(e)}return e}function _a(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function va(e){return st(e&&e[0])?2:1}var ya=0,ba=1,xa=2,Sa=3,Ca=4,wa=5,Ta=6;function Ea(e){return e===Ca||e===wa}function Da(e){return e===ba||e===xa}var Oa=[0,0,0,0],ka=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Ta,s=t;if(st(t)){var c=va(t);o=c,(c===1&&!ht(t[0])||c===2&&!ht(t[0][0]))&&(a=!0)}else if(ht(t)&&!St(t))o=ya;else if(H(t))if(!isNaN(+t))o=ya;else{var l=ki(t);l&&(s=l,o=Sa)}else if(yt(t)){var u=F({},s);u.colorStops=R(t.colorStops,function(e){return{offset:e.offset,color:ki(e.color)}}),ta(t)?o=Ca:na(t)&&(o=wa),s=u}i===0?this.valType=o:(o!==this.valType||o===Ta)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=V(n)?n:Rr[n]||di(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Da(r),c=Ea(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?ha(d,f,r):c&&ma(d.colorStops,f.colorStops))}if(!o&&r!==wa&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===ya?n[l].additiveValue=n[l].value-p:r===Sa?n[l].additiveValue=fa([],n[l].value,p,-1):Da(r)&&(n[l].additiveValue=r===ba?fa([],n[l].value,p,-1):pa([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Sa,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Oa:e[s];if((Da(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Da(i))i===ba?ua(g,f[r],p[r],h):da(g,f[r],p[r],h);else if(Ea(i)){var _=f[r],v=p[r],y=i===Ca;e[s]={type:y?`linear`:`radial`,x:la(_.x,v.x,h),y:la(_.y,v.y,h),colorStops:R(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:la(e.offset,n.offset,h),color:_a(ua([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=la(_.x2,v.x2,h),e[s].y2=la(_.y2,v.y2,h)):e[s].r=la(_.r,v.r,h)}else if(c)ua(g,f[r],p[r],h),n||(e[s]=_a(g));else{var b=la(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ya?e[n]=e[n]+r:t===Sa?(ki(e[n],Oa),fa(Oa,Oa,r,1),e[n]=_a(Oa)):t===ba?fa(e[n],e[n],r,1):t===xa&&pa(e[n],e[n],r,1)},e}(),Aa=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){tt(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,dt(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new ka(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Sa&&c&&(c=_a(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,ga(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ga(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}if(n.length||this._force){var d=new fi({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return R(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=ga(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=dt(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function ja(){return new Date().getTime()}var Ma=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=ja()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Lr(t),!e._paused&&e.update())}Lr(t)},t.prototype.start=function(){this._running||(this._time=ja(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=ja(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=ja()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Aa(e,t.loop);return this.addAnimator(n),n},t}(ln),Na=300,Pa=Ne.domSupported,Fa=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:R(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Ia={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},La=!1;function Ra(e){var t=e.pointerType;return t===`pen`||t===`touch`}function za(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Ba(e){e&&(e.zrByTouch=!0)}function Va(e,t){return An(e.dom,new Ua(e,t),!0)}function Ha(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Ua=function(){function e(e,t){this.stopPropagation=zt,this.stopImmediatePropagation=zt,this.preventDefault=zt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Wa={mousedown:function(e){e=An(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=An(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=An(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=An(this.dom,e);var t=e.toElement||e.relatedTarget;Ha(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){La=!0,e=An(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){La||(e=An(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=An(this.dom,e),Ba(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Wa.mousemove.call(this,e),Wa.mousedown.call(this,e)},touchmove:function(e){e=An(this.dom,e),Ba(e),this.handler.processGesture(e,`change`),Wa.mousemove.call(this,e)},touchend:function(e){e=An(this.dom,e),Ba(e),this.handler.processGesture(e,`end`),Wa.mouseup.call(this,e),new Date-+this.__lastTouchMoment<Na&&Wa.click.call(this,e)},pointerdown:function(e){Wa.mousedown.call(this,e)},pointermove:function(e){Ra(e)||Wa.mousemove.call(this,e)},pointerup:function(e){Wa.mouseup.call(this,e)},pointerout:function(e){Ra(e)||Wa.mouseout.call(this,e)}};L([`click`,`dblclick`,`contextmenu`],function(e){Wa[e]=function(t){t=An(this.dom,t),this.trigger(e,t)}});var Ga={pointermove:function(e){Ra(e)||Ga.mousemove.call(this,e)},pointerup:function(e){Ga.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function Ka(e,t){var n=t.domHandlers;Ne.pointerEventsSupported?L(Fa.pointer,function(r){Ja(t,r,function(t){n[r].call(e,t)})}):(Ne.touchEventsSupported&&L(Fa.touch,function(r){Ja(t,r,function(i){n[r].call(e,i),za(t)})}),L(Fa.mouse,function(r){Ja(t,r,function(i){i=kn(i),t.touching||n[r].call(e,i)})}))}function qa(e,t){Ne.pointerEventsSupported?L(Ia.pointer,n):Ne.touchEventsSupported||L(Ia.mouse,n);function n(n){function r(r){r=kn(r),Ha(e,r.target)||(r=Va(e,r),t.domHandlers[n].call(e,r))}Ja(t,n,r,{capture:!0})}}function Ja(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Mn(e.domTarget,t,n,r)}function Ya(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Nn(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Xa=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),Za=function(e){N(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new Xa(t,Wa),Pa&&(r._globalHandlerScope=new Xa(document,Ga)),Ka(r,r._localHandlerScope),r}return t.prototype.dispose=function(){Ya(this._localHandlerScope),Pa&&Ya(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Pa&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?qa(this,t):Ya(t)}},t}(ln),Qa=1;Ne.hasGlobalWindow&&(Qa=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var $a=Qa,eo=.4,to=`#333`,no=`#ccc`,ro=`#eee`,io=Vn,ao=5e-5;function oo(e){return e>ao||e<-ao}var so=[],co=[],lo=Bn(),uo=Math.abs,fo=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return oo(this.rotation)||oo(this.x)||oo(this.y)||oo(this.scaleX-1)||oo(this.scaleY-1)||oo(this.skewX)||oo(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(io(n),this.invTransform=null);return}n||=Bn(),t?this.getLocalTransform(n):io(n),e&&(t?Un(n,e,n):Hn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(so);var n=so[0]<0?-1:1,r=so[1]<0?-1:1,i=((so[0]-n)*t+n)/so[0]||0,a=((so[1]-r)*t+r)/so[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||Bn(),qn(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Bn(),Un(co,e.invTransform,t),t=co);var n=this.originX,r=this.originY;(n||r)&&(lo[4]=n,lo[5]=r,Un(co,t,lo),co[4]-=n,co[5]-=r,t=co),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&rn(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&rn(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&uo(e[0]-1)>1e-10&&uo(e[3]-1)>1e-10?Math.sqrt(uo(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){mo(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Gn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),po=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function mo(e,t){for(var n=0;n<po.length;n++){var r=po[n];e[r]=t[r]}}function ho(e){go||=new hi(100),e||=`12px sans-serif`;var t=go.get(e);return t||(t={font:e,strWidthCache:new hi(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ve.measureText(`国`,e).width,asciiCharWidth:Ve.measureText(`a`,e).width},go.put(e,t)),t}var go;function _o(e){if(!(vo>=yo)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Ve.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?vo=yo:i>2&&vo++,t}}var vo=0,yo=5;function bo(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=_o(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function xo(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Ve.measureText(t,e.font).width,n.put(t,r)),r}function So(e,t,n,r){var i=xo(ho(t),e),a=Eo(t);return new J(wo(0,i,n),To(0,a,r),i,a)}function Co(e,t,n,r){var i=((e||``)+``).split(``);if(i.length===1)return So(i[0],t,n,r);for(var a=new J(0,0,0,0),o=0;o<i.length;o++){var s=So(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function wo(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function To(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Eo(e){return ho(e).stWideCharWidth}function Do(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Oo(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=Do(r[0],n.width),l+=Do(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var ko=`__zr_normal__`,Ao=po.concat([`ignore`]),jo=ct(po,function(e,t){return e[t]=!0,e},{ignore:!1}),Mo={},No=new J(0,0,0,0),Po=[],Fo=function(){function e(e){this.id=et(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=No,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Mo,n,d):Oo(Mo,n,d),i.x=Mo.x,i.y=Mo.y,a=Mo.align,o=Mo.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=Do(f[0],d.width),m=Do(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new J(0,0,0,0);i.getLocalTransform(Po),qn(Po,Po),J.copy(_,d),_.applyTransform(Po)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?no:to},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&ki(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Li(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},F(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(U(e))for(var n=dt(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Ao)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(ko,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===ko;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(it(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){tt(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=!!(s&&s.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&o&&o.duration>0,o);var l=this._textContent,u=this._textGuide;return l&&l.useState(e,t,n,c),u&&u.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=!!(u&&u.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var f=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(e.join(`,`),f,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var m=this._textContent,h=this._textGuide;m&&m.useStates(e,t,d),h&&h.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=it(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=it(r,e),a=it(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];F(t,i),i.textConfig&&(n||={},F(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){var o=!(t&&r);t&&t.textConfig?(this.textConfig=F({},r?this.textConfig:n.textConfig),F(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Ao.length;l++){var u=Ao[l],d=i&&jo[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)},e.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new fo,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},F(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new Aa(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=it(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){Io(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Io(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Io(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();ot(Fo,ln),ot(Fo,fo);function Io(e,t,n,r,i){n||={};var a=[];Ho(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function Lo(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Ro(e){return st(e[0])}function zo(e,t,n){if(st(t[n]))if(st(e[n])||(e[n]=[]),_t(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Lo(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(Ro(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?Lo(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else Lo(a,i,o);a.length=i.length}else e[n]=t[n]}function Bo(e,t){return e===t||st(e)&&st(t)&&Vo(e,t)}function Vo(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Ho(e,t,n,r,i,a,o,s){for(var c=dt(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!U(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_]))if(U(v)&&!st(v)&&!yt(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}Ho(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_);else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=it(m,x);m.splice(S,1)}}if(i.force||(h=lt(h,function(e){return!Bo(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=ga(n[_]),zo(n,r,_)}}var x=new Aa(n,!1,!1,d?lt(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}var Y=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=it(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=it(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new J(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(J.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(Fo);Y.prototype.type=`group`;var Uo={},Wo={};function Go(e){delete Wo[e]}function Ko(e){if(!e)return!1;if(typeof e==`string`)return Ri(e,1)<eo;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Ri(t[i].color,1);return n/=r,n<eo}return!1}var qo=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new Ir,a=n.renderer||`canvas`;Uo[a]||(a=dt(Uo)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var o=new Uo[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Ne.node&&!Ne.worker&&!s?new Za(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Ne.touchEventsSupported:!!l,d=44,f;u&&(f=W(n.pointerSize,d)),this.handler=new yr(i,o,c,o.root,f),this.animation=new Ma({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Ko(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=ja();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=ja();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()===`canvas`&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Y&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Go(this.id))},e}();function Jo(e,t){var n=new qo(et(),e,t);return Wo[n.id]=n,n}function Yo(e,t){Uo[e]=t}var Xo;function Zo(e){if(typeof Xo==`function`)return Xo(e)}function Qo(e){Xo=e}var $o=1e-4,es=20;function ts(e){return e.replace(/^\s+|\s+$/g,``)}var ns=Math.min,rs=Math.max,is=Math.abs;function as(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var X=os;function os(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return ss(e,t,n)}function ss(e,t,n){return H(e)?ts(e).match(/%$/)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function cs(e,t,n){return t??=10,t=Math.min(Math.max(0,t),es),e=(+e).toFixed(t),n?e:+e}function ls(e){return e.sort(function(e,t){return e-t}),e}function us(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return ds(e)}function ds(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`),o=a<0?0:i-1-a;return Math.max(0,o-r)}function fs(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),a=Math.round(n(is(t[1]-t[0]))/r),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function ps(e,t){var n=ct(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=10**t,i=R(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=R(i,function(e){return Math.floor(e)}),s=ct(o,function(e,t){return e+t},0),c=R(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return R(o,function(e){return e/r})}function ms(e,t){var n=Math.max(us(e),us(t)),r=e+t;return n>es?r:cs(r,n)}function hs(e){var t=Math.PI*2;return(e%t+t)%t}function gs(e){return e>-$o&&e<$o}var _s=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function vs(e){if(e instanceof Date)return e;if(H(e)){var t=_s.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(Math.round(e))}function ys(e){return 10**bs(e)}function bs(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/10**t>=10&&t++,t}function xs(e,t){var n=bs(e),r=10**n,i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function Ss(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function Cs(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,a=e[r].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-n),t=i[o],n=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function ws(e){var t=parseFloat(e);return t==e&&(t!==0||!H(e)||e.indexOf(`x`)<=0)?t:NaN}function Ts(e){return!isNaN(ws(e))}function Es(){return Math.round(Math.random()*9)}function Ds(e,t){return t===0?e:Ds(t,e%t)}function Os(e,t){return e==null?t:t==null?e:e*t/Ds(e,t)}var ks=`[ECharts] `,As={},js=typeof console<`u`&&console.warn&&console.log;function Ms(e,t,n){if(js){if(n){if(As[t])return;As[t]=!0}console[e](ks+t)}}function Ns(e,t){Ms(`error`,e,t)}function Ps(e){throw Error(e)}function Fs(e,t,n){return(t-e)*n+e}var Is=`series\0`,Ls=`\0_ec_\0`;function Rs(e){return e instanceof Array?e:e==null?[]:[e]}function zs(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var Bs=`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`.split(`.`);function Vs(e){return U(e)&&!B(e)&&!(e instanceof Date)?e.value:e}function Hs(e){return U(e)&&!(e instanceof Array)}function Us(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=G();L(t,function(e,n){if(!U(e)){t[n]=null;return}});var s=Ws(e,o,n);return(r||i)&&Gs(s,e,o,t),r&&Ks(s,t),r||i?qs(s,t,i):a&&Js(s,t),Ys(s),s}function Ws(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||ec(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Gs(e,t,n,r){L(r,function(i,a){if(!(!i||i.id==null)){var o=Zs(i.id),s=n.get(o);if(s!=null){var c=e[s];Dt(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function Ks(e,t){L(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!ec(n)&&!ec(a)&&Xs(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function qs(e,t,n){L(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||ec(r.existing)||r.existing&&t.id!=null&&!Xs(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function Js(e,t){L(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function Ys(e){var t=G();L(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),L(e,function(e){var n=e.newOption;Dt(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),L(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(U(i)){if(a.name=i.name==null?r?r.name:Is+n:Zs(i.name),r)a.id=Zs(r.id);else if(i.id!=null)a.id=Zs(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+ o++;while(t.get(a.id))}t.set(a.id,e)}})}function Xs(e,t,n){var r=Qs(t[e],null),i=Qs(n[e],null);return r!=null&&i!=null&&r===i}function Zs(e){return Qs(e,``)}function Qs(e,t){return e==null?t:H(e)?e:ht(e)||mt(e)?e+``:t}function $s(e){var t=e.name;return!!(t&&t.indexOf(Is))}function ec(e){return e&&e.id!=null&&Zs(e.id).indexOf(Ls)===0}function tc(e){return Ls+e}function nc(e,t,n){L(e,function(e){var r=e.newOption;U(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=rc(t,r,e.existing,n))})}function rc(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function ic(e,t){var n={},r={};return i(e||[],n),i(t||[],r,n),[a(n),a(r)];function i(e,t,n){for(var r=0,i=e.length;r<i;r++){var a=Qs(e[r].seriesId,null);if(a==null)return;for(var o=Rs(e[r].dataIndex),s=n&&n[a],c=0,l=o.length;c<l;c++){var u=o[c];s&&s[u]?s[u]=null:(t[a]||(t[a]={}))[u]=1}}}function a(e,t){var n=[];for(var r in e)if(e.hasOwnProperty(r)&&e[r]!=null)if(t)n.push(+r);else{var i=a(e[r],!0);i.length&&n.push({seriesId:r,dataIndex:i})}return n}}function ac(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return B(t.dataIndex)?R(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return B(t.name)?R(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function oc(){var e=`__ec_inner_`+ sc++;return function(t){return t[e]||(t[e]={})}}var sc=Es();function cc(e,t,n){var r=lc(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=fc(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function lc(e,t){var n;if(H(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=G(),a={},o=!1;return L(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&it(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var uc={useDefault:!0,enableAll:!1,enableNone:!1},dc={useDefault:!1,enableAll:!0,enableNone:!0};function fc(e,t,n,r){r||=uc;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function pc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function mc(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function hc(e){return e===`auto`?Ne.domSupported?`html`:`richText`:e||`html`}function gc(e,t){var n=G(),r=[];return L(e,function(e){var i=t(e);(n.get(i)||(r.push(i),n.set(i,[]))).push(e)}),{keys:r,buckets:n}}function _c(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(ht(r)){var o=Fs(n||0,r,i);return cs(o,a?Math.max(us(n||0),us(r)):t)}else if(H(r))return i<1?n:r;else{for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=Fs(p,m,i);s[d]=cs(o,a?Math.max(us(p),us(m)):t)}}return s}}var vc=function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0):!1},e}();function yc(e){e.option=e.parentModel=e.ecModel=null}var bc=`.`,xc=`___EC__COMPONENT__CONTAINER___`,Sc=`___EC__EXTENDED_CLASS___`;function Cc(e){var t={main:``,sub:``};if(e){var n=e.split(bc);t.main=n[0]||``,t.sub=n[1]||``}return t}function wc(e){Dt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Tc(e){return!!(e&&e[Sc])}function Ec(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Dc(t)?n=function(e){N(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},at(n,this)),F(n.prototype,e),n[Sc]=!0,n.extend=this.extend,n.superCall=jc,n.superApply=Mc,n.superClass=t,n}}function Dc(e){return V(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Oc(e,t){e.extend=t.extend}var kc=Math.round(Math.random()*10);function Ac(e){var t=[`__\0is_clz`,kc++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function jc(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function Mc(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Nc(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){wc(r),e.prototype.type=r;var i=Cc(r);if(!i.sub)t[i.main]=e;else if(i.sub!==xc){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[xc]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Cc(e),r=[],i=t[n.main];return i&&i[xc]?L(i,function(e,t){t!==xc&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Cc(e).main]},e.getAllClassMainTypes=function(){var e=[];return L(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Cc(e).main];return n&&n[xc]};function n(e){var n=t[e.main];return(!n||!n[xc])&&(n=t[e.main]={},n[xc]=!0),n}}function Pc(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&it(r,s)>=0||i&&it(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Fc=Pc([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Ic=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Fc(this,e,t)},e}(),Lc=new hi(50);function Rc(e){if(typeof e==`string`){var t=Lc.get(e);return t&&t.image}else return e}function zc(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Lc.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Vc(t)&&a.pending.push(o)):(t=Ve.loadImage(e,Bc,Bc),t.__zrImageSrc=e,Lc.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function Bc(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Vc(e){return e&&e.width&&e.height}var Hc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Uc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(``);a=Wc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Gc(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(``),e.isTruncated=s}function Wc(e,t,n,r){r||={};var i=F({},r);n=W(n,`...`),i.maxIterations=W(r.maxIterations,2);var a=i.minChar=W(r.minChar,0),o=i.fontMeasureInfo=ho(t),s=o.asciiCharWidth;i.placeholder=W(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=xo(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Gc(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=xo(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Kc(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=xo(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Kc(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=bo(n,e.charCodeAt(i));return i}function qc(e,t,n,r){var i=ol(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=Eo(l),f=W(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?nl(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`@@ -43,4 +43,4 @@ Error generating stack: `+e.message+``:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Z(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=mQ([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(!(m!=null&&m!==`item`)){var h=s.getDataParams(c,l),g=new db;h.marker=g.makeTooltipMarker(`item`,xg(h.color),d);var _=oy(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?nb(y?F({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Z(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(H(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=Cn(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=mQ(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new db;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u)if(H(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Jh(m.axisValue,d,p)),d=vg(d,n,!0)}else if(V(u)){var g=z(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u;l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),V(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=X(t[0],s),r=X(t[1],c);else if(U(t)){var p=t;p.width=l[0],p.height=l[1];var m=Ug(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(H(t)&&o){var h=vQ(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=gQ(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=yQ(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=yQ(d)?l[1]/2:d===`bottom`?l[1]:0),GZ(e)){var h=_Q(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&L(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&L(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&L(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&L(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){Ne.node||!t.getDom()||(Vb(this,`_updatePosition`),this._tooltipContent.dispose(),Cq(`itemTooltip`,t))},t.type=`tooltip`,t}(Eb);function mQ(e,t,n){var r=t.ecModel,i;n?(i=new lh(n,r,r),i=new lh(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof lh&&(o=o.get(`tooltip`,!0)),H(o)&&(o={formatter:o}),o&&(i=new lh(o,i,r)))}return i}function hQ(e,t){return e.dispatchAction||z(t.dispatchAction,t)}function gQ(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function _Q(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function vQ(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function yQ(e){return e===`center`||e===`middle`}function bQ(e,t,n){var r=lc(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=fc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Z(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function xQ(e){bw(Rq),e.registerComponentModel(WZ),e.registerComponentView(pQ),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},zt),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},zt)}var SQ=[`rect`,`polygon`,`keep`,`clear`];function CQ(e,t){var n=Rs(e?e.brush:[]);if(n.length){var r=[];L(n,function(e){var t=e.hasOwnProperty(`toolbox`)?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});var i=e&&e.toolbox;B(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||={},o=a.brush||={},s=o.type||=[];s.push.apply(s,r),wQ(s),t&&!s.length&&s.push.apply(s,SQ)}}function wQ(e){var t={};L(e,function(e){t[e]=1}),e.length=0,L(t,function(t,n){e.push(n)})}var TQ=L;function EQ(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function DQ(e,t,n){var r={};return TQ(t,function(t){var a=r[t]=i();TQ(e[t],function(e,r){if(nR.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new nR(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new nR(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function OQ(e,t,n){var r;L(n,function(e){t.hasOwnProperty(e)&&EQ(t[e])&&(r=!0)}),r&&L(n,function(n){t.hasOwnProperty(n)&&EQ(t[n])?e[n]=P(t[n]):delete e[n]})}function kQ(e,t,n,r,i,a){var o={};L(e,function(e){o[e]=nR.prepareVisualTypes(t[e])});var s;function c(e){return Cx(n,s,e)}function l(e,t){Ex(n,s,e,t)}a==null?n.each(u):n.each([a],u);function u(e,u){s=a==null?e:u;var d=n.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var f=r.call(i,e),p=t[f],m=o[f],h=0,g=m.length;h<g;h++){var _=m[h];p[_]&&p[_].applyVisual(e,c,l)}}}function AQ(e,t,n,r){var i={};return L(e,function(e){i[e]=nR.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return Cx(a,l,e)}function c(e,t){Ex(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}function jQ(e){var t=e.brushType,n={point:function(r){return MQ[t].point(r,n,e)},rect:function(r){return MQ[t].rect(r,n,e)}};return n}var MQ={lineX:NQ(0),lineY:NQ(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&RE(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,a=e.y,o=e.width,s=e.height,c=r[0];if(RE(r,i,a)||RE(r,i+o,a)||RE(r,i,a+s)||RE(r,i+o,a+s)||J.create(e).contain(c[0],c[1])||_m(i,a,i+o,a,r)||_m(i,a,i,a+s,r)||_m(i+o,a,i+o,a+s,r)||_m(i,a+s,i+o,a+s,r))return!0}}};function NQ(e){var t=[`x`,`y`],n=[`width`,`height`];return{point:function(t,n,r){if(t){var i=r.range,a=t[e];return PQ(a,i)}},rect:function(r,i,a){if(r){var o=a.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),PQ(s[0],o)||PQ(s[1],o)||PQ(o[0],s)||PQ(o[1],s)}}}}function PQ(e,t){return t[0]<=e&&e<=t[1]}var FQ=[`inBrush`,`outOfBrush`],IQ=`__ecBrushSelect`,LQ=`__ecInBrushSelectEvent`;function RQ(e){e.eachComponent({mainType:`brush`},function(t){(t.brushTargetManager=new wZ(t.option,e)).setInputRanges(t.areas,e)})}function zQ(e,t,n){var r=[],i,a;e.eachComponent({mainType:`brush`},function(e){n&&n.type===`takeGlobalCursor`&&e.setBrushOption(n.key===`brush`?n.brushOption:{brushType:!1})}),RQ(e),e.eachComponent({mainType:`brush`},function(t,n){var o={brushId:t.id,brushIndex:n,brushName:t.name,areas:P(t.areas),selected:[]};r.push(o);var s=t.option,c=s.brushLink,l=[],u=[],d=[],f=!1;n||(i=s.throttleType,a=s.throttleDelay);var p=R(t.areas,function(e){var t=WQ[e.brushType],n=I({boundingRect:t?t(e):void 0},e);return n.selectors=jQ(n),n}),m=DQ(t.option,FQ,function(e){e.mappingMethod=`fixed`});B(c)&&L(c,function(e){l[e]=1});function h(e){return c===`all`||!!l[e]}function g(e){return!!e.length}e.eachSeries(function(e,t){var n=d[t]=[];e.subType===`parallel`?_(e,t):v(e,t,n)});function _(e,t){var n=e.coordinateSystem;f||=n.hasAxisBrushed(),h(t)&&n.eachActiveState(e.getData(),function(e,t){e===`active`&&(u[t]=1)})}function v(n,r,i){if(!(!n.brushSelector||UQ(t,r))&&(L(p,function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),f||=g(i)}),h(r)&&g(i))){var a=n.getData();a.each(function(e){HQ(n,i,a,e)&&(u[e]=1)})}}e.eachSeries(function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(n);var r=d[t],i=e.getData(),a=h(t)?function(e){return u[e]?(n.dataIndex.push(i.getRawIndex(e)),`inBrush`):`outOfBrush`}:function(t){return HQ(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),`inBrush`):`outOfBrush`};(h(t)?f:g(r))&&kQ(FQ,m,i,a)})}),BQ(t,i,a,r,n)}function BQ(e,t,n,r,i){if(i){var a=e.getZr();a[LQ]||(a[IQ]||(a[IQ]=VQ),Bb(a,IQ,n,t)(e,r))}}function VQ(e,t){if(!e.isDisposed()){var n=e.getZr();n[LQ]=!0,e.dispatchAction({type:`brushSelect`,batch:t}),n[LQ]=!1}}function HQ(e,t,n,r){for(var i=0,a=t.length;i<a;i++){var o=t[i];if(e.brushSelector(r,n,o.selectors,o))return!0}}function UQ(e,t){var n=e.option.seriesIndex;return n!=null&&n!==`all`&&(B(n)?it(n,t)<0:t!==n)}var WQ={rect:function(e){return GQ(e.range)},polygon:function(e){for(var t,n=e.range,r=0,i=n.length;r<i;r++){t||=[[1/0,-1/0],[1/0,-1/0]];var a=n[r];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&GQ(t)}};function GQ(e){return new J(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var KQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new jV(t.getZr())).on(`brush`,z(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){RQ(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`brush`,brushId:t,areas:P(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:`brushEnd`,brushId:t,areas:P(n),$from:t})},t.type=`brush`,t}(Eb),qQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&OQ(n,e,[`inBrush`,`outOfBrush`]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},r.hasOwnProperty(`liftZ`)||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=R(e,function(e){return JQ(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=JQ(this.option,e),this.brushType=this.brushOption.brushType},t.type=`brush`,t.dependencies=[`geo`,`grid`,`xAxis`,`yAxis`,`parallel`,`series`],t.defaultOption={seriesIndex:`all`,brushType:`rect`,brushMode:`single`,transformable:!0,brushStyle:{borderWidth:1,color:Q.color.backgroundTint,borderColor:Q.color.borderTint},throttleType:`fixRate`,throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:Q.color.disabled},t}(e_);function JQ(e,t){return nt({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new lh(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var YQ=[`rect`,`polygon`,`lineX`,`lineY`,`keep`,`clear`],XQ=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n){var r,i,a;t.eachComponent({mainType:`brush`},function(e){r=e.brushType,i=e.brushOption.brushMode||`single`,a||=!!e.areas.length}),this._brushType=r,this._brushMode=i,L(e.get(`type`,!0),function(t){e.setIconStatus(t,(t===`keep`?i===`multiple`:t===`clear`?a:t===r)?`emphasis`:`normal`)})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`,!0),n={};return L(e.get(`type`,!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;n===`clear`?(t.dispatchAction({type:`axisAreaSelect`,intervals:[]}),t.dispatchAction({type:`brush`,command:`clear`,areas:[]})):t.dispatchAction({type:`takeGlobalCursor`,key:`brush`,brushOption:{brushType:n===`keep`?r:r===n?!1:n,brushMode:n===`keep`?i===`multiple`?`single`:`multiple`:i}})},t.getDefaultOption=function(e){return{show:!0,type:YQ.slice(),icon:{rect:`M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13`,polygon:`M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2`,lineX:`M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4`,lineY:`M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4`,keep:`M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z`,clear:`M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2`},title:e.getLocaleModel().get([`toolbox`,`brush`,`title`])}},t}(HX);function ZQ(e){e.registerComponentView(KQ),e.registerComponentModel(qQ),e.registerPreprocessor(CQ),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,zQ),e.registerAction({type:`brush`,event:`brush`,update:`updateVisual`},function(e,t){t.eachComponent({mainType:`brush`,query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:`brushSelect`,event:`brushSelected`,update:`none`},zt),e.registerAction({type:`brushEnd`,event:`brushEnd`,update:`none`},zt),WX(`brush`,XQ)}var QQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Q.size.m,backgroundColor:Q.color.transparent,borderColor:Q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Q.color.primary},subtextStyle:{fontSize:12,color:Q.color.quaternary}},t}(e_),$Q=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=W(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Hu({style:Bm(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Hu({style:Bm(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){Sg(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){Sg(p,`_`+e.get(`subtarget`))}),Z(c).eventData=Z(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=Ug(g,Kg(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Lu({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(Eb);function e$(e){e.registerComponentModel(QQ),e.registerComponentView($Q)}var t$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode=`box`,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e??=this.option.currentIndex;var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,t=e.data||[],n=e.axisType,r=this._names=[],i;n===`category`?(i=[],L(t,function(e,t){var n=Qs(Vs(e),``),a;U(e)?(a=P(e),a.value=t):a=t,i.push(a),r.push(n)})):i=t;var a={category:`ordinal`,time:`time`,value:`number`}[n]||`number`;(this._data=new Zw([{name:`value`,type:a}],this)).initData(i,r)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get(`axisType`)===`category`)return this._names.slice()},t.type=`timeline`,t.defaultOption={z:4,show:!0,axisType:`time`,realtime:!0,left:`20%`,top:null,right:`20%`,bottom:0,width:null,height:40,padding:Q.size.m,controlPosition:`left`,autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:Q.color.secondary},data:[]},t}(e_),n$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline.slider`,t.defaultOption=mh(t$.defaultOption,{backgroundColor:`rgba(0,0,0,0)`,borderColor:Q.color.border,borderWidth:0,orient:`horizontal`,inverse:!1,tooltip:{trigger:`item`},symbol:`circle`,symbolSize:12,lineStyle:{show:!0,width:2,color:Q.color.accent10},label:{position:`auto`,show:!0,interval:`auto`,rotate:0,color:Q.color.tertiary},itemStyle:{color:Q.color.accent20,borderWidth:0},checkpointStyle:{symbol:`circle`,symbolSize:15,color:Q.color.accent50,borderColor:Q.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`rgba(0, 0, 0, 0)`,animation:!0,animationDuration:300,animationEasing:`quinticInOut`},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:`left`,playIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z`,stopIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z`,nextIcon:`path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z`,prevIcon:`path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z`,prevBtnSize:18,nextBtnSize:18,color:Q.color.accent50,borderColor:Q.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:Q.color.accent60},itemStyle:{color:Q.color.accent60,borderColor:Q.color.accent60},controlStyle:{color:Q.color.accent70,borderColor:Q.color.accent70}},progress:{lineStyle:{color:Q.color.accent30},itemStyle:{color:Q.color.accent40}},data:[]}),t}(t$);ot(n$,ay.prototype);var r$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline`,t}(Eb),i$=function(e){N(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return a.type=i||`value`,a}return t.prototype.getLabelModel=function(){return this.model.getModel(`label`)},t.prototype.isHorizontal=function(){return this.model.get(`orient`)===`horizontal`},t}(SD),a$=Math.PI,o$=oc(),s$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get(`show`,!0)){var r=this._layout(e,n),i=this._createGroup(`_mainGroup`),a=this._createGroup(`_labelGroup`),o=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return Xy(`nameValue`,{noName:!0,value:o.scale.getLabel({value:e})})},L([`AxisLine`,`AxisTick`,`Control`,`CurrentPointer`],function(t){this[`_render`+t](r,i,o,e)},this),this._renderAxisLabel(r,a,o,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n=e.get([`label`,`position`]),r=e.get(`orient`),i=l$(e,t),a=n==null||n===`auto`?r===`horizontal`?i.y+i.height/2<t.getHeight()/2?`-`:`+`:i.x+i.width/2<t.getWidth()/2?`+`:`-`:H(n)?{horizontal:{top:`-`,bottom:`+`},vertical:{left:`-`,right:`+`}}[r][n]:n,o={horizontal:`center`,vertical:a>=0||a===`+`?`left`:`right`},s={horizontal:a>=0||a===`+`?`top`:`bottom`,vertical:`middle`},c={horizontal:0,vertical:a$/2},l=r===`vertical`?i.height:i.width,u=e.getModel(`controlStyle`),d=u.get(`show`,!0),f=d?u.get(`itemSize`):0,p=d?u.get(`itemGap`):0,m=f+p,h=e.get([`label`,`rotate`])||0;h=h*a$/180;var g,_,v,y=u.get(`position`,!0),b=d&&u.get(`showPlayBtn`,!0),x=d&&u.get(`showPrevBtn`,!0),S=d&&u.get(`showNextBtn`,!0),C=0,w=l;y===`left`||y===`bottom`?(b&&(g=[0,0],C+=m),x&&(_=[C,0],C+=m),S&&(v=[w-f,0],w-=m)):(b&&(g=[w-f,0],w-=m),x&&(_=[0,0],C+=m),S&&(v=[w-f,0],w-=m));var T=[C,w];return e.get(`inverse`)&&T.reverse(),{viewRect:i,mainLength:l,orient:r,rotation:c[r],labelRotation:h,labelPosOpt:a,labelAlign:e.get([`label`,`align`])||o[r],labelBaseline:e.get([`label`,`verticalAlign`])||e.get([`label`,`baseline`])||s[r],playPosition:g,prevBtnPosition:_,nextBtnPosition:v,axisExtent:T,controlSize:f,controlGap:p}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if(e.orient===`vertical`){var a=Bn(),o=i.x,s=i.y+i.height;Wn(a,a,[-o,-s]),Gn(a,a,-a$/2),Wn(a,a,[o,s]),i=i.clone(),i.applyTransform(a)}var c=g(i),l=g(n.getBoundingRect()),u=g(r.getBoundingRect()),d=[n.x,n.y],f=[r.x,r.y];f[0]=d[0]=c[0][0];var p=e.labelPosOpt;if(p==null||H(p)){var m=p===`+`?0:1;_(d,l,c,1,m),_(f,u,c,1,1-m)}else{var m=p>=0?0:1;_(d,l,c,1,m),f[1]=d[1]+p}n.setPosition(d),r.setPosition(f),n.rotation=r.rotation=e.rotation,h(n),h(r);function h(e){e.originX=c[0][0]-e.x,e.originY=c[1][0]-e.y}function g(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function _(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get(`axisType`),i=c$(t,r);i.getTicks=function(){return n.mapArray([`value`],function(e){return{value:e}})};var a=n.getDataExtent(`value`);i.setExtent(a[0],a[1]),i.calcNiceTicks();var o=new i$(`value`,i,e.axisExtent,r);return o.model=t,o},t.prototype._createGroup=function(e){var t=this[e]=new Y;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var i=n.getExtent();if(r.get([`lineStyle`,`show`])){var a=new fp({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:F({lineCap:`round`},r.getModel(`lineStyle`).getLineStyle()),silent:!0,z2:1});t.add(a);var o=this._progressLine=new fp({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:I({lineCap:`round`,lineWidth:a.style.lineWidth},r.getModel([`progress`,`lineStyle`]).getLineStyle()),silent:!0,z2:1});t.add(o)}},t.prototype._renderAxisTick=function(e,t,n,r){var i=this,a=r.getData(),o=n.scale.getTicks();this._tickSymbols=[],L(o,function(e){var o=n.dataToCoord(e.value),s=a.getItemModel(e.value),c=s.getModel(`itemStyle`),l=s.getModel([`emphasis`,`itemStyle`]),u=s.getModel([`progress`,`itemStyle`]),d=d$(s,c,t,{x:o,y:0,onclick:z(i._changeTimeline,i,e.value)});d.ensureState(`emphasis`).style=l.getItemStyle(),d.ensureState(`progress`).style=u.getItemStyle(),Zd(d);var f=Z(d);s.get(`tooltip`)?(f.dataIndex=e.value,f.dataModel=r):f.dataIndex=f.dataModel=null,i._tickSymbols.push(d)})},t.prototype._renderAxisLabel=function(e,t,n,r){var i=this;if(n.getLabelModel().get(`show`)){var a=r.getData(),o=n.getViewLabels();this._tickLabels=[],L(o,function(r){var o=r.tickValue,s=a.getItemModel(o),c=s.getModel(`label`),l=s.getModel([`emphasis`,`label`]),u=s.getModel([`progress`,`label`]),d=new Hu({x:n.dataToCoord(r.tickValue),y:0,rotation:e.labelRotation-e.rotation,onclick:z(i._changeTimeline,i,o),silent:!1,style:Bm(c,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});d.ensureState(`emphasis`).style=Bm(l),d.ensureState(`progress`).style=Bm(u),t.add(d),Zd(d),o$(d).dataIndex=o,i._tickLabels.push(d)})}},t.prototype._renderControl=function(e,t,n,r){var i=e.controlSize,a=e.rotation,o=r.getModel(`controlStyle`).getItemStyle(),s=r.getModel([`emphasis`,`controlStyle`]).getItemStyle(),c=r.getPlayState(),l=r.get(`inverse`,!0);u(e.nextBtnPosition,`next`,z(this._changeTimeline,this,l?`-`:`+`)),u(e.prevBtnPosition,`prev`,z(this._changeTimeline,this,l?`+`:`-`)),u(e.playPosition,c?`stop`:`play`,z(this._handlePlayClick,this,!c),!0);function u(e,n,c,l){if(e){var u=Do(W(r.get([`controlStyle`,n+`BtnSize`]),i),i),d=[0,-u/2,u,u],f=u$(r,n+`Icon`,d,{x:e[0],y:e[1],originX:i/2,originY:0,rotation:l?-a:0,rectHover:!0,style:o,onclick:c});f.ensureState(`emphasis`).style=s,t.add(f),Zd(f)}}},t.prototype._renderCurrentPointer=function(e,t,n,r){var i=r.getData(),a=r.getCurrentIndex(),o=i.getItemModel(a).getModel(`checkpointStyle`),s=this,c={onCreate:function(e){e.draggable=!0,e.drift=z(s._handlePointerDrag,s),e.ondragend=z(s._handlePointerDragend,s),f$(e,s._progressLine,a,n,r,!0)},onUpdate:function(e){f$(e,s._progressLine,a,n,r)}};this._currentPointer=d$(o,o,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:`timelinePlayChange`,playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=this._axis,i=ls(r.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var a=this._progressLine;a&&(a.shape.x2=n,a.dirty());var o=this._findNearestTick(n),s=this.model;(t||o!==s.getCurrentIndex()&&s.get(`realtime`))&&this._changeTimeline(o)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get(`rewind`,!0)?-1:1))},this.model.get(`playInterval`)))},t.prototype._toAxisCoord=function(e){return lm(e,this._mainGroup.getLocalTransform(),!0)},t.prototype._findNearestTick=function(e){var t=this.model.getData(),n=1/0,r,i=this._axis;return t.each([`value`],function(t,a){var o=i.dataToCoord(t),s=Math.abs(o-e);s<n&&(n=s,r=a)}),r},t.prototype._clearTimer=function(){this._timer&&=(clearTimeout(this._timer),null)},t.prototype._changeTimeline=function(e){var t=this.model.getCurrentIndex();e===`+`?e=t+1:e===`-`&&(e=t-1),this.api.dispatchAction({type:`timelineChange`,currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),t=this._tickSymbols,n=this._tickLabels;if(t)for(var r=0;r<t.length;r++)t&&t[r]&&t[r].toggleState(`progress`,r<e);if(n)for(var r=0;r<n.length;r++)n&&n[r]&&n[r].toggleState(`progress`,o$(n[r]).dataIndex<=e)},t.type=`timeline.slider`,t}(r$);function c$(e,t){if(t||=e.get(`type`),t)switch(t){case`category`:return new AT({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case`time`:return new ZT({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`)});default:return new MT}}function l$(e,t){return Ug(e.getBoxLayoutParams(),Kg(e,t).refContainer,e.get(`padding`))}function u$(e,t,n,r){var i=r.style,a=gm(e.get([`controlStyle`,t]),r||{},new J(n[0],n[1],n[2],n[3]));return i&&a.setStyle(i),a}function d$(e,t,n,r,i,a){var o=t.get(`color`);i?(i.setColor(o),n.add(i),a&&a.onUpdate(i)):(i=Bx(e.get(`symbol`),-1,-1,2,2,o),i.setStyle(`strokeNoScale`,!0),n.add(i),a&&a.onCreate(i));var s=t.getItemStyle([`color`]);i.setStyle(s),r=nt({rectHover:!0,z2:100},r,!0);var c=Vx(e.get(`symbolSize`));r.scaleX=c[0]/2,r.scaleY=c[1]/2;var l=Hx(e.get(`symbolOffset`),c);l&&(r.x=(r.x||0)+l[0],r.y=(r.y||0)+l[1]);var u=e.get(`symbolRotate`);return r.rotation=(u||0)*Math.PI/180||0,i.attr(r),i.updateTransform(),i}function f$(e,t,n,r,i,a){if(!e.dragging){var o=i.getModel(`checkpointStyle`),s=r.dataToCoord(i.getData().get(`value`,n));if(a||!o.get(`animation`,!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var c={duration:o.get(`animationDuration`,!0),easing:o.get(`animationEasing`,!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},c),t&&t.animateTo({shape:{x2:s}},c)}}}function p$(e){e.registerAction({type:`timelineChange`,event:`timelineChanged`,update:`prepareAndUpdate`},function(e,t,n){var r=t.getComponent(`timeline`);return r&&e.currentIndex!=null&&(r.setCurrentIndex(e.currentIndex),!r.get(`loop`,!0)&&r.isIndexMax()&&r.getPlayState()&&(r.setPlayState(!1),n.dispatchAction({type:`timelinePlayChange`,playState:!1,from:e.from}))),t.resetOption(`timeline`,{replaceMerge:r.get(`replaceMerge`,!0)}),I({currentIndex:r.option.currentIndex},e)}),e.registerAction({type:`timelinePlayChange`,event:`timelinePlayChanged`,update:`update`},function(e,t){var n=t.getComponent(`timeline`);n&&e.playState!=null&&n.setPlayState(e.playState)})}function m$(e){var t=e&&e.timeline;B(t)||(t=t?[t]:[]),L(t,function(e){e&&h$(e)})}function h$(e){var t=e.type,n={number:`value`,time:`time`};if(n[t]&&(e.axisType=n[t],delete e.type),g$(e),_$(e,`controlPosition`)){var r=e.controlStyle||={};_$(r,`position`)||(r.position=e.controlPosition),r.position===`none`&&!_$(r,`show`)&&(r.show=!1,delete r.position),delete e.controlPosition}L(e.data||[],function(e){U(e)&&!B(e)&&(!_$(e,`value`)&&_$(e,`name`)&&(e.value=e.name),g$(e))})}function g$(e){var t=e.itemStyle||={},n=t.emphasis||={},r=e.label||e.label||{},i=r.normal||={},a={normal:1,emphasis:1};L(r,function(e,t){!a[t]&&!_$(i,t)&&(i[t]=e)}),n.label&&!_$(r,`emphasis`)&&(r.emphasis=n.label,delete n.label)}function _$(e,t){return e.hasOwnProperty(t)}function v$(e){e.registerComponentModel(n$),e.registerComponentView(s$),e.registerSubTypeDefaulter(`timeline`,function(){return`slider`}),p$(e),e.registerPreprocessor(m$)}function y$(e,t){if(!e)return!1;for(var n=B(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function b$(e){zs(e,`label`,[`show`])}var x$=oc(),S$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Ne.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=x$(e)[i];if(!n||!n.data){x$(e)[i]=null;return}a?a._mergeOption(n,t,!0):(r&&b$(n),L(n.data,function(e){e instanceof Array?(b$(e[0]),b$(e[1])):b$(e)}),a=this.createMarkerModelFromSeries(n,this,t),F(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),x$(e)[i]=a},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return Xy(`section`,{header:this.name,blocks:[Xy(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=ay.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return x$(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(e_);ot(S$,ay.prototype);var C$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markPoint`,t.defaultOption={z:5,symbol:`pin`,symbolSize:50,tooltip:{trigger:`item`},label:{show:!0,position:`inside`},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(S$);function w$(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function T$(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function E$(e,t,n,r,i,a,o){var s=[],c=cT(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=P$(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=us(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var D$={min:pt(E$,`min`),max:pt(E$,`max`),average:pt(E$,`average`),median:pt(E$,`median`)};function O$(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!T$(t)&&!B(t.coord)&&B(i)){var a=k$(t,n,r,e);if(t=P(t),t.type&&D$[t.type]&&a.baseAxis&&a.valueAxis){var o=it(i,a.baseAxis.dim),s=it(i,a.valueAxis.dim),c=D$[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!B(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&D$[t.type]){var u=r.getOtherAxis(l);u&&(t.value=P$(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)D$[d[f]]&&(d[f]=P$(n,n.mapDimension(i[f]),d[f]));return t}}function k$(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(A$(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function A$(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function j$(e,t){return e&&e.containData&&t.coord&&!w$(t)?e.containData(t.coord):!0}function M$(e,t,n){return e&&e.containZone&&t.coord&&n.coord&&!w$(t)&&!w$(n)?e.containZone(t.coord,n.coord):!0}function N$(e,t){return e?function(e,n,r,i){return uy(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return uy(e.value,t[i])}}function P$(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}else if(n===`median`)return e.getMedian(t);else return e.getDataExtent(t)[+(n===`max`)]}var F$=oc(),I$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=G()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){F$(e).keep=!1}),t.eachSeries(function(e){var i=S$.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!F$(e).keep&&r.group.remove(e.group)}),L$(t,i,this.type)},t.prototype.markKeep=function(e){F$(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;L(e,function(e){var r=S$.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Id(e):Ld(e))})})},t.type=`marker`,t}(Eb);function L$(e,t,n){e.eachSeries(function(e){var r=S$.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=jm(r),o=a.z,s=a.zlevel;Nm(i.group,o,s)}})}function R$(e,t,n){var r=t.coordinateSystem,i=n.getWidth(),a=n.getHeight(),o=r&&r.getArea&&r.getArea();e.each(function(n){var s=e.getItemModel(n),c=s.get(`relativeTo`)===`coordinate`,l=c?o?o.width:0:i,u=c?o?o.height:0:a,d=c&&o?o.x:0,f=c&&o?o.y:0,p,m=X(s.get(`x`),l)+d,h=X(s.get(`y`),u)+f;if(!isNaN(m)&&!isNaN(h))p=[m,h];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var g=e.get(r.dimensions[0],n),_=e.get(r.dimensions[1],n);p=r.dataToPoint([g,_])}isNaN(m)||(p[0]=m),isNaN(h)||(p[1]=h),e.setItemLayout(n,p)})}var z$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=S$.getMarkerModelFromSeries(e,`markPoint`);t&&(R$(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new yA),l=B$(i,e,t);t.setData(l),R$(t.getData(),e,r),l.each(function(e){var n=l.getItemModel(e),r=n.getShallow(`symbol`),i=n.getShallow(`symbolSize`),a=n.getShallow(`symbolRotate`),s=n.getShallow(`symbolOffset`),c=n.getShallow(`symbolKeepAspect`);if(V(r)||V(i)||V(a)||V(s)){var u=t.getRawValue(e),d=t.getDataParams(e);V(r)&&(r=r(u,d)),V(i)&&(i=i(u,d)),V(a)&&(a=a(u,d)),V(s)&&(s=s(u,d))}var f=n.getModel(`itemStyle`).getItemStyle(),p=n.get(`z2`),m=Tx(o,`color`);f.fill||=m,l.setItemVisual(e,{z2:W(p,0),symbol:r,symbolSize:i,symbolRotate:a,symbolOffset:s,symbolKeepAspect:c,style:f})}),c.updateData(l),this.group.add(c.group),l.eachItemGraphicEl(function(e){e.traverse(function(e){Z(e).dataModel=t})}),this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markPoint`,t}(I$);function B$(e,t,n){var r=e?R(e&&e.dimensions,function(e){return F(F({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Zw(r,n),a=R(n.get(`data`),pt(O$,t));e&&(a=lt(a,pt(j$,e)));var o=N$(!!e,r);return i.initData(a,null,o),i}function V$(e){e.registerComponentModel(C$),e.registerComponentView(z$),e.registerPreprocessor(function(e){y$(e.series,`markPoint`)&&(e.markPoint=e.markPoint||{})})}var H$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(S$),U$=oc(),W$=function(e,t,n,r){var i=e.getData(),a;if(B(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Ct(r.yAxis,r.xAxis);else{var l=k$(r,i,t,e);s=l.valueAxis,c=P$(i,lT(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=P(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&ht(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[O$(e,a[0]),O$(e,a[1]),F({},a[2])];return h[2].type=h[2].type||null,nt(h[2],h[0]),nt(h[2],h[1]),h};function G$(e){return!isNaN(e)&&!isFinite(e)}function K$(e,t,n,r){var i=1-e,a=r.dimensions[e];return G$(t[i])&&G$(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function q$(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(K$(1,n,r,e)||K$(0,n,r,e)))return!0}return j$(e,t[0])&&j$(e,t[1])}function J$(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=X(o.get(`x`),i.getWidth()),l=X(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(IA(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;G$(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):G$(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var Y$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=S$.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=U$(t).from,a=U$(t).to;i.each(function(t){J$(i,t,!0,e,n),J$(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new Lz);this.group.add(c.group);var l=X$(i,e,t),u=l.from,d=l.to,f=l.line;U$(t).from=u,U$(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);B(p)||(p=[p,p]),B(m)||(m=[m,m]),B(h)||(h=[h,h]),B(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:W(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Z(e).dataModel=t,e.traverse(function(e){Z(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);J$(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=Tx(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:W(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:W(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:W(a.get(`symbolSize`),m[+!i]),symbol:W(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(I$);function X$(e,t,n){var r=e?R(e&&e.dimensions,function(e){return F(F({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Zw(r,n),a=new Zw(r,n),o=new Zw([],n),s=R(n.get(`data`),pt(W$,t,e,n));e&&(s=lt(s,pt(q$,e)));var c=N$(!!e,r);return i.initData(R(s,function(e){return e[0]}),null,c),a.initData(R(s,function(e){return e[1]}),null,c),o.initData(R(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Z$(e){e.registerComponentModel(H$),e.registerComponentView(Y$),e.registerPreprocessor(function(e){y$(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var Q$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markArea`,t.defaultOption={z:1,tooltip:{trigger:`item`},animation:!1,label:{show:!0,position:`top`},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:`top`}}},t}(S$),$$=oc(),e1=function(e,t,n,r){var i=r[0],a=r[1];if(!(!i||!a)){var o=O$(e,i),s=O$(e,a),c=o.coord,l=s.coord;c[0]=Ct(c[0],-1/0),c[1]=Ct(c[1],-1/0),l[0]=Ct(l[0],1/0),l[1]=Ct(l[1],1/0);var u=rt([{},o,s]);return u.coord=[o.coord,s.coord],u.x0=o.x,u.y0=o.y,u.x1=s.x,u.y1=s.y,u}};function t1(e){return!isNaN(e)&&!isFinite(e)}function n1(e,t,n,r){var i=1-e;return t1(t[i])&&t1(n[i])}function r1(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},a={coord:r,x:t.x1,y:t.y1};return IA(e,`cartesian2d`)?n&&r&&(n1(1,n,r,e)||n1(0,n,r,e))?!0:M$(e,i,a):j$(e,i)||j$(e,a)}function i1(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=X(o.get(n[0]),i.getWidth()),l=X(o.get(n[1]),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition){var u=e.getValues([`x0`,`y0`],t),d=e.getValues([`x1`,`y1`],t),f=a.clampData(u),p=a.clampData(d),m=[];n[0]===`x0`?m[0]=f[0]>p[0]?d[0]:u[0]:m[0]=f[0]>p[0]?u[0]:d[0],n[1]===`y0`?m[1]=f[1]>p[1]?d[1]:u[1]:m[1]=f[1]>p[1]?u[1]:d[1],s=r.getMarkerPosition(m,n,!0)}else{var h=e.get(n[0],t),g=e.get(n[1],t),_=[h,g];a.clampData&&a.clampData(_,_),s=a.dataToPoint(_,!0)}if(IA(a,`cartesian2d`)){var v=a.getAxis(`x`),y=a.getAxis(`y`),h=e.get(n[0],t),g=e.get(n[1],t);t1(h)?s[0]=v.toGlobalCoord(v.getExtent()[n[0]===`x0`?0:1]):t1(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[n[1]===`y0`?0:1]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}return s}var a1=[[`x0`,`y0`],[`x1`,`y0`],[`x1`,`y1`],[`x0`,`y1`]],o1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=S$.getMarkerModelFromSeries(e,`markArea`);if(t){var r=t.getData();r.each(function(t){var i=R(a1,function(i){return i1(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape(`points`,i)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,{group:new Y});this.group.add(c.group),this.markKeep(c);var l=s1(i,e,t);t.setData(l),l.each(function(t){var n=R(a1,function(n){return i1(l,t,n,e,r)}),a=i.getAxis(`x`).scale,s=i.getAxis(`y`).scale,c=a.getExtent(),u=s.getExtent(),d=[a.parse(l.get(`x0`,t)),a.parse(l.get(`x1`,t))],f=[s.parse(l.get(`y0`,t)),s.parse(l.get(`y1`,t))];ls(d),ls(f);var p=c[0]>d[1]||c[1]<d[0]||u[0]>f[1]||u[1]<f[0];l.setItemLayout(t,{points:n,allClipped:p});var m=l.getItemModel(t),h=m.getModel(`itemStyle`).getItemStyle(),g=m.get(`z2`),_=Tx(o,`color`);h.fill||(h.fill=_,H(h.fill)&&(h.fill=Ii(h.fill,.4))),h.stroke||=_,l.setItemVisual(t,`style`,h),l.setItemVisual(t,`z2`,W(g,0))}),l.diff($$(c).data).add(function(e){var t=l.getItemLayout(e),n=l.getItemVisual(e,`z2`);if(!t.allClipped){var r=new sp({z2:W(n,0),shape:{points:t.points}});l.setItemGraphicEl(e,r),c.group.add(r)}}).update(function(e,n){var r=$$(c).data.getItemGraphicEl(n),i=l.getItemLayout(e),a=l.getItemVisual(e,`z2`);i.allClipped?r&&c.group.remove(r):(r?Lp(r,{z2:W(a,0),shape:{points:i.points}},t,e):r=new sp({shape:{points:i.points}}),l.setItemGraphicEl(e,r),c.group.add(r))}).remove(function(e){var t=$$(c).data.getItemGraphicEl(e);c.group.remove(t)}).execute(),l.eachItemGraphicEl(function(e,n){var r=l.getItemModel(n),i=l.getItemVisual(n,`style`);e.useStyle(l.getItemVisual(n,`style`)),Rm(e,zm(r),{labelFetcher:t,labelDataIndex:n,defaultText:l.getName(n)||``,inheritColor:H(i.fill)?Ii(i.fill,1):Q.color.neutral99}),rf(e,r),$d(e,null,null,r.get([`emphasis`,`disabled`])),Z(e).dataModel=t}),$$(c).data=l,c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markArea`,t}(I$);function s1(e,t,n){var r,i,a=[`x0`,`y0`,`x1`,`y1`];if(e){var o=R(e&&e.dimensions,function(e){var n=t.getData();return F(F({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});i=R(a,function(e,t){return{name:e,type:o[t%2].type}}),r=new Zw(i,n)}else i=[{name:`value`,type:`float`}],r=new Zw(i,n);var s=R(n.get(`data`),pt(e1,t,e,n));e&&(s=lt(s,pt(r1,e)));var c=e?function(e,t,n,r){var a=e.coord[Math.floor(r/2)][r%2];return uy(a,i[r])}:function(e,t,n,r){return uy(e.value,i[r])};return r.initData(s,null,c),r.hasItemOption=!0,r}function c1(e){e.registerComponentModel(Q$),e.registerComponentView(o1),e.registerPreprocessor(function(e){y$(e.series,`markArea`)&&(e.markArea=e.markArea||{})})}var l1=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},u1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&L(t,function(e,r){H(e)&&(e={type:e}),t[r]=nt(e,l1(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&$s(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=G(),a=R(r,function(e){return(H(e)||ht(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new lh(e,this,this.ecModel))},this);this._data=lt(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;L(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;L(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;L(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&it(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(e_),d1=pt,f1=L,p1=Y,m1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new p1),this.group.add(this._selectorGroup=new p1),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=Kg(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Ug(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Ug(I({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=qX(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=G(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),f1(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===``)){var p=new p1;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f))if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,d1(_1,f,null,r,d)).on(`mouseover`,d1(y1,m.name,null,r,d)).on(`mouseout`,d1(b1,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Z(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=ki(h.fill);_&&_[3]===0&&(_[3]=.2,h=F(F({},h),{fill:Li(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,d1(_1,null,f,r,d)).on(`mouseover`,d1(y1,null,f,r,d)).on(`mouseout`,d1(b1,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Z(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Z(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();f1(e,function(e){var r=e.type,i=new Hu({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Rm(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Zd(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=h1(c,r,o,s,d,m,u),y=new p1,b=r.getModel(`textStyle`);if(V(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(g1({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;H(w)&&w?T=w.replace(`{name}`,t??``):V(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Hu({style:Bm(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Lu({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&wm({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),Zd(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();zg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){zg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}else return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(Eb);function h1(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),f1(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:kS(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function g1(e){var t=e.icon||`roundRect`,n=Bx(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function _1(e,t,n,r){b1(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),y1(e,t,n,r)}function v1(e){for(var t=e.getZr().storage.getDisplayList(),n,r=0,i=t.length;r<i&&!(n=t[r].states.emphasis);)r++;return n&&n.hoverLayer}function y1(e,t,n,r){v1(n)||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function b1(e,t,n,r){v1(n)||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function x1(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function S1(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),C1(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){L(i,function(t,n){e[t?`select`:`unSelect`](n)}),C1(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function C1(e,t){var n=t||{};return L(e.getData(),function(t){var r=t.get(`name`);if(!(r===`-`||r===``)){var i=e.isSelected(r);K(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function w1(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,pt(S1,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,pt(S1,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,pt(S1,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,pt(S1,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,pt(S1,`unSelect`))}function T1(e){e.registerComponentModel(u1),e.registerComponentView(m1),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,x1),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),w1(e)}var E1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Zg(t);e.prototype.init.call(this,t,n,r),D1(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),D1(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=mh(u1.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800}),t}(u1);function D1(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,Xg(t,n,{type:`box`,ignoreSize:!!i})}var O1=Y,k1=[`width`,`height`],A1=[`x`,`y`],j1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new O1),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new O1)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=B(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Hu({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=gm(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:z(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=k1[s],l=A1[s],u=k1[1-s],d=A1[1-s];i&&zg(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=P(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;zg(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),zg(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=W(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Lu({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Lp(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;L([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,H(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=k1[i],o=A1[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(m1);function M1(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function N1(e){bw(T1),e.registerComponentModel(E1),e.registerComponentView(j1),M1(e)}function P1(e){bw(T1),bw(N1)}var F1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=mh(OX.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(OX),I1=oc();function L1(e,t,n){I1(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function R1(e,t){for(var n=I1(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var c=t.uid;s.get(c)&&(s.removeKey(c),s.keys().length||z1(n,o))}}}function z1(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function B1(e,t){var n={model:t,containsPoint:pt(H1,t),dispatchAction:pt(V1,e),dataZoomInfoMap:null,controller:null},r=n.controller=new VP(e.getZr());return L([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}function V1(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function H1(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function U1(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each(function(e){var t=e.model,n=t.get(`disabled`,!0)?!1:t.get(`zoomLock`,!0)?`move`:!0;a[i+n]>a[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function W1(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=I1(t),r=n.coordSysRecordMap||=G();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){L(EX(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,B1(t,n.model));(a.dataZoomInfoMap||=G()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i){z1(r,e);return}var s=U1(a,e,t);n.enable(s.controlType,s.opt),Bb(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var G1=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),L1(r,t,{pan:z(K1.pan,this),zoom:z(K1.zoom,this),scrollMove:z(K1.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){R1(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(jX),K1={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=J1[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(nV(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:q1(function(e,t,n,r,i,a){var o=J1[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:q1(function(e,t,n,r,i,a){return J1[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function q1(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(nV(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var J1={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function Y1(e){BX(e),e.registerComponentModel(F1),e.registerComponentView(G1),W1(e)}var X1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=mh(OX.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Q.color.accent10,borderRadius:0,backgroundColor:Q.color.transparent,dataBackground:{lineStyle:{color:Q.color.accent30,width:.5},areaStyle:{color:Q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Q.color.accent40,width:.5},areaStyle:{color:Q.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Q.color.neutral00,borderColor:Q.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Q.color.tertiary},brushSelect:!0,brushStyle:{color:Q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(OX),Z1=Lu,Q1=1,$1=30,e0=7,t0=`horizontal`,n0=`vertical`,r0=5,i0=[`line`,`bar`,`candlestick`,`scatter`],a0={easing:`cubicOut`,duration:100,delay:0},o0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=z(this._onBrush,this),this._onBrushEnd=z(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),Bb(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!==`dataZoom`||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Vb(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Y;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?e0:0,r=Kg(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===t0?{right:r.width-i.x-i.width,top:r.height-$1-a-n,width:i.width,height:$1}:{right:a,top:i.y,width:$1,height:i.height},s=Zg(e.option);L([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=Ug(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===n0&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===t0&&!i?{scaleY:o?1:-1,scaleX:1}:n===t0&&i?{scaleY:o?1:-1,scaleX:-1}:n===n0&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new Z1({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new Z1({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:z(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b){v||(y+=g);return}y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:as(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new Y,r=new sp({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new lp({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){L(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&it(i0,e.get(`type`))<0)){var o=r.getComponent(wX(i),a).axis,s=s0(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new Z1({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new Z1({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:Q1,fill:Q.color.transparent}})),L([0,1],function(t){var a=o.get(`handleIcon`);!Lx[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=Bx(a,-1,0,2,2,null,!0);s.attr({cursor:c0(this._orient),draggable:!0,drift:z(this._onDragMove,this,t),ondragend:z(this._onDragEnd,this),onmouseover:z(this._showDataInfo,this,!0),onmouseout:z(this._showDataInfo,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=X(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Zd(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new Hu({silent:!0,invisible:!f,style:Bm(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=X(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new Lu({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=Bx(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Q.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new Lu({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`default`,drift:z(this._onDragMove,this,`all`),ondragstart:z(this._showDataInfo,this,!0),ondragend:z(this._onDragEnd,this),onmouseover:z(this._showDataInfo,this,!0),onmouseout:z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[as(e[0],[0,100],t,!0),as(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];nV(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:as(a.minSpan,o,i,!0),a.maxSpan==null?null:as(a.maxSpan,o,i,!0));var s=this._range,c=this._range=ls([as(r[0],i,o,!0),as(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=ls(n.slice()),i=this._size;L([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;c<o.length;c++){var l=o[c],u=l.getClipPath();u||(u=new Lu,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){var o=t.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,c=this._range,l=e?o.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:o.getDataValueWindow();a=[this._formatLabel(l[0],s),this._formatLabel(l[1],s)]}}var u=ls(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(e){var t=cm(n.handles[e].parent,this.group),o=um(e===0?`right`:`left`,t),s=this._handleWidth/2+r0,c=lm([u[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===t0?`middle`:o,align:i===t0?o:`center`,text:a[e]})}},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get(`labelFormatter`),i=n.get(`labelPrecision`);(i==null||i===`auto`)&&(i=t.getPixelPrecision());var a=e==null||isNaN(e)?``:t.type===`category`||t.type===`time`?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return V(r)?r(e,a):H(r)?r.replace(`{value}`,a):a},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,Pn(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=lm([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new q(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();nV(0,a,r,0,o.minSpan==null?null:as(o.minSpan,i,r,!0),o.maxSpan==null?null:as(o.maxSpan,i,r,!0)),this._range=ls([as(a[0],r,i,!0),as(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Pn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new Z1({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?a0:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=EX(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(jX);function s0(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function c0(e){return e===`vertical`?`ns-resize`:`ew-resize`}function l0(e){e.registerComponentModel(X1),e.registerComponentView(o0),BX(e)}function u0(e){bw(Y1),bw(l0)}var d0={get:function(e,t,n){var r=P((f0[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},f0={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},p0=nR.mapVisual,m0=nR.eachVisual,h0=B,g0=L,_0=ls,v0=as,y0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&OQ(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=z(e,this),this.controllerVisuals=DQ(this.option.controller,t,e),this.targetVisuals=DQ(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,t=this.option.seriesIndex;t==null&&e==null&&(t=`all`);var n=fc(this.ecModel,`series`,{index:t,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return R(n,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){L(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(H(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(V(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=_0([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(t!=null)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var i=n[r],a=e.getDimensionInfo(i);if(!a.isCalculationCoord)return a.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};nt(r,n),nt(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){h0(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},g0(r,function(e,t){if(nR.isValidType(t)){var n=d0.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;g0(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??=t&&P(t)||(a?i:[i]),c.symbolSize??=n&&P(n)||(a?s[0]:[s[0],s[0]]),c.symbol=p0(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;m0(l,function(e){e>u&&(u=e)}),c.symbolSize=p0(l,function(e){return v0(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(e_),b0=[20,140],x0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=b0[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=b0[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=ls((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent(),r=W(this.option.unboundedRange,!0);return(r&&t[0]<=n[0]||t[0]<=e)&&(r&&t[1]>=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=S0(this,`outOfRange`,this.getExtent()),n=S0(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;o<c&&(!n.length||t[o]<=n[0]);o++)t[o]<n[a]&&i(t[o],`outOfRange`);for(var l=1;a<s;a++,l=0)l&&r.length&&i(n[a],`outOfRange`),i(n[a],`inRange`);for(var l=1;o<c;o++)(!n.length||n[n.length-1]<t[o])&&(l&&=(r.length&&i(r[r.length-1].value,`outOfRange`),0),i(t[o],`outOfRange`));var u=r.length;return{stops:r,outerColors:[u?r[0].color:`transparent`,u?r[u-1].color:`transparent`]}},t.type=`visualMap.continuous`,t.defaultOption=mh(y0.defaultOption,{align:`auto`,calculable:!1,hoverLink:!0,realtime:!0,handleIcon:`path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z`,handleSize:`120%`,handleStyle:{borderColor:Q.color.neutral00,borderWidth:1},indicatorIcon:`circle`,indicatorSize:`50%`,indicatorStyle:{borderColor:Q.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Q.color.shadow}}),t}(y0);function S0(e,t,n){if(n[0]===n[1])return n.slice();for(var r=200,i=(n[1]-n[0])/r,a=n[0],o=[],s=0;s<=r&&a<n[1];s++)o.push(a),a+=i;return o.push(n[1]),o}var C0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){if(this.visualMapModel=e,e.get(`show`)===!1){this.group.removeAll();return}this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=mg(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new Lu({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return L(nR.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),nR.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=Kg(t,n).refContainer;qg(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(Eb),w0=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function T0(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=w0[o],c=[0,null,10],l={},u=0;u<3;u++)l[w0[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=Ug(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function E0(e,t){return L(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}var D0=as,O0=L,k0=Math.min,A0=Math.max,j0=12,M0=6,N0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=z(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=z(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){(!r||r.type!==`selectDataRange`||r.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get(`orient`),this._useHandle=e.get(`calculable`),this._resetInterval(),this._renderBar(t);var n=e.get(`text`);this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=r==null?``:r+``;var i=this.visualMapModel,a=i.get(`textGap`),o=i.itemSize,s=this._shapes.mainGroup,c=this._applyTransform([o[0]/2,n===0?-a:o[1]+a],s),l=this._applyTransform(n===0?`bottom`:`top`,s),u=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Hu({style:Bm(d,{x:c[0],y:c[1],verticalAlign:d.get(`verticalAlign`)||(u===`horizontal`?`middle`:l),align:d.get(`align`)||(u===`horizontal`?l:`center`),text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,a=this._useHandle,o=T0(t,this.api,r),s=n.mainGroup=this._createBarGroup(o),c=new Y;s.add(c),c.add(n.outOfRange=P0()),c.add(n.inRange=P0(null,a?L0(this._orient):null,z(this._dragHandle,this,`all`,!1),z(this._dragHandle,this,`all`,!0))),c.setClipPath(new Lu({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var l=t.textStyleModel.getTextRect(`国`),u=A0(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,u,i),this._createHandle(t,s,1,r,u,i)),this._createIndicator(t,s,r,u,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,a){var o=z(this._dragHandle,this,n,!1),s=z(this._dragHandle,this,n,!0),c=Do(e.get(`handleSize`),r[0]),l=Bx(e.get(`handleIcon`),-c/2,-c/2,c,c,null,!0),u=L0(this._orient);l.attr({cursor:u,draggable:!0,drift:o,ondragend:s,onmousemove:function(e){Pn(e.event)}}),l.x=r[0]/2,l.useStyle(e.getModel(`handleStyle`).getItemStyle()),l.setStyle({strokeNoScale:!0,strokeFirst:!0}),l.style.lineWidth*=2,l.ensureState(`emphasis`).style=e.getModel([`emphasis`,`handleStyle`]).getItemStyle(),af(l,!0),t.add(l);var d=this.visualMapModel.textStyleModel,f=new Hu({cursor:u,draggable:!0,drift:o,onmousemove:function(e){Pn(e.event)},ondragend:s,style:Bm(d,{x:0,y:0,text:``})});f.ensureState(`blur`).style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var p=[c,0],m=this._shapes;m.handleThumbs[n]=l,m.handleLabelPoints[n]=p,m.handleLabels[n]=f},t.prototype._createIndicator=function(e,t,n,r,i){var a=Do(e.get(`indicatorSize`),n[0]),o=Bx(e.get(`indicatorIcon`),-a/2,-a/2,a,a,null,!0);o.attr({cursor:`move`,invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel(`indicatorStyle`).getItemStyle();if(o instanceof ku){var c=o.style;o.useStyle(F({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},s))}else o.useStyle(s);t.add(o);var l=this.visualMapModel.textStyleModel,u=new Hu({silent:!0,invisible:!0,style:Bm(l,{x:0,y:0,text:``})});this.group.add(u);var d=[(i===`horizontal`?r/2:M0)+n[0]/2,0],f=this._shapes;f.indicator=o,f.indicatorLabel=u,f.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get(`realtime`)&&this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():I0(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[D0(t[0],n,r,!0),D0(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t||=0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];nV(t,r,i,e,0);var a=n.getExtent();this._dataInterval=[D0(r[0],i,a,!0),D0(r[1],i,a,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],a=e?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,`inRange`),s=this._createBarVisual(n,n,i,`outOfRange`);r.inRange.setStyle({fill:o.barColor}).setShape(`points`,o.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape(`points`,s.barPoints),this._updateHandle(a,o)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},a=this._makeColorGradient(e,i),o=[this.getControllerVisual(e[0],`symbolSize`,i),this.getControllerVisual(e[1],`symbolSize`,i)],s=this._createBarPoints(n,o);return{barColor:new xp(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=100,r=[],i=(e[1]-e[0])/n;r.push({color:this.getControllerVisual(e[0],`color`,t),offset:0});for(var a=1;a<n;a++){var o=e[0]+i*a;if(o>e[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Y(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);O0([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=D0(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=lm(n.handleLabelPoints[l],cm(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=D0(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=lm(c.indicatorLabelPoint,cm(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;C<S.length;C++)this.api.enterBlur(S[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on(`mousemove`,function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=k0(A0(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on(`mouseout`,function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on(`mouseover`,this._hoverLinkFromSeriesMouseOver,this),e.on(`mouseout`,this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i=[0,r[1]],a=n.getExtent();e=k0(A0(i[0],e),i[1]);var o=F0(n,a,i),s=[e-o,e+o],c=D0(e,i,a,!0),l=[D0(s[0],i,a,!0),D0(s[1],i,a,!0)];s[0]<i[0]&&(l[0]=-1/0),s[1]>i[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||I0(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=ic(u,d);this._dispatchHighDown(`downplay`,E0(f[0],n)),this._dispatchHighDown(`highlight`,E0(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(Ax(e.target,function(e){var n=Z(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown(`downplay`,E0(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off(`mouseover`,this._hoverLinkFromSeriesMouseOver),e.off(`mouseout`,this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=cm(t,r?null:this.group);return B(e)?lm(e,i,n):um(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type=`visualMap.continuous`,t}(C0);function P0(e,t,n,r){return new sp({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){Pn(e.event)},ondragend:r})}function F0(e,t,n){var r=j0/2,i=e.get(`hoverLinkDataSize`);return i&&(r=D0(i,t,n,!0)/2),r}function I0(e){return!!(e.get(`hoverLinkOnHandle`)??e.get(`realtime`))}function L0(e){return e===`vertical`?`ns-resize`:`ew-resize`}var R0={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},z0=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},B0=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(AQ(t.stateList,t.targetVisuals,z(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(z(V0,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function V0(e,t,n,r){for(var i=t.targetVisuals[r],a=nR.prepareVisualTypes(i),o={color:Tx(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}var H0=L;function U0(e){var t=e&&e.visualMap;B(t)||(t=t?[t]:[]),H0(t,function(e){if(e){W0(e,`splitList`)&&!W0(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&B(t)&&H0(t,function(e){U(e)&&(W0(e,`start`)&&!W0(e,`min`)&&(e.min=e.start),W0(e,`end`)&&!W0(e,`max`)&&(e.max=e.end))})}})}function W0(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var G0=!1;function K0(e){G0||(G0=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(R0,z0),L(B0,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(U0))}function q0(e){e.registerComponentModel(x0),e.registerComponentView(N0),K0(e)}var J0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],Y0[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=R(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=nR.listVisualTypes(),i=this.isCategory();L(t.pieces,function(e){L(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),L(n,function(e,n){var r=!1;L(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&L(this.stateList,function(e){(t[e]||(t[e]={}))[n]=d0.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,L(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;L(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=nR.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){nR.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return L(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=mh(y0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(y0),Y0={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),Cs(e),L(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;L(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),X0(t,e)},pieces:function(e){var t=this.option;L(t.pieces,function(t,n){U(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=nR.retrieveVisuals(t),e.push(r)},this),X0(t,e),Cs(e),L(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function X0(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var Z0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ct(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),L(o.viewPieceList,function(o){var s=o.piece,u=new Y;u.onclick=z(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Hu({style:Bm(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:W(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),zg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:E0(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return T0(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Y,o=this.visualMapModel.textStyleModel;a.add(new Hu({style:Bm(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=R(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=Bx(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,L(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(C0);function Q0(e){e.registerComponentModel(J0),e.registerComponentView(Z0),K0(e)}function $0(e){bw(q0),bw(Q0)}var e2=function(){function e(e){this._thumbnailModel=e}return e.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},e.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Mm(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},e}(),t2=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.optionUpdated=function(e,t){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new e2(this);this._target=null,this.ecModel.eachSeries(function(e){Qz(e,null)}),this.shouldShow()&&Qz(this.getTarget().baseMapProvider,e)},t.prototype.shouldShow=function(){return this.getShallow(`show`,!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents(`series`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!==`graph`&&(e=null):e=this.ecModel.queryComponents({mainType:`series`,subType:`graph`})[0],this._target={baseMapProvider:e},this._target},t.type=`thumbnail`,t.layoutMode=`box`,t.dependencies=[`series`,`geo`],t.defaultOption={show:!0,right:1,bottom:1,height:`25%`,width:`25%`,itemStyle:{borderColor:Q.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:Q.color.neutral30,borderColor:Q.color.neutral40,opacity:.3},z:10},t}(e_),n2=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this._api=n,this._model=e,this._coordSys||=new _I,!this._isEnabled()){this._clear();return}this._renderVersion=n.getMainProcessVersion();var r=this.group;r.removeAll();var i=e.getModel(`itemStyle`),a=i.getItemStyle();a.fill??=t.get(`backgroundColor`)||Q.color.neutral00;var o=Kg(e,n).refContainer,s=Ug(Bg(e,!0),o),c=a.lineWidth||0,l=this._contentRect=xm(s.clone(),c/2,!0,!0),u=new Y;r.add(u),u.setClipPath(new Lu({shape:l.plain()}));var d=this._targetGroup=new Y;u.add(d);var f=s.plain();f.r=i.getShallow(`borderRadius`,!0),r.add(this._bgRect=new Lu({style:a,shape:f,silent:!1,cursor:`grab`}));var p=e.getModel(`windowStyle`),m=p.getShallow(`borderRadius`,!0);u.add(this._windowRect=new Lu({shape:{x:0,y:0,width:0,height:0,r:m},style:p.getItemStyle(),silent:!1,cursor:`grab`})),this._dealRenderContent(),this._dealUpdateWindow(),i2(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),i2(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=this._targetGroup,n=this._coordSys,r=this._contentRect;if(t.removeAll(),e){var i=e.group,a=i.getBoundingRect();t.add(i),this._bgRect.z2=e.z2Range.min-10,n.setBoundingRect(a.x,a.y,a.width,a.height);var o=Ug({left:`center`,top:`center`,aspect:a.width/a.height},r);n.setViewRect(o.x,o.y,o.width,o.height),i.attr(n.getTransformInfo().raw),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var t=this._bridgeRendered;t&&t.renderVersion===e.renderVersion&&(t.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=qn([],e.targetTrans),n=Un([],this._coordSys.transform,t);this._transThisToTarget=qn([],n);var r=e.viewportRect;r=r?r.clone():new J(0,0,this._api.getWidth(),this._api.getHeight()),r.applyTransform(n);var i=this._windowRect,a=i.shape.r;i.setShape(I({r:a},r))}},t.prototype._resetRoamController=function(e){var t=this,n=this._api,r=this._roamController;if(r||=this._roamController=new VP(n.getZr()),!e||!this._isEnabled()){r.disable();return}r.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(e,n,r){return t._contentRect.contain(n,r)}}}),r.off(`pan`).off(`zoom`).on(`pan`,z(this._onPan,this)).on(`zoom`,z(this._onZoom,this))},t.prototype._onPan=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=rn([],[e.oldX,e.oldY],t),r=rn([],[e.oldX-e.dx,e.oldY-e.dy],t);this._api.dispatchAction(r2(this._model.getTarget().baseMapProvider,{dx:r[0]-n[0],dy:r[1]-n[1]}))}},t.prototype._onZoom=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=rn([],[e.originX,e.originY],t);this._api.dispatchAction(r2(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;return!(!e||!e.shouldShow()||!e.getTarget().baseMapProvider)},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type=`thumbnail`,t}(Eb);function r2(e,t){var n={type:e.mainType===`series`?e.subType+`Roam`:e.mainType+`Roam`};return n[e.mainType+`Id`]=e.id,F(n,t),n}function i2(e,t){var n=jm(e);Nm(t.group,n.z,n.zlevel)}function a2(e){e.registerComponentModel(t2),e.registerComponentView(n2)}var o2={label:{enabled:!0},decal:{show:!1}},s2=oc(),c2={};function l2(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=P(o2);nt(r.label,e.getLocaleModel().get(`aria`),!1),nt(n.option,r,!1),i(),a();function i(){if(n.getModel(`decal`).get(`show`)){var t=G();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),s2(e).scope=n}}),e.eachRawSeries(function(t){if(e.isSeriesFiltered(t))return;if(V(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var r=N_(t.ecModel,t.name,c2,e.getSeriesCount()),i=n.getVisual(`decal`);n.setVisual(`decal`,l(i,r))}else{var a=t.getRawData(),o={},s=s2(t).scope;n.each(function(e){var t=n.getRawIndex(e);o[t]=e});var c=a.count();a.each(function(e){var r=o[e],i=a.getName(e)||e+``,u=N_(t.ecModel,i,s,c),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,l(d,u))})}function l(e,t){var n=e?F(F({},t),e):t;return n.dirty=!0,n}})}}function a(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=I(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var l=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(l,d),p;if(!(l<1)){var m=s();p=m?o(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=l>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=o(g,{seriesCount:l}),e.eachSeries(function(e,t){if(t<f){var n=void 0,r=e.get(`name`)?`withName`:`withoutName`;n=l>1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=o(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:c(e.subType)});var i=e.getData();if(i.count()>u){var s=a.get([`data`,`partialData`]);n+=o(s,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_<i.count();_++)if(_<u){var v=i.getName(_),y=m?lt(i.getValues(_),function(e,t){return it(m,t)===-1}):i.getValues(_),b=a.get([`data`,v?`withName`:`withoutName`]);g.push(o(b,{name:v,value:y.join(d)}))}n+=g.join(d)+p,h.push(n)}});var _=a.getModel([`series`,`multiple`,`separator`]),v=_.get(`middle`),y=_.get(`end`);p+=h.join(v)+y,r.setAttribute(`aria-label`,p)}}}}function o(e,t){if(!H(e))return e;var n=e;return L(t,function(e,t){n=n.replace(RegExp(`\\{\\s*`+t+`\\s*\\}`,`g`),e)}),n}function s(){var t=e.get(`title`);return t&&t.length&&(t=t[0]),t&&t.text}function c(t){var n=e.getLocaleModel().get([`series`,`typeNames`]);return n[t]||n.chart}}function u2(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},L([`description`,`general`,`series`,`data`],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function d2(e){e.registerPreprocessor(u2),e.registerVisual(e.PRIORITY.VISUAL.ARIA,l2)}var f2={value:`eq`,"<":`lt`,"<=":`lte`,">":`gt`,">=":`gte`,"=":`eq`,"!=":`ne`,"<>":`ne`},p2=function(){function e(e){(this._condVal=H(e)?new RegExp(e):xt(e)?e:null)??Ps(``)}return e.prototype.evaluate=function(e){var t=typeof e;return H(t)?this._condVal.test(e):ht(t)?this._condVal.test(e+``):!1},e}(),m2=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),h2=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},e}(),g2=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},e}(),_2=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),v2=function(){function e(){}return e.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),r=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?r:n))return!1;return!0},e}();function y2(e,t){if(e===!0||e===!1){var n=new m2;return n.value=e,n}return C2(e)||Ps(``),e.and?b2(`and`,e,t):e.or?b2(`or`,e,t):e.not?x2(e,t):S2(e,t)}function b2(e,t,n){var r=t[e],i=``;B(r)||Ps(i),r.length||Ps(i);var a=e===`and`?new h2:new g2;return a.children=R(r,function(e){return y2(e,n)}),a.children.length||Ps(i),a}function x2(e,t){var n=e.not,r=``;C2(n)||Ps(r);var i=new _2;return i.child=y2(n,t),i.child||Ps(r),i}function S2(e,t){for(var n=``,r=t.prepareGetValue(e),i=[],a=dt(e),o=e.parser,s=o?fy(o):null,c=0;c<a.length;c++){var l=a[c];if(!(l===`parser`||t.valueGetterAttrMap.get(l))){var u=K(f2,l)?f2[l]:l,d=e[l],f=s?s(d):d,p=_y(u,f)||u===`reg`&&new p2(f);p||Ps(n),i.push(p)}}i.length||Ps(n);var m=new v2;return m.valueGetterParam=r,m.valueParser=s,m.getValue=t.getValue,m.subCondList=i,m}function C2(e){return U(e)&&!st(e)}var w2=function(){function e(e,t){this._cond=y2(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function T2(e,t){return new w2(e,t)}var E2={type:`echarts:filter`,transform:function(e){for(var t=e.upstream,n,r=T2(e.config,{valueGetterAttrMap:G({dimension:!0}),prepareGetValue:function(e){var n=``,r=e.dimension;K(e,`dimension`)||Ps(n);var i=t.getDimensionInfo(r);return i||Ps(n),{dimIdx:i.index}},getValue:function(e){return t.retrieveValueFromItem(n,e.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)n=t.getRawDataItem(a),r.evaluate()&&i.push(n);return{data:i}}},D2={type:`echarts:sort`,transform:function(e){var t=e.upstream,n=e.config,r=``,i=Rs(n);i.length||Ps(r);var a=[];L(i,function(e){var n=e.dimension,i=e.order,o=e.parser,s=e.incomparable;n??Ps(r),i!==`asc`&&i!==`desc`&&Ps(r),s&&s!==`min`&&s!==`max`&&Ps(``),i!==`asc`&&i!==`desc`&&Ps(``);var c=t.getDimensionInfo(n);c||Ps(r);var l=o?fy(o):null;o&&!l&&Ps(r),a.push({dimIdx:c.index,parser:l,comparator:new hy(i,s)})});var o=t.sourceFormat;o!==`arrayRows`&&o!==`objectRows`&&Ps(r);for(var s=[],c=0,l=t.count();c<l;c++)s.push(t.getRawDataItem(c));return s.sort(function(e,n){for(var r=0;r<a.length;r++){var i=a[r],o=t.retrieveValueFromItem(e,i.dimIdx),s=t.retrieveValueFromItem(n,i.dimIdx);i.parser&&(o=i.parser(o),s=i.parser(s));var c=i.comparator.evaluate(o,s);if(c!==0)return c}return 0}),{data:s}}};function O2(e){e.registerTransform(E2),e.registerTransform(D2)}var k2=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new Vy(this),Hy(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Hy(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type=`dataset`,t.defaultOption={seriesLayoutBy:__},t}(e_),A2=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.type=`dataset`,t}(Eb);function j2(e){e.registerComponentModel(k2),e.registerComponentView(A2)}var M2=Ql.CMD;function N2(e,t){return Math.abs(e-t)<1e-5}function P2(e){var t=e.data,n=e.len(),r=[],i,a=0,o=0,s=0,c=0;function l(e,t){i&&i.length>2&&r.push(i),i=[e,t]}function u(e,t,n,r){N2(e,n)&&N2(t,r)||i.push(e,t,n,r,n,r)}function d(e,t,n,r,a,o){var s=Math.abs(t-e),c=Math.tan(s/4)*4/3,l=t<e?-1:1,u=Math.cos(e),d=Math.sin(e),f=Math.cos(t),p=Math.sin(t),m=u*a+n,h=d*o+r,g=f*a+n,_=p*o+r,v=a*c*l,y=o*c*l;i.push(m-v*d,h+y*u,g+v*p,_-y*f,g,_)}for(var f,p,m,h,g=0;g<n;){var _=t[g++],v=g===1;switch(v&&(a=t[g],o=t[g+1],s=a,c=o,(_===M2.L||_===M2.C||_===M2.Q)&&(i=[s,c])),_){case M2.M:a=s=t[g++],o=c=t[g++],l(s,c);break;case M2.L:f=t[g++],p=t[g++],u(a,o,f,p),a=f,o=p;break;case M2.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case M2.Q:f=t[g++],p=t[g++],m=t[g++],h=t[g++],i.push(a+2/3*(f-a),o+2/3*(p-o),m+2/3*(f-m),h+2/3*(p-h),m,h),a=m,o=h;break;case M2.A:var y=t[g++],b=t[g++],x=t[g++],S=t[g++],C=t[g++],w=t[g++]+C;g+=1;var T=!t[g++];f=Math.cos(C)*x+y,p=Math.sin(C)*S+b,v?(s=f,c=p,l(s,c)):u(a,o,f,p),a=Math.cos(w)*x+y,o=Math.sin(w)*S+b;for(var E=(T?-1:1)*Math.PI/2,D=C;T?D>w:D<w;D+=E){var O=T?Math.max(D+E,w):Math.min(D+E,w);d(D,O,y,b,x,S)}break;case M2.R:s=a=t[g++],c=o=t[g++],f=s+t[g++],p=c+t[g++],l(f,c),u(f,c,f,p),u(f,p,s,p),u(s,p,s,c),u(s,c,f,c);break;case M2.Z:i&&u(a,o,s,c),a=s,o=c;break}}return i&&i.length>2&&r.push(i),r}function F2(e,t,n,r,i,a,o,s,c,l){if(N2(e,n)&&N2(t,r)&&N2(i,o)&&N2(a,s)){c.push(o,s);return}var u=2/l,d=u*u,f=o-e,p=s-t,m=Math.sqrt(f*f+p*p);f/=m,p/=m;var h=n-e,g=r-t,_=i-o,v=a-s,y=h*h+g*g,b=_*_+v*v;if(y<d&&b<d){c.push(o,s);return}var x=f*h+p*g,S=-f*_-p*v,C=y-x*x,w=b-S*S;if(C<d&&x>=0&&w<d&&S>=0){c.push(o,s);return}var T=[],E=[];ei(e,n,i,o,.5,T),ei(t,r,a,s,.5,E),F2(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),F2(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function I2(e,t){var n=P2(e),r=[];t||=1;for(var i=0;i<n.length;i++){var a=n[i],o=[],s=a[0],c=a[1];o.push(s,c);for(var l=2;l<a.length;){var u=a[l++],d=a[l++],f=a[l++],p=a[l++],m=a[l++],h=a[l++];F2(s,c,u,d,f,p,m,h,o,t),s=m,c=h}r.push(o)}return r}function L2(e,t,n){var r=e[t],i=e[1-t],a=Math.abs(r/i),o=Math.ceil(Math.sqrt(a*n)),s=Math.floor(n/o);s===0&&(s=1,o=n);for(var c=[],l=0;l<o;l++)c.push(s);var u=n-o*s;if(u>0)for(var l=0;l<u;l++)c[l%o]+=1;return c}function R2(e,t,n){for(var r=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),c=s*i,l=i-r,u=c>Math.abs(l),d=L2([c,l],+!u,t),f=(u?s:l)/d.length,p=0;p<d.length;p++)for(var m=(u?l:s)/d[p],h=0;h<d[p];h++){var g={};u?(g.startAngle=a+f*p,g.endAngle=a+f*(p+1),g.r0=r+m*h,g.r=r+m*(h+1)):(g.startAngle=a+m*h,g.endAngle=a+m*(h+1),g.r0=r+f*p,g.r=r+f*(p+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,n.push(g)}}function z2(e,t,n){for(var r=e.width,i=e.height,a=r>i,o=L2([r,i],+!a,t),s=a?`width`:`height`,c=a?`height`:`width`,l=a?`x`:`y`,u=a?`y`:`x`,d=e[s]/o.length,f=0;f<o.length;f++)for(var p=e[c]/o[f],m=0;m<o[f];m++){var h={};h[l]=f*d,h[u]=m*p,h[s]=d,h[c]=p,h.x+=e.x,h.y+=e.y,n.push(h)}}function B2(e,t,n,r){return e*r-n*t}function V2(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=B2(u,d,c,l);if(Math.abs(f)<1e-6)return null;var p=B2(e-i,t-a,u,d)/f;return p<0||p>1?null:new q(p*c+e,p*l+t)}function H2(e,t,n){var r=new q;q.sub(r,n,t),r.normalize();var i=new q;return q.sub(i,e,t),i.dot(r)}function U2(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function W2(e,t,n){for(var r=e.length,i=[],a=0;a<r;a++){var o=e[a],s=e[(a+1)%r],c=V2(o[0],o[1],s[0],s[1],t.x,t.y,n.x,n.y);c&&i.push({projPt:H2(c,t,n),pt:c,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(e,t){return e.projPt-t.projPt});var l=i[0],u=i[i.length-1];if(u.idx<l.idx){var d=l;l=u,u=d}for(var f=[l.pt.x,l.pt.y],p=[u.pt.x,u.pt.y],m=[f],h=[p],a=l.idx+1;a<=u.idx;a++)U2(m,e[a].slice());U2(m,p),U2(m,f);for(var a=u.idx+1;a<=l.idx+r;a++)U2(h,e[a%r].slice());return U2(h,f),U2(h,p),[{points:m},{points:h}]}function G2(e){var t=e.points,n=[],r=[];Dl(t,n,r);var i=new J(n[0],n[1],r[0]-n[0],r[1]-n[1]),a=i.width,o=i.height,s=i.x,c=i.y,l=new q,u=new q;return a>o?(l.x=u.x=s+a/2,l.y=c,u.y=c+o):(l.y=u.y=c+o/2,l.x=s,u.x=s+a),W2(t,l,u)}function K2(e,t,n,r){if(n===1)r.push(t);else{var i=Math.floor(n/2),a=e(t);K2(e,a[0],i,r),K2(e,a[1],n-i,r)}return r}function q2(e,t){for(var n=[],r=0;r<t;r++)n.push(Pf(e));return n}function J2(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function Y2(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}function X2(e,t){var n=[],r=e.shape,i;switch(e.type){case`rect`:z2(r,t,n),i=Lu;break;case`sector`:R2(r,t,n),i=tp;break;case`circle`:R2({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},t,n),i=tp;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=R(I2(e.getUpdatedPathProxy(),o),function(e){return Y2(e)}),c=s.length;if(c===0)K2(G2,{points:s[0]},t,n);else if(c===t)for(var l=0;l<c;l++)n.push({points:s[l]});else{var u=0,d=R(s,function(e){var t=[],n=[];Dl(e,t,n);var r=(n[1]-t[1])*(n[0]-t[0]);return u+=r,{poly:e,area:r}});d.sort(function(e,t){return t.area-e.area});for(var f=t,l=0;l<c;l++){var p=d[l];if(f<=0)break;var m=l===c-1?f:Math.ceil(p.area/u*t);m<0||(K2(G2,{points:p.poly},m,n),f-=m)}}i=sp;break}if(!i)return q2(e,t);for(var h=[],l=0;l<n.length;l++){var g=new i;g.setShape(n[l]),J2(e,g),h.push(g)}return h}function Z2(e,t){var n=e.length,r=t.length;if(n===r)return[e,t];for(var i=[],a=[],o=n<r?e:t,s=Math.min(n,r),c=Math.abs(r-n)/6,l=(s-2)/6,u=Math.ceil(c/l)+1,d=[o[0],o[1]],f=c,p=2;p<s;){var m=o[p-2],h=o[p-1],g=o[p++],_=o[p++],v=o[p++],y=o[p++],b=o[p++],x=o[p++];if(f<=0){d.push(g,_,v,y,b,x);continue}for(var S=Math.min(f,u-1)+1,C=1;C<=S;C++){var w=C/S;ei(m,g,v,b,w,i),ei(h,_,y,x,w,a),m=i[3],h=a[3],d.push(i[1],a[1],i[2],a[2],m,h),g=i[5],_=a[5],v=i[6],y=a[6]}f-=S-1}return o===e?[d,t]:[e,d]}function Q2(e,t){for(var n=e.length,r=e[n-2],i=e[n-1],a=[],o=0;o<t.length;)a[o++]=r,a[o++]=i;return a}function $2(e,t){for(var n,r,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var c=e[s],l=t[s],u=void 0,d=void 0;c?l?(n=Z2(c,l),u=n[0],d=n[1],r=u,i=d):(d=Q2(i||c,c),u=c):(u=Q2(r||l,l),d=l),a.push(u),o.push(d)}return[a,o]}function e4(e){for(var t=0,n=0,r=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],c=e[o+1],l=e[a],u=e[a+1],d=s*u-l*c;t+=d,n+=(s+l)*d,r+=(c+u)*d}return t===0?[e[0]||0,e[1]||0]:[n/t/3,r/t/3,t]}function t4(e,t,n,r){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,c=s-2,l=0;l<i;l++){for(var u=l*6,d=0,f=0;f<s;f+=2){var p=f===0?u:(u+f-2)%c+2,m=e[p]-n[0],h=e[p+1]-n[1],g=t[f]-r[0],_=t[f+1]-r[1],v=g-m,y=_-h;d+=v*v+y*y}d<a&&(a=d,o=l)}return o}function n4(e){for(var t=[],n=e.length,r=0;r<n;r+=2)t[r]=e[n-r-2],t[r+1]=e[n-r-1];return t}function r4(e,t,n,r){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],c=t[o],l=e4(s),u=e4(c);a??=l[2]<0!=u[2]<0;var d=[],f=[],p=0,m=1/0,h=[],g=s.length;a&&(s=n4(s));for(var _=t4(s,c,l,u)*6,v=g-2,y=0;y<v;y+=2){var b=(_+y)%v+2;d[y+2]=s[b]-l[0],d[y+3]=s[b+1]-l[1]}if(d[0]=s[_]-l[0],d[1]=s[_+1]-l[1],n>0)for(var x=r/n,S=-r/2;S<=r/2;S+=x){for(var C=Math.sin(S),w=Math.cos(S),T=0,y=0;y<s.length;y+=2){var E=d[y],D=d[y+1],O=c[y]-u[0],k=c[y+1]-u[1],A=O*w-k*C,j=O*C+k*w;h[y]=A,h[y+1]=j;var ee=A-E,te=j-D;T+=ee*ee+te*te}if(T<m){m=T,p=S;for(var M=0;M<h.length;M++)f[M]=h[M]}}else for(var ne=0;ne<g;ne+=2)f[ne]=c[ne]-u[0],f[ne+1]=c[ne+1]-u[1];i.push({from:d,to:f,fromCp:l,toCp:u,rotation:-p})}return i}function i4(e){return e.__isCombineMorphing}var a4=`__mOriginal_`;function o4(e,t,n){var r=a4+t,i=e[r]||e[t];e[r]||(e[r]=e[t]);var a=n.replace,o=n.after,s=n.before;e[t]=function(){var e=arguments,t;return s&&s.apply(this,e),t=a?a.apply(this,e):i.apply(this,e),o&&o.apply(this,e),t}}function s4(e,t){var n=a4+t;e[n]&&(e[t]=e[n],e[n]=null)}function c4(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;){var a=r[i],o=r[i+1];r[i++]=t[0]*a+t[2]*o+t[4],r[i++]=t[1]*a+t[3]*o+t[5]}}function l4(e,t){var n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),i=$2(P2(n),P2(r)),a=i[0],o=i[1],s=e.getComputedTransform(),c=t.getComputedTransform();function l(){this.transform=null}s&&c4(a,s),c&&c4(o,c),o4(t,`updateTransform`,{replace:l}),t.transform=null;var u=r4(a,o,10,Math.PI),d=[];o4(t,`buildPath`,{replace:function(e){for(var n=t.__morphT,r=1-n,i=[],a=0;a<u.length;a++){var o=u[a],s=o.from,c=o.to,l=o.rotation*n,f=o.fromCp,p=o.toCp,m=Math.sin(l),h=Math.cos(l);nn(i,f,p,n);for(var g=0;g<s.length;g+=2){var _=s[g],v=s[g+1],y=c[g],b=c[g+1],x=_*r+y*n,S=v*r+b*n;d[g]=x*h-S*m+i[0],d[g+1]=x*m+S*h+i[1]}var C=d[0],w=d[1];e.moveTo(C,w);for(var g=2;g<s.length;){var y=d[g++],b=d[g++],T=d[g++],E=d[g++],D=d[g++],O=d[g++];C===y&&w===b&&T===D&&E===O?e.lineTo(D,O):e.bezierCurveTo(y,b,T,E,D,O),C=D,w=O}}}})}function u4(e,t,n){if(!e||!t)return t;var r=n.done,i=n.during;l4(e,t),t.__morphT=0;function a(){s4(t,`buildPath`),s4(t,`updateTransform`),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},I({during:function(e){t.dirtyShape(),i&&i(e)},done:function(){a(),r&&r()}},n)),t}function d4(e,t,n,r,i,a){var o=16;e=i===n?0:Math.round(32767*(e-n)/(i-n)),t=a===r?0:Math.round(32767*(t-r)/(a-r));for(var s=0,c,l=(1<<o)/2;l>0;l/=2){var u=0,d=0;(e&l)>0&&(u=1),(t&l)>0&&(d=1),s+=l*l*(3*u^d),d===0&&(u===1&&(e=l-1-e,t=l-1-t),c=e,e=t,t=c)}return s}function f4(e){var t=1/0,n=1/0,r=-1/0,i=-1/0;return R(R(e,function(e){var a=e.getBoundingRect(),o=e.getComputedTransform(),s=a.x+a.width/2+(o?o[4]:0),c=a.y+a.height/2+(o?o[5]:0);return t=Math.min(s,t),n=Math.min(c,n),r=Math.max(s,r),i=Math.max(c,i),[s,c]}),function(a,o){return{cp:a,z:d4(a[0],a[1],t,n,r,i),path:e[o]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function p4(e){return X2(e.path,e.count)}function m4(){return{fromIndividuals:[],toIndividuals:[],count:0}}function h4(e,t,n){var r=[];function i(e){for(var t=0;t<e.length;t++){var n=e[t];i4(n)?i(n.childrenRef()):n instanceof Cu&&r.push(n)}}i(e);var a=r.length;if(!a)return m4();var o=(n.dividePath||p4)({path:t,count:a});if(o.length!==a)return console.error(`Invalid morphing: unmatched splitted path`),m4();r=f4(r),o=f4(o);for(var s=n.done,c=n.during,l=n.individualDelay,u=new fo,d=0;d<a;d++){var f=r[d],p=o[d];p.parent=t,p.copyTransform(u),l||l4(f,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return o};function m(e){for(var t=0;t<o.length;t++)o[t].addSelfToZr(e)}o4(t,`addSelfToZr`,{after:function(e){m(e)}}),o4(t,`removeSelfFromZr`,{after:function(e){for(var t=0;t<o.length;t++)o[t].removeSelfFromZr(e)}});function h(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,s4(t,`addSelfToZr`),s4(t,`removeSelfFromZr`)}var g=o.length;if(l)for(var _=g,v=function(){_--,_===0&&(h(),s&&s())},d=0;d<g;d++){var y=l?I({delay:(n.delay||0)+l(d,g,r[d],o[d]),done:v},n):n;u4(r[d],o[d],y)}else t.__morphT=0,t.animateTo({__morphT:1},I({during:function(e){for(var n=0;n<g;n++){var r=o[n];r.__morphT=t.__morphT,r.dirtyShape()}c&&c(e)},done:function(){h();for(var t=0;t<e.length;t++)s4(e[t],`updateTransform`);s&&s()}},n));return t.__zr&&m(t.__zr),{fromIndividuals:r,toIndividuals:o,count:g}}function g4(e,t,n){var r=t.length,i=[],a=n.dividePath||p4;function o(e){for(var t=0;t<e.length;t++){var n=e[t];i4(n)?o(n.childrenRef()):n instanceof Cu&&i.push(n)}}if(i4(e)){o(e.childrenRef());var s=i.length;if(s<r)for(var c=0,l=s;l<r;l++)i.push(Pf(i[c++%s]));i.length=r}else{i=a({path:e,count:r});for(var u=e.getComputedTransform(),l=0;l<i.length;l++)i[l].setLocalTransform(u);if(i.length!==r)return console.error(`Invalid morphing: unmatched splitted path`),m4()}i=f4(i),t=f4(t);for(var d=n.individualDelay,l=0;l<r;l++){var f=d?I({delay:(n.delay||0)+d(l,r,i[l],t[l])},n):n;u4(i[l],t[l],f)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function _4(e){return B(e[0])}function v4(e,t){for(var n=[],r=e.length,i=0;i<r;i++)n.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)n[o%r].many.push(t[i][o])}for(var s=0,i=r-1;i>=0;i--)if(!n[i].many.length){var c=n[s].many;if(c.length<=1)if(s)s=0;else return n;var a=c.length,l=Math.ceil(a/2);n[i].many=c.slice(l,a),n[s].many=c.slice(0,l),s++}return n}var y4={clone:function(e){for(var t=[],n=1-(1-e.path.style.opacity)**(1/e.count),r=0;r<e.count;r++){var i=Pf(e.path);i.setStyle(`opacity`,n),t.push(i)}return t},split:null};function b4(e,t,n,r,i,a){if(!e.length||!t.length)return;var o=Fp(`update`,r,i);if(!(o&&o.duration>0))return;var s=r.getModel(`universalTransition`).get(`delay`),c=Object.assign({setToFinal:!0},o),l,u;_4(e)&&(l=e,u=t),_4(t)&&(l=t,u=e);function d(e,t,r,i,o){var l=e.many,u=e.one;if(l.length===1&&!o){var f=t?l[0]:u,p=t?u:l[0];if(i4(f))d({many:[f],one:p},!0,r,i,!0);else{var m=s?I({delay:s(r,i)},c):c;u4(f,p,m),a(f,p,f,p,m)}}else for(var h=I({dividePath:y4[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),g=t?h4(l,u,h):g4(u,l,h),_=g.fromIndividuals,v=g.toIndividuals,y=_.length,b=0;b<y;b++){var m=s?I({delay:s(b,y)},c):c;a(_[b],v[b],t?l[b]:e.one,t?e.one:l[b],m)}}for(var f=l?l===e:e.length>t.length,p=l?v4(u,l):v4(f?t:e,[f?e:t]),m=0,h=0;h<p.length;h++)m+=p[h].many.length;for(var g=0,h=0;h<p.length;h++)d(p[h],f,g,m),g+=p[h].many.length}function x4(e){if(!e)return[];if(B(e)){for(var t=[],n=0;n<e.length;n++)t.push(x4(e[n]));return t}var r=[];return e.traverse(function(e){e instanceof Cu&&!e.disableMorphing&&!e.invisible&&!e.ignore&&r.push(e)}),r}var S4=1e4,C4=0,w4=1,T4=2,E4=oc();function D4(e,t){for(var n=e.dimensions,r=0;r<n.length;r++){var i=e.getDimensionInfo(n[r]);if(i&&i.otherDims[t]===0)return n[r]}}function O4(e,t,n){var r=e.getDimensionInfo(n),i=r&&r.ordinalMeta;if(r){var a=e.get(r.name,t);return i&&i.categories[a]||a+``}}function k4(e,t,n,r){var i=D4(e,r?`itemChildGroupId`:`itemGroupId`);if(i)return O4(e,t,i);var a=e.getRawDataItem(t),o=r?`childGroupId`:`groupId`;if(a&&a[o])return a[o]+``;if(!r)return n||e.getId(t)}function A4(e){var t=[];return L(e,function(e){var n=e.data,r=e.dataGroupId;if(!(n.count()>S4))for(var i=n.getIndices(),a=0;a<i.length;a++)t.push({data:n,groupId:k4(n,a,r,!1),childGroupId:k4(n,a,r,!0),divide:e.divide,dataIndex:a})}),t}function j4(e,t,n){e.traverse(function(e){e instanceof Cu&&Rp(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function M4(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function N4(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function P4(e,t,n){var r=Fp(`update`,n,t);r&&e.traverse(function(e){if(e instanceof hl){var t=Wp(e);t&&e.animateFrom({style:t},r)}})}function F4(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++){var i=e[r],a=t[r];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function I4(e,t,n){var r=A4(e),i=A4(t);function a(e,t,n,r,i){(n||e)&&t.animateFrom({style:n&&n!==e?F(F({},n.style),e.style):e.style},i)}var o=!1,s=C4,c=G(),l=G();r.forEach(function(e){e.groupId&&c.set(e.groupId,!0),e.childGroupId&&l.set(e.childGroupId,!0)});for(var u=0;u<i.length;u++){var d=i[u].groupId;if(l.get(d)){s=w4;break}var f=i[u].childGroupId;if(f&&c.get(f)){s=T4;break}}function p(e,t){return function(n){var r=n.data,i=n.dataIndex;return t?r.getId(i):e?s===w4?n.childGroupId:n.groupId:s===T4?n.childGroupId:n.groupId}}var m=F4(r,i),h={};if(!m)for(var u=0;u<i.length;u++){var g=i[u],_=g.data.getItemGraphicEl(g.dataIndex);_&&(h[_.id]=!0)}function v(e,t){var n=r[t],s=i[e],c=s.data.hostModel,l=n.data.getItemGraphicEl(n.dataIndex),u=s.data.getItemGraphicEl(s.dataIndex);if(l===u){u&&P4(u,s.dataIndex,c);return}l&&h[l.id]||u&&(N4(u),l?(N4(l),M4(l),o=!0,b4(x4(l),x4(u),s.divide,c,e,a)):j4(u,c,e))}new Cw(r,i,p(!0,m),p(!1,m),null,`multiple`).update(v).updateManyToOne(function(e,t){var n=i[e],s=n.data,c=s.hostModel,l=s.getItemGraphicEl(n.dataIndex),u=lt(R(t,function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)}),function(e){return e&&e!==l&&!h[e.id]});l&&(N4(l),u.length?(L(u,function(e){N4(e),M4(e)}),o=!0,b4(x4(u),x4(l),n.divide,c,e,a)):j4(l,c,n.dataIndex))}).updateOneToMany(function(e,t){var n=r[t],s=n.data.getItemGraphicEl(n.dataIndex);if(!(s&&h[s.id])){var c=lt(R(e,function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)}),function(e){return e&&e!==s}),l=i[e[0]].data.hostModel;c.length&&(L(c,function(e){return N4(e)}),s?(N4(s),M4(s),o=!0,b4(x4(s),x4(c),n.divide,l,e[0],a)):L(c,function(t){return j4(t,l,e[0])}))}}).updateManyToMany(function(e,t){new Cw(t,e,function(e){return r[e].data.getId(r[e].dataIndex)},function(e){return i[e].data.getId(i[e].dataIndex)}).update(function(n,r){v(e[n],t[r])}).execute()}).execute(),o&&L(t,function(e){var t=e.data.hostModel,r=t&&n.getViewOfSeriesModel(t),i=Fp(`update`,t,0);r&&t.isAnimationEnabled()&&i&&i.duration>0&&r.group.traverse(function(e){e instanceof Cu&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function L4(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function R4(e){return B(e)?e.sort().join(`,`):e}function z4(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function B4(e,t){var n=G(),r=G(),i=G();return L(e.oldSeries,function(t,n){var a=e.oldDataGroupIds[n],o=e.oldData[n],s=L4(t),c=R4(s);r.set(c,{dataGroupId:a,data:o}),B(s)&&L(s,function(e){i.set(e,{key:c,dataGroupId:a,data:o})})}),L(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get(`dataGroupId`),a=e.getData(),o=L4(e),s=R4(o),c=r.get(s);if(c)n.set(s,{oldSeries:[{dataGroupId:c.dataGroupId,divide:z4(c.data),data:c.data}],newSeries:[{dataGroupId:t,divide:z4(a),data:a}]});else if(B(o)){var l=[];L(o,function(e){var t=r.get(e);t.data&&l.push({dataGroupId:t.dataGroupId,divide:z4(t.data),data:t.data})}),l.length&&n.set(s,{oldSeries:l,newSeries:[{dataGroupId:t,data:a,divide:z4(a)}]})}else{var u=i.get(o);if(u){var d=n.get(u.key);d||(d={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:z4(u.data)}],newSeries:[]},n.set(u.key,d)),d.newSeries.push({dataGroupId:t,data:a,divide:z4(a)})}}}}),n}function V4(e,t){for(var n=0;n<e.length;n++)if(t.seriesIndex!=null&&t.seriesIndex===e[n].seriesIndex||t.seriesId!=null&&t.seriesId===e[n].id)return n}function H4(e,t,n,r){var i=[],a=[];L(Rs(e.from),function(e){var n=V4(t.oldSeries,e);n>=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:z4(t.oldData[n]),groupIdDim:e.dimension})}),L(Rs(e.to),function(e){var r=V4(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:z4(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&I4(i,a,r)}function U4(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){L(Rs(n.seriesTransition),function(e){L(Rs(e.to),function(e){for(var t=n.updatedSeries,r=0;r<t.length;r++)(e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id)&&(t[r][gb]=!0)})})}),e.registerUpdateLifecycle(`series:transition`,function(e,t,n){var r=E4(t);if(r.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(Rs(i),function(e){H4(e,r,n,t)});else{var a=B4(r,n);L(a.keys(),function(e){var n=a.get(e);I4(n.oldSeries,n.newSeries,t)})}L(n.updatedSeries,function(e){e.__universalTransitionEnabled&&(e[gb]=!1)})}for(var o=e.getSeries(),s=r.oldSeries=[],c=r.oldDataGroupIds=[],l=r.oldData=[],u=0;u<o.length;u++){var d=o[u].getData();d.count()<S4&&(s.push(o[u]),c.push(o[u].get(`dataGroupId`)),l.push(d))}})}var W4=function(){function e(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return e.prototype.setBreaks=function(e){this.breaks=e.breaks},e.prototype.update=function(e){J4(this,e);var t=this._elapsedExtent;t[0]=this.elapse(e[0]),t[1]=this.elapse(e[1])},e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(e,t){for(var n=0;n<this.breaks.length;n++){var r=this.breaks[n];if(r.vmin<e&&e<r.vmax)return t(e,r.vmax)}return 0},e.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},e.prototype.normalize=function(e){var t=this._elapsedExtent[1]-this._elapsedExtent[0];return t===0?.5:(this.elapse(e)-this._elapsedExtent[0])/t},e.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},e.prototype.elapse=function(e){for(var t=K4,n=q4,r=!0,i=0;i<this.breaks.length;i++){var a=this.breaks[i];if(e<=a.vmax){e>a.vmin?t+=a.vmin-n+(e-a.vmin)/(a.vmax-a.vmin)*a.gapReal:t+=e-n,n=a.vmax,r=!1;break}t+=a.vmin-n+a.gapReal,n=a.vmax}return r&&(t+=e-n),t},e.prototype.unelapse=function(e){for(var t=K4,n=q4,r=!0,i=0,a=0;a<this.breaks.length;a++){var o=this.breaks[a],s=t+o.vmin-n,c=s+o.gapReal;if(e<=c){i=e>s?o.vmin+(e-s)/(c-s)*(o.vmax-o.vmin):n+e-t,n=o.vmax,r=!1;break}t=c,n=o.vmax}return r&&(i=n+e-t),i},e}();function G4(){return new W4}var K4=0,q4=0;function J4(e,t){var n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};L(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=Z4(e,t);if(o){var s=o.vmin!==e.vmin,c=o.vmax!==e.vmax,l=o.vmax-o.vmin;if(!(s&&c))if(s||c){var u=s?`S`:`E`;a[u][i.type].has=!0,a[u][i.type].span=l,a[u][i.type].inExtFrac=l/(e.vmax-e.vmin),a[u][i.type].val=i.val}else r[i.type].span+=l,r[i.type].val+=i.val}});var o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));L(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:Math.max(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function Y4(e,t,n,r,i,a){e!==`no`&&L(n,function(n){var o=Z4(n,a);if(o)for(var s=t.length-1;s>=0;s--){var c=t[s],l=r(c),u=i*3/4;l>o.vmin-u&&l<o.vmax+u&&(e!==`preserve_extent_bound`||l!==a[0]&&l!==a[1])&&t.splice(s,1)}})}function X4(e,t,n,r){L(t,function(t){var i=Z4(t,n);i&&(e.push({value:i.vmin,break:{type:`vmin`,parsedBreak:i},time:r?r(i):void 0}),e.push({value:i.vmax,break:{type:`vmax`,parsedBreak:i},time:r?r(i):void 0}))}),t.length&&e.sort(function(e,t){return e.value-t.value})}function Z4(e,t){var n=Math.max(e.vmin,t[0]),r=Math.min(e.vmax,t[1]);return n<r||n===r&&n>t[0]&&n<t[1]?{vmin:n,vmax:r,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function Q4(e,t,n){var r=[];if(!e)return{breaks:r};function i(e,t){return e>=0&&e<.99999}L(e,function(e){if(!(!e||e.start==null||e.end==null)&&!e.isExpanded){var a={breakOption:P(e),vmin:t(e.start),vmax:t(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){var o=!1;if(H(e.gap)){var s=Ot(e.gap);if(s.match(/%$/)){var c=parseFloat(s)/100;i(c,`Percent gap`)||(c=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=c,o=!0}}if(!o){var l=t(e.gap);(!isFinite(l)||l<0)&&(l=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=l}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&L([`vmin`,`vmax`],function(e){a[e]<0&&(a[e]=0)}),a.vmin>a.vmax){var u=a.vmax;a.vmax=a.vmin,a.vmin=u}r.push(a)}}),r.sort(function(e,t){return e.vmin-t.vmin});var a=-1/0;return L(r,function(e,t){a>e.vmin&&(r[t]=null),a=e.vmax}),{breaks:r.filter(function(e){return!!e})}}function $4(e,t){return e3(t)===e3(e)}function e3(e){return e.start+`_\0_`+e.end}function t3(e,t,n){var r=[];L(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),L(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=ut(r,function(n){return $4(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return L(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function n3(e,t,n,r){var i,a;if(e.break){var o=e.break.parsedBreak,s=ut(n,function(t){return $4(t.breakOption,e.break.parsedBreak.breakOption)}),c=r(t**+o.vmin,s.vmin),l=r(t**+o.vmax,s.vmax),u={type:o.gapParsed.type,val:o.gapParsed.type===`tpAbs`?cs(t**+(o.vmin+o.gapParsed.val))-c:o.gapParsed.val};i={type:e.break.type,parsedBreak:{breakOption:o.breakOption,vmin:c,vmax:l,gapParsed:u,gapReal:o.gapReal}},a=s[e.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function r3(e,t,n){var r={noNegative:!0},i=Q4(e,n,r),a=Q4(e,n,r),o=Math.log(t);return a.breaks=R(a.breaks,function(e){var t=Math.log(e.vmin)/o;return{vmin:t,vmax:Math.log(e.vmax)/o,gapParsed:{type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?Math.log(e.vmin+e.gapParsed.val)/o-t:e.gapParsed.val},gapReal:e.gapReal,breakOption:e.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var i3={vmin:`start`,vmax:`end`};function a3(e,t){return t&&(e||={},e.break={type:i3[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function o3(){Oh({createScaleBreakContext:G4,pruneTicksByBreak:Y4,addBreaksToTicks:X4,parseAxisBreakOption:Q4,identifyAxisBreak:$4,serializeAxisBreakIdentifier:e3,retrieveAxisBreakPairs:t3,getTicksLogTransformBreak:n3,logarithmicParseBreaksFromOption:r3,makeAxisLabelFormatterParamBreak:a3})}var s3=oc();function c3(e,t){var n=ut(e,function(e){return kh().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function l3(e){L(e,function(e){return e.shouldRemove=!0})}function u3(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function d3(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!kh())return;var o=kh().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1);if(!o.length)return;var s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);var d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new Y({ignoreModelZ:!0}),y=a.isHorizontal(),b=s3(t).visualList||(s3(t).visualList=[]);l3(b);for(var x=function(e){var t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]<r[0]&&r.reverse();var s=c3(b,t);s.shouldRemove=!1;var c=new Y;C(s.zigzagRandomList,c,r[0],r[1],y,t),d&&c.on(`click`,function(){var e={type:NM,breaks:[{start:t.breakOption.start,end:t.breakOption.end}]};e[a.dim+`AxisIndex`]=n.componentIndex,i.dispatchAction(e)}),c.silent=!d,v.add(c)},S=0;S<o.length;S++)x(S);e.add(v),u3(b);function C(e,t,n,i,a,o){var s={stroke:m,lineWidth:h,lineDash:g,fill:`none`},d=+!a,v=1-d,y=r[qp[v]]+r[Jp[v]];function b(e){var t=[],n=[];t[d]=n[d]=e,t[v]=r[qp[v]],n[v]=y;var i={x1:t[0],y1:t[1],x2:n[0],y2:n[1]};return Mu(i,i,{lineWidth:1}),t[0]=i.x1,t[1]=i.y1,t[d]}n=b(n),i=b(i);for(var x=[],S=[],C=!0,w=r[qp[v]],T=0;;T++){var E=w===r[qp[v]],D=w>=y;D&&(w=y);var O=[],k=[];O[d]=n,k[d]=i,!E&&!D&&(O[d]+=C?-c:c,k[d]-=C?c:-c),O[v]=w,k[v]=w,x.push(O),S.push(k);var A=void 0;if(T<e.length?A=e[T]:(A=Math.random(),e.push(A)),w+=A*(u-l)+l,C=!C,D)break}var j=kh().serializeAxisBreakIdentifier(o.breakOption);if(t.add(new lp({anid:`break_a_`+j,shape:{points:x},style:s,z:f})),o.gapReal!==0){t.add(new lp({anid:`break_b_`+j,shape:{points:S},style:s,z:f}));var ee=S.slice();ee.reverse();var te=x.concat(ee);t.add(new sp({anid:`break_c_`+j,shape:{points:te},style:{fill:_,opacity:p.opacity},z:f}))}}}function f3(e,t,n,r){var i=e.axis,a=n.transform;Dt(r.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=R(kh().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1),function(e){var t=e[0].break.parsedBreak,n=[i.dataToCoord(t.vmin,!0),i.dataToCoord(t.vmax,!0)];return n[0]>n[1]&&n.reverse(),{coordPair:n,brkId:kh().serializeAxisBreakIdentifier(t.breakOption)}});s.sort(function(e,t){return e.coordPair[0]-t.coordPair[0]});for(var c=o[0],l=null,u=0;u<s.length;u++){var d=s[u],f=Math.max(d.coordPair[0],o[0]),p=Math.min(d.coordPair[1],o[1]);c<=f&&m(c,f,l,d),c=p,l=d}c<=o[1]&&m(c,o[1],l,null);function m(e,n,i,o){function s(e,t){a&&(rn(e,e,a),rn(t,t,a))}function c(e,t){var n={x1:e[0],y1:e[1],x2:t[0],y2:t[1]};Mu(n,n,r.style),e[0]=n.x1,e[1]=n.y1,t[0]=n.x2,t[1]=n.y2}var l=[e,0],u=[n,0],d=[e,5],f=[n,5];s(l,d),c(l,d),s(u,f),c(u,f),c(l,u);var p=new fp(F({shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]}},r));t.add(p),p.anid=`breakLine_`+(i?i.brkId:`\0`)+`_\0_`+(o?o.brkId:`\0`)}}function p3(e,t,n){if(ut(n,function(e){return!e}))return;var r=new q;if(!dO(n[0],n[1],r,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=Bn();Gn(i,i,-t);var a=R(n,function(e){return e.transform?Un(Bn(),i,e.transform):i});function o(e){var t=n[0].localRect,r=new q(t[Jp[e]]*a[0][0],t[Jp[e]]*a[0][1]);return Math.abs(r.y)<1e-5}var s=.5;if(o(0)||o(1)){var c=R(n,function(e,t){var n=e.localRect.clone();return n.applyTransform(a[t]),n}),l=new q;l.copy(n[0].label).add(n[1].label).scale(.5),l.transform(i);var u=r.clone().transform(i),d=(c[0].x+c[1].x+(u.x>=0?c[0].width:c[1].width)+u.x)/2-l.x,f=Math.min(d,d-u.x),p=Math.max(d,d-u.x);s=(d-(p<0?p:f>0?f:0))/u.x}var m=new q,h=new q;q.scale(m,r,-s),q.scale(h,r,1-s),aO(n[0],m),aO(n[1],h)}function m3(e,t){var n={breaks:[]};return L(t.breaks,function(r){if(r){var i=ut(e.get(`breaks`,!0),function(e){return kh().identifyAxisBreak(e,r)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),n}function h3(){wM({adjustBreakLabelPair:p3,buildAxisBreakLine:f3,rectCoordBuildBreakAxis:d3,updateModelAxisBreak:m3})}function g3(e){VM(e),o3(),h3()}function _3(){IN(v3)}function v3(e,t){L(e,function(e){if(!e.model.get([`axisLabel`,`inside`])){var n=y3(e);if(n){var r=e.isHorizontal()?`height`:`width`,i=e.model.get([`axisLabel`,`margin`]);t[r]-=n[r]+i,e.position===`top`?t.y+=n.height+i:e.position===`left`&&(t.x+=n.width+i)}}})}function y3(e){var t=e.model,n=e.scale;if(!t.get([`axisLabel`,`show`])||n.isBlank())return;var r,i,a=n.getExtent();n instanceof AT?i=n.count():(r=n.getTicks(),i=r.length);var o=e.getLabelModel(),s=TE(e),c,l=1;i>40&&(l=Math.ceil(i/40));for(var u=0;u<i;u+=l){var d=s(r?r[u]:{value:a[0]+u},u),f=p(o.getTextRect(d),o.get(`rotate`)||0);c?c.union(f):c=f}return c;function p(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,a=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),o=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new J(e.x,e.y,a,o)}}bw([uA]),bw([eA]),bw([aj,zj,sM,yP,PP,AI,CL,qR,cB,vB,TB,NB,EH,nU,vU,WU,YU,uW,vW,KW,eG,gG,GK]),bw(zq),bw(xJ),bw(kI),bw(BJ),bw(TH),bw(qJ),bw(nX),bw(bX),bw(UZ),bw(xQ),bw(Rq),bw(ZQ),bw(e$),bw(v$),bw(V$),bw(Z$),bw(c1),bw(P1),bw(u0),bw(Y1),bw(l0),bw($0),bw(q0),bw(Q0),bw(a2),bw(d2),bw(O2),bw(j2),bw(U4),bw(SO),bw(g3),bw(_3),bw(bP);var b3={default:{background:`#ffffff`,border:`1px solid #e5e7eb`,color:`#374151`,cursor:`pointer`},hover:{background:`#f9fafb`,border:`1px solid #d1d5db`,color:`#111827`,cursor:`pointer`},active:{background:`#f3f4f6`,border:`1px solid #9ca3af`,cursor:`pointer`},disabled:{background:`#ffffff`,border:`1px solid #e5e7eb`,color:`#9ca3af`,cursor:`default`}},x3={default:{background:`#21262d`,border:`1px solid #30363d`,color:`#c9d1d9`,cursor:`pointer`},hover:{background:`#30363d`,border:`1px solid #8b949e`,color:`#e6edf3`,cursor:`pointer`},active:{background:`#3d444d`,border:`1px solid #8b949e`,cursor:`pointer`},disabled:{background:`#21262d`,border:`1px solid #30363d`,color:`#484f58`,cursor:`default`}};function S3({children:e,colorScheme:t,disabled:n,onClick:r}){let[i,a]=(0,f.useState)(!1),[o,s]=(0,f.useState)(!1);return(0,m.jsx)(`button`,{disabled:n,type:`button`,style:{pointerEvents:`all`,borderRadius:8,fontWeight:600,fontSize:12,padding:`4px 10px`,transition:`background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease`,...(()=>{let e=t?.toLowerCase()===`dark`?x3:b3;return n?e.disabled:o?e.active:i?e.hover:e.default})()},onClick:r,onMouseEnter:()=>a(!0),onMouseLeave:()=>{a(!1),s(!1)},onMouseDown:()=>!n&&s(!0),onMouseUp:()=>s(!1),children:e})}function C3(e){let t=(0,f.useRef)(e);return t.current=e,t}function w3(e,t){let[{data:n}]=e,r=n.cols.findIndex(e=>e.name===t.dimension),i=n.cols.findIndex(e=>e.name===t.metric);if(r===-1||i===-1)throw Error(`There is no valid columns to render a chart`);let a=n.rows.map(e=>[String(e[r]),Number(e[i])]),o=T3(a.map(([e])=>e));return{data:a,years:o,latestYear:o.length?o[o.length-1]:new Date().getFullYear(),dimensionCol:n.cols[r],metricCol:n.cols[i]}}function T3(e){let t=new Set;return e.forEach(e=>{let n=new Date(e);isNaN(n.getTime())||t.add(n.getFullYear())}),Array.from(t).sort((e,t)=>e-t)}function E3(e,t){let{data:n}=w3(e,t),r=n.map(([e])=>D3(e)),i=new Set;for(let e of r){if(i.has(e))return!0;i.add(e)}return!1}function D3(e){return new Date(e).toLocaleDateString(`en-CA`)}function O3(e){let t=[],n=new Date(e,0,1),r=new Date(e,11,31);for(let e=new Date(n);e<=r;e.setDate(e.getDate()+1))t.push(D3(e));return t}function k3(e,t){return v(e,{column:{...t,unit:`month-of-year`},date_abbreviate:!0})}function A3(e,t){return v(e,{column:{...t,unit:`day-of-week`},date_abbreviate:!0})}function j3(e){let t=new Date(2024,0,7);return Array.from({length:7},(n,r)=>{let i=new Date(t);return i.setDate(t.getDate()+r),A3(i,e)})}function M3(e){return Math.max(1,Math.floor((e-12)/3))}function N3(e,t){return e===`square`?0:e===`circle`?Math.floor(t/2):M3(t)}function P3(e){return Math.max(12,Math.min(30,Math.floor((e-30-20)/53)))}function F3(e){return 50+53*e}function I3(e){return 42+7*e+8+30}var L3=(e,t,n,r,i,a,o,s)=>{let c=Ae(n),l=r===`dark`,u=l?Se:xe,d=e.filter(([e])=>{let n=new Date(e);return!isNaN(n.getTime())&&n.getFullYear()===t}),f=d.map(([e,t])=>t),p=new Map(d.map(([e,t])=>[D3(e),t])),m=O3(t),h=m.filter(e=>p.has(e)).map(e=>[e,p.get(e)]),g=m.filter(e=>!p.has(e)).map(e=>[e,0]),_=f.length?Math.min(...f):0,y=f.length?Math.max(...f):100,b=N3(a,i);return{backgroundColor:`transparent`,tooltip:{show:!1},visualMap:{min:_,max:y,type:`piecewise`,orient:`horizontal`,top:24+7*i+8,left:`center`,bottom:null,itemSymbol:`circle`,seriesIndex:1,inRange:{color:c},pieces:[{min:0,max:0,color:c.empty},{gt:0,lte:y*.25,color:c.low},{gt:y*.25,lte:y*.5,color:c[`medium-low`]},{gt:y*.5,lte:y*.75,color:c[`medium-high`]},{gt:y*.75,color:c.high}],showLabel:!1,formatter:e=>v(e,{column:s}),text:[`More`,`Less`],itemWidth:10,itemHeight:10,itemGap:5},calendar:{top:24,left:50,bottom:null,cellSize:[i,i],range:t,itemStyle:{color:`transparent`,borderWidth:4,borderColor:`transparent`,borderRadius:b},splitLine:{show:!1},yearLabel:{show:!1},dayLabel:{show:!0,silent:!0,firstDay:0,color:u,fontSize:11,nameMap:j3(o)},monthLabel:{silent:!0,color:u,fontSize:11,formatter:e=>k3(new Date(parseInt(e.yyyy),e.M),o)}},series:[{type:`heatmap`,coordinateSystem:`calendar`,data:g,silent:!0,itemStyle:{color:l?Te:we,borderRadius:b}},{type:`heatmap`,coordinateSystem:`calendar`,data:h,itemStyle:{borderRadius:b}}]}};function R3({height:e,width:t,settings:n,series:r,onClick:i,onHover:a,colorScheme:o}){let s=(0,f.useRef)(null),c=(0,f.useRef)(null),l=C3(i),u=C3(a),d=C3(r),p=C3(n),[h,g]=(0,f.useState)(null),{data:_,years:v,latestYear:y,dimensionCol:b,metricCol:x}=w3(r,n);(0,f.useEffect)(()=>{g(y)},[y]),(0,f.useEffect)(()=>{if(!s.current)return;let e=ew(s.current);return c.current=e,S(e),e.on(`click`,e=>{if(typeof l.current!=`function`)return;if(e.seriesIndex===0){l.current(null);return}let[t,n]=e.data,r=d.current[0].data.cols,i=d.current[0].data.rows,a=r.findIndex(e=>e.name===p.current.dimension),o=r.findIndex(e=>e.name===p.current.metric),s=r[a],c=r[o],u=D3(t),f=i.find(e=>D3(String(e[a]))===u),m={value:n,column:c,dimensions:s?[{value:t,column:s}]:[],event:e.event?.event,origin:f?{row:f,cols:r}:void 0,settings:p.current};l.current(m)}),()=>{e.dispose(),c.current=null}},[o]);let S=e=>{e.on(`mouseover`,t=>{if(typeof u.current!=`function`||t.seriesIndex===0)return;let[n,r]=t.data,i=d.current[0].data.cols,a=i.findIndex(({name:e})=>e===p.current.dimension),o=i.findIndex(({name:e})=>e===p.current.metric),s=i[a],c=i[o],l=e.convertToPixel(`calendar`,[n]),f=e.getDom().getBoundingClientRect();u.current({value:r,column:c,dimensions:[{value:n,column:s}],data:[{key:s.display_name,col:s,value:n},{key:c.display_name,col:c,value:r}],event:new MouseEvent(`mouseover`,{clientX:f.left+l[0],clientY:f.top+l[1]})})}),e.on(`mouseout`,()=>u.current?.(null))},C=h??y,w=v.indexOf(C),T=w>0,E=w<v.length-1,D=n.color??`#85b8e8`,O=n.cellShape,k=t?P3(t):0,A=(0,f.useMemo)(()=>L3(_,C,D,o,k,O,b,x),[_,C,D,o,k,O,b,x]);(0,f.useEffect)(()=>{c.current?.setOption(A,!0)},[A]),(0,f.useEffect)(()=>{c.current?.resize()},[t,e]);let j=F3(k);return(0,m.jsx)(`div`,{style:{position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`center`,height:`100%`,justifyContent:`center`},children:(0,m.jsxs)(`div`,{style:{overflowX:`auto`,width:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,m.jsxs)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,gap:16,marginBottom:10,marginTop:10,width:j},children:[(0,m.jsx)(S3,{onClick:()=>g(v[w-1]),disabled:!T,colorScheme:o,children:`Previous`}),(0,m.jsx)(`span`,{style:{fontSize:16,fontWeight:500},children:C}),(0,m.jsx)(S3,{onClick:()=>g(v[w+1]),disabled:!E,colorScheme:o,children:`Next`})]}),(0,m.jsx)(`div`,{ref:s,style:{width:j,height:I3(k)}})]})})}function z3(e){return g(e)}function B3(e){return!z3(e)&&_(e)}function V3(e){return e.find(z3)?.name}function H3(e){return e.find(B3)?.name}return({defineSetting:e})=>S({id:`calendar-heatmap`,getName:()=>`Calendar Heatmap`,minSize:{width:8,height:3},defaultSize:{width:20,height:6},checkRenderable(e,t){if(e.length===0)throw Error(`No series provided`);let n=e[0]?.data?.cols??[],r=t.dimension??V3(n),i=t.metric??H3(n),a=n.find(e=>e.name===r&&z3(e)),o=n.find(e=>e.name===i&&B3(e));if(!a)throw Error(`Please select a date column for the dimension.`);if(!o)throw Error(`Please select a numeric column for the metric.`);if(E3(e,{...t,dimension:r,metric:i}))throw Error(`Data is unbinned: multiple entries with the same date. Please aggregate date column by day.`)},settings:{dimension:e({id:`dimension`,section:`Data`,title:`Date column`,widget:`field`,getDefault:e=>V3(e?.[0]?.data?.cols??[]),getProps:e=>{let t=(e?.[0]?.data?.cols??[]).filter(z3);return{columns:t,options:t.map(({display_name:e,name:t})=>({name:e,value:t}))}}}),metric:e({id:`metric`,section:`Data`,title:`Metric column`,widget:`field`,getDefault:e=>H3(e?.[0]?.data?.cols??[]),getProps:e=>{let t=(e?.[0]?.data?.cols??[]).filter(B3);return{columns:t,options:t.map(({display_name:e,name:t})=>({name:e,value:t}))}}}),color:e({id:`color`,section:`Display`,title:`Color`,widget:`color`,getDefault:()=>Ce,getProps:()=>({})}),cellShape:e({id:`cellShape`,section:`Display`,title:`Cell Shape`,widget:`radio`,getDefault:()=>`rounded`,getProps:()=>({options:[{name:`Square`,value:`square`},{name:`Rounded square`,value:`rounded`},{name:`Circle`,value:`circle`}]})})},VisualizationComponent:R3})})();\ No newline at end of file+`||r===``)){var i=e.isSelected(r);K(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function w1(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,pt(S1,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,pt(S1,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,pt(S1,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,pt(S1,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,pt(S1,`unSelect`))}function T1(e){e.registerComponentModel(u1),e.registerComponentView(m1),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,x1),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),w1(e)}var E1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Zg(t);e.prototype.init.call(this,t,n,r),D1(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),D1(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=mh(u1.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800}),t}(u1);function D1(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,Xg(t,n,{type:`box`,ignoreSize:!!i})}var O1=Y,k1=[`width`,`height`],A1=[`x`,`y`],j1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new O1),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new O1)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=B(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Hu({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=gm(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:z(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=k1[s],l=A1[s],u=k1[1-s],d=A1[1-s];i&&zg(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=P(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;zg(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),zg(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=W(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Lu({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Lp(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;L([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,H(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=k1[i],o=A1[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(m1);function M1(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function N1(e){bw(T1),e.registerComponentModel(E1),e.registerComponentView(j1),M1(e)}function P1(e){bw(T1),bw(N1)}var F1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=mh(OX.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(OX),I1=oc();function L1(e,t,n){I1(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function R1(e,t){for(var n=I1(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var c=t.uid;s.get(c)&&(s.removeKey(c),s.keys().length||z1(n,o))}}}function z1(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function B1(e,t){var n={model:t,containsPoint:pt(H1,t),dispatchAction:pt(V1,e),dataZoomInfoMap:null,controller:null},r=n.controller=new VP(e.getZr());return L([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}function V1(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function H1(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function U1(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each(function(e){var t=e.model,n=t.get(`disabled`,!0)?!1:t.get(`zoomLock`,!0)?`move`:!0;a[i+n]>a[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function W1(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=I1(t),r=n.coordSysRecordMap||=G();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){L(EX(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,B1(t,n.model));(a.dataZoomInfoMap||=G()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i){z1(r,e);return}var s=U1(a,e,t);n.enable(s.controlType,s.opt),Bb(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var G1=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),L1(r,t,{pan:z(K1.pan,this),zoom:z(K1.zoom,this),scrollMove:z(K1.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){R1(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(jX),K1={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=J1[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(nV(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:q1(function(e,t,n,r,i,a){var o=J1[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:q1(function(e,t,n,r,i,a){return J1[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function q1(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(nV(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var J1={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function Y1(e){BX(e),e.registerComponentModel(F1),e.registerComponentView(G1),W1(e)}var X1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=mh(OX.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Q.color.accent10,borderRadius:0,backgroundColor:Q.color.transparent,dataBackground:{lineStyle:{color:Q.color.accent30,width:.5},areaStyle:{color:Q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Q.color.accent40,width:.5},areaStyle:{color:Q.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Q.color.neutral00,borderColor:Q.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Q.color.tertiary},brushSelect:!0,brushStyle:{color:Q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(OX),Z1=Lu,Q1=1,$1=30,e0=7,t0=`horizontal`,n0=`vertical`,r0=5,i0=[`line`,`bar`,`candlestick`,`scatter`],a0={easing:`cubicOut`,duration:100,delay:0},o0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=z(this._onBrush,this),this._onBrushEnd=z(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),Bb(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!==`dataZoom`||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Vb(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Y;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?e0:0,r=Kg(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===t0?{right:r.width-i.x-i.width,top:r.height-$1-a-n,width:i.width,height:$1}:{right:a,top:i.y,width:$1,height:i.height},s=Zg(e.option);L([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=Ug(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===n0&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===t0&&!i?{scaleY:o?1:-1,scaleX:1}:n===t0&&i?{scaleY:o?1:-1,scaleX:-1}:n===n0&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new Z1({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new Z1({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:z(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b){v||(y+=g);return}y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:as(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new Y,r=new sp({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new lp({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){L(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&it(i0,e.get(`type`))<0)){var o=r.getComponent(wX(i),a).axis,s=s0(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new Z1({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new Z1({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:Q1,fill:Q.color.transparent}})),L([0,1],function(t){var a=o.get(`handleIcon`);!Lx[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=Bx(a,-1,0,2,2,null,!0);s.attr({cursor:c0(this._orient),draggable:!0,drift:z(this._onDragMove,this,t),ondragend:z(this._onDragEnd,this),onmouseover:z(this._showDataInfo,this,!0),onmouseout:z(this._showDataInfo,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=X(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Zd(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new Hu({silent:!0,invisible:!f,style:Bm(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=X(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new Lu({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=Bx(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Q.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new Lu({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`default`,drift:z(this._onDragMove,this,`all`),ondragstart:z(this._showDataInfo,this,!0),ondragend:z(this._onDragEnd,this),onmouseover:z(this._showDataInfo,this,!0),onmouseout:z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[as(e[0],[0,100],t,!0),as(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];nV(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:as(a.minSpan,o,i,!0),a.maxSpan==null?null:as(a.maxSpan,o,i,!0));var s=this._range,c=this._range=ls([as(r[0],i,o,!0),as(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=ls(n.slice()),i=this._size;L([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;c<o.length;c++){var l=o[c],u=l.getClipPath();u||(u=new Lu,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){var o=t.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,c=this._range,l=e?o.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:o.getDataValueWindow();a=[this._formatLabel(l[0],s),this._formatLabel(l[1],s)]}}var u=ls(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(e){var t=cm(n.handles[e].parent,this.group),o=um(e===0?`right`:`left`,t),s=this._handleWidth/2+r0,c=lm([u[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===t0?`middle`:o,align:i===t0?o:`center`,text:a[e]})}},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get(`labelFormatter`),i=n.get(`labelPrecision`);(i==null||i===`auto`)&&(i=t.getPixelPrecision());var a=e==null||isNaN(e)?``:t.type===`category`||t.type===`time`?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return V(r)?r(e,a):H(r)?r.replace(`{value}`,a):a},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,Pn(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=lm([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new q(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();nV(0,a,r,0,o.minSpan==null?null:as(o.minSpan,i,r,!0),o.maxSpan==null?null:as(o.maxSpan,i,r,!0)),this._range=ls([as(a[0],r,i,!0),as(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Pn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new Z1({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?a0:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=EX(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(jX);function s0(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function c0(e){return e===`vertical`?`ns-resize`:`ew-resize`}function l0(e){e.registerComponentModel(X1),e.registerComponentView(o0),BX(e)}function u0(e){bw(Y1),bw(l0)}var d0={get:function(e,t,n){var r=P((f0[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},f0={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},p0=nR.mapVisual,m0=nR.eachVisual,h0=B,g0=L,_0=ls,v0=as,y0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&OQ(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=z(e,this),this.controllerVisuals=DQ(this.option.controller,t,e),this.targetVisuals=DQ(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,t=this.option.seriesIndex;t==null&&e==null&&(t=`all`);var n=fc(this.ecModel,`series`,{index:t,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return R(n,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){L(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(H(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(V(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=_0([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(t!=null)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var i=n[r],a=e.getDimensionInfo(i);if(!a.isCalculationCoord)return a.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};nt(r,n),nt(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){h0(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},g0(r,function(e,t){if(nR.isValidType(t)){var n=d0.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;g0(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??=t&&P(t)||(a?i:[i]),c.symbolSize??=n&&P(n)||(a?s[0]:[s[0],s[0]]),c.symbol=p0(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;m0(l,function(e){e>u&&(u=e)}),c.symbolSize=p0(l,function(e){return v0(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(e_),b0=[20,140],x0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=b0[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=b0[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=ls((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent(),r=W(this.option.unboundedRange,!0);return(r&&t[0]<=n[0]||t[0]<=e)&&(r&&t[1]>=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=S0(this,`outOfRange`,this.getExtent()),n=S0(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;o<c&&(!n.length||t[o]<=n[0]);o++)t[o]<n[a]&&i(t[o],`outOfRange`);for(var l=1;a<s;a++,l=0)l&&r.length&&i(n[a],`outOfRange`),i(n[a],`inRange`);for(var l=1;o<c;o++)(!n.length||n[n.length-1]<t[o])&&(l&&=(r.length&&i(r[r.length-1].value,`outOfRange`),0),i(t[o],`outOfRange`));var u=r.length;return{stops:r,outerColors:[u?r[0].color:`transparent`,u?r[u-1].color:`transparent`]}},t.type=`visualMap.continuous`,t.defaultOption=mh(y0.defaultOption,{align:`auto`,calculable:!1,hoverLink:!0,realtime:!0,handleIcon:`path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z`,handleSize:`120%`,handleStyle:{borderColor:Q.color.neutral00,borderWidth:1},indicatorIcon:`circle`,indicatorSize:`50%`,indicatorStyle:{borderColor:Q.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Q.color.shadow}}),t}(y0);function S0(e,t,n){if(n[0]===n[1])return n.slice();for(var r=200,i=(n[1]-n[0])/r,a=n[0],o=[],s=0;s<=r&&a<n[1];s++)o.push(a),a+=i;return o.push(n[1]),o}var C0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){if(this.visualMapModel=e,e.get(`show`)===!1){this.group.removeAll();return}this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=mg(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new Lu({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return L(nR.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),nR.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=Kg(t,n).refContainer;qg(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(Eb),w0=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function T0(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=w0[o],c=[0,null,10],l={},u=0;u<3;u++)l[w0[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=Ug(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function E0(e,t){return L(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}var D0=as,O0=L,k0=Math.min,A0=Math.max,j0=12,M0=6,N0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=z(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=z(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){(!r||r.type!==`selectDataRange`||r.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get(`orient`),this._useHandle=e.get(`calculable`),this._resetInterval(),this._renderBar(t);var n=e.get(`text`);this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=r==null?``:r+``;var i=this.visualMapModel,a=i.get(`textGap`),o=i.itemSize,s=this._shapes.mainGroup,c=this._applyTransform([o[0]/2,n===0?-a:o[1]+a],s),l=this._applyTransform(n===0?`bottom`:`top`,s),u=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Hu({style:Bm(d,{x:c[0],y:c[1],verticalAlign:d.get(`verticalAlign`)||(u===`horizontal`?`middle`:l),align:d.get(`align`)||(u===`horizontal`?l:`center`),text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,a=this._useHandle,o=T0(t,this.api,r),s=n.mainGroup=this._createBarGroup(o),c=new Y;s.add(c),c.add(n.outOfRange=P0()),c.add(n.inRange=P0(null,a?L0(this._orient):null,z(this._dragHandle,this,`all`,!1),z(this._dragHandle,this,`all`,!0))),c.setClipPath(new Lu({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var l=t.textStyleModel.getTextRect(`国`),u=A0(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,u,i),this._createHandle(t,s,1,r,u,i)),this._createIndicator(t,s,r,u,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,a){var o=z(this._dragHandle,this,n,!1),s=z(this._dragHandle,this,n,!0),c=Do(e.get(`handleSize`),r[0]),l=Bx(e.get(`handleIcon`),-c/2,-c/2,c,c,null,!0),u=L0(this._orient);l.attr({cursor:u,draggable:!0,drift:o,ondragend:s,onmousemove:function(e){Pn(e.event)}}),l.x=r[0]/2,l.useStyle(e.getModel(`handleStyle`).getItemStyle()),l.setStyle({strokeNoScale:!0,strokeFirst:!0}),l.style.lineWidth*=2,l.ensureState(`emphasis`).style=e.getModel([`emphasis`,`handleStyle`]).getItemStyle(),af(l,!0),t.add(l);var d=this.visualMapModel.textStyleModel,f=new Hu({cursor:u,draggable:!0,drift:o,onmousemove:function(e){Pn(e.event)},ondragend:s,style:Bm(d,{x:0,y:0,text:``})});f.ensureState(`blur`).style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var p=[c,0],m=this._shapes;m.handleThumbs[n]=l,m.handleLabelPoints[n]=p,m.handleLabels[n]=f},t.prototype._createIndicator=function(e,t,n,r,i){var a=Do(e.get(`indicatorSize`),n[0]),o=Bx(e.get(`indicatorIcon`),-a/2,-a/2,a,a,null,!0);o.attr({cursor:`move`,invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel(`indicatorStyle`).getItemStyle();if(o instanceof ku){var c=o.style;o.useStyle(F({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},s))}else o.useStyle(s);t.add(o);var l=this.visualMapModel.textStyleModel,u=new Hu({silent:!0,invisible:!0,style:Bm(l,{x:0,y:0,text:``})});this.group.add(u);var d=[(i===`horizontal`?r/2:M0)+n[0]/2,0],f=this._shapes;f.indicator=o,f.indicatorLabel=u,f.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get(`realtime`)&&this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():I0(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[D0(t[0],n,r,!0),D0(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t||=0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];nV(t,r,i,e,0);var a=n.getExtent();this._dataInterval=[D0(r[0],i,a,!0),D0(r[1],i,a,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],a=e?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,`inRange`),s=this._createBarVisual(n,n,i,`outOfRange`);r.inRange.setStyle({fill:o.barColor}).setShape(`points`,o.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape(`points`,s.barPoints),this._updateHandle(a,o)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},a=this._makeColorGradient(e,i),o=[this.getControllerVisual(e[0],`symbolSize`,i),this.getControllerVisual(e[1],`symbolSize`,i)],s=this._createBarPoints(n,o);return{barColor:new xp(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=100,r=[],i=(e[1]-e[0])/n;r.push({color:this.getControllerVisual(e[0],`color`,t),offset:0});for(var a=1;a<n;a++){var o=e[0]+i*a;if(o>e[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Y(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);O0([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=D0(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=lm(n.handleLabelPoints[l],cm(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=D0(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=lm(c.indicatorLabelPoint,cm(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;C<S.length;C++)this.api.enterBlur(S[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on(`mousemove`,function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=k0(A0(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on(`mouseout`,function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on(`mouseover`,this._hoverLinkFromSeriesMouseOver,this),e.on(`mouseout`,this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i=[0,r[1]],a=n.getExtent();e=k0(A0(i[0],e),i[1]);var o=F0(n,a,i),s=[e-o,e+o],c=D0(e,i,a,!0),l=[D0(s[0],i,a,!0),D0(s[1],i,a,!0)];s[0]<i[0]&&(l[0]=-1/0),s[1]>i[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||I0(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=ic(u,d);this._dispatchHighDown(`downplay`,E0(f[0],n)),this._dispatchHighDown(`highlight`,E0(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(Ax(e.target,function(e){var n=Z(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown(`downplay`,E0(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off(`mouseover`,this._hoverLinkFromSeriesMouseOver),e.off(`mouseout`,this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=cm(t,r?null:this.group);return B(e)?lm(e,i,n):um(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type=`visualMap.continuous`,t}(C0);function P0(e,t,n,r){return new sp({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){Pn(e.event)},ondragend:r})}function F0(e,t,n){var r=j0/2,i=e.get(`hoverLinkDataSize`);return i&&(r=D0(i,t,n,!0)/2),r}function I0(e){return!!(e.get(`hoverLinkOnHandle`)??e.get(`realtime`))}function L0(e){return e===`vertical`?`ns-resize`:`ew-resize`}var R0={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},z0=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},B0=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(AQ(t.stateList,t.targetVisuals,z(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(z(V0,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function V0(e,t,n,r){for(var i=t.targetVisuals[r],a=nR.prepareVisualTypes(i),o={color:Tx(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}var H0=L;function U0(e){var t=e&&e.visualMap;B(t)||(t=t?[t]:[]),H0(t,function(e){if(e){W0(e,`splitList`)&&!W0(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&B(t)&&H0(t,function(e){U(e)&&(W0(e,`start`)&&!W0(e,`min`)&&(e.min=e.start),W0(e,`end`)&&!W0(e,`max`)&&(e.max=e.end))})}})}function W0(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var G0=!1;function K0(e){G0||(G0=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(R0,z0),L(B0,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(U0))}function q0(e){e.registerComponentModel(x0),e.registerComponentView(N0),K0(e)}var J0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],Y0[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=R(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=nR.listVisualTypes(),i=this.isCategory();L(t.pieces,function(e){L(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),L(n,function(e,n){var r=!1;L(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&L(this.stateList,function(e){(t[e]||(t[e]={}))[n]=d0.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,L(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;L(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=nR.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){nR.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return L(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=mh(y0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(y0),Y0={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),Cs(e),L(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;L(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),X0(t,e)},pieces:function(e){var t=this.option;L(t.pieces,function(t,n){U(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=nR.retrieveVisuals(t),e.push(r)},this),X0(t,e),Cs(e),L(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function X0(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var Z0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ct(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),L(o.viewPieceList,function(o){var s=o.piece,u=new Y;u.onclick=z(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Hu({style:Bm(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:W(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),zg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:E0(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return T0(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Y,o=this.visualMapModel.textStyleModel;a.add(new Hu({style:Bm(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=R(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=Bx(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,L(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(C0);function Q0(e){e.registerComponentModel(J0),e.registerComponentView(Z0),K0(e)}function $0(e){bw(q0),bw(Q0)}var e2=function(){function e(e){this._thumbnailModel=e}return e.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},e.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Mm(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},e}(),t2=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.optionUpdated=function(e,t){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new e2(this);this._target=null,this.ecModel.eachSeries(function(e){Qz(e,null)}),this.shouldShow()&&Qz(this.getTarget().baseMapProvider,e)},t.prototype.shouldShow=function(){return this.getShallow(`show`,!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents(`series`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!==`graph`&&(e=null):e=this.ecModel.queryComponents({mainType:`series`,subType:`graph`})[0],this._target={baseMapProvider:e},this._target},t.type=`thumbnail`,t.layoutMode=`box`,t.dependencies=[`series`,`geo`],t.defaultOption={show:!0,right:1,bottom:1,height:`25%`,width:`25%`,itemStyle:{borderColor:Q.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:Q.color.neutral30,borderColor:Q.color.neutral40,opacity:.3},z:10},t}(e_),n2=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this._api=n,this._model=e,this._coordSys||=new _I,!this._isEnabled()){this._clear();return}this._renderVersion=n.getMainProcessVersion();var r=this.group;r.removeAll();var i=e.getModel(`itemStyle`),a=i.getItemStyle();a.fill??=t.get(`backgroundColor`)||Q.color.neutral00;var o=Kg(e,n).refContainer,s=Ug(Bg(e,!0),o),c=a.lineWidth||0,l=this._contentRect=xm(s.clone(),c/2,!0,!0),u=new Y;r.add(u),u.setClipPath(new Lu({shape:l.plain()}));var d=this._targetGroup=new Y;u.add(d);var f=s.plain();f.r=i.getShallow(`borderRadius`,!0),r.add(this._bgRect=new Lu({style:a,shape:f,silent:!1,cursor:`grab`}));var p=e.getModel(`windowStyle`),m=p.getShallow(`borderRadius`,!0);u.add(this._windowRect=new Lu({shape:{x:0,y:0,width:0,height:0,r:m},style:p.getItemStyle(),silent:!1,cursor:`grab`})),this._dealRenderContent(),this._dealUpdateWindow(),i2(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),i2(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=this._targetGroup,n=this._coordSys,r=this._contentRect;if(t.removeAll(),e){var i=e.group,a=i.getBoundingRect();t.add(i),this._bgRect.z2=e.z2Range.min-10,n.setBoundingRect(a.x,a.y,a.width,a.height);var o=Ug({left:`center`,top:`center`,aspect:a.width/a.height},r);n.setViewRect(o.x,o.y,o.width,o.height),i.attr(n.getTransformInfo().raw),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var t=this._bridgeRendered;t&&t.renderVersion===e.renderVersion&&(t.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=qn([],e.targetTrans),n=Un([],this._coordSys.transform,t);this._transThisToTarget=qn([],n);var r=e.viewportRect;r=r?r.clone():new J(0,0,this._api.getWidth(),this._api.getHeight()),r.applyTransform(n);var i=this._windowRect,a=i.shape.r;i.setShape(I({r:a},r))}},t.prototype._resetRoamController=function(e){var t=this,n=this._api,r=this._roamController;if(r||=this._roamController=new VP(n.getZr()),!e||!this._isEnabled()){r.disable();return}r.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(e,n,r){return t._contentRect.contain(n,r)}}}),r.off(`pan`).off(`zoom`).on(`pan`,z(this._onPan,this)).on(`zoom`,z(this._onZoom,this))},t.prototype._onPan=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=rn([],[e.oldX,e.oldY],t),r=rn([],[e.oldX-e.dx,e.oldY-e.dy],t);this._api.dispatchAction(r2(this._model.getTarget().baseMapProvider,{dx:r[0]-n[0],dy:r[1]-n[1]}))}},t.prototype._onZoom=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=rn([],[e.originX,e.originY],t);this._api.dispatchAction(r2(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;return!(!e||!e.shouldShow()||!e.getTarget().baseMapProvider)},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type=`thumbnail`,t}(Eb);function r2(e,t){var n={type:e.mainType===`series`?e.subType+`Roam`:e.mainType+`Roam`};return n[e.mainType+`Id`]=e.id,F(n,t),n}function i2(e,t){var n=jm(e);Nm(t.group,n.z,n.zlevel)}function a2(e){e.registerComponentModel(t2),e.registerComponentView(n2)}var o2={label:{enabled:!0},decal:{show:!1}},s2=oc(),c2={};function l2(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=P(o2);nt(r.label,e.getLocaleModel().get(`aria`),!1),nt(n.option,r,!1),i(),a();function i(){if(n.getModel(`decal`).get(`show`)){var t=G();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),s2(e).scope=n}}),e.eachRawSeries(function(t){if(e.isSeriesFiltered(t))return;if(V(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var r=N_(t.ecModel,t.name,c2,e.getSeriesCount()),i=n.getVisual(`decal`);n.setVisual(`decal`,l(i,r))}else{var a=t.getRawData(),o={},s=s2(t).scope;n.each(function(e){var t=n.getRawIndex(e);o[t]=e});var c=a.count();a.each(function(e){var r=o[e],i=a.getName(e)||e+``,u=N_(t.ecModel,i,s,c),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,l(d,u))})}function l(e,t){var n=e?F(F({},t),e):t;return n.dirty=!0,n}})}}function a(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=I(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var l=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(l,d),p;if(!(l<1)){var m=s();p=m?o(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=l>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=o(g,{seriesCount:l}),e.eachSeries(function(e,t){if(t<f){var n=void 0,r=e.get(`name`)?`withName`:`withoutName`;n=l>1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=o(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:c(e.subType)});var i=e.getData();if(i.count()>u){var s=a.get([`data`,`partialData`]);n+=o(s,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_<i.count();_++)if(_<u){var v=i.getName(_),y=m?lt(i.getValues(_),function(e,t){return it(m,t)===-1}):i.getValues(_),b=a.get([`data`,v?`withName`:`withoutName`]);g.push(o(b,{name:v,value:y.join(d)}))}n+=g.join(d)+p,h.push(n)}});var _=a.getModel([`series`,`multiple`,`separator`]),v=_.get(`middle`),y=_.get(`end`);p+=h.join(v)+y,r.setAttribute(`aria-label`,p)}}}}function o(e,t){if(!H(e))return e;var n=e;return L(t,function(e,t){n=n.replace(RegExp(`\\{\\s*`+t+`\\s*\\}`,`g`),e)}),n}function s(){var t=e.get(`title`);return t&&t.length&&(t=t[0]),t&&t.text}function c(t){var n=e.getLocaleModel().get([`series`,`typeNames`]);return n[t]||n.chart}}function u2(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},L([`description`,`general`,`series`,`data`],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function d2(e){e.registerPreprocessor(u2),e.registerVisual(e.PRIORITY.VISUAL.ARIA,l2)}var f2={value:`eq`,"<":`lt`,"<=":`lte`,">":`gt`,">=":`gte`,"=":`eq`,"!=":`ne`,"<>":`ne`},p2=function(){function e(e){(this._condVal=H(e)?new RegExp(e):xt(e)?e:null)??Ps(``)}return e.prototype.evaluate=function(e){var t=typeof e;return H(t)?this._condVal.test(e):ht(t)?this._condVal.test(e+``):!1},e}(),m2=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),h2=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},e}(),g2=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},e}(),_2=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),v2=function(){function e(){}return e.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),r=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?r:n))return!1;return!0},e}();function y2(e,t){if(e===!0||e===!1){var n=new m2;return n.value=e,n}return C2(e)||Ps(``),e.and?b2(`and`,e,t):e.or?b2(`or`,e,t):e.not?x2(e,t):S2(e,t)}function b2(e,t,n){var r=t[e],i=``;B(r)||Ps(i),r.length||Ps(i);var a=e===`and`?new h2:new g2;return a.children=R(r,function(e){return y2(e,n)}),a.children.length||Ps(i),a}function x2(e,t){var n=e.not,r=``;C2(n)||Ps(r);var i=new _2;return i.child=y2(n,t),i.child||Ps(r),i}function S2(e,t){for(var n=``,r=t.prepareGetValue(e),i=[],a=dt(e),o=e.parser,s=o?fy(o):null,c=0;c<a.length;c++){var l=a[c];if(!(l===`parser`||t.valueGetterAttrMap.get(l))){var u=K(f2,l)?f2[l]:l,d=e[l],f=s?s(d):d,p=_y(u,f)||u===`reg`&&new p2(f);p||Ps(n),i.push(p)}}i.length||Ps(n);var m=new v2;return m.valueGetterParam=r,m.valueParser=s,m.getValue=t.getValue,m.subCondList=i,m}function C2(e){return U(e)&&!st(e)}var w2=function(){function e(e,t){this._cond=y2(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function T2(e,t){return new w2(e,t)}var E2={type:`echarts:filter`,transform:function(e){for(var t=e.upstream,n,r=T2(e.config,{valueGetterAttrMap:G({dimension:!0}),prepareGetValue:function(e){var n=``,r=e.dimension;K(e,`dimension`)||Ps(n);var i=t.getDimensionInfo(r);return i||Ps(n),{dimIdx:i.index}},getValue:function(e){return t.retrieveValueFromItem(n,e.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)n=t.getRawDataItem(a),r.evaluate()&&i.push(n);return{data:i}}},D2={type:`echarts:sort`,transform:function(e){var t=e.upstream,n=e.config,r=``,i=Rs(n);i.length||Ps(r);var a=[];L(i,function(e){var n=e.dimension,i=e.order,o=e.parser,s=e.incomparable;n??Ps(r),i!==`asc`&&i!==`desc`&&Ps(r),s&&s!==`min`&&s!==`max`&&Ps(``),i!==`asc`&&i!==`desc`&&Ps(``);var c=t.getDimensionInfo(n);c||Ps(r);var l=o?fy(o):null;o&&!l&&Ps(r),a.push({dimIdx:c.index,parser:l,comparator:new hy(i,s)})});var o=t.sourceFormat;o!==`arrayRows`&&o!==`objectRows`&&Ps(r);for(var s=[],c=0,l=t.count();c<l;c++)s.push(t.getRawDataItem(c));return s.sort(function(e,n){for(var r=0;r<a.length;r++){var i=a[r],o=t.retrieveValueFromItem(e,i.dimIdx),s=t.retrieveValueFromItem(n,i.dimIdx);i.parser&&(o=i.parser(o),s=i.parser(s));var c=i.comparator.evaluate(o,s);if(c!==0)return c}return 0}),{data:s}}};function O2(e){e.registerTransform(E2),e.registerTransform(D2)}var k2=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new Vy(this),Hy(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Hy(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type=`dataset`,t.defaultOption={seriesLayoutBy:__},t}(e_),A2=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.type=`dataset`,t}(Eb);function j2(e){e.registerComponentModel(k2),e.registerComponentView(A2)}var M2=Ql.CMD;function N2(e,t){return Math.abs(e-t)<1e-5}function P2(e){var t=e.data,n=e.len(),r=[],i,a=0,o=0,s=0,c=0;function l(e,t){i&&i.length>2&&r.push(i),i=[e,t]}function u(e,t,n,r){N2(e,n)&&N2(t,r)||i.push(e,t,n,r,n,r)}function d(e,t,n,r,a,o){var s=Math.abs(t-e),c=Math.tan(s/4)*4/3,l=t<e?-1:1,u=Math.cos(e),d=Math.sin(e),f=Math.cos(t),p=Math.sin(t),m=u*a+n,h=d*o+r,g=f*a+n,_=p*o+r,v=a*c*l,y=o*c*l;i.push(m-v*d,h+y*u,g+v*p,_-y*f,g,_)}for(var f,p,m,h,g=0;g<n;){var _=t[g++],v=g===1;switch(v&&(a=t[g],o=t[g+1],s=a,c=o,(_===M2.L||_===M2.C||_===M2.Q)&&(i=[s,c])),_){case M2.M:a=s=t[g++],o=c=t[g++],l(s,c);break;case M2.L:f=t[g++],p=t[g++],u(a,o,f,p),a=f,o=p;break;case M2.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case M2.Q:f=t[g++],p=t[g++],m=t[g++],h=t[g++],i.push(a+2/3*(f-a),o+2/3*(p-o),m+2/3*(f-m),h+2/3*(p-h),m,h),a=m,o=h;break;case M2.A:var y=t[g++],b=t[g++],x=t[g++],S=t[g++],C=t[g++],w=t[g++]+C;g+=1;var T=!t[g++];f=Math.cos(C)*x+y,p=Math.sin(C)*S+b,v?(s=f,c=p,l(s,c)):u(a,o,f,p),a=Math.cos(w)*x+y,o=Math.sin(w)*S+b;for(var E=(T?-1:1)*Math.PI/2,D=C;T?D>w:D<w;D+=E){var O=T?Math.max(D+E,w):Math.min(D+E,w);d(D,O,y,b,x,S)}break;case M2.R:s=a=t[g++],c=o=t[g++],f=s+t[g++],p=c+t[g++],l(f,c),u(f,c,f,p),u(f,p,s,p),u(s,p,s,c),u(s,c,f,c);break;case M2.Z:i&&u(a,o,s,c),a=s,o=c;break}}return i&&i.length>2&&r.push(i),r}function F2(e,t,n,r,i,a,o,s,c,l){if(N2(e,n)&&N2(t,r)&&N2(i,o)&&N2(a,s)){c.push(o,s);return}var u=2/l,d=u*u,f=o-e,p=s-t,m=Math.sqrt(f*f+p*p);f/=m,p/=m;var h=n-e,g=r-t,_=i-o,v=a-s,y=h*h+g*g,b=_*_+v*v;if(y<d&&b<d){c.push(o,s);return}var x=f*h+p*g,S=-f*_-p*v,C=y-x*x,w=b-S*S;if(C<d&&x>=0&&w<d&&S>=0){c.push(o,s);return}var T=[],E=[];ei(e,n,i,o,.5,T),ei(t,r,a,s,.5,E),F2(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),F2(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function I2(e,t){var n=P2(e),r=[];t||=1;for(var i=0;i<n.length;i++){var a=n[i],o=[],s=a[0],c=a[1];o.push(s,c);for(var l=2;l<a.length;){var u=a[l++],d=a[l++],f=a[l++],p=a[l++],m=a[l++],h=a[l++];F2(s,c,u,d,f,p,m,h,o,t),s=m,c=h}r.push(o)}return r}function L2(e,t,n){var r=e[t],i=e[1-t],a=Math.abs(r/i),o=Math.ceil(Math.sqrt(a*n)),s=Math.floor(n/o);s===0&&(s=1,o=n);for(var c=[],l=0;l<o;l++)c.push(s);var u=n-o*s;if(u>0)for(var l=0;l<u;l++)c[l%o]+=1;return c}function R2(e,t,n){for(var r=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),c=s*i,l=i-r,u=c>Math.abs(l),d=L2([c,l],+!u,t),f=(u?s:l)/d.length,p=0;p<d.length;p++)for(var m=(u?l:s)/d[p],h=0;h<d[p];h++){var g={};u?(g.startAngle=a+f*p,g.endAngle=a+f*(p+1),g.r0=r+m*h,g.r=r+m*(h+1)):(g.startAngle=a+m*h,g.endAngle=a+m*(h+1),g.r0=r+f*p,g.r=r+f*(p+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,n.push(g)}}function z2(e,t,n){for(var r=e.width,i=e.height,a=r>i,o=L2([r,i],+!a,t),s=a?`width`:`height`,c=a?`height`:`width`,l=a?`x`:`y`,u=a?`y`:`x`,d=e[s]/o.length,f=0;f<o.length;f++)for(var p=e[c]/o[f],m=0;m<o[f];m++){var h={};h[l]=f*d,h[u]=m*p,h[s]=d,h[c]=p,h.x+=e.x,h.y+=e.y,n.push(h)}}function B2(e,t,n,r){return e*r-n*t}function V2(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=B2(u,d,c,l);if(Math.abs(f)<1e-6)return null;var p=B2(e-i,t-a,u,d)/f;return p<0||p>1?null:new q(p*c+e,p*l+t)}function H2(e,t,n){var r=new q;q.sub(r,n,t),r.normalize();var i=new q;return q.sub(i,e,t),i.dot(r)}function U2(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function W2(e,t,n){for(var r=e.length,i=[],a=0;a<r;a++){var o=e[a],s=e[(a+1)%r],c=V2(o[0],o[1],s[0],s[1],t.x,t.y,n.x,n.y);c&&i.push({projPt:H2(c,t,n),pt:c,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(e,t){return e.projPt-t.projPt});var l=i[0],u=i[i.length-1];if(u.idx<l.idx){var d=l;l=u,u=d}for(var f=[l.pt.x,l.pt.y],p=[u.pt.x,u.pt.y],m=[f],h=[p],a=l.idx+1;a<=u.idx;a++)U2(m,e[a].slice());U2(m,p),U2(m,f);for(var a=u.idx+1;a<=l.idx+r;a++)U2(h,e[a%r].slice());return U2(h,f),U2(h,p),[{points:m},{points:h}]}function G2(e){var t=e.points,n=[],r=[];Dl(t,n,r);var i=new J(n[0],n[1],r[0]-n[0],r[1]-n[1]),a=i.width,o=i.height,s=i.x,c=i.y,l=new q,u=new q;return a>o?(l.x=u.x=s+a/2,l.y=c,u.y=c+o):(l.y=u.y=c+o/2,l.x=s,u.x=s+a),W2(t,l,u)}function K2(e,t,n,r){if(n===1)r.push(t);else{var i=Math.floor(n/2),a=e(t);K2(e,a[0],i,r),K2(e,a[1],n-i,r)}return r}function q2(e,t){for(var n=[],r=0;r<t;r++)n.push(Pf(e));return n}function J2(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function Y2(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}function X2(e,t){var n=[],r=e.shape,i;switch(e.type){case`rect`:z2(r,t,n),i=Lu;break;case`sector`:R2(r,t,n),i=tp;break;case`circle`:R2({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},t,n),i=tp;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=R(I2(e.getUpdatedPathProxy(),o),function(e){return Y2(e)}),c=s.length;if(c===0)K2(G2,{points:s[0]},t,n);else if(c===t)for(var l=0;l<c;l++)n.push({points:s[l]});else{var u=0,d=R(s,function(e){var t=[],n=[];Dl(e,t,n);var r=(n[1]-t[1])*(n[0]-t[0]);return u+=r,{poly:e,area:r}});d.sort(function(e,t){return t.area-e.area});for(var f=t,l=0;l<c;l++){var p=d[l];if(f<=0)break;var m=l===c-1?f:Math.ceil(p.area/u*t);m<0||(K2(G2,{points:p.poly},m,n),f-=m)}}i=sp;break}if(!i)return q2(e,t);for(var h=[],l=0;l<n.length;l++){var g=new i;g.setShape(n[l]),J2(e,g),h.push(g)}return h}function Z2(e,t){var n=e.length,r=t.length;if(n===r)return[e,t];for(var i=[],a=[],o=n<r?e:t,s=Math.min(n,r),c=Math.abs(r-n)/6,l=(s-2)/6,u=Math.ceil(c/l)+1,d=[o[0],o[1]],f=c,p=2;p<s;){var m=o[p-2],h=o[p-1],g=o[p++],_=o[p++],v=o[p++],y=o[p++],b=o[p++],x=o[p++];if(f<=0){d.push(g,_,v,y,b,x);continue}for(var S=Math.min(f,u-1)+1,C=1;C<=S;C++){var w=C/S;ei(m,g,v,b,w,i),ei(h,_,y,x,w,a),m=i[3],h=a[3],d.push(i[1],a[1],i[2],a[2],m,h),g=i[5],_=a[5],v=i[6],y=a[6]}f-=S-1}return o===e?[d,t]:[e,d]}function Q2(e,t){for(var n=e.length,r=e[n-2],i=e[n-1],a=[],o=0;o<t.length;)a[o++]=r,a[o++]=i;return a}function $2(e,t){for(var n,r,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var c=e[s],l=t[s],u=void 0,d=void 0;c?l?(n=Z2(c,l),u=n[0],d=n[1],r=u,i=d):(d=Q2(i||c,c),u=c):(u=Q2(r||l,l),d=l),a.push(u),o.push(d)}return[a,o]}function e4(e){for(var t=0,n=0,r=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],c=e[o+1],l=e[a],u=e[a+1],d=s*u-l*c;t+=d,n+=(s+l)*d,r+=(c+u)*d}return t===0?[e[0]||0,e[1]||0]:[n/t/3,r/t/3,t]}function t4(e,t,n,r){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,c=s-2,l=0;l<i;l++){for(var u=l*6,d=0,f=0;f<s;f+=2){var p=f===0?u:(u+f-2)%c+2,m=e[p]-n[0],h=e[p+1]-n[1],g=t[f]-r[0],_=t[f+1]-r[1],v=g-m,y=_-h;d+=v*v+y*y}d<a&&(a=d,o=l)}return o}function n4(e){for(var t=[],n=e.length,r=0;r<n;r+=2)t[r]=e[n-r-2],t[r+1]=e[n-r-1];return t}function r4(e,t,n,r){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],c=t[o],l=e4(s),u=e4(c);a??=l[2]<0!=u[2]<0;var d=[],f=[],p=0,m=1/0,h=[],g=s.length;a&&(s=n4(s));for(var _=t4(s,c,l,u)*6,v=g-2,y=0;y<v;y+=2){var b=(_+y)%v+2;d[y+2]=s[b]-l[0],d[y+3]=s[b+1]-l[1]}if(d[0]=s[_]-l[0],d[1]=s[_+1]-l[1],n>0)for(var x=r/n,S=-r/2;S<=r/2;S+=x){for(var C=Math.sin(S),w=Math.cos(S),T=0,y=0;y<s.length;y+=2){var E=d[y],D=d[y+1],O=c[y]-u[0],k=c[y+1]-u[1],A=O*w-k*C,j=O*C+k*w;h[y]=A,h[y+1]=j;var ee=A-E,te=j-D;T+=ee*ee+te*te}if(T<m){m=T,p=S;for(var M=0;M<h.length;M++)f[M]=h[M]}}else for(var ne=0;ne<g;ne+=2)f[ne]=c[ne]-u[0],f[ne+1]=c[ne+1]-u[1];i.push({from:d,to:f,fromCp:l,toCp:u,rotation:-p})}return i}function i4(e){return e.__isCombineMorphing}var a4=`__mOriginal_`;function o4(e,t,n){var r=a4+t,i=e[r]||e[t];e[r]||(e[r]=e[t]);var a=n.replace,o=n.after,s=n.before;e[t]=function(){var e=arguments,t;return s&&s.apply(this,e),t=a?a.apply(this,e):i.apply(this,e),o&&o.apply(this,e),t}}function s4(e,t){var n=a4+t;e[n]&&(e[t]=e[n],e[n]=null)}function c4(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;){var a=r[i],o=r[i+1];r[i++]=t[0]*a+t[2]*o+t[4],r[i++]=t[1]*a+t[3]*o+t[5]}}function l4(e,t){var n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),i=$2(P2(n),P2(r)),a=i[0],o=i[1],s=e.getComputedTransform(),c=t.getComputedTransform();function l(){this.transform=null}s&&c4(a,s),c&&c4(o,c),o4(t,`updateTransform`,{replace:l}),t.transform=null;var u=r4(a,o,10,Math.PI),d=[];o4(t,`buildPath`,{replace:function(e){for(var n=t.__morphT,r=1-n,i=[],a=0;a<u.length;a++){var o=u[a],s=o.from,c=o.to,l=o.rotation*n,f=o.fromCp,p=o.toCp,m=Math.sin(l),h=Math.cos(l);nn(i,f,p,n);for(var g=0;g<s.length;g+=2){var _=s[g],v=s[g+1],y=c[g],b=c[g+1],x=_*r+y*n,S=v*r+b*n;d[g]=x*h-S*m+i[0],d[g+1]=x*m+S*h+i[1]}var C=d[0],w=d[1];e.moveTo(C,w);for(var g=2;g<s.length;){var y=d[g++],b=d[g++],T=d[g++],E=d[g++],D=d[g++],O=d[g++];C===y&&w===b&&T===D&&E===O?e.lineTo(D,O):e.bezierCurveTo(y,b,T,E,D,O),C=D,w=O}}}})}function u4(e,t,n){if(!e||!t)return t;var r=n.done,i=n.during;l4(e,t),t.__morphT=0;function a(){s4(t,`buildPath`),s4(t,`updateTransform`),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},I({during:function(e){t.dirtyShape(),i&&i(e)},done:function(){a(),r&&r()}},n)),t}function d4(e,t,n,r,i,a){var o=16;e=i===n?0:Math.round(32767*(e-n)/(i-n)),t=a===r?0:Math.round(32767*(t-r)/(a-r));for(var s=0,c,l=(1<<o)/2;l>0;l/=2){var u=0,d=0;(e&l)>0&&(u=1),(t&l)>0&&(d=1),s+=l*l*(3*u^d),d===0&&(u===1&&(e=l-1-e,t=l-1-t),c=e,e=t,t=c)}return s}function f4(e){var t=1/0,n=1/0,r=-1/0,i=-1/0;return R(R(e,function(e){var a=e.getBoundingRect(),o=e.getComputedTransform(),s=a.x+a.width/2+(o?o[4]:0),c=a.y+a.height/2+(o?o[5]:0);return t=Math.min(s,t),n=Math.min(c,n),r=Math.max(s,r),i=Math.max(c,i),[s,c]}),function(a,o){return{cp:a,z:d4(a[0],a[1],t,n,r,i),path:e[o]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function p4(e){return X2(e.path,e.count)}function m4(){return{fromIndividuals:[],toIndividuals:[],count:0}}function h4(e,t,n){var r=[];function i(e){for(var t=0;t<e.length;t++){var n=e[t];i4(n)?i(n.childrenRef()):n instanceof Cu&&r.push(n)}}i(e);var a=r.length;if(!a)return m4();var o=(n.dividePath||p4)({path:t,count:a});if(o.length!==a)return console.error(`Invalid morphing: unmatched splitted path`),m4();r=f4(r),o=f4(o);for(var s=n.done,c=n.during,l=n.individualDelay,u=new fo,d=0;d<a;d++){var f=r[d],p=o[d];p.parent=t,p.copyTransform(u),l||l4(f,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return o};function m(e){for(var t=0;t<o.length;t++)o[t].addSelfToZr(e)}o4(t,`addSelfToZr`,{after:function(e){m(e)}}),o4(t,`removeSelfFromZr`,{after:function(e){for(var t=0;t<o.length;t++)o[t].removeSelfFromZr(e)}});function h(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,s4(t,`addSelfToZr`),s4(t,`removeSelfFromZr`)}var g=o.length;if(l)for(var _=g,v=function(){_--,_===0&&(h(),s&&s())},d=0;d<g;d++){var y=l?I({delay:(n.delay||0)+l(d,g,r[d],o[d]),done:v},n):n;u4(r[d],o[d],y)}else t.__morphT=0,t.animateTo({__morphT:1},I({during:function(e){for(var n=0;n<g;n++){var r=o[n];r.__morphT=t.__morphT,r.dirtyShape()}c&&c(e)},done:function(){h();for(var t=0;t<e.length;t++)s4(e[t],`updateTransform`);s&&s()}},n));return t.__zr&&m(t.__zr),{fromIndividuals:r,toIndividuals:o,count:g}}function g4(e,t,n){var r=t.length,i=[],a=n.dividePath||p4;function o(e){for(var t=0;t<e.length;t++){var n=e[t];i4(n)?o(n.childrenRef()):n instanceof Cu&&i.push(n)}}if(i4(e)){o(e.childrenRef());var s=i.length;if(s<r)for(var c=0,l=s;l<r;l++)i.push(Pf(i[c++%s]));i.length=r}else{i=a({path:e,count:r});for(var u=e.getComputedTransform(),l=0;l<i.length;l++)i[l].setLocalTransform(u);if(i.length!==r)return console.error(`Invalid morphing: unmatched splitted path`),m4()}i=f4(i),t=f4(t);for(var d=n.individualDelay,l=0;l<r;l++){var f=d?I({delay:(n.delay||0)+d(l,r,i[l],t[l])},n):n;u4(i[l],t[l],f)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function _4(e){return B(e[0])}function v4(e,t){for(var n=[],r=e.length,i=0;i<r;i++)n.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)n[o%r].many.push(t[i][o])}for(var s=0,i=r-1;i>=0;i--)if(!n[i].many.length){var c=n[s].many;if(c.length<=1)if(s)s=0;else return n;var a=c.length,l=Math.ceil(a/2);n[i].many=c.slice(l,a),n[s].many=c.slice(0,l),s++}return n}var y4={clone:function(e){for(var t=[],n=1-(1-e.path.style.opacity)**(1/e.count),r=0;r<e.count;r++){var i=Pf(e.path);i.setStyle(`opacity`,n),t.push(i)}return t},split:null};function b4(e,t,n,r,i,a){if(!e.length||!t.length)return;var o=Fp(`update`,r,i);if(!(o&&o.duration>0))return;var s=r.getModel(`universalTransition`).get(`delay`),c=Object.assign({setToFinal:!0},o),l,u;_4(e)&&(l=e,u=t),_4(t)&&(l=t,u=e);function d(e,t,r,i,o){var l=e.many,u=e.one;if(l.length===1&&!o){var f=t?l[0]:u,p=t?u:l[0];if(i4(f))d({many:[f],one:p},!0,r,i,!0);else{var m=s?I({delay:s(r,i)},c):c;u4(f,p,m),a(f,p,f,p,m)}}else for(var h=I({dividePath:y4[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),g=t?h4(l,u,h):g4(u,l,h),_=g.fromIndividuals,v=g.toIndividuals,y=_.length,b=0;b<y;b++){var m=s?I({delay:s(b,y)},c):c;a(_[b],v[b],t?l[b]:e.one,t?e.one:l[b],m)}}for(var f=l?l===e:e.length>t.length,p=l?v4(u,l):v4(f?t:e,[f?e:t]),m=0,h=0;h<p.length;h++)m+=p[h].many.length;for(var g=0,h=0;h<p.length;h++)d(p[h],f,g,m),g+=p[h].many.length}function x4(e){if(!e)return[];if(B(e)){for(var t=[],n=0;n<e.length;n++)t.push(x4(e[n]));return t}var r=[];return e.traverse(function(e){e instanceof Cu&&!e.disableMorphing&&!e.invisible&&!e.ignore&&r.push(e)}),r}var S4=1e4,C4=0,w4=1,T4=2,E4=oc();function D4(e,t){for(var n=e.dimensions,r=0;r<n.length;r++){var i=e.getDimensionInfo(n[r]);if(i&&i.otherDims[t]===0)return n[r]}}function O4(e,t,n){var r=e.getDimensionInfo(n),i=r&&r.ordinalMeta;if(r){var a=e.get(r.name,t);return i&&i.categories[a]||a+``}}function k4(e,t,n,r){var i=D4(e,r?`itemChildGroupId`:`itemGroupId`);if(i)return O4(e,t,i);var a=e.getRawDataItem(t),o=r?`childGroupId`:`groupId`;if(a&&a[o])return a[o]+``;if(!r)return n||e.getId(t)}function A4(e){var t=[];return L(e,function(e){var n=e.data,r=e.dataGroupId;if(!(n.count()>S4))for(var i=n.getIndices(),a=0;a<i.length;a++)t.push({data:n,groupId:k4(n,a,r,!1),childGroupId:k4(n,a,r,!0),divide:e.divide,dataIndex:a})}),t}function j4(e,t,n){e.traverse(function(e){e instanceof Cu&&Rp(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function M4(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function N4(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function P4(e,t,n){var r=Fp(`update`,n,t);r&&e.traverse(function(e){if(e instanceof hl){var t=Wp(e);t&&e.animateFrom({style:t},r)}})}function F4(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++){var i=e[r],a=t[r];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function I4(e,t,n){var r=A4(e),i=A4(t);function a(e,t,n,r,i){(n||e)&&t.animateFrom({style:n&&n!==e?F(F({},n.style),e.style):e.style},i)}var o=!1,s=C4,c=G(),l=G();r.forEach(function(e){e.groupId&&c.set(e.groupId,!0),e.childGroupId&&l.set(e.childGroupId,!0)});for(var u=0;u<i.length;u++){var d=i[u].groupId;if(l.get(d)){s=w4;break}var f=i[u].childGroupId;if(f&&c.get(f)){s=T4;break}}function p(e,t){return function(n){var r=n.data,i=n.dataIndex;return t?r.getId(i):e?s===w4?n.childGroupId:n.groupId:s===T4?n.childGroupId:n.groupId}}var m=F4(r,i),h={};if(!m)for(var u=0;u<i.length;u++){var g=i[u],_=g.data.getItemGraphicEl(g.dataIndex);_&&(h[_.id]=!0)}function v(e,t){var n=r[t],s=i[e],c=s.data.hostModel,l=n.data.getItemGraphicEl(n.dataIndex),u=s.data.getItemGraphicEl(s.dataIndex);if(l===u){u&&P4(u,s.dataIndex,c);return}l&&h[l.id]||u&&(N4(u),l?(N4(l),M4(l),o=!0,b4(x4(l),x4(u),s.divide,c,e,a)):j4(u,c,e))}new Cw(r,i,p(!0,m),p(!1,m),null,`multiple`).update(v).updateManyToOne(function(e,t){var n=i[e],s=n.data,c=s.hostModel,l=s.getItemGraphicEl(n.dataIndex),u=lt(R(t,function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)}),function(e){return e&&e!==l&&!h[e.id]});l&&(N4(l),u.length?(L(u,function(e){N4(e),M4(e)}),o=!0,b4(x4(u),x4(l),n.divide,c,e,a)):j4(l,c,n.dataIndex))}).updateOneToMany(function(e,t){var n=r[t],s=n.data.getItemGraphicEl(n.dataIndex);if(!(s&&h[s.id])){var c=lt(R(e,function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)}),function(e){return e&&e!==s}),l=i[e[0]].data.hostModel;c.length&&(L(c,function(e){return N4(e)}),s?(N4(s),M4(s),o=!0,b4(x4(s),x4(c),n.divide,l,e[0],a)):L(c,function(t){return j4(t,l,e[0])}))}}).updateManyToMany(function(e,t){new Cw(t,e,function(e){return r[e].data.getId(r[e].dataIndex)},function(e){return i[e].data.getId(i[e].dataIndex)}).update(function(n,r){v(e[n],t[r])}).execute()}).execute(),o&&L(t,function(e){var t=e.data.hostModel,r=t&&n.getViewOfSeriesModel(t),i=Fp(`update`,t,0);r&&t.isAnimationEnabled()&&i&&i.duration>0&&r.group.traverse(function(e){e instanceof Cu&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function L4(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function R4(e){return B(e)?e.sort().join(`,`):e}function z4(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function B4(e,t){var n=G(),r=G(),i=G();return L(e.oldSeries,function(t,n){var a=e.oldDataGroupIds[n],o=e.oldData[n],s=L4(t),c=R4(s);r.set(c,{dataGroupId:a,data:o}),B(s)&&L(s,function(e){i.set(e,{key:c,dataGroupId:a,data:o})})}),L(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get(`dataGroupId`),a=e.getData(),o=L4(e),s=R4(o),c=r.get(s);if(c)n.set(s,{oldSeries:[{dataGroupId:c.dataGroupId,divide:z4(c.data),data:c.data}],newSeries:[{dataGroupId:t,divide:z4(a),data:a}]});else if(B(o)){var l=[];L(o,function(e){var t=r.get(e);t.data&&l.push({dataGroupId:t.dataGroupId,divide:z4(t.data),data:t.data})}),l.length&&n.set(s,{oldSeries:l,newSeries:[{dataGroupId:t,data:a,divide:z4(a)}]})}else{var u=i.get(o);if(u){var d=n.get(u.key);d||(d={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:z4(u.data)}],newSeries:[]},n.set(u.key,d)),d.newSeries.push({dataGroupId:t,data:a,divide:z4(a)})}}}}),n}function V4(e,t){for(var n=0;n<e.length;n++)if(t.seriesIndex!=null&&t.seriesIndex===e[n].seriesIndex||t.seriesId!=null&&t.seriesId===e[n].id)return n}function H4(e,t,n,r){var i=[],a=[];L(Rs(e.from),function(e){var n=V4(t.oldSeries,e);n>=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:z4(t.oldData[n]),groupIdDim:e.dimension})}),L(Rs(e.to),function(e){var r=V4(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:z4(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&I4(i,a,r)}function U4(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){L(Rs(n.seriesTransition),function(e){L(Rs(e.to),function(e){for(var t=n.updatedSeries,r=0;r<t.length;r++)(e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id)&&(t[r][gb]=!0)})})}),e.registerUpdateLifecycle(`series:transition`,function(e,t,n){var r=E4(t);if(r.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(Rs(i),function(e){H4(e,r,n,t)});else{var a=B4(r,n);L(a.keys(),function(e){var n=a.get(e);I4(n.oldSeries,n.newSeries,t)})}L(n.updatedSeries,function(e){e.__universalTransitionEnabled&&(e[gb]=!1)})}for(var o=e.getSeries(),s=r.oldSeries=[],c=r.oldDataGroupIds=[],l=r.oldData=[],u=0;u<o.length;u++){var d=o[u].getData();d.count()<S4&&(s.push(o[u]),c.push(o[u].get(`dataGroupId`)),l.push(d))}})}var W4=function(){function e(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return e.prototype.setBreaks=function(e){this.breaks=e.breaks},e.prototype.update=function(e){J4(this,e);var t=this._elapsedExtent;t[0]=this.elapse(e[0]),t[1]=this.elapse(e[1])},e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(e,t){for(var n=0;n<this.breaks.length;n++){var r=this.breaks[n];if(r.vmin<e&&e<r.vmax)return t(e,r.vmax)}return 0},e.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},e.prototype.normalize=function(e){var t=this._elapsedExtent[1]-this._elapsedExtent[0];return t===0?.5:(this.elapse(e)-this._elapsedExtent[0])/t},e.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},e.prototype.elapse=function(e){for(var t=K4,n=q4,r=!0,i=0;i<this.breaks.length;i++){var a=this.breaks[i];if(e<=a.vmax){e>a.vmin?t+=a.vmin-n+(e-a.vmin)/(a.vmax-a.vmin)*a.gapReal:t+=e-n,n=a.vmax,r=!1;break}t+=a.vmin-n+a.gapReal,n=a.vmax}return r&&(t+=e-n),t},e.prototype.unelapse=function(e){for(var t=K4,n=q4,r=!0,i=0,a=0;a<this.breaks.length;a++){var o=this.breaks[a],s=t+o.vmin-n,c=s+o.gapReal;if(e<=c){i=e>s?o.vmin+(e-s)/(c-s)*(o.vmax-o.vmin):n+e-t,n=o.vmax,r=!1;break}t=c,n=o.vmax}return r&&(i=n+e-t),i},e}();function G4(){return new W4}var K4=0,q4=0;function J4(e,t){var n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};L(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=Z4(e,t);if(o){var s=o.vmin!==e.vmin,c=o.vmax!==e.vmax,l=o.vmax-o.vmin;if(!(s&&c))if(s||c){var u=s?`S`:`E`;a[u][i.type].has=!0,a[u][i.type].span=l,a[u][i.type].inExtFrac=l/(e.vmax-e.vmin),a[u][i.type].val=i.val}else r[i.type].span+=l,r[i.type].val+=i.val}});var o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));L(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:Math.max(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function Y4(e,t,n,r,i,a){e!==`no`&&L(n,function(n){var o=Z4(n,a);if(o)for(var s=t.length-1;s>=0;s--){var c=t[s],l=r(c),u=i*3/4;l>o.vmin-u&&l<o.vmax+u&&(e!==`preserve_extent_bound`||l!==a[0]&&l!==a[1])&&t.splice(s,1)}})}function X4(e,t,n,r){L(t,function(t){var i=Z4(t,n);i&&(e.push({value:i.vmin,break:{type:`vmin`,parsedBreak:i},time:r?r(i):void 0}),e.push({value:i.vmax,break:{type:`vmax`,parsedBreak:i},time:r?r(i):void 0}))}),t.length&&e.sort(function(e,t){return e.value-t.value})}function Z4(e,t){var n=Math.max(e.vmin,t[0]),r=Math.min(e.vmax,t[1]);return n<r||n===r&&n>t[0]&&n<t[1]?{vmin:n,vmax:r,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function Q4(e,t,n){var r=[];if(!e)return{breaks:r};function i(e,t){return e>=0&&e<.99999}L(e,function(e){if(!(!e||e.start==null||e.end==null)&&!e.isExpanded){var a={breakOption:P(e),vmin:t(e.start),vmax:t(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){var o=!1;if(H(e.gap)){var s=Ot(e.gap);if(s.match(/%$/)){var c=parseFloat(s)/100;i(c,`Percent gap`)||(c=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=c,o=!0}}if(!o){var l=t(e.gap);(!isFinite(l)||l<0)&&(l=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=l}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&L([`vmin`,`vmax`],function(e){a[e]<0&&(a[e]=0)}),a.vmin>a.vmax){var u=a.vmax;a.vmax=a.vmin,a.vmin=u}r.push(a)}}),r.sort(function(e,t){return e.vmin-t.vmin});var a=-1/0;return L(r,function(e,t){a>e.vmin&&(r[t]=null),a=e.vmax}),{breaks:r.filter(function(e){return!!e})}}function $4(e,t){return e3(t)===e3(e)}function e3(e){return e.start+`_\0_`+e.end}function t3(e,t,n){var r=[];L(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),L(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=ut(r,function(n){return $4(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return L(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function n3(e,t,n,r){var i,a;if(e.break){var o=e.break.parsedBreak,s=ut(n,function(t){return $4(t.breakOption,e.break.parsedBreak.breakOption)}),c=r(t**+o.vmin,s.vmin),l=r(t**+o.vmax,s.vmax),u={type:o.gapParsed.type,val:o.gapParsed.type===`tpAbs`?cs(t**+(o.vmin+o.gapParsed.val))-c:o.gapParsed.val};i={type:e.break.type,parsedBreak:{breakOption:o.breakOption,vmin:c,vmax:l,gapParsed:u,gapReal:o.gapReal}},a=s[e.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function r3(e,t,n){var r={noNegative:!0},i=Q4(e,n,r),a=Q4(e,n,r),o=Math.log(t);return a.breaks=R(a.breaks,function(e){var t=Math.log(e.vmin)/o;return{vmin:t,vmax:Math.log(e.vmax)/o,gapParsed:{type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?Math.log(e.vmin+e.gapParsed.val)/o-t:e.gapParsed.val},gapReal:e.gapReal,breakOption:e.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var i3={vmin:`start`,vmax:`end`};function a3(e,t){return t&&(e||={},e.break={type:i3[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function o3(){Oh({createScaleBreakContext:G4,pruneTicksByBreak:Y4,addBreaksToTicks:X4,parseAxisBreakOption:Q4,identifyAxisBreak:$4,serializeAxisBreakIdentifier:e3,retrieveAxisBreakPairs:t3,getTicksLogTransformBreak:n3,logarithmicParseBreaksFromOption:r3,makeAxisLabelFormatterParamBreak:a3})}var s3=oc();function c3(e,t){var n=ut(e,function(e){return kh().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function l3(e){L(e,function(e){return e.shouldRemove=!0})}function u3(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function d3(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!kh())return;var o=kh().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1);if(!o.length)return;var s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);var d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new Y({ignoreModelZ:!0}),y=a.isHorizontal(),b=s3(t).visualList||(s3(t).visualList=[]);l3(b);for(var x=function(e){var t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]<r[0]&&r.reverse();var s=c3(b,t);s.shouldRemove=!1;var c=new Y;C(s.zigzagRandomList,c,r[0],r[1],y,t),d&&c.on(`click`,function(){var e={type:NM,breaks:[{start:t.breakOption.start,end:t.breakOption.end}]};e[a.dim+`AxisIndex`]=n.componentIndex,i.dispatchAction(e)}),c.silent=!d,v.add(c)},S=0;S<o.length;S++)x(S);e.add(v),u3(b);function C(e,t,n,i,a,o){var s={stroke:m,lineWidth:h,lineDash:g,fill:`none`},d=+!a,v=1-d,y=r[qp[v]]+r[Jp[v]];function b(e){var t=[],n=[];t[d]=n[d]=e,t[v]=r[qp[v]],n[v]=y;var i={x1:t[0],y1:t[1],x2:n[0],y2:n[1]};return Mu(i,i,{lineWidth:1}),t[0]=i.x1,t[1]=i.y1,t[d]}n=b(n),i=b(i);for(var x=[],S=[],C=!0,w=r[qp[v]],T=0;;T++){var E=w===r[qp[v]],D=w>=y;D&&(w=y);var O=[],k=[];O[d]=n,k[d]=i,!E&&!D&&(O[d]+=C?-c:c,k[d]-=C?c:-c),O[v]=w,k[v]=w,x.push(O),S.push(k);var A=void 0;if(T<e.length?A=e[T]:(A=Math.random(),e.push(A)),w+=A*(u-l)+l,C=!C,D)break}var j=kh().serializeAxisBreakIdentifier(o.breakOption);if(t.add(new lp({anid:`break_a_`+j,shape:{points:x},style:s,z:f})),o.gapReal!==0){t.add(new lp({anid:`break_b_`+j,shape:{points:S},style:s,z:f}));var ee=S.slice();ee.reverse();var te=x.concat(ee);t.add(new sp({anid:`break_c_`+j,shape:{points:te},style:{fill:_,opacity:p.opacity},z:f}))}}}function f3(e,t,n,r){var i=e.axis,a=n.transform;Dt(r.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=R(kh().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1),function(e){var t=e[0].break.parsedBreak,n=[i.dataToCoord(t.vmin,!0),i.dataToCoord(t.vmax,!0)];return n[0]>n[1]&&n.reverse(),{coordPair:n,brkId:kh().serializeAxisBreakIdentifier(t.breakOption)}});s.sort(function(e,t){return e.coordPair[0]-t.coordPair[0]});for(var c=o[0],l=null,u=0;u<s.length;u++){var d=s[u],f=Math.max(d.coordPair[0],o[0]),p=Math.min(d.coordPair[1],o[1]);c<=f&&m(c,f,l,d),c=p,l=d}c<=o[1]&&m(c,o[1],l,null);function m(e,n,i,o){function s(e,t){a&&(rn(e,e,a),rn(t,t,a))}function c(e,t){var n={x1:e[0],y1:e[1],x2:t[0],y2:t[1]};Mu(n,n,r.style),e[0]=n.x1,e[1]=n.y1,t[0]=n.x2,t[1]=n.y2}var l=[e,0],u=[n,0],d=[e,5],f=[n,5];s(l,d),c(l,d),s(u,f),c(u,f),c(l,u);var p=new fp(F({shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]}},r));t.add(p),p.anid=`breakLine_`+(i?i.brkId:`\0`)+`_\0_`+(o?o.brkId:`\0`)}}function p3(e,t,n){if(ut(n,function(e){return!e}))return;var r=new q;if(!dO(n[0],n[1],r,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=Bn();Gn(i,i,-t);var a=R(n,function(e){return e.transform?Un(Bn(),i,e.transform):i});function o(e){var t=n[0].localRect,r=new q(t[Jp[e]]*a[0][0],t[Jp[e]]*a[0][1]);return Math.abs(r.y)<1e-5}var s=.5;if(o(0)||o(1)){var c=R(n,function(e,t){var n=e.localRect.clone();return n.applyTransform(a[t]),n}),l=new q;l.copy(n[0].label).add(n[1].label).scale(.5),l.transform(i);var u=r.clone().transform(i),d=(c[0].x+c[1].x+(u.x>=0?c[0].width:c[1].width)+u.x)/2-l.x,f=Math.min(d,d-u.x),p=Math.max(d,d-u.x);s=(d-(p<0?p:f>0?f:0))/u.x}var m=new q,h=new q;q.scale(m,r,-s),q.scale(h,r,1-s),aO(n[0],m),aO(n[1],h)}function m3(e,t){var n={breaks:[]};return L(t.breaks,function(r){if(r){var i=ut(e.get(`breaks`,!0),function(e){return kh().identifyAxisBreak(e,r)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),n}function h3(){wM({adjustBreakLabelPair:p3,buildAxisBreakLine:f3,rectCoordBuildBreakAxis:d3,updateModelAxisBreak:m3})}function g3(e){VM(e),o3(),h3()}function _3(){IN(v3)}function v3(e,t){L(e,function(e){if(!e.model.get([`axisLabel`,`inside`])){var n=y3(e);if(n){var r=e.isHorizontal()?`height`:`width`,i=e.model.get([`axisLabel`,`margin`]);t[r]-=n[r]+i,e.position===`top`?t.y+=n.height+i:e.position===`left`&&(t.x+=n.width+i)}}})}function y3(e){var t=e.model,n=e.scale;if(!t.get([`axisLabel`,`show`])||n.isBlank())return;var r,i,a=n.getExtent();n instanceof AT?i=n.count():(r=n.getTicks(),i=r.length);var o=e.getLabelModel(),s=TE(e),c,l=1;i>40&&(l=Math.ceil(i/40));for(var u=0;u<i;u+=l){var d=s(r?r[u]:{value:a[0]+u},u),f=p(o.getTextRect(d),o.get(`rotate`)||0);c?c.union(f):c=f}return c;function p(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,a=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),o=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new J(e.x,e.y,a,o)}}bw([uA]),bw([eA]),bw([aj,zj,sM,yP,PP,AI,CL,qR,cB,vB,TB,NB,EH,nU,vU,WU,YU,uW,vW,KW,eG,gG,GK]),bw(zq),bw(xJ),bw(kI),bw(BJ),bw(TH),bw(qJ),bw(nX),bw(bX),bw(UZ),bw(xQ),bw(Rq),bw(ZQ),bw(e$),bw(v$),bw(V$),bw(Z$),bw(c1),bw(P1),bw(u0),bw(Y1),bw(l0),bw($0),bw(q0),bw(Q0),bw(a2),bw(d2),bw(O2),bw(j2),bw(U4),bw(SO),bw(g3),bw(_3),bw(bP);var b3={default:{background:`#ffffff`,border:`1px solid #e5e7eb`,color:`#374151`,cursor:`pointer`},hover:{background:`#f9fafb`,border:`1px solid #d1d5db`,color:`#111827`,cursor:`pointer`},active:{background:`#f3f4f6`,border:`1px solid #9ca3af`,cursor:`pointer`},disabled:{background:`#ffffff`,border:`1px solid #e5e7eb`,color:`#9ca3af`,cursor:`default`}},x3={default:{background:`#21262d`,border:`1px solid #30363d`,color:`#c9d1d9`,cursor:`pointer`},hover:{background:`#30363d`,border:`1px solid #8b949e`,color:`#e6edf3`,cursor:`pointer`},active:{background:`#3d444d`,border:`1px solid #8b949e`,cursor:`pointer`},disabled:{background:`#21262d`,border:`1px solid #30363d`,color:`#484f58`,cursor:`default`}};function S3({children:e,colorScheme:t,disabled:n,onClick:r}){let[i,a]=(0,f.useState)(!1),[o,s]=(0,f.useState)(!1);return(0,m.jsx)(`button`,{disabled:n,type:`button`,style:{pointerEvents:`all`,borderRadius:8,fontWeight:600,fontSize:12,padding:`4px 10px`,transition:`background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease`,...(()=>{let e=t?.toLowerCase()===`dark`?x3:b3;return n?e.disabled:o?e.active:i?e.hover:e.default})()},onClick:r,onMouseEnter:()=>a(!0),onMouseLeave:()=>{a(!1),s(!1)},onMouseDown:()=>!n&&s(!0),onMouseUp:()=>s(!1),children:e})}function C3(e){let t=(0,f.useRef)(e);return t.current=e,t}function w3(e,t){let[{data:n}]=e,r=n.cols.findIndex(e=>e.name===t.dimension),i=n.cols.findIndex(e=>e.name===t.metric);if(r===-1||i===-1)throw Error(`There is no valid columns to render a chart`);let a=n.rows.map(e=>[String(e[r]),Number(e[i])]),o=T3(a.map(([e])=>e));return{data:a,years:o,latestYear:o.length?o[o.length-1]:new Date().getFullYear(),dimensionCol:n.cols[r],metricCol:n.cols[i]}}function T3(e){let t=new Set;return e.forEach(e=>{let n=new Date(e);isNaN(n.getTime())||t.add(n.getFullYear())}),Array.from(t).sort((e,t)=>e-t)}function E3(e,t){let{data:n}=w3(e,t),r=n.map(([e])=>D3(e)),i=new Set;for(let e of r){if(i.has(e))return!0;i.add(e)}return!1}function D3(e){return new Date(e).toLocaleDateString(`en-CA`)}function O3(e){let t=[],n=new Date(e,0,1),r=new Date(e,11,31);for(let e=new Date(n);e<=r;e.setDate(e.getDate()+1))t.push(D3(e));return t}function k3(e,t){return v(e,{column:{...t,unit:`month-of-year`},date_abbreviate:!0})}function A3(e,t){return v(e,{column:{...t,unit:`day-of-week`},date_abbreviate:!0})}function j3(e){let t=new Date(2024,0,7);return Array.from({length:7},(n,r)=>{let i=new Date(t);return i.setDate(t.getDate()+r),A3(i,e)})}function M3(e){return Math.max(1,Math.floor((e-12)/3))}function N3(e,t){return e===`square`?0:e===`circle`?Math.floor(t/2):M3(t)}function P3(e){return Math.max(12,Math.min(30,Math.floor((e-30-20)/53)))}function F3(e){return 50+53*e}function I3(e){return 42+7*e+8+30}var L3=(e,t,n,r,i,a,o,s)=>{let c=Ae(n),l=r===`dark`,u=l?Se:xe,d=e.filter(([e])=>{let n=new Date(e);return!isNaN(n.getTime())&&n.getFullYear()===t}),f=d.map(([e,t])=>t),p=new Map(d.map(([e,t])=>[D3(e),t])),m=O3(t),h=m.filter(e=>p.has(e)).map(e=>[e,p.get(e)]),g=m.filter(e=>!p.has(e)).map(e=>[e,0]),_=f.length?Math.min(...f):0,y=f.length?Math.max(...f):100,b=N3(a,i);return{backgroundColor:`transparent`,tooltip:{show:!1},visualMap:{min:_,max:y,type:`piecewise`,orient:`horizontal`,top:24+7*i+8,left:`center`,bottom:null,itemSymbol:`circle`,seriesIndex:1,inRange:{color:c},pieces:[{min:0,max:0,color:c.empty},{gt:0,lte:y*.25,color:c.low},{gt:y*.25,lte:y*.5,color:c[`medium-low`]},{gt:y*.5,lte:y*.75,color:c[`medium-high`]},{gt:y*.75,color:c.high}],showLabel:!1,formatter:e=>v(e,{column:s}),text:[`More`,`Less`],itemWidth:10,itemHeight:10,itemGap:5},calendar:{top:24,left:50,bottom:null,cellSize:[i,i],range:t,itemStyle:{color:`transparent`,borderWidth:4,borderColor:`transparent`,borderRadius:b},splitLine:{show:!1},yearLabel:{show:!1},dayLabel:{show:!0,silent:!0,firstDay:0,color:u,fontSize:11,nameMap:j3(o)},monthLabel:{silent:!0,color:u,fontSize:11,formatter:e=>k3(new Date(parseInt(e.yyyy),e.M),o)}},series:[{type:`heatmap`,coordinateSystem:`calendar`,data:g,silent:!0,itemStyle:{color:l?Te:we,borderRadius:b}},{type:`heatmap`,coordinateSystem:`calendar`,data:h,itemStyle:{borderRadius:b}}]}};function R3({height:e,width:t,settings:n,series:r,onClick:i,onHover:a,colorScheme:o}){let s=(0,f.useRef)(null),c=(0,f.useRef)(null),l=C3(i),u=C3(a),d=C3(r),p=C3(n),[h,g]=(0,f.useState)(null),{data:_,years:v,latestYear:y,dimensionCol:b,metricCol:x}=w3(r,n);(0,f.useEffect)(()=>{g(y)},[y]),(0,f.useEffect)(()=>{if(!s.current)return;let e=ew(s.current);return c.current=e,S(e),e.on(`click`,e=>{if(typeof l.current!=`function`)return;if(e.seriesIndex===0){l.current(null);return}let[t,n]=e.data,r=d.current[0].data.cols,i=d.current[0].data.rows,a=r.findIndex(e=>e.name===p.current.dimension),o=r.findIndex(e=>e.name===p.current.metric),s=r[a],c=r[o],u=D3(t),f=i.find(e=>D3(String(e[a]))===u),m={value:n,column:c,dimensions:s?[{value:t,column:s}]:[],event:e.event?.event,origin:f?{row:f,cols:r}:void 0,settings:p.current};l.current(m)}),()=>{e.dispose(),c.current=null}},[o]);let S=e=>{e.on(`mouseover`,t=>{if(typeof u.current!=`function`||t.seriesIndex===0)return;let[n,r]=t.data,i=d.current[0].data.cols,a=i.findIndex(({name:e})=>e===p.current.dimension),o=i.findIndex(({name:e})=>e===p.current.metric),s=i[a],c=i[o],l=e.convertToPixel(`calendar`,[n]),f=e.getDom().getBoundingClientRect();u.current({value:r,column:c,dimensions:[{value:n,column:s}],data:[{key:s.display_name,col:s,value:n},{key:c.display_name,col:c,value:r}],event:new MouseEvent(`mouseover`,{clientX:f.left+l[0],clientY:f.top+l[1]})})}),e.on(`mouseout`,()=>u.current?.(null))},C=h??y,w=v.indexOf(C),T=w>0,E=w<v.length-1,D=n.color??`#85b8e8`,O=n.cellShape,k=t?P3(t):0,A=(0,f.useMemo)(()=>L3(_,C,D,o,k,O,b,x),[_,C,D,o,k,O,b,x]);(0,f.useEffect)(()=>{c.current?.setOption(A,!0)},[A]),(0,f.useEffect)(()=>{c.current?.resize()},[t,e]);let j=F3(k);return(0,m.jsx)(`div`,{style:{position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`center`,height:`100%`,justifyContent:`center`},children:(0,m.jsxs)(`div`,{style:{overflowX:`auto`,width:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,m.jsxs)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,gap:16,marginBottom:10,marginTop:10,width:j},children:[(0,m.jsx)(S3,{onClick:()=>g(v[w-1]),disabled:!T,colorScheme:o,children:`Previous`}),(0,m.jsx)(`span`,{style:{fontSize:16,fontWeight:500},children:C}),(0,m.jsx)(S3,{onClick:()=>g(v[w+1]),disabled:!E,colorScheme:o,children:`Next`})]}),(0,m.jsx)(`div`,{ref:s,style:{width:j,height:I3(k)}})]})})}var z3=20,B3=[{value:`square`,rx:0,label:`Square`},{value:`rounded`,rx:4,label:`Rounded square`},{value:`circle`,rx:z3/2,label:`Circle`}];function V3({value:e=`rounded`,onChange:t}){return(0,m.jsx)(`div`,{style:{display:`flex`,gap:8},children:B3.map(({value:n,rx:r,label:i})=>(0,m.jsx)(`button`,{style:{border:`1px solid ${e===n?`var(--mb-color-brand)`:`var(--mb-color-border)`}`,borderRadius:4,background:`none`,cursor:`pointer`,padding:4,display:`flex`},title:i,onClick:()=>t(n),children:(0,m.jsx)(`svg`,{width:z3,height:z3,children:(0,m.jsx)(`rect`,{width:z3,height:z3,rx:r,ry:r,fill:`var(--mb-color-brand)`})})},n))})}function H3(e){return g(e)}function U3(e){return!H3(e)&&_(e)}function W3(e){return e.find(H3)?.name}function G3(e){return e.find(U3)?.name}return({defineSetting:e})=>S({id:`calendar-heatmap`,getName:()=>`Calendar Heatmap`,minSize:{width:8,height:3},defaultSize:{width:20,height:6},checkRenderable(e,t){if(e.length===0)throw Error(`No series provided`);let n=e[0]?.data?.cols??[],r=t.dimension??W3(n),i=t.metric??G3(n),a=n.find(e=>e.name===r&&H3(e)),o=n.find(e=>e.name===i&&U3(e));if(!a)throw Error(`Please select a date column for the dimension.`);if(!o)throw Error(`Please select a numeric column for the metric.`);if(E3(e,{...t,dimension:r,metric:i}))throw Error(`Data is unbinned: multiple entries with the same date. Please aggregate date column by day.`)},settings:{dimension:e({id:`dimension`,section:`Data`,title:`Date column`,widget:`field`,getDefault:e=>W3(e?.[0]?.data?.cols??[]),getProps:e=>{let t=(e?.[0]?.data?.cols??[]).filter(H3);return{columns:t,options:t.map(({display_name:e,name:t})=>({name:e,value:t}))}}}),metric:e({id:`metric`,section:`Data`,title:`Metric column`,widget:`field`,getDefault:e=>G3(e?.[0]?.data?.cols??[]),getProps:e=>{let t=(e?.[0]?.data?.cols??[]).filter(U3);return{columns:t,options:t.map(({display_name:e,name:t})=>({name:e,value:t}))}}}),color:e({id:`color`,section:`Display`,title:`Color`,widget:`color`,getDefault:()=>Ce,getProps:()=>({})}),cellShape:e({id:`cellShape`,section:`Display`,title:`Cell Shape`,widget:V3,getDefault:()=>{},getProps:()=>({options:[{name:`Square`,value:`square`},{name:`Rounded square`,value:`rounded`},{name:`Circle`,value:`circle`}]})})},VisualizationComponent:R3})})();\ No newline at end of file