diff --git a/.storybook/manager.ts b/.storybook/manager.ts new file mode 100644 index 0000000..f6f2fc3 --- /dev/null +++ b/.storybook/manager.ts @@ -0,0 +1,6 @@ +import { addons } from '@storybook/manager-api'; +import customTheme from './theme'; + +addons.setConfig({ + theme: customTheme, +}); \ No newline at end of file diff --git a/.storybook/preview.ts b/.storybook/preview.ts index 3bf6ee8..350fc88 100644 --- a/.storybook/preview.ts +++ b/.storybook/preview.ts @@ -9,7 +9,7 @@ const preview: Preview = { }, }, options: { storySort: { - order: ['nbody', 'Installation', 'Quick Start', 'Integration', 'Contribute', 'Define', ['Intro', 'Force', 'Simulate Function', 'Transformation'], 'Visualize', ['Intro', 'Dimension', 'Multiverse', 'Record', 'Controller', 'Trails', 'Debug Info'], 'Showcase', ['Intro', 'Analemma', ['Intro', 'Sun-Earth', 'Sun-Mars'],'HorseshoeOrbit', ['Intro', '54509 YORP'], 'SolarSystem']], + order: ['nbody', 'Installation', 'Quick Start', 'Integration', 'Contribute', 'Define', ['Intro', 'Force', 'Simulate Function', 'Transformation'], 'Visualize', ['Intro', 'Dimension', 'Multiverse', 'Record', 'Controller', 'Trails', 'Debug Info'], 'Showcase', ['Intro', 'Analemma', ['Intro', 'Sun-Earth', 'Sun-Mars'],'Horseshoe Orbit', ['Intro', '2010 SO16', '54509 YORP'], 'Solar System', ['Simulate', 'Recorded']]], }, } }, diff --git a/.storybook/stories/Contribute.mdx b/.storybook/stories/Contribute.mdx index a00ac21..214188a 100644 --- a/.storybook/stories/Contribute.mdx +++ b/.storybook/stories/Contribute.mdx @@ -83,3 +83,5 @@ Development setup of the project Contributors are free to pick up any of the following tasks or suggest new features. - Setup a bundled version of the project for CDN deployment +- `enhancement` Provide more predefined simulate functions +- `enhancement` Allow users to use custom shapes/textures for bodies \ No newline at end of file diff --git a/.storybook/stories/Define/Force.mdx b/.storybook/stories/Define/Force.mdx index 3112369..7e8f230 100644 --- a/.storybook/stories/Define/Force.mdx +++ b/.storybook/stories/Define/Force.mdx @@ -4,7 +4,7 @@ import { Meta, Story } from '@storybook/blocks'; # Force -A force object encapsulates logic for calculating forces acting on celestial bodies due to other objects or environment. It has a getForces method that takes in an array of celestial bodies and returns an array of forces acting on each body. It is defined as the following Typescript interface. +A **Force** object encapsulates logic for calculating forces acting on celestial bodies due to other objects or environment. It has a `getForces` method that takes in an array of celestial bodies and returns an array of forces acting on each body. It is defined as the following Typescript interface. ```typescript interface Force { diff --git a/.storybook/stories/Define/SimulateFunction.mdx b/.storybook/stories/Define/SimulateFunction.mdx index 98bef1b..5ed8d01 100644 --- a/.storybook/stories/Define/SimulateFunction.mdx +++ b/.storybook/stories/Define/SimulateFunction.mdx @@ -4,7 +4,7 @@ import { Meta, Story } from '@storybook/blocks'; # Simulate Function -A **Simulate Function** object encapsulates logic for advancing the state of the universe over time, usually using [numerical integration](https://en.wikipedia.org/wiki/Numerical_integration). It has a simulate method that takes in a time step, current state of the universe, (optionally the previous state of the universe) and returns the next state of the universe. +A **Simulate Function** object encapsulates logic for advancing the state of the universe over time, usually using [numerical integration](https://en.wikipedia.org/wiki/Numerical_integration). It has a `simulate` method that takes in a time step, current state of the universe, (optionally the previous state of the universe) and returns the next state of the universe. ```typescript interface SimulateFunction { @@ -22,7 +22,7 @@ Full API reference can be found [here](https://source-academy.github.io/nbody/ap ### Velocity Verlet -Create a [velocity verlet](https://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet) integrator. Uses newtonian gravity by default, or the provided force object. +A [velocity verlet](https://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet) integrator implementation. Uses newtonian gravity by default, or the provided force object. ```javascript new VelocityVerletSim(); @@ -31,7 +31,7 @@ new VelocityVerletSim(customForce); ### Explicit Euler -Create a [explicit euler](https://en.wikipedia.org/wiki/Explicit_and_implicit_methods) integrator. Uses newtonian gravity by default, or the provided force object. +An [explicit euler](https://en.wikipedia.org/wiki/Explicit_and_implicit_methods) integrator implementation. Uses newtonian gravity by default, or the provided force object. ```javascript new ExplicitEulerSim(); @@ -40,7 +40,7 @@ new ExplicitEulerSim(customForce); ### Semi Implicit Euler -Create a [semi-implicit euler](https://en.wikipedia.org/wiki/Explicit_and_implicit_methods) integrator. Uses newtonian gravity by default, or the provided force object. +A [semi-implicit euler](https://en.wikipedia.org/wiki/Explicit_and_implicit_methods) integrator implementation. Uses newtonian gravity by default, or the provided force object. ```javascript new SemiImplicitEulerSim(); @@ -49,7 +49,7 @@ new SemiImplicitEulerSim(customForce); ### Runge-Kutta Order 4 -Create a [runge-kutta order 4](https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods) integrator. Uses newtonian gravity by default, or the provided force object. Optionally, you can provide the weight coefficients for the averaging step. +A [runge-kutta order 4](https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods) integrator implementation. Uses newtonian gravity by default, or the provided force object. Optionally, you can provide the weight coefficients for the averaging step. ```javascript new RungeKutta4Sim(); @@ -59,7 +59,7 @@ new RungeKutta4Sim(customForce, [1, 2, 2, 1]); ### Lambda integrator -Create a simulate function from a lambda function. +A simulate function based the given lambda/arrow/anonymous function. ```javascript new LambdaSim((deltaT, currState, prevState) => { diff --git a/.storybook/stories/Define/Transformation.mdx b/.storybook/stories/Define/Transformation.mdx index 932d3a2..df1a64c 100644 --- a/.storybook/stories/Define/Transformation.mdx +++ b/.storybook/stories/Define/Transformation.mdx @@ -4,7 +4,7 @@ import { Meta, Story } from '@storybook/blocks'; # Transformation -TODO +A **Transformation** object can be used to modify/transform the [frame of reference](https://en.wikipedia.org/wiki/Frame_of_reference) of the nbody system. It has a `transform` method that takes in a state and returns a new state with the updated frame of reference by modifying the position, velocity and acceleration of the bodies as necessary. ```typescript export interface Transformation { @@ -22,15 +22,16 @@ Full API reference can be found [here](https://source-academy.github.io/nbody/ap ### Body Center Transformation -TODO +A frame of reference transformation that uses the position of the ith body as the origin. ```javascript new BodyCenterTransformation(); +new BodyCenterTransformation(index); ``` ### Center of Mass Transformation -TODO +A frame of reference transformation that uses the position of the center of mass of the system as the origin. ```javascript new CoMTransformation(); @@ -38,7 +39,7 @@ new CoMTransformation(); ### Rotate Transformation -TODO +A frame of reference transformation that rotates the frames around the provided axis by the provided angle. ```javascript new RotateTransformation(new Vector3(0, 1, 0), Math.PI / 2); @@ -46,7 +47,7 @@ new RotateTransformation(new Vector3(0, 1, 0), Math.PI / 2); ### Lambda Transformation -TODO +A frame of reference transformation that uses the given lambda/arrow/anonymous function to transform states. ```javascript new LambdaTransformation((state, deltaT) => { @@ -60,7 +61,15 @@ new LambdaTransformation((state, deltaT) => { You can define and configure your own transformation object in javascript with a transform method as follows ```javascript -TODO +const customTransform = { + transform(state) { + const offset = state.bodies[0].position.clone(); + state.bodies.forEach((b) => { + b.position.sub(offset); + }); + return state; + } +} ``` ## Typescript @@ -68,5 +77,13 @@ TODO You can define and configure your own transformation object in typescript by implementing the Transformation interface as follows ```typescript -TODO +class CustomTransformation implements Transformation { + transform(state: State): State { + const offset = state.bodies[0].position.clone(); + state.bodies.forEach((b) => { + b.position.sub(offset); + }); + return state; + } +} ``` \ No newline at end of file diff --git a/.storybook/stories/Showcase/Analemma/Analemma.tsx b/.storybook/stories/Showcase/Analemma/Analemma.tsx index b1414fa..8504a40 100644 --- a/.storybook/stories/Showcase/Analemma/Analemma.tsx +++ b/.storybook/stories/Showcase/Analemma/Analemma.tsx @@ -23,7 +23,8 @@ const SUN = new CelestialBody( const EARTH = new CelestialBody( "Earth", 5.97219e24, - 6371e3, + // 6371e3, + 2e8, // new Vector3(-2.48109932596539e10, 1.449948612736719e11, -8.215203670851886e6), // new Vector3(-2.984146365518679e4, -5.126262286859617e3, 1.184224839788195), // new Vector3(0, 0, 0) @@ -36,7 +37,8 @@ const EARTH = new CelestialBody( const MARS = new CelestialBody( "Mars", 6.41e23, - 3389.5e3, + // 3389.5e3, + 2.5e8, // new Vector3( // -4.388577457378983e10, // -2.170849264747524e11, @@ -88,6 +90,7 @@ export const sunEarth: AnalemmaSetup = { 366.24 * 86164.0905 ), ], + radiusScale: 10, }); newUniverse.currState = new RotateTransformation( new Vector3(1, 0, 0), @@ -126,6 +129,7 @@ export const sunMars: AnalemmaSetup = { 668.5991 * 88775.244 ), ], + radiusScale: 20, }); newUniverse.currState = new RotateTransformation( new Vector3(1, 0, 0), diff --git a/.storybook/stories/Showcase/Analemma/Intro.mdx b/.storybook/stories/Showcase/Analemma/Intro.mdx index 067f81c..f0327b7 100644 --- a/.storybook/stories/Showcase/Analemma/Intro.mdx +++ b/.storybook/stories/Showcase/Analemma/Intro.mdx @@ -2,4 +2,8 @@ import { Meta, Story } from '@storybook/blocks'; -# Analemma \ No newline at end of file +# Analemma + +An analemma is a curve representing the changing position of the Sun in the sky, as viewed from a fixed location on the Earth at the same clock time over the course of an year. Analemma shapes range from figure-8s to infinity symbols, depending on the observer's latitude and the time of day. The analemma is a result of the Earth's tilt and elliptical orbit around the Sun. Analemmas can also be seen on other planets, with shapes that are different from Earth's due to different axial tilts and orbital eccentricities. The analemma on Mars, for example, is a teardrop shape. [[Wikipedia](https://en.wikipedia.org/wiki/Analemma)] + +Analemmas are a good example of what is possible with *nbody*, as they involve the simulation of the Earth's orbit around the Sun, along with frame of reference transformations. \ No newline at end of file diff --git a/.storybook/stories/Showcase/Analemma/Sun-Earth.mdx b/.storybook/stories/Showcase/Analemma/Sun-Earth.mdx index a34b5bb..6319b7e 100644 --- a/.storybook/stories/Showcase/Analemma/Sun-Earth.mdx +++ b/.storybook/stories/Showcase/Analemma/Sun-Earth.mdx @@ -6,5 +6,7 @@ import * as Stories from "./Analemma.stories"; # Sun-Earth Analemma - +Analemma as seen from the Earth on the equator mid-day. Frame of reference transformations have been setup to replicate the axial tilt of the earth. Additionally, the frame is rotated smoothly (as opposed to every 24 hours) to smooth out the analemma curve. Use the controls below to change the axial tilt of the Earth and its effects on the shape of the analemma. + +
\ No newline at end of file diff --git a/.storybook/stories/Showcase/Analemma/Sun-Mars.mdx b/.storybook/stories/Showcase/Analemma/Sun-Mars.mdx index b46c158..65c0830 100644 --- a/.storybook/stories/Showcase/Analemma/Sun-Mars.mdx +++ b/.storybook/stories/Showcase/Analemma/Sun-Mars.mdx @@ -6,5 +6,7 @@ import * as Stories from "./Analemma.stories"; # Sun-Mars Analemma - +Analemma as seen from Mars at the equator mid-day. Frame of reference transformations have been setup to replicate the axial tilt of Mars. Additionally, the frame is rotated smoothly to smooth out the analemma curve. Use the controls below to change the axial tilt of Mars and its effects on the shape of the analemma. + +
\ No newline at end of file diff --git a/.storybook/stories/Showcase/HorseshoeOrbit/2010 SO16.mdx b/.storybook/stories/Showcase/HorseshoeOrbit/2010 SO16.mdx new file mode 100644 index 0000000..1d74765 --- /dev/null +++ b/.storybook/stories/Showcase/HorseshoeOrbit/2010 SO16.mdx @@ -0,0 +1,22 @@ +import { Meta, Story, Controls } from '@storybook/blocks'; + +import * as Stories from "./HorseshoeOrbit.stories"; + + + +# 2010 SO16 + +[2010 SO16](https://en.wikipedia.org/wiki/(419624)_2010_SO16) is a sub-kilometer asteriod in a co-orbital configuration with Earth that looks like a horseshoe in a non-rotating frame of reference. + +
+2010 SO16 orbit +2010 SO16 orbit around Sun + +GIFs from Wiki Commons - gif1, +gif2 +
+ +The initial configurations of Sun, Earth and the asteriod have been setup, recorded at 20000000x speed for about 13.5 minutes of playback. Use the speed control below to change the playback speed. You can also try changing the frame of reference to see the horseshoe orbit from different perspectives. + + +
\ No newline at end of file diff --git a/.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx b/.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx index b5841aa..d5e1ae9 100644 --- a/.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx +++ b/.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx @@ -1,13 +1,22 @@ -import { Meta, Story } from '@storybook/blocks'; +import { Meta, Story, Controls } from '@storybook/blocks'; import * as Stories from "./HorseshoeOrbit.stories"; - + # 54509 YORP -54509 YORP is an Earth co-orbital asteroid that follows a horse shoe orbit +[54509 YORP](https://en.wikipedia.org/wiki/54509_YORP) is an Earth co-orbital asteroid that follows a flattened horse shoe orbit that looks like the following in frames of refernce snapped to sun-earth and sun respectively: +
+54509 YORP orbit +54509 YORP orbit around Sun +GIFs from Wiki Commons - gif1, +gif2 +
- \ No newline at end of file +The initial configurations of Sun, Earth and the asteriod have been setup, recorded at 20000000x speed for about 5.5 minutes of playback. Use the speed control below to change the playback speed. You can also try changing the frame of reference to see the horseshoe orbit from different perspectives. + + +
\ No newline at end of file diff --git a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.mdx b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.mdx deleted file mode 100644 index c647c16..0000000 --- a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.mdx +++ /dev/null @@ -1,11 +0,0 @@ -import { Meta, Story } from '@storybook/blocks'; - -import * as Stories from "./HorseshoeOrbit.stories"; - - - - -# Horseshoe Orbits - -TODO - diff --git a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx index 23cb8d7..ed8d19d 100644 --- a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx +++ b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx @@ -1,38 +1,43 @@ import type { Meta, StoryObj } from "@storybook/react"; -import { Simulation } from "../../Simulation"; -import { horseshoe } from "./HorseshoeOrbit"; +import { HorseshoeOrbit, yorp, so16 } from "./HorseshoeOrbit"; const meta = { title: "Showcase/Horseshoe Orbit", - component: Simulation, + component: HorseshoeOrbit, parameters: { layout: "centered", - controls: { - disable: true, - }, }, tags: [], - argTypes: {}, + argTypes: { + obj: { + table: { + disable: true, + } + }, + name: { + table: { + disable: true, + } + }, + }, args: {}, -} satisfies Meta; +} satisfies Meta; export default meta; type Story = StoryObj; export const YORP: Story = { args: { - storyName: "Horseshoe Orbit YORP", - universe: [horseshoe.yorp], - showDebugInfo: true, - controller: "ui", - visType: "3D", - width: 800, - playSpeed: 2, - showTrails: true, - record: true, - looped: true, - recordFor: 332, - recordSpeed: 20000000, - maxTrailLength: 2000, + name: "Horseshoe Orbit YORP", + frameOfRef: "sun-earth", + obj: yorp }, }; + +export const SO16: Story = { + args: { + name: "Horseshoe Orbit SO16", + frameOfRef: "sun-earth", + obj: so16, + }, +}; \ No newline at end of file diff --git a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.ts b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.ts deleted file mode 100644 index 1c24c62..0000000 --- a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { CelestialBody, CoMTransformation, PinTransformation, RotateTransformation, RungeKutta4Sim, State, Universe, Vector3 } from "../../../../src"; - -const yorpState = new State([ - new CelestialBody( - "Sun", - 1988500e24, - 696340e3, - new Vector3(0, 0, 0), - new Vector3(0, 0, 0), - new Vector3(0, 0, 0) - ), - new CelestialBody( - "Earth", - 5.97219e24, - 6371e3, - new Vector3( - -2.48109932596539e10, - 1.449948612736719e11, - -8.215203670851886e6 - ), - new Vector3( - -2.984146365518679e4, - -5.126262286859617e3, - 1.184224839788195 - ), - new Vector3(0, 0, 0) - ), - new CelestialBody( - "YORP", - 1, - 1, - new Vector3( - 1.789598196203594e11, - 4.67757011067789e10, - 5.131735873924753e9 - ), - new Vector3( - -5.641374152889482e3, - 2.28178307950743e4, - -6.507224186314708e1 - ), - new Vector3(0, 0, 0) - )]); -const yorp = new Universe({ - label: "54509 YORP", - currState: new RotateTransformation(new Vector3(1, 0, 0), Math.PI / 2).transform(yorpState.clone()), - simFunc: new RungeKutta4Sim(), - color: ["#FDB813", "#287AB8", "#767676"], - transformations: [ - new CoMTransformation(), - new PinTransformation(new Vector3(1, 0, 0), 1), - ], -}); - -export const horseshoe = { - yorp: yorp, -}; \ No newline at end of file diff --git a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.tsx b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.tsx new file mode 100644 index 0000000..17e6b53 --- /dev/null +++ b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.tsx @@ -0,0 +1,209 @@ +import React from "react"; +import { + CelestialBody, + CoMTransformation, + Simulation as NbodySimulation, + PinTransformation, + RotateTransformation, + RungeKutta4Sim, + State, + Universe, + Vector3, +} from "../../../../src"; + +interface HorseshoeOrbitSetup { + sim?: NbodySimulation; + helper: ( + divId: string, + frameOfRef: "sun" | "sun-earth", + node: HTMLDivElement | null + ) => void; +} + +const yorpState = new State([ + new CelestialBody( + "Sun", + 1988500e24, + 696340e3, + new Vector3(0, 0, 0), + new Vector3(0, 0, 0), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "Earth", + 5.97219e24, + // 6371e3, + 5e8, + new Vector3( + -2.48109932596539e10, + 1.449948612736719e11, + -8.215203670851886e6 + ), + new Vector3(-2.984146365518679e4, -5.126262286859617e3, 1.184224839788195), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "YORP", + 100, + 2e8, + new Vector3(1.789598196203594e11, 4.67757011067789e10, 5.131735873924753e9), + new Vector3(-5.641374152889482e3, 2.28178307950743e4, -6.507224186314708e1), + new Vector3(0, 0, 0) + ), +]); + +const so16State = new State([ + new CelestialBody( + "Sun", + 1988500e24, + 696340e3, + new Vector3(0, 0, 0), + new Vector3(0, 0, 0), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "Earth", + 5.97219e24, + // 6371e3, + 4e8, + new Vector3( + -2.48109932596539e10, + 1.449948612736719e11, + -8.215203670851886e6 + ), + new Vector3(-2.984146365518679e4, -5.126262286859617e3, 1.184224839788195), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "SO16", + 100, + 2e8, + new Vector3( + 7.731523489671926e10, + 1.272231560560866e11, + 1.214208720801441e10 + ), + new Vector3(-2.619929938293521e4, 1.26271595046161e4, 6.883036493252469e3), + new Vector3(0, 0, 0) + ), +]); + +export const yorp: HorseshoeOrbitSetup = { + helper(divId, frameOfRef, node) { + if (node === null) { + this.sim?.stop(); + this.sim = null; + return; + } + const newUniverse = new Universe({ + label: "54509 YORP", + currState: new RotateTransformation( + new Vector3(1, 0, 0), + Math.PI / 2 + ).transform(yorpState.clone()), + simFunc: new RungeKutta4Sim(), + color: ["#FDB813", "#287AB8", "#767676"], + radiusScale: 10, + }); + if (frameOfRef === "sun-earth") { + newUniverse.transformations = [ + new CoMTransformation(), + new PinTransformation(new Vector3(0, 0, 1), 1), + ]; + } else { + newUniverse.transformations = [new CoMTransformation()]; + } + this.sim = new NbodySimulation([newUniverse], { + visType: "3D", + controller: "ui", + showTrails: true, + maxTrailLength: 2000, + record: true, + looped: true, + // showDebugInfo: true, + }); + this.sim.start( + divId, + 800, + 800, + frameOfRef === "sun-earth" ? 30 : 1, + false, + 332, + 20000000 + ); + }, +}; + +export const so16: HorseshoeOrbitSetup = { + helper(divId, frameOfRef, node) { + if (node === null) { + this.sim?.stop(); + this.sim = null; + return; + } + const newUniverse = new Universe({ + label: "SO16", + currState: + // new RotateTransformation(new Vector3(0, 1, 0), Math.PI / 2).transform( + new RotateTransformation(new Vector3(1, 0, 0), -Math.PI / 2).transform( + so16State.clone() + ), + simFunc: new RungeKutta4Sim(), + color: ["#FDB813", "#287AB8", "#767676"], + radiusScale: 10, + }); + if (frameOfRef === "sun-earth") { + newUniverse.transformations = [ + new CoMTransformation(), + new PinTransformation(new Vector3(0, 0, 1), 1), + ]; + } else { + newUniverse.transformations = [new CoMTransformation()]; + } + this.sim = new NbodySimulation([newUniverse], { + visType: "3D", + controller: "ui", + showTrails: true, + maxTrailLength: frameOfRef === "sun-earth" ? 2000 : 1000, + record: true, + looped: true, + // showDebugInfo: true, + }); + this.sim.start( + divId, + 800, + 800, + frameOfRef === "sun-earth" ? 30 : 1, + false, + 810, + 20000000 + ); + }, +}; + +export const HorseshoeOrbit = ({ + obj, + name, + frameOfRef, + ...props +}: { + obj: HorseshoeOrbitSetup; + name: string; + frameOfRef: "sun" | "sun-earth"; +}) => { + const divId = "demo-" + name + "-" + frameOfRef; + + return ( +
+
obj.helper(divId, frameOfRef, node)} + >
+
+ ); +}; diff --git a/.storybook/stories/Showcase/HorseshoeOrbit/Intro.mdx b/.storybook/stories/Showcase/HorseshoeOrbit/Intro.mdx new file mode 100644 index 0000000..013e693 --- /dev/null +++ b/.storybook/stories/Showcase/HorseshoeOrbit/Intro.mdx @@ -0,0 +1,14 @@ +import { Meta, Story } from '@storybook/blocks'; + +import * as Stories from "./HorseshoeOrbit.stories"; + + + + +# Horseshoe Orbits + +Horseshoe orbits are a type of co-orbital motion of a small body around a larger body. The orbital period of the smaller body is very close to that of the larger body, and the two bodies are in a 1:1 orbital resonance. The smaller body appears to move in a horseshoe shape relative to the larger body as seen from a non-rotating frame of reference. Read on to find out more about and see horse shoe orbits in action. + +- [2010 SO16](?path=/docs/showcase-horseshoeorbit-2010-so16--docs) +- [54509 YORP](?path=/docs/showcase-horseshoeorbit-54509-yorp--docs) + diff --git a/.storybook/stories/Showcase/Intro.mdx b/.storybook/stories/Showcase/Intro.mdx index 430e0a1..929db97 100644 --- a/.storybook/stories/Showcase/Intro.mdx +++ b/.storybook/stories/Showcase/Intro.mdx @@ -2,7 +2,10 @@ import { Meta, Story } from '@storybook/blocks'; +# Showcase -## Horseshoe Orbits -## Solar system -## Analemma +In this section, we showcase some of the interesting simulations that can be created using the n-body simulator, including some of the most famous celestial phenomena. Read on to learn more about each of these simulations. + +- [Analemma](?path=/docs/showcase-analemma-intro--docs) +- [Horseshoe Orbits](?path=/docs/showcase-horseshoeorbit-intro--docs) +- [Solar System](?path=/docs/showcase-solarsystem-intro--docs) diff --git a/.storybook/stories/Showcase/SolarSystem/Recorded.mdx b/.storybook/stories/Showcase/SolarSystem/Recorded.mdx new file mode 100644 index 0000000..dcdb6fa --- /dev/null +++ b/.storybook/stories/Showcase/SolarSystem/Recorded.mdx @@ -0,0 +1,11 @@ +import { Meta, Story } from '@storybook/blocks'; + +import * as Stories from "./SolarSystem.stories"; + + + +# Recorded + +Recorded ~247 years of simulated time, which is the orbital period of Pluto, and played on loop. + +
\ No newline at end of file diff --git a/.storybook/stories/Showcase/SolarSystem/Simulate.mdx b/.storybook/stories/Showcase/SolarSystem/Simulate.mdx new file mode 100644 index 0000000..14bd37c --- /dev/null +++ b/.storybook/stories/Showcase/SolarSystem/Simulate.mdx @@ -0,0 +1,11 @@ +import { Meta, Story } from '@storybook/blocks'; + +import * as Stories from "./SolarSystem.stories"; + + + +# Simulate + +The Solar system has been setup based on positions and velocities of the planets on 1st January 2024. You can simulate the system at a high speed to oberve the traced orbits. However, keep in mind that the faster you simulate, the less accurate the orbits will be (due to the numerical integration method used). + +
\ No newline at end of file diff --git a/.storybook/stories/Showcase/SolarSystem/SolarSystem.mdx b/.storybook/stories/Showcase/SolarSystem/SolarSystem.mdx deleted file mode 100644 index 2b3d5ef..0000000 --- a/.storybook/stories/Showcase/SolarSystem/SolarSystem.mdx +++ /dev/null @@ -1,10 +0,0 @@ -import { Meta, Story } from '@storybook/blocks'; - -import * as Stories from "./SolarSystem.stories"; - - - -## -```js -``` -
\ No newline at end of file diff --git a/.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx b/.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx index d4ad2e7..3022d83 100644 --- a/.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx +++ b/.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx @@ -1,10 +1,9 @@ import type { Meta, StoryObj } from "@storybook/react"; -import { Simulation } from "../../Simulation"; -import { fig8 } from "../../Universe"; +import { SolarSystem, solarRecorded, solarSimulate } from "./SolarSystem"; const meta = { title: "Showcase/Solar System", - component: Simulation, + component: SolarSystem, parameters: { layout: "centered", controls: { @@ -14,14 +13,21 @@ const meta = { tags: [], argTypes: {}, args: {}, -} satisfies Meta; +} satisfies Meta; export default meta; type Story = StoryObj; -export const SolarSystem: Story = { +export const Simulate: Story = { args: { - storyName: "3D", - universe: [fig8], + name: "Solar System", + obj: solarSimulate + }, +}; + +export const Recorded: Story = { + args: { + name: "Solar System", + obj: solarRecorded }, }; diff --git a/.storybook/stories/Showcase/SolarSystem/SolarSystem.tsx b/.storybook/stories/Showcase/SolarSystem/SolarSystem.tsx new file mode 100644 index 0000000..8fa5acc --- /dev/null +++ b/.storybook/stories/Showcase/SolarSystem/SolarSystem.tsx @@ -0,0 +1,197 @@ +import React from "react"; +import { + CelestialBody, + CoMTransformation, + Simulation as NbodySimulation, + RotateTransformation, + RungeKutta4Sim, + State, + Universe, + Vector3, +} from "../../../../src"; + +interface SolarSystemSetup { + sim?: NbodySimulation; + helper: ( + divId: string, + node: HTMLDivElement | null + ) => void; +} + +const solarSystemState = new State([ + new CelestialBody( + "Sun", + 1988500e24, + 696340e3, + new Vector3(0, 0, 0), + new Vector3(0, 0, 0), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "Mercury", + 3.302e23, + // 2439.7e3, + 1e8, +new Vector3(-4.108411877039495e10, 2.997375954154480e10 , 6.217890408222714e9), + new Vector3(-3.865743010383652e4, -3.733889075044869e4, 4.944436024774976e2), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "Venus", + 4.8685e24, + // 6051.8e3, + 1e8, + new Vector3(-1.069987422398024e11, -1.145572515113905e10, 6.016588327139664e9), + new Vector3(3.513460276994624e3, -3.497755629371660e4, -6.830913209445484e2), + new Vector3(0, 0, 0)), + new CelestialBody( + "Earth", + 5.97219e24, + // 6371e3, + 1e8, + new Vector3( + -2.48109932596539e10, + 1.449948612736719e11, + -8.215203670851886e6 + ), + new Vector3(-2.984146365518679e4, -5.126262286859617e3, 1.184224839788195), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "Mars", + 6.4171e23, + // 3389.5e3, + 1e8, +new Vector3(-4.388577457378983e10,-2.170849264747524e11, -3.473007284583151e9), + new Vector3(2.466191455128526e4, -2.722160161977370e3, -6.619819103693254e2), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "Jupiter", + 189818722e19, + // 69911e3, + 6e8, + new Vector3(5.225708576244547e11, 5.318268827721269e11, -1.390073285881653e10), + new Vector3(-9.481190567392032e3, 9.781942400350085e3, 1.714274561397779e2), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "Saturn", + 5.6834e26, + // 58232e3, + 5e8, +new Vector3(1.345793242617223e12, -5.559294178115252e11, -4.389262609579784e10), + new Vector3(3.146297313479314e3, 8.917916155362638e3, -2.799382290475703e2), + new Vector3(0, 0, 0)), + new CelestialBody( + "Uranus", + 8.6813e25, + // 25362e3, + 5e8, + new Vector3(1.835714294722568e12, 2.288891426259816e12, -1.529865738122165e10), + new Vector3(-5.371828306112230e3, 3.954368764227032e3, 8.423549070186587e1), + new Vector3(0, 0, 0)), + new CelestialBody( + "Neptune", + 1.02409e26, + // 24622e3, + 5e8, + new Vector3(4.464446647141849e12, -2.679158335073845e11, -9.736583677508335e10), + new Vector3(2.818440617089212e2, 5.469942022851473e3, -1.190017755456774e2), + new Vector3(0, 0, 0) + ), + new CelestialBody( + "Pluto", + 1.307e22, + 2.5e8, + new Vector3(2.574575382744127e12, -4.538596532403562e12, -2.587050606457522e11), + new Vector3(4.844463314470517e3, 1.482549367525443e3, -1.568756846977261e3), + new Vector3(0, 0, 0) + ), +]); + +export const solarRecorded: SolarSystemSetup = { + helper(divId, node) { + if (node === null) { + this.sim?.stop(); + this.sim = null; + return; + } + const newUniverse = new Universe({ + label: "Solar Sytem", + currState: new RotateTransformation( + new Vector3(1, 0, 0), + Math.PI / 2 + ).transform(solarSystemState.clone()), + simFunc: new RungeKutta4Sim(), + color: ["#FDB813", "#B7B8B9", "#c18f17", "#287AB8", "#c1440e", "#d8ca9d", "#ceb8b8", "#ACE5EE", "#5b5ddf"], + transformations: [new CoMTransformation()], + radiusScale: 20, + }); + this.sim = new NbodySimulation([newUniverse], { + visType: "3D", + controller: "ui", + showTrails: true, + maxTrailLength: 2000, + record: true, + looped: true, + showDebugInfo: true, + }); + this.sim.start(divId, 800, 800, 2, false, 780, 10000000); + // this.sim.start(divId, 800, 800, 2, false, 10, 10000000); + }, +}; + +export const solarSimulate: SolarSystemSetup = { + helper(divId, node) { + if (node === null) { + this.sim?.stop(); + this.sim = null; + return; + } + const newUniverse = new Universe({ + label: "Solar Sytem", + currState: new RotateTransformation( + new Vector3(1, 0, 0), + Math.PI / 2 + ).transform(solarSystemState.clone()), + simFunc: new RungeKutta4Sim(), + color: ["#FDB813", "#B7B8B9", "#c18f17", "#287AB8", "#c1440e", "#d8ca9d", "#ceb8b8", "#ACE5EE", "#5b5ddf"], + transformations: [new CoMTransformation()], + radiusScale: 20, + }); + this.sim = new NbodySimulation([newUniverse], { + visType: "3D", + controller: "ui", + showTrails: true, + maxTrailLength: 2000, + showDebugInfo: true, + }); + this.sim.start(divId, 800, 800, 10000000); + }, +}; + +export const SolarSystem = ({ + obj, + name, + ...props +}: { + obj: SolarSystemSetup; + name: string; +}) => { + const divId = "demo-" + name; + + return ( +
+
obj.helper(divId, node)} + >
+
+ ); +}; diff --git a/.storybook/stories/Universe.ts b/.storybook/stories/Universe.ts index 0a9e2a7..6cecdd1 100644 --- a/.storybook/stories/Universe.ts +++ b/.storybook/stories/Universe.ts @@ -17,7 +17,7 @@ export const fig8 = new Universe({ new CelestialBody( "Body 1", 1, - 1, + 0.1, new Vector3(-0.97000436, 0.24308753, 0), new Vector3(0.466203685, 0.43236573, 0), new Vector3(0, 0, 0) @@ -25,7 +25,7 @@ export const fig8 = new Universe({ new CelestialBody( "Body 2", 1, - 1, + 0.1, new Vector3(0.97000436, -0.24308753, 0), new Vector3(0.466203685, 0.43236573, 0), new Vector3(0, 0, 0) @@ -33,7 +33,7 @@ export const fig8 = new Universe({ new CelestialBody( "Body 3", 1, - 1, + 0.1, new Vector3(0, 0, 0), new Vector3(-2 * 0.466203685, -2 * 0.43236573, 0), new Vector3(0, 0, 0) @@ -50,7 +50,7 @@ export const multiFig8 = [ new CelestialBody( "Body 1", 1, - 1, + 0.1, new Vector3(-0.97000436, 0.24308753, 0), new Vector3(0.466203685, 0.43236573, 0), new Vector3(0, 0, 0) @@ -58,7 +58,7 @@ export const multiFig8 = [ new CelestialBody( "Body 2", 1, - 1, + 0.1, new Vector3(0.97000436, -0.24308753, 0), new Vector3(0.466203685, 0.43236573, 0), new Vector3(0, 0, 0) @@ -66,7 +66,7 @@ export const multiFig8 = [ new CelestialBody( "Body 3", 1, - 1, + 0.1, new Vector3(0, 0, 0), new Vector3(-2 * 0.466203685, -2 * 0.43236573, 0), new Vector3(0, 0, 0) diff --git a/.storybook/stories/Visualize/Controller/Controller.mdx b/.storybook/stories/Visualize/Controller/Controller.mdx index 0cf1aff..7a16376 100644 --- a/.storybook/stories/Visualize/Controller/Controller.mdx +++ b/.storybook/stories/Visualize/Controller/Controller.mdx @@ -4,7 +4,20 @@ import * as ControllerStories from "./Controller.stories"; +# Controller + +**Simulation** objects can be controlled in three ways - through the UI, through code, or not at all. You can set the `controller` field when creating a **Simulation** object in the following way. Controls include play, pause, speed, show/hide trails and show/hide each universe. Available in both 2D and 3D views. + +```js +new Simulation(universe, { + controller: 'none' | 'ui' | 'code', +}) +``` + ## None (default) + +When set to none, simulation cannot be controlled through the UI or code. + ```js new Simulation(universe, { controller: 'none' @@ -13,6 +26,9 @@ new Simulation(universe, {
## Ui + +Displays UI controls to change speed, show/hide trails and show/hide each universe. + ```js new Simulation(universe, { controller: 'ui' @@ -21,9 +37,15 @@ new Simulation(universe, {
## Code + +Allows you to control the simulation through code via methods on the **Simulation** object. Full API reference available [here](https://source-academy.github.io/nbody/api/classes/Simulation.html). + ```js new Simulation(universe, { controller: 'code' + showTrails: true, }) + +// toggle show/hide universe every 500 ms ```
\ No newline at end of file diff --git a/.storybook/stories/Visualize/Debug Info/Debug.mdx b/.storybook/stories/Visualize/Debug Info/Debug.mdx index 32b1d17..d6e9d7f 100644 --- a/.storybook/stories/Visualize/Debug Info/Debug.mdx +++ b/.storybook/stories/Visualize/Debug Info/Debug.mdx @@ -6,7 +6,9 @@ import * as DebugStories from "./Debug.stories"; # Debug Info -Passed as the `showDebugInfo` property in the Simulation config. This will display debug information in the corner of the simulation canvas. Click on the pop-up to toggle between frames showing the frame rate, time taken for each frame and the total memory usage. +Passed as the `showDebugInfo` property in the Simulation config, this will display debug information in the corner of the simulation canvas. Click on the pop-up to toggle between frames showing the frame rate, time taken for each frame and the total memory usage. Available in both 2D and 3D views. + +```js ## Off (default) ```js diff --git a/.storybook/stories/Visualize/Debug Info/Debug.stories.tsx b/.storybook/stories/Visualize/Debug Info/Debug.stories.tsx index a94165e..844d3b0 100644 --- a/.storybook/stories/Visualize/Debug Info/Debug.stories.tsx +++ b/.storybook/stories/Visualize/Debug Info/Debug.stories.tsx @@ -25,6 +25,7 @@ export const DebugInfoOn: Story = { storyName: 'DebugInfoOn', universe: [fig8], showDebugInfo: true, + visType: '3D', }, }; @@ -33,13 +34,6 @@ export const DebugInfoOff: Story = { storyName: 'DebugInfoOff', universe: [fig8], showDebugInfo: false, - }, -}; - -export const Ui: Story = { - args: { - storyName: 'Ui', - universe: [fig8], - controller: 'ui' + visType: '3D', }, }; \ No newline at end of file diff --git a/.storybook/stories/Visualize/Dimension/Dimension.mdx b/.storybook/stories/Visualize/Dimension/Dimension.mdx index 823a747..eb93634 100644 --- a/.storybook/stories/Visualize/Dimension/Dimension.mdx +++ b/.storybook/stories/Visualize/Dimension/Dimension.mdx @@ -6,20 +6,37 @@ import * as DimensionStories from "./Dimension.stories"; # Dimension -TODO +You can choose a 2 dimensional or 3 dimensional visualization system for your simulation. Simply set the `visType` field when creating a **Simulation** object in the following way. + +```js +new Simulation(universe, { + visType: '2D' | '3D', +}) +``` ## 2D (default) + +The 2D visualization system uses [Plotly.js](https://plotly.com/javascript/). It provides default controls for panning, zooming, and scaling the view, along with responsive axes indicating the scale of the universe(s) being visualized. Additionally, you can hover on bodies to see their details like label and position. + ```js new Simulation(universe, { visType: '2D', }) ``` +
## 3D + +The 3D visualization system uses [Three.js](https://threejs.org/). There is a small orientation helper at the bottom right provided for easier navigation along with coloured axes. You can control the visualization as follows: +- Orbit around the center of the frame by holding down the left click and moving the mouse in direction of choice +- Scroll up to zoom in and down to zoom out +- Pan around by holding down the right click and moving the mouse in direction of choice. + ```js new Simulation(universe, { visType: '3D', }) ``` +
\ No newline at end of file diff --git a/.storybook/stories/Visualize/Intro.mdx b/.storybook/stories/Visualize/Intro.mdx index de802be..2082898 100644 --- a/.storybook/stories/Visualize/Intro.mdx +++ b/.storybook/stories/Visualize/Intro.mdx @@ -4,4 +4,11 @@ import { Meta, Story } from '@storybook/blocks'; # Visualize -This section shall explore the various setups and configurations of the visualization system. +This section shall explore the various setups and configurations of the visualization system. Read on to find out more about how to precisely configure the visualization system to your needs. + +- [Dimension](?path=/docs/visualize-dimension--docs) +- [Multiverse](?path=/docs/visualize-multiverse--docs) +- [Record](?path=/docs/visualize-record--docs) +- [Controller](?path=/docs/visualize-controller--docs) +- [Trails](?path=/docs/visualize-trails--docs) +- [Debug Info](?path=/docs/visualize-debug-info--docs) \ No newline at end of file diff --git a/.storybook/stories/Visualize/Multiverse/Multiverse.mdx b/.storybook/stories/Visualize/Multiverse/Multiverse.mdx index 1f564eb..9258924 100644 --- a/.storybook/stories/Visualize/Multiverse/Multiverse.mdx +++ b/.storybook/stories/Visualize/Multiverse/Multiverse.mdx @@ -1,4 +1,4 @@ -import { Meta, Story } from '@storybook/blocks'; +import { Meta, Story } from "@storybook/blocks"; import * as MultiverseStories from "./Multiverse.stories"; @@ -6,22 +6,38 @@ import * as MultiverseStories from "./Multiverse.stories"; # Multiverse -TODO +You can setup multiple universes in a single simulation. This is useful for simulating multiple n-body systems in parallel with varying initial configurations, forces, simuation functions and/or transformations. Simply create each universe as you would for a single universe simulation and pass them as an array to the **Simulation** object in the following way. Available for both 2D and 3D visualizations, UI controls (when enabled) are provided to hide/show each universe separately (see [Controller](?path=/docs/visualize-controller--docs)). ## Single Universe - 2D -```js +```js +new Simulation(universe); +new Simulation([universe]); ``` -
+ +
+ +
## Multiverse - 2D -```js +```js +new Simulation([universe1, universe2], {}); ``` -
+ +
+ +
## Multiverse - 3D -```js +```js +new Simulation([universe1, universe2], { + visType: "3D", + controller: 'ui', +}); ``` -
\ No newline at end of file + +
+ +
diff --git a/.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx b/.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx index eaf8801..4786b97 100644 --- a/.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx +++ b/.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx @@ -24,6 +24,7 @@ export const SingleUniverse: Story = { args: { storyName: 'SingleUniverse', universe: [fig8], + width: 600, }, }; @@ -31,7 +32,7 @@ export const Multiverse: Story = { args: { storyName: 'Multiverse', universe: multiFig8, - // showTrails: true, + width: 600, }, }; @@ -40,7 +41,7 @@ export const Multiverse3D: Story = { storyName: 'Multiverse3D', universe: multiFig8, visType: '3D', - showTrails: true, - showDebugInfo: true, + controller: 'ui', + width: 600, }, }; \ No newline at end of file diff --git a/.storybook/stories/Visualize/Record/Record.mdx b/.storybook/stories/Visualize/Record/Record.mdx index 8e834fa..19ab8e5 100644 --- a/.storybook/stories/Visualize/Record/Record.mdx +++ b/.storybook/stories/Visualize/Record/Record.mdx @@ -4,6 +4,52 @@ import * as RecordStories from "./Record.stories"; - - - \ No newline at end of file +# Record + +You can simulate and visualize the n-body system in real-time or record the simulation and play it back later. Simply set the `record` field when creating a **Simulation** object in the following way. Available in both 2D and 3D views. + +```js +new Simulation(universe, { + record: true, +}) +``` + +## Real-Time (Default) + +The universe(s) are simulated and visualized in real-time. +```js +new Simulation(universe, {}) +new Simulation(universe, { + record: false, +}) +``` + +
+ + +## Recorded + +The universe(s) are simulated at `recordSpeed` and recorded completely for `recordFor` seconds worth of playback. The recording can then be played back at any specified speed include -ve values for reverse playback. + +```js +const sim = new Simulation(universe, { + record: true, +}) +// divId, width, height, playSpeed, startPaused, recordFor, recordSpeed +sim.start(, , 1, false, 60, 2) +``` + +
+ +## Recorded and Looped + +The recorded simulation can also be looped indefinitely with the `looped` field set to `true` in the **Simulation** object - upon reaching the end of the recording, loops back to the start and loops back to the end in case of reverse playback. The recorded playback is not looped by default. + +```js +new Simulation(universe, { + record: true, + looped: true, +}) +``` + +
\ No newline at end of file diff --git a/.storybook/stories/Visualize/Trails/Trails.mdx b/.storybook/stories/Visualize/Trails/Trails.mdx index cb39e02..21d40cd 100644 --- a/.storybook/stories/Visualize/Trails/Trails.mdx +++ b/.storybook/stories/Visualize/Trails/Trails.mdx @@ -4,5 +4,38 @@ import * as TrailsStories from "./Trails.stories"; - - \ No newline at end of file +# Trails + +Trails are the paths that objects take as they move through space. They can be shown or hidden using the `showTrails` field when creating a **Simulation** object in the following way. Once simulation is running, trails can be toggled on or off using the UI controls or through code, when controller is set to `ui` or `code` respectively. Maximum trail length can also be set using the `maxTrailLength` field, and this is the maximum number of points that will be tracked for all objects combined. Available in both 2D and 3D views. + +```js +new Simulation(universe, { + showTrails: true | false, + maxTrailLength: number, +}) +``` + +## Off (default) + +When set to false, trails are not shown. + +```js +new Simulation(universe, { + showTrails: false +}) +``` + +
+ +## On + +When set to true, trails are shown. + +```js +new Simulation(universe, { + showTrails: true +}) +``` + + +
\ No newline at end of file diff --git a/.storybook/theme.ts b/.storybook/theme.ts new file mode 100644 index 0000000..28559c3 --- /dev/null +++ b/.storybook/theme.ts @@ -0,0 +1,22 @@ +import { create } from '@storybook/theming/create'; + +const COLORS = { + bg: '#272525', + fg: '#ffedcf', + highlight: '#f79e31', +} + +export default create({ + base: 'dark', + brandTitle: 'nbody.js', + brandUrl: 'https://source-academy.github.io/nbody/', + brandImage: 'https://i.imgur.com/b7Nb1M5.png', + brandTarget: '_self', + + appBg: COLORS.bg, + barBg: COLORS.bg, + barHoverColor: COLORS.fg, + barSelectedColor: COLORS.highlight, + colorPrimary: COLORS.fg, + colorSecondary: COLORS.highlight, +}); \ No newline at end of file diff --git a/README.md b/README.md index 83036e6..5b4487b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # nbody -N-body simulations as a Source Academy module. +JS/TS library to run n-body simulations on the browser. Documentation available [here](https://source-academy.github.io/nbody/api) ## Installation @@ -18,6 +18,6 @@ yarn add nbody three @types/three plotly.js-dist @types/plotly.js ## Usage -Full API Documentation available [here](https://source-academy.github.io/nbody/). +Full API Documentation available [here](https://source-academy.github.io/nbody/api). ## For developers diff --git a/dist/src/Universe.js b/dist/src/Universe.js index 4232db3..38bbbde 100644 --- a/dist/src/Universe.js +++ b/dist/src/Universe.js @@ -23,6 +23,7 @@ export class Universe { = config.transformations === undefined ? [] : config.transformations; + this.radiusScale = config.radiusScale === undefined ? 1 : config.radiusScale; } /** * Simulate a step in the Universe using the SimulateFunction and Transformations. @@ -46,6 +47,7 @@ export class Universe { prevState: this.prevState.clone(), currState: this.currState.clone(), color: this.color, + radiusScale: this.radiusScale, label: this.label, simFunc: this.simFunc, transformations: this.transformations, diff --git a/dist/src/library/Visualizer.js b/dist/src/library/Visualizer.js index a917a21..304f69b 100644 --- a/dist/src/library/Visualizer.js +++ b/dist/src/library/Visualizer.js @@ -4,20 +4,6 @@ import Plotly from 'plotly.js-dist'; import Stats from 'stats.js'; import * as THREE from 'three'; import { OrbitControls, ViewHelper } from 'three/examples/jsm/Addons.js'; -/** - * Extrapolates a value from a range to another range. - * @param val value to extrapolate. - * @param minR minimum value of the input range. - * @param maxR maximum value of the input range. - * @param low minimum value of the output range. - * @param high maximum value of the output range. - * @returns extrapolated value. - */ -function extrapolateRadius(val, minR, maxR, low, high) { - if (minR === maxR) - return (low + high) / 2; - return low + ((val - minR) / (maxR - minR)) * (high - low); -} /** * Container object for body trails in a 2D universe based in Plotly. */ @@ -146,17 +132,11 @@ export class RealTimeVisualizer { // const height = element.clientHeight; let maxWidth = 0; let maxHeight = 0; - let maxRadius = 0; - let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); - minRadius = Math.min(minRadius, b.radius); - maxRadius = Math.max(maxRadius, b.radius); })); const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); - const minShowRadius = 0.01 * Math.min(height, width); - const maxShowRadius = 0.05 * Math.min(height, width); const layout = { paper_bgcolor: '#000000', plot_bgcolor: '#000000', @@ -196,8 +176,8 @@ export class RealTimeVisualizer { mode: 'markers', marker: { color: uni.color, - sizemin: minShowRadius, - size: uni.currState.bodies.map((body) => extrapolateRadius(body.radius, minRadius, maxRadius, minShowRadius, maxShowRadius)), + sizemin: 5, + size: uni.currState.bodies.map((body) => body.radius * uni.radiusScale), }, }; if (this.simulation.getShowTrails()) { @@ -269,8 +249,8 @@ export class RealTimeVisualizer { hovertext: uni.currState.bodies.map((body) => body.label), marker: { color: uni.color, - sizemin: minShowRadius, - size: uni.currState.bodies.map((body) => extrapolateRadius(body.radius, minRadius, maxRadius, minShowRadius, maxShowRadius)), + size: uni.currState.bodies.map((body) => body.radius * uni.radiusScale), + sizemin: 5, }, mode: 'markers', }; @@ -455,18 +435,12 @@ export class RealTimeVisualizer3D { } element.style.position = 'relative'; let maxLength = 0; - let maxRadius = 0; - let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { for (let i = 0; i < 3; i++) { maxLength = Math.max(maxLength, Math.abs(b.position.getComponent(i))); } - minRadius = Math.min(minRadius, b.radius); - maxRadius = Math.max(maxRadius, b.radius); })); const scale = 0.5 * Math.min(height, width) / maxLength; - const minShowRadius = 0.015 * Math.min(height, width); - const maxShowRadius = 0.04 * Math.min(height, width); this.scene = new THREE.Scene(); const camera = new THREE.OrthographicCamera(width / -2, width / 2, height / 2, height / -2, 0, 10000000000); camera.position.set(0, 0, Math.max(width, height)); @@ -512,7 +486,7 @@ export class RealTimeVisualizer3D { this.simulation.universes.forEach((u) => { this.universeTrails.push(new ThreeUniverseTrail(this.simulation.maxTrailLength, typeof u.color === 'string' ? u.color : u.color[0], this.scene, scale)); u.currState.bodies.forEach((b, i) => { - const sph = new THREE.SphereGeometry(extrapolateRadius(b.radius, minRadius, maxRadius, minShowRadius, maxShowRadius), 12, 12); + const sph = new THREE.SphereGeometry(b.radius * scale * u.radiusScale, 12, 12); const group = new THREE.Group(); group.add(new THREE.LineSegments(new THREE.WireframeGeometry(sph), new THREE.LineBasicMaterial({ color: new THREE.Color(typeof u.color === 'string' ? u.color : u.color[i]), @@ -733,17 +707,11 @@ export class RecordingVisualizer { } let maxWidth = 0; let maxHeight = 0; - let maxRadius = 0; - let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); - minRadius = Math.min(minRadius, b.radius); - maxRadius = Math.max(maxRadius, b.radius); })); const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); - const minShowRadius = 0.01 * Math.min(height, width); - const maxShowRadius = 0.05 * Math.min(height, width); const recordedFrames = []; const totalFrames = this.simulation.maxFrameRate * recordFor; let playInd = 1; @@ -795,8 +763,8 @@ export class RecordingVisualizer { mode: 'markers', marker: { color: uni.color, - sizemin: minShowRadius, - size: uni.currState.bodies.map((body) => extrapolateRadius(body.radius, minRadius, maxRadius, minShowRadius, maxShowRadius)), + sizemin: 5, + size: uni.currState.bodies.map((body) => body.radius * uni.radiusScale), }, }; if (this.simulation.getShowTrails()) { @@ -851,8 +819,8 @@ export class RecordingVisualizer { hovertext: currState.bodies.map((body) => body.label), marker: { color: uni.color, - sizemin: minShowRadius, - size: uni.currState.bodies.map((body) => extrapolateRadius(body.radius, minRadius, maxRadius, minShowRadius, maxShowRadius)), + sizemin: 5, + size: uni.currState.bodies.map((body) => body.radius * uni.radiusScale), }, mode: 'markers', }; @@ -1003,18 +971,12 @@ export class RecordingVisualizer3D { return; } let maxLength = 0; - let maxRadius = 0; - let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { for (let i = 0; i < 3; i++) { maxLength = Math.max(maxLength, Math.abs(b.position.getComponent(i))); } - minRadius = Math.min(minRadius, b.radius); - maxRadius = Math.max(maxRadius, b.radius); })); const scale = 0.5 * Math.min(height, width) / maxLength; - const minShowRadius = 0.015 * Math.min(height, width); - const maxShowRadius = 0.04 * Math.min(height, width); this.scene = new THREE.Scene(); const camera = new THREE.OrthographicCamera(width / -2, width / 2, height / 2, height / -2, 0, 10000000000); camera.position.set(0, 0, Math.max(width, height)); @@ -1050,7 +1012,7 @@ export class RecordingVisualizer3D { this.simulation.universes.forEach((u) => { this.universeTrails.push(new ThreeUniverseTrail(this.simulation.maxTrailLength, typeof u.color === 'string' ? u.color : u.color[0], this.scene, scale)); u.currState.bodies.forEach((b, i) => { - const sph = new THREE.SphereGeometry(extrapolateRadius(b.radius, minRadius, maxRadius, minShowRadius, maxShowRadius), 12, 12); + const sph = new THREE.SphereGeometry(b.radius * scale * u.radiusScale, 12, 12); const group = new THREE.Group(); group.add(new THREE.LineSegments(new THREE.WireframeGeometry(sph), new THREE.LineBasicMaterial({ color: new THREE.Color(typeof u.color === 'string' ? u.color : u.color[i]), @@ -1170,6 +1132,7 @@ export class RecordingVisualizer3D { c.material.dispose(); }); }); + renderer.domElement.remove(); }; this.animationId = requestAnimationFrame(paint); } diff --git a/dist/types/src/Universe.d.ts b/dist/types/src/Universe.d.ts index b05de54..b6cd140 100644 --- a/dist/types/src/Universe.d.ts +++ b/dist/types/src/Universe.d.ts @@ -18,6 +18,10 @@ export type UniverseConfig = { * Color of the bodies in the Universe. A single color applied to all bodies or an array of colors applied to each body respectively. Length of the array should match the number of bodies in the state. */ color: string | string[]; + /** + * Scale the radius of the bodies in the Universe. Default is 1. + */ + radiusScale: number; /** * Label of the Universe. */ @@ -42,6 +46,10 @@ export declare class Universe { * Color of the bodies in the Universe. A single color applied to all bodies or an array of colors applied to each body respectively. Incase of array, length should match the number of bodies in the state. */ color: string | string[]; + /** + * Scale the radius of the bodies in the Universe. Default is 1. + */ + radiusScale: number; /** * Label of the Universe. */ diff --git a/docs/api/assets/search.js b/docs/api/assets/search.js index 5e983cd..5a3fb9b 100644 --- a/docs/api/assets/search.js +++ b/docs/api/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACtV9XXPkOHLgf9HGxt0DzSG+gXm8XXtj4+wIx+3evkxMdFRLbDU9pSq5qqSe8cT894tMfBQAIkmWpPXZT80uEMhEIr8zQf16dzp+O999/8Ovdz9Nh4e77xm33d1h9zTefX/3v44Pv/xhPFzG019Pu8P5y/H0tLtMx8Ndd/dy2t99f3e/353P4/k76sX+6+Vpf9fF9+6+v7v7rYuQFOMJ0v3xcL6cXu4vx9Nti/+unJkB6u6ed6fxcFnaxxUZNnCZsJkOD+PPN+IR57wZAz7IK+Uv8a0bscjnvZ0WGQv8YdyP58u028O8GTLF6Icc9nzFTSdcokkc6373edxvgRhffAesp935vAVUeO8dkE67h+llE6z05jugPR/PU1MFNOBl774D4uu4P95Ply3M97vs3XdA3N3fj/vx1FZ1DajV+7dBLsT+fn88jJtkIrx44y4LwT5cTtPzeNnt/+l4um9BLV/4IPFuLLpRwit8icO7R922FXB8+WaYxbE9jhccb0lhC2z+/u27zQ/x+PR5OowPxAnmox9zfLMVt51dgSZxcF8ICs5BflmhHQFt65HNAW44L2qHxWH9y4obNXvjgw6tterGg6tRvtlfIaCvOypLsHOy/uPPz/vpfrr848t+PP1lmmNQv/AhRG0uuommM3yX5GEj3PjuzRCLQzxPTy/73WUr0Oz123eaHeCfTrvXln0Pv3/IceVrbTqliBRxOH9ahvCnG9bdqJaK9dcVUgP/jOT/vHv6/LBrW41s7ENIX6+3ifw5gpR8zPXnDNQX2h9rQ9BKCZ1AfPp0+eV5nUK/+3Lo06ur0PovpBalT38Gcp0DCBLOuKClMtPIB3LATUryitqtp3/ViWtnX65+w8lnILadO0ygT51UuxW0VX3bJNrsvFd8kNZLH8gFb/VEmrjfyhst4KtsQsK8gWPagLcxTzWX5iPaB6ORWHfD1gif8de/TocV5pq98SGc1V51E1vNUaZyAj9Pc61MAA7vvhNiOwlJgFzOPi7B3MhCBNx1/lncb8Y8/2fc7f86PY1/m84vu/30H40Yfv7Kh7APsewm/mlgTTHQYfL7//PDZgzKOe/FINiPllxSCBRT3gv/YXq9Ye/x7fdCfTlMr+PpPP71tJv2cxGmwM+mvRePx5dpM3D/7rvP+7K7bN9wfPsNUAsVsnt4+MPxcDkdbyB2OeeKweX88A/T+R+eT9Or93vegM9pfDq+jjejNJv2sVidL7vT5Zazwbffezb3+3F3ulEQyjnvxeB8OT7fsG18+S1ysGhYxB83oCD++HcyLmHhN5oX8cePMTARi7eZGBoLZJdbqBDefxPkTR74Cuw1J7w53WP9EXY24vImS0sfw/l+bBSSFsCH998P+WZ7G1F4s8WlcdlmcyMCt1ndBdpvtLuJ9jda3gLyO2xvUgEfYH1pnG62vxGtD7LANGZbbXB2TjdZYRrybXa4UFfvk4632OLr9m+yxqV8FPb4/nh6mA6Pi5He7J0PssbtdTca4znib7LFBA7bTPFmHBbNEIHCJiu0GQMq4COAr0V8m+GumiACgc0WaDMmbQNEgF+2P9vPnTA/1JGvWJ8luDcYH4rn32B7NmO0anoIpBYszxsxoUwNfSaLlmYz3GVDQ+nCTXbmhr03zQy59UUrsygFy0amGfU13vp7GZrb4r4W+h9jbG6L/G7Agwr9aEqsxH7LsDcGf8vQ16O/1vy3h38kNm+zvLcHgDQCKxHgDbBvt783x4A3YLPRBm+LAm85ga12eGscuAz7Pbb4PZHgDVjdbo/fGQvegNtmC701GrwB9o1W+rZ48CYabLPUGyPCFVnJrfXxsruMK7Xj1ksfY6uphbeZ6hbutxSRafCLdeSb4B4e9w1jQAMO778J8saCMg19vaa8tvectV4Oj+P/frlcdrLV6FQOfww7zZfcxkglpjd1hbZgLveEboP2bZwev7asWAPe9d0bIW5rhmqBXO2IoneZschfxqfpz08rTcStlz6EXciFNzFNE/ebWIeGv8xAK5C3HSoNfPVo13aeHzDtkV+HPuYwy+W2HeEVO7ot9C/P4ziP7mpw2YtvhXXeCuv8fljT+V/3u1+mw+MqsPzNt0J73r2cGxxYQYpvvRXKaTy/PK2DSa+9hye+Hr8RXmOLMfK338Md26HWb79zr/83BIdbd5u9/879boY8f/8de/6X3c9Iun8eD4+Xr1t2PZvxjn3fCL01483Qm7HYDOJiALYFSiPamQNZCHGaMArDc2kaPfj1Y8xNWmmbpUF0CO/g8/Fhalw8yECkN7atvuFia47/4oXWGeYZkaHs+LApgiTf/JDDWF590wHRW7kloFxBZDGqvBmD0/h63L/AGzD1Vlxms9+O1cawcwWh9dhzE4Uy9iRtRxz4EOYrFtvEawkv4mCfT+NrW3+VsPL33gbp/uV02gIpf++NkI77DbTbv4Nq7U9MlBCWvy6xBuE8Pf3Ty+F+Bcb1rbdBuRSsPdcxJbT525uhbrAS1fksGorWvjJh/Fv4PsTfxtN+vLTi/NkbHyKe7VU3yekc5aXw/g+7/T34JNtxmE+7HY9twT6BwGqkvwzZGaauhxBKBPvx9Ne8HAg1PriKng8uHixX19JieU12gi9GfNndj+fv1u/IrtzubK614Wrn7MsGGbbBKR1B/AsvKANWv7N9D7PDXVt1QyKnRri9L8K3y+Df4NOtOAvLi25xEmgvpeTXqK/+cDx8mR4rfi0HFze0WAwnV/vdSvW7wm6zp7AGsN/uNITJAdHNHsQqBtudiW0YFJ7FOvRNTsYmyKXHsQp5m/OxCXLtiazC3uqUbIJOeSirWNzqrFDY1KL8t+ncsDnh15bw/tiFO57f/3oHkEBTfH/He9G7u+7uyzTuH+DDfH797u7++PQEmP0Yxv42gt8Ab/hXvhvuuh+GTppeqx9/7H6IE/B31vF+sLrjHeuV450I/5cd7/XAO9WxXgyq093Qa8E70/FeDbqzHeud5Z3rRC+07NgACwjZMVjRGY2QEDwDMLxjtldaFAjgCEB0QnVMdqzXA+uY6ngvtemY7nTPB3ddisME00neK8mLpWDk+p6A92zHZe8qkDjSsd4Cnh3rpVCdCP+HvTIhcK9GGdwrM36vhjO/RyG436OysmMwZDXrGNBBKdHxoeM9V66D93th5RUpedf9wHknXM+MKZDCkY71XLrOwnyhPTmY6zjQRyjZcdmJ3jjVcaAPE6zjuuO95bbjppO9ZrrjtpM946zjzj9coSvyFGAEtqwk7/A0hA3gxcD9aQyD7jiHJQN4IVgnYKtayk6wTvWDtFdg+q77QfBODL0YZAFMh61q4zxPadPZTvTDYDuY0TuZnbeBdUQnZK9VSTIT1lHWBt5kSDoL+IhO9tx0Qnaq54FRcD0L66mGKNg3LedgOd1iR7e0nvbrdAKOzXKTiQqIpLCd0L3WJeFwiFwyrNQJYADFsqNgIGTCtZDEofUlXb1tBsImhxYn45A/Vwc8NPTWGuAh1gttPA+hdCATOQYcK/rBBI7VXHaSBa6WPD6AgDrtOgknwGwnlR/JUAK5ls2jwCFAwFiOu5RWdwb+DyiCSA+WB3HTFuSN9dLwTqKqM7aTSBJrO+lwG6pTMMs51ylUJXCgyNNKdEqgHOsOJBanKxUfNEq06lRcWcHKrFMuLKcHv1y2L0krz1xr4L6cRpUFJEM5Zmlfzh+BFfKqPVB8JVBTB6WBuDsnMvCgG0zHXc9cRVUVoANVgVUGoILwzJMtAPKuWUuCcUgBhzjjVS63/ly4QJUrNA/nA7TEYxEyHAtoayR5xJpJoLjonXKB4vAKUlzLQHH4BSg+SBVoLk2ngcvgHS38elrGH5BrXS6eoHV0m8u8Qhp6F4ymZsLbCcll1KbKb8N4TlJGAyfxXgwWOIn3jPvdSJA5wF2AlsTVlO5AfsCydhpkRoChcuHBDPEBluGD6YynjsqQtzQr2Y0mYKb6NZJ6sB1QpVdDTizQgTAuem1YCc8V1poPJJPwIZBV22AvhGcOLqTXLxrOFoXOObCIrFfaUxHkG6kI/AO81DsNp+v/xT0JpKrslWOedIZJTzpnVWf8KqIzYZKBSdzIzoDlVdJ0xsQH6x+yXYF2Na5hbHAEzxv0DSw9KHS84P/AfWaQ3vGCU8c9omDrQQFLiX5wAqwSPmQAOXnAvHSPOO0f8eggOeE6L98WHST4P+DEWXCQGOIkApcbrb035Bz3TpBkwQmSlgO2+E6GA6gvOzR9ORllyXk6MOM1t3DKHzoILh66NcILkxHGH7binWUBT+s30FkkrhGdBepKYCFvQUwHrm/PFeus6YBRZWdhFwqWcf6XDGfaieLRi0IcRcAoIYvqV6IEsV47DRLEeseVZ1UFJikiC7LM7XUXbgi4OhYfODKv65yIv6C/bnjnPF/nPjPqWfBM+1q4dLCMMtAXLAhqXE9Vb0EUR1kXyTx4OjvmZYg7Aah7pxXm99plhpmDXrQWoDNRiYFJvkLQ89wEe8WZp9hgAw9pJ7wboLQDygwoM3iKbHBwit6lxMNjyno6OGc8SuBdOhOmOxBVIXnngHEYA8d+QCqYjg3I+w4CGjgPm6t/jhp0EE2exTGJylt7p92C1wVUhLiJgUj3StuODQo0joEn7X/LQDiaw1xU0izYd7DzEh0A6cnlWNDRnGuvoxVoRMAYrQ+AFr0DizIY/1sWM2E4ONiGwgpDV7xhsjNAOBd3xYb0xNIT9+9lQBip6gULUm8kC6GBdwP8NofeDEHoBZxgPHF0A+BYkT2ZDexpnA2mfXDBpA/OcyxTzit7a6xnXdiaie+gkpfSZOzhvanBdYxJVBeZThCodZlqMQWO5VGlttyrK229XA0QVGhkPm/oDeh6hiGfCCqBM1Bk4DGyoMkG7jUZvMOYjsEoQwcB5IVZH7pmaAqSsXCIh9AWHDI1SI8tOmID4sQGGHDoHsARaX8mckDdBu8aYD3w4hyw3oBqCR1lsFZK4O7RJRvQUUaDzJnyFhkfcLqVsH8IyIMTI7jzihwenIPpEo/Ez2JeteLhWKQs7N8h73eMD+gZ2A5VSm+k6hjHuAJ+QqMEwgMuWq+M6xgqaAdKw/sS+JtJT9bDyujqHXTXCoZwTGFexMdXILlJLPH8jQ5qVDjtT1mAGjVhCA5XgFsVjtQVnIfWSAyd4L2zFWhV5kNoN1zEiHzQOrjhCk6J98IE3KzUcCaQfZBeYIxB74jjaXuC6lzKDWLGmjJhAlHyrBLKhBPSk8CqwOgy8LkZgmYHcKjQFbpCOjjEwPkhDYVkUkPO+bTfK2xyNMLejWd0TEOJkAbyjA4Mh4wuTHBrfDAFwhAYHvQ9THLMwOmGB6/KRGBvh4YeIOnonggwVhAoh71BsseZMN0rIeDAAWFAlOJ5Hz0vzBYphRwP/oQMLC+Y6eAAAM2Ogf3pGUixSFOFjIMqvY86FeweuC7wlFHRLfB56c7LgeZLHMteZaR3IGNyAqwN0NAyT3flpKccpB9zruC4RbTuHNkjsALuWvQsT1BJ1NqiZez8UOads7lzjs6SCt7K4IznW0iLCgw0tedby3QQYdCBnkvRx0LUdG59Ja2fpQhcKrnprv7SujoegsYLHpRsKGjPr+CbJE2dFHQcMlFBX7UwYGONBsYFj1t4NpUgiuhKOc0KFb2omG3U38JFPSsRmwFCPJZ+4+lJBFyZTHpbqvSk48oy6W1p/VNG7wW9jWPZqwt6VpZ6VmoysPJDbbYKMZ6XZsjnDoHP/MmpK3957oZzjyzUMekwqZYJq0T9q1o5fz+UJf1BvFpJf2s8s0EuYpbsR7ZXChJWfgZTYB+AbRjatUIDS1oD+6GFEgAwYlkDkKiJAMo8KyVLTaQGsl6gSkWkGHlwfijEmjEqjbEnumzCGzLwwayP4YBQA8/CPxuiPTxZMPHBhDBPQvjFkxCkASnIVZ68R50ECa45t+KY8zl0H8qEJ6Wil650esJUneogRKpcc0VroDjEewVOAmhTA76ZgphGsuyoFYqVcq0MtirFSoHogE5QvRHV4ZRSpVB0dDNXgGPZq8je4Ok04JvyVWQ9zVtijWPZq8hysO/GqiXLaWQ5LVuv4ljtD6JEK9CfgEovhO3AjAlIsDCt4wOYjgFrYjYGcxrzHjI7Qo2sCsnABnAWwkdj43oKlKsGjTxAlGMY6BGrOki34FO2sq+8NUsxOuX8oXwA25GWgUWANGIAAHxlZF2b0MhXRjXxFTHcBVU+oIYyEPaJXrIS7/SbgV1ZleON/AjJOdszV2YhcSzh7XNetoU3yJbM80AaLYJpGg8ca4rjXAgh/eV/sqwWR61JcYxDtThCNFyKoza0OOpSHDSKAyQ252pVx/ywGSJhIDMNb2PiP1vF0bZSl5JiBlL+TamcjVfOvCX/OJa9ymn5N2US1Aha/nEse1XS8m9KrWYULf84hhbD+HADWVurKHaYQ/dPM/HMIGhayHHszUJuDC3kxrxVyI2lhdzYjxBy42ghN+6tQm5Rk1vRqhYPUcbhpMHQ+oKul2wI1pSNP9l5EZpuiIhD64bWclqybcnoVpCCZks+t5I2tLbkc6toQbOl+baaFjRbmm9raEGzpb6ylhY0HPt7GlrraBm07j0y6AZaBnHsTTLoGC2Djn2EDDpOy6Djb5VB5wtVrY4NHMpkMEqeHZLkMVoGHV1Xj0Pr1tUpWgZdKQNO09bV6a3W1RnaurpSPJwlhd6Vzq1ztHV1pclmw0BLvR/MX2a03PvB/GVOS74fzF8WtOz7wXdbWTZIWsT94JtlnA2KFnI/+CYpZ4OmxdwPvlvO2WBoQfeDb5J0NqA+hyTETNTDGLaEiJA74RiCw/9jghhzqMrXWbg1vsPDKiiNQqeH9MkqaSXkCofeQd4VE0QhezVACcUXAiWWC/yyPhdlMCpnvYZtANn6AdJ/eDwa+gSsi09YrmVAY6zX+t94ehLpyZds826bga7+hbGFTIlTdaaEYc8YkSrxg/nL3ss2TeZhlbhin1c7XxLGiBRTTCn5CpUMDZOQQkrJXWgP663gvgwChVo4DdEbmWWX8BSqpC7DVi/m2g06TFQdOoP2zKJgXWxV0/P+nNiFg41D0MqDXM18LlRDUhSr4iZUKqD1BlsKBhmS05jZdLF1h6EX4p9ceOJD6N7Jd7LQ98Wi8hHK+lYDwDTuwPfacelbDZRwvtUAUsSptwhbndxgU5dQ3BXyroIsOosPPEiRiD/IQAgUJ1BwTqeNoNBAAx+cZ9UFjB1jzT6EMPT3bURg2G8GKLbaFn2fmsAmXoUbUVgVho0o5BA+zDKRjNHNDX4MVaHkPl3vTKjXDyY0hAwxEah9Kp710gnf3gBNxdjVANradzUMobvDBQWmnFdgMMfnhRULqgwYw6sykBTsaYAuu9DTAL952YLqnW+HwCfnn/IdYoVskG2JiuUza5SXKOEr9woqT8iPInTuaemCUPHY2iZC/6OIHTuDtl6swO/yYsVCyw6UAbDZQ1rryeIs82QRGhgPy5SglwednkA/QKmLQ2sxPOX7WtC0zH1YK8+7Wng6oDtkhDO8sR+uLUR8+E8QIk4X7PzYOznedxqavyfre2YBhvfMUjI8dsq1/WY/hvuB2gySNPZpQSkOa382uhMOqrLKhPI9H1yIJjkb6s4bxunUux9L9UY0o+xad2SeCT0zOlBgQ6ghSe/OefTkID1WBirEGM8q4XERWJPmjNVFJObb8KCHZ+6R8dh8bILHBYKQRARbA0BpYlMNttlh94VL9UHbgVjI3kL3JpOh9Q6KhVXLHcPGOs6afiFXVY3YBPssgB2QjSGml1cXQ4QqFWfBe+g4ixaZY3ES30OnBFwQjn6gFQVd0JDwNl2ik61DgwQ4nt4RdhZQEmi1PSis8PHQx9lxLjsNaWHOla8T5zCxvZi3PZtrI52N7Aj22YewPOzfoeRh5zDS3MXfOPAAGnH0svyTrq+PMGxw47xZTPODH4uBmWOAlyp4q2bPUnMc+pbxLpIR4Rg9y2ODn8HkOzLb9bhFZAEkPZQ4Odip3oJCEphRKIIgbIjj0OAyR0VEPRw7ZTHnhBqJK08TbCqTsUnWIycgJsB2Ymhx5qGXSwf+hPZajzC21XqnGd5D/vRPIr6H92iEKxDGbgrRSmb6sdDSi3rEKA13cTwsHdFE5h2Ai9G/RSG6IpSAIwWhYQXoJiHMytHgiIZsotFqlvNGVnp04OKIjver0DEFv9v3zEDjg7zevcIGKnA+fBOIjceNo749GZ9YehLxPaQeM7nE+w655sUhPxYL+EMMYVgQ76QDoLFM9nJgufrFm0ASOBC6l+EpB4oqttmi4scijdK1NIQKO0x9gwy7QbE50HdgQ9ePkH6DGcE8TtyKnHRCh/cAu/iU7rnB/Z/wxPxTjvtSgkPEBIcBlh+wwyHcCBrgSgHq3hiTSJ0oBkZDQjIF+mC4FOlJ+qccvl5IUgi9mKTA7IcC29rIUmD3GhC2Yal91xt2pDBs3eCYh/DKBbw7qXzGpsP7Qb3Ny31soU3Nj21o/fVdCs5fFYQ239QM7J08hx0bmN/OIYPuhBdcb0I66Qo5XmSDtrfohaSuFIQDbqZvuc3an3yTHiRmfbclNEK5IbzNpfHORselnbkd2CJG3C7zrWXzeymoBKHfgfk7ijLcVUSKA33cgA85GNSIsnU/w49RLR8y9GvEiwle/EwWIWACA9yf1NuB0Rb0YSf3xyeYfN9HaPfouAqt/9x304CRgkRX5RFJ+p5HGKOzRHzeT8N86xmRJZJlhYhhbxRXTQ1e9U0x3zjVThL5sRAZxhgyRoqzWNLGBjZMW6rA6sDXqNSF9RS2kcAmJY1YSBr5iNGn7iCI5HjzCgNFpWKgCHavChSxbQu42fSKV8IRWrpA3n1aEs8t/B8DSObiBTzhUcYuANymCwGxHEL840L0K4Xx0a9RysuRGUJwAzTyLejo5qBRhFIj5tH8NbkBnRqgKd5580/o4RYy79vACB6K7uTNt8EQW3TplZtdB8NWL94uLvrB/GXUO7rZQcyqLi+GvVwcCg2NzKWK92aBrt69CO1a0E6PjGajCQ1XytCqYUgKRhrdCxbiZLgG6nzi34amWwmHxWN22us7uLjlW8kV5uh8Zz8PzYnwxPFyghFwkyGmOjjeU/C/qfSbTk8mPaXkKVpGx4orm4y8fO3H6uvX8dq1d+x4fmWdYXMZN+1DU9Fji5fz8BoGQw86hAFG2nB5QStfzEBhxT0VqVvfYiZFs1ik4g2FgXvlYHxZVw72esVMRZ/YZ12U9jKDTIzpSBjzx4NmFGUGf0v+N8eLxeh141HgE3a+l940drIRJkrJ3FbPbDQ6S2CaJY8PIjT7y3g5B89BFmeKga5p1ujCIGgQ3484hPu0SsWssA0XZwx0EGLJAu784j2U6BtILnw6Tg0hHQft4D7LrYNhH4QKWW5jfZYb4m6f5QaRMSLe5TboGOS30Jii+5n82H+JjJvhdcYNuwa5afr+yvwnpNywF5FIuakUdwsRUm5KxfbcmHJjqbaC3wfAm6w+9aZsSL3JmGzW/jgH39sN6axYLhMmpNyUjT32NqTcRDS7At0hdJwUDyk3uD/rLyDAbxwDIuAPjndoeeHZYC8lhwi9QWsXM/Tgil5vPZXRXPCa0HPHgMWkgMWmgMWyTmPamcPN1PCbSE8yPalZYKPp/KtejPs9M8MdhniZ1l9bdeHqN0TRyCiQA1DeEeLhRqsJd9HhhgjeDQPVghxvZYx/XS5rmr5l58fyd1HDt+uuqbMz3GEP9wr8Jw78Bqw2/isIcAnaX7sewl164XhgryFcxcV8PmqbkMi1TvkrXc7GZC1+lYF5SjDv7QRDq60MhhZgef8G3uHeqQNvyJfL8cnFJ9QE/omlJ56eRHqS6Un5p5xKghZCHQuLsE8d7qrjwcM+Sv/PDvzq/6GogS+NAJU2mbtnwjsOby4450WNpxACmevqAAofFIogVloW7IDmqukQ+P7YcFkVay+D7tLl1djWUF9rzdde8PH9GAY3xheCnS8Ew/9RbbKgNk1QWnjJw6egQokYXGgeMwI+XcNzU4y9sNy12VfnATnqDqFZHoer8G2Tjjszi8j1QrcNq7pnmV7ybnXr8zIpQRCuLuFxQg9TvuqSG6xbH5lJq8q43bB8tqpZ8pcN5S/HLy/8d/SX516yWfCSza1eslnyks0HeslmyUs2/8W8ZOyMhotYDdEMHdWYKAHdBaj2HHgRP372Op4u48Of/UfQfvjh7q779e5T+CYau35a9dffrl8/+/7XOzH4n8Buff/rb7/9BiChcyWfzBYn+zn8oZijFDFHcf+TzeYK8AOukyEl0J4MWabrrBKiHYhJWvmfnLjOlcVU5yh4TATyMHOdrMFhGksSUcBzEsUPRGbzxHXenQh4ynAkMvxfu4C/iUflccnheAC7Ym1JbSos7/8JQFg4lrThMMwiUOv/5QE5HsZ5mM/Dezy+F5AWAZoI64owLgM8GX6XYb4M4yrMgx6ucALpKCJqCbeIHLQhhN3E6Tzui8fpEXPIPYeHOD1SPrAZPMTpUseHOEvFl1VcUEVaqviyiivrUszgIeKj4/TIp2CDA+0z5tnd34/78RQ+2Ho9ZnHlXZDbmjHib2GNC/7Zl+tsQ0paPM+hOkdenacudniFU2LJrh9UrQXEZvMeHu7TnyXMJusrK99FSppALRtJPAhKKh4epsv0Ou5/yRfVdnHnaWqFCaXW1tDyy325wN9nz9YbKL3ME2/Hh8TSKnJO4i6Tw9jvC11K0V22zzeypQlruySHiacjKxfcWZ42Jy1GxH1IIpskLMmcqiEloSlBFvqf1OGRkqQmCv+PQKI8mjDPRPUbsHERmSHiOZjZpmaHNtdDSXKSapkf7FxbFEd9ePjuWPATRDIEV1/XLFbAv02YW1GTq5OWPmmcnMpXDH8Iear8gUxNRYWpA5VsWMgpSoKf4U+T7T5XuEqKy2S+RZg7PpQyQZrGq1JPBB9alH9+LrUJlHaJJYXM5p2KHUDDBDHL28846/hSMrsi5yWrslXOIojTD1OhHinFFFeeGQZRrLb7pVQIpP9Z2xERTfjWoygUtKFOtkZXlu5AWOtSuoUkmwy50XodT7vH8lxJtZ45LzpbAv+KTC4t1/l3MjlAyTuZW7rkP139pm0H/7lAXNFcHElfKtFERtVSUJ/HL8eK42mHo71C+DNJGYo6U1CeWVZEoPJkkueqKwYmPJvaTmSOaDQAyf+MMK4uZYOdk3lL/nzLon4+PhQiRLkrka8DkkGzBtMV9GtQr5EzItYlndoC3c05q+kAALr3I3zq/1L9bYHrFrJYZyA0fWOZymMiDVyGS0E4Z9YcA1kedEN05va84a20DOx9+FsgpZSR2qFiXZJFa4wTJyYGrJirxKY6F04rujwrcJ/9XZOMvJTK4Ek6kspLsqCLVfdlpEAhc5UpmU+vtkLql2Ir4348X6Zd6SpTgFPAWAp1tdRcVcHH0pas3nyB0qfIjcBczxWBe1zqUAUYuTc3964q5TGL/VNAGtgxsCEXJcjT9DxeSlpKSuhKFp+tEf5MbrZQoe4b2j7nha+7w2N5BFzQnlI+czoBaxekUzdtAf58fHH2mSd+p6MG1vMNRM8+vlMHXi55cslDquFewt8EzaGrDPpySNfQwuHPQmWnkKnuqz9RJkBa6xwfKn+XlM6kLVLgy5O0JaMaIatc/vxf/8i9e54zfWWsCHc/N2W4YslFZNhPrfD0eSopqEk+NLN5hauvSTYs/JpygZkY6VyM5unDkN5Li9A23GRxHJ+Hh3EF/wd4MgqSOWRWaBOc+DLPcnE64kkJOa2Lhc6X3aH05wfSE4jJyqFaIf45sVynZ4QMjlGlNWMGNHBrypBGIET+IWU+o0II8m6jIojrXzOiM8N6TS6klGaS1pS3bCihZZiJIJfdVOZ5JGkyxWxiaZg46ZbV5whzS2kc6Ki5TNde1zgdS1Nv6TDEzWbuK9Q5GSW9Q4tFSHWJAFo7MnU2D3iKBapsJUXjGHHocM4xa2ni+QesbYoZUt6u4IjnwmGRpF9LmQy/zGmsHGRG+U0rEnejpH2QJPlNvJzwTx3l5CB3ETWDaePXCjd0Qbh5uAEPrkTnfKnICkXxKyulvIKmeOphd9mVSpjMmefy9jCOzwUdaNW/xBYP45fdy77U4JqK/jal3x/GL7V1he+LEi56jLViYYrnCz2exsrRpIO6vGb5MD6Ph4eKURgpOLLA/jKenuoNcLLQWqR5HqbXMtQheVOUs6o0rs4cwVjlspT79/ByqspNjA7P8pTauLv/WjIundZu+V/jfvd8rulELpHTadyPT9XpGNJryCEe7nfP51mkD81VG8LR8d9fyvAJ7oKtR47jS2WZLMULKec1q5jyjDnH1/FUpk7IbGoqfaQMxGKQP/4MCfzpghif4S/FZkhnLMUbcS7Pj+fny3g6VGG7I3k5p/GX6XSu0rsUibNJVVkrc35TDibsV1JS8KV0IDWNbWkFVv3AKpWcPIqibpQdwiwoUCKjfFxjnkrSrchpJVUwS7pG01xntOZF/ZQ2cjUi17L6LHNanDTs88f/+fVyeT5//91346H/Nv00PY8P064/nh6/g/99l+UcPs2TDqTUihvBHMZvl+Ph99ycP+133z4dv3x68X8Jcbf/9HjavU6XWagDf+GCkDpbQW9n5Hge/AdatfnyvrRhOp/XyqxXhzvrCVnLqEeRqTLrW9OXX074xxszUm3KiZdpq6z1JArczaWT3CGr2jcipsdCx0FbNeG4RA88SnnyuDNX6Ev688OZ2iQ7B+QK9Wuvk1VkESV5snqHrTevUiyT5D+V6jOJLH2AwWZalCoEPI6lEaa0ZqpaRJRSe0/SaDEcYLntfBwvDQHI/WOqLJIOnsp+PI6Xp93PmJTbj4fHS+nKiFzIBNWz8jhezl+P3+aZPc4z6sUqMTn/Jf4F9wIDkWOwsIvz81g5UUX2o2Gsw9TpdSx4Va+VFWciKNJD6kuLHHYNyDLXJdOllSc1kD5R3ak21MuVJewht5Z2rh3ziv3jy1S6zRndYuBmwt5tSvA2ui2igbOZ6i+WppyYoUXYML88UzKHU4QC05eSEegUTNLlSf5muZCrRA7t8w4wn7zXWCZ/SD++6dPGNT6h6/npabx8PZb7H0hjnydFq8QXxdBEQaWq5/Gqij5rRVptwrp6SYm4Q7H7NpUTXqmklezZrLqbTHCjibHsyIgUut9VmobusVPFRHi7sJaZpAX+pezEdGimqQXlGuQsfZig7Db9x9wFc2QwPxQ88fxShhSc2nDZLxGnn8dTydx0Bq2QRcxtVy4rmQZYTLJMh8v4OE+3W9IFnQWSs5xVJYZFx0PZ13ZF4fRld18FzqTJyNOm0+H1+FNpo8hocGM9uuzEIRkhribnAUyKWzZoQkoBzpB63u9+qZIpnBfWmCrmTaUDQve+bWjsmi6lM0JlKWQxZdwXxgP+UtJ6L/BPVRaRznM1yrE/TYcRlMJ9yVMr9f2MKX96uZS5T/jkH2UmWncE9rvPY+GIiOywkvscD920TD/NGdW0APDp80OJMiO10YeEBjncWQgNf2Lu6uXz+fZytvJrVHkhlunwgBnNLX4FumwJf7bq2kwxR6e5StV5RLYS5Ep97vHDHa1lo9Cwy8205n4qXVvSvLa8xv3xsRIHsnOnUM9Pu59KzbzQ2uHKaWUxik6F5jb1aXeocqGcjHQLU/C0Oxfw8iinwTxla1yrs+Vpd6mz0KTT2zyup93P09NLwdOcvAZR80BYYizbm8jeqHw7cWrt6cJd4eVOuNZlg5bJ9muv5b4oj9uSCXV5K4jTy+Fx/P3If2+H3zuBSjsArCrGJKvnGb1tMM/j01QuTgoEm53H2uKv42k/Xj5lbtnvXsf98X66/PLJj5X2l25kz/zFp2OtDulCXt08O0/+zFcuaG3Jexj56b7sL9Nz2c5vyDPKzOphvB/P511ZpuB0q9Y1TcfzRb4VckF6Fv6X+oYcVXWOKe93VJ+THM7vsc3r0akdfF6YTmZkfhFNFXS4HA9TdXdnIIs+Np/6cxn5CLLVsfIlrjYu75M9HEuVT/dbuXzSoQoaaHEopp2eKhNDs0DOtYdjVUAiSzm5RTu8PH2uPAlJXspK7fQtg3J4eRpP031tHkmrlPP88fO/jfdle8LqHZLI0FXDfAxe6gr5psb4+T2oazKZbowvdlJmojYlYt7SFl9XtuqKVlVVSGn3+ppZfY1gJd2+oRox18nXpHfKksZtLZQurqme+dXClM9fuKaadEqEdb2gkyKUTMarRkLSq9taOly5r7GppCjmmrJVeToeyutejLzulSQ4HdtNPWG581c1HgoyjEiWuaU0jqeHWvuQUXt+WJev1TTyPnkKUJvG9nn3UmUFed6LylvNqDyz+M9V5pX8NkAr1f08HRZiwuy2U5jdiAnzJSqKKEr/y0z9Q+KmTG5SdIyls3jxNF44DRdNr8vN8kCk2eM6n3m8VFxMuoGtjzQ8H8/TLM2aHWWjYJwZ3efTeB5Pr1X3FVloz1nx+TS+TseXMpoU5IXCeZFy3ilny9UbnXJ5w3vy2PS87BMXOT6Pp0t1/4O83dlIOD2fjq/TQ0keQSmZW/sfq+tCSznLZJVbTY6n3cNUnkNezaSIcxqrkhzZihXZLndSYfZlehpfp/MLJOtrGcw+DaAaaaZo0SxbWrL6lEje5K4b12ZiS07eHn0a74+nh7rfjfRIbbxNLhpLEHu1WUrDUgWRxiL1h1KyM3NUAfo0fhlPY1VkoPTd//d+i9P4dHwt84/kRdNNHRd+wWZTdRanrq7VoitqwqoBlNTgomCPMLW64bSiZLZeh41efST93MtMjv7VO5x/1qQg4r+/TKdSpym62pzjGRc4P4/38293cPpSTNMHOo3nqpPYkF0BRfXjOv2p8mHypvxWNwDLo+XTeHk5lb4H2eK+/JmKfL3KlpJf+ih56PW4fwEzDgqwTKLI3OSR/Huc2Ur60njzxrlfYcEts7l/OJBWpVymUpWODOiHzCnB9GE5j87ltao8uACmHWVdvXD5Lpo3F/Ori+e6s42s5+Z8cL7flTk0Tn/0KU9knO/HMnPCshz7XQzeHNVcdB5LoDSx80BgnjclpzU7OWB+7OZo9RHzIWdg1pJJ5vLlDueKBmRCJE/nnKsULHmBIIvFF8O883K7WN7uJSipPJPtYnkRjZHddueldrGcrI1K3nWFebtYEelRX3c5fz2+7KtbGWRvNpFUXflWEGyu3BTdaFEe1nV+eR+R9M2ztpuceacnaOIsk/d5jJE6KQ1J4elpdr8gq6ml/HNSukvFnIY+qls7RLXeSni6tRdk1jE6D8/y1tG461YLLC8shV4hXB01k2WoUmuFyVV/TCZVcSMx+WXDNlzaeyMsoT6flz4+FT86lT42NU+yftBn8Da1qSRVNv9oVTrQWe6wUX0oubxKEF5p3ddZE05fIit06VR/0IrT9y2aruL5sHs+fz1WbVl01TZzBhr6j74BWFI/LHDZlf1gLGt73iB/gtSwM5+tsAqt3orAlvFfqjGkSl6nkG7hyynzzy5ec9WppLWQq05sNk/rbMlM5/wGZPkfZXRHVkXynheYWN20zQ4q3sIx4Yxt+jwcqaEuZa8T6VDV6mJmBhv3seiaYkM+C+ocn0tmzIzNup4SrW9dbJ3lEfjlfBlLp3rbhY8U4ja6Ovyi5TfDyGbHTC9cqjYYRl4CXwrcLl/LT4xZslmxvsRR3EJt14CSc5nEqaysRRTKD0Nsomj8Em04vsDX4RDjGUaEIj4RnYhN5LHwb315iKin1eWfWZl962WjG6+91Fmq+sp8+lxk7NmONcbY3l9dqU+fk4zjAf/6qn36zGSMwuLHEdM1gfIqfvEhyvTO/IuUc8aZl8cWHIl5d/mbHInVzv/lLvXrVwLntmNmMhpf6p17ocmaLHzEd6ERfv4135uqoy0v6PK1+hgg3ac3EBY0LnQax/7fqi48Mi3a+Ep2nSNiZB8VZZDKjP7KJ1LjEWz8thpg97CWTeIy/z6ypG47tdaqvvpBVvtY/mmAS9HIQtnx5WsibfvV+HLhShsvpcKIjyQUp7OhlWOe1lj4hO9SmDBv90g9F0lkmpIC6Y4yKqd7U1vtla0PZ5GfTFm9k1PptgTCc1MphVlnc3nGtCedaNqqSL15lRLJmfjkuR/duJxfGe9kTGf2J7GGlhTcyhHPbynW3wZtt1zMP6RccUuQ6+r+F+XHVSR9K2lfqsoB3Wo2Z6Qsg1QFHOQ3kArmm31LiL6QlaxUdj7lLUZu6P7nLLHaSiIWyXDZiAxmN+MIby3TUBtuwDV8i5lvvMlLSM7BTa7AZg+gJFwZkXL6Zte1HpdAJgsi5us2vspWnIumbhDFBUq8yDuQdbKpXKShc/Nr15HCUeHb5DhQueuX55JcdGtzzqTPD7tLqQjoe7D5GVXJcfqioC5nlUVQOpkVzy/y6/xmSOKzeca7BFm1b5HlwfqjsnWoWQh3xQVkf8MbAtg8Sn05V+la8vpVnfZO+jl6njFui05PcTcm+rub0uWI2etYfxKQdDqakXFcxTf1F+vkpZ7WN1eGglAJwXJFf0ugro2Z4puYDQei6PNp3TSg06hNbKbyy2FkoqPgrtfpPDNZLqeKoQpgsdllXk0mL+389wzor2H3Lbe7K4eoMvNUaxXF13VQV/YyXSseuPi3cXr8eql9LpId8vYPP7W6yZNnrlnDk2h/Yf/b17FuaOVk50zLE1v8UMG3r1N5VYz8zNnGS8jfptLOkH5bnqL8Vt30JT3NAHrrvZaV+yyLH0/c8hmPVqfht+Ppp8rdIO369gbr336DP5X2PD2Pe/g87/c//Pjbb/8PeWJQCbQJAQA="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACtV9a28kOXLgf9FicfchnZN8k/3xdu3F4mzA8O7Nl8GgUS2l1OkpVcn1UM94MP/9EMFHkUxGVpakubM/dXbxEUEy3hGkfr077L8d7z798OvdT9Pu4e4T47a7222ex7tPd/9r//DLn8bdaTz8/bDZHR/3h+fNadrv7rq782F79+nufrs5Hsfjd1TH/uvpeXvXxX53n+7ufusiJMV4gnS/3x1Ph/P9aX+4bfI/lCMzQN3dy+Yw7k5L67ggwwYuEzbT7mH8+UY84pg3Y8AHedn5U+x1Ixb5uLfvRUYCfxq34/E0bbYwboZM0fohhz2fcdUJl2gSx7rdfBm3ayDGju+A9bw5HteACv3eAemweZjOq2Clnu+A9rI/Tk0R0ICX9X0HxNdxu7+fTmuI7w9Z33dA3Nzfj9vx0BZ1DahV/9sgF2x/v93vxlU8ETreuMqCsXenw/Qynjbbf9of7ltQyw4fxN6NSVdyeIUvcXj3KNvWAo6db4ZZHNvTeML2Fhe2wOb9b19tfoj75y/TbnwgTjBv/Zjjm8247uwKNImDeyR2cA7y8creEdDWHtkc4IrzolZYHNa/XDGjZj0+6NBas648uBrlm+0VAvp1Q2UJdr6t//jzy3a6n07/eN6Oh79NcwzqDh+yqc1JV+3pDN8lflgJN/a9GWJxiMfp+bzdnNYCzbrfvtLsAP9y2Ly29Hv4/UOOK59r1SlFpIjD+csyhL/cMO9KsVTMf10gNfDPtvyfN89fHjZtrZG1fcjW1/Ot2v4cQYo/5vJzBuqRtsfaELRSQicQnz+ffnm5vkN/eNz1qetVaP0jKUXp05+BvE4BxBbOqKAlMlPLB1LATULygtqtp3+RidfOvpz9hpPPQKw7dxhAnzopditoV+Vtc9Nm533FBml1+kAqeKsl0sT9VtpoAb9KJiTMGyimDXgd8VRjaTqibTAaietm2LWNz+jrX6fdFeKa9fgQymrPuoqs5ihTMYGfp7lUJgCHvu+E2A5CEiCXo49LMFeSEAH3Ov0srjcjnn8bN9u/T8/j99PxvNlO/9nw4eddPoR8iGlX0U8Da4qAdpNf/18fVmNQjnkvBkF/tPiSQqAY8l74D9PrDWuPvd8L9bybXsfDcfz7YTNt5yxMgZ8Ney8eT+dpNXDf993nfdqc1i849n4D1EKEbB4e/rTfnQ77Gza7HHPB4HR8+Ifp+A8vh+nV2z1vwOcwPu9fx5tRmg37WKyOp83hdMvZYO/3ns39dtwcbmSEcsx7MTie9i83LBs7v4UPFhWL+PMKFMSffyflEiZ+o3oRf/4YBROxeJuKobFAcrllF0L/N0FeZYFfgX3NCG8O91h/hJ6NuLxJ09LHcLwfG4mkBfCh//sh36xvIwpv1rg0Lut0bkTgNq27sPcr9W7a+xs1bwH5Hbo3iYAP0L40Tjfr34jWB2lgGrO1Ojg7p5u0MA35Nj1ciKv3ccdbdPFl+Tdp45I/Cn18vz88TLunRU9v1ueDtHF73pXKeI74m3QxgcM6Vbwah0U1RKCwSgutxoBy+Ajg1zy+1XCvqiACgdUaaDUmbQVEgF/WP+vPnVA/1JFf0T5LcG9QPhTNv0H3rMboquohkFrQPG/EhFI19JksaprVcJcVDSULV+mZG9beVDPk0he1zCIXLCuZptfX6PV7KZrb/L4W+h+jbG7z/G7Ag3L96J244vstw17p/C1Dv+79tca/3f0jsXmb5r3dAaQRuOIB3gD7dv17sw94AzYrdfA6L/CWE1irh9f6gcuw36OL3+MJ3oDV7fr4nb7gDbit1tBrvcEbYN+opW/zB2/ag3WaeqVHeIVXcm29P21O45XccavTx+hqauJ1qrqF+y1JZBr8Yh75Jri7p21DGdCAQ/83QV6ZUKahX88pX1t7Tlrn3dP4v8+n00a2Cp3K5o8hp/mU6wipxPSmqtAWzOWa0HXQvo3T09eWFmvAu/S9EeK6YqgWyKsVUfQqMxL52/g8/fX5ShFxq9OHkAs58SqiaeJ+E+nQ8JcJ6ArkdYdKA796tNdWnh8wbZFfmj7mMMvp1h3hBTu6LPRvL+M49+5qcFnHt8I6roV1fD+s6fiv280v0+7pKrC851uhvWzOxwYFVpBir7dCOYzH8/N1MKnbe2ji6/4bYTW2CCPv/R7qWA+17v3Otf6f4ByuXW3W/53rXQ153v8da/6Xzc+4df887p5OX9esejbiHeu+EXprxJuhN32xGcRFB2wNlIa3Mwey4OI0YRSK59RUevDrx6ibNNM6TYPoENbBl/3D1Lh4kIFIPdbNvuJia47/4oXWGebZJkPa8WGVB0n2/JDDWJ591QHRS7nFobyCyKJXeTMGh/F1vz1DDxh6Ky6z0W/HaqXbeQWh677nqh3KyJPUHbHhQ4ivmGwVrSW8iIN9OYyvbflVwsr7vQ3S/flwWAMp7/dGSPvtir3bvmPX/BMLf7vfNOItJZyy59ugtR+0KOEsv2VxDcJxev6n8+7+CoxLr7dBORWMNJdoJbR579VQV+ikihoW1VJrXRnrfx9eo/h+PGzHUyuqMOvxIcKgPesqqTBHeSmY8KfN9h4soPU4zIfdjse60AKBwNW4wjJkZ5i6HEJISGzHw9/z5CNkFOHie964eLBcXRKZ5aXcCd6neNzcj8fvrt/IvXKXtDnXiouks3cUMmyDCTwC+xc2Vwas7rN+DbPDvTbrirBRjXB7XYQlmcG/wYK8YposT7rGJKFtopJeo7z60373OD1V9Fo2Li5oMfVOzvaHK7n2CrvVdsk1gP16EyUMDoiutleuYrDedFmHQWHHXIe+yqRZBbll31yFf4upswqL0u65Cn+dCbQKcm0PXYW91jRaBZ2yk65icavJRGFTC5Tvp2ND84VfWyLkxy7ca/306x1AAnn16Y73ond33d3jNG4f4DFCP393d79/fgbMfgxt349gvUAP3+W74a77Yeik6Y0WP/7Y/RBHYAPreD841/GO9UrZToT/y473mulOdawXzHS6G3rNZWc63ive2Y71zqnOdaIXxnVs6FgvresYTOgcwkHoDIDwjtleG12AxxaA5xTvmOxYr5npmOp4L63smO50z7m9TMVhgOkk77VSxVTQcuknoJ/tuOqHCiS2dKy3XOCK5aA6Ef4PK2VS4kqN1LhSZh0u1Qjhl8id9EtUznQMmqwRHYNtUNp2fOh4zw3vOEARTl2QknfdD5x3wvXcFThhA0zNYVt5z5XfDD6IDtDsBUwsO9FbxjsO28Ok6rjueG+l6LjpZK+F7LjtZM+E7bjzHxfgijwEaIEVK6E6PAw5MA9fMOUPY+Ad5zCjNh68kKoTsFKtO8E61Q9aX2Dpu+4HwTsx9JKZApYOK9VSeHpStrOd6AeuOhjRu3weA/OITsjelNOYMI1SMpCl3zirWSdEJ3tubSdkp3qeTWdhOtXYf/um6RxMp1u06Jbm0zhNJ+DMrMzIgwEzCtsJ3ZtqvdhEzhhm6gScvhIZigwYTLgWjth0fUpXLZoBn8mhsYnYghNpoJ6htw5ZmfXCGE8+3ATykYMBWhX9YJWnVSAIyZCeWSd5/ADOdJZ1EjafgVBSvinDCDhaNs8BmwAD47z4krYz8F/rWXmIUgdEhUDxxTuJ8s11EjbDDayTDtegOgUEP7BOofyQplNIylp2CgaDYaykH6xU+FfD7Mp0KsyqYFbGeKecn0wPfrJsQZKWl7mk8AtyKKVACiDvMqcvsgN338JCoshAnpVA0zpICoXifsiPGASC6bjrxVDtpwrgjRQdkMigpJ/A6vxEgMuBimZ8iy2qG3o3aC9lmfMnIgRKWWF4OBouw5FIGY4EBDRuOPf77biF/Ra9MyZsOHTBHedxx+EX2PIBzgAO0inbaaAvZlSnhZ9Py/iDQpWQnwbIGt0mLy+Ght5arzs0t141SGGiBA2UZVggJGWNJyTBgZB4z0RYj1QeeSECHlqbDgRu71yngVuEtJ124cMM8QNm4bwzfnPyk7Q0Jdl1Ur8W9jruM2xJr7jMoIHYg3bRGytLaK7QznygCIQPYUs1HEYwOIAwOBC4ROkSCEMMFjQg6+FkcYst9xs4cDhh1gPTy/Avrkc62E/Za+Y3zXDnd8051xmcw4jOhDEGxnCrOgN6VinXGRM/rP/IlgTi1LiWjYVNeNKWo8lhtUQjC/4PhAdMgHJSO79myZCpNUNjSvRssKCH8CMDycnT5aU1xGlziEd7CCwwZG1vDsF/FQqaYA4hRgJOAXfOgukDgkN5i0eKYPFIJwBX6JIhAHLLDk27TYYTdyYYYNabBgJMSThx4Fg8cWuV5yEjg2SVhnWWBTQtou94Z/3m6s7C7kqpO+u1RmfhJLkWnTWd6DWYdkBcSsvOOv9LhjRtMvFoMyGSIqCUsEW5C7hxVD5weiDTnAiUCpajSdgCH4NRmRbiBo+tY+FfHgY7EX5A09yqziFZq0z2cpSwouNDr21FhzpoQ2lVUh4obLWFffXKA8gAzbKoGPxOgxZBJhID4o5GKuiaXmcmDAeJaMEI7rm0JXQTzQNQnwPslLNB+4qgqgZnPRGZQXvdr4yDfRl6x4Q/RcbhFNnl8MAmdQpsCSYBo6F3tgPTAwfDjL1QunMO9ULHBu+nmI4N6PkMsmMD7nDBXCg6B9EkWWyTKLKZN9CtUn4LtQTbAqwVhSAUSEnYJ9hI+C0D4Wj6clE6M+alM3odqNdVsKqAGFBCSeals5KwsWCuCs4RtEDbiQ3G/5a5R+j3DbYlrkLbBXEYDbs3uLgqNqQvlr44dstgMErICxZY3nDdRZJA7e/VJpgFKmh/MBTjcaP2h0NFJmIuiHsjg0KPepx7SmUgy5GFnPAky8DaCF1QukvlLoTh7Sf4kCglMroWKGqZalEDtuWeozbCiyntmGenQQYukqA4USYY43ETWgdRABYQdIbd9BKMSS/BoA9jOrqcDE0CUNsoglkus4QgaQqbOCpO1YENpoagbpjqLGy6CYypDJoEQ2+8fQxuHAeiG3otkOqG3gi0CYbeCgH2DOsZHAtIHQNr9V11slVl/MDBDhYPPrf1ixfCefENH86hDlR4In4U8xIVYgPocWsQiQz4TYHs4ENYFvPSA/aaow8BBIwMaoBtuAwGGEPOGQb40uk3k76sh5btq7fJXcPvwSaFjpS3yYFnE0Pi+RsTDCfJ/BkLxUBE+RY4WoE2lT9Ql8NFHSSGToielWBVGfAgbW4Rfe4hRjYYGpogU4RHy2rkFB9eQE4BxWRw30AM417q3NYTBvFiTYYwYUPyoBEyhJPGr99q62lcikDjBhQ4xlkk83pFAvEg1QOHMhPDTLhHKhdmtJUrbDIuvMqD7UYSh+gSkrgWkcRtIHEZLRmpA63LSOtSgVoaeud9kfChwyikbTvgFg5ojgaTRIOCAoc4qEzBNBy/H+7lj9ComYbeahcJX4bFcm2R2pnnek/t0CoQTWE78CFYz4CXRBwqZGpUaQCKUlApBj+yTXQ0gZfGuxwoksSWrCMjjQEZgw9DMPZM1Px60H7XILSYEwTvQbehOudwVIEMcMGiZ0GJecAorUVTu/m2zBgHAVAb42gcqeAOgd5Doh2M8ESrhKdZC/uPzAuq1JOoQgVivfWeoUTLZSkCjQIFem3I18nhIci6YDLZhmT21MqShE6COfxuoly+SF8ehjqUaSIQqDeY0IqFMZlkXpbHNsptEZ1fJtG/h91l6SeevlC1d6BL4y8qfek4rUyiWlr/lW01LaqxKetJCldZClepSf/JNxH0FJ05z8UQ3hoChXla1xlleUN1UBfq6ZiEyBjXOR2h3FXNWL5vy4L5wFytYD7YQ0jiQs6j+LDvAwQehjCCKdAMGmQQKrNc9Epa9Pqmhdi+EnVwX6IMAiDz0JMshZAayESAKqWQYuTZ+abgWEYXNDqaaKUp5jW6MT4H4Dhu1CBU5uzZ4J3h4Qrpovbgfg/hF7+HaMPjHvJcXCkUSRDJmhEsNjkMlDLPf+EL3A3Ui0rHD4zHaWizlSWuaOETmzhqRA2iFIgAwnq9FJkFrJCrlGtFp1XJVgqYB/wOleLbqWfJVwqZRzfjAtiWdUXixvj5HL4puyLlaT5na2zJOiK9waIbc5b0ppHeIG4z74pttQHoPBNDDgvSGkLBF3hkBsxMyJqE3wxGwXnHwAn3npvGGIfKdl8jpULErwGeBV/RmDAdJPFgEojg6Y4ZBhODi2u4/8om9gm1Vo5Fp3g+qAdYjnQGlAHvBVgxCAAtCiPrvINGsoJQUgNfEX1bjD54JEFo9pKXeKffDKzKmhxvJEcIw9leDGWwEdsS4j62JduIA2dJl5lBGlWCaSkPbGry4pwFIdSFP0HqouBFrUlejE0VL4K/W/KiNjQv6pIXNPICBDDnIlXHELB2cd9xf4z2kf1sFkcpSl2yiRlI1jelWDZeLPMW62Nb1pXTrG/KQKcRFOtjS9ZR0qxvSnFmFM362OYTTEFTOGTzwG/I5has8jlfZgA0zdzY9lbmNoZkbmPeztzG0sxt7Acwt3E0cxv3dua2KMStaBlP2IbczZB+lc/Sep6G9C+oVf+TneWV6QKH2HRVv1pO87QtidwKkslsSeVW0vrVllRuFc1kttTaVlNMZkudbQ3NZLaUU9bSTIZtv69+tY5mQevewYJuIFkQm97Igo7RLOjYB7Cg4zQLOv52FnQ+E6VaLIhtGQsmzrND5DxGsaCjc+ax6apadYpmQVeygNO0WnV6rVp1hlKrruQOZ0mOd6VJ6xytVl2pq9kw0CzvG/POjGJ635R35TTb+8a8s6AZ3ze+V72yQdLM7Rvfyt1sUCR7+7Y38jcbNM3gvvG9HM4GQ7O4b3wjj7MBhbnVLSYPjaHUwwdMLDrd8P8YCcZoqfZnzoHZHabNGWQ+ARXlo1OQa/YZP6VDyk/6cNXgUqbPZwX8vD72BLkHX0kC0SMLcfgBwht4SJBWhZq/8IW5WD64jmE21v/G05dIXyElm28Dnd8LbQvREafq6AjDIjAiPOIb887evjZNAmIVx2LpVjtGEtqIqFKMIvlElAoxEIgapWAu1jlBsRTmOwSmZiAYYjRLASU8hCqIy7B4CzLSzeI1UZXeQAjNl7PE6jMg0XnlTSywwaIgKNNB4oY8pg3lMxDjhaKzkJjg3FcNQKmT9dFMIIZQlsPQDsEP5z/4EOpy8qUsVHSxKICEEr6UwMc1YypABYS5t4B8JYHx+Xmkbu1roVL5z2VFSLvKWF9IgB88DEbCxV9k2AdkKAs5F6fjSpBtoKQNKoHKkl4sBWvXGYS237XQgGElGWDYKET09Weg6BVMABV7PWYBBw7ZakgWD7PgI2N07YJvi7FzX7wQSnQHG85ogMpEJHoZShcG4UsX4Bh9ycJgQ8kCHA6s0TETBBjE2U0Y5ZMcWgVRpnUUZQBoYL5UIRQtWIjQetaSgRrxAyV1XpyFBV98kG12inkyC8VUuJqgcFFoYupLeHaCui/kJhFqcLgL3CR0qGEZjPHchHFTT56BmyDqi2UcamB+U5wTflOwSnTAXen4oMO/IBc4VDBCEU06mLCkBQHL3AdW6Ly9MKeDHcfIb4Y3FrkRvMOH3593OJ2Y823vonRcObO/L8l7QoGKd6SUgtKx+K1tLfs2XI7hzO9nKr3C1KMI2WnEw2kf1fPZebACvAfJ2VBX1DBOB9l9W0oq4pFxeckuMk+D3BMjVLNi+QAkjKQLnRFDyUIdk4H8LbqxCniDDZi7Fx0HXVdmjJgvsIPynIY1xmNBMRQF4LFbfeESrABQSvuiGRuwsKmKyoElxKDiyALzMhlyI5ypupiOYckcZ22jkKs6Hyw8LKFFh+YWHANYb9G6ECEnxVmwHDrOgirmmIjEbnwIxgfnnmXzwl6sh4McZhOj5MVBMaY31LAUjfs6M45uqg3AMKXHQ4VmhzWT/QAMCNcaICecg8WqYd62ay5Vcr7wDeSs8TsAVdt+BxzIFYYFwYAZYoC/cSwlhAJNNLH8l65vgjCsX+O8mT3zjR+LgZljgDckeDNDz1LxG1qW8VaREeEoPd2jWDQYcHeiOHIRqAC3HlKanIOrDxXnXGAkweTCEMvdOFSyNFARURrHMljlmEdJgJDnoQLWbwqUwHrkoJFhsbCGGhJfsCUDhZpINFgy6w1m6IUU6r9E6IY3Ysq7Dlg4IZohTN/oi3W9WoOicR4g6YgiYu1ilY1DvC7oRNC4e5Ch93s2DLlpjiVvXMg2Fq16OMQHChsQH7gepeM9KVSicIUK8eGRzf0VKqyRAv715R5g6CCy2OoLj/GLpS8R+wnPorlX7UvgRDP65BtTxn4IshVL9PGWQpQBUDsme8lzAYyXeiRoBjAg4CuHijK2XY7iG+MupftlCBXWmEoDfcUa1v/56mrgBCH9ErMt80hxPNW0eUKHfoBe/EoX1uA2T/hi/itHfiHCIWKEA4uo0EZhzBelwnULPGEbBLmEqhHEDftIiKXA1Q6o649f0n/l0PVCjELo5RgFRj8wRNyIUWCRGlgxDXXti9uwAIVjNh8MKjR/IePXcal8vKbjUNfZF2puoRjNt62o6mWhRgNv/EEFb6rzRSsPqjcGH9XOAYPUhHYH5aYV4HghTQ8sFTelEhQEA3VLvpp24KnKCTkS3HNfTAnlTm4Inbk03tTowDyvjQ4sBWtfE/P1Y7OLJij9DF4C8/cMZbxwiNsNHwAcv3JAKBBl8+KFb6QKPGSozYh3DrxYF/Zi/mDoAsyfVMeBjhaUfF3sHx9c8kUeobSj4yrW9HNfPAPxJBB+lU0k6RscoY2OEPF5/QzzVWZEhEiWuSGGxVBctYV4VSnFfKlUO0Lk27xrGH3I4CnOXEmsool3RgYdiv648XvNY1mslXGLIfzgA0ZYisSDx+ijduBEcrxMBfuroquo9MxVxDItFAqgsCv8dcBfhSvBqPzC/9GFZOk+bghsYRAanUrwCdAeYcEHcjaUMksZnF+jdXTCQjGdxVvSGHlBhwANXBCOEn0DcOEGNGg0rM+kLzRwi2WZBQKKpuSNN7wQVTsAhbnZFS+s6uLtjKJvzDuj2NHNImFWFXQxLNvikGBoBCxVvP8K9wG8beFvDijt7w0OSDCo+YL/Ate0ODqlUM+LYT8eBKjlwQU1IFSwsFYGToYwBAvyDq5jMR92g37C1+2zUIcIXxzvHUB1Jg9RONFxvIPgf1PpN52+TPqyIR7CUS06nltYWJrGTXufVayeZeH+hImrB2NEqFqco8XHo8WnfObEGzPeZ0N5HgrACyw4eZHbt9VXueMVbl+wy1lOq1hqBiZKc0kp0zOEOK7Ge7aiF9HtBCMjXJBgPp/Co4qyLteEvlRNikaqSkV3dwh0BLXZqBAHcbm+pqJN7gM/2niuhYvSDCOh0OZpRIHNj1yLvyXrn+M9ZVAASA7wAaqnNOaxGq6tJJXKTYXaQkA7Da9F8/ghwmUCGW/94AkUOSWsqOOmHQH0jVgUzDyHDb54X8WwmUWjGg8Cr5rzFArUIgbW4SIuGupwpYQFPvWBdRMq/gcQixhYdz6wDgzoA+uwVUbFW+E+eZXnS5laEHfK/BcJ+Jl5wA/rDuHye0vVKvv7R/ywmpGI+KlLRY0MET9uYx1wDPnxmNBxcPR4PRb1n4SLHF7KhiC3Mv40h7gp1rAQ8GPMB/xgkA/4cR4Cfuhyeb+ah4CfRaeCh0u5/oYD/MbTvVyO13B5kXTDYkzevojrGzExoFV+par0JAVe3OJ4LxNdJcuig2R5+gLrCx4FgPRk/E2lL52+zMylwoJNIvzr26iAg6dmEOfxii7yn2XeYQQPHumEhStyGuqMdLRkUHjA7RQWBBfSO9xc9JdSclnhiz/bV/irDD7Wc0KdRnPHU+STBWbEZ0r8HZVgOlkoxUD7Cx5Q8Ck749NacuCBvGKCzkGCC68HOefJyhp/YwwiGZ5yDF4T4qEI3xta0MD8pTwRND2A89YV1u5jzhcdUeR6/8XSF09fIn3J9KXSl05fxn/lWyVpNtTxHrSx4VJkfKTCssr6hAB4sj6R2cD8QByU5ZmtaUIfZwPvIrPxFL+FnzLrU3iXNDKWLt90QGXVNAV80Wy4BcuDs59uxcaSivq+bD43fb8itGF0g3XxlpMI/0exyYPY1OH2AlTX+ZA6EDhmpvxtGYxG+FCRzA0GrJnljqDgIhiAwkPA9lyCAMq/kdJx5+pogC+/bVX4+Ka8q1uwrHXrRZkUmECaGzA0xH3NVDavGRaMcNN6VybNK+NiI4B8WrZgrhtGmOuaq/+25vrcSMfiY8pIN/z/kZGOlc2EkW7EjUY61j5TRrqRH2ek+6rqppFu1H8lIx0rsMXQvHHlG30xlFLeZtA9B6WOL7i9jofT+PBX/5LbDz/c3XW/3n0OD7uxyyu1v/52ecLt0693YvA/gfL89Otvv/0GIFk+FsigPRZ8Qz/Y8GwwKyFToz1kP4Y/FGOUIsYo7n+y2VgBhlaGriLRlSwbVUK0AzFIK/+Ty7ZHFkOdo+AxEbaHmctg3Wsjx3KLKOD5FsWHOrNx4jLuTgQ8ZThPGf6vXcDfxHO2OGcOxwPYFHNLalFhev9PAMLCsaQFy0gX4V/r/+UBOR7aeRjPQz8e+wWkRYAmwrwitMsAT4bfZRgvQ3uiy8HFE0hHEVFLuEXkoIojrCYO53FdPA6PmEPYPnzE4XHnA5nBRxwudfyIo1TsrOIWqthHpT4RHx0n1BENHdGI5AmWS/iIw01G7Zv7+3E7HsLDuZdjFhfaBb6tCSP+FuY44R/7uYymBUM8z6E6R16dpy5WeIFTYskuD9vWDGKzcQ8P9+mPUWaD9YWU73RAyIRts/HwBkFxxcPDdJpex+0v+aTaLq48Da0wocTaNbT8dI+n8VDMN1BCnSfajh+JpFWknERdHmiAsd0WspTad9k+30ifJuDvEh8m4o50X1Bnedqc1BiR/IfEsonDEs+pGlJimhJkIf9JGR53kpRE4f86IBIZ04RxJorfgI2LCA8Rz8HMFjU7tLkcSpyTRMv8YOfSojjq3cN3+0Op6Emqvswp8xnwL1LmWtTk4qQlTxonV+AU/vz1VNkDmZiK64xyzoaJnKI4+AX+IN3mS4WrpKhM5jwHY8eHkidI1XgR6mnDWWvnX15KaQJJcWJKke/3oVgBVJoQo7z+jKP255LYFTkuEcxaPosgDj9MhXikBFOceaYYRDHb5pdSIJDGa61HRKTTtUdRCGhDnWyNrizNgTDXqTQLSTIZcqX1Oh42T+W5kmI9M150NgX+7aCcWy7j72QygJJ1Mtd0yX662E3rDv5LgbiiqThufSlE0zaqloD6Mj7uK4o3gmS95gzhj2NlKOpMQHliucIClSWTLFddETBh2dR6IjNEowJI9meEcTEpG+Sc9HiS+7FzshJNyyv7sn8omIoS9ZHSA9pB1gZlFiRuELiRVuI6yp1rs3g3p7WmSQDo3o/wRxhO1V99uCwh834GQvY3pqlsKMrCyXEpNs6Za6aCLI++wUxzDd+wX1oq9z78lZaS70h5UREzSbQ1xok2E0lWVFZiU50LhNko8S/mo0sjxFFChCd+SUIwcYcpZt2WvgMlhy9cVmxwtRRS4hRLGbfj8TRtSuOZApxcyJLNq6nmwgtulSzpwfkEpZWRq4W55Ctc+TjVrnI5cvtubm9VwmMWDUi+aiDHQIZclCAP08t4KvdSUkxXkvhsjvDnkrOJCgXQkP85LXzd7J7KI+CCtp3ykdMBSLvYOnXTErZjORrqCy9ebJTAer6AaPTHPrUr5pJtl2ymGu4p/G3YHLrKoC87eQ0pHP5gV3YKmei+WBhlSKQ1z/6hsoDJAESSFskV5onbkpqNkHUWZgt/lyW393lO9JWyIhyAXJXhjCUVkYEAaobnL1O5g5qkQzMbVxj/miTDwtIpJ5ixkc7ZyDR2whaT0DrcZJ4dn29pnMH/aaRsB8moMiukCQ48z+NenPaBUohOFzu5O542u9LCH0hLIIYvh2qG+IfecpmebWQwjCqpGWOigVpTzDQCISISKRYaBULgdxsFQZz/EiOdKdZLuCEFORO3pihl4/iXYaYNOW2mMvIjSZUpZgNLxcTpKHx1jjC25MaB9qPLAO5ljsO+VPWWNhOG2chthTon/aZ3SLEIqU4a8Jzj4pgmyzUiqRTBx/hldEFiHNPE8w9Y2+QzpEheQREvhcEiSbuWUhl+msNYGciMPJ1ljruR0z6Ik/wizgf880/5dpCriJLBtPFruRu62Li5uwEaaCjROZ6qbYU8/4WUUqTBUDT1sDltSiFMxhtzfnsYx5diH2jRv0QWD+Pj5rwtJbimHJUrAfmOSH0+jI+1voWHWgmjPXpfMXlVTPR0GCvTk3bz8rzmw/gy7h4q0mEkK+WC9WE8jYfnegGcTMYWoaCH6bV0fkhqFeWoKtSrM9Mwxjjs3F0Jw8+HKiUFD2esCLuNm/uvJSmTLmvTIhu3m5djvU/kFPk+jdvxuTodQ9oRGQeOu/vNy3Hm+3PSXy4c1PE/zqVDBe+PX/clx3OlqyxFCykuNsuq8nzbXsdDGUwhI64pPZJiEotu//gzBPmnE2J8hL/qmyGdkRRveL48P56fT+NhVznyjuSAfI8fp8OxCgFTW5wNqlJfmXJOUZmwXklxwWNpUmraFin1wlXLsAo3JxujyC1lhzBzE5TIdj7OMQ8u6ZYvdSV4MAvMRmVdx7jmif8USHI1IpfU+yyoWpw0rPPH//n1dHo5fvruu3HXf5t+ml7Gh2nT7w9P38H/vsuiEJ/nYQhS890KZjd+O+13f+Tm+Hm7+fZ5//j57P9e5Gb7+emweZ1OM+cH/joIwXW2gt6O0XFTxIGogpLH8CeMM9LMwgisFX2vDndWN3It6h5Zpoq+rw1oPh7wT1xmW7UqSl4GsrLylMhwN6dXchOtKvGImO4LGQd1qoQpE23yyOXJBs9M78f0p6IzsUlWF8gru1/boazaFlFuT5YTsfXiVbK30nakZFKGf2kDDDaTopQ1+jSWSpiSmimPERFIJUBJokUHgeW682k8NRggt5ipRElaKadRf978jGG67bh7OpWmjMiZTFB1LU/j6fh1/20e64OHErLg3JxLi/FB2JQ2iRA5BlRUB2Z4GSsjqoiHNJR1GDq9jgWt6mupxxkLivSRatcin11ctEw0ZLK0sqQG0iaqq9mGeroyzT3k2nIuVO/yrP7TeSrN5mzfomgzYe02hXwbejZqdJuJ/mJqyogZWhsbxpdnSkZ1CldgeiwJgQ7KJFme+G8WHblw5NA+7wDz2VuNZTiItOObNm2c4zOanp+fx9PXfbn+gVT2eZi0CoVRBE2kWKoMXwoFUOVKVwu1LlZS2tyhWH17lxNeKcmV9Nks33vJAMd9bVQ8zss38vPb3W8q2UNX5qkhHwi9C/2Z8V6gaEpzTLtmKFtQxkJO5LsJUnPTf86NMke690NBJS/n0sng1ILLKos4/DgeSnKno2wFd2L8uzJiSbdoMRAz7U7j0zwkb0mjdOZazuJaFWMW5RFlNdwFhcPjplwOJw2eIrQ67V73P5Vai0wSr8xZl/U7JCHE2eTcpUmezArZSInEgiNTEXHObceX7eaXKuDCeaGxqRTgVBopdA3digKx6VQaLFQkQxZDxm2hYOCPUl2vKf6pij3SsbBGEvenaTeCmLgvqexKVUC24T+dT2XEFJ5cpFRJ667BdvNlLIwVkR1W4pB4+qaRD9c0rVTDAsDnLw8lyoyUTx/iPuRwZ242/CW/iycwN6cLsvJzVLEjlkn1gBlNLX4GOtkJfyXsUoJBWffVLFW9ElmAkIv5uVcAd9WW1URDdzdDn9upNH9JhduyLLf7p4odaLWXC+znzU+lrF4oCHHlsDKFZUkGyrXs82ZXxUvh4vUK5fC8ORbwck+oQTxlQV2rHuZ5c6oj1aRh3Dyu583P0/O5oGlOXqeoaSBMMZZFUWRFVb6cOLS2huHS9HL9XOvSQkuJ+7mvxccoq9ySQXd5K4jDefc0/nHkf7TDH51AoR0AVnlm0kllNy/rOD5P5eQkQ7DZeVyb/HU8bMfT58xQ+8PruN3fT6dfPvu2Uv/SuZNMRD/va3FIp//qItx5gGg+c7HXlrzPkZ/ueXuaXsprAYY8o0yt7sb78XjclKkMThd4Sd0g3934reAL0rLwv9Q37ahcdQyLvyNnnfhwfh9unsVOZeXzdHZKLc8vtOliH0773VTdARrIxJDNh/5c+kKCLJCsbImLjsura3f7UuSTB5qL/F1V28ZJR6YadniuVAxNArxAskoykemeXKPtzs9fKktCkpe7Usy1pVB25+fxMN3XKTIy7ZrT/P7Lv4/3ZVHD1bsokaCrwvvoztRZ9FUF9vP7VJeAM11XX6ykjFatCta8pZi+zn7VWa8q85BC8/V1tfo6wpWQ/IqMxVwmXwLjKZIal7WQ3miEg5KLkVafBOjCvdey/mQeMkquSnVLpCpIJO3RtQnHKzdBViUiLyY4kZGMqJcXyRh5kSzxdDrIm2rLcnOwKmAUpGORdHVLjOwPD7U8Iv34nO9OX6th5E315LI21e/L5lxFDnle08pbRa08swFeqngt+epAK0D+Mu0WvMTsHlUY3fAS8ymqHVGURpCZQoBQThkApfYxXm2NV1rjVdZwhfUy3SwyRLpMXOcj96eKiknDsPX8w8v+OM1CsdlRNtLMmYf4chiP4+G1qtki0/M5Kb4cxtdpfy79S0FeVZynNmcVd7pE7LVRcZcXzicbTlNJupfD/mU8nKp7JOS90UYI6uWwf50eyu0RlJC5tY6yuna0FNdMerpVLHnYPEzlOeQ50EYmrV2956c53m+2VcVsvun1yPmmH8YqQUgWhkVy1hkjwejT9Dy+TsczJApq3s4eM1CNgFbMl1u2NGX1+EleEqwb13qijs3Ltw/j/f7wUFffkVESG++/i8YUxFqzourI8a3dnk1SP+2S0YKj0uGH8XE8jFWCg5Kj/9+rPw7j8/61jHSSb3Gsqv/wEzaLvnPqvzZXa19RwlblqKRmEAV5hKHVDawrwmvtBd7oP8Stn9uzyaW4mJ/zh1gK1v2P83QoZaWic985nnGC48t4P39thNOXdpq21WE8VpXOhqxRKPIsl+HPlW2UF3y1ahNY7pcfxtP5UNo0ZAn+8sMa+XyVjibfJilp6HW/PYN5AAKwDNfIXJWS9Luf6WD6mnvzjryfYcHcs7ndOVDFdNU0laikK1SHzKbAQGU5jo4atvJJOAEGOGWdJ3H5Kpo3K/Orlce6zo7MJed0MFfN9DNVyRltqvrj/VhGbViW/L2LjqOj7KrjWBVh05GiHP1ZzJY8tWalCYyP1SatOmc+5CTNWlzKXD7d7ljtARmMyUNJxyr8S15wyOIAiw7lcbmcLS9HExSfHslytjyBx8hqwONSOVu+rY0s4mWGeTlb4VNS91qPX/fnbXVrhKwdJwK6V947gsWVi6LLPsrDuowvb1CSXkBWFpQjMD1DkWlpWBc3a6u6zsY2Tc+z+w9ZPi/FvpMYXkokte4BVIUmoprviiO8tjJlVtHauHoli43DVbdKdHm+/ChryI2r/XOa3QupFQZX1ToZV8VAfwy82bBCl9becFSoJwDTA1rx4az0YNY8wPtBT/mtKppJomz+8FY60Fm4spH5KKm8CkVe9rqv4zOcvvZWyNKpfpSL0/dBmsbjcbd5OX7dV0VidMY4Mw8a8o++s1jufpjgtCmr01hWlr2C/wQpYWdWXKEVWnUdgSzjv1RRShU4T9bGwlsv86cjL3HylE5biJPPH3pLAaQ1wfByv0/j/yj9PTIjk9fbwMDqbnB2UBGxSOM2PXFHKs9TWWdF2rO1uJipwcZ9MTqf2eDPnJdO+5eSGDNpe11OidbrHGtHeQR+OZ7G0sxedyElOb2NihI/afnuGVl6mcVZT1UJDiOvrS+5cqev5TNp5MX52SWT4pZsO/+UjMvETmVWL6JQPmWxakfja7rh+AJdh0OMZxgRivhEdCI2kcbCv/XlJiKXVyeaZin+tZehbryWU8et6kv+6cnLWFMe85vx+kH1CEB6EjO2B/zrxwHSU5nRC4sPPKZrDOXjAcVjmqnP/FXNOeHME3ELhsS8+v1NhsTVmwnLVfSXlw7numOmMhqvDc9zrHPrZeFF4oVC/RTPukkZzTOzLbvo9LV64pC+9TwQOjVOdBjH/t+rmkAydNp4+7uOIzGyqotSUWXU/8rDr3E3Vr4PB9g9XIs4cZk/ASKp+1mtuaqXS8hMI8sfMzgVZTWUZl++2NLWaI33GK8UFVNCjX7o4XI6KwpL5oGOhYeJlxyHefFJ2ojEO01OgQBI6afTlbKtYs/W41/ksy9XbxFV0i6B8NRUcmFWZ12eMW1bpz3VDVvrzbOUSM7YJ48GtbJllTpP6nWmkRJpaEXBrUzz/F5l/eJpu9xj/jy0aQGr3DbSsqu29K1be66yC3Th25yQMle1ckHId5wK4qvfQyL/8sPlsQOTIV/eu+Sk7iiK/VphxSJgLhv0O7vLR9hvmYRacWevYW3MrOXb7IYk124yDm63CcqtLL1WTt9Fu2TxEux0uUnN5228NeeKIBtVkBMnKPEi73HWAalykoYUzq+OR4MsbpVNpgQV3z6/lNtFl15nGYLzy8PmVIoG+i5vpvDryir6Kew80HiuHtSh/45L5eW2bq4kgpuRYEFMx7qYjEwq1k/l1u5owe4VFZBVEW9wcnNP9nysQrrk9bA6NJ4kdrRFo28XzaDi7k60gFeF1BGz17F+6JA0Q5rec5zFXzoo5smZcU7tl3mq8Ho5o7/FUOfPTK7aVUMkF1VHrZsQ9LueTWym8j008nWlgrpep2OtxMSQlygZ6hJmLJGZ56DJS0X/PZ3+i2t+yw31ykSqFD9VkEXRde3mlRVQl6wITv5tnJ6+nmorjPSu8qIRP7S6aZRHt1mLkJt/SeDb17Eur+VkvU3LNlt8bOHb16m8ykbeGVh5bfrbVOoZ8s+X5GHMb9VNZNL2DKDX3ru5ct9m8UnINU+RtOoev+0PP1XmBqnX15d7//Yb/D25l+ll3MKjw59++PG33/4vkjTOJJIMAQA="; \ No newline at end of file diff --git a/docs/api/classes/BodyCenterTransformation.html b/docs/api/classes/BodyCenterTransformation.html index a82c153..e578a5c 100644 --- a/docs/api/classes/BodyCenterTransformation.html +++ b/docs/api/classes/BodyCenterTransformation.html @@ -1,10 +1,10 @@ BodyCenterTransformation | nbody

Class BodyCenterTransformation

Frame of reference transformation to the center of body i in the system.

-

Implements

Constructors

Implements

Constructors

Properties

Methods

Constructors

Properties

index: number

Methods

  • Transform the frame of reference to the center of the first body in the system.

    +

Returns BodyCenterTransformation

Properties

index: number

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/CelestialBody.html b/docs/api/classes/CelestialBody.html index 5c4f273..5b40b8c 100644 --- a/docs/api/classes/CelestialBody.html +++ b/docs/api/classes/CelestialBody.html @@ -1,5 +1,5 @@ CelestialBody | nbody

Class CelestialBody

Represents a celestial body with all of its kinematic properties.

-

Constructors

Constructors

Properties

acceleration label mass @@ -14,15 +14,15 @@
  • position: Vector3 = ...

    position of the body.

  • velocity: Vector3 = ...

    velocity of the body.

  • acceleration: Vector3 = ...

    acceleration of the body.

    -
  • Returns CelestialBody

    Properties

    acceleration: Vector3

    Acceleration vector of the body.

    -
    label: string

    Label of the body.

    -
    mass: number

    Mean mass of the body.

    -
    position: Vector3

    Position vector of the body.

    -
    radius: number

    Mean mass of the body.

    -
    velocity: Vector3

    Velocity vector of the body.

    -

    Methods

    • Deep copy the current CelestialBody with the updated kinematic properties.

      +

    Returns CelestialBody

    Properties

    acceleration: Vector3

    Acceleration vector of the body.

    +
    label: string

    Label of the body.

    +
    mass: number

    Mean mass of the body.

    +
    position: Vector3

    Position vector of the body.

    +
    radius: number

    Mean mass of the body.

    +
    velocity: Vector3

    Velocity vector of the body.

    +

    Methods

    • Deep copy the current CelestialBody with the updated kinematic properties.

      Parameters

      • Optional position: Vector3

        new position.

      • Optional velocity: Vector3

        new velocity.

      • Optional acceleration: Vector3

        new acceleration.

      Returns CelestialBody

      a new CelestialBody instance with the updated properties.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/CentripetalForce.html b/docs/api/classes/CentripetalForce.html index 2f86a12..1d0e717 100644 --- a/docs/api/classes/CentripetalForce.html +++ b/docs/api/classes/CentripetalForce.html @@ -1,11 +1,11 @@ CentripetalForce | nbody

    Class CentripetalForce

    Represents a Centripetal force object. To be used to calculate the force required to keep the bodies in circular motion around a given center.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    center: Vector3

    Center of force.

    -

    Methods

    • Calculate the force required to keep the bodies in circular motion around the center. arr[i] represents the centripetal force required for the ith body.

      +

    Returns CentripetalForce

    Properties

    center: Vector3

    Center of force.

    +

    Methods

    • Calculate the force required to keep the bodies in circular motion around the center. arr[i] represents the centripetal force required for the ith body.

      Parameters

      Returns Vector3[]

      forces.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/CoMTransformation.html b/docs/api/classes/CoMTransformation.html index 1cf4302..d8185a0 100644 --- a/docs/api/classes/CoMTransformation.html +++ b/docs/api/classes/CoMTransformation.html @@ -1,7 +1,7 @@ CoMTransformation | nbody

    Class CoMTransformation

    Frame of reference transformation to the center of mass of the system.

    -

    Implements

    Constructors

    Implements

    Constructors

    Methods

    Constructors

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/CombinedForce.html b/docs/api/classes/CombinedForce.html index 4f61cc2..83441e1 100644 --- a/docs/api/classes/CombinedForce.html +++ b/docs/api/classes/CombinedForce.html @@ -1,10 +1,10 @@ CombinedForce | nbody

    Class CombinedForce

    Represents a combined force object. To be used to additively combine multiple forces acting on a system of bodies.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    forces: Force[]

    Methods

    • Get the combined forces acting on the bodies. arr[i] represents the combined force acting on the ith body as a result of all force systems.

      +

    Returns CombinedForce

    Properties

    forces: Force[]

    Methods

    • Get the combined forces acting on the bodies. arr[i] represents the combined force acting on the ith body as a result of all force systems.

      Parameters

      Returns Vector3[]

      element-wise combined forces.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/ExplicitEulerSim.html b/docs/api/classes/ExplicitEulerSim.html index d26177a..179567c 100644 --- a/docs/api/classes/ExplicitEulerSim.html +++ b/docs/api/classes/ExplicitEulerSim.html @@ -1,12 +1,12 @@ ExplicitEulerSim | nbody

    Class ExplicitEulerSim

    Represents a simulation function object that uses the Euler integration method to simulate motions of bodies.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    -

    Methods

    • Simulate a step in the Universe by using the current state and a time step, using the Euler integration method.

      +

    Returns ExplicitEulerSim

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/Gravity.html b/docs/api/classes/Gravity.html index 25b4b52..8557ebd 100644 --- a/docs/api/classes/Gravity.html +++ b/docs/api/classes/Gravity.html @@ -1,13 +1,13 @@ Gravity | nbody

    Class Gravity

    Represents a Newtonian Gravitational force object.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    G

    Methods

    Constructors

    • Create a new Gravity with the provided gravitational constant.

      Parameters

      • G: number = 6.674e-11

        gravitational constant.

        -

      Returns Gravity

    Properties

    G: number

    Gravitational constant.

    +

    Returns Gravity

    Properties

    G: number

    Gravitational constant.

    Default Value

    6.674e-11
     
    -

    Methods

    • Calculate and return the forces acting on the bodies. arr[i] represents the force acting on the ith body as a result of all other bodies.

      +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/LambdaForce.html b/docs/api/classes/LambdaForce.html index 366fec5..edb3789 100644 --- a/docs/api/classes/LambdaForce.html +++ b/docs/api/classes/LambdaForce.html @@ -1,5 +1,5 @@ LambdaForce | nbody

    Class LambdaForce

    Function object that uses the user-defined lambda function to calculate the forces acting on the bodies.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    • Create a new LambdaForce with the provided lambda function.

      @@ -9,8 +9,8 @@
    • Length of the returned array should be equal to the length of the input array of CelestialBodies.

    Parameters

    Returns LambdaForce

    Properties

    fn: ((bodies) => Vector3[])

    Lambda function to calculate forces, provided by the user.

    -

    Type declaration

    Methods

    Returns LambdaForce

    Properties

    fn: ((bodies) => Vector3[])

    Lambda function to calculate forces, provided by the user.

    +

    Type declaration

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/LambdaSim.html b/docs/api/classes/LambdaSim.html index 50fc8a9..a430b22 100644 --- a/docs/api/classes/LambdaSim.html +++ b/docs/api/classes/LambdaSim.html @@ -1,5 +1,5 @@ LambdaSim | nbody

    Class LambdaSim

    Function object that uses the user-defined lambda function to simulate the Universe.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    • Create a new LambdaSim with the provided lambda function.

      @@ -8,9 +8,9 @@
    • The lambda function should call or calculate the forces action on the bodies by itself.

    Parameters

    • fn: ((deltaT, currState, prevState) => State)

      lambda function.

      -
        • (deltaT, currState, prevState): State
        • Parameters

          Returns State

    Returns LambdaSim

    Properties

    fn: ((deltaT, currState, prevState) => State)

    Type declaration

      • (deltaT, currState, prevState): State
      • Parameters

        Returns State

    Methods

    • Simulate the Universe using the lambda function.

      +
        • (deltaT, currState, prevState): State
        • Parameters

          Returns State

    Returns LambdaSim

    Properties

    fn: ((deltaT, currState, prevState) => State)

    Type declaration

      • (deltaT, currState, prevState): State
      • Parameters

        Returns State

    Methods

    • Simulate the Universe using the lambda function.

      Parameters

      • deltaT: number

        time step.

      • currState: State

        current state of the Universe.

      • prevState: State

        previous state of the Universe.

      Returns State

      the next state of the Universe.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/LambdaTransformation.html b/docs/api/classes/LambdaTransformation.html index b75cf9f..b9bb877 100644 --- a/docs/api/classes/LambdaTransformation.html +++ b/docs/api/classes/LambdaTransformation.html @@ -1,5 +1,5 @@ LambdaTransformation | nbody

    Class LambdaTransformation

    A Frame of Reference transformation that uses the user-defined lambda function.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    • Create a new LambdaTransformer with the provided lambda function.

      @@ -9,8 +9,8 @@
    • Transformed state should contain the same number of bodies as the input state, and the order should be preserved.

    Parameters

    • fn: ((state, deltaT) => State)

      lambda function.

      -

    Returns LambdaTransformation

    Properties

    fn: ((state, deltaT) => State)

    Type declaration

    Methods

    • Transform the state's frame of reference using the lambda function.

      +

    Returns LambdaTransformation

    Properties

    fn: ((state, deltaT) => State)

    Type declaration

    Methods

    • Transform the state's frame of reference using the lambda function.

      Parameters

      • state: State

        state to transform.

      • deltaT: number

        time step taken to get to this state. Only applicable for time-dependent transformations.

      Returns State

      transformed state.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/PinTransformation.html b/docs/api/classes/PinTransformation.html index 14a797e..f11028b 100644 --- a/docs/api/classes/PinTransformation.html +++ b/docs/api/classes/PinTransformation.html @@ -1,12 +1,12 @@ PinTransformation | nbody

    Class PinTransformation

    Frame of reference transformation to a pin body i to the given axis.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    axis: Vector3
    index: number

    Methods

    • Transform the frame of reference to a pin body i to the given axis.

      +

    Returns PinTransformation

    Properties

    axis: Vector3
    index: number

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/RealTimeVisualizer.html b/docs/api/classes/RealTimeVisualizer.html index 614bc9a..ec37f0c 100644 --- a/docs/api/classes/RealTimeVisualizer.html +++ b/docs/api/classes/RealTimeVisualizer.html @@ -1,5 +1,5 @@ RealTimeVisualizer | nbody

    Class RealTimeVisualizer

    2D real-time visualizer using Plotly.

    -

    Implements

    • Visualizer

    Constructors

    Implements

    • Visualizer

    Constructors

    Properties

    animationId divId gui? @@ -13,14 +13,14 @@ stop

    Constructors

    Properties

    animationId: null | number = null
    divId: string = ''
    gui?: GUI
    simulation: Simulation
    stats?: Stats
    universeTrails: PlotlyUniverseTrail[] = []

    Methods

    • Adds default controls using lil-gui to the visualization.

      +

    Returns RealTimeVisualizer

    Properties

    animationId: null | number = null
    divId: string = ''
    gui?: GUI
    simulation: Simulation
    stats?: Stats
    universeTrails: PlotlyUniverseTrail[] = []

    Methods

    • Adds default controls using lil-gui to the visualization.

      Parameters

      • parentElement: HTMLElement

        parent element to place the controller div in.

        -

      Returns void

    • Clear all trails in the visualization.

      +

    Returns void

    • Clear all trails in the visualization.

      Parameters

      • Optional i: number

        index of the universe to clear trails for.

        -

      Returns void

    • Simulate and play the visualization.

      +

    Returns void

    • Simulate and play the visualization.

      Parameters

      • divId: string

        div id to render the visualization in.

      • width: number

        width of the visualization.

      • height: number

        height of the visualization.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +

    Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/RealTimeVisualizer3D.html b/docs/api/classes/RealTimeVisualizer3D.html index 43325ee..cf06f57 100644 --- a/docs/api/classes/RealTimeVisualizer3D.html +++ b/docs/api/classes/RealTimeVisualizer3D.html @@ -1,5 +1,5 @@ RealTimeVisualizer3D | nbody

    Class RealTimeVisualizer3D

    3D real-time visualizer using Three.js.

    -

    Implements

    • Visualizer

    Constructors

    Implements

    • Visualizer

    Constructors

    Properties

    animationId clear gui? @@ -14,15 +14,15 @@ stop

    Constructors

    Properties

    animationId: null | number = null
    clear: (() => void) = ...

    Clear the visualization.

    -

    Type declaration

      • (): void
      • Returns void

    gui?: GUI
    scene?: Scene
    simulation: Simulation
    stats?: Stats
    universeTrails: ThreeUniverseTrail[] = []

    Methods

    • Adds default controls to the visualization.

      +

    Returns RealTimeVisualizer3D

    Properties

    animationId: null | number = null
    clear: (() => void) = ...

    Clear the visualization.

    +

    Type declaration

      • (): void
      • Returns void

    gui?: GUI
    scene?: Scene
    simulation: Simulation
    stats?: Stats
    universeTrails: ThreeUniverseTrail[] = []

    Methods

    • Adds default controls to the visualization.

      Parameters

      • parentElement: HTMLElement

        parent element to place the controller div in.

        -

      Returns void

    • Clear all trails in the visualization.

      +

    Returns void

    • Clear all trails in the visualization.

      Parameters

      • Optional i: number

        index of the universe to clear trails for.

        -

      Returns void

    • Simulate and play the visualization

      +

    Returns void

    • Simulate and play the visualization

      Parameters

      • divId: string

        div id to render the visualization in

      • width: number

        width of the visualization.

      • height: number

        height of the visualization.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +

    Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/RecordingVisualizer.html b/docs/api/classes/RecordingVisualizer.html index 0fcb945..a361c1d 100644 --- a/docs/api/classes/RecordingVisualizer.html +++ b/docs/api/classes/RecordingVisualizer.html @@ -1,5 +1,5 @@ RecordingVisualizer | nbody

    Class RecordingVisualizer

    2D recording visualizer using Plotly.

    -

    Implements

    • Visualizer

    Constructors

    Implements

    • Visualizer

    Constructors

    Properties

    animationId divId gui? @@ -13,16 +13,16 @@ stop

    Constructors

    Properties

    animationId: null | number = null
    divId: string = ''
    gui?: GUI
    simulation: Simulation
    stats?: Stats
    universeTrails: PlotlyUniverseTrail[] = []

    Methods

    • Adds default controls using lil-gui to the visualization.

      +

    Returns RecordingVisualizer

    Properties

    animationId: null | number = null
    divId: string = ''
    gui?: GUI
    simulation: Simulation
    stats?: Stats
    universeTrails: PlotlyUniverseTrail[] = []

    Methods

    • Adds default controls using lil-gui to the visualization.

      Parameters

      • parentElement: HTMLElement

        parent element to place the controller div in.

        -

      Returns void

    • Clear all trails in the visualization.

      +

    Returns void

    • Clear all trails in the visualization.

      Parameters

      • Optional i: number

        index of the universe to clear trails for.

        -

      Returns void

    • Simulate and play the visualization.

      +

    Returns void

    • Simulate and play the visualization.

      Parameters

      • divId: string

        div id to render the visualization in.

      • width: number

        width of the visualization.

      • height: number

        height of the visualization.

      • recordFor: number

        number of seconds to record for.

      • recordSpeed: number

        speed to record the visualization at.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +

    Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/RecordingVisualizer3D.html b/docs/api/classes/RecordingVisualizer3D.html index 855e7a5..e21f6f6 100644 --- a/docs/api/classes/RecordingVisualizer3D.html +++ b/docs/api/classes/RecordingVisualizer3D.html @@ -1,5 +1,5 @@ RecordingVisualizer3D | nbody

    Class RecordingVisualizer3D

    3D recording visualizer using Three.js.

    -

    Implements

    • Visualizer

    Constructors

    Implements

    • Visualizer

    Constructors

    Properties

    animationId clear gui? @@ -14,17 +14,17 @@ stop

    Constructors

    Properties

    animationId: null | number = null
    clear: (() => void) = ...

    Clear the visualization.

    -

    Type declaration

      • (): void
      • Returns void

    gui?: GUI
    scene?: Scene
    simulation: Simulation
    stats?: Stats
    universeTrails: ThreeUniverseTrail[] = []

    Methods

    • Adds default controls to the visualization.

      +

    Returns RecordingVisualizer3D

    Properties

    animationId: null | number = null
    clear: (() => void) = ...

    Clear the visualization.

    +

    Type declaration

      • (): void
      • Returns void

    gui?: GUI
    scene?: Scene
    simulation: Simulation
    stats?: Stats
    universeTrails: ThreeUniverseTrail[] = []

    Methods

    • Adds default controls to the visualization.

      Parameters

      • parentElement: HTMLElement

        parent element to place the controller div in.

        -

      Returns void

    • Clear all trails in the visualization.

      +

    Returns void

    • Clear all trails in the visualization.

      Parameters

      • Optional i: number

        index of the universe to clear trails for.

        -

      Returns void

    • Simulate and play the visualization

      +

    Returns void

    • Simulate and play the visualization

      Parameters

      • divId: string

        div id to render the visualization in.

      • width: number

        width of the visualization.

      • height: number

        height of the visualization.

      • recordFor: number

        number of seconds to record for.

      • recordSpeed: number

        speed to record the simulation at.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +

    Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/RotateTransformation.html b/docs/api/classes/RotateTransformation.html index 744735f..4ce7d14 100644 --- a/docs/api/classes/RotateTransformation.html +++ b/docs/api/classes/RotateTransformation.html @@ -1,12 +1,12 @@ RotateTransformation | nbody

    Class RotateTransformation

    Frame of reference transformation around an axis by an angle. Makes sense to this transformation only during initialization of the universe and not at every time step.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    angle: number
    axis: Vector3

    Methods

    • Transform the frame of reference around an axis by an angle.

      +

    Returns RotateTransformation

    Properties

    angle: number
    axis: Vector3

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/RungeKutta4Sim.html b/docs/api/classes/RungeKutta4Sim.html index 7ffd380..a5adf3c 100644 --- a/docs/api/classes/RungeKutta4Sim.html +++ b/docs/api/classes/RungeKutta4Sim.html @@ -1,15 +1,15 @@ RungeKutta4Sim | nbody

    Class RungeKutta4Sim

    Represents a simulation function object that uses the Runge-Kutta 4 integration method to simulate the motion of bodies.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    • Create a new RungeKutta4Sim with the provided weights for average force calculator, which is invoked on every simulation step.

      Parameters

      • force: Force = ...

        force calculator.

      • weights: number[] = ...

        weights for weighted average.

        -

      Returns RungeKutta4Sim

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    -
    weights: number[]

    Weights for weighted average.

    -

    Methods

    • Simulate a step in the Universe by using the current state and a time step, using the Runge-Kutta 4 integration method.

      +

    Returns RungeKutta4Sim

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    +
    weights: number[]

    Weights for weighted average.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/SemiImplicitEulerSim.html b/docs/api/classes/SemiImplicitEulerSim.html index 9d9aa69..c3846da 100644 --- a/docs/api/classes/SemiImplicitEulerSim.html +++ b/docs/api/classes/SemiImplicitEulerSim.html @@ -1,12 +1,12 @@ SemiImplicitEulerSim | nbody

    Class SemiImplicitEulerSim

    Represents a simulation function object that uses the Semi-Implicit Euler integration method to simulate the motion of bodies.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    -

    Methods

    • Simulate a step in the Universe by using the current state and a time step, using the Semi-Implicit Euler integration method.

      +

    Returns SemiImplicitEulerSim

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/Simulation.html b/docs/api/classes/Simulation.html index 4857b20..5356e47 100644 --- a/docs/api/classes/Simulation.html +++ b/docs/api/classes/Simulation.html @@ -1,5 +1,5 @@ Simulation | nbody

    Class Simulation

    A Simulation object that contains Universes and a Visualizer.

    -

    Constructors

    Constructors

    Methods

    Constructors

    • Create a new Simulation object with the provided Universes and visualization config.

      Parameters

      • universes: Universe | Universe[]

        array of Universes.

        -
      • __namedParameters: {
            controller?: ControllerType;
            looped?: boolean;
            maxFrameRate?: number;
            maxTrailLength?: number;
            record?: boolean;
            showDebugInfo?: boolean;
            showTrails?: boolean;
            visType?: VisType;
        }
        • Optional controller?: ControllerType
        • Optional looped?: boolean
        • Optional maxFrameRate?: number
        • Optional maxTrailLength?: number
        • Optional record?: boolean
        • Optional showDebugInfo?: boolean
        • Optional showTrails?: boolean
        • Optional visType?: VisType

      Returns Simulation

    Methods

    • Get the maximum trail length used in the visualization.

      +
    • __namedParameters: {
          controller?: ControllerType;
          looped?: boolean;
          maxFrameRate?: number;
          maxTrailLength?: number;
          record?: boolean;
          showDebugInfo?: boolean;
          showTrails?: boolean;
          visType?: VisType;
      }
      • Optional controller?: ControllerType
      • Optional looped?: boolean
      • Optional maxFrameRate?: number
      • Optional maxTrailLength?: number
      • Optional record?: boolean
      • Optional showDebugInfo?: boolean
      • Optional showTrails?: boolean
      • Optional visType?: VisType

    Returns Simulation

    Methods

    • Get the maximum trail length used in the visualization.

      Returns number

      maximum trail length.

      -
    • Get whether trails are shown in the visualization.

      +
    • Get whether trails are shown in the visualization.

      Returns boolean

      true if trails are shown.

      -
    • True if the universe with the given label is shown.

      +
    • True if the universe with the given label is shown.

      Parameters

      • label: string

        universe label.

      Returns boolean

      whether the universe is shown.

      -
    • Get the speed of the simulation.

      Returns number

      speed of the simulation as a scale of normal time.

      -
    • Get whether the simulation is playing.

      Returns boolean

      true if the simulation is playing.

      -
    • Pause the simulation. Only works if the controller is 'code'.

      -

      Returns void

    • Resume the simulation. Only works if the controller is 'code'.

      -

      Returns void

    • Set the maximum trail length used in the visualization. Changes only apply on the next Simulation.play() call.

      +
    • Pause the simulation. Only works if the controller is 'code'.

      +

      Returns void

    • Resume the simulation. Only works if the controller is 'code'.

      +

      Returns void

    • Set the maximum trail length used in the visualization. Changes only apply on the next Simulation.play() call.

      Parameters

      • maxTrailLength: number

        maximum trail length.

        -

      Returns void

    • Set whether to show trails in the visualization. Only works if the controller is 'code'.

      +

    Returns void

    • Set whether to show trails in the visualization. Only works if the controller is 'code'.

      Parameters

      • showTrails: boolean

        true to show trails.

        -

      Returns void

    • Set whether to show the universe with the given label. Only works if the controller is 'code'.

      +

    Returns void

    • Set whether to show the universe with the given label. Only works if the controller is 'code'.

      Parameters

      • label: string

        universe label.

      • show: boolean

        true to show the universe.

        -

      Returns void

    • Set the speed of the simulation. Only works if the controller is 'code'.

      +

    Returns void

    • Set the speed of the simulation. Only works if the controller is 'code'.

      Parameters

      • speed: number

        speed of the simulation as a scale of normal time.

        -

      Returns void

    • Insert the simulation visualization in the div with the given id.

      +

    Returns void

    • Insert the simulation visualization in the div with the given id.

      Parameters

      • divId: string

        div id.

      • width: number

        width of the visualization.

      • height: number

        height of the visualization.

        @@ -45,5 +45,5 @@
      • startPaused: boolean = false

        whether to start the simulation paused.

      • recordFor: number = 1

        number of seconds to record for, only used if in record mode.

      • recordSpeed: number = 1

        speed of the recording, only used if in record mode.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +

    Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/State.html b/docs/api/classes/State.html index aed8362..2350b63 100644 --- a/docs/api/classes/State.html +++ b/docs/api/classes/State.html @@ -1,10 +1,10 @@ State | nbody

    Class State

    Represents a Universe's state snapshot.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    bodies: CelestialBody[]

    Array of celestial bodies that make up this state of the Universe.

    -

    Methods

    • Deep copy this state

      +

    Returns State

    Properties

    bodies: CelestialBody[]

    Array of celestial bodies that make up this state of the Universe.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/TimedRotateTransformation.html b/docs/api/classes/TimedRotateTransformation.html index b25f807..736a78e 100644 --- a/docs/api/classes/TimedRotateTransformation.html +++ b/docs/api/classes/TimedRotateTransformation.html @@ -1,13 +1,13 @@ TimedRotateTransformation | nbody

    Class TimedRotateTransformation

    Frame of reference transformation to rotate around an axis by 360 degrees in a given time.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    axis: Vector3
    revolutionTime: number

    Methods

    • Transform the frame of reference to rotate around an axis by an angle determined by the time elapsed.

      +

    Returns TimedRotateTransformation

    Properties

    axis: Vector3
    revolutionTime: number

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/Universe.html b/docs/api/classes/Universe.html index b997314..f1edd54 100644 --- a/docs/api/classes/Universe.html +++ b/docs/api/classes/Universe.html @@ -1,18 +1,20 @@ Universe | nbody

    Class Universe

    A Universe object that contains previous and current state of the universe, a simulation function, frame of reference transformations and other necessary data.

    -

    Constructors

    Constructors

    Properties

    color: string | string[]

    Color of the bodies in the Universe. A single color applied to all bodies or an array of colors applied to each body respectively. Incase of array, length should match the number of bodies in the state.

    -
    currState: State
    label: string

    Label of the Universe.

    -
    prevState: State

    Simulation function used to simulate the Universe.

    -
    transformations: Transformation[]

    Array of transformations to be applied to the Universe's state after simulation and before visualization.

    -

    Methods

    • Deep copy the current Universe.

      +

    Returns Universe

    Properties

    color: string | string[]

    Color of the bodies in the Universe. A single color applied to all bodies or an array of colors applied to each body respectively. Incase of array, length should match the number of bodies in the state.

    +
    currState: State
    label: string

    Label of the Universe.

    +
    prevState: State
    radiusScale: number

    Scale the radius of the bodies in the Universe. Default is 1.

    +

    Simulation function used to simulate the Universe.

    +
    transformations: Transformation[]

    Array of transformations to be applied to the Universe's state after simulation and before visualization.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/VelocityVerletSim.html b/docs/api/classes/VelocityVerletSim.html index 78e9e76..72cb62e 100644 --- a/docs/api/classes/VelocityVerletSim.html +++ b/docs/api/classes/VelocityVerletSim.html @@ -1,12 +1,12 @@ VelocityVerletSim | nbody

    Class VelocityVerletSim

    Represents a simulation function object that uses the Velocity Verlet integration method to simulate the motion of bodies.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    forceCalculator: Force

    Force object to calculate forces on bodies in the Universe.

    -

    Methods

    • Simulate a step in the Universe by using the previous and/or current state and a time step, using the Velocity Verlet integration method.

      +

    Returns VelocityVerletSim

    Properties

    forceCalculator: Force

    Force object to calculate forces on bodies in the Universe.

    +

    Methods

    • Simulate a step in the Universe by using the previous and/or current state and a time step, using the Velocity Verlet integration method.

      Parameters

      • deltaT: number

        time step.

      • currState: State

        current state.

      Returns State

      new state after the simulation step.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/index.html b/docs/api/index.html index 84d9413..d9db0ed 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -1,9 +1,9 @@ -nbody

    nbody

    nbody

    N-body simulations as a Source Academy module.

    +nbody

    nbody

    nbody

    JS/TS library to run n-body simulations on the browser. Documentation available here

    Installation

    The package is published and available on the npm registry as nbody.

    npm install nbody three @types/three plotly.js-dist @types/plotly.js
     

    or

    yarn add nbody three @types/three plotly.js-dist @types/plotly.js
     
    -

    Usage

    Full API Documentation available here.

    +

    Usage

    Full API Documentation available here.

    For developers

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/interfaces/Force.html b/docs/api/interfaces/Force.html index 722e1b9..2bc9eea 100644 --- a/docs/api/interfaces/Force.html +++ b/docs/api/interfaces/Force.html @@ -1,3 +1,3 @@ Force | nbody

    Interface Force

    Represents a force object used to calculate forces acting on the bodies in the Universe.

    -
    interface Force {
        getForces(bodies): Vector3[];
    }

    Implemented by

    Methods

    Methods

    Generated using TypeDoc

    \ No newline at end of file +
    interface Force {
        getForces(bodies): Vector3[];
    }

    Implemented by

    Methods

    Methods

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/interfaces/SimulateFunction.html b/docs/api/interfaces/SimulateFunction.html index e1c9bcc..81633a2 100644 --- a/docs/api/interfaces/SimulateFunction.html +++ b/docs/api/interfaces/SimulateFunction.html @@ -1,8 +1,8 @@ SimulateFunction | nbody

    Interface SimulateFunction

    Represents a function object used for simulating the Universe. Should encapsulate the numerical integration method and other necessary simulation logic. Can use an external force calculation function object - see Force.

    -
    interface SimulateFunction {
        simulate(deltaT, currState, prevState): State;
    }

    Implemented by

    Methods

    interface SimulateFunction {
        simulate(deltaT, currState, prevState): State;
    }

    Implemented by

    Methods

    Methods

    • Simulate a step in the Universe by using the previous and/or current state and a time step.

      Parameters

      • deltaT: number

        time step.

      • currState: State

        current state of the Universe.

      • prevState: State

        previous state of the Universe.

      Returns State

      the next state of the Universe.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/interfaces/Transformation.html b/docs/api/interfaces/Transformation.html index 37665e7..ab21a1a 100644 --- a/docs/api/interfaces/Transformation.html +++ b/docs/api/interfaces/Transformation.html @@ -1,7 +1,7 @@ Transformation | nbody

    Interface Transformation

    Represents a Frame of Reference transformation.

    -
    interface Transformation {
        transform(state, deltaT): State;
    }

    Implemented by

    Methods

    interface Transformation {
        transform(state, deltaT): State;
    }

    Implemented by

    Methods

    Methods

    • Transform the state to a new frame of reference.

      Parameters

      • state: State

        state to transform.

      • deltaT: number

        time step taken to get to this state. Only applicable for time-dependent transformations.

      Returns State

      transformed state.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/types/ControllerType.html b/docs/api/types/ControllerType.html index 2847d10..fbd58fb 100644 --- a/docs/api/types/ControllerType.html +++ b/docs/api/types/ControllerType.html @@ -4,4 +4,4 @@
  • 'code' for manual control via code.
  • 'none' for no control.
  • -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/types/UniverseConfig.html b/docs/api/types/UniverseConfig.html index 56e2d1a..51ac4f6 100644 --- a/docs/api/types/UniverseConfig.html +++ b/docs/api/types/UniverseConfig.html @@ -1,8 +1,9 @@ -UniverseConfig | nbody

    Type alias UniverseConfig

    UniverseConfig: {
        color: string | string[];
        currState: State;
        label: string;
        prevState: State;
        simFunc: SimulateFunction;
        transformations: Transformation[];
    }

    Container for a Universe's configuration.

    +UniverseConfig | nbody

    Type alias UniverseConfig

    UniverseConfig: {
        color: string | string[];
        currState: State;
        label: string;
        prevState: State;
        radiusScale: number;
        simFunc: SimulateFunction;
        transformations: Transformation[];
    }

    Container for a Universe's configuration.

    Type declaration

    • color: string | string[]

      Color of the bodies in the Universe. A single color applied to all bodies or an array of colors applied to each body respectively. Length of the array should match the number of bodies in the state.

    • currState: State

      Current state of the Universe.

    • label: string

      Label of the Universe.

    • prevState: State

      Previous state of the Universe.

      +
    • radiusScale: number

      Scale the radius of the bodies in the Universe. Default is 1.

    • simFunc: SimulateFunction

      Simulation function used to simulate the Universe.

    • transformations: Transformation[]

      Array of transformations to be applied to the Universe's state after simulation and before visualization.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/types/VisType.html b/docs/api/types/VisType.html index 6d95227..08cb6cd 100644 --- a/docs/api/types/VisType.html +++ b/docs/api/types/VisType.html @@ -1,2 +1,2 @@ VisType | nbody

    Type alias VisType

    VisType: "2D" | "3D"

    Visualization type.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/assets/2010 SO16-wc34K9wy.js b/docs/assets/2010 SO16-wc34K9wy.js new file mode 100644 index 0000000..ac360dd --- /dev/null +++ b/docs/assets/2010 SO16-wc34K9wy.js @@ -0,0 +1,8 @@ +import{j as i}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as r}from"./index-z5U8iC57.js";import{M as s,C as a,d as m}from"./index-DVskBQuG.js";import{SO16 as t}from"./HorseshoeOrbit.stories-TS9WRF8U.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-PvbTHax1.js";import"./Transformation-DxaXQl0Q.js";function n(e){const o={a:"a",h1:"h1",p:"p",...r(),...e.components};return i.jsxs(i.Fragment,{children:[i.jsx(s,{title:"Showcase/Horseshoe Orbit/2010 SO16"}),` +`,i.jsx(o.h1,{id:"2010-so16",children:"2010 SO16"}),` +`,i.jsxs(o.p,{children:[i.jsx(o.a,{href:"https://en.wikipedia.org/wiki/(419624)_2010_SO16",rel:"nofollow",children:"2010 SO16"})," is a sub-kilometer asteriod in a co-orbital configuration with Earth that looks like a horseshoe in a non-rotating frame of reference."]}),` +`,i.jsxs("center",{children:[i.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Animation_of_%28419624%29_2010_SO16_orbit.gif",alt:"2010 SO16 orbit",width:"400"}),i.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/3/39/Animation_of_%28419624%29_2010_SO16_orbit_around_Sun.gif",alt:"2010 SO16 orbit around Sun",width:"400"}),i.jsxs(o.p,{children:["GIFs from Wiki Commons - ",i.jsx("a",{title:"Phoenix7777, CC BY-SA 4.0 , via Wikimedia Commons",href:"https://commons.wikimedia.org/wiki/File:Animation_of_(419624)_2010_SO16_orbit.gif",children:"gif1"}),`,\r +`,i.jsx("a",{title:"Phoenix7777, CC BY-SA 4.0 , via Wikimedia Commons",href:"https://commons.wikimedia.org/wiki/File:Animation_of_(419624)_2010_SO16_orbit_around_Sun.gif",children:"gif2"})]})]}),` +`,i.jsx(o.p,{children:"The initial configurations of Sun, Earth and the asteriod have been setup, recorded at 20000000x speed for about 13.5 minutes of playback. Use the speed control below to change the playback speed. You can also try changing the frame of reference to see the horseshoe orbit from different perspectives."}),` +`,i.jsx(a,{of:t}),` +`,i.jsx("center",{children:i.jsx(m,{of:t})})]})}function k(e={}){const{wrapper:o}={...r(),...e.components};return o?i.jsx(o,{...e,children:i.jsx(n,{...e})}):n(e)}export{k as default}; diff --git a/docs/assets/54509 YORP-BteM2NBY.js b/docs/assets/54509 YORP-BteM2NBY.js new file mode 100644 index 0000000..7f5c4c4 --- /dev/null +++ b/docs/assets/54509 YORP-BteM2NBY.js @@ -0,0 +1,8 @@ +import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as r}from"./index-z5U8iC57.js";import{M as s,C as a,d as m}from"./index-DVskBQuG.js";import{YORP as t}from"./HorseshoeOrbit.stories-TS9WRF8U.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-PvbTHax1.js";import"./Transformation-DxaXQl0Q.js";function n(e){const i={a:"a",h1:"h1",p:"p",...r(),...e.components};return o.jsxs(o.Fragment,{children:[o.jsx(s,{title:"Showcase/Horseshoe Orbit/54509 YORP"}),` +`,o.jsx(i.h1,{id:"54509-yorp",children:"54509 YORP"}),` +`,o.jsxs(i.p,{children:[o.jsx(i.a,{href:"https://en.wikipedia.org/wiki/54509_YORP",rel:"nofollow",children:"54509 YORP"})," is an Earth co-orbital asteroid that follows a flattened horse shoe orbit that looks like the following in frames of refernce snapped to sun-earth and sun respectively:"]}),` +`,o.jsxs("center",{children:[o.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Animation_of_54509_YORP_orbit.gif",alt:"54509 YORP orbit",width:"400"}),o.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/6/60/Animation_of_54509_YORP_orbit_around_Sun.gif",alt:"54509 YORP orbit around Sun",width:"400"}),o.jsxs(i.p,{children:["GIFs from Wiki Commons - ",o.jsx("a",{title:"Phoenix7777, CC BY-SA 4.0 , via Wikimedia Commons",href:"https://commons.wikimedia.org/wiki/File:Animation_of_54509_YORP_orbit.gif",children:"gif1"}),`,\r +`,o.jsx("a",{title:"Phoenix7777, CC BY-SA 4.0 , via Wikimedia Commons",href:"https://commons.wikimedia.org/wiki/File:Animation_of_54509_YORP_orbit_around_Sun.gif",children:"gif2"})]})]}),` +`,o.jsx(i.p,{children:"The initial configurations of Sun, Earth and the asteriod have been setup, recorded at 20000000x speed for about 5.5 minutes of playback. Use the speed control below to change the playback speed. You can also try changing the frame of reference to see the horseshoe orbit from different perspectives."}),` +`,o.jsx(a,{of:t}),` +`,o.jsx("center",{children:o.jsx(m,{of:t})})]})}function b(e={}){const{wrapper:i}={...r(),...e.components};return i?o.jsx(i,{...e,children:o.jsx(n,{...e})}):n(e)}export{b as default}; diff --git a/docs/assets/54509 YORP-DmjG74Ea.js b/docs/assets/54509 YORP-DmjG74Ea.js deleted file mode 100644 index 2e6b3ec..0000000 --- a/docs/assets/54509 YORP-DmjG74Ea.js +++ /dev/null @@ -1,4 +0,0 @@ -import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as e}from"./index-z5U8iC57.js";import{M as i,d as s}from"./index-SQMR4-IU.js";import{YORP as m}from"./HorseshoeOrbit.stories-qJLTP5dO.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Transformation-ClZa9c5r.js";function n(t){const r={h1:"h1",p:"p",...e(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(i,{title:"Showcase/HorseshoeOrbit/54509 YORP"}),` -`,o.jsx(r.h1,{id:"54509-yorp",children:"54509 YORP"}),` -`,o.jsx(r.p,{children:"54509 YORP is an Earth co-orbital asteroid that follows a horse shoe orbit"}),` -`,o.jsx(s,{of:m})]})}function P(t={}){const{wrapper:r}={...e(),...t.components};return r?o.jsx(r,{...t,children:o.jsx(n,{...t})}):n(t)}export{P as default}; diff --git a/docs/assets/Analemma.stories-D2TdEEue.js b/docs/assets/Analemma.stories-D2TdEEue.js deleted file mode 100644 index cd323fb..0000000 --- a/docs/assets/Analemma.stories-D2TdEEue.js +++ /dev/null @@ -1,13 +0,0 @@ -import{j as c}from"./jsx-runtime-DRTy3Uxn.js";import{C as m,V as e,U as x,a as g,R as b,S as y}from"./Universe-DpKi-MhS.js";import{R as u,T as M,B as I}from"./Transformation-ClZa9c5r.js";import"./index-BBkUAzwr.js";const E=new m("Sun",1989e27,69634e4,new e(0,0,0),new e(0,0,0),new e(0,0,0)),B=new m("Earth",597219e19,6371e3,new e(1521e8,0,0),new e(0,0,-29290),new e(0,0,0)),D=new m("Mars",641e21,3389500,new e(2492e8,0,0),new e(0,0,-22e3),new e(0,0,0)),j=new u(new e(0,1,0),-(Math.PI/2)),l=new I(1),p={actualAxialTilt:23.4,helper(r,s,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const a=new x({label:"Sun-Earth System",currState:j.transform(l.transform(new g([E.clone(),B.clone()]))),color:["#FDB813","#287AB8"],simFunc:new b,transformations:[l,new M(new e(0,1,0),366.24*86164.0905)]});a.currState=new u(new e(1,0,0),s/180*Math.PI).transform(a.currState),this.sim=new y([a],{visType:"3D",controller:"ui",showTrails:!0,showDebugInfo:!0,maxTrailLength:750}),this.sim.start(r,800,800,5e6)}},w={actualAxialTilt:24.9,helper(r,s,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const a=new x({label:"Sun-Mars System",currState:j.transform(l.transform(new g([E.clone(),D.clone()]))),color:["#FDB813","#c1440e"],simFunc:new b,transformations:[l,new M(new e(0,1,0),668.5991*88775.244)]});a.currState=new u(new e(1,0,0),s/180*Math.PI).transform(a.currState),this.sim=new y([a],{visType:"3D",controller:"ui",showTrails:!0,showDebugInfo:!0,maxTrailLength:1350}),this.sim.start(r,800,800,5e6)}},v=({obj:r,name:s,axialTilt:t,...a})=>{const n="demo-"+s+"-"+t;return c.jsx("div",{children:c.jsx("div",{id:n,style:{width:"800px",height:"800px",position:"relative"},ref:R=>r.helper(n,t,R)})})};v.__docgenInfo={description:"",methods:[],displayName:"Analemma",props:{obj:{required:!0,tsType:{name:"AnalemmaSetup"},description:""},name:{required:!0,tsType:{name:"string"},description:""},axialTilt:{required:!0,tsType:{name:"number"},description:""}}};const C={title:"Showcase/Analemma",component:v,parameters:{layout:"centered"},tags:[],argTypes:{name:{table:{disable:!0}},obj:{table:{disable:!0}}},args:{}},o={args:{name:"SunEarthAnalemma",obj:p,axialTilt:p.actualAxialTilt}},i={args:{name:"SunMarsAnalemma",obj:w,axialTilt:w.actualAxialTilt}};var h,d,S;o.parameters={...o.parameters,docs:{...(h=o.parameters)==null?void 0:h.docs,source:{originalSource:`{ - args: { - name: "SunEarthAnalemma", - obj: sunEarth, - axialTilt: sunEarth.actualAxialTilt - } -}`,...(S=(d=o.parameters)==null?void 0:d.docs)==null?void 0:S.source}}};var T,f,A;i.parameters={...i.parameters,docs:{...(T=i.parameters)==null?void 0:T.docs,source:{originalSource:`{ - args: { - name: "SunMarsAnalemma", - obj: sunMars, - axialTilt: sunMars.actualAxialTilt - } -}`,...(A=(f=i.parameters)==null?void 0:f.docs)==null?void 0:A.source}}};const P=["SunEarthAnalemma","SunMarsAnalemma"];export{o as SunEarthAnalemma,i as SunMarsAnalemma,P as __namedExportsOrder,C as default}; diff --git a/docs/assets/Analemma.stories-DzEVcYAe.js b/docs/assets/Analemma.stories-DzEVcYAe.js new file mode 100644 index 0000000..94645c5 --- /dev/null +++ b/docs/assets/Analemma.stories-DzEVcYAe.js @@ -0,0 +1,13 @@ +import{j as c}from"./jsx-runtime-DRTy3Uxn.js";import{C as m,V as e,U as x,S as g,R as b,a as y}from"./Universe-PvbTHax1.js";import{R as u,T as M,B as I}from"./Transformation-DxaXQl0Q.js";import"./index-BBkUAzwr.js";const E=new m("Sun",1989e27,69634e4,new e(0,0,0),new e(0,0,0),new e(0,0,0)),B=new m("Earth",597219e19,2e8,new e(1521e8,0,0),new e(0,0,-29290),new e(0,0,0)),D=new m("Mars",641e21,25e7,new e(2492e8,0,0),new e(0,0,-22e3),new e(0,0,0)),j=new u(new e(0,1,0),-(Math.PI/2)),l=new I(1),p={actualAxialTilt:23.4,helper(r,s,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const a=new x({label:"Sun-Earth System",currState:j.transform(l.transform(new g([E.clone(),B.clone()]))),color:["#FDB813","#287AB8"],simFunc:new b,transformations:[l,new M(new e(0,1,0),366.24*86164.0905)],radiusScale:10});a.currState=new u(new e(1,0,0),s/180*Math.PI).transform(a.currState),this.sim=new y([a],{visType:"3D",controller:"ui",showTrails:!0,showDebugInfo:!0,maxTrailLength:750}),this.sim.start(r,800,800,5e6)}},w={actualAxialTilt:24.9,helper(r,s,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const a=new x({label:"Sun-Mars System",currState:j.transform(l.transform(new g([E.clone(),D.clone()]))),color:["#FDB813","#c1440e"],simFunc:new b,transformations:[l,new M(new e(0,1,0),668.5991*88775.244)],radiusScale:20});a.currState=new u(new e(1,0,0),s/180*Math.PI).transform(a.currState),this.sim=new y([a],{visType:"3D",controller:"ui",showTrails:!0,showDebugInfo:!0,maxTrailLength:1350}),this.sim.start(r,800,800,5e6)}},v=({obj:r,name:s,axialTilt:t,...a})=>{const n="demo-"+s+"-"+t;return c.jsx("div",{children:c.jsx("div",{id:n,style:{width:"800px",height:"800px",position:"relative"},ref:R=>r.helper(n,t,R)})})};v.__docgenInfo={description:"",methods:[],displayName:"Analemma",props:{obj:{required:!0,tsType:{name:"AnalemmaSetup"},description:""},name:{required:!0,tsType:{name:"string"},description:""},axialTilt:{required:!0,tsType:{name:"number"},description:""}}};const C={title:"Showcase/Analemma",component:v,parameters:{layout:"centered"},tags:[],argTypes:{name:{table:{disable:!0}},obj:{table:{disable:!0}}},args:{}},o={args:{name:"SunEarthAnalemma",obj:p,axialTilt:p.actualAxialTilt}},i={args:{name:"SunMarsAnalemma",obj:w,axialTilt:w.actualAxialTilt}};var d,h,S;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`{ + args: { + name: "SunEarthAnalemma", + obj: sunEarth, + axialTilt: sunEarth.actualAxialTilt + } +}`,...(S=(h=o.parameters)==null?void 0:h.docs)==null?void 0:S.source}}};var T,f,A;i.parameters={...i.parameters,docs:{...(T=i.parameters)==null?void 0:T.docs,source:{originalSource:`{ + args: { + name: "SunMarsAnalemma", + obj: sunMars, + axialTilt: sunMars.actualAxialTilt + } +}`,...(A=(f=i.parameters)==null?void 0:f.docs)==null?void 0:A.source}}};const P=["SunEarthAnalemma","SunMarsAnalemma"];export{o as SunEarthAnalemma,i as SunMarsAnalemma,P as __namedExportsOrder,C as default}; diff --git a/docs/assets/Color-RQJUDNI5-BFP5WZys.js b/docs/assets/Color-RQJUDNI5-B7GMeRbh.js similarity index 99% rename from docs/assets/Color-RQJUDNI5-BFP5WZys.js rename to docs/assets/Color-RQJUDNI5-B7GMeRbh.js index d96e493..760e73a 100644 --- a/docs/assets/Color-RQJUDNI5-BFP5WZys.js +++ b/docs/assets/Color-RQJUDNI5-B7GMeRbh.js @@ -1 +1 @@ -import{n as M,f as ue,T as Me,F as Ce,g as $e,h as Ne}from"./index-SQMR4-IU.js";import{R as h,r as b,g as fe}from"./index-BBkUAzwr.js";import{_ as Oe,i as J,a as Ie}from"./index-DrlA5mbP.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={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]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={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"},lch:{channels:3,labels:"lch"},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"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.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)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?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)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{onClick:k}):null)},un=tn;export{tn as ColorControl,un as default}; +import{n as M,f as ue,T as Me,F as Ce,g as $e,h as Ne}from"./index-DVskBQuG.js";import{R as h,r as b,g as fe}from"./index-BBkUAzwr.js";import{_ as Oe,i as J,a as Ie}from"./index-DrlA5mbP.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={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]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={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"},lch:{channels:3,labels:"lch"},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"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.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)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?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)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{onClick:k}):null)},un=tn;export{tn as ColorControl,un as default}; diff --git a/docs/assets/Contribute-yBLKfplg.js b/docs/assets/Contribute-Bc-KHGTv.js similarity index 94% rename from docs/assets/Contribute-yBLKfplg.js rename to docs/assets/Contribute-Bc-KHGTv.js index 3735ddd..2ca5826 100644 --- a/docs/assets/Contribute-yBLKfplg.js +++ b/docs/assets/Contribute-Bc-KHGTv.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as o}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function s(r){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...i(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Contribute"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as o}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function s(r){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...i(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Contribute"}),` `,e.jsx(n.h1,{id:"contribute",children:"Contribute"}),` `,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"nbody"})," is maintained by the open-source ",e.jsx(n.a,{href:"https://github.com/source-academy/",rel:"nofollow",children:"Source Academy"})," development community based in National University of Singapore. Anyone from anywhere is free and welcome to contribute to our project and our community."]}),` `,e.jsxs(n.ul,{children:[` @@ -92,4 +92,6 @@ yarn install `,e.jsx(n.p,{children:"Contributors are free to pick up any of the following tasks or suggest new features."}),` `,e.jsxs(n.ul,{children:[` `,e.jsx(n.li,{children:"Setup a bundled version of the project for CDN deployment"}),` +`,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"enhancement"})," Provide more predefined simulate functions"]}),` +`,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"enhancement"})," Allow users to use custom shapes/textures for bodies"]}),` `]})]})}function u(r={}){const{wrapper:n}={...i(),...r.components};return n?e.jsx(n,{...r,children:e.jsx(s,{...r})}):s(r)}export{u as default}; diff --git a/docs/assets/Controller--RZSoFEm.js b/docs/assets/Controller--RZSoFEm.js new file mode 100644 index 0000000..cd4c93e --- /dev/null +++ b/docs/assets/Controller--RZSoFEm.js @@ -0,0 +1,31 @@ +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as r}from"./index-DVskBQuG.js";import{None as l,Ui as c,Code as a}from"./Controller.stories-L9ug8sr9.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-DLuwJnRa.js";import"./Universe-PvbTHax1.js";function i(o){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...t(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Visualize/Controller"}),` +`,e.jsx(n.h1,{id:"controller",children:"Controller"}),` +`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Simulation"})," objects can be controlled in three ways - through the UI, through code, or not at all. You can set the ",e.jsx(n.code,{children:"controller"})," field when creating a ",e.jsx(n.strong,{children:"Simulation"})," object in the following way. Controls include play, pause, speed, show/hide trails and show/hide each universe. Available in both 2D and 3D views."]}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + controller: 'none' | 'ui' | 'code',\r +}) +`})}),` +`,e.jsx(n.h2,{id:"none-default",children:"None (default)"}),` +`,e.jsx(n.p,{children:"When set to none, simulation cannot be controlled through the UI or code."}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + controller: 'none'\r +}) +`})}),` +`,e.jsx("center",{children:e.jsx(r,{of:l,name:"None"})}),` +`,e.jsx(n.h2,{id:"ui",children:"Ui"}),` +`,e.jsx(n.p,{children:"Displays UI controls to change speed, show/hide trails and show/hide each universe."}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + controller: 'ui'\r +}) +`})}),` +`,e.jsx("center",{children:e.jsx(r,{of:c,name:"Ui"})}),` +`,e.jsx(n.h2,{id:"code",children:"Code"}),` +`,e.jsxs(n.p,{children:["Allows you to control the simulation through code via methods on the ",e.jsx(n.strong,{children:"Simulation"})," object. Full API reference available ",e.jsx(n.a,{href:"https://source-academy.github.io/nbody/api/classes/Simulation.html",rel:"nofollow",children:"here"}),"."]}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + controller: 'code'\r + showTrails: true,\r +})\r +\r +// toggle show/hide universe every 500 ms +`})}),` +`,e.jsx("center",{children:e.jsx(r,{of:a,name:"Code"})})]})}function y(o={}){const{wrapper:n}={...t(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(i,{...o})}):i(o)}export{y as default}; diff --git a/docs/assets/Controller-D4-sXF4l.js b/docs/assets/Controller-D4-sXF4l.js deleted file mode 100644 index f651f34..0000000 --- a/docs/assets/Controller-D4-sXF4l.js +++ /dev/null @@ -1,19 +0,0 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as o}from"./index-SQMR4-IU.js";import{None as c,Ui as l,Code as d}from"./Controller.stories-BGawCMUp.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Universe-BbLae_pC.js";function i(r){const n={code:"code",h2:"h2",pre:"pre",...t(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Visualize/Controller"}),` -`,e.jsx(n.h2,{id:"none-default",children:"None (default)"}),` -`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r - controller: 'none'\r -}) -`})}),` -`,e.jsx("center",{children:e.jsx(o,{of:c,name:"None"})}),` -`,e.jsx(n.h2,{id:"ui",children:"Ui"}),` -`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r - controller: 'ui'\r -}) -`})}),` -`,e.jsx("center",{children:e.jsx(o,{of:l,name:"Ui"})}),` -`,e.jsx(n.h2,{id:"code",children:"Code"}),` -`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r - controller: 'code'\r -}) -`})}),` -`,e.jsx("center",{children:e.jsx(o,{of:d,name:"Code"})})]})}function S(r={}){const{wrapper:n}={...t(),...r.components};return n?e.jsx(n,{...r,children:e.jsx(i,{...r})}):i(r)}export{S as default}; diff --git a/docs/assets/Controller.stories-BGawCMUp.js b/docs/assets/Controller.stories-L9ug8sr9.js similarity index 51% rename from docs/assets/Controller.stories-BGawCMUp.js rename to docs/assets/Controller.stories-L9ug8sr9.js index 910631a..db2e9ad 100644 --- a/docs/assets/Controller.stories-BGawCMUp.js +++ b/docs/assets/Controller.stories-L9ug8sr9.js @@ -1,4 +1,4 @@ -import{S as v}from"./Simulation-uzMF7En_.js";import{f as e}from"./Universe-BbLae_pC.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-DpKi-MhS.js";const b={title:"Visualize/Controller",component:v,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"None",universe:[e],controller:"none"}},o={args:{storyName:"Ui",universe:[e],controller:"ui"}},s={args:{storyName:"Code",universe:[e],controller:"code",showTrails:!0,callback:n=>{const g=setInterval(()=>{n.setShowUniverse(e.label,!n.getShowUniverse(e.label))},500);return()=>{clearInterval(g)}}}};var a,t,i;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:`{ +import{S as v,f as e}from"./Universe-DLuwJnRa.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PvbTHax1.js";const U={title:"Visualize/Controller",component:v,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"None",universe:[e],controller:"none"}},o={args:{storyName:"Ui",universe:[e],controller:"ui"}},s={args:{storyName:"Code",universe:[e],controller:"code",showTrails:!0,callback:n=>{const g=setInterval(()=>{n.setShowUniverse(e.label,!n.getShowUniverse(e.label))},500);return()=>{clearInterval(g)}}}};var a,t,i;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:`{ args: { storyName: 'None', universe: [fig8], @@ -25,4 +25,4 @@ import{S as v}from"./Simulation-uzMF7En_.js";import{f as e}from"./Universe-BbLae }; } } -}`,...(p=(d=s.parameters)==null?void 0:d.docs)==null?void 0:p.source}}};const h=["None","Ui","Code"];export{s as Code,r as None,o as Ui,h as __namedExportsOrder,b as default}; +}`,...(p=(d=s.parameters)==null?void 0:d.docs)==null?void 0:p.source}}};const b=["None","Ui","Code"];export{s as Code,r as None,o as Ui,b as __namedExportsOrder,U as default}; diff --git a/docs/assets/Debug-DQg37ZWr.js b/docs/assets/Debug-DgjctTuI.js similarity index 50% rename from docs/assets/Debug-DQg37ZWr.js rename to docs/assets/Debug-DgjctTuI.js index 57da6ac..54ca337 100644 --- a/docs/assets/Debug-DQg37ZWr.js +++ b/docs/assets/Debug-DgjctTuI.js @@ -1,8 +1,10 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as s,d as t}from"./index-SQMR4-IU.js";import{DebugInfoOff as a,DebugInfoOn as m}from"./Debug.stories-B0zfNn6S.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Universe-BbLae_pC.js";function r(o){const n={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Visualize/Debug Info"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as s,d as t}from"./index-DVskBQuG.js";import{DebugInfoOff as a,DebugInfoOn as m}from"./Debug.stories-CHzx19Py.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-DLuwJnRa.js";import"./Universe-PvbTHax1.js";function r(o){const n={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Visualize/Debug Info"}),` `,e.jsx(n.h1,{id:"debug-info",children:"Debug Info"}),` -`,e.jsxs(n.p,{children:["Passed as the ",e.jsx(n.code,{children:"showDebugInfo"})," property in the Simulation config. This will display debug information in the corner of the simulation canvas. Click on the pop-up to toggle between frames showing the frame rate, time taken for each frame and the total memory usage."]}),` -`,e.jsx(n.h2,{id:"off-default",children:"Off (default)"}),` -`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r +`,e.jsxs(n.p,{children:["Passed as the ",e.jsx(n.code,{children:"showDebugInfo"})," property in the Simulation config, this will display debug information in the corner of the simulation canvas. Click on the pop-up to toggle between frames showing the frame rate, time taken for each frame and the total memory usage. Available in both 2D and 3D views."]}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`\r +## Off (default)\r +\`\`\`js\r +new Simulation(universe, {\r showDebugInfo: false\r }) `})}),` @@ -12,4 +14,4 @@ import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from" showDebugInfo: true\r }) `})}),` -`,e.jsx("center",{children:e.jsx(t,{of:m,name:"On"})})]})}function I(o={}){const{wrapper:n}={...i(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(r,{...o})}):r(o)}export{I as default}; +`,e.jsx("center",{children:e.jsx(t,{of:m,name:"On"})})]})}function w(o={}){const{wrapper:n}={...i(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(r,{...o})}):r(o)}export{w as default}; diff --git a/docs/assets/Debug.stories-B0zfNn6S.js b/docs/assets/Debug.stories-B0zfNn6S.js deleted file mode 100644 index f0a6ec8..0000000 --- a/docs/assets/Debug.stories-B0zfNn6S.js +++ /dev/null @@ -1,19 +0,0 @@ -import{S as p}from"./Simulation-uzMF7En_.js";import{f as s}from"./Universe-BbLae_pC.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-DpKi-MhS.js";const O={title:"Visualize/Debug Info",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"DebugInfoOn",universe:[s],showDebugInfo:!0}},r={args:{storyName:"DebugInfoOff",universe:[s],showDebugInfo:!1}},o={args:{storyName:"Ui",universe:[s],controller:"ui"}};var n,a,t;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`{ - args: { - storyName: 'DebugInfoOn', - universe: [fig8], - showDebugInfo: true - } -}`,...(t=(a=e.parameters)==null?void 0:a.docs)==null?void 0:t.source}}};var u,i,f;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`{ - args: { - storyName: 'DebugInfoOff', - universe: [fig8], - showDebugInfo: false - } -}`,...(f=(i=r.parameters)==null?void 0:i.docs)==null?void 0:f.source}}};var m,g,c;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`{ - args: { - storyName: 'Ui', - universe: [fig8], - controller: 'ui' - } -}`,...(c=(g=o.parameters)==null?void 0:g.docs)==null?void 0:c.source}}};const y=["DebugInfoOn","DebugInfoOff","Ui"];export{r as DebugInfoOff,e as DebugInfoOn,o as Ui,y as __namedExportsOrder,O as default}; diff --git a/docs/assets/Debug.stories-CHzx19Py.js b/docs/assets/Debug.stories-CHzx19Py.js new file mode 100644 index 0000000..c80f4bf --- /dev/null +++ b/docs/assets/Debug.stories-CHzx19Py.js @@ -0,0 +1,15 @@ +import{S as g,f}from"./Universe-DLuwJnRa.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PvbTHax1.js";const D={title:"Visualize/Debug Info",component:g,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"DebugInfoOn",universe:[f],showDebugInfo:!0,visType:"3D"}},s={args:{storyName:"DebugInfoOff",universe:[f],showDebugInfo:!1,visType:"3D"}};var r,o,n;e.parameters={...e.parameters,docs:{...(r=e.parameters)==null?void 0:r.docs,source:{originalSource:`{ + args: { + storyName: 'DebugInfoOn', + universe: [fig8], + showDebugInfo: true, + visType: '3D' + } +}`,...(n=(o=e.parameters)==null?void 0:o.docs)==null?void 0:n.source}}};var a,t,u;s.parameters={...s.parameters,docs:{...(a=s.parameters)==null?void 0:a.docs,source:{originalSource:`{ + args: { + storyName: 'DebugInfoOff', + universe: [fig8], + showDebugInfo: false, + visType: '3D' + } +}`,...(u=(t=s.parameters)==null?void 0:t.docs)==null?void 0:u.source}}};const b=["DebugInfoOn","DebugInfoOff"];export{s as DebugInfoOff,e as DebugInfoOn,b as __namedExportsOrder,D as default}; diff --git a/docs/assets/Dimension-D0iQTbip.js b/docs/assets/Dimension-D0iQTbip.js deleted file mode 100644 index c6b3906..0000000 --- a/docs/assets/Dimension-D0iQTbip.js +++ /dev/null @@ -1,15 +0,0 @@ -import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as i}from"./index-SQMR4-IU.js";import{TwoD as m,ThreeD as c}from"./Dimension.stories-CKHnNJXJ.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Universe-BbLae_pC.js";function o(r){const e={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...t(),...r.components};return n.jsxs(n.Fragment,{children:[n.jsx(s,{title:"Visualize/Dimension"}),` -`,n.jsx(e.h1,{id:"dimension",children:"Dimension"}),` -`,n.jsx(e.p,{children:"TODO"}),` -`,n.jsx(e.h2,{id:"2d-default",children:"2D (default)"}),` -`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-js",children:`new Simulation(universe, {\r - visType: '2D',\r -}) -`})}),` -`,n.jsx("center",{children:n.jsx(i,{of:m,name:"2D"})}),` -`,n.jsx(e.h2,{id:"3d",children:"3D"}),` -`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-js",children:`new Simulation(universe, {\r - visType: '3D',\r -}) -`})}),` -`,n.jsx("center",{children:n.jsx(i,{of:c,name:"3D"})})]})}function v(r={}){const{wrapper:e}={...t(),...r.components};return e?n.jsx(e,{...r,children:n.jsx(o,{...r})}):o(r)}export{v as default}; diff --git a/docs/assets/Dimension-D83_lvwA.js b/docs/assets/Dimension-D83_lvwA.js new file mode 100644 index 0000000..c725d79 --- /dev/null +++ b/docs/assets/Dimension-D83_lvwA.js @@ -0,0 +1,26 @@ +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as r,d as o}from"./index-DVskBQuG.js";import{TwoD as l,ThreeD as a}from"./Dimension.stories-DocIpVtH.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-DLuwJnRa.js";import"./Universe-PvbTHax1.js";function s(i){const n={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Visualize/Dimension"}),` +`,e.jsx(n.h1,{id:"dimension",children:"Dimension"}),` +`,e.jsxs(n.p,{children:["You can choose a 2 dimensional or 3 dimensional visualization system for your simulation. Simply set the ",e.jsx(n.code,{children:"visType"})," field when creating a ",e.jsx(n.strong,{children:"Simulation"})," object in the following way."]}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + visType: '2D' | '3D',\r +}) +`})}),` +`,e.jsx(n.h2,{id:"2d-default",children:"2D (default)"}),` +`,e.jsxs(n.p,{children:["The 2D visualization system uses ",e.jsx(n.a,{href:"https://plotly.com/javascript/",rel:"nofollow",children:"Plotly.js"}),". It provides default controls for panning, zooming, and scaling the view, along with responsive axes indicating the scale of the universe(s) being visualized. Additionally, you can hover on bodies to see their details like label and position."]}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + visType: '2D',\r +}) +`})}),` +`,e.jsx("center",{children:e.jsx(o,{of:l,name:"2D"})}),` +`,e.jsx(n.h2,{id:"3d",children:"3D"}),` +`,e.jsxs(n.p,{children:["The 3D visualization system uses ",e.jsx(n.a,{href:"https://threejs.org/",rel:"nofollow",children:"Three.js"}),". There is a small orientation helper at the bottom right provided for easier navigation along with coloured axes. You can control the visualization as follows:"]}),` +`,e.jsxs(n.ul,{children:[` +`,e.jsx(n.li,{children:"Orbit around the center of the frame by holding down the left click and moving the mouse in direction of choice"}),` +`,e.jsx(n.li,{children:"Scroll up to zoom in and down to zoom out"}),` +`,e.jsx(n.li,{children:"Pan around by holding down the right click and moving the mouse in direction of choice."}),` +`]}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + visType: '3D',\r +}) +`})}),` +`,e.jsx("center",{children:e.jsx(o,{of:a,name:"3D"})})]})}function w(i={}){const{wrapper:n}={...t(),...i.components};return n?e.jsx(n,{...i,children:e.jsx(s,{...i})}):s(i)}export{w as default}; diff --git a/docs/assets/Dimension.stories-CKHnNJXJ.js b/docs/assets/Dimension.stories-CKHnNJXJ.js deleted file mode 100644 index 50d5ab3..0000000 --- a/docs/assets/Dimension.stories-CKHnNJXJ.js +++ /dev/null @@ -1,12 +0,0 @@ -import{S as p}from"./Simulation-uzMF7En_.js";import{f as m}from"./Universe-BbLae_pC.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-DpKi-MhS.js";const T={title:"Visualize/Dimension",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"TwoD",universe:[m]}},r={args:{storyName:"ThreeD",universe:[m],visType:"3D"}};var s,o,a;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`{ - args: { - storyName: 'TwoD', - universe: [fig8] - } -}`,...(a=(o=e.parameters)==null?void 0:o.docs)==null?void 0:a.source}}};var t,n,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{ - args: { - storyName: 'ThreeD', - universe: [fig8], - visType: '3D' - } -}`,...(i=(n=r.parameters)==null?void 0:n.docs)==null?void 0:i.source}}};const l=["TwoD","ThreeD"];export{r as ThreeD,e as TwoD,l as __namedExportsOrder,T as default}; diff --git a/docs/assets/Dimension.stories-DocIpVtH.js b/docs/assets/Dimension.stories-DocIpVtH.js new file mode 100644 index 0000000..c1da920 --- /dev/null +++ b/docs/assets/Dimension.stories-DocIpVtH.js @@ -0,0 +1,12 @@ +import{S as c,f as m}from"./Universe-DLuwJnRa.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PvbTHax1.js";const D={title:"Visualize/Dimension",component:c,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"TwoD",universe:[m]}},r={args:{storyName:"ThreeD",universe:[m],visType:"3D"}};var s,a,o;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`{ + args: { + storyName: 'TwoD', + universe: [fig8] + } +}`,...(o=(a=e.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};var t,n,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{ + args: { + storyName: 'ThreeD', + universe: [fig8], + visType: '3D' + } +}`,...(i=(n=r.parameters)==null?void 0:n.docs)==null?void 0:i.source}}};const T=["TwoD","ThreeD"];export{r as ThreeD,e as TwoD,T as __namedExportsOrder,D as default}; diff --git a/docs/assets/DocsRenderer-K4EAMTCU-CjY85fLY.js b/docs/assets/DocsRenderer-K4EAMTCU-D5GqcumZ.js similarity index 90% rename from docs/assets/DocsRenderer-K4EAMTCU-CjY85fLY.js rename to docs/assets/DocsRenderer-K4EAMTCU-D5GqcumZ.js index 568d280..ceee15f 100644 --- a/docs/assets/DocsRenderer-K4EAMTCU-CjY85fLY.js +++ b/docs/assets/DocsRenderer-K4EAMTCU-D5GqcumZ.js @@ -4,4 +4,4 @@ function __vite__mapDeps(indexes) { } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as p}from"./iframe-BaWYFvPh.js";import{R as e,r as c}from"./index-BBkUAzwr.js";import{r as l,u}from"./react-18-B-OKcmzb.js";import{e as h,A as E,H as d,D as x}from"./index-SQMR4-IU.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";var _={code:h,a:E,...d},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},A=class{constructor(){this.render=async(t,r,o)=>{let n={..._,...r==null?void 0:r.components},s=x;return new Promise((m,a)=>{p(()=>import("./index-z5U8iC57.js"),__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:i})=>l(e.createElement(D,{showException:a,key:Math.random()},e.createElement(i,{components:n},e.createElement(s,{context:t,docsParameter:r}))),o)).then(()=>m())})},this.unmount=t=>{u(t)}}};export{A as DocsRenderer,_ as defaultComponents}; +import{_ as p}from"./iframe-Dx-CAhZM.js";import{R as e,r as c}from"./index-BBkUAzwr.js";import{r as l,u}from"./react-18-B-OKcmzb.js";import{e as h,A as E,H as d,D as x}from"./index-DVskBQuG.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";var _={code:h,a:E,...d},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},A=class{constructor(){this.render=async(t,r,o)=>{let n={..._,...r==null?void 0:r.components},s=x;return new Promise((m,a)=>{p(()=>import("./index-z5U8iC57.js"),__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:i})=>l(e.createElement(D,{showException:a,key:Math.random()},e.createElement(i,{components:n},e.createElement(s,{context:t,docsParameter:r}))),o)).then(()=>m())})},this.unmount=t=>{u(t)}}};export{A as DocsRenderer,_ as defaultComponents}; diff --git a/docs/assets/Force-DTafqWTE.js b/docs/assets/Force-DXiVH4_S.js similarity index 88% rename from docs/assets/Force-DTafqWTE.js rename to docs/assets/Force-DXiVH4_S.js index 06d5150..010c0a1 100644 --- a/docs/assets/Force-DTafqWTE.js +++ b/docs/assets/Force-DXiVH4_S.js @@ -1,6 +1,6 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as t}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function i(r){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...o(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Define/Force"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as t}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function i(r){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...o(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Define/Force"}),` `,e.jsx(n.h1,{id:"force",children:"Force"}),` -`,e.jsx(n.p,{children:"A force object encapsulates logic for calculating forces acting on celestial bodies due to other objects or environment. It has a getForces method that takes in an array of celestial bodies and returns an array of forces acting on each body. It is defined as the following Typescript interface."}),` +`,e.jsxs(n.p,{children:["A ",e.jsx(n.strong,{children:"Force"})," object encapsulates logic for calculating forces acting on celestial bodies due to other objects or environment. It has a ",e.jsx(n.code,{children:"getForces"})," method that takes in an array of celestial bodies and returns an array of forces acting on each body. It is defined as the following Typescript interface."]}),` `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-typescript",children:`interface Force {\r getForces(bodies: CelestialBody[]): Vector3[];\r } diff --git a/docs/assets/HorseshoeOrbit-Dyztv9sW.js b/docs/assets/HorseshoeOrbit-Dyztv9sW.js deleted file mode 100644 index 7214532..0000000 --- a/docs/assets/HorseshoeOrbit-Dyztv9sW.js +++ /dev/null @@ -1,3 +0,0 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as i}from"./index-SQMR4-IU.js";import"./HorseshoeOrbit.stories-qJLTP5dO.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Transformation-ClZa9c5r.js";function e(o){const r={h1:"h1",p:"p",...n(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(i,{title:"Showcase/HorseshoeOrbit/Intro"}),` -`,t.jsx(r.h1,{id:"horseshoe-orbits",children:"Horseshoe Orbits"}),` -`,t.jsx(r.p,{children:"TODO"})]})}function D(o={}){const{wrapper:r}={...n(),...o.components};return r?t.jsx(r,{...o,children:t.jsx(e,{...o})}):e(o)}export{D as default}; diff --git a/docs/assets/HorseshoeOrbit.stories-TS9WRF8U.js b/docs/assets/HorseshoeOrbit.stories-TS9WRF8U.js new file mode 100644 index 0000000..e9a8772 --- /dev/null +++ b/docs/assets/HorseshoeOrbit.stories-TS9WRF8U.js @@ -0,0 +1,13 @@ +import{j as l}from"./jsx-runtime-DRTy3Uxn.js";import{S as O,C as a,V as e,U as S,R as b,a as g}from"./Universe-PvbTHax1.js";import{R as y,C as m,P as T}from"./Transformation-DxaXQl0Q.js";import"./index-BBkUAzwr.js";const j=new O([new a("Sun",19885e26,69634e4,new e(0,0,0),new e(0,0,0),new e(0,0,0)),new a("Earth",597219e19,5e8,new e(-248109932596539e-4,1449948612736719e-4,-8215203670851886e-9),new e(-29841.46365518679,-5126.262286859617,1.184224839788195),new e(0,0,0)),new a("YORP",100,2e8,new e(1789598196203594e-4,467757011067789e-4,5131735873924753e-6),new e(-5641.374152889482,22817.8307950743,-65.07224186314708),new e(0,0,0))]),x=new O([new a("Sun",19885e26,69634e4,new e(0,0,0),new e(0,0,0),new e(0,0,0)),new a("Earth",597219e19,4e8,new e(-248109932596539e-4,1449948612736719e-4,-8215203670851886e-9),new e(-29841.46365518679,-5126.262286859617,1.184224839788195),new e(0,0,0)),new a("SO16",100,2e8,new e(7731523489671925e-5,1272231560560866e-4,1214208720801441e-5),new e(-26199.29938293521,12627.1595046161,6883.036493252469),new e(0,0,0))]),P={helper(o,r,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const s=new S({label:"54509 YORP",currState:new y(new e(1,0,0),Math.PI/2).transform(j.clone()),simFunc:new b,color:["#FDB813","#287AB8","#767676"],radiusScale:10});r==="sun-earth"?s.transformations=[new m,new T(new e(0,0,1),1)]:s.transformations=[new m],this.sim=new g([s],{visType:"3D",controller:"ui",showTrails:!0,maxTrailLength:2e3,record:!0,looped:!0}),this.sim.start(o,800,800,r==="sun-earth"?30:1,!1,332,2e7)}},H={helper(o,r,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const s=new S({label:"SO16",currState:new y(new e(1,0,0),-Math.PI/2).transform(x.clone()),simFunc:new b,color:["#FDB813","#287AB8","#767676"],radiusScale:10});r==="sun-earth"?s.transformations=[new m,new T(new e(0,0,1),1)]:s.transformations=[new m],this.sim=new g([s],{visType:"3D",controller:"ui",showTrails:!0,maxTrailLength:r==="sun-earth"?2e3:1e3,record:!0,looped:!0}),this.sim.start(o,800,800,r==="sun-earth"?30:1,!1,810,2e7)}},R=({obj:o,name:r,frameOfRef:t,...s})=>{const n="demo-"+r+"-"+t;return l.jsx("div",{children:l.jsx("div",{id:n,style:{width:"800px",height:"800px",position:"relative"},ref:v=>o.helper(n,t,v)})})};R.__docgenInfo={description:"",methods:[],displayName:"HorseshoeOrbit",props:{obj:{required:!0,tsType:{name:"HorseshoeOrbitSetup"},description:""},name:{required:!0,tsType:{name:"string"},description:""},frameOfRef:{required:!0,tsType:{name:"union",raw:'"sun" | "sun-earth"',elements:[{name:"literal",value:'"sun"'},{name:"literal",value:'"sun-earth"'}]},description:""}}};const E={title:"Showcase/Horseshoe Orbit",component:R,parameters:{layout:"centered"},tags:[],argTypes:{obj:{table:{disable:!0}},name:{table:{disable:!0}}},args:{}},i={args:{name:"Horseshoe Orbit YORP",frameOfRef:"sun-earth",obj:P}},u={args:{name:"Horseshoe Orbit SO16",frameOfRef:"sun-earth",obj:H}};var w,c,p;i.parameters={...i.parameters,docs:{...(w=i.parameters)==null?void 0:w.docs,source:{originalSource:`{ + args: { + name: "Horseshoe Orbit YORP", + frameOfRef: "sun-earth", + obj: yorp + } +}`,...(p=(c=i.parameters)==null?void 0:c.docs)==null?void 0:p.source}}};var h,d,f;u.parameters={...u.parameters,docs:{...(h=u.parameters)==null?void 0:h.docs,source:{originalSource:`{ + args: { + name: "Horseshoe Orbit SO16", + frameOfRef: "sun-earth", + obj: so16 + } +}`,...(f=(d=u.parameters)==null?void 0:d.docs)==null?void 0:f.source}}};const F=["YORP","SO16"];export{u as SO16,i as YORP,F as __namedExportsOrder,E as default}; diff --git a/docs/assets/HorseshoeOrbit.stories-qJLTP5dO.js b/docs/assets/HorseshoeOrbit.stories-qJLTP5dO.js deleted file mode 100644 index dba7d4c..0000000 --- a/docs/assets/HorseshoeOrbit.stories-qJLTP5dO.js +++ /dev/null @@ -1,17 +0,0 @@ -import{S as a}from"./Simulation-uzMF7En_.js";import{a as i,C as o,V as e,U as c,R as m}from"./Universe-DpKi-MhS.js";import{R as p,C as w,P as u}from"./Transformation-ClZa9c5r.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const l=new i([new o("Sun",19885e26,69634e4,new e(0,0,0),new e(0,0,0),new e(0,0,0)),new o("Earth",597219e19,6371e3,new e(-248109932596539e-4,1449948612736719e-4,-8215203670851886e-9),new e(-29841.46365518679,-5126.262286859617,1.184224839788195),new e(0,0,0)),new o("YORP",1,1,new e(1789598196203594e-4,467757011067789e-4,5131735873924753e-6),new e(-5641.374152889482,22817.8307950743,-65.07224186314708),new e(0,0,0))]),d=new c({label:"54509 YORP",currState:new p(new e(1,0,0),Math.PI/2).transform(l.clone()),simFunc:new m,color:["#FDB813","#287AB8","#767676"],transformations:[new w,new u(new e(1,0,0),1)]}),h={yorp:d},R={title:"Showcase/Horseshoe Orbit",component:a,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"Horseshoe Orbit YORP",universe:[h.yorp],showDebugInfo:!0,controller:"ui",visType:"3D",width:800,playSpeed:2,showTrails:!0,record:!0,looped:!0,recordFor:332,recordSpeed:2e7,maxTrailLength:2e3}};var n,t,s;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ - args: { - storyName: "Horseshoe Orbit YORP", - universe: [horseshoe.yorp], - showDebugInfo: true, - controller: "ui", - visType: "3D", - width: 800, - playSpeed: 2, - showTrails: true, - record: true, - looped: true, - recordFor: 332, - recordSpeed: 20000000, - maxTrailLength: 2000 - } -}`,...(s=(t=r.parameters)==null?void 0:t.docs)==null?void 0:s.source}}};const T=["YORP"];export{r as YORP,T as __namedExportsOrder,R as default}; diff --git a/docs/assets/Install-BtFTPxYP.js b/docs/assets/Install-bLWJ9yB5.js similarity index 94% rename from docs/assets/Install-BtFTPxYP.js rename to docs/assets/Install-bLWJ9yB5.js index 2410c48..bc259fd 100644 --- a/docs/assets/Install-BtFTPxYP.js +++ b/docs/assets/Install-bLWJ9yB5.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as s}from"./index-z5U8iC57.js";import{M as r}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function o(t){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...s(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Installation"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as s}from"./index-z5U8iC57.js";import{M as r}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function o(t){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...s(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Installation"}),` `,e.jsx(n.h1,{id:"installation",children:"Installation"}),` `,e.jsx(n.h2,{id:"via-npm-registry",children:"Via npm registry"}),` `,e.jsxs(n.p,{children:["nbody is available on the npm registry as ",e.jsx(n.a,{href:"https://www.npmjs.com/package/nbody",rel:"nofollow",children:"nbody"}),". Simply follow the following install commands based on your package manager. Since nbody relies on ",e.jsx(n.a,{href:"https://threejs.org/",rel:"nofollow",children:"three"})," and ",e.jsx(n.a,{href:"https://plotly.com/javascript/",rel:"nofollow",children:"Plotly.js"})," for visualization of the simulations, they have to be installed alongside nbody."]}),` diff --git a/docs/assets/Integration-pSV8N_ng.js b/docs/assets/Integration-CHrxdkpP.js similarity index 96% rename from docs/assets/Integration-pSV8N_ng.js rename to docs/assets/Integration-CHrxdkpP.js index 10259c6..af2f854 100644 --- a/docs/assets/Integration-pSV8N_ng.js +++ b/docs/assets/Integration-CHrxdkpP.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as o}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function i(r){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...r.components};return n.jsxs(n.Fragment,{children:[n.jsx(o,{title:"Integration"}),` +import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as o}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function i(r){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...r.components};return n.jsxs(n.Fragment,{children:[n.jsx(o,{title:"Integration"}),` `,n.jsx(e.h1,{id:"integration",children:"Integration"}),` `,n.jsxs(e.p,{children:["Once installed into your ",n.jsx(e.code,{children:"node_modules"}),", you can use ",n.jsx(e.strong,{children:"nbody"})," in your choice of your frontend framework just like you would any other client side library."]}),` `,n.jsx(e.h2,{id:"table-of-contents",children:"Table of Contents"}),` diff --git a/docs/assets/Intro-B30JA8MU.js b/docs/assets/Intro-B30JA8MU.js new file mode 100644 index 0000000..59ba6c1 --- /dev/null +++ b/docs/assets/Intro-B30JA8MU.js @@ -0,0 +1,7 @@ +import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as s}from"./index-z5U8iC57.js";import{M as n}from"./index-DVskBQuG.js";import"./HorseshoeOrbit.stories-TS9WRF8U.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-PvbTHax1.js";import"./Transformation-DxaXQl0Q.js";function t(r){const e={a:"a",h1:"h1",li:"li",p:"p",ul:"ul",...s(),...r.components};return o.jsxs(o.Fragment,{children:[o.jsx(n,{title:"Showcase/Horseshoe Orbit/Intro"}),` +`,o.jsx(e.h1,{id:"horseshoe-orbits",children:"Horseshoe Orbits"}),` +`,o.jsx(e.p,{children:"Horseshoe orbits are a type of co-orbital motion of a small body around a larger body. The orbital period of the smaller body is very close to that of the larger body, and the two bodies are in a 1:1 orbital resonance. The smaller body appears to move in a horseshoe shape relative to the larger body as seen from a non-rotating frame of reference. Read on to find out more about and see horse shoe orbits in action."}),` +`,o.jsxs(e.ul,{children:[` +`,o.jsx(e.li,{children:o.jsx(e.a,{href:"?path=/docs/showcase-horseshoeorbit-2010-so16--docs",children:"2010 SO16"})}),` +`,o.jsx(e.li,{children:o.jsx(e.a,{href:"?path=/docs/showcase-horseshoeorbit-54509-yorp--docs",children:"54509 YORP"})}),` +`]})]})}function j(r={}){const{wrapper:e}={...s(),...r.components};return e?o.jsx(e,{...r,children:o.jsx(t,{...r})}):t(r)}export{j as default}; diff --git a/docs/assets/Intro-BnoMJX4N.js b/docs/assets/Intro-BnoMJX4N.js deleted file mode 100644 index 1fd7be6..0000000 --- a/docs/assets/Intro-BnoMJX4N.js +++ /dev/null @@ -1,2 +0,0 @@ -import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as m}from"./index-z5U8iC57.js";import{M as r}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function e(t){const o={h1:"h1",...m(),...t.components};return n.jsxs(n.Fragment,{children:[n.jsx(r,{title:"Showcase/Analemma/Intro"}),` -`,n.jsx(o.h1,{id:"analemma",children:"Analemma"})]})}function j(t={}){const{wrapper:o}={...m(),...t.components};return o?n.jsx(o,{...t,children:n.jsx(e,{...t})}):e(t)}export{j as default}; diff --git a/docs/assets/Intro-C7qiaaqG.js b/docs/assets/Intro-C7qiaaqG.js deleted file mode 100644 index 17480ae..0000000 --- a/docs/assets/Intro-C7qiaaqG.js +++ /dev/null @@ -1,4 +0,0 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as r}from"./index-z5U8iC57.js";import{M as s}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function e(o){const n={h2:"h2",...r(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Showcase/Intro"}),` -`,t.jsx(n.h2,{id:"horseshoe-orbits",children:"Horseshoe Orbits"}),` -`,t.jsx(n.h2,{id:"solar-system",children:"Solar system"}),` -`,t.jsx(n.h2,{id:"analemma",children:"Analemma"})]})}function j(o={}){const{wrapper:n}={...r(),...o.components};return n?t.jsx(n,{...o,children:t.jsx(e,{...o})}):e(o)}export{j as default}; diff --git a/docs/assets/Intro-Co2sm1Va.js b/docs/assets/Intro-Co2sm1Va.js new file mode 100644 index 0000000..622e9bb --- /dev/null +++ b/docs/assets/Intro-Co2sm1Va.js @@ -0,0 +1,4 @@ +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as i}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function n(a){const t={a:"a",em:"em",h1:"h1",p:"p",...o(),...a.components};return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Showcase/Analemma/Intro"}),` +`,e.jsx(t.h1,{id:"analemma",children:"Analemma"}),` +`,e.jsxs(t.p,{children:["An analemma is a curve representing the changing position of the Sun in the sky, as viewed from a fixed location on the Earth at the same clock time over the course of an year. Analemma shapes range from figure-8s to infinity symbols, depending on the observer's latitude and the time of day. The analemma is a result of the Earth's tilt and elliptical orbit around the Sun. Analemmas can also be seen on other planets, with shapes that are different from Earth's due to different axial tilts and orbital eccentricities. The analemma on Mars, for example, is a teardrop shape. [",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Analemma",rel:"nofollow",children:"Wikipedia"}),"]"]}),` +`,e.jsxs(t.p,{children:["Analemmas are a good example of what is possible with ",e.jsx(t.em,{children:"nbody"}),", as they involve the simulation of the Earth's orbit around the Sun, along with frame of reference transformations."]})]})}function u(a={}){const{wrapper:t}={...o(),...a.components};return t?e.jsx(t,{...a,children:e.jsx(n,{...a})}):n(a)}export{u as default}; diff --git a/docs/assets/Intro-CrXaUZRx.js b/docs/assets/Intro-CrXaUZRx.js deleted file mode 100644 index b480385..0000000 --- a/docs/assets/Intro-CrXaUZRx.js +++ /dev/null @@ -1,3 +0,0 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as s}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function e(n){const o={h1:"h1",p:"p",...i(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Visualize/Intro"}),` -`,t.jsx(o.h1,{id:"visualize",children:"Visualize"}),` -`,t.jsx(o.p,{children:"This section shall explore the various setups and configurations of the visualization system."})]})}function d(n={}){const{wrapper:o}={...i(),...n.components};return o?t.jsx(o,{...n,children:t.jsx(e,{...n})}):e(n)}export{d as default}; diff --git a/docs/assets/Intro-D6N-Vi4T.js b/docs/assets/Intro-D6N-Vi4T.js new file mode 100644 index 0000000..821b06f --- /dev/null +++ b/docs/assets/Intro-D6N-Vi4T.js @@ -0,0 +1,8 @@ +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as i}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function t(s){const o={a:"a",h1:"h1",li:"li",p:"p",ul:"ul",...n(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Showcase/Intro"}),` +`,e.jsx(o.h1,{id:"showcase",children:"Showcase"}),` +`,e.jsx(o.p,{children:"In this section, we showcase some of the interesting simulations that can be created using the n-body simulator, including some of the most famous celestial phenomena. Read on to learn more about each of these simulations."}),` +`,e.jsxs(o.ul,{children:[` +`,e.jsx(o.li,{children:e.jsx(o.a,{href:"?path=/docs/showcase-analemma-intro--docs",children:"Analemma"})}),` +`,e.jsx(o.li,{children:e.jsx(o.a,{href:"?path=/docs/showcase-horseshoeorbit-intro--docs",children:"Horseshoe Orbits"})}),` +`,e.jsx(o.li,{children:e.jsx(o.a,{href:"?path=/docs/showcase-solarsystem-intro--docs",children:"Solar System"})}),` +`]})]})}function x(s={}){const{wrapper:o}={...n(),...s.components};return o?e.jsx(o,{...s,children:e.jsx(t,{...s})}):t(s)}export{x as default}; diff --git a/docs/assets/Intro-DCOanv0Z.js b/docs/assets/Intro-DCOanv0Z.js new file mode 100644 index 0000000..f0d6151 --- /dev/null +++ b/docs/assets/Intro-DCOanv0Z.js @@ -0,0 +1,11 @@ +import{j as i}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as r}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function n(s){const e={a:"a",h1:"h1",li:"li",p:"p",ul:"ul",...o(),...s.components};return i.jsxs(i.Fragment,{children:[i.jsx(r,{title:"Visualize/Intro"}),` +`,i.jsx(e.h1,{id:"visualize",children:"Visualize"}),` +`,i.jsx(e.p,{children:"This section shall explore the various setups and configurations of the visualization system. Read on to find out more about how to precisely configure the visualization system to your needs."}),` +`,i.jsxs(e.ul,{children:[` +`,i.jsx(e.li,{children:i.jsx(e.a,{href:"?path=/docs/visualize-dimension--docs",children:"Dimension"})}),` +`,i.jsx(e.li,{children:i.jsx(e.a,{href:"?path=/docs/visualize-multiverse--docs",children:"Multiverse"})}),` +`,i.jsx(e.li,{children:i.jsx(e.a,{href:"?path=/docs/visualize-record--docs",children:"Record"})}),` +`,i.jsx(e.li,{children:i.jsx(e.a,{href:"?path=/docs/visualize-controller--docs",children:"Controller"})}),` +`,i.jsx(e.li,{children:i.jsx(e.a,{href:"?path=/docs/visualize-trails--docs",children:"Trails"})}),` +`,i.jsx(e.li,{children:i.jsx(e.a,{href:"?path=/docs/visualize-debug-info--docs",children:"Debug Info"})}),` +`]})]})}function p(s={}){const{wrapper:e}={...o(),...s.components};return e?i.jsx(e,{...s,children:i.jsx(n,{...s})}):n(s)}export{p as default}; diff --git a/docs/assets/Intro-B2U0FUxS.js b/docs/assets/Intro-DpzKoVyU.js similarity index 90% rename from docs/assets/Intro-B2U0FUxS.js rename to docs/assets/Intro-DpzKoVyU.js index a3e0973..f282618 100644 --- a/docs/assets/Intro-B2U0FUxS.js +++ b/docs/assets/Intro-DpzKoVyU.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as r}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function t(i){const n={a:"a",h1:"h1",li:"li",p:"p",ul:"ul",...o(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Define/Intro"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as r}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function t(i){const n={a:"a",h1:"h1",li:"li",p:"p",ul:"ul",...o(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Define/Intro"}),` `,e.jsx(n.h1,{id:"define",children:"Define"}),` `,e.jsx(n.p,{children:"The library provides a set of predefined building blocks (force, simulate function, transformation) that can be used to define a simulation. However, the library is designed to be extensible and allows users to define their own building blocks in either JavaScript or TypeScript. Check out each building block's page for more details."}),` `,e.jsxs(n.ul,{children:[` diff --git a/docs/assets/Multiverse-DvmSAK7U.js b/docs/assets/Multiverse-DvmSAK7U.js new file mode 100644 index 0000000..0511a00 --- /dev/null +++ b/docs/assets/Multiverse-DvmSAK7U.js @@ -0,0 +1,19 @@ +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as o,d as s}from"./index-DVskBQuG.js";import{SingleUniverse as l,Multiverse as a,Multiverse3D as u}from"./Multiverse.stories-Dk5x9o7J.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-DLuwJnRa.js";import"./Universe-PvbTHax1.js";function r(i){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...t(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Visualize/Multiverse"}),` +`,e.jsx(n.h1,{id:"multiverse",children:"Multiverse"}),` +`,e.jsxs(n.p,{children:["You can setup multiple universes in a single simulation. This is useful for simulating multiple n-body systems in parallel with varying initial configurations, forces, simuation functions and/or transformations. Simply create each universe as you would for a single universe simulation and pass them as an array to the ",e.jsx(n.strong,{children:"Simulation"})," object in the following way. Available for both 2D and 3D visualizations, UI controls (when enabled) are provided to hide/show each universe separately (see ",e.jsx(n.a,{href:"?path=/docs/visualize-controller--docs",children:"Controller"}),")."]}),` +`,e.jsx(n.h2,{id:"single-universe---2d",children:"Single Universe - 2D"}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe);\r +new Simulation([universe]); +`})}),` +`,e.jsx("center",{children:e.jsx(s,{of:l,name:"SingleUniverse"})}),` +`,e.jsx(n.h2,{id:"multiverse---2d",children:"Multiverse - 2D"}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation([universe1, universe2], {}); +`})}),` +`,e.jsx("center",{children:e.jsx(s,{of:a,name:"Multiverse"})}),` +`,e.jsx(n.h2,{id:"multiverse---3d",children:"Multiverse - 3D"}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation([universe1, universe2], {\r + visType: "3D",\r + controller: 'ui',\r +}); +`})}),` +`,e.jsx("center",{children:e.jsx(s,{of:u,name:"Multiverse3D"})})]})}function y(i={}){const{wrapper:n}={...t(),...i.components};return n?e.jsx(n,{...i,children:e.jsx(r,{...i})}):r(i)}export{y as default}; diff --git a/docs/assets/Multiverse-WC3T8V7i.js b/docs/assets/Multiverse-WC3T8V7i.js deleted file mode 100644 index 20cca84..0000000 --- a/docs/assets/Multiverse-WC3T8V7i.js +++ /dev/null @@ -1,12 +0,0 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as o,d as s}from"./index-SQMR4-IU.js";import{SingleUniverse as l,Multiverse as c,Multiverse3D as m}from"./Multiverse.stories-XPvVjQkJ.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Universe-BbLae_pC.js";function i(r){const n={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...t(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Visualize/Multiverse"}),` -`,e.jsx(n.h1,{id:"multiverse",children:"Multiverse"}),` -`,e.jsx(n.p,{children:"TODO"}),` -`,e.jsx(n.h2,{id:"single-universe---2d",children:"Single Universe - 2D"}),` -`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js"})}),` -`,e.jsx("center",{children:e.jsx(s,{of:l,name:"SingleUniverse"})}),` -`,e.jsx(n.h2,{id:"multiverse---2d",children:"Multiverse - 2D"}),` -`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js"})}),` -`,e.jsx("center",{children:e.jsx(s,{of:c,name:"Multiverse"})}),` -`,e.jsx(n.h2,{id:"multiverse---3d",children:"Multiverse - 3D"}),` -`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js"})}),` -`,e.jsx("center",{children:e.jsx(s,{of:m,name:"Multiverse3D"})})]})}function C(r={}){const{wrapper:n}={...t(),...r.components};return n?e.jsx(n,{...r,children:e.jsx(i,{...r})}):i(r)}export{C as default}; diff --git a/docs/assets/Multiverse.stories-Dk5x9o7J.js b/docs/assets/Multiverse.stories-Dk5x9o7J.js new file mode 100644 index 0000000..1a86966 --- /dev/null +++ b/docs/assets/Multiverse.stories-Dk5x9o7J.js @@ -0,0 +1,21 @@ +import{S as g,f as v,m as p}from"./Universe-DLuwJnRa.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PvbTHax1.js";const h={title:"Visualize/Multiverse",component:g,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"SingleUniverse",universe:[v],width:600}},r={args:{storyName:"Multiverse",universe:p,width:600}},s={args:{storyName:"Multiverse3D",universe:p,visType:"3D",controller:"ui",width:600}};var t,i,a;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`{ + args: { + storyName: 'SingleUniverse', + universe: [fig8], + width: 600 + } +}`,...(a=(i=e.parameters)==null?void 0:i.docs)==null?void 0:a.source}}};var n,o,u;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ + args: { + storyName: 'Multiverse', + universe: multiFig8, + width: 600 + } +}`,...(u=(o=r.parameters)==null?void 0:o.docs)==null?void 0:u.source}}};var m,l,c;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`{ + args: { + storyName: 'Multiverse3D', + universe: multiFig8, + visType: '3D', + controller: 'ui', + width: 600 + } +}`,...(c=(l=s.parameters)==null?void 0:l.docs)==null?void 0:c.source}}};const w=["SingleUniverse","Multiverse","Multiverse3D"];export{r as Multiverse,s as Multiverse3D,e as SingleUniverse,w as __namedExportsOrder,h as default}; diff --git a/docs/assets/Multiverse.stories-XPvVjQkJ.js b/docs/assets/Multiverse.stories-XPvVjQkJ.js deleted file mode 100644 index 9d1fb93..0000000 --- a/docs/assets/Multiverse.stories-XPvVjQkJ.js +++ /dev/null @@ -1,20 +0,0 @@ -import{S as g}from"./Simulation-uzMF7En_.js";import{f as v,m as p}from"./Universe-BbLae_pC.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-DpKi-MhS.js";const D={title:"Visualize/Multiverse",component:g,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"SingleUniverse",universe:[v]}},r={args:{storyName:"Multiverse",universe:p}},s={args:{storyName:"Multiverse3D",universe:p,visType:"3D",showTrails:!0,showDebugInfo:!0}};var t,a,o;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`{ - args: { - storyName: 'SingleUniverse', - universe: [fig8] - } -}`,...(o=(a=e.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};var i,n,u;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{ - args: { - storyName: 'Multiverse', - universe: multiFig8 - // showTrails: true, - } -}`,...(u=(n=r.parameters)==null?void 0:n.docs)==null?void 0:u.source}}};var m,l,c;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`{ - args: { - storyName: 'Multiverse3D', - universe: multiFig8, - visType: '3D', - showTrails: true, - showDebugInfo: true - } -}`,...(c=(l=s.parameters)==null?void 0:l.docs)==null?void 0:c.source}}};const N=["SingleUniverse","Multiverse","Multiverse3D"];export{r as Multiverse,s as Multiverse3D,e as SingleUniverse,N as __namedExportsOrder,D as default}; diff --git a/docs/assets/Nbody-C63zXSRg.js b/docs/assets/Nbody-D4jrnsgb.js similarity index 97% rename from docs/assets/Nbody-C63zXSRg.js rename to docs/assets/Nbody-D4jrnsgb.js index b19c89e..7b844fe 100644 --- a/docs/assets/Nbody-C63zXSRg.js +++ b/docs/assets/Nbody-D4jrnsgb.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as t}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function r(o){const n={a:"a",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"nbody"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as t}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function r(o){const n={a:"a",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"nbody"}),` `,e.jsx(n.h1,{id:"nbody",children:"nbody"}),` `,e.jsxs(n.p,{children:["Frontend library to ",e.jsx(n.strong,{children:"configure"}),", ",e.jsx(n.strong,{children:"simulate"})," and ",e.jsx(n.strong,{children:"visualize"})," nbody simulations, entirely on the client-side browser."]}),` `,e.jsx(n.h1,{id:"background",children:"Background"}),` diff --git a/docs/assets/QuickStart-CIINUVcg.js b/docs/assets/QuickStart-BnN-jZlZ.js similarity index 93% rename from docs/assets/QuickStart-CIINUVcg.js rename to docs/assets/QuickStart-BnN-jZlZ.js index d8802cf..0fa392b 100644 --- a/docs/assets/QuickStart-CIINUVcg.js +++ b/docs/assets/QuickStart-BnN-jZlZ.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as o}from"./index-SQMR4-IU.js";import{TwoD as a}from"./Dimension.stories-CKHnNJXJ.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Universe-BbLae_pC.js";function r(i){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Quick Start"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as o}from"./index-DVskBQuG.js";import{TwoD as a}from"./Dimension.stories-DocIpVtH.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-DLuwJnRa.js";import"./Universe-PvbTHax1.js";function r(i){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Quick Start"}),` `,e.jsx(n.h1,{id:"quick-start",children:"Quick Start"}),` `,e.jsx(n.p,{children:"A quick start guide to configuring, simulating and visualizing a simple nbody simulation."}),` `,e.jsxs(n.ul,{children:[` @@ -79,4 +79,4 @@ simulation.start(, 800, 800); `,e.jsx("center",{children:e.jsx(o,{of:a})}),` `,e.jsxs(n.p,{children:["You've done it! You just simulated a special configuration of the ",e.jsx(n.a,{href:"https://en.wikipedia.org/wiki/Three-body_problem",rel:"nofollow",children:"three-body"})," system using the ",e.jsx(n.em,{children:"nbody"})," library. Feel free to experiment with different configurations to see how systems evolve over time with various forces, integrators and transformations (read on to find out what those are)."]}),` `,e.jsx(n.h2,{id:"next-steps",children:"Next Steps"}),` -`,e.jsxs(n.p,{children:["Checkout the ",e.jsx(n.a,{href:"?path=/docs/configuration-configuration--docs",children:"Configuration"})," section to learn how to configure a simulation with greater detail and customization."]})]})}function w(i={}){const{wrapper:n}={...t(),...i.components};return n?e.jsx(n,{...i,children:e.jsx(r,{...i})}):r(i)}export{w as default}; +`,e.jsxs(n.p,{children:["Checkout the ",e.jsx(n.a,{href:"?path=/docs/configuration-configuration--docs",children:"Configuration"})," section to learn how to configure a simulation with greater detail and customization."]})]})}function v(i={}){const{wrapper:n}={...t(),...i.components};return n?e.jsx(n,{...i,children:e.jsx(r,{...i})}):r(i)}export{v as default}; diff --git a/docs/assets/Record-D-rP6dMC.js b/docs/assets/Record-D-rP6dMC.js deleted file mode 100644 index 339cfee..0000000 --- a/docs/assets/Record-D-rP6dMC.js +++ /dev/null @@ -1,4 +0,0 @@ -import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as i,d as t}from"./index-SQMR4-IU.js";import{RealTime as p,Recorded as s,RecordedLooped as a}from"./Record.stories-BALVDafM.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Universe-BbLae_pC.js";function m(r){return o.jsxs(o.Fragment,{children:[o.jsx(i,{title:"Visualize/Record"}),` -`,o.jsx(t,{of:p,name:"Record"}),` -`,o.jsx(t,{of:s,name:"Record"}),` -`,o.jsx(t,{of:a,name:"Record"})]})}function y(r={}){const{wrapper:e}={...n(),...r.components};return e?o.jsx(e,{...r,children:o.jsx(m,{...r})}):m()}export{y as default}; diff --git a/docs/assets/Record-DujQYAwf.js b/docs/assets/Record-DujQYAwf.js new file mode 100644 index 0000000..e6014ae --- /dev/null +++ b/docs/assets/Record-DujQYAwf.js @@ -0,0 +1,32 @@ +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as t,d as o}from"./index-DVskBQuG.js";import{RealTime as s,Recorded as c,RecordedLooped as a}from"./Record.stories-D-X9pPdt.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-DLuwJnRa.js";import"./Universe-PvbTHax1.js";function d(n){const r={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...i(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Visualize/Record"}),` +`,e.jsx(r.h1,{id:"record",children:"Record"}),` +`,e.jsxs(r.p,{children:["You can simulate and visualize the n-body system in real-time or record the simulation and play it back later. Simply set the ",e.jsx(r.code,{children:"record"})," field when creating a ",e.jsx(r.strong,{children:"Simulation"})," object in the following way. Available in both 2D and 3D views."]}),` +`,e.jsx(r.pre,{children:e.jsx(r.code,{className:"language-js",children:`new Simulation(universe, {\r + record: true,\r +}) +`})}),` +`,e.jsx(r.h2,{id:"real-time-default",children:"Real-Time (Default)"}),` +`,e.jsx(r.p,{children:"The universe(s) are simulated and visualized in real-time."}),` +`,e.jsx(r.pre,{children:e.jsx(r.code,{className:"language-js",children:`new Simulation(universe, {})\r +new Simulation(universe, {\r + record: false,\r +}) +`})}),` +`,e.jsx("center",{children:e.jsx(o,{of:s,name:"Real-time"})}),` +`,e.jsx(r.h2,{id:"recorded",children:"Recorded"}),` +`,e.jsxs(r.p,{children:["The universe(s) are simulated at ",e.jsx(r.code,{children:"recordSpeed"})," and recorded completely for ",e.jsx(r.code,{children:"recordFor"})," seconds worth of playback. The recording can then be played back at any specified speed include -ve values for reverse playback."]}),` +`,e.jsx(r.pre,{children:e.jsx(r.code,{className:"language-js",children:`const sim = new Simulation(universe, {\r + record: true,\r +})\r +// divId, width, height, playSpeed, startPaused, recordFor, recordSpeed\r +sim.start(, , 1, false, 60, 2) +`})}),` +`,e.jsx("center",{children:e.jsx(o,{of:c,name:"Record"})}),` +`,e.jsx(r.h2,{id:"recorded-and-looped",children:"Recorded and Looped"}),` +`,e.jsxs(r.p,{children:["The recorded simulation can also be looped indefinitely with the ",e.jsx(r.code,{children:"looped"})," field set to ",e.jsx(r.code,{children:"true"})," in the ",e.jsx(r.strong,{children:"Simulation"})," object - upon reaching the end of the recording, loops back to the start and loops back to the end in case of reverse playback. The recorded playback is not looped by default."]}),` +`,e.jsx(r.pre,{children:e.jsx(r.code,{className:"language-js",children:`new Simulation(universe, {\r + record: true,\r + looped: true,\r +}) +`})}),` +`,e.jsx("center",{children:e.jsx(o,{of:a,name:"RecordLooped"})})]})}function w(n={}){const{wrapper:r}={...i(),...n.components};return r?e.jsx(r,{...n,children:e.jsx(d,{...n})}):d(n)}export{w as default}; diff --git a/docs/assets/Record.stories-BALVDafM.js b/docs/assets/Record.stories-BALVDafM.js deleted file mode 100644 index 1bb190c..0000000 --- a/docs/assets/Record.stories-BALVDafM.js +++ /dev/null @@ -1,23 +0,0 @@ -import{S as l}from"./Simulation-uzMF7En_.js";import{f as s}from"./Universe-BbLae_pC.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-DpKi-MhS.js";const f={title:"Visualize/Record",component:l,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"RealTime",universe:[s],visType:"3D"}},r={args:{storyName:"Recorded",universe:[s],visType:"3D",record:!0,looped:!1}},o={args:{storyName:"RecordedLooped",universe:[s],visType:"3D",record:!0,looped:!0}};var a,t,d;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{ - args: { - storyName: 'RealTime', - universe: [fig8], - visType: '3D' - } -}`,...(d=(t=e.parameters)==null?void 0:t.docs)==null?void 0:d.source}}};var n,c,i;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ - args: { - storyName: 'Recorded', - universe: [fig8], - visType: '3D', - record: true, - looped: false - } -}`,...(i=(c=r.parameters)==null?void 0:c.docs)==null?void 0:i.source}}};var p,m,u;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ - args: { - storyName: 'RecordedLooped', - universe: [fig8], - visType: '3D', - record: true, - looped: true - } -}`,...(u=(m=o.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};const D=["RealTime","Recorded","RecordedLooped"];export{e as RealTime,r as Recorded,o as RecordedLooped,D as __namedExportsOrder,f as default}; diff --git a/docs/assets/Record.stories-D-X9pPdt.js b/docs/assets/Record.stories-D-X9pPdt.js new file mode 100644 index 0000000..5a43037 --- /dev/null +++ b/docs/assets/Record.stories-D-X9pPdt.js @@ -0,0 +1,23 @@ +import{S as l,f as s}from"./Universe-DLuwJnRa.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PvbTHax1.js";const T={title:"Visualize/Record",component:l,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"RealTime",universe:[s],visType:"3D"}},r={args:{storyName:"Recorded",universe:[s],visType:"3D",record:!0,looped:!1}},o={args:{storyName:"RecordedLooped",universe:[s],visType:"3D",record:!0,looped:!0}};var a,t,d;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{ + args: { + storyName: 'RealTime', + universe: [fig8], + visType: '3D' + } +}`,...(d=(t=e.parameters)==null?void 0:t.docs)==null?void 0:d.source}}};var n,c,i;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ + args: { + storyName: 'Recorded', + universe: [fig8], + visType: '3D', + record: true, + looped: false + } +}`,...(i=(c=r.parameters)==null?void 0:c.docs)==null?void 0:i.source}}};var p,m,u;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ + args: { + storyName: 'RecordedLooped', + universe: [fig8], + visType: '3D', + record: true, + looped: true + } +}`,...(u=(m=o.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};const f=["RealTime","Recorded","RecordedLooped"];export{e as RealTime,r as Recorded,o as RecordedLooped,f as __namedExportsOrder,T as default}; diff --git a/docs/assets/Recorded-GkJIRhaM.js b/docs/assets/Recorded-GkJIRhaM.js new file mode 100644 index 0000000..639de9f --- /dev/null +++ b/docs/assets/Recorded-GkJIRhaM.js @@ -0,0 +1,4 @@ +import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as i,d as m}from"./index-DVskBQuG.js";import{Recorded as d}from"./SolarSystem.stories-2o-H9JCP.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-PvbTHax1.js";import"./Transformation-DxaXQl0Q.js";function r(e){const t={h1:"h1",p:"p",...n(),...e.components};return o.jsxs(o.Fragment,{children:[o.jsx(i,{title:"Showcase/Solar System/Recorded"}),` +`,o.jsx(t.h1,{id:"recorded",children:"Recorded"}),` +`,o.jsx(t.p,{children:"Recorded ~247 years of simulated time, which is the orbital period of Pluto, and played on loop."}),` +`,o.jsx("center",{children:o.jsx(m,{of:d,name:"Recorded"})})]})}function y(e={}){const{wrapper:t}={...n(),...e.components};return t?o.jsx(t,{...e,children:o.jsx(r,{...e})}):r(e)}export{y as default}; diff --git a/docs/assets/Simulate-Dx6xa9RA.js b/docs/assets/Simulate-Dx6xa9RA.js new file mode 100644 index 0000000..c8d703d --- /dev/null +++ b/docs/assets/Simulate-Dx6xa9RA.js @@ -0,0 +1,4 @@ +import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as s}from"./index-z5U8iC57.js";import{M as i,d as r}from"./index-DVskBQuG.js";import{Simulate as a}from"./SolarSystem.stories-2o-H9JCP.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-PvbTHax1.js";import"./Transformation-DxaXQl0Q.js";function n(e){const o={h1:"h1",p:"p",...s(),...e.components};return t.jsxs(t.Fragment,{children:[t.jsx(i,{title:"Showcase/Solar System/Simulate"}),` +`,t.jsx(o.h1,{id:"simulate",children:"Simulate"}),` +`,t.jsx(o.p,{children:"The Solar system has been setup based on positions and velocities of the planets on 1st January 2024. You can simulate the system at a high speed to oberve the traced orbits. However, keep in mind that the faster you simulate, the less accurate the orbits will be (due to the numerical integration method used)."}),` +`,t.jsx("center",{children:t.jsx(r,{of:a,name:"Simulate"})})]})}function b(e={}){const{wrapper:o}={...s(),...e.components};return o?t.jsx(o,{...e,children:t.jsx(n,{...e})}):n(e)}export{b as default}; diff --git a/docs/assets/SimulateFunction-CJWYzgTw.js b/docs/assets/SimulateFunction-Dd1xEf3Q.js similarity index 70% rename from docs/assets/SimulateFunction-CJWYzgTw.js rename to docs/assets/SimulateFunction-Dd1xEf3Q.js index 895f5d5..2851edd 100644 --- a/docs/assets/SimulateFunction-CJWYzgTw.js +++ b/docs/assets/SimulateFunction-Dd1xEf3Q.js @@ -1,6 +1,6 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as a}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function n(r){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...i(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(a,{title:"Define/Simulate Function"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as r}from"./index-z5U8iC57.js";import{M as a}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function i(n){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...r(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(a,{title:"Define/Simulate Function"}),` `,e.jsx(t.h1,{id:"simulate-function",children:"Simulate Function"}),` -`,e.jsxs(t.p,{children:["A ",e.jsx(t.strong,{children:"Simulate Function"})," object encapsulates logic for advancing the state of the universe over time, usually using ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Numerical_integration",rel:"nofollow",children:"numerical integration"}),". It has a simulate method that takes in a time step, current state of the universe, (optionally the previous state of the universe) and returns the next state of the universe."]}),` +`,e.jsxs(t.p,{children:["A ",e.jsx(t.strong,{children:"Simulate Function"})," object encapsulates logic for advancing the state of the universe over time, usually using ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Numerical_integration",rel:"nofollow",children:"numerical integration"}),". It has a ",e.jsx(t.code,{children:"simulate"})," method that takes in a time step, current state of the universe, (optionally the previous state of the universe) and returns the next state of the universe."]}),` `,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-typescript",children:`interface SimulateFunction {\r simulate(deltaT: number, currState: State, prevState: State): State\r } @@ -13,28 +13,28 @@ import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from" `]}),` `,e.jsx(t.h2,{id:"inbuilt-simulate-functions",children:"Inbuilt Simulate Functions"}),` `,e.jsx(t.h3,{id:"velocity-verlet",children:"Velocity Verlet"}),` -`,e.jsxs(t.p,{children:["Create a ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet",rel:"nofollow",children:"velocity verlet"})," integrator. Uses newtonian gravity by default, or the provided force object."]}),` +`,e.jsxs(t.p,{children:["A ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet",rel:"nofollow",children:"velocity verlet"})," integrator implementation. Uses newtonian gravity by default, or the provided force object."]}),` `,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-javascript",children:`new VelocityVerletSim();\r new VelocityVerletSim(customForce); `})}),` `,e.jsx(t.h3,{id:"explicit-euler",children:"Explicit Euler"}),` -`,e.jsxs(t.p,{children:["Create a ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Explicit_and_implicit_methods",rel:"nofollow",children:"explicit euler"})," integrator. Uses newtonian gravity by default, or the provided force object."]}),` +`,e.jsxs(t.p,{children:["An ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Explicit_and_implicit_methods",rel:"nofollow",children:"explicit euler"})," integrator implementation. Uses newtonian gravity by default, or the provided force object."]}),` `,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-javascript",children:`new ExplicitEulerSim();\r new ExplicitEulerSim(customForce); `})}),` `,e.jsx(t.h3,{id:"semi-implicit-euler",children:"Semi Implicit Euler"}),` -`,e.jsxs(t.p,{children:["Create a ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Explicit_and_implicit_methods",rel:"nofollow",children:"semi-implicit euler"})," integrator. Uses newtonian gravity by default, or the provided force object."]}),` +`,e.jsxs(t.p,{children:["A ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Explicit_and_implicit_methods",rel:"nofollow",children:"semi-implicit euler"})," integrator implementation. Uses newtonian gravity by default, or the provided force object."]}),` `,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-javascript",children:`new SemiImplicitEulerSim();\r new SemiImplicitEulerSim(customForce); `})}),` `,e.jsx(t.h3,{id:"runge-kutta-order-4",children:"Runge-Kutta Order 4"}),` -`,e.jsxs(t.p,{children:["Create a ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods",rel:"nofollow",children:"runge-kutta order 4"})," integrator. Uses newtonian gravity by default, or the provided force object. Optionally, you can provide the weight coefficients for the averaging step."]}),` +`,e.jsxs(t.p,{children:["A ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods",rel:"nofollow",children:"runge-kutta order 4"})," integrator implementation. Uses newtonian gravity by default, or the provided force object. Optionally, you can provide the weight coefficients for the averaging step."]}),` `,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-javascript",children:`new RungeKutta4Sim();\r new RungeKutta4Sim(customForce);\r new RungeKutta4Sim(customForce, [1, 2, 2, 1]); `})}),` `,e.jsx(t.h3,{id:"lambda-integrator",children:"Lambda integrator"}),` -`,e.jsx(t.p,{children:"Create a simulate function from a lambda function."}),` +`,e.jsx(t.p,{children:"A simulate function based the given lambda/arrow/anonymous function."}),` `,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-javascript",children:`new LambdaSim((deltaT, currState, prevState) => {\r // your logic here\r }); @@ -84,4 +84,4 @@ new RungeKutta4Sim(customForce, [1, 2, 2, 1]); }\r }\r -`})})]})}function j(r={}){const{wrapper:t}={...i(),...r.components};return t?e.jsx(t,{...r,children:e.jsx(n,{...r})}):n(r)}export{j as default}; +`})})]})}function j(n={}){const{wrapper:t}={...r(),...n.components};return t?e.jsx(t,{...n,children:e.jsx(i,{...n})}):i(n)}export{j as default}; diff --git a/docs/assets/Simulation-uzMF7En_.js b/docs/assets/Simulation-uzMF7En_.js deleted file mode 100644 index 32be5fc..0000000 --- a/docs/assets/Simulation-uzMF7En_.js +++ /dev/null @@ -1 +0,0 @@ -import{j as V}from"./jsx-runtime-DRTy3Uxn.js";import{R as g,r as S}from"./index-BBkUAzwr.js";import{S as x}from"./Universe-DpKi-MhS.js";const D=({storyName:u="default",universe:r=[],visType:s="2D",record:n=!1,looped:i=!0,controller:o="none",showTrails:d=!1,showDebugInfo:m=!1,maxFrameRate:p=-1,maxTrailLength:f=100,width:a=400,callback:c=t=>()=>{},playSpeed:v=1,startPaused:y=!1,recordFor:T=1,recordSpeed:b=1,...w})=>{const t="demo-"+u,[e,q]=g.useState(null);return e===null&&q(new x(r.map(l=>l.clone()),{visType:s,record:n,looped:i,controller:o,showTrails:d,showDebugInfo:m,maxFrameRate:p,maxTrailLength:f})),S.useEffect(()=>{e==null||e.start(t,a,a,v,y,T,b);let l=()=>{};return e&&(l=c(e)),()=>{l(),e==null||e.stop()}},[]),V.jsx("div",{id:t,style:{width:a,height:a,position:"relative"}})};D.__docgenInfo={description:"Primary UI component for user interaction",methods:[],displayName:"Simulation",props:{storyName:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"default"',computed:!1}},universe:{required:!1,tsType:{name:"Array",elements:[{name:"Universe"}],raw:"Universe[]"},description:"",defaultValue:{value:"[]",computed:!1}},visType:{required:!1,tsType:{name:"union",raw:"'2D' | '3D'",elements:[{name:"literal",value:"'2D'"},{name:"literal",value:"'3D'"}]},description:"",defaultValue:{value:'"2D"',computed:!1}},record:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},looped:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},controller:{required:!1,tsType:{name:"union",raw:"'ui' | 'code' | 'none'",elements:[{name:"literal",value:"'ui'"},{name:"literal",value:"'code'"},{name:"literal",value:"'none'"}]},description:"",defaultValue:{value:'"none"',computed:!1}},showTrails:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},showDebugInfo:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},maxFrameRate:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"-1",computed:!1}},maxTrailLength:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"100",computed:!1}},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},callback:{required:!1,tsType:{name:"signature",type:"function",raw:"(simulation: NbodySimulation) => () => void",signature:{arguments:[{type:{name:"NbodySimulation"},name:"simulation"}],return:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}}}},description:"",defaultValue:{value:"(sim) => () => {}",computed:!1}},playSpeed:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},startPaused:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},recordFor:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},recordSpeed:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}}}};export{D as S}; diff --git a/docs/assets/SolarSystem-DXcBp5jp.js b/docs/assets/SolarSystem-DXcBp5jp.js deleted file mode 100644 index f551199..0000000 --- a/docs/assets/SolarSystem-DXcBp5jp.js +++ /dev/null @@ -1,4 +0,0 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as m,d as s}from"./index-SQMR4-IU.js";import{SolarSystem as i}from"./SolarSystem.stories-B0JeMpZ-.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Universe-BbLae_pC.js";function r(o){const e={code:"code",h2:"h2",pre:"pre",...n(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(m,{title:"Showcase/SolarSystem"}),` -`,t.jsx(e.h2,{id:""}),` -`,t.jsx(e.pre,{children:t.jsx(e.code,{className:"language-js"})}),` -`,t.jsx("center",{children:t.jsx(s,{of:i,name:""})})]})}function g(o={}){const{wrapper:e}={...n(),...o.components};return e?t.jsx(e,{...o,children:t.jsx(r,{...o})}):r(o)}export{g as default}; diff --git a/docs/assets/SolarSystem.stories-2o-H9JCP.js b/docs/assets/SolarSystem.stories-2o-H9JCP.js new file mode 100644 index 0000000..875ea6b --- /dev/null +++ b/docs/assets/SolarSystem.stories-2o-H9JCP.js @@ -0,0 +1,11 @@ +import{j as l}from"./jsx-runtime-DRTy3Uxn.js";import{S as x,C as r,V as e,U as S,R as h,a as f}from"./Universe-PvbTHax1.js";import{R as y,C as g}from"./Transformation-DxaXQl0Q.js";import"./index-BBkUAzwr.js";const b=new x([new r("Sun",19885e26,69634e4,new e(0,0,0),new e(0,0,0),new e(0,0,0)),new r("Mercury",3302e20,1e8,new e(-4108411877039495e-5,299737595415448e-4,6217890408222714e-6),new e(-38657.43010383652,-37338.89075044869,494.4436024774976),new e(0,0,0)),new r("Venus",48685e20,1e8,new e(-1069987422398024e-4,-1145572515113905e-5,6016588327139664e-6),new e(3513.460276994624,-34977.5562937166,-683.0913209445484),new e(0,0,0)),new r("Earth",597219e19,1e8,new e(-248109932596539e-4,1449948612736719e-4,-8215203670851886e-9),new e(-29841.46365518679,-5126.262286859617,1.184224839788195),new e(0,0,0)),new r("Mars",64171e19,1e8,new e(-4388577457378983e-5,-2170849264747524e-4,-3473007284583151e-6),new e(24661.91455128526,-2722.16016197737,-661.9819103693254),new e(0,0,0)),new r("Jupiter",189818722e19,6e8,new e(5225708576244547e-4,5318268827721269e-4,-1390073285881653e-5),new e(-9481.190567392032,9781.942400350084,171.4274561397779),new e(0,0,0)),new r("Saturn",56834e22,5e8,new e(1345793242617223e-3,-5559294178115251e-4,-4389262609579784e-5),new e(3146.297313479314,8917.916155362638,-279.9382290475703),new e(0,0,0)),new r("Uranus",86813e21,5e8,new e(1835714294722568e-3,2288891426259816e-3,-1529865738122165e-5),new e(-5371.82830611223,3954.368764227032,84.23549070186587),new e(0,0,0)),new r("Neptune",102409e21,5e8,new e(4464446647141849e-3,-2679158335073845e-4,-9736583677508334e-5),new e(281.8440617089212,5469.942022851473,-119.0017755456774),new e(0,0,0)),new r("Pluto",1307e19,25e7,new e(2574575382744127e-3,-4538596532403562e-3,-2587050606457522e-4),new e(4844.463314470517,1482.549367525443,-1568.756846977261),new e(0,0,0))]),j={helper(s,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const a=new S({label:"Solar Sytem",currState:new y(new e(1,0,0),Math.PI/2).transform(b.clone()),simFunc:new h,color:["#FDB813","#B7B8B9","#c18f17","#287AB8","#c1440e","#d8ca9d","#ceb8b8","#ACE5EE","#5b5ddf"],transformations:[new g],radiusScale:20});this.sim=new f([a],{visType:"3D",controller:"ui",showTrails:!0,maxTrailLength:2e3,record:!0,looped:!0,showDebugInfo:!0}),this.sim.start(s,800,800,2,!1,780,1e7)}},v={helper(s,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const a=new S({label:"Solar Sytem",currState:new y(new e(1,0,0),Math.PI/2).transform(b.clone()),simFunc:new h,color:["#FDB813","#B7B8B9","#c18f17","#287AB8","#c1440e","#d8ca9d","#ceb8b8","#ACE5EE","#5b5ddf"],transformations:[new g],radiusScale:20});this.sim=new f([a],{visType:"3D",controller:"ui",showTrails:!0,maxTrailLength:2e3,showDebugInfo:!0}),this.sim.start(s,800,800,1e7)}},B=({obj:s,name:t,...a})=>{const n="demo-"+t;return l.jsx("div",{children:l.jsx("div",{id:n,style:{width:"800px",height:"800px",position:"relative"},ref:T=>s.helper(n,T)})})};B.__docgenInfo={description:"",methods:[],displayName:"SolarSystem",props:{obj:{required:!0,tsType:{name:"SolarSystemSetup"},description:""},name:{required:!0,tsType:{name:"string"},description:""}}};const I={title:"Showcase/Solar System",component:B,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},o={args:{name:"Solar System",obj:v}},i={args:{name:"Solar System",obj:j}};var m,w,c;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`{ + args: { + name: "Solar System", + obj: solarSimulate + } +}`,...(c=(w=o.parameters)==null?void 0:w.docs)==null?void 0:c.source}}};var u,d,p;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`{ + args: { + name: "Solar System", + obj: solarRecorded + } +}`,...(p=(d=i.parameters)==null?void 0:d.docs)==null?void 0:p.source}}};const M=["Simulate","Recorded"];export{i as Recorded,o as Simulate,M as __namedExportsOrder,I as default}; diff --git a/docs/assets/SolarSystem.stories-B0JeMpZ-.js b/docs/assets/SolarSystem.stories-B0JeMpZ-.js deleted file mode 100644 index 0be15be..0000000 --- a/docs/assets/SolarSystem.stories-B0JeMpZ-.js +++ /dev/null @@ -1,6 +0,0 @@ -import{S as o}from"./Simulation-uzMF7En_.js";import{f as t}from"./Universe-BbLae_pC.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-DpKi-MhS.js";const l={title:"Showcase/Solar System",component:o,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"3D",universe:[t]}};var e,s,a;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`{ - args: { - storyName: "3D", - universe: [fig8] - } -}`,...(a=(s=r.parameters)==null?void 0:s.docs)==null?void 0:a.source}}};const S=["SolarSystem"];export{r as SolarSystem,S as __namedExportsOrder,l as default}; diff --git a/docs/assets/Sun-Earth-D4puCyOp.js b/docs/assets/Sun-Earth-D4puCyOp.js new file mode 100644 index 0000000..5bfb236 --- /dev/null +++ b/docs/assets/Sun-Earth-D4puCyOp.js @@ -0,0 +1,5 @@ +import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as r}from"./index-z5U8iC57.js";import{M as m,d as s,C as h}from"./index-DVskBQuG.js";import{SunEarthAnalemma as a}from"./Analemma.stories-DzEVcYAe.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-PvbTHax1.js";import"./Transformation-DxaXQl0Q.js";function n(e){const o={h1:"h1",p:"p",...r(),...e.components};return t.jsxs(t.Fragment,{children:[t.jsx(m,{title:"Showcase/Analemma/Sun-Earth"}),` +`,t.jsx(o.h1,{id:"sun-earth-analemma",children:"Sun-Earth Analemma"}),` +`,t.jsx(o.p,{children:"Analemma as seen from the Earth on the equator mid-day. Frame of reference transformations have been setup to replicate the axial tilt of the earth. Additionally, the frame is rotated smoothly (as opposed to every 24 hours) to smooth out the analemma curve. Use the controls below to change the axial tilt of the Earth and its effects on the shape of the analemma."}),` +`,t.jsx("center",{children:t.jsx(s,{of:a})}),` +`,t.jsx(h,{of:a})]})}function A(e={}){const{wrapper:o}={...r(),...e.components};return o?t.jsx(o,{...e,children:t.jsx(n,{...e})}):n(e)}export{A as default}; diff --git a/docs/assets/Sun-Earth-oVV_01QT.js b/docs/assets/Sun-Earth-oVV_01QT.js deleted file mode 100644 index 9069ff1..0000000 --- a/docs/assets/Sun-Earth-oVV_01QT.js +++ /dev/null @@ -1,4 +0,0 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as e}from"./index-z5U8iC57.js";import{M as a,d as s,C as i}from"./index-SQMR4-IU.js";import{SunEarthAnalemma as r}from"./Analemma.stories-D2TdEEue.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-DpKi-MhS.js";import"./Transformation-ClZa9c5r.js";function m(n){const o={h1:"h1",...e(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(a,{title:"Showcase/Analemma/Sun-Earth"}),` -`,t.jsx(o.h1,{id:"sun-earth-analemma",children:"Sun-Earth Analemma"}),` -`,t.jsx(s,{of:r}),` -`,t.jsx(i,{of:r})]})}function E(n={}){const{wrapper:o}={...e(),...n.components};return o?t.jsx(o,{...n,children:t.jsx(m,{...n})}):m(n)}export{E as default}; diff --git a/docs/assets/Sun-Mars-DbXrLb1Y.js b/docs/assets/Sun-Mars-DbXrLb1Y.js deleted file mode 100644 index 256415c..0000000 --- a/docs/assets/Sun-Mars-DbXrLb1Y.js +++ /dev/null @@ -1,4 +0,0 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as e}from"./index-z5U8iC57.js";import{M as s,d as a,C as i}from"./index-SQMR4-IU.js";import{SunMarsAnalemma as r}from"./Analemma.stories-D2TdEEue.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-DpKi-MhS.js";import"./Transformation-ClZa9c5r.js";function m(n){const o={h1:"h1",...e(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Showcase/Analemma/Sun-Mars"}),` -`,t.jsx(o.h1,{id:"sun-mars-analemma",children:"Sun-Mars Analemma"}),` -`,t.jsx(a,{of:r}),` -`,t.jsx(i,{of:r})]})}function A(n={}){const{wrapper:o}={...e(),...n.components};return o?t.jsx(o,{...n,children:t.jsx(m,{...n})}):m(n)}export{A as default}; diff --git a/docs/assets/Sun-Mars-DmrieDdh.js b/docs/assets/Sun-Mars-DmrieDdh.js new file mode 100644 index 0000000..de52066 --- /dev/null +++ b/docs/assets/Sun-Mars-DmrieDdh.js @@ -0,0 +1,5 @@ +import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as r}from"./index-z5U8iC57.js";import{M as m,d as s,C as i}from"./index-DVskBQuG.js";import{SunMarsAnalemma as a}from"./Analemma.stories-DzEVcYAe.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-PvbTHax1.js";import"./Transformation-DxaXQl0Q.js";function n(e){const o={h1:"h1",p:"p",...r(),...e.components};return t.jsxs(t.Fragment,{children:[t.jsx(m,{title:"Showcase/Analemma/Sun-Mars"}),` +`,t.jsx(o.h1,{id:"sun-mars-analemma",children:"Sun-Mars Analemma"}),` +`,t.jsx(o.p,{children:"Analemma as seen from Mars at the equator mid-day. Frame of reference transformations have been setup to replicate the axial tilt of Mars. Additionally, the frame is rotated smoothly to smooth out the analemma curve. Use the controls below to change the axial tilt of Mars and its effects on the shape of the analemma."}),` +`,t.jsx("center",{children:t.jsx(s,{of:a})}),` +`,t.jsx(i,{of:a})]})}function C(e={}){const{wrapper:o}={...r(),...e.components};return o?t.jsx(o,{...e,children:t.jsx(n,{...e})}):n(e)}export{C as default}; diff --git a/docs/assets/Trails-BexVBPOl.js b/docs/assets/Trails-BexVBPOl.js deleted file mode 100644 index 97222aa..0000000 --- a/docs/assets/Trails-BexVBPOl.js +++ /dev/null @@ -1,3 +0,0 @@ -import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as m}from"./index-z5U8iC57.js";import{M as s,d as i}from"./index-SQMR4-IU.js";import{ShowTrailsOff as e,ShowTrailsOn as a}from"./Trails.stories-DPdDrx42.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-uzMF7En_.js";import"./Universe-DpKi-MhS.js";import"./Universe-BbLae_pC.js";function n(t){return o.jsxs(o.Fragment,{children:[o.jsx(s,{title:"Visualize/Trails"}),` -`,o.jsx(i,{of:e,name:"ShowTrailsOff"}),` -`,o.jsx(i,{of:a,name:"ShowTrailsOn"})]})}function O(t={}){const{wrapper:r}={...m(),...t.components};return r?o.jsx(r,{...t,children:o.jsx(n,{...t})}):n()}export{O as default}; diff --git a/docs/assets/Trails-DH3u_s95.js b/docs/assets/Trails-DH3u_s95.js new file mode 100644 index 0000000..c1d28c5 --- /dev/null +++ b/docs/assets/Trails-DH3u_s95.js @@ -0,0 +1,22 @@ +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as o,d as s}from"./index-DVskBQuG.js";import{ShowTrailsOff as a,ShowTrailsOn as l}from"./Trails.stories-C5sFe_IA.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-DLuwJnRa.js";import"./Universe-PvbTHax1.js";function i(r){const n={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...t(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Visualize/Trails"}),` +`,e.jsx(n.h1,{id:"trails",children:"Trails"}),` +`,e.jsxs(n.p,{children:["Trails are the paths that objects take as they move through space. They can be shown or hidden using the ",e.jsx(n.code,{children:"showTrails"})," field when creating a ",e.jsx(n.strong,{children:"Simulation"})," object in the following way. Once simulation is running, trails can be toggled on or off using the UI controls or through code, when controller is set to ",e.jsx(n.code,{children:"ui"})," or ",e.jsx(n.code,{children:"code"})," respectively. Maximum trail length can also be set using the ",e.jsx(n.code,{children:"maxTrailLength"})," field, and this is the maximum number of points that will be tracked for all objects combined. Available in both 2D and 3D views."]}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + showTrails: true | false,\r + maxTrailLength: number,\r +}) +`})}),` +`,e.jsx(n.h2,{id:"off-default",children:"Off (default)"}),` +`,e.jsx(n.p,{children:"When set to false, trails are not shown."}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + showTrails: false\r +}) +`})}),` +`,e.jsx("center",{children:e.jsx(s,{of:a,name:"ShowTrailsOff"})}),` +`,e.jsx(n.h2,{id:"on",children:"On"}),` +`,e.jsx(n.p,{children:"When set to true, trails are shown."}),` +`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r + showTrails: true\r +}) +`})}),` +`,e.jsx("center",{children:e.jsx(s,{of:l,name:"ShowTrailsOn"})})]})}function b(r={}){const{wrapper:n}={...t(),...r.components};return n?e.jsx(n,{...r,children:e.jsx(i,{...r})}):i(r)}export{b as default}; diff --git a/docs/assets/Trails.stories-C5sFe_IA.js b/docs/assets/Trails.stories-C5sFe_IA.js new file mode 100644 index 0000000..d9d6f48 --- /dev/null +++ b/docs/assets/Trails.stories-C5sFe_IA.js @@ -0,0 +1,14 @@ +import{S as p,f as m}from"./Universe-DLuwJnRa.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PvbTHax1.js";const f={title:"Visualize/Trails",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"ShowTrailsOff",universe:[m],visType:"3D"}},s={args:{storyName:"ShowTrailsOn",universe:[m],visType:"3D",showTrails:!0}};var e,a,o;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`{ + args: { + storyName: 'ShowTrailsOff', + universe: [fig8], + visType: '3D' + } +}`,...(o=(a=r.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};var i,t,n;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{ + args: { + storyName: 'ShowTrailsOn', + universe: [fig8], + visType: '3D', + showTrails: true + } +}`,...(n=(t=s.parameters)==null?void 0:t.docs)==null?void 0:n.source}}};const g=["ShowTrailsOff","ShowTrailsOn"];export{r as ShowTrailsOff,s as ShowTrailsOn,g as __namedExportsOrder,f as default}; diff --git a/docs/assets/Trails.stories-DPdDrx42.js b/docs/assets/Trails.stories-DPdDrx42.js deleted file mode 100644 index dfd42be..0000000 --- a/docs/assets/Trails.stories-DPdDrx42.js +++ /dev/null @@ -1,14 +0,0 @@ -import{S as p}from"./Simulation-uzMF7En_.js";import{f as m}from"./Universe-BbLae_pC.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-DpKi-MhS.js";const g={title:"Visualize/Trails",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"ShowTrailsOff",universe:[m],visType:"3D"}},s={args:{storyName:"ShowTrailsOn",universe:[m],visType:"3D",showTrails:!0}};var e,a,o;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`{ - args: { - storyName: 'ShowTrailsOff', - universe: [fig8], - visType: '3D' - } -}`,...(o=(a=r.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};var i,t,n;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{ - args: { - storyName: 'ShowTrailsOn', - universe: [fig8], - visType: '3D', - showTrails: true - } -}`,...(n=(t=s.parameters)==null?void 0:t.docs)==null?void 0:n.source}}};const S=["ShowTrailsOff","ShowTrailsOn"];export{r as ShowTrailsOff,s as ShowTrailsOn,S as __namedExportsOrder,g as default}; diff --git a/docs/assets/Transformation-CqgN1WxT.js b/docs/assets/Transformation-CqgN1WxT.js new file mode 100644 index 0000000..5d887bb --- /dev/null +++ b/docs/assets/Transformation-CqgN1WxT.js @@ -0,0 +1,58 @@ +import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as a}from"./index-z5U8iC57.js";import{M as o}from"./index-DVskBQuG.js";import"./index-BBkUAzwr.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function t(r){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...a(),...r.components};return n.jsxs(n.Fragment,{children:[n.jsx(o,{title:"Define/Transformation"}),` +`,n.jsx(e.h1,{id:"transformation",children:"Transformation"}),` +`,n.jsxs(e.p,{children:["A ",n.jsx(e.strong,{children:"Transformation"})," object can be used to modify/transform the ",n.jsx(e.a,{href:"https://en.wikipedia.org/wiki/Frame_of_reference",rel:"nofollow",children:"frame of reference"})," of the nbody system. It has a ",n.jsx(e.code,{children:"transform"})," method that takes in a state and returns a new state with the updated frame of reference by modifying the position, velocity and acceleration of the bodies as necessary."]}),` +`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`export interface Transformation {\r + transform(state: State, deltaT: number): State;\r +} +`})}),` +`,n.jsxs(e.p,{children:["Full API reference can be found ",n.jsx(e.a,{href:"https://source-academy.github.io/nbody/api/interfaces/Transformation.html",rel:"nofollow",children:"here"}),"."]}),` +`,n.jsxs(e.ul,{children:[` +`,n.jsx(e.li,{children:n.jsx(e.a,{href:"#inbuilt-transformations",children:"Inbuilt Transformations"})}),` +`,n.jsx(e.li,{children:n.jsx(e.a,{href:"#javascript",children:"Javascript"})}),` +`,n.jsx(e.li,{children:n.jsx(e.a,{href:"#typescript",children:"Typescript"})}),` +`]}),` +`,n.jsx(e.h2,{id:"inbuilt-transformations",children:"Inbuilt Transformations"}),` +`,n.jsx(e.h3,{id:"body-center-transformation",children:"Body Center Transformation"}),` +`,n.jsx(e.p,{children:"A frame of reference transformation that uses the position of the ith body as the origin."}),` +`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-javascript",children:`new BodyCenterTransformation();\r +new BodyCenterTransformation(index); +`})}),` +`,n.jsx(e.h3,{id:"center-of-mass-transformation",children:"Center of Mass Transformation"}),` +`,n.jsx(e.p,{children:"A frame of reference transformation that uses the position of the center of mass of the system as the origin."}),` +`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-javascript",children:`new CoMTransformation(); +`})}),` +`,n.jsx(e.h3,{id:"rotate-transformation",children:"Rotate Transformation"}),` +`,n.jsx(e.p,{children:"A frame of reference transformation that rotates the frames around the provided axis by the provided angle."}),` +`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-javascript",children:`new RotateTransformation(new Vector3(0, 1, 0), Math.PI / 2); +`})}),` +`,n.jsx(e.h3,{id:"lambda-transformation",children:"Lambda Transformation"}),` +`,n.jsx(e.p,{children:"A frame of reference transformation that uses the given lambda/arrow/anonymous function to transform states."}),` +`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-javascript",children:`new LambdaTransformation((state, deltaT) => {\r + // your transformation logic here\r + return state;\r +}); +`})}),` +`,n.jsx(e.h2,{id:"javascript",children:"Javascript"}),` +`,n.jsx(e.p,{children:"You can define and configure your own transformation object in javascript with a transform method as follows"}),` +`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-javascript",children:`const customTransform = {\r + transform(state) {\r + const offset = state.bodies[0].position.clone();\r + state.bodies.forEach((b) => {\r + b.position.sub(offset);\r + });\r + return state;\r + }\r +} +`})}),` +`,n.jsx(e.h2,{id:"typescript",children:"Typescript"}),` +`,n.jsx(e.p,{children:"You can define and configure your own transformation object in typescript by implementing the Transformation interface as follows"}),` +`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`class CustomTransformation implements Transformation {\r + transform(state: State): State {\r + const offset = state.bodies[0].position.clone();\r + state.bodies.forEach((b) => {\r + b.position.sub(offset);\r + });\r + return state;\r + }\r +} +`})})]})}function j(r={}){const{wrapper:e}={...a(),...r.components};return e?n.jsx(e,{...r,children:n.jsx(t,{...r})}):t(r)}export{j as default}; diff --git a/docs/assets/Transformation-DmH4Ckgw.js b/docs/assets/Transformation-DmH4Ckgw.js deleted file mode 100644 index ce648d5..0000000 --- a/docs/assets/Transformation-DmH4Ckgw.js +++ /dev/null @@ -1,41 +0,0 @@ -import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as i}from"./index-SQMR4-IU.js";import"./index-BBkUAzwr.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...t(),...e.components};return n.jsxs(n.Fragment,{children:[n.jsx(i,{title:"Define/Transformation"}),` -`,n.jsx(r.h1,{id:"transformation",children:"Transformation"}),` -`,n.jsx(r.p,{children:"TODO"}),` -`,n.jsx(r.pre,{children:n.jsx(r.code,{className:"language-typescript",children:`export interface Transformation {\r - transform(state: State, deltaT: number): State;\r -} -`})}),` -`,n.jsxs(r.p,{children:["Full API reference can be found ",n.jsx(r.a,{href:"https://source-academy.github.io/nbody/api/interfaces/Transformation.html",rel:"nofollow",children:"here"}),"."]}),` -`,n.jsxs(r.ul,{children:[` -`,n.jsx(r.li,{children:n.jsx(r.a,{href:"#inbuilt-transformations",children:"Inbuilt Transformations"})}),` -`,n.jsx(r.li,{children:n.jsx(r.a,{href:"#javascript",children:"Javascript"})}),` -`,n.jsx(r.li,{children:n.jsx(r.a,{href:"#typescript",children:"Typescript"})}),` -`]}),` -`,n.jsx(r.h2,{id:"inbuilt-transformations",children:"Inbuilt Transformations"}),` -`,n.jsx(r.h3,{id:"body-center-transformation",children:"Body Center Transformation"}),` -`,n.jsx(r.p,{children:"TODO"}),` -`,n.jsx(r.pre,{children:n.jsx(r.code,{className:"language-javascript",children:`new BodyCenterTransformation(); -`})}),` -`,n.jsx(r.h3,{id:"center-of-mass-transformation",children:"Center of Mass Transformation"}),` -`,n.jsx(r.p,{children:"TODO"}),` -`,n.jsx(r.pre,{children:n.jsx(r.code,{className:"language-javascript",children:`new CoMTransformation(); -`})}),` -`,n.jsx(r.h3,{id:"rotate-transformation",children:"Rotate Transformation"}),` -`,n.jsx(r.p,{children:"TODO"}),` -`,n.jsx(r.pre,{children:n.jsx(r.code,{className:"language-javascript",children:`new RotateTransformation(new Vector3(0, 1, 0), Math.PI / 2); -`})}),` -`,n.jsx(r.h3,{id:"lambda-transformation",children:"Lambda Transformation"}),` -`,n.jsx(r.p,{children:"TODO"}),` -`,n.jsx(r.pre,{children:n.jsx(r.code,{className:"language-javascript",children:`new LambdaTransformation((state, deltaT) => {\r - // your transformation logic here\r - return state;\r -}); -`})}),` -`,n.jsx(r.h2,{id:"javascript",children:"Javascript"}),` -`,n.jsx(r.p,{children:"You can define and configure your own transformation object in javascript with a transform method as follows"}),` -`,n.jsx(r.pre,{children:n.jsx(r.code,{className:"language-javascript",children:`TODO -`})}),` -`,n.jsx(r.h2,{id:"typescript",children:"Typescript"}),` -`,n.jsx(r.p,{children:"You can define and configure your own transformation object in typescript by implementing the Transformation interface as follows"}),` -`,n.jsx(r.pre,{children:n.jsx(r.code,{className:"language-typescript",children:`TODO -`})})]})}function f(e={}){const{wrapper:r}={...t(),...e.components};return r?n.jsx(r,{...e,children:n.jsx(a,{...e})}):a(e)}export{f as default}; diff --git a/docs/assets/Transformation-ClZa9c5r.js b/docs/assets/Transformation-DxaXQl0Q.js similarity index 95% rename from docs/assets/Transformation-ClZa9c5r.js rename to docs/assets/Transformation-DxaXQl0Q.js index 5d8003e..60e0606 100644 --- a/docs/assets/Transformation-ClZa9c5r.js +++ b/docs/assets/Transformation-DxaXQl0Q.js @@ -1 +1 @@ -import{V as t}from"./Universe-DpKi-MhS.js";class r{constructor(i=0){this.index=i}transform(i){const s=i.bodies[this.index].position.clone();return i.bodies.forEach(o=>{o.position.sub(s)}),i}}class l{transform(i){let s=0,o=new t;return i.bodies.forEach(n=>{s+=n.mass,o.add(n.position.clone().multiplyScalar(n.mass))}),o.divideScalar(s),i.bodies.forEach(n=>{n.position.sub(o)}),i}}class c{constructor(i,s){this.axis=i,this.angle=s}transform(i){return i.bodies.forEach(s=>{s.position.applyAxisAngle(this.axis,this.angle),s.velocity.applyAxisAngle(this.axis,this.angle),s.acceleration.applyAxisAngle(this.axis,this.angle)}),i}}class p{constructor(i,s=0){this.axis=i,this.index=s}transform(i){const s=i.bodies[this.index].position.clone().angleTo(this.axis.clone()),o=i.bodies[this.index].position.clone().cross(this.axis.clone()).normalize();return i.bodies.forEach(n=>{n.position.applyAxisAngle(o.clone(),s),n.velocity.applyAxisAngle(o.clone(),s),n.acceleration.applyAxisAngle(o.clone(),s)}),i}}class h{constructor(i,s){this.axis=i,this.revolutionTime=s}transform(i,s){const o=-(s/this.revolutionTime)*Math.PI*2;return i.bodies.forEach(n=>{n.position.applyAxisAngle(this.axis,o),n.velocity.applyAxisAngle(this.axis,o),n.acceleration.applyAxisAngle(this.axis,o)}),i}}export{r as B,l as C,p as P,c as R,h as T}; +import{V as t}from"./Universe-PvbTHax1.js";class r{constructor(i=0){this.index=i}transform(i){const s=i.bodies[this.index].position.clone();return i.bodies.forEach(o=>{o.position.sub(s)}),i}}class l{transform(i){let s=0,o=new t;return i.bodies.forEach(n=>{s+=n.mass,o.add(n.position.clone().multiplyScalar(n.mass))}),o.divideScalar(s),i.bodies.forEach(n=>{n.position.sub(o)}),i}}class c{constructor(i,s){this.axis=i,this.angle=s}transform(i){return i.bodies.forEach(s=>{s.position.applyAxisAngle(this.axis,this.angle),s.velocity.applyAxisAngle(this.axis,this.angle),s.acceleration.applyAxisAngle(this.axis,this.angle)}),i}}class p{constructor(i,s=0){this.axis=i,this.index=s}transform(i){const s=i.bodies[this.index].position.clone().angleTo(this.axis.clone()),o=i.bodies[this.index].position.clone().cross(this.axis.clone()).normalize();return i.bodies.forEach(n=>{n.position.applyAxisAngle(o.clone(),s),n.velocity.applyAxisAngle(o.clone(),s),n.acceleration.applyAxisAngle(o.clone(),s)}),i}}class h{constructor(i,s){this.axis=i,this.revolutionTime=s}transform(i,s){const o=-(s/this.revolutionTime)*Math.PI*2;return i.bodies.forEach(n=>{n.position.applyAxisAngle(this.axis,o),n.velocity.applyAxisAngle(this.axis,o),n.acceleration.applyAxisAngle(this.axis,o)}),i}}export{r as B,l as C,p as P,c as R,h as T}; diff --git a/docs/assets/Universe-BbLae_pC.js b/docs/assets/Universe-BbLae_pC.js deleted file mode 100644 index 34905cb..0000000 --- a/docs/assets/Universe-BbLae_pC.js +++ /dev/null @@ -1 +0,0 @@ -import{U as w,a,C as n,V as e,R as s,G as i,b as t}from"./Universe-DpKi-MhS.js";const o=new w({label:"Fig 8 Universe",currState:new a([new n("Body 1",1,1,new e(-.97000436,.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 2",1,1,new e(.97000436,-.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 3",1,1,new e(0,0,0),new e(-2*.466203685,-2*.43236573,0),new e(0,0,0))]),simFunc:new s(new i(1),[1,2,2,1])}),l=[o,new w({label:"Fig 8 Universe 2",currState:new a([new n("Body 1",1,1,new e(-.97000436,.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 2",1,1,new e(.97000436,-.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 3",1,1,new e(0,0,0),new e(-2*.466203685,-2*.43236573,0),new e(0,0,0))]),simFunc:new t(new i(1)),color:"red"})];export{o as f,l as m}; diff --git a/docs/assets/Universe-DLuwJnRa.js b/docs/assets/Universe-DLuwJnRa.js new file mode 100644 index 0000000..ee9595f --- /dev/null +++ b/docs/assets/Universe-DLuwJnRa.js @@ -0,0 +1 @@ +import{j as B}from"./jsx-runtime-DRTy3Uxn.js";import{R as D,r as F}from"./index-BBkUAzwr.js";import{a as U,U as r,S as u,C as n,V as e,R,G as i,b as I}from"./Universe-PvbTHax1.js";const h=({storyName:o="default",universe:d=[],visType:m="2D",record:p=!1,looped:f=!0,controller:c="none",showTrails:w=!1,showDebugInfo:y=!1,maxFrameRate:v=-1,maxTrailLength:b=100,width:l=400,callback:T=s=>()=>{},playSpeed:V=1,startPaused:S=!1,recordFor:g=1,recordSpeed:q=1,...N})=>{const s="demo-"+o,[a,x]=D.useState(null);return a===null&&x(new U(d.map(t=>t.clone()),{visType:m,record:p,looped:f,controller:c,showTrails:w,showDebugInfo:y,maxFrameRate:v,maxTrailLength:b})),F.useEffect(()=>{a==null||a.start(s,l,l,V,S,g,q);let t=()=>{};return a&&(t=T(a)),()=>{t(),a==null||a.stop()}},[]),B.jsx("div",{id:s,style:{width:l,height:l,position:"relative"}})};h.__docgenInfo={description:"Primary UI component for user interaction",methods:[],displayName:"Simulation",props:{storyName:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"default"',computed:!1}},universe:{required:!1,tsType:{name:"Array",elements:[{name:"Universe"}],raw:"Universe[]"},description:"",defaultValue:{value:"[]",computed:!1}},visType:{required:!1,tsType:{name:"union",raw:"'2D' | '3D'",elements:[{name:"literal",value:"'2D'"},{name:"literal",value:"'3D'"}]},description:"",defaultValue:{value:'"2D"',computed:!1}},record:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},looped:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},controller:{required:!1,tsType:{name:"union",raw:"'ui' | 'code' | 'none'",elements:[{name:"literal",value:"'ui'"},{name:"literal",value:"'code'"},{name:"literal",value:"'none'"}]},description:"",defaultValue:{value:'"none"',computed:!1}},showTrails:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},showDebugInfo:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},maxFrameRate:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"-1",computed:!1}},maxTrailLength:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"100",computed:!1}},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},callback:{required:!1,tsType:{name:"signature",type:"function",raw:"(simulation: NbodySimulation) => () => void",signature:{arguments:[{type:{name:"NbodySimulation"},name:"simulation"}],return:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}}}},description:"",defaultValue:{value:"(sim) => () => {}",computed:!1}},playSpeed:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},startPaused:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},recordFor:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},recordSpeed:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}}}};const E=new r({label:"Fig 8 Universe",currState:new u([new n("Body 1",1,.1,new e(-.97000436,.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 2",1,.1,new e(.97000436,-.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 3",1,.1,new e(0,0,0),new e(-2*.466203685,-2*.43236573,0),new e(0,0,0))]),simFunc:new R(new i(1),[1,2,2,1])}),G=[E,new r({label:"Fig 8 Universe 2",currState:new u([new n("Body 1",1,.1,new e(-.97000436,.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 2",1,.1,new e(.97000436,-.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 3",1,.1,new e(0,0,0),new e(-2*.466203685,-2*.43236573,0),new e(0,0,0))]),simFunc:new I(new i(1)),color:"red"})];export{h as S,E as f,G as m}; diff --git a/docs/assets/Universe-DpKi-MhS.js b/docs/assets/Universe-PvbTHax1.js similarity index 88% rename from docs/assets/Universe-DpKi-MhS.js rename to docs/assets/Universe-PvbTHax1.js index d312404..e7f4672 100644 --- a/docs/assets/Universe-DpKi-MhS.js +++ b/docs/assets/Universe-PvbTHax1.js @@ -1,12 +1,12 @@ -import{g as Uy,c as R3}from"./index-BBkUAzwr.js";/** +import{g as By,c as P3}from"./index-BBkUAzwr.js";/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const W0="163",Rh={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Dh={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},D3=0,im=1,I3=2,Hy=1,F3=2,mf=3,Nu=0,Gs=1,yf=2,vc=0,nv=1,am=2,om=3,sm=4,z3=5,$c=100,k3=101,O3=102,N3=103,B3=104,U3=200,H3=201,V3=202,G3=203,I0=204,F0=205,W3=206,Y3=207,X3=208,Z3=209,j3=210,K3=211,J3=212,Q3=213,$3=214,q3=0,tw=1,ew=2,ap=3,rw=4,nw=5,iw=6,aw=7,Vy=0,ow=1,sw=2,dc=0,lw=1,uw=2,fw=3,cw=4,hw=5,vw=6,dw=7,Gy=300,sv=301,lv=302,z0=303,k0=304,vp=306,O0=1e3,th=1001,N0=1002,Il=1003,pw=1004,Ld=1005,fu=1006,$p=1007,eh=1008,pc=1009,gw=1010,mw=1011,Wy=1012,Yy=1013,uv=1014,hc=1015,op=1016,Xy=1017,Zy=1018,Jv=1020,yw=35902,xw=1021,bw=1022,zu=1023,ww=1024,Tw=1025,iv=1026,Zv=1027,Aw=1028,jy=1029,Mw=1030,Ky=1031,Jy=1033,qp=33776,t0=33777,e0=33778,r0=33779,lm=35840,um=35841,fm=35842,cm=35843,Qy=36196,hm=37492,vm=37496,dm=37808,pm=37809,gm=37810,mm=37811,ym=37812,xm=37813,bm=37814,wm=37815,Tm=37816,Am=37817,Mm=37818,Sm=37819,Em=37820,_m=37821,n0=36492,Cm=36494,Lm=36495,Sw=36283,Pm=36284,Rm=36285,Dm=36286,Ew=3200,_w=3201,Cw=0,Lw=1,cc="",Iu="srgb",mc="srgb-linear",Y0="display-p3",dp="display-p3-linear",sp="linear",Ya="srgb",lp="rec709",up="p3",Ih=7680,Im=519,Pw=512,Rw=513,Dw=514,$y=515,Iw=516,Fw=517,zw=518,kw=519,B0=35044,Fm="300 es",xf=2e3,fp=2001;class nh{addEventListener(F,q){this._listeners===void 0&&(this._listeners={});const lt=this._listeners;lt[F]===void 0&&(lt[F]=[]),lt[F].indexOf(q)===-1&<[F].push(q)}hasEventListener(F,q){if(this._listeners===void 0)return!1;const lt=this._listeners;return lt[F]!==void 0&<[F].indexOf(q)!==-1}removeEventListener(F,q){if(this._listeners===void 0)return;const Dt=this._listeners[F];if(Dt!==void 0){const Zt=Dt.indexOf(q);Zt!==-1&&Dt.splice(Zt,1)}}dispatchEvent(F){if(this._listeners===void 0)return;const lt=this._listeners[F.type];if(lt!==void 0){F.target=this;const Dt=lt.slice(0);for(let Zt=0,G=Dt.length;Zt>8&255]+fs[_t>>16&255]+fs[_t>>24&255]+"-"+fs[F&255]+fs[F>>8&255]+"-"+fs[F>>16&15|64]+fs[F>>24&255]+"-"+fs[q&63|128]+fs[q>>8&255]+"-"+fs[q>>16&255]+fs[q>>24&255]+fs[lt&255]+fs[lt>>8&255]+fs[lt>>16&255]+fs[lt>>24&255]).toLowerCase()}function hs(_t,F,q){return Math.max(F,Math.min(q,_t))}function X0(_t,F){return(_t%F+F)%F}function Ow(_t,F,q,lt,Dt){return lt+(_t-F)*(Dt-lt)/(q-F)}function Nw(_t,F,q){return _t!==F?(q-_t)/(F-_t):0}function Xv(_t,F,q){return(1-q)*_t+q*F}function Bw(_t,F,q,lt){return Xv(_t,F,1-Math.exp(-q*lt))}function Uw(_t,F=1){return F-Math.abs(X0(_t,F*2)-F)}function Hw(_t,F,q){return _t<=F?0:_t>=q?1:(_t=(_t-F)/(q-F),_t*_t*(3-2*_t))}function Vw(_t,F,q){return _t<=F?0:_t>=q?1:(_t=(_t-F)/(q-F),_t*_t*_t*(_t*(_t*6-15)+10))}function Gw(_t,F){return _t+Math.floor(Math.random()*(F-_t+1))}function Ww(_t,F){return _t+Math.random()*(F-_t)}function Yw(_t){return _t*(.5-Math.random())}function Xw(_t){_t!==void 0&&(zm=_t);let F=zm+=1831565813;return F=Math.imul(F^F>>>15,F|1),F^=F+Math.imul(F^F>>>7,F|61),((F^F>>>14)>>>0)/4294967296}function Zw(_t){return _t*Yv}function jw(_t){return _t*jv}function Kw(_t){return(_t&_t-1)===0&&_t!==0}function Jw(_t){return Math.pow(2,Math.ceil(Math.log(_t)/Math.LN2))}function Qw(_t){return Math.pow(2,Math.floor(Math.log(_t)/Math.LN2))}function $w(_t,F,q,lt,Dt){const Zt=Math.cos,G=Math.sin,U=Zt(q/2),t=G(q/2),g=Zt((F+lt)/2),C=G((F+lt)/2),i=Zt((F-lt)/2),S=G((F-lt)/2),x=Zt((lt-F)/2),v=G((lt-F)/2);switch(Dt){case"XYX":_t.set(U*C,t*i,t*S,U*g);break;case"YZY":_t.set(t*S,U*C,t*i,U*g);break;case"ZXZ":_t.set(t*i,t*S,U*C,U*g);break;case"XZX":_t.set(U*C,t*v,t*x,U*g);break;case"YXY":_t.set(t*x,U*C,t*v,U*g);break;case"ZYZ":_t.set(t*v,t*x,U*C,U*g);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+Dt)}}function cu(_t,F){switch(F.constructor){case Float32Array:return _t;case Uint32Array:return _t/4294967295;case Uint16Array:return _t/65535;case Uint8Array:return _t/255;case Int32Array:return Math.max(_t/2147483647,-1);case Int16Array:return Math.max(_t/32767,-1);case Int8Array:return Math.max(_t/127,-1);default:throw new Error("Invalid component type.")}}function Pa(_t,F){switch(F.constructor){case Float32Array:return _t;case Uint32Array:return Math.round(_t*4294967295);case Uint16Array:return Math.round(_t*65535);case Uint8Array:return Math.round(_t*255);case Int32Array:return Math.round(_t*2147483647);case Int16Array:return Math.round(_t*32767);case Int8Array:return Math.round(_t*127);default:throw new Error("Invalid component type.")}}const qw={DEG2RAD:Yv,RAD2DEG:jv,generateUUID:bf,clamp:hs,euclideanModulo:X0,mapLinear:Ow,inverseLerp:Nw,lerp:Xv,damp:Bw,pingpong:Uw,smoothstep:Hw,smootherstep:Vw,randInt:Gw,randFloat:Ww,randFloatSpread:Yw,seededRandom:Xw,degToRad:Zw,radToDeg:jw,isPowerOfTwo:Kw,ceilPowerOfTwo:Jw,floorPowerOfTwo:Qw,setQuaternionFromProperEuler:$w,normalize:Pa,denormalize:cu};class Wi{constructor(F=0,q=0){Wi.prototype.isVector2=!0,this.x=F,this.y=q}get width(){return this.x}set width(F){this.x=F}get height(){return this.y}set height(F){this.y=F}set(F,q){return this.x=F,this.y=q,this}setScalar(F){return this.x=F,this.y=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y)}copy(F){return this.x=F.x,this.y=F.y,this}add(F){return this.x+=F.x,this.y+=F.y,this}addScalar(F){return this.x+=F,this.y+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this}subScalar(F){return this.x-=F,this.y-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this}multiply(F){return this.x*=F.x,this.y*=F.y,this}multiplyScalar(F){return this.x*=F,this.y*=F,this}divide(F){return this.x/=F.x,this.y/=F.y,this}divideScalar(F){return this.multiplyScalar(1/F)}applyMatrix3(F){const q=this.x,lt=this.y,Dt=F.elements;return this.x=Dt[0]*q+Dt[3]*lt+Dt[6],this.y=Dt[1]*q+Dt[4]*lt+Dt[7],this}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this}clampLength(F,q){const lt=this.length();return this.divideScalar(lt||1).multiplyScalar(Math.max(F,Math.min(q,lt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(F){return this.x*F.x+this.y*F.y}cross(F){return this.x*F.y-this.y*F.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(F){const q=Math.sqrt(this.lengthSq()*F.lengthSq());if(q===0)return Math.PI/2;const lt=this.dot(F)/q;return Math.acos(hs(lt,-1,1))}distanceTo(F){return Math.sqrt(this.distanceToSquared(F))}distanceToSquared(F){const q=this.x-F.x,lt=this.y-F.y;return q*q+lt*lt}manhattanDistanceTo(F){return Math.abs(this.x-F.x)+Math.abs(this.y-F.y)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this}lerpVectors(F,q,lt){return this.x=F.x+(q.x-F.x)*lt,this.y=F.y+(q.y-F.y)*lt,this}equals(F){return F.x===this.x&&F.y===this.y}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this}rotateAround(F,q){const lt=Math.cos(q),Dt=Math.sin(q),Zt=this.x-F.x,G=this.y-F.y;return this.x=Zt*lt-G*Dt+F.x,this.y=Zt*Dt+G*lt+F.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class fa{constructor(F,q,lt,Dt,Zt,G,U,t,g){fa.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],F!==void 0&&this.set(F,q,lt,Dt,Zt,G,U,t,g)}set(F,q,lt,Dt,Zt,G,U,t,g){const C=this.elements;return C[0]=F,C[1]=Dt,C[2]=U,C[3]=q,C[4]=Zt,C[5]=t,C[6]=lt,C[7]=G,C[8]=g,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(F){const q=this.elements,lt=F.elements;return q[0]=lt[0],q[1]=lt[1],q[2]=lt[2],q[3]=lt[3],q[4]=lt[4],q[5]=lt[5],q[6]=lt[6],q[7]=lt[7],q[8]=lt[8],this}extractBasis(F,q,lt){return F.setFromMatrix3Column(this,0),q.setFromMatrix3Column(this,1),lt.setFromMatrix3Column(this,2),this}setFromMatrix4(F){const q=F.elements;return this.set(q[0],q[4],q[8],q[1],q[5],q[9],q[2],q[6],q[10]),this}multiply(F){return this.multiplyMatrices(this,F)}premultiply(F){return this.multiplyMatrices(F,this)}multiplyMatrices(F,q){const lt=F.elements,Dt=q.elements,Zt=this.elements,G=lt[0],U=lt[3],t=lt[6],g=lt[1],C=lt[4],i=lt[7],S=lt[2],x=lt[5],v=lt[8],p=Dt[0],r=Dt[3],e=Dt[6],a=Dt[1],n=Dt[4],f=Dt[7],c=Dt[2],l=Dt[5],m=Dt[8];return Zt[0]=G*p+U*a+t*c,Zt[3]=G*r+U*n+t*l,Zt[6]=G*e+U*f+t*m,Zt[1]=g*p+C*a+i*c,Zt[4]=g*r+C*n+i*l,Zt[7]=g*e+C*f+i*m,Zt[2]=S*p+x*a+v*c,Zt[5]=S*r+x*n+v*l,Zt[8]=S*e+x*f+v*m,this}multiplyScalar(F){const q=this.elements;return q[0]*=F,q[3]*=F,q[6]*=F,q[1]*=F,q[4]*=F,q[7]*=F,q[2]*=F,q[5]*=F,q[8]*=F,this}determinant(){const F=this.elements,q=F[0],lt=F[1],Dt=F[2],Zt=F[3],G=F[4],U=F[5],t=F[6],g=F[7],C=F[8];return q*G*C-q*U*g-lt*Zt*C+lt*U*t+Dt*Zt*g-Dt*G*t}invert(){const F=this.elements,q=F[0],lt=F[1],Dt=F[2],Zt=F[3],G=F[4],U=F[5],t=F[6],g=F[7],C=F[8],i=C*G-U*g,S=U*t-C*Zt,x=g*Zt-G*t,v=q*i+lt*S+Dt*x;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/v;return F[0]=i*p,F[1]=(Dt*g-C*lt)*p,F[2]=(U*lt-Dt*G)*p,F[3]=S*p,F[4]=(C*q-Dt*t)*p,F[5]=(Dt*Zt-U*q)*p,F[6]=x*p,F[7]=(lt*t-g*q)*p,F[8]=(G*q-lt*Zt)*p,this}transpose(){let F;const q=this.elements;return F=q[1],q[1]=q[3],q[3]=F,F=q[2],q[2]=q[6],q[6]=F,F=q[5],q[5]=q[7],q[7]=F,this}getNormalMatrix(F){return this.setFromMatrix4(F).invert().transpose()}transposeIntoArray(F){const q=this.elements;return F[0]=q[0],F[1]=q[3],F[2]=q[6],F[3]=q[1],F[4]=q[4],F[5]=q[7],F[6]=q[2],F[7]=q[5],F[8]=q[8],this}setUvTransform(F,q,lt,Dt,Zt,G,U){const t=Math.cos(Zt),g=Math.sin(Zt);return this.set(lt*t,lt*g,-lt*(t*G+g*U)+G+F,-Dt*g,Dt*t,-Dt*(-g*G+t*U)+U+q,0,0,1),this}scale(F,q){return this.premultiply(i0.makeScale(F,q)),this}rotate(F){return this.premultiply(i0.makeRotation(-F)),this}translate(F,q){return this.premultiply(i0.makeTranslation(F,q)),this}makeTranslation(F,q){return F.isVector2?this.set(1,0,F.x,0,1,F.y,0,0,1):this.set(1,0,F,0,1,q,0,0,1),this}makeRotation(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(q,-lt,0,lt,q,0,0,0,1),this}makeScale(F,q){return this.set(F,0,0,0,q,0,0,0,1),this}equals(F){const q=this.elements,lt=F.elements;for(let Dt=0;Dt<9;Dt++)if(q[Dt]!==lt[Dt])return!1;return!0}fromArray(F,q=0){for(let lt=0;lt<9;lt++)this.elements[lt]=F[lt+q];return this}toArray(F=[],q=0){const lt=this.elements;return F[q]=lt[0],F[q+1]=lt[1],F[q+2]=lt[2],F[q+3]=lt[3],F[q+4]=lt[4],F[q+5]=lt[5],F[q+6]=lt[6],F[q+7]=lt[7],F[q+8]=lt[8],F}clone(){return new this.constructor().fromArray(this.elements)}}const i0=new fa;function qy(_t){for(let F=_t.length-1;F>=0;--F)if(_t[F]>=65535)return!0;return!1}function cp(_t){return document.createElementNS("http://www.w3.org/1999/xhtml",_t)}function t2(){const _t=cp("canvas");return _t.style.display="block",_t}const km={};function t1(_t){_t in km||(km[_t]=!0,console.warn(_t))}const Om=new fa().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Nm=new fa().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Pd={[mc]:{transfer:sp,primaries:lp,toReference:_t=>_t,fromReference:_t=>_t},[Iu]:{transfer:Ya,primaries:lp,toReference:_t=>_t.convertSRGBToLinear(),fromReference:_t=>_t.convertLinearToSRGB()},[dp]:{transfer:sp,primaries:up,toReference:_t=>_t.applyMatrix3(Nm),fromReference:_t=>_t.applyMatrix3(Om)},[Y0]:{transfer:Ya,primaries:up,toReference:_t=>_t.convertSRGBToLinear().applyMatrix3(Nm),fromReference:_t=>_t.applyMatrix3(Om).convertLinearToSRGB()}},e2=new Set([mc,dp]),Fa={enabled:!0,_workingColorSpace:mc,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(_t){if(!e2.has(_t))throw new Error(`Unsupported working color space, "${_t}".`);this._workingColorSpace=_t},convert:function(_t,F,q){if(this.enabled===!1||F===q||!F||!q)return _t;const lt=Pd[F].toReference,Dt=Pd[q].fromReference;return Dt(lt(_t))},fromWorkingColorSpace:function(_t,F){return this.convert(_t,this._workingColorSpace,F)},toWorkingColorSpace:function(_t,F){return this.convert(_t,F,this._workingColorSpace)},getPrimaries:function(_t){return Pd[_t].primaries},getTransfer:function(_t){return _t===cc?sp:Pd[_t].transfer}};function av(_t){return _t<.04045?_t*.0773993808:Math.pow(_t*.9478672986+.0521327014,2.4)}function a0(_t){return _t<.0031308?_t*12.92:1.055*Math.pow(_t,.41666)-.055}let Fh;class r2{static getDataURL(F){if(/^data:/i.test(F.src)||typeof HTMLCanvasElement>"u")return F.src;let q;if(F instanceof HTMLCanvasElement)q=F;else{Fh===void 0&&(Fh=cp("canvas")),Fh.width=F.width,Fh.height=F.height;const lt=Fh.getContext("2d");F instanceof ImageData?lt.putImageData(F,0,0):lt.drawImage(F,0,0,F.width,F.height),q=Fh}return q.width>2048||q.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",F),q.toDataURL("image/jpeg",.6)):q.toDataURL("image/png")}static sRGBToLinear(F){if(typeof HTMLImageElement<"u"&&F instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&F instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&F instanceof ImageBitmap){const q=cp("canvas");q.width=F.width,q.height=F.height;const lt=q.getContext("2d");lt.drawImage(F,0,0,F.width,F.height);const Dt=lt.getImageData(0,0,F.width,F.height),Zt=Dt.data;for(let G=0;G0&&(lt.userData=this.userData),q||(F.textures[this.uuid]=lt),lt}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(F){if(this.mapping!==Gy)return F;if(F.applyMatrix3(this.matrix),F.x<0||F.x>1)switch(this.wrapS){case O0:F.x=F.x-Math.floor(F.x);break;case th:F.x=F.x<0?0:1;break;case N0:Math.abs(Math.floor(F.x)%2)===1?F.x=Math.ceil(F.x)-F.x:F.x=F.x-Math.floor(F.x);break}if(F.y<0||F.y>1)switch(this.wrapT){case O0:F.y=F.y-Math.floor(F.y);break;case th:F.y=F.y<0?0:1;break;case N0:Math.abs(Math.floor(F.y)%2)===1?F.y=Math.ceil(F.y)-F.y:F.y=F.y-Math.floor(F.y);break}return this.flipY&&(F.y=1-F.y),F}set needsUpdate(F){F===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(F){F===!0&&this.pmremVersion++}}Es.DEFAULT_IMAGE=null;Es.DEFAULT_MAPPING=Gy;Es.DEFAULT_ANISOTROPY=1;class No{constructor(F=0,q=0,lt=0,Dt=1){No.prototype.isVector4=!0,this.x=F,this.y=q,this.z=lt,this.w=Dt}get width(){return this.z}set width(F){this.z=F}get height(){return this.w}set height(F){this.w=F}set(F,q,lt,Dt){return this.x=F,this.y=q,this.z=lt,this.w=Dt,this}setScalar(F){return this.x=F,this.y=F,this.z=F,this.w=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setZ(F){return this.z=F,this}setW(F){return this.w=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;case 2:this.z=q;break;case 3:this.w=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(F){return this.x=F.x,this.y=F.y,this.z=F.z,this.w=F.w!==void 0?F.w:1,this}add(F){return this.x+=F.x,this.y+=F.y,this.z+=F.z,this.w+=F.w,this}addScalar(F){return this.x+=F,this.y+=F,this.z+=F,this.w+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this.z=F.z+q.z,this.w=F.w+q.w,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this.z+=F.z*q,this.w+=F.w*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this.z-=F.z,this.w-=F.w,this}subScalar(F){return this.x-=F,this.y-=F,this.z-=F,this.w-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this.z=F.z-q.z,this.w=F.w-q.w,this}multiply(F){return this.x*=F.x,this.y*=F.y,this.z*=F.z,this.w*=F.w,this}multiplyScalar(F){return this.x*=F,this.y*=F,this.z*=F,this.w*=F,this}applyMatrix4(F){const q=this.x,lt=this.y,Dt=this.z,Zt=this.w,G=F.elements;return this.x=G[0]*q+G[4]*lt+G[8]*Dt+G[12]*Zt,this.y=G[1]*q+G[5]*lt+G[9]*Dt+G[13]*Zt,this.z=G[2]*q+G[6]*lt+G[10]*Dt+G[14]*Zt,this.w=G[3]*q+G[7]*lt+G[11]*Dt+G[15]*Zt,this}divideScalar(F){return this.multiplyScalar(1/F)}setAxisAngleFromQuaternion(F){this.w=2*Math.acos(F.w);const q=Math.sqrt(1-F.w*F.w);return q<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=F.x/q,this.y=F.y/q,this.z=F.z/q),this}setAxisAngleFromRotationMatrix(F){let q,lt,Dt,Zt;const t=F.elements,g=t[0],C=t[4],i=t[8],S=t[1],x=t[5],v=t[9],p=t[2],r=t[6],e=t[10];if(Math.abs(C-S)<.01&&Math.abs(i-p)<.01&&Math.abs(v-r)<.01){if(Math.abs(C+S)<.1&&Math.abs(i+p)<.1&&Math.abs(v+r)<.1&&Math.abs(g+x+e-3)<.1)return this.set(1,0,0,0),this;q=Math.PI;const n=(g+1)/2,f=(x+1)/2,c=(e+1)/2,l=(C+S)/4,m=(i+p)/4,h=(v+r)/4;return n>f&&n>c?n<.01?(lt=0,Dt=.707106781,Zt=.707106781):(lt=Math.sqrt(n),Dt=l/lt,Zt=m/lt):f>c?f<.01?(lt=.707106781,Dt=0,Zt=.707106781):(Dt=Math.sqrt(f),lt=l/Dt,Zt=h/Dt):c<.01?(lt=.707106781,Dt=.707106781,Zt=0):(Zt=Math.sqrt(c),lt=m/Zt,Dt=h/Zt),this.set(lt,Dt,Zt,q),this}let a=Math.sqrt((r-v)*(r-v)+(i-p)*(i-p)+(S-C)*(S-C));return Math.abs(a)<.001&&(a=1),this.x=(r-v)/a,this.y=(i-p)/a,this.z=(S-C)/a,this.w=Math.acos((g+x+e-1)/2),this}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this.z=Math.min(this.z,F.z),this.w=Math.min(this.w,F.w),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this.z=Math.max(this.z,F.z),this.w=Math.max(this.w,F.w),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this.z=Math.max(F.z,Math.min(q.z,this.z)),this.w=Math.max(F.w,Math.min(q.w,this.w)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this.z=Math.max(F,Math.min(q,this.z)),this.w=Math.max(F,Math.min(q,this.w)),this}clampLength(F,q){const lt=this.length();return this.divideScalar(lt||1).multiplyScalar(Math.max(F,Math.min(q,lt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z+this.w*F.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this.z+=(F.z-this.z)*q,this.w+=(F.w-this.w)*q,this}lerpVectors(F,q,lt){return this.x=F.x+(q.x-F.x)*lt,this.y=F.y+(q.y-F.y)*lt,this.z=F.z+(q.z-F.z)*lt,this.w=F.w+(q.w-F.w)*lt,this}equals(F){return F.x===this.x&&F.y===this.y&&F.z===this.z&&F.w===this.w}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this.z=F[q+2],this.w=F[q+3],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F[q+2]=this.z,F[q+3]=this.w,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this.z=F.getZ(q),this.w=F.getW(q),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class a2 extends nh{constructor(F=1,q=1,lt={}){super(),this.isRenderTarget=!0,this.width=F,this.height=q,this.depth=1,this.scissor=new No(0,0,F,q),this.scissorTest=!1,this.viewport=new No(0,0,F,q);const Dt={width:F,height:q,depth:1};lt=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:fu,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0,count:1},lt);const Zt=new Es(Dt,lt.mapping,lt.wrapS,lt.wrapT,lt.magFilter,lt.minFilter,lt.format,lt.type,lt.anisotropy,lt.colorSpace);Zt.flipY=!1,Zt.generateMipmaps=lt.generateMipmaps,Zt.internalFormat=lt.internalFormat,this.textures=[];const G=lt.count;for(let U=0;U=0?1:-1,n=1-e*e;if(n>Number.EPSILON){const c=Math.sqrt(n),l=Math.atan2(c,e*a);r=Math.sin(r*l)/c,U=Math.sin(U*l)/c}const f=U*a;if(t=t*r+S*f,g=g*r+x*f,C=C*r+v*f,i=i*r+p*f,r===1-U){const c=1/Math.sqrt(t*t+g*g+C*C+i*i);t*=c,g*=c,C*=c,i*=c}}F[q]=t,F[q+1]=g,F[q+2]=C,F[q+3]=i}static multiplyQuaternionsFlat(F,q,lt,Dt,Zt,G){const U=lt[Dt],t=lt[Dt+1],g=lt[Dt+2],C=lt[Dt+3],i=Zt[G],S=Zt[G+1],x=Zt[G+2],v=Zt[G+3];return F[q]=U*v+C*i+t*x-g*S,F[q+1]=t*v+C*S+g*i-U*x,F[q+2]=g*v+C*x+U*S-t*i,F[q+3]=C*v-U*i-t*S-g*x,F}get x(){return this._x}set x(F){this._x=F,this._onChangeCallback()}get y(){return this._y}set y(F){this._y=F,this._onChangeCallback()}get z(){return this._z}set z(F){this._z=F,this._onChangeCallback()}get w(){return this._w}set w(F){this._w=F,this._onChangeCallback()}set(F,q,lt,Dt){return this._x=F,this._y=q,this._z=lt,this._w=Dt,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(F){return this._x=F.x,this._y=F.y,this._z=F.z,this._w=F.w,this._onChangeCallback(),this}setFromEuler(F,q=!0){const lt=F._x,Dt=F._y,Zt=F._z,G=F._order,U=Math.cos,t=Math.sin,g=U(lt/2),C=U(Dt/2),i=U(Zt/2),S=t(lt/2),x=t(Dt/2),v=t(Zt/2);switch(G){case"XYZ":this._x=S*C*i+g*x*v,this._y=g*x*i-S*C*v,this._z=g*C*v+S*x*i,this._w=g*C*i-S*x*v;break;case"YXZ":this._x=S*C*i+g*x*v,this._y=g*x*i-S*C*v,this._z=g*C*v-S*x*i,this._w=g*C*i+S*x*v;break;case"ZXY":this._x=S*C*i-g*x*v,this._y=g*x*i+S*C*v,this._z=g*C*v+S*x*i,this._w=g*C*i-S*x*v;break;case"ZYX":this._x=S*C*i-g*x*v,this._y=g*x*i+S*C*v,this._z=g*C*v-S*x*i,this._w=g*C*i+S*x*v;break;case"YZX":this._x=S*C*i+g*x*v,this._y=g*x*i+S*C*v,this._z=g*C*v-S*x*i,this._w=g*C*i-S*x*v;break;case"XZY":this._x=S*C*i-g*x*v,this._y=g*x*i-S*C*v,this._z=g*C*v+S*x*i,this._w=g*C*i+S*x*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+G)}return q===!0&&this._onChangeCallback(),this}setFromAxisAngle(F,q){const lt=q/2,Dt=Math.sin(lt);return this._x=F.x*Dt,this._y=F.y*Dt,this._z=F.z*Dt,this._w=Math.cos(lt),this._onChangeCallback(),this}setFromRotationMatrix(F){const q=F.elements,lt=q[0],Dt=q[4],Zt=q[8],G=q[1],U=q[5],t=q[9],g=q[2],C=q[6],i=q[10],S=lt+U+i;if(S>0){const x=.5/Math.sqrt(S+1);this._w=.25/x,this._x=(C-t)*x,this._y=(Zt-g)*x,this._z=(G-Dt)*x}else if(lt>U&<>i){const x=2*Math.sqrt(1+lt-U-i);this._w=(C-t)/x,this._x=.25*x,this._y=(Dt+G)/x,this._z=(Zt+g)/x}else if(U>i){const x=2*Math.sqrt(1+U-lt-i);this._w=(Zt-g)/x,this._x=(Dt+G)/x,this._y=.25*x,this._z=(t+C)/x}else{const x=2*Math.sqrt(1+i-lt-U);this._w=(G-Dt)/x,this._x=(Zt+g)/x,this._y=(t+C)/x,this._z=.25*x}return this._onChangeCallback(),this}setFromUnitVectors(F,q){let lt=F.dot(q)+1;return ltMath.abs(F.z)?(this._x=-F.y,this._y=F.x,this._z=0,this._w=lt):(this._x=0,this._y=-F.z,this._z=F.y,this._w=lt)):(this._x=F.y*q.z-F.z*q.y,this._y=F.z*q.x-F.x*q.z,this._z=F.x*q.y-F.y*q.x,this._w=lt),this.normalize()}angleTo(F){return 2*Math.acos(Math.abs(hs(this.dot(F),-1,1)))}rotateTowards(F,q){const lt=this.angleTo(F);if(lt===0)return this;const Dt=Math.min(1,q/lt);return this.slerp(F,Dt),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(F){return this._x*F._x+this._y*F._y+this._z*F._z+this._w*F._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let F=this.length();return F===0?(this._x=0,this._y=0,this._z=0,this._w=1):(F=1/F,this._x=this._x*F,this._y=this._y*F,this._z=this._z*F,this._w=this._w*F),this._onChangeCallback(),this}multiply(F){return this.multiplyQuaternions(this,F)}premultiply(F){return this.multiplyQuaternions(F,this)}multiplyQuaternions(F,q){const lt=F._x,Dt=F._y,Zt=F._z,G=F._w,U=q._x,t=q._y,g=q._z,C=q._w;return this._x=lt*C+G*U+Dt*g-Zt*t,this._y=Dt*C+G*t+Zt*U-lt*g,this._z=Zt*C+G*g+lt*t-Dt*U,this._w=G*C-lt*U-Dt*t-Zt*g,this._onChangeCallback(),this}slerp(F,q){if(q===0)return this;if(q===1)return this.copy(F);const lt=this._x,Dt=this._y,Zt=this._z,G=this._w;let U=G*F._w+lt*F._x+Dt*F._y+Zt*F._z;if(U<0?(this._w=-F._w,this._x=-F._x,this._y=-F._y,this._z=-F._z,U=-U):this.copy(F),U>=1)return this._w=G,this._x=lt,this._y=Dt,this._z=Zt,this;const t=1-U*U;if(t<=Number.EPSILON){const x=1-q;return this._w=x*G+q*this._w,this._x=x*lt+q*this._x,this._y=x*Dt+q*this._y,this._z=x*Zt+q*this._z,this.normalize(),this}const g=Math.sqrt(t),C=Math.atan2(g,U),i=Math.sin((1-q)*C)/g,S=Math.sin(q*C)/g;return this._w=G*i+this._w*S,this._x=lt*i+this._x*S,this._y=Dt*i+this._y*S,this._z=Zt*i+this._z*S,this._onChangeCallback(),this}slerpQuaternions(F,q,lt){return this.copy(F).slerp(q,lt)}random(){const F=2*Math.PI*Math.random(),q=2*Math.PI*Math.random(),lt=Math.random(),Dt=Math.sqrt(1-lt),Zt=Math.sqrt(lt);return this.set(Dt*Math.sin(F),Dt*Math.cos(F),Zt*Math.sin(q),Zt*Math.cos(q))}equals(F){return F._x===this._x&&F._y===this._y&&F._z===this._z&&F._w===this._w}fromArray(F,q=0){return this._x=F[q],this._y=F[q+1],this._z=F[q+2],this._w=F[q+3],this._onChangeCallback(),this}toArray(F=[],q=0){return F[q]=this._x,F[q+1]=this._y,F[q+2]=this._z,F[q+3]=this._w,F}fromBufferAttribute(F,q){return this._x=F.getX(q),this._y=F.getY(q),this._z=F.getZ(q),this._w=F.getW(q),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(F){return this._onChangeCallback=F,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class bn{constructor(F=0,q=0,lt=0){bn.prototype.isVector3=!0,this.x=F,this.y=q,this.z=lt}set(F,q,lt){return lt===void 0&&(lt=this.z),this.x=F,this.y=q,this.z=lt,this}setScalar(F){return this.x=F,this.y=F,this.z=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setZ(F){return this.z=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;case 2:this.z=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(F){return this.x=F.x,this.y=F.y,this.z=F.z,this}add(F){return this.x+=F.x,this.y+=F.y,this.z+=F.z,this}addScalar(F){return this.x+=F,this.y+=F,this.z+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this.z=F.z+q.z,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this.z+=F.z*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this.z-=F.z,this}subScalar(F){return this.x-=F,this.y-=F,this.z-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this.z=F.z-q.z,this}multiply(F){return this.x*=F.x,this.y*=F.y,this.z*=F.z,this}multiplyScalar(F){return this.x*=F,this.y*=F,this.z*=F,this}multiplyVectors(F,q){return this.x=F.x*q.x,this.y=F.y*q.y,this.z=F.z*q.z,this}applyEuler(F){return this.applyQuaternion(Bm.setFromEuler(F))}applyAxisAngle(F,q){return this.applyQuaternion(Bm.setFromAxisAngle(F,q))}applyMatrix3(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.elements;return this.x=Zt[0]*q+Zt[3]*lt+Zt[6]*Dt,this.y=Zt[1]*q+Zt[4]*lt+Zt[7]*Dt,this.z=Zt[2]*q+Zt[5]*lt+Zt[8]*Dt,this}applyNormalMatrix(F){return this.applyMatrix3(F).normalize()}applyMatrix4(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.elements,G=1/(Zt[3]*q+Zt[7]*lt+Zt[11]*Dt+Zt[15]);return this.x=(Zt[0]*q+Zt[4]*lt+Zt[8]*Dt+Zt[12])*G,this.y=(Zt[1]*q+Zt[5]*lt+Zt[9]*Dt+Zt[13])*G,this.z=(Zt[2]*q+Zt[6]*lt+Zt[10]*Dt+Zt[14])*G,this}applyQuaternion(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.x,G=F.y,U=F.z,t=F.w,g=2*(G*Dt-U*lt),C=2*(U*q-Zt*Dt),i=2*(Zt*lt-G*q);return this.x=q+t*g+G*i-U*C,this.y=lt+t*C+U*g-Zt*i,this.z=Dt+t*i+Zt*C-G*g,this}project(F){return this.applyMatrix4(F.matrixWorldInverse).applyMatrix4(F.projectionMatrix)}unproject(F){return this.applyMatrix4(F.projectionMatrixInverse).applyMatrix4(F.matrixWorld)}transformDirection(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.elements;return this.x=Zt[0]*q+Zt[4]*lt+Zt[8]*Dt,this.y=Zt[1]*q+Zt[5]*lt+Zt[9]*Dt,this.z=Zt[2]*q+Zt[6]*lt+Zt[10]*Dt,this.normalize()}divide(F){return this.x/=F.x,this.y/=F.y,this.z/=F.z,this}divideScalar(F){return this.multiplyScalar(1/F)}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this.z=Math.min(this.z,F.z),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this.z=Math.max(this.z,F.z),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this.z=Math.max(F.z,Math.min(q.z,this.z)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this.z=Math.max(F,Math.min(q,this.z)),this}clampLength(F,q){const lt=this.length();return this.divideScalar(lt||1).multiplyScalar(Math.max(F,Math.min(q,lt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this.z+=(F.z-this.z)*q,this}lerpVectors(F,q,lt){return this.x=F.x+(q.x-F.x)*lt,this.y=F.y+(q.y-F.y)*lt,this.z=F.z+(q.z-F.z)*lt,this}cross(F){return this.crossVectors(this,F)}crossVectors(F,q){const lt=F.x,Dt=F.y,Zt=F.z,G=q.x,U=q.y,t=q.z;return this.x=Dt*t-Zt*U,this.y=Zt*G-lt*t,this.z=lt*U-Dt*G,this}projectOnVector(F){const q=F.lengthSq();if(q===0)return this.set(0,0,0);const lt=F.dot(this)/q;return this.copy(F).multiplyScalar(lt)}projectOnPlane(F){return s0.copy(this).projectOnVector(F),this.sub(s0)}reflect(F){return this.sub(s0.copy(F).multiplyScalar(2*this.dot(F)))}angleTo(F){const q=Math.sqrt(this.lengthSq()*F.lengthSq());if(q===0)return Math.PI/2;const lt=this.dot(F)/q;return Math.acos(hs(lt,-1,1))}distanceTo(F){return Math.sqrt(this.distanceToSquared(F))}distanceToSquared(F){const q=this.x-F.x,lt=this.y-F.y,Dt=this.z-F.z;return q*q+lt*lt+Dt*Dt}manhattanDistanceTo(F){return Math.abs(this.x-F.x)+Math.abs(this.y-F.y)+Math.abs(this.z-F.z)}setFromSpherical(F){return this.setFromSphericalCoords(F.radius,F.phi,F.theta)}setFromSphericalCoords(F,q,lt){const Dt=Math.sin(q)*F;return this.x=Dt*Math.sin(lt),this.y=Math.cos(q)*F,this.z=Dt*Math.cos(lt),this}setFromCylindrical(F){return this.setFromCylindricalCoords(F.radius,F.theta,F.y)}setFromCylindricalCoords(F,q,lt){return this.x=F*Math.sin(q),this.y=lt,this.z=F*Math.cos(q),this}setFromMatrixPosition(F){const q=F.elements;return this.x=q[12],this.y=q[13],this.z=q[14],this}setFromMatrixScale(F){const q=this.setFromMatrixColumn(F,0).length(),lt=this.setFromMatrixColumn(F,1).length(),Dt=this.setFromMatrixColumn(F,2).length();return this.x=q,this.y=lt,this.z=Dt,this}setFromMatrixColumn(F,q){return this.fromArray(F.elements,q*4)}setFromMatrix3Column(F,q){return this.fromArray(F.elements,q*3)}setFromEuler(F){return this.x=F._x,this.y=F._y,this.z=F._z,this}setFromColor(F){return this.x=F.r,this.y=F.g,this.z=F.b,this}equals(F){return F.x===this.x&&F.y===this.y&&F.z===this.z}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this.z=F[q+2],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F[q+2]=this.z,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this.z=F.getZ(q),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const F=Math.random()*Math.PI*2,q=Math.random()*2-1,lt=Math.sqrt(1-q*q);return this.x=lt*Math.cos(F),this.y=q,this.z=lt*Math.sin(F),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const s0=new bn,Bm=new ku;class Qv{constructor(F=new bn(1/0,1/0,1/0),q=new bn(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=F,this.max=q}set(F,q){return this.min.copy(F),this.max.copy(q),this}setFromArray(F){this.makeEmpty();for(let q=0,lt=F.length;qthis.max.x||F.ythis.max.y||F.zthis.max.z)}containsBox(F){return this.min.x<=F.min.x&&F.max.x<=this.max.x&&this.min.y<=F.min.y&&F.max.y<=this.max.y&&this.min.z<=F.min.z&&F.max.z<=this.max.z}getParameter(F,q){return q.set((F.x-this.min.x)/(this.max.x-this.min.x),(F.y-this.min.y)/(this.max.y-this.min.y),(F.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(F){return!(F.max.xthis.max.x||F.max.ythis.max.y||F.max.zthis.max.z)}intersectsSphere(F){return this.clampPoint(F.center,ou),ou.distanceToSquared(F.center)<=F.radius*F.radius}intersectsPlane(F){let q,lt;return F.normal.x>0?(q=F.normal.x*this.min.x,lt=F.normal.x*this.max.x):(q=F.normal.x*this.max.x,lt=F.normal.x*this.min.x),F.normal.y>0?(q+=F.normal.y*this.min.y,lt+=F.normal.y*this.max.y):(q+=F.normal.y*this.max.y,lt+=F.normal.y*this.min.y),F.normal.z>0?(q+=F.normal.z*this.min.z,lt+=F.normal.z*this.max.z):(q+=F.normal.z*this.max.z,lt+=F.normal.z*this.min.z),q<=-F.constant&<>=-F.constant}intersectsTriangle(F){if(this.isEmpty())return!1;this.getCenter(Ov),Dd.subVectors(this.max,Ov),zh.subVectors(F.a,Ov),kh.subVectors(F.b,Ov),Oh.subVectors(F.c,Ov),ic.subVectors(kh,zh),ac.subVectors(Oh,kh),Yc.subVectors(zh,Oh);let q=[0,-ic.z,ic.y,0,-ac.z,ac.y,0,-Yc.z,Yc.y,ic.z,0,-ic.x,ac.z,0,-ac.x,Yc.z,0,-Yc.x,-ic.y,ic.x,0,-ac.y,ac.x,0,-Yc.y,Yc.x,0];return!l0(q,zh,kh,Oh,Dd)||(q=[1,0,0,0,1,0,0,0,1],!l0(q,zh,kh,Oh,Dd))?!1:(Id.crossVectors(ic,ac),q=[Id.x,Id.y,Id.z],l0(q,zh,kh,Oh,Dd))}clampPoint(F,q){return q.copy(F).clamp(this.min,this.max)}distanceToPoint(F){return this.clampPoint(F,ou).distanceTo(F)}getBoundingSphere(F){return this.isEmpty()?F.makeEmpty():(this.getCenter(F.center),F.radius=this.getSize(ou).length()*.5),F}intersect(F){return this.min.max(F.min),this.max.min(F.max),this.isEmpty()&&this.makeEmpty(),this}union(F){return this.min.min(F.min),this.max.max(F.max),this}applyMatrix4(F){return this.isEmpty()?this:(hf[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(F),hf[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(F),hf[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(F),hf[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(F),hf[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(F),hf[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(F),hf[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(F),hf[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(F),this.setFromPoints(hf),this)}translate(F){return this.min.add(F),this.max.add(F),this}equals(F){return F.min.equals(this.min)&&F.max.equals(this.max)}}const hf=[new bn,new bn,new bn,new bn,new bn,new bn,new bn,new bn],ou=new bn,Rd=new Qv,zh=new bn,kh=new bn,Oh=new bn,ic=new bn,ac=new bn,Yc=new bn,Ov=new bn,Dd=new bn,Id=new bn,Xc=new bn;function l0(_t,F,q,lt,Dt){for(let Zt=0,G=_t.length-3;Zt<=G;Zt+=3){Xc.fromArray(_t,Zt);const U=Dt.x*Math.abs(Xc.x)+Dt.y*Math.abs(Xc.y)+Dt.z*Math.abs(Xc.z),t=F.dot(Xc),g=q.dot(Xc),C=lt.dot(Xc);if(Math.max(-Math.max(t,g,C),Math.min(t,g,C))>U)return!1}return!0}const s2=new Qv,Nv=new bn,u0=new bn;class $v{constructor(F=new bn,q=-1){this.isSphere=!0,this.center=F,this.radius=q}set(F,q){return this.center.copy(F),this.radius=q,this}setFromPoints(F,q){const lt=this.center;q!==void 0?lt.copy(q):s2.setFromPoints(F).getCenter(lt);let Dt=0;for(let Zt=0,G=F.length;Ztthis.radius*this.radius&&(q.sub(this.center).normalize(),q.multiplyScalar(this.radius).add(this.center)),q}getBoundingBox(F){return this.isEmpty()?(F.makeEmpty(),F):(F.set(this.center,this.center),F.expandByScalar(this.radius),F)}applyMatrix4(F){return this.center.applyMatrix4(F),this.radius=this.radius*F.getMaxScaleOnAxis(),this}translate(F){return this.center.add(F),this}expandByPoint(F){if(this.isEmpty())return this.center.copy(F),this.radius=0,this;Nv.subVectors(F,this.center);const q=Nv.lengthSq();if(q>this.radius*this.radius){const lt=Math.sqrt(q),Dt=(lt-this.radius)*.5;this.center.addScaledVector(Nv,Dt/lt),this.radius+=Dt}return this}union(F){return F.isEmpty()?this:this.isEmpty()?(this.copy(F),this):(this.center.equals(F.center)===!0?this.radius=Math.max(this.radius,F.radius):(u0.subVectors(F.center,this.center).setLength(F.radius),this.expandByPoint(Nv.copy(F.center).add(u0)),this.expandByPoint(Nv.copy(F.center).sub(u0))),this)}equals(F){return F.center.equals(this.center)&&F.radius===this.radius}clone(){return new this.constructor().copy(this)}}const vf=new bn,f0=new bn,Fd=new bn,oc=new bn,c0=new bn,zd=new bn,h0=new bn;class qv{constructor(F=new bn,q=new bn(0,0,-1)){this.origin=F,this.direction=q}set(F,q){return this.origin.copy(F),this.direction.copy(q),this}copy(F){return this.origin.copy(F.origin),this.direction.copy(F.direction),this}at(F,q){return q.copy(this.origin).addScaledVector(this.direction,F)}lookAt(F){return this.direction.copy(F).sub(this.origin).normalize(),this}recast(F){return this.origin.copy(this.at(F,vf)),this}closestPointToPoint(F,q){q.subVectors(F,this.origin);const lt=q.dot(this.direction);return lt<0?q.copy(this.origin):q.copy(this.origin).addScaledVector(this.direction,lt)}distanceToPoint(F){return Math.sqrt(this.distanceSqToPoint(F))}distanceSqToPoint(F){const q=vf.subVectors(F,this.origin).dot(this.direction);return q<0?this.origin.distanceToSquared(F):(vf.copy(this.origin).addScaledVector(this.direction,q),vf.distanceToSquared(F))}distanceSqToSegment(F,q,lt,Dt){f0.copy(F).add(q).multiplyScalar(.5),Fd.copy(q).sub(F).normalize(),oc.copy(this.origin).sub(f0);const Zt=F.distanceTo(q)*.5,G=-this.direction.dot(Fd),U=oc.dot(this.direction),t=-oc.dot(Fd),g=oc.lengthSq(),C=Math.abs(1-G*G);let i,S,x,v;if(C>0)if(i=G*t-U,S=G*U-t,v=Zt*C,i>=0)if(S>=-v)if(S<=v){const p=1/C;i*=p,S*=p,x=i*(i+G*S+2*U)+S*(G*i+S+2*t)+g}else S=Zt,i=Math.max(0,-(G*S+U)),x=-i*i+S*(S+2*t)+g;else S=-Zt,i=Math.max(0,-(G*S+U)),x=-i*i+S*(S+2*t)+g;else S<=-v?(i=Math.max(0,-(-G*Zt+U)),S=i>0?-Zt:Math.min(Math.max(-Zt,-t),Zt),x=-i*i+S*(S+2*t)+g):S<=v?(i=0,S=Math.min(Math.max(-Zt,-t),Zt),x=S*(S+2*t)+g):(i=Math.max(0,-(G*Zt+U)),S=i>0?Zt:Math.min(Math.max(-Zt,-t),Zt),x=-i*i+S*(S+2*t)+g);else S=G>0?-Zt:Zt,i=Math.max(0,-(G*S+U)),x=-i*i+S*(S+2*t)+g;return lt&<.copy(this.origin).addScaledVector(this.direction,i),Dt&&Dt.copy(f0).addScaledVector(Fd,S),x}intersectSphere(F,q){vf.subVectors(F.center,this.origin);const lt=vf.dot(this.direction),Dt=vf.dot(vf)-lt*lt,Zt=F.radius*F.radius;if(Dt>Zt)return null;const G=Math.sqrt(Zt-Dt),U=lt-G,t=lt+G;return t<0?null:U<0?this.at(t,q):this.at(U,q)}intersectsSphere(F){return this.distanceSqToPoint(F.center)<=F.radius*F.radius}distanceToPlane(F){const q=F.normal.dot(this.direction);if(q===0)return F.distanceToPoint(this.origin)===0?0:null;const lt=-(this.origin.dot(F.normal)+F.constant)/q;return lt>=0?lt:null}intersectPlane(F,q){const lt=this.distanceToPlane(F);return lt===null?null:this.at(lt,q)}intersectsPlane(F){const q=F.distanceToPoint(this.origin);return q===0||F.normal.dot(this.direction)*q<0}intersectBox(F,q){let lt,Dt,Zt,G,U,t;const g=1/this.direction.x,C=1/this.direction.y,i=1/this.direction.z,S=this.origin;return g>=0?(lt=(F.min.x-S.x)*g,Dt=(F.max.x-S.x)*g):(lt=(F.max.x-S.x)*g,Dt=(F.min.x-S.x)*g),C>=0?(Zt=(F.min.y-S.y)*C,G=(F.max.y-S.y)*C):(Zt=(F.max.y-S.y)*C,G=(F.min.y-S.y)*C),lt>G||Zt>Dt||((Zt>lt||isNaN(lt))&&(lt=Zt),(G=0?(U=(F.min.z-S.z)*i,t=(F.max.z-S.z)*i):(U=(F.max.z-S.z)*i,t=(F.min.z-S.z)*i),lt>t||U>Dt)||((U>lt||lt!==lt)&&(lt=U),(t=0?lt:Dt,q)}intersectsBox(F){return this.intersectBox(F,vf)!==null}intersectTriangle(F,q,lt,Dt,Zt){c0.subVectors(q,F),zd.subVectors(lt,F),h0.crossVectors(c0,zd);let G=this.direction.dot(h0),U;if(G>0){if(Dt)return null;U=1}else if(G<0)U=-1,G=-G;else return null;oc.subVectors(this.origin,F);const t=U*this.direction.dot(zd.crossVectors(oc,zd));if(t<0)return null;const g=U*this.direction.dot(c0.cross(oc));if(g<0||t+g>G)return null;const C=-U*oc.dot(h0);return C<0?null:this.at(C/G,Zt)}applyMatrix4(F){return this.origin.applyMatrix4(F),this.direction.transformDirection(F),this}equals(F){return F.origin.equals(this.origin)&&F.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class so{constructor(F,q,lt,Dt,Zt,G,U,t,g,C,i,S,x,v,p,r){so.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],F!==void 0&&this.set(F,q,lt,Dt,Zt,G,U,t,g,C,i,S,x,v,p,r)}set(F,q,lt,Dt,Zt,G,U,t,g,C,i,S,x,v,p,r){const e=this.elements;return e[0]=F,e[4]=q,e[8]=lt,e[12]=Dt,e[1]=Zt,e[5]=G,e[9]=U,e[13]=t,e[2]=g,e[6]=C,e[10]=i,e[14]=S,e[3]=x,e[7]=v,e[11]=p,e[15]=r,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new so().fromArray(this.elements)}copy(F){const q=this.elements,lt=F.elements;return q[0]=lt[0],q[1]=lt[1],q[2]=lt[2],q[3]=lt[3],q[4]=lt[4],q[5]=lt[5],q[6]=lt[6],q[7]=lt[7],q[8]=lt[8],q[9]=lt[9],q[10]=lt[10],q[11]=lt[11],q[12]=lt[12],q[13]=lt[13],q[14]=lt[14],q[15]=lt[15],this}copyPosition(F){const q=this.elements,lt=F.elements;return q[12]=lt[12],q[13]=lt[13],q[14]=lt[14],this}setFromMatrix3(F){const q=F.elements;return this.set(q[0],q[3],q[6],0,q[1],q[4],q[7],0,q[2],q[5],q[8],0,0,0,0,1),this}extractBasis(F,q,lt){return F.setFromMatrixColumn(this,0),q.setFromMatrixColumn(this,1),lt.setFromMatrixColumn(this,2),this}makeBasis(F,q,lt){return this.set(F.x,q.x,lt.x,0,F.y,q.y,lt.y,0,F.z,q.z,lt.z,0,0,0,0,1),this}extractRotation(F){const q=this.elements,lt=F.elements,Dt=1/Nh.setFromMatrixColumn(F,0).length(),Zt=1/Nh.setFromMatrixColumn(F,1).length(),G=1/Nh.setFromMatrixColumn(F,2).length();return q[0]=lt[0]*Dt,q[1]=lt[1]*Dt,q[2]=lt[2]*Dt,q[3]=0,q[4]=lt[4]*Zt,q[5]=lt[5]*Zt,q[6]=lt[6]*Zt,q[7]=0,q[8]=lt[8]*G,q[9]=lt[9]*G,q[10]=lt[10]*G,q[11]=0,q[12]=0,q[13]=0,q[14]=0,q[15]=1,this}makeRotationFromEuler(F){const q=this.elements,lt=F.x,Dt=F.y,Zt=F.z,G=Math.cos(lt),U=Math.sin(lt),t=Math.cos(Dt),g=Math.sin(Dt),C=Math.cos(Zt),i=Math.sin(Zt);if(F.order==="XYZ"){const S=G*C,x=G*i,v=U*C,p=U*i;q[0]=t*C,q[4]=-t*i,q[8]=g,q[1]=x+v*g,q[5]=S-p*g,q[9]=-U*t,q[2]=p-S*g,q[6]=v+x*g,q[10]=G*t}else if(F.order==="YXZ"){const S=t*C,x=t*i,v=g*C,p=g*i;q[0]=S+p*U,q[4]=v*U-x,q[8]=G*g,q[1]=G*i,q[5]=G*C,q[9]=-U,q[2]=x*U-v,q[6]=p+S*U,q[10]=G*t}else if(F.order==="ZXY"){const S=t*C,x=t*i,v=g*C,p=g*i;q[0]=S-p*U,q[4]=-G*i,q[8]=v+x*U,q[1]=x+v*U,q[5]=G*C,q[9]=p-S*U,q[2]=-G*g,q[6]=U,q[10]=G*t}else if(F.order==="ZYX"){const S=G*C,x=G*i,v=U*C,p=U*i;q[0]=t*C,q[4]=v*g-x,q[8]=S*g+p,q[1]=t*i,q[5]=p*g+S,q[9]=x*g-v,q[2]=-g,q[6]=U*t,q[10]=G*t}else if(F.order==="YZX"){const S=G*t,x=G*g,v=U*t,p=U*g;q[0]=t*C,q[4]=p-S*i,q[8]=v*i+x,q[1]=i,q[5]=G*C,q[9]=-U*C,q[2]=-g*C,q[6]=x*i+v,q[10]=S-p*i}else if(F.order==="XZY"){const S=G*t,x=G*g,v=U*t,p=U*g;q[0]=t*C,q[4]=-i,q[8]=g*C,q[1]=S*i+p,q[5]=G*C,q[9]=x*i-v,q[2]=v*i-x,q[6]=U*C,q[10]=p*i+S}return q[3]=0,q[7]=0,q[11]=0,q[12]=0,q[13]=0,q[14]=0,q[15]=1,this}makeRotationFromQuaternion(F){return this.compose(l2,F,u2)}lookAt(F,q,lt){const Dt=this.elements;return al.subVectors(F,q),al.lengthSq()===0&&(al.z=1),al.normalize(),sc.crossVectors(lt,al),sc.lengthSq()===0&&(Math.abs(lt.z)===1?al.x+=1e-4:al.z+=1e-4,al.normalize(),sc.crossVectors(lt,al)),sc.normalize(),kd.crossVectors(al,sc),Dt[0]=sc.x,Dt[4]=kd.x,Dt[8]=al.x,Dt[1]=sc.y,Dt[5]=kd.y,Dt[9]=al.y,Dt[2]=sc.z,Dt[6]=kd.z,Dt[10]=al.z,this}multiply(F){return this.multiplyMatrices(this,F)}premultiply(F){return this.multiplyMatrices(F,this)}multiplyMatrices(F,q){const lt=F.elements,Dt=q.elements,Zt=this.elements,G=lt[0],U=lt[4],t=lt[8],g=lt[12],C=lt[1],i=lt[5],S=lt[9],x=lt[13],v=lt[2],p=lt[6],r=lt[10],e=lt[14],a=lt[3],n=lt[7],f=lt[11],c=lt[15],l=Dt[0],m=Dt[4],h=Dt[8],b=Dt[12],u=Dt[1],o=Dt[5],d=Dt[9],w=Dt[13],A=Dt[2],_=Dt[6],y=Dt[10],E=Dt[14],T=Dt[3],s=Dt[7],L=Dt[11],M=Dt[15];return Zt[0]=G*l+U*u+t*A+g*T,Zt[4]=G*m+U*o+t*_+g*s,Zt[8]=G*h+U*d+t*y+g*L,Zt[12]=G*b+U*w+t*E+g*M,Zt[1]=C*l+i*u+S*A+x*T,Zt[5]=C*m+i*o+S*_+x*s,Zt[9]=C*h+i*d+S*y+x*L,Zt[13]=C*b+i*w+S*E+x*M,Zt[2]=v*l+p*u+r*A+e*T,Zt[6]=v*m+p*o+r*_+e*s,Zt[10]=v*h+p*d+r*y+e*L,Zt[14]=v*b+p*w+r*E+e*M,Zt[3]=a*l+n*u+f*A+c*T,Zt[7]=a*m+n*o+f*_+c*s,Zt[11]=a*h+n*d+f*y+c*L,Zt[15]=a*b+n*w+f*E+c*M,this}multiplyScalar(F){const q=this.elements;return q[0]*=F,q[4]*=F,q[8]*=F,q[12]*=F,q[1]*=F,q[5]*=F,q[9]*=F,q[13]*=F,q[2]*=F,q[6]*=F,q[10]*=F,q[14]*=F,q[3]*=F,q[7]*=F,q[11]*=F,q[15]*=F,this}determinant(){const F=this.elements,q=F[0],lt=F[4],Dt=F[8],Zt=F[12],G=F[1],U=F[5],t=F[9],g=F[13],C=F[2],i=F[6],S=F[10],x=F[14],v=F[3],p=F[7],r=F[11],e=F[15];return v*(+Zt*t*i-Dt*g*i-Zt*U*S+lt*g*S+Dt*U*x-lt*t*x)+p*(+q*t*x-q*g*S+Zt*G*S-Dt*G*x+Dt*g*C-Zt*t*C)+r*(+q*g*i-q*U*x-Zt*G*i+lt*G*x+Zt*U*C-lt*g*C)+e*(-Dt*U*C-q*t*i+q*U*S+Dt*G*i-lt*G*S+lt*t*C)}transpose(){const F=this.elements;let q;return q=F[1],F[1]=F[4],F[4]=q,q=F[2],F[2]=F[8],F[8]=q,q=F[6],F[6]=F[9],F[9]=q,q=F[3],F[3]=F[12],F[12]=q,q=F[7],F[7]=F[13],F[13]=q,q=F[11],F[11]=F[14],F[14]=q,this}setPosition(F,q,lt){const Dt=this.elements;return F.isVector3?(Dt[12]=F.x,Dt[13]=F.y,Dt[14]=F.z):(Dt[12]=F,Dt[13]=q,Dt[14]=lt),this}invert(){const F=this.elements,q=F[0],lt=F[1],Dt=F[2],Zt=F[3],G=F[4],U=F[5],t=F[6],g=F[7],C=F[8],i=F[9],S=F[10],x=F[11],v=F[12],p=F[13],r=F[14],e=F[15],a=i*r*g-p*S*g+p*t*x-U*r*x-i*t*e+U*S*e,n=v*S*g-C*r*g-v*t*x+G*r*x+C*t*e-G*S*e,f=C*p*g-v*i*g+v*U*x-G*p*x-C*U*e+G*i*e,c=v*i*t-C*p*t-v*U*S+G*p*S+C*U*r-G*i*r,l=q*a+lt*n+Dt*f+Zt*c;if(l===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const m=1/l;return F[0]=a*m,F[1]=(p*S*Zt-i*r*Zt-p*Dt*x+lt*r*x+i*Dt*e-lt*S*e)*m,F[2]=(U*r*Zt-p*t*Zt+p*Dt*g-lt*r*g-U*Dt*e+lt*t*e)*m,F[3]=(i*t*Zt-U*S*Zt-i*Dt*g+lt*S*g+U*Dt*x-lt*t*x)*m,F[4]=n*m,F[5]=(C*r*Zt-v*S*Zt+v*Dt*x-q*r*x-C*Dt*e+q*S*e)*m,F[6]=(v*t*Zt-G*r*Zt-v*Dt*g+q*r*g+G*Dt*e-q*t*e)*m,F[7]=(G*S*Zt-C*t*Zt+C*Dt*g-q*S*g-G*Dt*x+q*t*x)*m,F[8]=f*m,F[9]=(v*i*Zt-C*p*Zt-v*lt*x+q*p*x+C*lt*e-q*i*e)*m,F[10]=(G*p*Zt-v*U*Zt+v*lt*g-q*p*g-G*lt*e+q*U*e)*m,F[11]=(C*U*Zt-G*i*Zt-C*lt*g+q*i*g+G*lt*x-q*U*x)*m,F[12]=c*m,F[13]=(C*p*Dt-v*i*Dt+v*lt*S-q*p*S-C*lt*r+q*i*r)*m,F[14]=(v*U*Dt-G*p*Dt-v*lt*t+q*p*t+G*lt*r-q*U*r)*m,F[15]=(G*i*Dt-C*U*Dt+C*lt*t-q*i*t-G*lt*S+q*U*S)*m,this}scale(F){const q=this.elements,lt=F.x,Dt=F.y,Zt=F.z;return q[0]*=lt,q[4]*=Dt,q[8]*=Zt,q[1]*=lt,q[5]*=Dt,q[9]*=Zt,q[2]*=lt,q[6]*=Dt,q[10]*=Zt,q[3]*=lt,q[7]*=Dt,q[11]*=Zt,this}getMaxScaleOnAxis(){const F=this.elements,q=F[0]*F[0]+F[1]*F[1]+F[2]*F[2],lt=F[4]*F[4]+F[5]*F[5]+F[6]*F[6],Dt=F[8]*F[8]+F[9]*F[9]+F[10]*F[10];return Math.sqrt(Math.max(q,lt,Dt))}makeTranslation(F,q,lt){return F.isVector3?this.set(1,0,0,F.x,0,1,0,F.y,0,0,1,F.z,0,0,0,1):this.set(1,0,0,F,0,1,0,q,0,0,1,lt,0,0,0,1),this}makeRotationX(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(1,0,0,0,0,q,-lt,0,0,lt,q,0,0,0,0,1),this}makeRotationY(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(q,0,lt,0,0,1,0,0,-lt,0,q,0,0,0,0,1),this}makeRotationZ(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(q,-lt,0,0,lt,q,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(F,q){const lt=Math.cos(q),Dt=Math.sin(q),Zt=1-lt,G=F.x,U=F.y,t=F.z,g=Zt*G,C=Zt*U;return this.set(g*G+lt,g*U-Dt*t,g*t+Dt*U,0,g*U+Dt*t,C*U+lt,C*t-Dt*G,0,g*t-Dt*U,C*t+Dt*G,Zt*t*t+lt,0,0,0,0,1),this}makeScale(F,q,lt){return this.set(F,0,0,0,0,q,0,0,0,0,lt,0,0,0,0,1),this}makeShear(F,q,lt,Dt,Zt,G){return this.set(1,lt,Zt,0,F,1,G,0,q,Dt,1,0,0,0,0,1),this}compose(F,q,lt){const Dt=this.elements,Zt=q._x,G=q._y,U=q._z,t=q._w,g=Zt+Zt,C=G+G,i=U+U,S=Zt*g,x=Zt*C,v=Zt*i,p=G*C,r=G*i,e=U*i,a=t*g,n=t*C,f=t*i,c=lt.x,l=lt.y,m=lt.z;return Dt[0]=(1-(p+e))*c,Dt[1]=(x+f)*c,Dt[2]=(v-n)*c,Dt[3]=0,Dt[4]=(x-f)*l,Dt[5]=(1-(S+e))*l,Dt[6]=(r+a)*l,Dt[7]=0,Dt[8]=(v+n)*m,Dt[9]=(r-a)*m,Dt[10]=(1-(S+p))*m,Dt[11]=0,Dt[12]=F.x,Dt[13]=F.y,Dt[14]=F.z,Dt[15]=1,this}decompose(F,q,lt){const Dt=this.elements;let Zt=Nh.set(Dt[0],Dt[1],Dt[2]).length();const G=Nh.set(Dt[4],Dt[5],Dt[6]).length(),U=Nh.set(Dt[8],Dt[9],Dt[10]).length();this.determinant()<0&&(Zt=-Zt),F.x=Dt[12],F.y=Dt[13],F.z=Dt[14],su.copy(this);const g=1/Zt,C=1/G,i=1/U;return su.elements[0]*=g,su.elements[1]*=g,su.elements[2]*=g,su.elements[4]*=C,su.elements[5]*=C,su.elements[6]*=C,su.elements[8]*=i,su.elements[9]*=i,su.elements[10]*=i,q.setFromRotationMatrix(su),lt.x=Zt,lt.y=G,lt.z=U,this}makePerspective(F,q,lt,Dt,Zt,G,U=xf){const t=this.elements,g=2*Zt/(q-F),C=2*Zt/(lt-Dt),i=(q+F)/(q-F),S=(lt+Dt)/(lt-Dt);let x,v;if(U===xf)x=-(G+Zt)/(G-Zt),v=-2*G*Zt/(G-Zt);else if(U===fp)x=-G/(G-Zt),v=-G*Zt/(G-Zt);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+U);return t[0]=g,t[4]=0,t[8]=i,t[12]=0,t[1]=0,t[5]=C,t[9]=S,t[13]=0,t[2]=0,t[6]=0,t[10]=x,t[14]=v,t[3]=0,t[7]=0,t[11]=-1,t[15]=0,this}makeOrthographic(F,q,lt,Dt,Zt,G,U=xf){const t=this.elements,g=1/(q-F),C=1/(lt-Dt),i=1/(G-Zt),S=(q+F)*g,x=(lt+Dt)*C;let v,p;if(U===xf)v=(G+Zt)*i,p=-2*i;else if(U===fp)v=Zt*i,p=-1*i;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+U);return t[0]=2*g,t[4]=0,t[8]=0,t[12]=-S,t[1]=0,t[5]=2*C,t[9]=0,t[13]=-x,t[2]=0,t[6]=0,t[10]=p,t[14]=-v,t[3]=0,t[7]=0,t[11]=0,t[15]=1,this}equals(F){const q=this.elements,lt=F.elements;for(let Dt=0;Dt<16;Dt++)if(q[Dt]!==lt[Dt])return!1;return!0}fromArray(F,q=0){for(let lt=0;lt<16;lt++)this.elements[lt]=F[lt+q];return this}toArray(F=[],q=0){const lt=this.elements;return F[q]=lt[0],F[q+1]=lt[1],F[q+2]=lt[2],F[q+3]=lt[3],F[q+4]=lt[4],F[q+5]=lt[5],F[q+6]=lt[6],F[q+7]=lt[7],F[q+8]=lt[8],F[q+9]=lt[9],F[q+10]=lt[10],F[q+11]=lt[11],F[q+12]=lt[12],F[q+13]=lt[13],F[q+14]=lt[14],F[q+15]=lt[15],F}}const Nh=new bn,su=new so,l2=new bn(0,0,0),u2=new bn(1,1,1),sc=new bn,kd=new bn,al=new bn,Um=new so,Hm=new ku;class Ss{constructor(F=0,q=0,lt=0,Dt=Ss.DEFAULT_ORDER){this.isEuler=!0,this._x=F,this._y=q,this._z=lt,this._order=Dt}get x(){return this._x}set x(F){this._x=F,this._onChangeCallback()}get y(){return this._y}set y(F){this._y=F,this._onChangeCallback()}get z(){return this._z}set z(F){this._z=F,this._onChangeCallback()}get order(){return this._order}set order(F){this._order=F,this._onChangeCallback()}set(F,q,lt,Dt=this._order){return this._x=F,this._y=q,this._z=lt,this._order=Dt,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(F){return this._x=F._x,this._y=F._y,this._z=F._z,this._order=F._order,this._onChangeCallback(),this}setFromRotationMatrix(F,q=this._order,lt=!0){const Dt=F.elements,Zt=Dt[0],G=Dt[4],U=Dt[8],t=Dt[1],g=Dt[5],C=Dt[9],i=Dt[2],S=Dt[6],x=Dt[10];switch(q){case"XYZ":this._y=Math.asin(hs(U,-1,1)),Math.abs(U)<.9999999?(this._x=Math.atan2(-C,x),this._z=Math.atan2(-G,Zt)):(this._x=Math.atan2(S,g),this._z=0);break;case"YXZ":this._x=Math.asin(-hs(C,-1,1)),Math.abs(C)<.9999999?(this._y=Math.atan2(U,x),this._z=Math.atan2(t,g)):(this._y=Math.atan2(-i,Zt),this._z=0);break;case"ZXY":this._x=Math.asin(hs(S,-1,1)),Math.abs(S)<.9999999?(this._y=Math.atan2(-i,x),this._z=Math.atan2(-G,g)):(this._y=0,this._z=Math.atan2(t,Zt));break;case"ZYX":this._y=Math.asin(-hs(i,-1,1)),Math.abs(i)<.9999999?(this._x=Math.atan2(S,x),this._z=Math.atan2(t,Zt)):(this._x=0,this._z=Math.atan2(-G,g));break;case"YZX":this._z=Math.asin(hs(t,-1,1)),Math.abs(t)<.9999999?(this._x=Math.atan2(-C,g),this._y=Math.atan2(-i,Zt)):(this._x=0,this._y=Math.atan2(U,x));break;case"XZY":this._z=Math.asin(-hs(G,-1,1)),Math.abs(G)<.9999999?(this._x=Math.atan2(S,g),this._y=Math.atan2(U,Zt)):(this._x=Math.atan2(-C,x),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+q)}return this._order=q,lt===!0&&this._onChangeCallback(),this}setFromQuaternion(F,q,lt){return Um.makeRotationFromQuaternion(F),this.setFromRotationMatrix(Um,q,lt)}setFromVector3(F,q=this._order){return this.set(F.x,F.y,F.z,q)}reorder(F){return Hm.setFromEuler(this),this.setFromQuaternion(Hm,F)}equals(F){return F._x===this._x&&F._y===this._y&&F._z===this._z&&F._order===this._order}fromArray(F){return this._x=F[0],this._y=F[1],this._z=F[2],F[3]!==void 0&&(this._order=F[3]),this._onChangeCallback(),this}toArray(F=[],q=0){return F[q]=this._x,F[q+1]=this._y,F[q+2]=this._z,F[q+3]=this._order,F}_onChange(F){return this._onChangeCallback=F,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Ss.DEFAULT_ORDER="XYZ";class Z0{constructor(){this.mask=1}set(F){this.mask=(1<>>0}enable(F){this.mask|=1<1){for(let q=0;q1){for(let lt=0;lt0&&(Dt.userData=this.userData),Dt.layers=this.layers.mask,Dt.matrix=this.matrix.toArray(),Dt.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(Dt.matrixAutoUpdate=!1),this.isInstancedMesh&&(Dt.type="InstancedMesh",Dt.count=this.count,Dt.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(Dt.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(Dt.type="BatchedMesh",Dt.perObjectFrustumCulled=this.perObjectFrustumCulled,Dt.sortObjects=this.sortObjects,Dt.drawRanges=this._drawRanges,Dt.reservedRanges=this._reservedRanges,Dt.visibility=this._visibility,Dt.active=this._active,Dt.bounds=this._bounds.map(U=>({boxInitialized:U.boxInitialized,boxMin:U.box.min.toArray(),boxMax:U.box.max.toArray(),sphereInitialized:U.sphereInitialized,sphereRadius:U.sphere.radius,sphereCenter:U.sphere.center.toArray()})),Dt.maxGeometryCount=this._maxGeometryCount,Dt.maxVertexCount=this._maxVertexCount,Dt.maxIndexCount=this._maxIndexCount,Dt.geometryInitialized=this._geometryInitialized,Dt.geometryCount=this._geometryCount,Dt.matricesTexture=this._matricesTexture.toJSON(F),this.boundingSphere!==null&&(Dt.boundingSphere={center:Dt.boundingSphere.center.toArray(),radius:Dt.boundingSphere.radius}),this.boundingBox!==null&&(Dt.boundingBox={min:Dt.boundingBox.min.toArray(),max:Dt.boundingBox.max.toArray()}));function Zt(U,t){return U[t.uuid]===void 0&&(U[t.uuid]=t.toJSON(F)),t.uuid}if(this.isScene)this.background&&(this.background.isColor?Dt.background=this.background.toJSON():this.background.isTexture&&(Dt.background=this.background.toJSON(F).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(Dt.environment=this.environment.toJSON(F).uuid);else if(this.isMesh||this.isLine||this.isPoints){Dt.geometry=Zt(F.geometries,this.geometry);const U=this.geometry.parameters;if(U!==void 0&&U.shapes!==void 0){const t=U.shapes;if(Array.isArray(t))for(let g=0,C=t.length;g0){Dt.children=[];for(let U=0;U0){Dt.animations=[];for(let U=0;U0&&(lt.geometries=U),t.length>0&&(lt.materials=t),g.length>0&&(lt.textures=g),C.length>0&&(lt.images=C),i.length>0&&(lt.shapes=i),S.length>0&&(lt.skeletons=S),x.length>0&&(lt.animations=x),v.length>0&&(lt.nodes=v)}return lt.object=Dt,lt;function G(U){const t=[];for(const g in U){const C=U[g];delete C.metadata,t.push(C)}return t}}clone(F){return new this.constructor().copy(this,F)}copy(F,q=!0){if(this.name=F.name,this.up.copy(F.up),this.position.copy(F.position),this.rotation.order=F.rotation.order,this.quaternion.copy(F.quaternion),this.scale.copy(F.scale),this.matrix.copy(F.matrix),this.matrixWorld.copy(F.matrixWorld),this.matrixAutoUpdate=F.matrixAutoUpdate,this.matrixWorldAutoUpdate=F.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=F.matrixWorldNeedsUpdate,this.layers.mask=F.layers.mask,this.visible=F.visible,this.castShadow=F.castShadow,this.receiveShadow=F.receiveShadow,this.frustumCulled=F.frustumCulled,this.renderOrder=F.renderOrder,this.animations=F.animations.slice(),this.userData=JSON.parse(JSON.stringify(F.userData)),q===!0)for(let lt=0;lt0?Dt.multiplyScalar(1/Math.sqrt(Zt)):Dt.set(0,0,0)}static getBarycoord(F,q,lt,Dt,Zt){lu.subVectors(Dt,q),pf.subVectors(lt,q),d0.subVectors(F,q);const G=lu.dot(lu),U=lu.dot(pf),t=lu.dot(d0),g=pf.dot(pf),C=pf.dot(d0),i=G*g-U*U;if(i===0)return Zt.set(0,0,0),null;const S=1/i,x=(g*t-U*C)*S,v=(G*C-U*t)*S;return Zt.set(1-x-v,v,x)}static containsPoint(F,q,lt,Dt){return this.getBarycoord(F,q,lt,Dt,gf)===null?!1:gf.x>=0&&gf.y>=0&&gf.x+gf.y<=1}static getInterpolation(F,q,lt,Dt,Zt,G,U,t){return this.getBarycoord(F,q,lt,Dt,gf)===null?(t.x=0,t.y=0,"z"in t&&(t.z=0),"w"in t&&(t.w=0),null):(t.setScalar(0),t.addScaledVector(Zt,gf.x),t.addScaledVector(G,gf.y),t.addScaledVector(U,gf.z),t)}static isFrontFacing(F,q,lt,Dt){return lu.subVectors(lt,q),pf.subVectors(F,q),lu.cross(pf).dot(Dt)<0}set(F,q,lt){return this.a.copy(F),this.b.copy(q),this.c.copy(lt),this}setFromPointsAndIndices(F,q,lt,Dt){return this.a.copy(F[q]),this.b.copy(F[lt]),this.c.copy(F[Dt]),this}setFromAttributeAndIndices(F,q,lt,Dt){return this.a.fromBufferAttribute(F,q),this.b.fromBufferAttribute(F,lt),this.c.fromBufferAttribute(F,Dt),this}clone(){return new this.constructor().copy(this)}copy(F){return this.a.copy(F.a),this.b.copy(F.b),this.c.copy(F.c),this}getArea(){return lu.subVectors(this.c,this.b),pf.subVectors(this.a,this.b),lu.cross(pf).length()*.5}getMidpoint(F){return F.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(F){return hu.getNormal(this.a,this.b,this.c,F)}getPlane(F){return F.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(F,q){return hu.getBarycoord(F,this.a,this.b,this.c,q)}getInterpolation(F,q,lt,Dt,Zt){return hu.getInterpolation(F,this.a,this.b,this.c,q,lt,Dt,Zt)}containsPoint(F){return hu.containsPoint(F,this.a,this.b,this.c)}isFrontFacing(F){return hu.isFrontFacing(this.a,this.b,this.c,F)}intersectsBox(F){return F.intersectsTriangle(this)}closestPointToPoint(F,q){const lt=this.a,Dt=this.b,Zt=this.c;let G,U;Hh.subVectors(Dt,lt),Vh.subVectors(Zt,lt),p0.subVectors(F,lt);const t=Hh.dot(p0),g=Vh.dot(p0);if(t<=0&&g<=0)return q.copy(lt);g0.subVectors(F,Dt);const C=Hh.dot(g0),i=Vh.dot(g0);if(C>=0&&i<=C)return q.copy(Dt);const S=t*i-C*g;if(S<=0&&t>=0&&C<=0)return G=t/(t-C),q.copy(lt).addScaledVector(Hh,G);m0.subVectors(F,Zt);const x=Hh.dot(m0),v=Vh.dot(m0);if(v>=0&&x<=v)return q.copy(Zt);const p=x*g-t*v;if(p<=0&&g>=0&&v<=0)return U=g/(g-v),q.copy(lt).addScaledVector(Vh,U);const r=C*v-x*i;if(r<=0&&i-C>=0&&x-v>=0)return Zm.subVectors(Zt,Dt),U=(i-C)/(i-C+(x-v)),q.copy(Dt).addScaledVector(Zm,U);const e=1/(r+p+S);return G=p*e,U=S*e,q.copy(lt).addScaledVector(Hh,G).addScaledVector(Vh,U)}equals(F){return F.a.equals(this.a)&&F.b.equals(this.b)&&F.c.equals(this.c)}}const n1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},lc={h:0,s:0,l:0},Nd={h:0,s:0,l:0};function y0(_t,F,q){return q<0&&(q+=1),q>1&&(q-=1),q<1/6?_t+(F-_t)*6*q:q<1/2?F:q<2/3?_t+(F-_t)*6*(2/3-q):_t}class ha{constructor(F,q,lt){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(F,q,lt)}set(F,q,lt){if(q===void 0&<===void 0){const Dt=F;Dt&&Dt.isColor?this.copy(Dt):typeof Dt=="number"?this.setHex(Dt):typeof Dt=="string"&&this.setStyle(Dt)}else this.setRGB(F,q,lt);return this}setScalar(F){return this.r=F,this.g=F,this.b=F,this}setHex(F,q=Iu){return F=Math.floor(F),this.r=(F>>16&255)/255,this.g=(F>>8&255)/255,this.b=(F&255)/255,Fa.toWorkingColorSpace(this,q),this}setRGB(F,q,lt,Dt=Fa.workingColorSpace){return this.r=F,this.g=q,this.b=lt,Fa.toWorkingColorSpace(this,Dt),this}setHSL(F,q,lt,Dt=Fa.workingColorSpace){if(F=X0(F,1),q=hs(q,0,1),lt=hs(lt,0,1),q===0)this.r=this.g=this.b=lt;else{const Zt=lt<=.5?lt*(1+q):lt+q-lt*q,G=2*lt-Zt;this.r=y0(G,Zt,F+1/3),this.g=y0(G,Zt,F),this.b=y0(G,Zt,F-1/3)}return Fa.toWorkingColorSpace(this,Dt),this}setStyle(F,q=Iu){function lt(Zt){Zt!==void 0&&parseFloat(Zt)<1&&console.warn("THREE.Color: Alpha component of "+F+" will be ignored.")}let Dt;if(Dt=/^(\w+)\(([^\)]*)\)/.exec(F)){let Zt;const G=Dt[1],U=Dt[2];switch(G){case"rgb":case"rgba":if(Zt=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return lt(Zt[4]),this.setRGB(Math.min(255,parseInt(Zt[1],10))/255,Math.min(255,parseInt(Zt[2],10))/255,Math.min(255,parseInt(Zt[3],10))/255,q);if(Zt=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return lt(Zt[4]),this.setRGB(Math.min(100,parseInt(Zt[1],10))/100,Math.min(100,parseInt(Zt[2],10))/100,Math.min(100,parseInt(Zt[3],10))/100,q);break;case"hsl":case"hsla":if(Zt=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return lt(Zt[4]),this.setHSL(parseFloat(Zt[1])/360,parseFloat(Zt[2])/100,parseFloat(Zt[3])/100,q);break;default:console.warn("THREE.Color: Unknown color model "+F)}}else if(Dt=/^\#([A-Fa-f\d]+)$/.exec(F)){const Zt=Dt[1],G=Zt.length;if(G===3)return this.setRGB(parseInt(Zt.charAt(0),16)/15,parseInt(Zt.charAt(1),16)/15,parseInt(Zt.charAt(2),16)/15,q);if(G===6)return this.setHex(parseInt(Zt,16),q);console.warn("THREE.Color: Invalid hex color "+F)}else if(F&&F.length>0)return this.setColorName(F,q);return this}setColorName(F,q=Iu){const lt=n1[F.toLowerCase()];return lt!==void 0?this.setHex(lt,q):console.warn("THREE.Color: Unknown color "+F),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(F){return this.r=F.r,this.g=F.g,this.b=F.b,this}copySRGBToLinear(F){return this.r=av(F.r),this.g=av(F.g),this.b=av(F.b),this}copyLinearToSRGB(F){return this.r=a0(F.r),this.g=a0(F.g),this.b=a0(F.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(F=Iu){return Fa.fromWorkingColorSpace(cs.copy(this),F),Math.round(hs(cs.r*255,0,255))*65536+Math.round(hs(cs.g*255,0,255))*256+Math.round(hs(cs.b*255,0,255))}getHexString(F=Iu){return("000000"+this.getHex(F).toString(16)).slice(-6)}getHSL(F,q=Fa.workingColorSpace){Fa.fromWorkingColorSpace(cs.copy(this),q);const lt=cs.r,Dt=cs.g,Zt=cs.b,G=Math.max(lt,Dt,Zt),U=Math.min(lt,Dt,Zt);let t,g;const C=(U+G)/2;if(U===G)t=0,g=0;else{const i=G-U;switch(g=C<=.5?i/(G+U):i/(2-G-U),G){case lt:t=(Dt-Zt)/i+(Dt0!=F>0&&this.version++,this._alphaTest=F}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(F){if(F!==void 0)for(const q in F){const lt=F[q];if(lt===void 0){console.warn(`THREE.Material: parameter '${q}' has value of undefined.`);continue}const Dt=this[q];if(Dt===void 0){console.warn(`THREE.Material: '${q}' is not a property of THREE.${this.type}.`);continue}Dt&&Dt.isColor?Dt.set(lt):Dt&&Dt.isVector3&<&<.isVector3?Dt.copy(lt):this[q]=lt}}toJSON(F){const q=F===void 0||typeof F=="string";q&&(F={textures:{},images:{}});const lt={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};lt.uuid=this.uuid,lt.type=this.type,this.name!==""&&(lt.name=this.name),this.color&&this.color.isColor&&(lt.color=this.color.getHex()),this.roughness!==void 0&&(lt.roughness=this.roughness),this.metalness!==void 0&&(lt.metalness=this.metalness),this.sheen!==void 0&&(lt.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(lt.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(lt.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(lt.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(lt.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(lt.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(lt.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(lt.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(lt.shininess=this.shininess),this.clearcoat!==void 0&&(lt.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(lt.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(lt.clearcoatMap=this.clearcoatMap.toJSON(F).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(lt.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(F).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(lt.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(F).uuid,lt.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(lt.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(lt.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(lt.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(lt.iridescenceMap=this.iridescenceMap.toJSON(F).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(lt.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(F).uuid),this.anisotropy!==void 0&&(lt.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(lt.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(lt.anisotropyMap=this.anisotropyMap.toJSON(F).uuid),this.map&&this.map.isTexture&&(lt.map=this.map.toJSON(F).uuid),this.matcap&&this.matcap.isTexture&&(lt.matcap=this.matcap.toJSON(F).uuid),this.alphaMap&&this.alphaMap.isTexture&&(lt.alphaMap=this.alphaMap.toJSON(F).uuid),this.lightMap&&this.lightMap.isTexture&&(lt.lightMap=this.lightMap.toJSON(F).uuid,lt.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(lt.aoMap=this.aoMap.toJSON(F).uuid,lt.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(lt.bumpMap=this.bumpMap.toJSON(F).uuid,lt.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(lt.normalMap=this.normalMap.toJSON(F).uuid,lt.normalMapType=this.normalMapType,lt.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(lt.displacementMap=this.displacementMap.toJSON(F).uuid,lt.displacementScale=this.displacementScale,lt.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(lt.roughnessMap=this.roughnessMap.toJSON(F).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(lt.metalnessMap=this.metalnessMap.toJSON(F).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(lt.emissiveMap=this.emissiveMap.toJSON(F).uuid),this.specularMap&&this.specularMap.isTexture&&(lt.specularMap=this.specularMap.toJSON(F).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(lt.specularIntensityMap=this.specularIntensityMap.toJSON(F).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(lt.specularColorMap=this.specularColorMap.toJSON(F).uuid),this.envMap&&this.envMap.isTexture&&(lt.envMap=this.envMap.toJSON(F).uuid,this.combine!==void 0&&(lt.combine=this.combine)),this.envMapRotation!==void 0&&(lt.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(lt.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(lt.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(lt.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(lt.gradientMap=this.gradientMap.toJSON(F).uuid),this.transmission!==void 0&&(lt.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(lt.transmissionMap=this.transmissionMap.toJSON(F).uuid),this.thickness!==void 0&&(lt.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(lt.thicknessMap=this.thicknessMap.toJSON(F).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(lt.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(lt.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(lt.size=this.size),this.shadowSide!==null&&(lt.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(lt.sizeAttenuation=this.sizeAttenuation),this.blending!==nv&&(lt.blending=this.blending),this.side!==Nu&&(lt.side=this.side),this.vertexColors===!0&&(lt.vertexColors=!0),this.opacity<1&&(lt.opacity=this.opacity),this.transparent===!0&&(lt.transparent=!0),this.blendSrc!==I0&&(lt.blendSrc=this.blendSrc),this.blendDst!==F0&&(lt.blendDst=this.blendDst),this.blendEquation!==$c&&(lt.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(lt.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(lt.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(lt.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(lt.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(lt.blendAlpha=this.blendAlpha),this.depthFunc!==ap&&(lt.depthFunc=this.depthFunc),this.depthTest===!1&&(lt.depthTest=this.depthTest),this.depthWrite===!1&&(lt.depthWrite=this.depthWrite),this.colorWrite===!1&&(lt.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(lt.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Im&&(lt.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(lt.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(lt.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ih&&(lt.stencilFail=this.stencilFail),this.stencilZFail!==Ih&&(lt.stencilZFail=this.stencilZFail),this.stencilZPass!==Ih&&(lt.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(lt.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(lt.rotation=this.rotation),this.polygonOffset===!0&&(lt.polygonOffset=!0),this.polygonOffsetFactor!==0&&(lt.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(lt.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(lt.linewidth=this.linewidth),this.dashSize!==void 0&&(lt.dashSize=this.dashSize),this.gapSize!==void 0&&(lt.gapSize=this.gapSize),this.scale!==void 0&&(lt.scale=this.scale),this.dithering===!0&&(lt.dithering=!0),this.alphaTest>0&&(lt.alphaTest=this.alphaTest),this.alphaHash===!0&&(lt.alphaHash=!0),this.alphaToCoverage===!0&&(lt.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(lt.premultipliedAlpha=!0),this.forceSinglePass===!0&&(lt.forceSinglePass=!0),this.wireframe===!0&&(lt.wireframe=!0),this.wireframeLinewidth>1&&(lt.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(lt.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(lt.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(lt.flatShading=!0),this.visible===!1&&(lt.visible=!1),this.toneMapped===!1&&(lt.toneMapped=!1),this.fog===!1&&(lt.fog=!1),Object.keys(this.userData).length>0&&(lt.userData=this.userData);function Dt(Zt){const G=[];for(const U in Zt){const t=Zt[U];delete t.metadata,G.push(t)}return G}if(q){const Zt=Dt(F.textures),G=Dt(F.images);Zt.length>0&&(lt.textures=Zt),G.length>0&&(lt.images=G)}return lt}clone(){return new this.constructor().copy(this)}copy(F){this.name=F.name,this.blending=F.blending,this.side=F.side,this.vertexColors=F.vertexColors,this.opacity=F.opacity,this.transparent=F.transparent,this.blendSrc=F.blendSrc,this.blendDst=F.blendDst,this.blendEquation=F.blendEquation,this.blendSrcAlpha=F.blendSrcAlpha,this.blendDstAlpha=F.blendDstAlpha,this.blendEquationAlpha=F.blendEquationAlpha,this.blendColor.copy(F.blendColor),this.blendAlpha=F.blendAlpha,this.depthFunc=F.depthFunc,this.depthTest=F.depthTest,this.depthWrite=F.depthWrite,this.stencilWriteMask=F.stencilWriteMask,this.stencilFunc=F.stencilFunc,this.stencilRef=F.stencilRef,this.stencilFuncMask=F.stencilFuncMask,this.stencilFail=F.stencilFail,this.stencilZFail=F.stencilZFail,this.stencilZPass=F.stencilZPass,this.stencilWrite=F.stencilWrite;const q=F.clippingPlanes;let lt=null;if(q!==null){const Dt=q.length;lt=new Array(Dt);for(let Zt=0;Zt!==Dt;++Zt)lt[Zt]=q[Zt].clone()}return this.clippingPlanes=lt,this.clipIntersection=F.clipIntersection,this.clipShadows=F.clipShadows,this.shadowSide=F.shadowSide,this.colorWrite=F.colorWrite,this.precision=F.precision,this.polygonOffset=F.polygonOffset,this.polygonOffsetFactor=F.polygonOffsetFactor,this.polygonOffsetUnits=F.polygonOffsetUnits,this.dithering=F.dithering,this.alphaTest=F.alphaTest,this.alphaHash=F.alphaHash,this.alphaToCoverage=F.alphaToCoverage,this.premultipliedAlpha=F.premultipliedAlpha,this.forceSinglePass=F.forceSinglePass,this.visible=F.visible,this.toneMapped=F.toneMapped,this.userData=JSON.parse(JSON.stringify(F.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(F){F===!0&&this.version++}}class td extends ih{constructor(F){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ha(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Ss,this.combine=Vy,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(F)}copy(F){return super.copy(F),this.color.copy(F.color),this.map=F.map,this.lightMap=F.lightMap,this.lightMapIntensity=F.lightMapIntensity,this.aoMap=F.aoMap,this.aoMapIntensity=F.aoMapIntensity,this.specularMap=F.specularMap,this.alphaMap=F.alphaMap,this.envMap=F.envMap,this.envMapRotation.copy(F.envMapRotation),this.combine=F.combine,this.reflectivity=F.reflectivity,this.refractionRatio=F.refractionRatio,this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this.wireframeLinecap=F.wireframeLinecap,this.wireframeLinejoin=F.wireframeLinejoin,this.fog=F.fog,this}}const So=new bn,Bd=new Wi;class Ws{constructor(F,q,lt=!1){if(Array.isArray(F))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=F,this.itemSize=q,this.count=F!==void 0?F.length/q:0,this.normalized=lt,this.usage=B0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=hc,this.version=0}onUploadCallback(){}set needsUpdate(F){F===!0&&this.version++}get updateRange(){return t1("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(F){return this.usage=F,this}addUpdateRange(F,q){this.updateRanges.push({start:F,count:q})}clearUpdateRanges(){this.updateRanges.length=0}copy(F){return this.name=F.name,this.array=new F.array.constructor(F.array),this.itemSize=F.itemSize,this.count=F.count,this.normalized=F.normalized,this.usage=F.usage,this.gpuType=F.gpuType,this}copyAt(F,q,lt){F*=this.itemSize,lt*=q.itemSize;for(let Dt=0,Zt=this.itemSize;Dt0&&(F.userData=this.userData),this.parameters!==void 0){const t=this.parameters;for(const g in t)t[g]!==void 0&&(F[g]=t[g]);return F}F.data={attributes:{}};const q=this.index;q!==null&&(F.data.index={type:q.array.constructor.name,array:Array.prototype.slice.call(q.array)});const lt=this.attributes;for(const t in lt){const g=lt[t];F.data.attributes[t]=g.toJSON(F.data)}const Dt={};let Zt=!1;for(const t in this.morphAttributes){const g=this.morphAttributes[t],C=[];for(let i=0,S=g.length;i0&&(Dt[t]=C,Zt=!0)}Zt&&(F.data.morphAttributes=Dt,F.data.morphTargetsRelative=this.morphTargetsRelative);const G=this.groups;G.length>0&&(F.data.groups=JSON.parse(JSON.stringify(G)));const U=this.boundingSphere;return U!==null&&(F.data.boundingSphere={center:U.center.toArray(),radius:U.radius}),F}clone(){return new this.constructor().copy(this)}copy(F){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const q={};this.name=F.name;const lt=F.index;lt!==null&&this.setIndex(lt.clone(q));const Dt=F.attributes;for(const g in Dt){const C=Dt[g];this.setAttribute(g,C.clone(q))}const Zt=F.morphAttributes;for(const g in Zt){const C=[],i=Zt[g];for(let S=0,x=i.length;S0){const Dt=q[lt[0]];if(Dt!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Zt=0,G=Dt.length;Zt(F.far-F.near)**2))&&(jm.copy(Zt).invert(),Zc.copy(F.ray).applyMatrix4(jm),!(lt.boundingBox!==null&&Zc.intersectsBox(lt.boundingBox)===!1)&&this._computeIntersections(F,q,Zc)))}_computeIntersections(F,q,lt){let Dt;const Zt=this.geometry,G=this.material,U=Zt.index,t=Zt.attributes.position,g=Zt.attributes.uv,C=Zt.attributes.uv1,i=Zt.attributes.normal,S=Zt.groups,x=Zt.drawRange;if(U!==null)if(Array.isArray(G))for(let v=0,p=S.length;vq.far?null:{distance:g,point:Xd.clone(),object:_t}}function Zd(_t,F,q,lt,Dt,Zt,G,U,t,g){_t.getVertexPosition(U,Wh),_t.getVertexPosition(t,Yh),_t.getVertexPosition(g,Xh);const C=g2(_t,F,q,lt,Wh,Yh,Xh,Yd);if(C){Dt&&(Vd.fromBufferAttribute(Dt,U),Gd.fromBufferAttribute(Dt,t),Wd.fromBufferAttribute(Dt,g),C.uv=hu.getInterpolation(Yd,Wh,Yh,Xh,Vd,Gd,Wd,new Wi)),Zt&&(Vd.fromBufferAttribute(Zt,U),Gd.fromBufferAttribute(Zt,t),Wd.fromBufferAttribute(Zt,g),C.uv1=hu.getInterpolation(Yd,Wh,Yh,Xh,Vd,Gd,Wd,new Wi)),G&&(Jm.fromBufferAttribute(G,U),Qm.fromBufferAttribute(G,t),$m.fromBufferAttribute(G,g),C.normal=hu.getInterpolation(Yd,Wh,Yh,Xh,Jm,Qm,$m,new bn),C.normal.dot(lt.direction)>0&&C.normal.multiplyScalar(-1));const i={a:U,b:t,c:g,normal:new bn,materialIndex:0};hu.getNormal(Wh,Yh,Xh,i.normal),C.face=i}return C}class hv extends Ys{constructor(F=1,q=1,lt=1,Dt=1,Zt=1,G=1){super(),this.type="BoxGeometry",this.parameters={width:F,height:q,depth:lt,widthSegments:Dt,heightSegments:Zt,depthSegments:G};const U=this;Dt=Math.floor(Dt),Zt=Math.floor(Zt),G=Math.floor(G);const t=[],g=[],C=[],i=[];let S=0,x=0;v("z","y","x",-1,-1,lt,q,F,G,Zt,0),v("z","y","x",1,-1,lt,q,-F,G,Zt,1),v("x","z","y",1,1,F,lt,q,Dt,G,2),v("x","z","y",1,-1,F,lt,-q,Dt,G,3),v("x","y","z",1,-1,F,q,lt,Dt,Zt,4),v("x","y","z",-1,-1,F,q,-lt,Dt,Zt,5),this.setIndex(t),this.setAttribute("position",new _s(g,3)),this.setAttribute("normal",new _s(C,3)),this.setAttribute("uv",new _s(i,2));function v(p,r,e,a,n,f,c,l,m,h,b){const u=f/m,o=c/h,d=f/2,w=c/2,A=l/2,_=m+1,y=h+1;let E=0,T=0;const s=new bn;for(let L=0;L0?1:-1,C.push(s.x,s.y,s.z),i.push(z/m),i.push(1-L/h),E+=1}}for(let L=0;L>8&255]+fs[_t>>16&255]+fs[_t>>24&255]+"-"+fs[F&255]+fs[F>>8&255]+"-"+fs[F>>16&15|64]+fs[F>>24&255]+"-"+fs[q&63|128]+fs[q>>8&255]+"-"+fs[q>>16&255]+fs[q>>24&255]+fs[lt&255]+fs[lt>>8&255]+fs[lt>>16&255]+fs[lt>>24&255]).toLowerCase()}function hs(_t,F,q){return Math.max(F,Math.min(q,_t))}function Y0(_t,F){return(_t%F+F)%F}function kw(_t,F,q,lt,Dt){return lt+(_t-F)*(Dt-lt)/(q-F)}function Ow(_t,F,q){return _t!==F?(q-_t)/(F-_t):0}function Yv(_t,F,q){return(1-q)*_t+q*F}function Nw(_t,F,q,lt){return Yv(_t,F,1-Math.exp(-q*lt))}function Bw(_t,F=1){return F-Math.abs(Y0(_t,F*2)-F)}function Uw(_t,F,q){return _t<=F?0:_t>=q?1:(_t=(_t-F)/(q-F),_t*_t*(3-2*_t))}function Hw(_t,F,q){return _t<=F?0:_t>=q?1:(_t=(_t-F)/(q-F),_t*_t*_t*(_t*(_t*6-15)+10))}function Vw(_t,F){return _t+Math.floor(Math.random()*(F-_t+1))}function Gw(_t,F){return _t+Math.random()*(F-_t)}function Ww(_t){return _t*(.5-Math.random())}function Yw(_t){_t!==void 0&&(Fm=_t);let F=Fm+=1831565813;return F=Math.imul(F^F>>>15,F|1),F^=F+Math.imul(F^F>>>7,F|61),((F^F>>>14)>>>0)/4294967296}function Xw(_t){return _t*Wv}function Zw(_t){return _t*Zv}function jw(_t){return(_t&_t-1)===0&&_t!==0}function Kw(_t){return Math.pow(2,Math.ceil(Math.log(_t)/Math.LN2))}function Jw(_t){return Math.pow(2,Math.floor(Math.log(_t)/Math.LN2))}function Qw(_t,F,q,lt,Dt){const Zt=Math.cos,G=Math.sin,U=Zt(q/2),t=G(q/2),g=Zt((F+lt)/2),C=G((F+lt)/2),i=Zt((F-lt)/2),S=G((F-lt)/2),x=Zt((lt-F)/2),h=G((lt-F)/2);switch(Dt){case"XYX":_t.set(U*C,t*i,t*S,U*g);break;case"YZY":_t.set(t*S,U*C,t*i,U*g);break;case"ZXZ":_t.set(t*i,t*S,U*C,U*g);break;case"XZX":_t.set(U*C,t*h,t*x,U*g);break;case"YXY":_t.set(t*x,U*C,t*h,U*g);break;case"ZYZ":_t.set(t*h,t*x,U*C,U*g);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+Dt)}}function cu(_t,F){switch(F.constructor){case Float32Array:return _t;case Uint32Array:return _t/4294967295;case Uint16Array:return _t/65535;case Uint8Array:return _t/255;case Int32Array:return Math.max(_t/2147483647,-1);case Int16Array:return Math.max(_t/32767,-1);case Int8Array:return Math.max(_t/127,-1);default:throw new Error("Invalid component type.")}}function Pa(_t,F){switch(F.constructor){case Float32Array:return _t;case Uint32Array:return Math.round(_t*4294967295);case Uint16Array:return Math.round(_t*65535);case Uint8Array:return Math.round(_t*255);case Int32Array:return Math.round(_t*2147483647);case Int16Array:return Math.round(_t*32767);case Int8Array:return Math.round(_t*127);default:throw new Error("Invalid component type.")}}const $w={DEG2RAD:Wv,RAD2DEG:Zv,generateUUID:bf,clamp:hs,euclideanModulo:Y0,mapLinear:kw,inverseLerp:Ow,lerp:Yv,damp:Nw,pingpong:Bw,smoothstep:Uw,smootherstep:Hw,randInt:Vw,randFloat:Gw,randFloatSpread:Ww,seededRandom:Yw,degToRad:Xw,radToDeg:Zw,isPowerOfTwo:jw,ceilPowerOfTwo:Kw,floorPowerOfTwo:Jw,setQuaternionFromProperEuler:Qw,normalize:Pa,denormalize:cu};class Wi{constructor(F=0,q=0){Wi.prototype.isVector2=!0,this.x=F,this.y=q}get width(){return this.x}set width(F){this.x=F}get height(){return this.y}set height(F){this.y=F}set(F,q){return this.x=F,this.y=q,this}setScalar(F){return this.x=F,this.y=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y)}copy(F){return this.x=F.x,this.y=F.y,this}add(F){return this.x+=F.x,this.y+=F.y,this}addScalar(F){return this.x+=F,this.y+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this}subScalar(F){return this.x-=F,this.y-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this}multiply(F){return this.x*=F.x,this.y*=F.y,this}multiplyScalar(F){return this.x*=F,this.y*=F,this}divide(F){return this.x/=F.x,this.y/=F.y,this}divideScalar(F){return this.multiplyScalar(1/F)}applyMatrix3(F){const q=this.x,lt=this.y,Dt=F.elements;return this.x=Dt[0]*q+Dt[3]*lt+Dt[6],this.y=Dt[1]*q+Dt[4]*lt+Dt[7],this}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this}clampLength(F,q){const lt=this.length();return this.divideScalar(lt||1).multiplyScalar(Math.max(F,Math.min(q,lt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(F){return this.x*F.x+this.y*F.y}cross(F){return this.x*F.y-this.y*F.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(F){const q=Math.sqrt(this.lengthSq()*F.lengthSq());if(q===0)return Math.PI/2;const lt=this.dot(F)/q;return Math.acos(hs(lt,-1,1))}distanceTo(F){return Math.sqrt(this.distanceToSquared(F))}distanceToSquared(F){const q=this.x-F.x,lt=this.y-F.y;return q*q+lt*lt}manhattanDistanceTo(F){return Math.abs(this.x-F.x)+Math.abs(this.y-F.y)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this}lerpVectors(F,q,lt){return this.x=F.x+(q.x-F.x)*lt,this.y=F.y+(q.y-F.y)*lt,this}equals(F){return F.x===this.x&&F.y===this.y}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this}rotateAround(F,q){const lt=Math.cos(q),Dt=Math.sin(q),Zt=this.x-F.x,G=this.y-F.y;return this.x=Zt*lt-G*Dt+F.x,this.y=Zt*Dt+G*lt+F.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class fa{constructor(F,q,lt,Dt,Zt,G,U,t,g){fa.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],F!==void 0&&this.set(F,q,lt,Dt,Zt,G,U,t,g)}set(F,q,lt,Dt,Zt,G,U,t,g){const C=this.elements;return C[0]=F,C[1]=Dt,C[2]=U,C[3]=q,C[4]=Zt,C[5]=t,C[6]=lt,C[7]=G,C[8]=g,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(F){const q=this.elements,lt=F.elements;return q[0]=lt[0],q[1]=lt[1],q[2]=lt[2],q[3]=lt[3],q[4]=lt[4],q[5]=lt[5],q[6]=lt[6],q[7]=lt[7],q[8]=lt[8],this}extractBasis(F,q,lt){return F.setFromMatrix3Column(this,0),q.setFromMatrix3Column(this,1),lt.setFromMatrix3Column(this,2),this}setFromMatrix4(F){const q=F.elements;return this.set(q[0],q[4],q[8],q[1],q[5],q[9],q[2],q[6],q[10]),this}multiply(F){return this.multiplyMatrices(this,F)}premultiply(F){return this.multiplyMatrices(F,this)}multiplyMatrices(F,q){const lt=F.elements,Dt=q.elements,Zt=this.elements,G=lt[0],U=lt[3],t=lt[6],g=lt[1],C=lt[4],i=lt[7],S=lt[2],x=lt[5],h=lt[8],p=Dt[0],r=Dt[3],e=Dt[6],a=Dt[1],n=Dt[4],f=Dt[7],c=Dt[2],l=Dt[5],m=Dt[8];return Zt[0]=G*p+U*a+t*c,Zt[3]=G*r+U*n+t*l,Zt[6]=G*e+U*f+t*m,Zt[1]=g*p+C*a+i*c,Zt[4]=g*r+C*n+i*l,Zt[7]=g*e+C*f+i*m,Zt[2]=S*p+x*a+h*c,Zt[5]=S*r+x*n+h*l,Zt[8]=S*e+x*f+h*m,this}multiplyScalar(F){const q=this.elements;return q[0]*=F,q[3]*=F,q[6]*=F,q[1]*=F,q[4]*=F,q[7]*=F,q[2]*=F,q[5]*=F,q[8]*=F,this}determinant(){const F=this.elements,q=F[0],lt=F[1],Dt=F[2],Zt=F[3],G=F[4],U=F[5],t=F[6],g=F[7],C=F[8];return q*G*C-q*U*g-lt*Zt*C+lt*U*t+Dt*Zt*g-Dt*G*t}invert(){const F=this.elements,q=F[0],lt=F[1],Dt=F[2],Zt=F[3],G=F[4],U=F[5],t=F[6],g=F[7],C=F[8],i=C*G-U*g,S=U*t-C*Zt,x=g*Zt-G*t,h=q*i+lt*S+Dt*x;if(h===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/h;return F[0]=i*p,F[1]=(Dt*g-C*lt)*p,F[2]=(U*lt-Dt*G)*p,F[3]=S*p,F[4]=(C*q-Dt*t)*p,F[5]=(Dt*Zt-U*q)*p,F[6]=x*p,F[7]=(lt*t-g*q)*p,F[8]=(G*q-lt*Zt)*p,this}transpose(){let F;const q=this.elements;return F=q[1],q[1]=q[3],q[3]=F,F=q[2],q[2]=q[6],q[6]=F,F=q[5],q[5]=q[7],q[7]=F,this}getNormalMatrix(F){return this.setFromMatrix4(F).invert().transpose()}transposeIntoArray(F){const q=this.elements;return F[0]=q[0],F[1]=q[3],F[2]=q[6],F[3]=q[1],F[4]=q[4],F[5]=q[7],F[6]=q[2],F[7]=q[5],F[8]=q[8],this}setUvTransform(F,q,lt,Dt,Zt,G,U){const t=Math.cos(Zt),g=Math.sin(Zt);return this.set(lt*t,lt*g,-lt*(t*G+g*U)+G+F,-Dt*g,Dt*t,-Dt*(-g*G+t*U)+U+q,0,0,1),this}scale(F,q){return this.premultiply(n0.makeScale(F,q)),this}rotate(F){return this.premultiply(n0.makeRotation(-F)),this}translate(F,q){return this.premultiply(n0.makeTranslation(F,q)),this}makeTranslation(F,q){return F.isVector2?this.set(1,0,F.x,0,1,F.y,0,0,1):this.set(1,0,F,0,1,q,0,0,1),this}makeRotation(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(q,-lt,0,lt,q,0,0,0,1),this}makeScale(F,q){return this.set(F,0,0,0,q,0,0,0,1),this}equals(F){const q=this.elements,lt=F.elements;for(let Dt=0;Dt<9;Dt++)if(q[Dt]!==lt[Dt])return!1;return!0}fromArray(F,q=0){for(let lt=0;lt<9;lt++)this.elements[lt]=F[lt+q];return this}toArray(F=[],q=0){const lt=this.elements;return F[q]=lt[0],F[q+1]=lt[1],F[q+2]=lt[2],F[q+3]=lt[3],F[q+4]=lt[4],F[q+5]=lt[5],F[q+6]=lt[6],F[q+7]=lt[7],F[q+8]=lt[8],F}clone(){return new this.constructor().fromArray(this.elements)}}const n0=new fa;function $y(_t){for(let F=_t.length-1;F>=0;--F)if(_t[F]>=65535)return!0;return!1}function fp(_t){return document.createElementNS("http://www.w3.org/1999/xhtml",_t)}function qw(){const _t=fp("canvas");return _t.style.display="block",_t}const zm={};function qy(_t){_t in zm||(zm[_t]=!0,console.warn(_t))}const km=new fa().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Om=new fa().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Ld={[mc]:{transfer:op,primaries:sp,toReference:_t=>_t,fromReference:_t=>_t},[Iu]:{transfer:Ya,primaries:sp,toReference:_t=>_t.convertSRGBToLinear(),fromReference:_t=>_t.convertLinearToSRGB()},[vp]:{transfer:op,primaries:lp,toReference:_t=>_t.applyMatrix3(Om),fromReference:_t=>_t.applyMatrix3(km)},[W0]:{transfer:Ya,primaries:lp,toReference:_t=>_t.convertSRGBToLinear().applyMatrix3(Om),fromReference:_t=>_t.applyMatrix3(km).convertLinearToSRGB()}},t2=new Set([mc,vp]),Fa={enabled:!0,_workingColorSpace:mc,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(_t){if(!t2.has(_t))throw new Error(`Unsupported working color space, "${_t}".`);this._workingColorSpace=_t},convert:function(_t,F,q){if(this.enabled===!1||F===q||!F||!q)return _t;const lt=Ld[F].toReference,Dt=Ld[q].fromReference;return Dt(lt(_t))},fromWorkingColorSpace:function(_t,F){return this.convert(_t,this._workingColorSpace,F)},toWorkingColorSpace:function(_t,F){return this.convert(_t,F,this._workingColorSpace)},getPrimaries:function(_t){return Ld[_t].primaries},getTransfer:function(_t){return _t===cc?op:Ld[_t].transfer}};function av(_t){return _t<.04045?_t*.0773993808:Math.pow(_t*.9478672986+.0521327014,2.4)}function i0(_t){return _t<.0031308?_t*12.92:1.055*Math.pow(_t,.41666)-.055}let Fh;class e2{static getDataURL(F){if(/^data:/i.test(F.src)||typeof HTMLCanvasElement>"u")return F.src;let q;if(F instanceof HTMLCanvasElement)q=F;else{Fh===void 0&&(Fh=fp("canvas")),Fh.width=F.width,Fh.height=F.height;const lt=Fh.getContext("2d");F instanceof ImageData?lt.putImageData(F,0,0):lt.drawImage(F,0,0,F.width,F.height),q=Fh}return q.width>2048||q.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",F),q.toDataURL("image/jpeg",.6)):q.toDataURL("image/png")}static sRGBToLinear(F){if(typeof HTMLImageElement<"u"&&F instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&F instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&F instanceof ImageBitmap){const q=fp("canvas");q.width=F.width,q.height=F.height;const lt=q.getContext("2d");lt.drawImage(F,0,0,F.width,F.height);const Dt=lt.getImageData(0,0,F.width,F.height),Zt=Dt.data;for(let G=0;G0&&(lt.userData=this.userData),q||(F.textures[this.uuid]=lt),lt}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(F){if(this.mapping!==Vy)return F;if(F.applyMatrix3(this.matrix),F.x<0||F.x>1)switch(this.wrapS){case k0:F.x=F.x-Math.floor(F.x);break;case th:F.x=F.x<0?0:1;break;case O0:Math.abs(Math.floor(F.x)%2)===1?F.x=Math.ceil(F.x)-F.x:F.x=F.x-Math.floor(F.x);break}if(F.y<0||F.y>1)switch(this.wrapT){case k0:F.y=F.y-Math.floor(F.y);break;case th:F.y=F.y<0?0:1;break;case O0:Math.abs(Math.floor(F.y)%2)===1?F.y=Math.ceil(F.y)-F.y:F.y=F.y-Math.floor(F.y);break}return this.flipY&&(F.y=1-F.y),F}set needsUpdate(F){F===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(F){F===!0&&this.pmremVersion++}}Es.DEFAULT_IMAGE=null;Es.DEFAULT_MAPPING=Vy;Es.DEFAULT_ANISOTROPY=1;class No{constructor(F=0,q=0,lt=0,Dt=1){No.prototype.isVector4=!0,this.x=F,this.y=q,this.z=lt,this.w=Dt}get width(){return this.z}set width(F){this.z=F}get height(){return this.w}set height(F){this.w=F}set(F,q,lt,Dt){return this.x=F,this.y=q,this.z=lt,this.w=Dt,this}setScalar(F){return this.x=F,this.y=F,this.z=F,this.w=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setZ(F){return this.z=F,this}setW(F){return this.w=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;case 2:this.z=q;break;case 3:this.w=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(F){return this.x=F.x,this.y=F.y,this.z=F.z,this.w=F.w!==void 0?F.w:1,this}add(F){return this.x+=F.x,this.y+=F.y,this.z+=F.z,this.w+=F.w,this}addScalar(F){return this.x+=F,this.y+=F,this.z+=F,this.w+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this.z=F.z+q.z,this.w=F.w+q.w,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this.z+=F.z*q,this.w+=F.w*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this.z-=F.z,this.w-=F.w,this}subScalar(F){return this.x-=F,this.y-=F,this.z-=F,this.w-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this.z=F.z-q.z,this.w=F.w-q.w,this}multiply(F){return this.x*=F.x,this.y*=F.y,this.z*=F.z,this.w*=F.w,this}multiplyScalar(F){return this.x*=F,this.y*=F,this.z*=F,this.w*=F,this}applyMatrix4(F){const q=this.x,lt=this.y,Dt=this.z,Zt=this.w,G=F.elements;return this.x=G[0]*q+G[4]*lt+G[8]*Dt+G[12]*Zt,this.y=G[1]*q+G[5]*lt+G[9]*Dt+G[13]*Zt,this.z=G[2]*q+G[6]*lt+G[10]*Dt+G[14]*Zt,this.w=G[3]*q+G[7]*lt+G[11]*Dt+G[15]*Zt,this}divideScalar(F){return this.multiplyScalar(1/F)}setAxisAngleFromQuaternion(F){this.w=2*Math.acos(F.w);const q=Math.sqrt(1-F.w*F.w);return q<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=F.x/q,this.y=F.y/q,this.z=F.z/q),this}setAxisAngleFromRotationMatrix(F){let q,lt,Dt,Zt;const t=F.elements,g=t[0],C=t[4],i=t[8],S=t[1],x=t[5],h=t[9],p=t[2],r=t[6],e=t[10];if(Math.abs(C-S)<.01&&Math.abs(i-p)<.01&&Math.abs(h-r)<.01){if(Math.abs(C+S)<.1&&Math.abs(i+p)<.1&&Math.abs(h+r)<.1&&Math.abs(g+x+e-3)<.1)return this.set(1,0,0,0),this;q=Math.PI;const n=(g+1)/2,f=(x+1)/2,c=(e+1)/2,l=(C+S)/4,m=(i+p)/4,v=(h+r)/4;return n>f&&n>c?n<.01?(lt=0,Dt=.707106781,Zt=.707106781):(lt=Math.sqrt(n),Dt=l/lt,Zt=m/lt):f>c?f<.01?(lt=.707106781,Dt=0,Zt=.707106781):(Dt=Math.sqrt(f),lt=l/Dt,Zt=v/Dt):c<.01?(lt=.707106781,Dt=.707106781,Zt=0):(Zt=Math.sqrt(c),lt=m/Zt,Dt=v/Zt),this.set(lt,Dt,Zt,q),this}let a=Math.sqrt((r-h)*(r-h)+(i-p)*(i-p)+(S-C)*(S-C));return Math.abs(a)<.001&&(a=1),this.x=(r-h)/a,this.y=(i-p)/a,this.z=(S-C)/a,this.w=Math.acos((g+x+e-1)/2),this}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this.z=Math.min(this.z,F.z),this.w=Math.min(this.w,F.w),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this.z=Math.max(this.z,F.z),this.w=Math.max(this.w,F.w),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this.z=Math.max(F.z,Math.min(q.z,this.z)),this.w=Math.max(F.w,Math.min(q.w,this.w)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this.z=Math.max(F,Math.min(q,this.z)),this.w=Math.max(F,Math.min(q,this.w)),this}clampLength(F,q){const lt=this.length();return this.divideScalar(lt||1).multiplyScalar(Math.max(F,Math.min(q,lt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z+this.w*F.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this.z+=(F.z-this.z)*q,this.w+=(F.w-this.w)*q,this}lerpVectors(F,q,lt){return this.x=F.x+(q.x-F.x)*lt,this.y=F.y+(q.y-F.y)*lt,this.z=F.z+(q.z-F.z)*lt,this.w=F.w+(q.w-F.w)*lt,this}equals(F){return F.x===this.x&&F.y===this.y&&F.z===this.z&&F.w===this.w}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this.z=F[q+2],this.w=F[q+3],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F[q+2]=this.z,F[q+3]=this.w,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this.z=F.getZ(q),this.w=F.getW(q),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class i2 extends nh{constructor(F=1,q=1,lt={}){super(),this.isRenderTarget=!0,this.width=F,this.height=q,this.depth=1,this.scissor=new No(0,0,F,q),this.scissorTest=!1,this.viewport=new No(0,0,F,q);const Dt={width:F,height:q,depth:1};lt=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:fu,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0,count:1},lt);const Zt=new Es(Dt,lt.mapping,lt.wrapS,lt.wrapT,lt.magFilter,lt.minFilter,lt.format,lt.type,lt.anisotropy,lt.colorSpace);Zt.flipY=!1,Zt.generateMipmaps=lt.generateMipmaps,Zt.internalFormat=lt.internalFormat,this.textures=[];const G=lt.count;for(let U=0;U=0?1:-1,n=1-e*e;if(n>Number.EPSILON){const c=Math.sqrt(n),l=Math.atan2(c,e*a);r=Math.sin(r*l)/c,U=Math.sin(U*l)/c}const f=U*a;if(t=t*r+S*f,g=g*r+x*f,C=C*r+h*f,i=i*r+p*f,r===1-U){const c=1/Math.sqrt(t*t+g*g+C*C+i*i);t*=c,g*=c,C*=c,i*=c}}F[q]=t,F[q+1]=g,F[q+2]=C,F[q+3]=i}static multiplyQuaternionsFlat(F,q,lt,Dt,Zt,G){const U=lt[Dt],t=lt[Dt+1],g=lt[Dt+2],C=lt[Dt+3],i=Zt[G],S=Zt[G+1],x=Zt[G+2],h=Zt[G+3];return F[q]=U*h+C*i+t*x-g*S,F[q+1]=t*h+C*S+g*i-U*x,F[q+2]=g*h+C*x+U*S-t*i,F[q+3]=C*h-U*i-t*S-g*x,F}get x(){return this._x}set x(F){this._x=F,this._onChangeCallback()}get y(){return this._y}set y(F){this._y=F,this._onChangeCallback()}get z(){return this._z}set z(F){this._z=F,this._onChangeCallback()}get w(){return this._w}set w(F){this._w=F,this._onChangeCallback()}set(F,q,lt,Dt){return this._x=F,this._y=q,this._z=lt,this._w=Dt,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(F){return this._x=F.x,this._y=F.y,this._z=F.z,this._w=F.w,this._onChangeCallback(),this}setFromEuler(F,q=!0){const lt=F._x,Dt=F._y,Zt=F._z,G=F._order,U=Math.cos,t=Math.sin,g=U(lt/2),C=U(Dt/2),i=U(Zt/2),S=t(lt/2),x=t(Dt/2),h=t(Zt/2);switch(G){case"XYZ":this._x=S*C*i+g*x*h,this._y=g*x*i-S*C*h,this._z=g*C*h+S*x*i,this._w=g*C*i-S*x*h;break;case"YXZ":this._x=S*C*i+g*x*h,this._y=g*x*i-S*C*h,this._z=g*C*h-S*x*i,this._w=g*C*i+S*x*h;break;case"ZXY":this._x=S*C*i-g*x*h,this._y=g*x*i+S*C*h,this._z=g*C*h+S*x*i,this._w=g*C*i-S*x*h;break;case"ZYX":this._x=S*C*i-g*x*h,this._y=g*x*i+S*C*h,this._z=g*C*h-S*x*i,this._w=g*C*i+S*x*h;break;case"YZX":this._x=S*C*i+g*x*h,this._y=g*x*i+S*C*h,this._z=g*C*h-S*x*i,this._w=g*C*i-S*x*h;break;case"XZY":this._x=S*C*i-g*x*h,this._y=g*x*i-S*C*h,this._z=g*C*h+S*x*i,this._w=g*C*i+S*x*h;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+G)}return q===!0&&this._onChangeCallback(),this}setFromAxisAngle(F,q){const lt=q/2,Dt=Math.sin(lt);return this._x=F.x*Dt,this._y=F.y*Dt,this._z=F.z*Dt,this._w=Math.cos(lt),this._onChangeCallback(),this}setFromRotationMatrix(F){const q=F.elements,lt=q[0],Dt=q[4],Zt=q[8],G=q[1],U=q[5],t=q[9],g=q[2],C=q[6],i=q[10],S=lt+U+i;if(S>0){const x=.5/Math.sqrt(S+1);this._w=.25/x,this._x=(C-t)*x,this._y=(Zt-g)*x,this._z=(G-Dt)*x}else if(lt>U&<>i){const x=2*Math.sqrt(1+lt-U-i);this._w=(C-t)/x,this._x=.25*x,this._y=(Dt+G)/x,this._z=(Zt+g)/x}else if(U>i){const x=2*Math.sqrt(1+U-lt-i);this._w=(Zt-g)/x,this._x=(Dt+G)/x,this._y=.25*x,this._z=(t+C)/x}else{const x=2*Math.sqrt(1+i-lt-U);this._w=(G-Dt)/x,this._x=(Zt+g)/x,this._y=(t+C)/x,this._z=.25*x}return this._onChangeCallback(),this}setFromUnitVectors(F,q){let lt=F.dot(q)+1;return ltMath.abs(F.z)?(this._x=-F.y,this._y=F.x,this._z=0,this._w=lt):(this._x=0,this._y=-F.z,this._z=F.y,this._w=lt)):(this._x=F.y*q.z-F.z*q.y,this._y=F.z*q.x-F.x*q.z,this._z=F.x*q.y-F.y*q.x,this._w=lt),this.normalize()}angleTo(F){return 2*Math.acos(Math.abs(hs(this.dot(F),-1,1)))}rotateTowards(F,q){const lt=this.angleTo(F);if(lt===0)return this;const Dt=Math.min(1,q/lt);return this.slerp(F,Dt),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(F){return this._x*F._x+this._y*F._y+this._z*F._z+this._w*F._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let F=this.length();return F===0?(this._x=0,this._y=0,this._z=0,this._w=1):(F=1/F,this._x=this._x*F,this._y=this._y*F,this._z=this._z*F,this._w=this._w*F),this._onChangeCallback(),this}multiply(F){return this.multiplyQuaternions(this,F)}premultiply(F){return this.multiplyQuaternions(F,this)}multiplyQuaternions(F,q){const lt=F._x,Dt=F._y,Zt=F._z,G=F._w,U=q._x,t=q._y,g=q._z,C=q._w;return this._x=lt*C+G*U+Dt*g-Zt*t,this._y=Dt*C+G*t+Zt*U-lt*g,this._z=Zt*C+G*g+lt*t-Dt*U,this._w=G*C-lt*U-Dt*t-Zt*g,this._onChangeCallback(),this}slerp(F,q){if(q===0)return this;if(q===1)return this.copy(F);const lt=this._x,Dt=this._y,Zt=this._z,G=this._w;let U=G*F._w+lt*F._x+Dt*F._y+Zt*F._z;if(U<0?(this._w=-F._w,this._x=-F._x,this._y=-F._y,this._z=-F._z,U=-U):this.copy(F),U>=1)return this._w=G,this._x=lt,this._y=Dt,this._z=Zt,this;const t=1-U*U;if(t<=Number.EPSILON){const x=1-q;return this._w=x*G+q*this._w,this._x=x*lt+q*this._x,this._y=x*Dt+q*this._y,this._z=x*Zt+q*this._z,this.normalize(),this}const g=Math.sqrt(t),C=Math.atan2(g,U),i=Math.sin((1-q)*C)/g,S=Math.sin(q*C)/g;return this._w=G*i+this._w*S,this._x=lt*i+this._x*S,this._y=Dt*i+this._y*S,this._z=Zt*i+this._z*S,this._onChangeCallback(),this}slerpQuaternions(F,q,lt){return this.copy(F).slerp(q,lt)}random(){const F=2*Math.PI*Math.random(),q=2*Math.PI*Math.random(),lt=Math.random(),Dt=Math.sqrt(1-lt),Zt=Math.sqrt(lt);return this.set(Dt*Math.sin(F),Dt*Math.cos(F),Zt*Math.sin(q),Zt*Math.cos(q))}equals(F){return F._x===this._x&&F._y===this._y&&F._z===this._z&&F._w===this._w}fromArray(F,q=0){return this._x=F[q],this._y=F[q+1],this._z=F[q+2],this._w=F[q+3],this._onChangeCallback(),this}toArray(F=[],q=0){return F[q]=this._x,F[q+1]=this._y,F[q+2]=this._z,F[q+3]=this._w,F}fromBufferAttribute(F,q){return this._x=F.getX(q),this._y=F.getY(q),this._z=F.getZ(q),this._w=F.getW(q),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(F){return this._onChangeCallback=F,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class bn{constructor(F=0,q=0,lt=0){bn.prototype.isVector3=!0,this.x=F,this.y=q,this.z=lt}set(F,q,lt){return lt===void 0&&(lt=this.z),this.x=F,this.y=q,this.z=lt,this}setScalar(F){return this.x=F,this.y=F,this.z=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setZ(F){return this.z=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;case 2:this.z=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(F){return this.x=F.x,this.y=F.y,this.z=F.z,this}add(F){return this.x+=F.x,this.y+=F.y,this.z+=F.z,this}addScalar(F){return this.x+=F,this.y+=F,this.z+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this.z=F.z+q.z,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this.z+=F.z*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this.z-=F.z,this}subScalar(F){return this.x-=F,this.y-=F,this.z-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this.z=F.z-q.z,this}multiply(F){return this.x*=F.x,this.y*=F.y,this.z*=F.z,this}multiplyScalar(F){return this.x*=F,this.y*=F,this.z*=F,this}multiplyVectors(F,q){return this.x=F.x*q.x,this.y=F.y*q.y,this.z=F.z*q.z,this}applyEuler(F){return this.applyQuaternion(Nm.setFromEuler(F))}applyAxisAngle(F,q){return this.applyQuaternion(Nm.setFromAxisAngle(F,q))}applyMatrix3(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.elements;return this.x=Zt[0]*q+Zt[3]*lt+Zt[6]*Dt,this.y=Zt[1]*q+Zt[4]*lt+Zt[7]*Dt,this.z=Zt[2]*q+Zt[5]*lt+Zt[8]*Dt,this}applyNormalMatrix(F){return this.applyMatrix3(F).normalize()}applyMatrix4(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.elements,G=1/(Zt[3]*q+Zt[7]*lt+Zt[11]*Dt+Zt[15]);return this.x=(Zt[0]*q+Zt[4]*lt+Zt[8]*Dt+Zt[12])*G,this.y=(Zt[1]*q+Zt[5]*lt+Zt[9]*Dt+Zt[13])*G,this.z=(Zt[2]*q+Zt[6]*lt+Zt[10]*Dt+Zt[14])*G,this}applyQuaternion(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.x,G=F.y,U=F.z,t=F.w,g=2*(G*Dt-U*lt),C=2*(U*q-Zt*Dt),i=2*(Zt*lt-G*q);return this.x=q+t*g+G*i-U*C,this.y=lt+t*C+U*g-Zt*i,this.z=Dt+t*i+Zt*C-G*g,this}project(F){return this.applyMatrix4(F.matrixWorldInverse).applyMatrix4(F.projectionMatrix)}unproject(F){return this.applyMatrix4(F.projectionMatrixInverse).applyMatrix4(F.matrixWorld)}transformDirection(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.elements;return this.x=Zt[0]*q+Zt[4]*lt+Zt[8]*Dt,this.y=Zt[1]*q+Zt[5]*lt+Zt[9]*Dt,this.z=Zt[2]*q+Zt[6]*lt+Zt[10]*Dt,this.normalize()}divide(F){return this.x/=F.x,this.y/=F.y,this.z/=F.z,this}divideScalar(F){return this.multiplyScalar(1/F)}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this.z=Math.min(this.z,F.z),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this.z=Math.max(this.z,F.z),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this.z=Math.max(F.z,Math.min(q.z,this.z)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this.z=Math.max(F,Math.min(q,this.z)),this}clampLength(F,q){const lt=this.length();return this.divideScalar(lt||1).multiplyScalar(Math.max(F,Math.min(q,lt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this.z+=(F.z-this.z)*q,this}lerpVectors(F,q,lt){return this.x=F.x+(q.x-F.x)*lt,this.y=F.y+(q.y-F.y)*lt,this.z=F.z+(q.z-F.z)*lt,this}cross(F){return this.crossVectors(this,F)}crossVectors(F,q){const lt=F.x,Dt=F.y,Zt=F.z,G=q.x,U=q.y,t=q.z;return this.x=Dt*t-Zt*U,this.y=Zt*G-lt*t,this.z=lt*U-Dt*G,this}projectOnVector(F){const q=F.lengthSq();if(q===0)return this.set(0,0,0);const lt=F.dot(this)/q;return this.copy(F).multiplyScalar(lt)}projectOnPlane(F){return o0.copy(this).projectOnVector(F),this.sub(o0)}reflect(F){return this.sub(o0.copy(F).multiplyScalar(2*this.dot(F)))}angleTo(F){const q=Math.sqrt(this.lengthSq()*F.lengthSq());if(q===0)return Math.PI/2;const lt=this.dot(F)/q;return Math.acos(hs(lt,-1,1))}distanceTo(F){return Math.sqrt(this.distanceToSquared(F))}distanceToSquared(F){const q=this.x-F.x,lt=this.y-F.y,Dt=this.z-F.z;return q*q+lt*lt+Dt*Dt}manhattanDistanceTo(F){return Math.abs(this.x-F.x)+Math.abs(this.y-F.y)+Math.abs(this.z-F.z)}setFromSpherical(F){return this.setFromSphericalCoords(F.radius,F.phi,F.theta)}setFromSphericalCoords(F,q,lt){const Dt=Math.sin(q)*F;return this.x=Dt*Math.sin(lt),this.y=Math.cos(q)*F,this.z=Dt*Math.cos(lt),this}setFromCylindrical(F){return this.setFromCylindricalCoords(F.radius,F.theta,F.y)}setFromCylindricalCoords(F,q,lt){return this.x=F*Math.sin(q),this.y=lt,this.z=F*Math.cos(q),this}setFromMatrixPosition(F){const q=F.elements;return this.x=q[12],this.y=q[13],this.z=q[14],this}setFromMatrixScale(F){const q=this.setFromMatrixColumn(F,0).length(),lt=this.setFromMatrixColumn(F,1).length(),Dt=this.setFromMatrixColumn(F,2).length();return this.x=q,this.y=lt,this.z=Dt,this}setFromMatrixColumn(F,q){return this.fromArray(F.elements,q*4)}setFromMatrix3Column(F,q){return this.fromArray(F.elements,q*3)}setFromEuler(F){return this.x=F._x,this.y=F._y,this.z=F._z,this}setFromColor(F){return this.x=F.r,this.y=F.g,this.z=F.b,this}equals(F){return F.x===this.x&&F.y===this.y&&F.z===this.z}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this.z=F[q+2],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F[q+2]=this.z,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this.z=F.getZ(q),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const F=Math.random()*Math.PI*2,q=Math.random()*2-1,lt=Math.sqrt(1-q*q);return this.x=lt*Math.cos(F),this.y=q,this.z=lt*Math.sin(F),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const o0=new bn,Nm=new ku;class Jv{constructor(F=new bn(1/0,1/0,1/0),q=new bn(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=F,this.max=q}set(F,q){return this.min.copy(F),this.max.copy(q),this}setFromArray(F){this.makeEmpty();for(let q=0,lt=F.length;qthis.max.x||F.ythis.max.y||F.zthis.max.z)}containsBox(F){return this.min.x<=F.min.x&&F.max.x<=this.max.x&&this.min.y<=F.min.y&&F.max.y<=this.max.y&&this.min.z<=F.min.z&&F.max.z<=this.max.z}getParameter(F,q){return q.set((F.x-this.min.x)/(this.max.x-this.min.x),(F.y-this.min.y)/(this.max.y-this.min.y),(F.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(F){return!(F.max.xthis.max.x||F.max.ythis.max.y||F.max.zthis.max.z)}intersectsSphere(F){return this.clampPoint(F.center,ou),ou.distanceToSquared(F.center)<=F.radius*F.radius}intersectsPlane(F){let q,lt;return F.normal.x>0?(q=F.normal.x*this.min.x,lt=F.normal.x*this.max.x):(q=F.normal.x*this.max.x,lt=F.normal.x*this.min.x),F.normal.y>0?(q+=F.normal.y*this.min.y,lt+=F.normal.y*this.max.y):(q+=F.normal.y*this.max.y,lt+=F.normal.y*this.min.y),F.normal.z>0?(q+=F.normal.z*this.min.z,lt+=F.normal.z*this.max.z):(q+=F.normal.z*this.max.z,lt+=F.normal.z*this.min.z),q<=-F.constant&<>=-F.constant}intersectsTriangle(F){if(this.isEmpty())return!1;this.getCenter(kv),Rd.subVectors(this.max,kv),zh.subVectors(F.a,kv),kh.subVectors(F.b,kv),Oh.subVectors(F.c,kv),ic.subVectors(kh,zh),ac.subVectors(Oh,kh),Yc.subVectors(zh,Oh);let q=[0,-ic.z,ic.y,0,-ac.z,ac.y,0,-Yc.z,Yc.y,ic.z,0,-ic.x,ac.z,0,-ac.x,Yc.z,0,-Yc.x,-ic.y,ic.x,0,-ac.y,ac.x,0,-Yc.y,Yc.x,0];return!s0(q,zh,kh,Oh,Rd)||(q=[1,0,0,0,1,0,0,0,1],!s0(q,zh,kh,Oh,Rd))?!1:(Dd.crossVectors(ic,ac),q=[Dd.x,Dd.y,Dd.z],s0(q,zh,kh,Oh,Rd))}clampPoint(F,q){return q.copy(F).clamp(this.min,this.max)}distanceToPoint(F){return this.clampPoint(F,ou).distanceTo(F)}getBoundingSphere(F){return this.isEmpty()?F.makeEmpty():(this.getCenter(F.center),F.radius=this.getSize(ou).length()*.5),F}intersect(F){return this.min.max(F.min),this.max.min(F.max),this.isEmpty()&&this.makeEmpty(),this}union(F){return this.min.min(F.min),this.max.max(F.max),this}applyMatrix4(F){return this.isEmpty()?this:(hf[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(F),hf[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(F),hf[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(F),hf[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(F),hf[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(F),hf[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(F),hf[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(F),hf[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(F),this.setFromPoints(hf),this)}translate(F){return this.min.add(F),this.max.add(F),this}equals(F){return F.min.equals(this.min)&&F.max.equals(this.max)}}const hf=[new bn,new bn,new bn,new bn,new bn,new bn,new bn,new bn],ou=new bn,Pd=new Jv,zh=new bn,kh=new bn,Oh=new bn,ic=new bn,ac=new bn,Yc=new bn,kv=new bn,Rd=new bn,Dd=new bn,Xc=new bn;function s0(_t,F,q,lt,Dt){for(let Zt=0,G=_t.length-3;Zt<=G;Zt+=3){Xc.fromArray(_t,Zt);const U=Dt.x*Math.abs(Xc.x)+Dt.y*Math.abs(Xc.y)+Dt.z*Math.abs(Xc.z),t=F.dot(Xc),g=q.dot(Xc),C=lt.dot(Xc);if(Math.max(-Math.max(t,g,C),Math.min(t,g,C))>U)return!1}return!0}const o2=new Jv,Ov=new bn,l0=new bn;class Qv{constructor(F=new bn,q=-1){this.isSphere=!0,this.center=F,this.radius=q}set(F,q){return this.center.copy(F),this.radius=q,this}setFromPoints(F,q){const lt=this.center;q!==void 0?lt.copy(q):o2.setFromPoints(F).getCenter(lt);let Dt=0;for(let Zt=0,G=F.length;Ztthis.radius*this.radius&&(q.sub(this.center).normalize(),q.multiplyScalar(this.radius).add(this.center)),q}getBoundingBox(F){return this.isEmpty()?(F.makeEmpty(),F):(F.set(this.center,this.center),F.expandByScalar(this.radius),F)}applyMatrix4(F){return this.center.applyMatrix4(F),this.radius=this.radius*F.getMaxScaleOnAxis(),this}translate(F){return this.center.add(F),this}expandByPoint(F){if(this.isEmpty())return this.center.copy(F),this.radius=0,this;Ov.subVectors(F,this.center);const q=Ov.lengthSq();if(q>this.radius*this.radius){const lt=Math.sqrt(q),Dt=(lt-this.radius)*.5;this.center.addScaledVector(Ov,Dt/lt),this.radius+=Dt}return this}union(F){return F.isEmpty()?this:this.isEmpty()?(this.copy(F),this):(this.center.equals(F.center)===!0?this.radius=Math.max(this.radius,F.radius):(l0.subVectors(F.center,this.center).setLength(F.radius),this.expandByPoint(Ov.copy(F.center).add(l0)),this.expandByPoint(Ov.copy(F.center).sub(l0))),this)}equals(F){return F.center.equals(this.center)&&F.radius===this.radius}clone(){return new this.constructor().copy(this)}}const vf=new bn,u0=new bn,Id=new bn,oc=new bn,f0=new bn,Fd=new bn,c0=new bn;class $v{constructor(F=new bn,q=new bn(0,0,-1)){this.origin=F,this.direction=q}set(F,q){return this.origin.copy(F),this.direction.copy(q),this}copy(F){return this.origin.copy(F.origin),this.direction.copy(F.direction),this}at(F,q){return q.copy(this.origin).addScaledVector(this.direction,F)}lookAt(F){return this.direction.copy(F).sub(this.origin).normalize(),this}recast(F){return this.origin.copy(this.at(F,vf)),this}closestPointToPoint(F,q){q.subVectors(F,this.origin);const lt=q.dot(this.direction);return lt<0?q.copy(this.origin):q.copy(this.origin).addScaledVector(this.direction,lt)}distanceToPoint(F){return Math.sqrt(this.distanceSqToPoint(F))}distanceSqToPoint(F){const q=vf.subVectors(F,this.origin).dot(this.direction);return q<0?this.origin.distanceToSquared(F):(vf.copy(this.origin).addScaledVector(this.direction,q),vf.distanceToSquared(F))}distanceSqToSegment(F,q,lt,Dt){u0.copy(F).add(q).multiplyScalar(.5),Id.copy(q).sub(F).normalize(),oc.copy(this.origin).sub(u0);const Zt=F.distanceTo(q)*.5,G=-this.direction.dot(Id),U=oc.dot(this.direction),t=-oc.dot(Id),g=oc.lengthSq(),C=Math.abs(1-G*G);let i,S,x,h;if(C>0)if(i=G*t-U,S=G*U-t,h=Zt*C,i>=0)if(S>=-h)if(S<=h){const p=1/C;i*=p,S*=p,x=i*(i+G*S+2*U)+S*(G*i+S+2*t)+g}else S=Zt,i=Math.max(0,-(G*S+U)),x=-i*i+S*(S+2*t)+g;else S=-Zt,i=Math.max(0,-(G*S+U)),x=-i*i+S*(S+2*t)+g;else S<=-h?(i=Math.max(0,-(-G*Zt+U)),S=i>0?-Zt:Math.min(Math.max(-Zt,-t),Zt),x=-i*i+S*(S+2*t)+g):S<=h?(i=0,S=Math.min(Math.max(-Zt,-t),Zt),x=S*(S+2*t)+g):(i=Math.max(0,-(G*Zt+U)),S=i>0?Zt:Math.min(Math.max(-Zt,-t),Zt),x=-i*i+S*(S+2*t)+g);else S=G>0?-Zt:Zt,i=Math.max(0,-(G*S+U)),x=-i*i+S*(S+2*t)+g;return lt&<.copy(this.origin).addScaledVector(this.direction,i),Dt&&Dt.copy(u0).addScaledVector(Id,S),x}intersectSphere(F,q){vf.subVectors(F.center,this.origin);const lt=vf.dot(this.direction),Dt=vf.dot(vf)-lt*lt,Zt=F.radius*F.radius;if(Dt>Zt)return null;const G=Math.sqrt(Zt-Dt),U=lt-G,t=lt+G;return t<0?null:U<0?this.at(t,q):this.at(U,q)}intersectsSphere(F){return this.distanceSqToPoint(F.center)<=F.radius*F.radius}distanceToPlane(F){const q=F.normal.dot(this.direction);if(q===0)return F.distanceToPoint(this.origin)===0?0:null;const lt=-(this.origin.dot(F.normal)+F.constant)/q;return lt>=0?lt:null}intersectPlane(F,q){const lt=this.distanceToPlane(F);return lt===null?null:this.at(lt,q)}intersectsPlane(F){const q=F.distanceToPoint(this.origin);return q===0||F.normal.dot(this.direction)*q<0}intersectBox(F,q){let lt,Dt,Zt,G,U,t;const g=1/this.direction.x,C=1/this.direction.y,i=1/this.direction.z,S=this.origin;return g>=0?(lt=(F.min.x-S.x)*g,Dt=(F.max.x-S.x)*g):(lt=(F.max.x-S.x)*g,Dt=(F.min.x-S.x)*g),C>=0?(Zt=(F.min.y-S.y)*C,G=(F.max.y-S.y)*C):(Zt=(F.max.y-S.y)*C,G=(F.min.y-S.y)*C),lt>G||Zt>Dt||((Zt>lt||isNaN(lt))&&(lt=Zt),(G=0?(U=(F.min.z-S.z)*i,t=(F.max.z-S.z)*i):(U=(F.max.z-S.z)*i,t=(F.min.z-S.z)*i),lt>t||U>Dt)||((U>lt||lt!==lt)&&(lt=U),(t=0?lt:Dt,q)}intersectsBox(F){return this.intersectBox(F,vf)!==null}intersectTriangle(F,q,lt,Dt,Zt){f0.subVectors(q,F),Fd.subVectors(lt,F),c0.crossVectors(f0,Fd);let G=this.direction.dot(c0),U;if(G>0){if(Dt)return null;U=1}else if(G<0)U=-1,G=-G;else return null;oc.subVectors(this.origin,F);const t=U*this.direction.dot(Fd.crossVectors(oc,Fd));if(t<0)return null;const g=U*this.direction.dot(f0.cross(oc));if(g<0||t+g>G)return null;const C=-U*oc.dot(c0);return C<0?null:this.at(C/G,Zt)}applyMatrix4(F){return this.origin.applyMatrix4(F),this.direction.transformDirection(F),this}equals(F){return F.origin.equals(this.origin)&&F.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class so{constructor(F,q,lt,Dt,Zt,G,U,t,g,C,i,S,x,h,p,r){so.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],F!==void 0&&this.set(F,q,lt,Dt,Zt,G,U,t,g,C,i,S,x,h,p,r)}set(F,q,lt,Dt,Zt,G,U,t,g,C,i,S,x,h,p,r){const e=this.elements;return e[0]=F,e[4]=q,e[8]=lt,e[12]=Dt,e[1]=Zt,e[5]=G,e[9]=U,e[13]=t,e[2]=g,e[6]=C,e[10]=i,e[14]=S,e[3]=x,e[7]=h,e[11]=p,e[15]=r,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new so().fromArray(this.elements)}copy(F){const q=this.elements,lt=F.elements;return q[0]=lt[0],q[1]=lt[1],q[2]=lt[2],q[3]=lt[3],q[4]=lt[4],q[5]=lt[5],q[6]=lt[6],q[7]=lt[7],q[8]=lt[8],q[9]=lt[9],q[10]=lt[10],q[11]=lt[11],q[12]=lt[12],q[13]=lt[13],q[14]=lt[14],q[15]=lt[15],this}copyPosition(F){const q=this.elements,lt=F.elements;return q[12]=lt[12],q[13]=lt[13],q[14]=lt[14],this}setFromMatrix3(F){const q=F.elements;return this.set(q[0],q[3],q[6],0,q[1],q[4],q[7],0,q[2],q[5],q[8],0,0,0,0,1),this}extractBasis(F,q,lt){return F.setFromMatrixColumn(this,0),q.setFromMatrixColumn(this,1),lt.setFromMatrixColumn(this,2),this}makeBasis(F,q,lt){return this.set(F.x,q.x,lt.x,0,F.y,q.y,lt.y,0,F.z,q.z,lt.z,0,0,0,0,1),this}extractRotation(F){const q=this.elements,lt=F.elements,Dt=1/Nh.setFromMatrixColumn(F,0).length(),Zt=1/Nh.setFromMatrixColumn(F,1).length(),G=1/Nh.setFromMatrixColumn(F,2).length();return q[0]=lt[0]*Dt,q[1]=lt[1]*Dt,q[2]=lt[2]*Dt,q[3]=0,q[4]=lt[4]*Zt,q[5]=lt[5]*Zt,q[6]=lt[6]*Zt,q[7]=0,q[8]=lt[8]*G,q[9]=lt[9]*G,q[10]=lt[10]*G,q[11]=0,q[12]=0,q[13]=0,q[14]=0,q[15]=1,this}makeRotationFromEuler(F){const q=this.elements,lt=F.x,Dt=F.y,Zt=F.z,G=Math.cos(lt),U=Math.sin(lt),t=Math.cos(Dt),g=Math.sin(Dt),C=Math.cos(Zt),i=Math.sin(Zt);if(F.order==="XYZ"){const S=G*C,x=G*i,h=U*C,p=U*i;q[0]=t*C,q[4]=-t*i,q[8]=g,q[1]=x+h*g,q[5]=S-p*g,q[9]=-U*t,q[2]=p-S*g,q[6]=h+x*g,q[10]=G*t}else if(F.order==="YXZ"){const S=t*C,x=t*i,h=g*C,p=g*i;q[0]=S+p*U,q[4]=h*U-x,q[8]=G*g,q[1]=G*i,q[5]=G*C,q[9]=-U,q[2]=x*U-h,q[6]=p+S*U,q[10]=G*t}else if(F.order==="ZXY"){const S=t*C,x=t*i,h=g*C,p=g*i;q[0]=S-p*U,q[4]=-G*i,q[8]=h+x*U,q[1]=x+h*U,q[5]=G*C,q[9]=p-S*U,q[2]=-G*g,q[6]=U,q[10]=G*t}else if(F.order==="ZYX"){const S=G*C,x=G*i,h=U*C,p=U*i;q[0]=t*C,q[4]=h*g-x,q[8]=S*g+p,q[1]=t*i,q[5]=p*g+S,q[9]=x*g-h,q[2]=-g,q[6]=U*t,q[10]=G*t}else if(F.order==="YZX"){const S=G*t,x=G*g,h=U*t,p=U*g;q[0]=t*C,q[4]=p-S*i,q[8]=h*i+x,q[1]=i,q[5]=G*C,q[9]=-U*C,q[2]=-g*C,q[6]=x*i+h,q[10]=S-p*i}else if(F.order==="XZY"){const S=G*t,x=G*g,h=U*t,p=U*g;q[0]=t*C,q[4]=-i,q[8]=g*C,q[1]=S*i+p,q[5]=G*C,q[9]=x*i-h,q[2]=h*i-x,q[6]=U*C,q[10]=p*i+S}return q[3]=0,q[7]=0,q[11]=0,q[12]=0,q[13]=0,q[14]=0,q[15]=1,this}makeRotationFromQuaternion(F){return this.compose(s2,F,l2)}lookAt(F,q,lt){const Dt=this.elements;return al.subVectors(F,q),al.lengthSq()===0&&(al.z=1),al.normalize(),sc.crossVectors(lt,al),sc.lengthSq()===0&&(Math.abs(lt.z)===1?al.x+=1e-4:al.z+=1e-4,al.normalize(),sc.crossVectors(lt,al)),sc.normalize(),zd.crossVectors(al,sc),Dt[0]=sc.x,Dt[4]=zd.x,Dt[8]=al.x,Dt[1]=sc.y,Dt[5]=zd.y,Dt[9]=al.y,Dt[2]=sc.z,Dt[6]=zd.z,Dt[10]=al.z,this}multiply(F){return this.multiplyMatrices(this,F)}premultiply(F){return this.multiplyMatrices(F,this)}multiplyMatrices(F,q){const lt=F.elements,Dt=q.elements,Zt=this.elements,G=lt[0],U=lt[4],t=lt[8],g=lt[12],C=lt[1],i=lt[5],S=lt[9],x=lt[13],h=lt[2],p=lt[6],r=lt[10],e=lt[14],a=lt[3],n=lt[7],f=lt[11],c=lt[15],l=Dt[0],m=Dt[4],v=Dt[8],b=Dt[12],u=Dt[1],o=Dt[5],d=Dt[9],w=Dt[13],A=Dt[2],_=Dt[6],y=Dt[10],E=Dt[14],T=Dt[3],s=Dt[7],L=Dt[11],M=Dt[15];return Zt[0]=G*l+U*u+t*A+g*T,Zt[4]=G*m+U*o+t*_+g*s,Zt[8]=G*v+U*d+t*y+g*L,Zt[12]=G*b+U*w+t*E+g*M,Zt[1]=C*l+i*u+S*A+x*T,Zt[5]=C*m+i*o+S*_+x*s,Zt[9]=C*v+i*d+S*y+x*L,Zt[13]=C*b+i*w+S*E+x*M,Zt[2]=h*l+p*u+r*A+e*T,Zt[6]=h*m+p*o+r*_+e*s,Zt[10]=h*v+p*d+r*y+e*L,Zt[14]=h*b+p*w+r*E+e*M,Zt[3]=a*l+n*u+f*A+c*T,Zt[7]=a*m+n*o+f*_+c*s,Zt[11]=a*v+n*d+f*y+c*L,Zt[15]=a*b+n*w+f*E+c*M,this}multiplyScalar(F){const q=this.elements;return q[0]*=F,q[4]*=F,q[8]*=F,q[12]*=F,q[1]*=F,q[5]*=F,q[9]*=F,q[13]*=F,q[2]*=F,q[6]*=F,q[10]*=F,q[14]*=F,q[3]*=F,q[7]*=F,q[11]*=F,q[15]*=F,this}determinant(){const F=this.elements,q=F[0],lt=F[4],Dt=F[8],Zt=F[12],G=F[1],U=F[5],t=F[9],g=F[13],C=F[2],i=F[6],S=F[10],x=F[14],h=F[3],p=F[7],r=F[11],e=F[15];return h*(+Zt*t*i-Dt*g*i-Zt*U*S+lt*g*S+Dt*U*x-lt*t*x)+p*(+q*t*x-q*g*S+Zt*G*S-Dt*G*x+Dt*g*C-Zt*t*C)+r*(+q*g*i-q*U*x-Zt*G*i+lt*G*x+Zt*U*C-lt*g*C)+e*(-Dt*U*C-q*t*i+q*U*S+Dt*G*i-lt*G*S+lt*t*C)}transpose(){const F=this.elements;let q;return q=F[1],F[1]=F[4],F[4]=q,q=F[2],F[2]=F[8],F[8]=q,q=F[6],F[6]=F[9],F[9]=q,q=F[3],F[3]=F[12],F[12]=q,q=F[7],F[7]=F[13],F[13]=q,q=F[11],F[11]=F[14],F[14]=q,this}setPosition(F,q,lt){const Dt=this.elements;return F.isVector3?(Dt[12]=F.x,Dt[13]=F.y,Dt[14]=F.z):(Dt[12]=F,Dt[13]=q,Dt[14]=lt),this}invert(){const F=this.elements,q=F[0],lt=F[1],Dt=F[2],Zt=F[3],G=F[4],U=F[5],t=F[6],g=F[7],C=F[8],i=F[9],S=F[10],x=F[11],h=F[12],p=F[13],r=F[14],e=F[15],a=i*r*g-p*S*g+p*t*x-U*r*x-i*t*e+U*S*e,n=h*S*g-C*r*g-h*t*x+G*r*x+C*t*e-G*S*e,f=C*p*g-h*i*g+h*U*x-G*p*x-C*U*e+G*i*e,c=h*i*t-C*p*t-h*U*S+G*p*S+C*U*r-G*i*r,l=q*a+lt*n+Dt*f+Zt*c;if(l===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const m=1/l;return F[0]=a*m,F[1]=(p*S*Zt-i*r*Zt-p*Dt*x+lt*r*x+i*Dt*e-lt*S*e)*m,F[2]=(U*r*Zt-p*t*Zt+p*Dt*g-lt*r*g-U*Dt*e+lt*t*e)*m,F[3]=(i*t*Zt-U*S*Zt-i*Dt*g+lt*S*g+U*Dt*x-lt*t*x)*m,F[4]=n*m,F[5]=(C*r*Zt-h*S*Zt+h*Dt*x-q*r*x-C*Dt*e+q*S*e)*m,F[6]=(h*t*Zt-G*r*Zt-h*Dt*g+q*r*g+G*Dt*e-q*t*e)*m,F[7]=(G*S*Zt-C*t*Zt+C*Dt*g-q*S*g-G*Dt*x+q*t*x)*m,F[8]=f*m,F[9]=(h*i*Zt-C*p*Zt-h*lt*x+q*p*x+C*lt*e-q*i*e)*m,F[10]=(G*p*Zt-h*U*Zt+h*lt*g-q*p*g-G*lt*e+q*U*e)*m,F[11]=(C*U*Zt-G*i*Zt-C*lt*g+q*i*g+G*lt*x-q*U*x)*m,F[12]=c*m,F[13]=(C*p*Dt-h*i*Dt+h*lt*S-q*p*S-C*lt*r+q*i*r)*m,F[14]=(h*U*Dt-G*p*Dt-h*lt*t+q*p*t+G*lt*r-q*U*r)*m,F[15]=(G*i*Dt-C*U*Dt+C*lt*t-q*i*t-G*lt*S+q*U*S)*m,this}scale(F){const q=this.elements,lt=F.x,Dt=F.y,Zt=F.z;return q[0]*=lt,q[4]*=Dt,q[8]*=Zt,q[1]*=lt,q[5]*=Dt,q[9]*=Zt,q[2]*=lt,q[6]*=Dt,q[10]*=Zt,q[3]*=lt,q[7]*=Dt,q[11]*=Zt,this}getMaxScaleOnAxis(){const F=this.elements,q=F[0]*F[0]+F[1]*F[1]+F[2]*F[2],lt=F[4]*F[4]+F[5]*F[5]+F[6]*F[6],Dt=F[8]*F[8]+F[9]*F[9]+F[10]*F[10];return Math.sqrt(Math.max(q,lt,Dt))}makeTranslation(F,q,lt){return F.isVector3?this.set(1,0,0,F.x,0,1,0,F.y,0,0,1,F.z,0,0,0,1):this.set(1,0,0,F,0,1,0,q,0,0,1,lt,0,0,0,1),this}makeRotationX(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(1,0,0,0,0,q,-lt,0,0,lt,q,0,0,0,0,1),this}makeRotationY(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(q,0,lt,0,0,1,0,0,-lt,0,q,0,0,0,0,1),this}makeRotationZ(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(q,-lt,0,0,lt,q,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(F,q){const lt=Math.cos(q),Dt=Math.sin(q),Zt=1-lt,G=F.x,U=F.y,t=F.z,g=Zt*G,C=Zt*U;return this.set(g*G+lt,g*U-Dt*t,g*t+Dt*U,0,g*U+Dt*t,C*U+lt,C*t-Dt*G,0,g*t-Dt*U,C*t+Dt*G,Zt*t*t+lt,0,0,0,0,1),this}makeScale(F,q,lt){return this.set(F,0,0,0,0,q,0,0,0,0,lt,0,0,0,0,1),this}makeShear(F,q,lt,Dt,Zt,G){return this.set(1,lt,Zt,0,F,1,G,0,q,Dt,1,0,0,0,0,1),this}compose(F,q,lt){const Dt=this.elements,Zt=q._x,G=q._y,U=q._z,t=q._w,g=Zt+Zt,C=G+G,i=U+U,S=Zt*g,x=Zt*C,h=Zt*i,p=G*C,r=G*i,e=U*i,a=t*g,n=t*C,f=t*i,c=lt.x,l=lt.y,m=lt.z;return Dt[0]=(1-(p+e))*c,Dt[1]=(x+f)*c,Dt[2]=(h-n)*c,Dt[3]=0,Dt[4]=(x-f)*l,Dt[5]=(1-(S+e))*l,Dt[6]=(r+a)*l,Dt[7]=0,Dt[8]=(h+n)*m,Dt[9]=(r-a)*m,Dt[10]=(1-(S+p))*m,Dt[11]=0,Dt[12]=F.x,Dt[13]=F.y,Dt[14]=F.z,Dt[15]=1,this}decompose(F,q,lt){const Dt=this.elements;let Zt=Nh.set(Dt[0],Dt[1],Dt[2]).length();const G=Nh.set(Dt[4],Dt[5],Dt[6]).length(),U=Nh.set(Dt[8],Dt[9],Dt[10]).length();this.determinant()<0&&(Zt=-Zt),F.x=Dt[12],F.y=Dt[13],F.z=Dt[14],su.copy(this);const g=1/Zt,C=1/G,i=1/U;return su.elements[0]*=g,su.elements[1]*=g,su.elements[2]*=g,su.elements[4]*=C,su.elements[5]*=C,su.elements[6]*=C,su.elements[8]*=i,su.elements[9]*=i,su.elements[10]*=i,q.setFromRotationMatrix(su),lt.x=Zt,lt.y=G,lt.z=U,this}makePerspective(F,q,lt,Dt,Zt,G,U=xf){const t=this.elements,g=2*Zt/(q-F),C=2*Zt/(lt-Dt),i=(q+F)/(q-F),S=(lt+Dt)/(lt-Dt);let x,h;if(U===xf)x=-(G+Zt)/(G-Zt),h=-2*G*Zt/(G-Zt);else if(U===up)x=-G/(G-Zt),h=-G*Zt/(G-Zt);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+U);return t[0]=g,t[4]=0,t[8]=i,t[12]=0,t[1]=0,t[5]=C,t[9]=S,t[13]=0,t[2]=0,t[6]=0,t[10]=x,t[14]=h,t[3]=0,t[7]=0,t[11]=-1,t[15]=0,this}makeOrthographic(F,q,lt,Dt,Zt,G,U=xf){const t=this.elements,g=1/(q-F),C=1/(lt-Dt),i=1/(G-Zt),S=(q+F)*g,x=(lt+Dt)*C;let h,p;if(U===xf)h=(G+Zt)*i,p=-2*i;else if(U===up)h=Zt*i,p=-1*i;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+U);return t[0]=2*g,t[4]=0,t[8]=0,t[12]=-S,t[1]=0,t[5]=2*C,t[9]=0,t[13]=-x,t[2]=0,t[6]=0,t[10]=p,t[14]=-h,t[3]=0,t[7]=0,t[11]=0,t[15]=1,this}equals(F){const q=this.elements,lt=F.elements;for(let Dt=0;Dt<16;Dt++)if(q[Dt]!==lt[Dt])return!1;return!0}fromArray(F,q=0){for(let lt=0;lt<16;lt++)this.elements[lt]=F[lt+q];return this}toArray(F=[],q=0){const lt=this.elements;return F[q]=lt[0],F[q+1]=lt[1],F[q+2]=lt[2],F[q+3]=lt[3],F[q+4]=lt[4],F[q+5]=lt[5],F[q+6]=lt[6],F[q+7]=lt[7],F[q+8]=lt[8],F[q+9]=lt[9],F[q+10]=lt[10],F[q+11]=lt[11],F[q+12]=lt[12],F[q+13]=lt[13],F[q+14]=lt[14],F[q+15]=lt[15],F}}const Nh=new bn,su=new so,s2=new bn(0,0,0),l2=new bn(1,1,1),sc=new bn,zd=new bn,al=new bn,Bm=new so,Um=new ku;class Ss{constructor(F=0,q=0,lt=0,Dt=Ss.DEFAULT_ORDER){this.isEuler=!0,this._x=F,this._y=q,this._z=lt,this._order=Dt}get x(){return this._x}set x(F){this._x=F,this._onChangeCallback()}get y(){return this._y}set y(F){this._y=F,this._onChangeCallback()}get z(){return this._z}set z(F){this._z=F,this._onChangeCallback()}get order(){return this._order}set order(F){this._order=F,this._onChangeCallback()}set(F,q,lt,Dt=this._order){return this._x=F,this._y=q,this._z=lt,this._order=Dt,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(F){return this._x=F._x,this._y=F._y,this._z=F._z,this._order=F._order,this._onChangeCallback(),this}setFromRotationMatrix(F,q=this._order,lt=!0){const Dt=F.elements,Zt=Dt[0],G=Dt[4],U=Dt[8],t=Dt[1],g=Dt[5],C=Dt[9],i=Dt[2],S=Dt[6],x=Dt[10];switch(q){case"XYZ":this._y=Math.asin(hs(U,-1,1)),Math.abs(U)<.9999999?(this._x=Math.atan2(-C,x),this._z=Math.atan2(-G,Zt)):(this._x=Math.atan2(S,g),this._z=0);break;case"YXZ":this._x=Math.asin(-hs(C,-1,1)),Math.abs(C)<.9999999?(this._y=Math.atan2(U,x),this._z=Math.atan2(t,g)):(this._y=Math.atan2(-i,Zt),this._z=0);break;case"ZXY":this._x=Math.asin(hs(S,-1,1)),Math.abs(S)<.9999999?(this._y=Math.atan2(-i,x),this._z=Math.atan2(-G,g)):(this._y=0,this._z=Math.atan2(t,Zt));break;case"ZYX":this._y=Math.asin(-hs(i,-1,1)),Math.abs(i)<.9999999?(this._x=Math.atan2(S,x),this._z=Math.atan2(t,Zt)):(this._x=0,this._z=Math.atan2(-G,g));break;case"YZX":this._z=Math.asin(hs(t,-1,1)),Math.abs(t)<.9999999?(this._x=Math.atan2(-C,g),this._y=Math.atan2(-i,Zt)):(this._x=0,this._y=Math.atan2(U,x));break;case"XZY":this._z=Math.asin(-hs(G,-1,1)),Math.abs(G)<.9999999?(this._x=Math.atan2(S,g),this._y=Math.atan2(U,Zt)):(this._x=Math.atan2(-C,x),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+q)}return this._order=q,lt===!0&&this._onChangeCallback(),this}setFromQuaternion(F,q,lt){return Bm.makeRotationFromQuaternion(F),this.setFromRotationMatrix(Bm,q,lt)}setFromVector3(F,q=this._order){return this.set(F.x,F.y,F.z,q)}reorder(F){return Um.setFromEuler(this),this.setFromQuaternion(Um,F)}equals(F){return F._x===this._x&&F._y===this._y&&F._z===this._z&&F._order===this._order}fromArray(F){return this._x=F[0],this._y=F[1],this._z=F[2],F[3]!==void 0&&(this._order=F[3]),this._onChangeCallback(),this}toArray(F=[],q=0){return F[q]=this._x,F[q+1]=this._y,F[q+2]=this._z,F[q+3]=this._order,F}_onChange(F){return this._onChangeCallback=F,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Ss.DEFAULT_ORDER="XYZ";class X0{constructor(){this.mask=1}set(F){this.mask=(1<>>0}enable(F){this.mask|=1<1){for(let q=0;q1){for(let lt=0;lt0&&(Dt.userData=this.userData),Dt.layers=this.layers.mask,Dt.matrix=this.matrix.toArray(),Dt.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(Dt.matrixAutoUpdate=!1),this.isInstancedMesh&&(Dt.type="InstancedMesh",Dt.count=this.count,Dt.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(Dt.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(Dt.type="BatchedMesh",Dt.perObjectFrustumCulled=this.perObjectFrustumCulled,Dt.sortObjects=this.sortObjects,Dt.drawRanges=this._drawRanges,Dt.reservedRanges=this._reservedRanges,Dt.visibility=this._visibility,Dt.active=this._active,Dt.bounds=this._bounds.map(U=>({boxInitialized:U.boxInitialized,boxMin:U.box.min.toArray(),boxMax:U.box.max.toArray(),sphereInitialized:U.sphereInitialized,sphereRadius:U.sphere.radius,sphereCenter:U.sphere.center.toArray()})),Dt.maxGeometryCount=this._maxGeometryCount,Dt.maxVertexCount=this._maxVertexCount,Dt.maxIndexCount=this._maxIndexCount,Dt.geometryInitialized=this._geometryInitialized,Dt.geometryCount=this._geometryCount,Dt.matricesTexture=this._matricesTexture.toJSON(F),this.boundingSphere!==null&&(Dt.boundingSphere={center:Dt.boundingSphere.center.toArray(),radius:Dt.boundingSphere.radius}),this.boundingBox!==null&&(Dt.boundingBox={min:Dt.boundingBox.min.toArray(),max:Dt.boundingBox.max.toArray()}));function Zt(U,t){return U[t.uuid]===void 0&&(U[t.uuid]=t.toJSON(F)),t.uuid}if(this.isScene)this.background&&(this.background.isColor?Dt.background=this.background.toJSON():this.background.isTexture&&(Dt.background=this.background.toJSON(F).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(Dt.environment=this.environment.toJSON(F).uuid);else if(this.isMesh||this.isLine||this.isPoints){Dt.geometry=Zt(F.geometries,this.geometry);const U=this.geometry.parameters;if(U!==void 0&&U.shapes!==void 0){const t=U.shapes;if(Array.isArray(t))for(let g=0,C=t.length;g0){Dt.children=[];for(let U=0;U0){Dt.animations=[];for(let U=0;U0&&(lt.geometries=U),t.length>0&&(lt.materials=t),g.length>0&&(lt.textures=g),C.length>0&&(lt.images=C),i.length>0&&(lt.shapes=i),S.length>0&&(lt.skeletons=S),x.length>0&&(lt.animations=x),h.length>0&&(lt.nodes=h)}return lt.object=Dt,lt;function G(U){const t=[];for(const g in U){const C=U[g];delete C.metadata,t.push(C)}return t}}clone(F){return new this.constructor().copy(this,F)}copy(F,q=!0){if(this.name=F.name,this.up.copy(F.up),this.position.copy(F.position),this.rotation.order=F.rotation.order,this.quaternion.copy(F.quaternion),this.scale.copy(F.scale),this.matrix.copy(F.matrix),this.matrixWorld.copy(F.matrixWorld),this.matrixAutoUpdate=F.matrixAutoUpdate,this.matrixWorldAutoUpdate=F.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=F.matrixWorldNeedsUpdate,this.layers.mask=F.layers.mask,this.visible=F.visible,this.castShadow=F.castShadow,this.receiveShadow=F.receiveShadow,this.frustumCulled=F.frustumCulled,this.renderOrder=F.renderOrder,this.animations=F.animations.slice(),this.userData=JSON.parse(JSON.stringify(F.userData)),q===!0)for(let lt=0;lt0?Dt.multiplyScalar(1/Math.sqrt(Zt)):Dt.set(0,0,0)}static getBarycoord(F,q,lt,Dt,Zt){lu.subVectors(Dt,q),pf.subVectors(lt,q),v0.subVectors(F,q);const G=lu.dot(lu),U=lu.dot(pf),t=lu.dot(v0),g=pf.dot(pf),C=pf.dot(v0),i=G*g-U*U;if(i===0)return Zt.set(0,0,0),null;const S=1/i,x=(g*t-U*C)*S,h=(G*C-U*t)*S;return Zt.set(1-x-h,h,x)}static containsPoint(F,q,lt,Dt){return this.getBarycoord(F,q,lt,Dt,gf)===null?!1:gf.x>=0&&gf.y>=0&&gf.x+gf.y<=1}static getInterpolation(F,q,lt,Dt,Zt,G,U,t){return this.getBarycoord(F,q,lt,Dt,gf)===null?(t.x=0,t.y=0,"z"in t&&(t.z=0),"w"in t&&(t.w=0),null):(t.setScalar(0),t.addScaledVector(Zt,gf.x),t.addScaledVector(G,gf.y),t.addScaledVector(U,gf.z),t)}static isFrontFacing(F,q,lt,Dt){return lu.subVectors(lt,q),pf.subVectors(F,q),lu.cross(pf).dot(Dt)<0}set(F,q,lt){return this.a.copy(F),this.b.copy(q),this.c.copy(lt),this}setFromPointsAndIndices(F,q,lt,Dt){return this.a.copy(F[q]),this.b.copy(F[lt]),this.c.copy(F[Dt]),this}setFromAttributeAndIndices(F,q,lt,Dt){return this.a.fromBufferAttribute(F,q),this.b.fromBufferAttribute(F,lt),this.c.fromBufferAttribute(F,Dt),this}clone(){return new this.constructor().copy(this)}copy(F){return this.a.copy(F.a),this.b.copy(F.b),this.c.copy(F.c),this}getArea(){return lu.subVectors(this.c,this.b),pf.subVectors(this.a,this.b),lu.cross(pf).length()*.5}getMidpoint(F){return F.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(F){return hu.getNormal(this.a,this.b,this.c,F)}getPlane(F){return F.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(F,q){return hu.getBarycoord(F,this.a,this.b,this.c,q)}getInterpolation(F,q,lt,Dt,Zt){return hu.getInterpolation(F,this.a,this.b,this.c,q,lt,Dt,Zt)}containsPoint(F){return hu.containsPoint(F,this.a,this.b,this.c)}isFrontFacing(F){return hu.isFrontFacing(this.a,this.b,this.c,F)}intersectsBox(F){return F.intersectsTriangle(this)}closestPointToPoint(F,q){const lt=this.a,Dt=this.b,Zt=this.c;let G,U;Hh.subVectors(Dt,lt),Vh.subVectors(Zt,lt),d0.subVectors(F,lt);const t=Hh.dot(d0),g=Vh.dot(d0);if(t<=0&&g<=0)return q.copy(lt);p0.subVectors(F,Dt);const C=Hh.dot(p0),i=Vh.dot(p0);if(C>=0&&i<=C)return q.copy(Dt);const S=t*i-C*g;if(S<=0&&t>=0&&C<=0)return G=t/(t-C),q.copy(lt).addScaledVector(Hh,G);g0.subVectors(F,Zt);const x=Hh.dot(g0),h=Vh.dot(g0);if(h>=0&&x<=h)return q.copy(Zt);const p=x*g-t*h;if(p<=0&&g>=0&&h<=0)return U=g/(g-h),q.copy(lt).addScaledVector(Vh,U);const r=C*h-x*i;if(r<=0&&i-C>=0&&x-h>=0)return Xm.subVectors(Zt,Dt),U=(i-C)/(i-C+(x-h)),q.copy(Dt).addScaledVector(Xm,U);const e=1/(r+p+S);return G=p*e,U=S*e,q.copy(lt).addScaledVector(Hh,G).addScaledVector(Vh,U)}equals(F){return F.a.equals(this.a)&&F.b.equals(this.b)&&F.c.equals(this.c)}}const r1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},lc={h:0,s:0,l:0},Od={h:0,s:0,l:0};function m0(_t,F,q){return q<0&&(q+=1),q>1&&(q-=1),q<1/6?_t+(F-_t)*6*q:q<1/2?F:q<2/3?_t+(F-_t)*6*(2/3-q):_t}class ha{constructor(F,q,lt){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(F,q,lt)}set(F,q,lt){if(q===void 0&<===void 0){const Dt=F;Dt&&Dt.isColor?this.copy(Dt):typeof Dt=="number"?this.setHex(Dt):typeof Dt=="string"&&this.setStyle(Dt)}else this.setRGB(F,q,lt);return this}setScalar(F){return this.r=F,this.g=F,this.b=F,this}setHex(F,q=Iu){return F=Math.floor(F),this.r=(F>>16&255)/255,this.g=(F>>8&255)/255,this.b=(F&255)/255,Fa.toWorkingColorSpace(this,q),this}setRGB(F,q,lt,Dt=Fa.workingColorSpace){return this.r=F,this.g=q,this.b=lt,Fa.toWorkingColorSpace(this,Dt),this}setHSL(F,q,lt,Dt=Fa.workingColorSpace){if(F=Y0(F,1),q=hs(q,0,1),lt=hs(lt,0,1),q===0)this.r=this.g=this.b=lt;else{const Zt=lt<=.5?lt*(1+q):lt+q-lt*q,G=2*lt-Zt;this.r=m0(G,Zt,F+1/3),this.g=m0(G,Zt,F),this.b=m0(G,Zt,F-1/3)}return Fa.toWorkingColorSpace(this,Dt),this}setStyle(F,q=Iu){function lt(Zt){Zt!==void 0&&parseFloat(Zt)<1&&console.warn("THREE.Color: Alpha component of "+F+" will be ignored.")}let Dt;if(Dt=/^(\w+)\(([^\)]*)\)/.exec(F)){let Zt;const G=Dt[1],U=Dt[2];switch(G){case"rgb":case"rgba":if(Zt=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return lt(Zt[4]),this.setRGB(Math.min(255,parseInt(Zt[1],10))/255,Math.min(255,parseInt(Zt[2],10))/255,Math.min(255,parseInt(Zt[3],10))/255,q);if(Zt=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return lt(Zt[4]),this.setRGB(Math.min(100,parseInt(Zt[1],10))/100,Math.min(100,parseInt(Zt[2],10))/100,Math.min(100,parseInt(Zt[3],10))/100,q);break;case"hsl":case"hsla":if(Zt=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return lt(Zt[4]),this.setHSL(parseFloat(Zt[1])/360,parseFloat(Zt[2])/100,parseFloat(Zt[3])/100,q);break;default:console.warn("THREE.Color: Unknown color model "+F)}}else if(Dt=/^\#([A-Fa-f\d]+)$/.exec(F)){const Zt=Dt[1],G=Zt.length;if(G===3)return this.setRGB(parseInt(Zt.charAt(0),16)/15,parseInt(Zt.charAt(1),16)/15,parseInt(Zt.charAt(2),16)/15,q);if(G===6)return this.setHex(parseInt(Zt,16),q);console.warn("THREE.Color: Invalid hex color "+F)}else if(F&&F.length>0)return this.setColorName(F,q);return this}setColorName(F,q=Iu){const lt=r1[F.toLowerCase()];return lt!==void 0?this.setHex(lt,q):console.warn("THREE.Color: Unknown color "+F),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(F){return this.r=F.r,this.g=F.g,this.b=F.b,this}copySRGBToLinear(F){return this.r=av(F.r),this.g=av(F.g),this.b=av(F.b),this}copyLinearToSRGB(F){return this.r=i0(F.r),this.g=i0(F.g),this.b=i0(F.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(F=Iu){return Fa.fromWorkingColorSpace(cs.copy(this),F),Math.round(hs(cs.r*255,0,255))*65536+Math.round(hs(cs.g*255,0,255))*256+Math.round(hs(cs.b*255,0,255))}getHexString(F=Iu){return("000000"+this.getHex(F).toString(16)).slice(-6)}getHSL(F,q=Fa.workingColorSpace){Fa.fromWorkingColorSpace(cs.copy(this),q);const lt=cs.r,Dt=cs.g,Zt=cs.b,G=Math.max(lt,Dt,Zt),U=Math.min(lt,Dt,Zt);let t,g;const C=(U+G)/2;if(U===G)t=0,g=0;else{const i=G-U;switch(g=C<=.5?i/(G+U):i/(2-G-U),G){case lt:t=(Dt-Zt)/i+(Dt0!=F>0&&this.version++,this._alphaTest=F}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(F){if(F!==void 0)for(const q in F){const lt=F[q];if(lt===void 0){console.warn(`THREE.Material: parameter '${q}' has value of undefined.`);continue}const Dt=this[q];if(Dt===void 0){console.warn(`THREE.Material: '${q}' is not a property of THREE.${this.type}.`);continue}Dt&&Dt.isColor?Dt.set(lt):Dt&&Dt.isVector3&<&<.isVector3?Dt.copy(lt):this[q]=lt}}toJSON(F){const q=F===void 0||typeof F=="string";q&&(F={textures:{},images:{}});const lt={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};lt.uuid=this.uuid,lt.type=this.type,this.name!==""&&(lt.name=this.name),this.color&&this.color.isColor&&(lt.color=this.color.getHex()),this.roughness!==void 0&&(lt.roughness=this.roughness),this.metalness!==void 0&&(lt.metalness=this.metalness),this.sheen!==void 0&&(lt.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(lt.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(lt.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(lt.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(lt.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(lt.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(lt.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(lt.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(lt.shininess=this.shininess),this.clearcoat!==void 0&&(lt.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(lt.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(lt.clearcoatMap=this.clearcoatMap.toJSON(F).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(lt.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(F).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(lt.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(F).uuid,lt.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(lt.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(lt.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(lt.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(lt.iridescenceMap=this.iridescenceMap.toJSON(F).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(lt.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(F).uuid),this.anisotropy!==void 0&&(lt.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(lt.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(lt.anisotropyMap=this.anisotropyMap.toJSON(F).uuid),this.map&&this.map.isTexture&&(lt.map=this.map.toJSON(F).uuid),this.matcap&&this.matcap.isTexture&&(lt.matcap=this.matcap.toJSON(F).uuid),this.alphaMap&&this.alphaMap.isTexture&&(lt.alphaMap=this.alphaMap.toJSON(F).uuid),this.lightMap&&this.lightMap.isTexture&&(lt.lightMap=this.lightMap.toJSON(F).uuid,lt.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(lt.aoMap=this.aoMap.toJSON(F).uuid,lt.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(lt.bumpMap=this.bumpMap.toJSON(F).uuid,lt.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(lt.normalMap=this.normalMap.toJSON(F).uuid,lt.normalMapType=this.normalMapType,lt.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(lt.displacementMap=this.displacementMap.toJSON(F).uuid,lt.displacementScale=this.displacementScale,lt.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(lt.roughnessMap=this.roughnessMap.toJSON(F).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(lt.metalnessMap=this.metalnessMap.toJSON(F).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(lt.emissiveMap=this.emissiveMap.toJSON(F).uuid),this.specularMap&&this.specularMap.isTexture&&(lt.specularMap=this.specularMap.toJSON(F).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(lt.specularIntensityMap=this.specularIntensityMap.toJSON(F).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(lt.specularColorMap=this.specularColorMap.toJSON(F).uuid),this.envMap&&this.envMap.isTexture&&(lt.envMap=this.envMap.toJSON(F).uuid,this.combine!==void 0&&(lt.combine=this.combine)),this.envMapRotation!==void 0&&(lt.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(lt.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(lt.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(lt.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(lt.gradientMap=this.gradientMap.toJSON(F).uuid),this.transmission!==void 0&&(lt.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(lt.transmissionMap=this.transmissionMap.toJSON(F).uuid),this.thickness!==void 0&&(lt.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(lt.thicknessMap=this.thicknessMap.toJSON(F).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(lt.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(lt.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(lt.size=this.size),this.shadowSide!==null&&(lt.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(lt.sizeAttenuation=this.sizeAttenuation),this.blending!==nv&&(lt.blending=this.blending),this.side!==Nu&&(lt.side=this.side),this.vertexColors===!0&&(lt.vertexColors=!0),this.opacity<1&&(lt.opacity=this.opacity),this.transparent===!0&&(lt.transparent=!0),this.blendSrc!==D0&&(lt.blendSrc=this.blendSrc),this.blendDst!==I0&&(lt.blendDst=this.blendDst),this.blendEquation!==$c&&(lt.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(lt.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(lt.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(lt.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(lt.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(lt.blendAlpha=this.blendAlpha),this.depthFunc!==ip&&(lt.depthFunc=this.depthFunc),this.depthTest===!1&&(lt.depthTest=this.depthTest),this.depthWrite===!1&&(lt.depthWrite=this.depthWrite),this.colorWrite===!1&&(lt.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(lt.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Dm&&(lt.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(lt.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(lt.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ih&&(lt.stencilFail=this.stencilFail),this.stencilZFail!==Ih&&(lt.stencilZFail=this.stencilZFail),this.stencilZPass!==Ih&&(lt.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(lt.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(lt.rotation=this.rotation),this.polygonOffset===!0&&(lt.polygonOffset=!0),this.polygonOffsetFactor!==0&&(lt.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(lt.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(lt.linewidth=this.linewidth),this.dashSize!==void 0&&(lt.dashSize=this.dashSize),this.gapSize!==void 0&&(lt.gapSize=this.gapSize),this.scale!==void 0&&(lt.scale=this.scale),this.dithering===!0&&(lt.dithering=!0),this.alphaTest>0&&(lt.alphaTest=this.alphaTest),this.alphaHash===!0&&(lt.alphaHash=!0),this.alphaToCoverage===!0&&(lt.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(lt.premultipliedAlpha=!0),this.forceSinglePass===!0&&(lt.forceSinglePass=!0),this.wireframe===!0&&(lt.wireframe=!0),this.wireframeLinewidth>1&&(lt.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(lt.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(lt.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(lt.flatShading=!0),this.visible===!1&&(lt.visible=!1),this.toneMapped===!1&&(lt.toneMapped=!1),this.fog===!1&&(lt.fog=!1),Object.keys(this.userData).length>0&&(lt.userData=this.userData);function Dt(Zt){const G=[];for(const U in Zt){const t=Zt[U];delete t.metadata,G.push(t)}return G}if(q){const Zt=Dt(F.textures),G=Dt(F.images);Zt.length>0&&(lt.textures=Zt),G.length>0&&(lt.images=G)}return lt}clone(){return new this.constructor().copy(this)}copy(F){this.name=F.name,this.blending=F.blending,this.side=F.side,this.vertexColors=F.vertexColors,this.opacity=F.opacity,this.transparent=F.transparent,this.blendSrc=F.blendSrc,this.blendDst=F.blendDst,this.blendEquation=F.blendEquation,this.blendSrcAlpha=F.blendSrcAlpha,this.blendDstAlpha=F.blendDstAlpha,this.blendEquationAlpha=F.blendEquationAlpha,this.blendColor.copy(F.blendColor),this.blendAlpha=F.blendAlpha,this.depthFunc=F.depthFunc,this.depthTest=F.depthTest,this.depthWrite=F.depthWrite,this.stencilWriteMask=F.stencilWriteMask,this.stencilFunc=F.stencilFunc,this.stencilRef=F.stencilRef,this.stencilFuncMask=F.stencilFuncMask,this.stencilFail=F.stencilFail,this.stencilZFail=F.stencilZFail,this.stencilZPass=F.stencilZPass,this.stencilWrite=F.stencilWrite;const q=F.clippingPlanes;let lt=null;if(q!==null){const Dt=q.length;lt=new Array(Dt);for(let Zt=0;Zt!==Dt;++Zt)lt[Zt]=q[Zt].clone()}return this.clippingPlanes=lt,this.clipIntersection=F.clipIntersection,this.clipShadows=F.clipShadows,this.shadowSide=F.shadowSide,this.colorWrite=F.colorWrite,this.precision=F.precision,this.polygonOffset=F.polygonOffset,this.polygonOffsetFactor=F.polygonOffsetFactor,this.polygonOffsetUnits=F.polygonOffsetUnits,this.dithering=F.dithering,this.alphaTest=F.alphaTest,this.alphaHash=F.alphaHash,this.alphaToCoverage=F.alphaToCoverage,this.premultipliedAlpha=F.premultipliedAlpha,this.forceSinglePass=F.forceSinglePass,this.visible=F.visible,this.toneMapped=F.toneMapped,this.userData=JSON.parse(JSON.stringify(F.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(F){F===!0&&this.version++}}class qv extends ih{constructor(F){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ha(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Ss,this.combine=Hy,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(F)}copy(F){return super.copy(F),this.color.copy(F.color),this.map=F.map,this.lightMap=F.lightMap,this.lightMapIntensity=F.lightMapIntensity,this.aoMap=F.aoMap,this.aoMapIntensity=F.aoMapIntensity,this.specularMap=F.specularMap,this.alphaMap=F.alphaMap,this.envMap=F.envMap,this.envMapRotation.copy(F.envMapRotation),this.combine=F.combine,this.reflectivity=F.reflectivity,this.refractionRatio=F.refractionRatio,this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this.wireframeLinecap=F.wireframeLinecap,this.wireframeLinejoin=F.wireframeLinejoin,this.fog=F.fog,this}}const So=new bn,Nd=new Wi;class Ws{constructor(F,q,lt=!1){if(Array.isArray(F))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=F,this.itemSize=q,this.count=F!==void 0?F.length/q:0,this.normalized=lt,this.usage=N0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=hc,this.version=0}onUploadCallback(){}set needsUpdate(F){F===!0&&this.version++}get updateRange(){return qy("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(F){return this.usage=F,this}addUpdateRange(F,q){this.updateRanges.push({start:F,count:q})}clearUpdateRanges(){this.updateRanges.length=0}copy(F){return this.name=F.name,this.array=new F.array.constructor(F.array),this.itemSize=F.itemSize,this.count=F.count,this.normalized=F.normalized,this.usage=F.usage,this.gpuType=F.gpuType,this}copyAt(F,q,lt){F*=this.itemSize,lt*=q.itemSize;for(let Dt=0,Zt=this.itemSize;Dt0&&(F.userData=this.userData),this.parameters!==void 0){const t=this.parameters;for(const g in t)t[g]!==void 0&&(F[g]=t[g]);return F}F.data={attributes:{}};const q=this.index;q!==null&&(F.data.index={type:q.array.constructor.name,array:Array.prototype.slice.call(q.array)});const lt=this.attributes;for(const t in lt){const g=lt[t];F.data.attributes[t]=g.toJSON(F.data)}const Dt={};let Zt=!1;for(const t in this.morphAttributes){const g=this.morphAttributes[t],C=[];for(let i=0,S=g.length;i0&&(Dt[t]=C,Zt=!0)}Zt&&(F.data.morphAttributes=Dt,F.data.morphTargetsRelative=this.morphTargetsRelative);const G=this.groups;G.length>0&&(F.data.groups=JSON.parse(JSON.stringify(G)));const U=this.boundingSphere;return U!==null&&(F.data.boundingSphere={center:U.center.toArray(),radius:U.radius}),F}clone(){return new this.constructor().copy(this)}copy(F){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const q={};this.name=F.name;const lt=F.index;lt!==null&&this.setIndex(lt.clone(q));const Dt=F.attributes;for(const g in Dt){const C=Dt[g];this.setAttribute(g,C.clone(q))}const Zt=F.morphAttributes;for(const g in Zt){const C=[],i=Zt[g];for(let S=0,x=i.length;S0){const Dt=q[lt[0]];if(Dt!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Zt=0,G=Dt.length;Zt(F.far-F.near)**2))&&(Zm.copy(Zt).invert(),Zc.copy(F.ray).applyMatrix4(Zm),!(lt.boundingBox!==null&&Zc.intersectsBox(lt.boundingBox)===!1)&&this._computeIntersections(F,q,Zc)))}_computeIntersections(F,q,lt){let Dt;const Zt=this.geometry,G=this.material,U=Zt.index,t=Zt.attributes.position,g=Zt.attributes.uv,C=Zt.attributes.uv1,i=Zt.attributes.normal,S=Zt.groups,x=Zt.drawRange;if(U!==null)if(Array.isArray(G))for(let h=0,p=S.length;hq.far?null:{distance:g,point:Yd.clone(),object:_t}}function Xd(_t,F,q,lt,Dt,Zt,G,U,t,g){_t.getVertexPosition(U,Wh),_t.getVertexPosition(t,Yh),_t.getVertexPosition(g,Xh);const C=p2(_t,F,q,lt,Wh,Yh,Xh,Wd);if(C){Dt&&(Hd.fromBufferAttribute(Dt,U),Vd.fromBufferAttribute(Dt,t),Gd.fromBufferAttribute(Dt,g),C.uv=hu.getInterpolation(Wd,Wh,Yh,Xh,Hd,Vd,Gd,new Wi)),Zt&&(Hd.fromBufferAttribute(Zt,U),Vd.fromBufferAttribute(Zt,t),Gd.fromBufferAttribute(Zt,g),C.uv1=hu.getInterpolation(Wd,Wh,Yh,Xh,Hd,Vd,Gd,new Wi)),G&&(Km.fromBufferAttribute(G,U),Jm.fromBufferAttribute(G,t),Qm.fromBufferAttribute(G,g),C.normal=hu.getInterpolation(Wd,Wh,Yh,Xh,Km,Jm,Qm,new bn),C.normal.dot(lt.direction)>0&&C.normal.multiplyScalar(-1));const i={a:U,b:t,c:g,normal:new bn,materialIndex:0};hu.getNormal(Wh,Yh,Xh,i.normal),C.face=i}return C}class cv extends Ys{constructor(F=1,q=1,lt=1,Dt=1,Zt=1,G=1){super(),this.type="BoxGeometry",this.parameters={width:F,height:q,depth:lt,widthSegments:Dt,heightSegments:Zt,depthSegments:G};const U=this;Dt=Math.floor(Dt),Zt=Math.floor(Zt),G=Math.floor(G);const t=[],g=[],C=[],i=[];let S=0,x=0;h("z","y","x",-1,-1,lt,q,F,G,Zt,0),h("z","y","x",1,-1,lt,q,-F,G,Zt,1),h("x","z","y",1,1,F,lt,q,Dt,G,2),h("x","z","y",1,-1,F,lt,-q,Dt,G,3),h("x","y","z",1,-1,F,q,lt,Dt,Zt,4),h("x","y","z",-1,-1,F,q,-lt,Dt,Zt,5),this.setIndex(t),this.setAttribute("position",new _s(g,3)),this.setAttribute("normal",new _s(C,3)),this.setAttribute("uv",new _s(i,2));function h(p,r,e,a,n,f,c,l,m,v,b){const u=f/m,o=c/v,d=f/2,w=c/2,A=l/2,_=m+1,y=v+1;let E=0,T=0;const s=new bn;for(let L=0;L0?1:-1,C.push(s.x,s.y,s.z),i.push(z/m),i.push(1-L/v),E+=1}}for(let L=0;L0&&(q.defines=this.defines),q.vertexShader=this.vertexShader,q.fragmentShader=this.fragmentShader,q.lights=this.lights,q.clipping=this.clipping;const lt={};for(const Dt in this.extensions)this.extensions[Dt]===!0&&(lt[Dt]=!0);return Object.keys(lt).length>0&&(q.extensions=lt),q}}class s1 extends Bo{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new so,this.projectionMatrix=new so,this.projectionMatrixInverse=new so,this.coordinateSystem=xf}copy(F,q){return super.copy(F,q),this.matrixWorldInverse.copy(F.matrixWorldInverse),this.projectionMatrix.copy(F.projectionMatrix),this.projectionMatrixInverse.copy(F.projectionMatrixInverse),this.coordinateSystem=F.coordinateSystem,this}getWorldDirection(F){return super.getWorldDirection(F).negate()}updateMatrixWorld(F){super.updateMatrixWorld(F),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(F,q){super.updateWorldMatrix(F,q),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const uc=new bn,qm=new Wi,ty=new Wi;class uu extends s1{constructor(F=50,q=1,lt=.1,Dt=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=F,this.zoom=1,this.near=lt,this.far=Dt,this.focus=10,this.aspect=q,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(F,q){return super.copy(F,q),this.fov=F.fov,this.zoom=F.zoom,this.near=F.near,this.far=F.far,this.focus=F.focus,this.aspect=F.aspect,this.view=F.view===null?null:Object.assign({},F.view),this.filmGauge=F.filmGauge,this.filmOffset=F.filmOffset,this}setFocalLength(F){const q=.5*this.getFilmHeight()/F;this.fov=jv*2*Math.atan(q),this.updateProjectionMatrix()}getFocalLength(){const F=Math.tan(Yv*.5*this.fov);return .5*this.getFilmHeight()/F}getEffectiveFOV(){return jv*2*Math.atan(Math.tan(Yv*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(F,q,lt){uc.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),q.set(uc.x,uc.y).multiplyScalar(-F/uc.z),uc.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),lt.set(uc.x,uc.y).multiplyScalar(-F/uc.z)}getViewSize(F,q){return this.getViewBounds(F,qm,ty),q.subVectors(ty,qm)}setViewOffset(F,q,lt,Dt,Zt,G){this.aspect=F/q,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=F,this.view.fullHeight=q,this.view.offsetX=lt,this.view.offsetY=Dt,this.view.width=Zt,this.view.height=G,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const F=this.near;let q=F*Math.tan(Yv*.5*this.fov)/this.zoom,lt=2*q,Dt=this.aspect*lt,Zt=-.5*Dt;const G=this.view;if(this.view!==null&&this.view.enabled){const t=G.fullWidth,g=G.fullHeight;Zt+=G.offsetX*Dt/t,q-=G.offsetY*lt/g,Dt*=G.width/t,lt*=G.height/g}const U=this.filmOffset;U!==0&&(Zt+=F*U/this.getFilmWidth()),this.projectionMatrix.makePerspective(Zt,Zt+Dt,q,q-lt,F,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(F){const q=super.toJSON(F);return q.object.fov=this.fov,q.object.zoom=this.zoom,q.object.near=this.near,q.object.far=this.far,q.object.focus=this.focus,q.object.aspect=this.aspect,this.view!==null&&(q.object.view=Object.assign({},this.view)),q.object.filmGauge=this.filmGauge,q.object.filmOffset=this.filmOffset,q}}const Zh=-90,jh=1;class w2 extends Bo{constructor(F,q,lt){super(),this.type="CubeCamera",this.renderTarget=lt,this.coordinateSystem=null,this.activeMipmapLevel=0;const Dt=new uu(Zh,jh,F,q);Dt.layers=this.layers,this.add(Dt);const Zt=new uu(Zh,jh,F,q);Zt.layers=this.layers,this.add(Zt);const G=new uu(Zh,jh,F,q);G.layers=this.layers,this.add(G);const U=new uu(Zh,jh,F,q);U.layers=this.layers,this.add(U);const t=new uu(Zh,jh,F,q);t.layers=this.layers,this.add(t);const g=new uu(Zh,jh,F,q);g.layers=this.layers,this.add(g)}updateCoordinateSystem(){const F=this.coordinateSystem,q=this.children.concat(),[lt,Dt,Zt,G,U,t]=q;for(const g of q)this.remove(g);if(F===xf)lt.up.set(0,1,0),lt.lookAt(1,0,0),Dt.up.set(0,1,0),Dt.lookAt(-1,0,0),Zt.up.set(0,0,-1),Zt.lookAt(0,1,0),G.up.set(0,0,1),G.lookAt(0,-1,0),U.up.set(0,1,0),U.lookAt(0,0,1),t.up.set(0,1,0),t.lookAt(0,0,-1);else if(F===fp)lt.up.set(0,-1,0),lt.lookAt(-1,0,0),Dt.up.set(0,-1,0),Dt.lookAt(1,0,0),Zt.up.set(0,0,1),Zt.lookAt(0,1,0),G.up.set(0,0,-1),G.lookAt(0,-1,0),U.up.set(0,-1,0),U.lookAt(0,0,1),t.up.set(0,-1,0),t.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+F);for(const g of q)this.add(g),g.updateMatrixWorld()}update(F,q){this.parent===null&&this.updateMatrixWorld();const{renderTarget:lt,activeMipmapLevel:Dt}=this;this.coordinateSystem!==F.coordinateSystem&&(this.coordinateSystem=F.coordinateSystem,this.updateCoordinateSystem());const[Zt,G,U,t,g,C]=this.children,i=F.getRenderTarget(),S=F.getActiveCubeFace(),x=F.getActiveMipmapLevel(),v=F.xr.enabled;F.xr.enabled=!1;const p=lt.texture.generateMipmaps;lt.texture.generateMipmaps=!1,F.setRenderTarget(lt,0,Dt),F.render(q,Zt),F.setRenderTarget(lt,1,Dt),F.render(q,G),F.setRenderTarget(lt,2,Dt),F.render(q,U),F.setRenderTarget(lt,3,Dt),F.render(q,t),F.setRenderTarget(lt,4,Dt),F.render(q,g),lt.texture.generateMipmaps=p,F.setRenderTarget(lt,5,Dt),F.render(q,C),F.setRenderTarget(i,S,x),F.xr.enabled=v,lt.texture.needsPMREMUpdate=!0}}class l1 extends Es{constructor(F,q,lt,Dt,Zt,G,U,t,g,C){F=F!==void 0?F:[],q=q!==void 0?q:sv,super(F,q,lt,Dt,Zt,G,U,t,g,C),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(F){this.image=F}}class T2 extends rh{constructor(F=1,q={}){super(F,F,q),this.isWebGLCubeRenderTarget=!0;const lt={width:F,height:F,depth:1},Dt=[lt,lt,lt,lt,lt,lt];this.texture=new l1(Dt,q.mapping,q.wrapS,q.wrapT,q.magFilter,q.minFilter,q.format,q.type,q.anisotropy,q.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=q.generateMipmaps!==void 0?q.generateMipmaps:!1,this.texture.minFilter=q.minFilter!==void 0?q.minFilter:fu}fromEquirectangularTexture(F,q){this.texture.type=q.type,this.texture.colorSpace=q.colorSpace,this.texture.generateMipmaps=q.generateMipmaps,this.texture.minFilter=q.minFilter,this.texture.magFilter=q.magFilter;const lt={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class gc extends ih{constructor(F){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=y2,this.fragmentShader=x2,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,F!==void 0&&this.setValues(F)}copy(F){return super.copy(F),this.fragmentShader=F.fragmentShader,this.vertexShader=F.vertexShader,this.uniforms=fv(F.uniforms),this.uniformsGroups=g2(F.uniformsGroups),this.defines=Object.assign({},F.defines),this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this.fog=F.fog,this.lights=F.lights,this.clipping=F.clipping,this.extensions=Object.assign({},F.extensions),this.glslVersion=F.glslVersion,this}toJSON(F){const q=super.toJSON(F);q.glslVersion=this.glslVersion,q.uniforms={};for(const Dt in this.uniforms){const G=this.uniforms[Dt].value;G&&G.isTexture?q.uniforms[Dt]={type:"t",value:G.toJSON(F).uuid}:G&&G.isColor?q.uniforms[Dt]={type:"c",value:G.getHex()}:G&&G.isVector2?q.uniforms[Dt]={type:"v2",value:G.toArray()}:G&&G.isVector3?q.uniforms[Dt]={type:"v3",value:G.toArray()}:G&&G.isVector4?q.uniforms[Dt]={type:"v4",value:G.toArray()}:G&&G.isMatrix3?q.uniforms[Dt]={type:"m3",value:G.toArray()}:G&&G.isMatrix4?q.uniforms[Dt]={type:"m4",value:G.toArray()}:q.uniforms[Dt]={value:G}}Object.keys(this.defines).length>0&&(q.defines=this.defines),q.vertexShader=this.vertexShader,q.fragmentShader=this.fragmentShader,q.lights=this.lights,q.clipping=this.clipping;const lt={};for(const Dt in this.extensions)this.extensions[Dt]===!0&&(lt[Dt]=!0);return Object.keys(lt).length>0&&(q.extensions=lt),q}}class o1 extends Bo{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new so,this.projectionMatrix=new so,this.projectionMatrixInverse=new so,this.coordinateSystem=xf}copy(F,q){return super.copy(F,q),this.matrixWorldInverse.copy(F.matrixWorldInverse),this.projectionMatrix.copy(F.projectionMatrix),this.projectionMatrixInverse.copy(F.projectionMatrixInverse),this.coordinateSystem=F.coordinateSystem,this}getWorldDirection(F){return super.getWorldDirection(F).negate()}updateMatrixWorld(F){super.updateMatrixWorld(F),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(F,q){super.updateWorldMatrix(F,q),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const uc=new bn,$m=new Wi,qm=new Wi;class uu extends o1{constructor(F=50,q=1,lt=.1,Dt=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=F,this.zoom=1,this.near=lt,this.far=Dt,this.focus=10,this.aspect=q,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(F,q){return super.copy(F,q),this.fov=F.fov,this.zoom=F.zoom,this.near=F.near,this.far=F.far,this.focus=F.focus,this.aspect=F.aspect,this.view=F.view===null?null:Object.assign({},F.view),this.filmGauge=F.filmGauge,this.filmOffset=F.filmOffset,this}setFocalLength(F){const q=.5*this.getFilmHeight()/F;this.fov=Zv*2*Math.atan(q),this.updateProjectionMatrix()}getFocalLength(){const F=Math.tan(Wv*.5*this.fov);return .5*this.getFilmHeight()/F}getEffectiveFOV(){return Zv*2*Math.atan(Math.tan(Wv*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(F,q,lt){uc.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),q.set(uc.x,uc.y).multiplyScalar(-F/uc.z),uc.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),lt.set(uc.x,uc.y).multiplyScalar(-F/uc.z)}getViewSize(F,q){return this.getViewBounds(F,$m,qm),q.subVectors(qm,$m)}setViewOffset(F,q,lt,Dt,Zt,G){this.aspect=F/q,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=F,this.view.fullHeight=q,this.view.offsetX=lt,this.view.offsetY=Dt,this.view.width=Zt,this.view.height=G,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const F=this.near;let q=F*Math.tan(Wv*.5*this.fov)/this.zoom,lt=2*q,Dt=this.aspect*lt,Zt=-.5*Dt;const G=this.view;if(this.view!==null&&this.view.enabled){const t=G.fullWidth,g=G.fullHeight;Zt+=G.offsetX*Dt/t,q-=G.offsetY*lt/g,Dt*=G.width/t,lt*=G.height/g}const U=this.filmOffset;U!==0&&(Zt+=F*U/this.getFilmWidth()),this.projectionMatrix.makePerspective(Zt,Zt+Dt,q,q-lt,F,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(F){const q=super.toJSON(F);return q.object.fov=this.fov,q.object.zoom=this.zoom,q.object.near=this.near,q.object.far=this.far,q.object.focus=this.focus,q.object.aspect=this.aspect,this.view!==null&&(q.object.view=Object.assign({},this.view)),q.object.filmGauge=this.filmGauge,q.object.filmOffset=this.filmOffset,q}}const Zh=-90,jh=1;class b2 extends Bo{constructor(F,q,lt){super(),this.type="CubeCamera",this.renderTarget=lt,this.coordinateSystem=null,this.activeMipmapLevel=0;const Dt=new uu(Zh,jh,F,q);Dt.layers=this.layers,this.add(Dt);const Zt=new uu(Zh,jh,F,q);Zt.layers=this.layers,this.add(Zt);const G=new uu(Zh,jh,F,q);G.layers=this.layers,this.add(G);const U=new uu(Zh,jh,F,q);U.layers=this.layers,this.add(U);const t=new uu(Zh,jh,F,q);t.layers=this.layers,this.add(t);const g=new uu(Zh,jh,F,q);g.layers=this.layers,this.add(g)}updateCoordinateSystem(){const F=this.coordinateSystem,q=this.children.concat(),[lt,Dt,Zt,G,U,t]=q;for(const g of q)this.remove(g);if(F===xf)lt.up.set(0,1,0),lt.lookAt(1,0,0),Dt.up.set(0,1,0),Dt.lookAt(-1,0,0),Zt.up.set(0,0,-1),Zt.lookAt(0,1,0),G.up.set(0,0,1),G.lookAt(0,-1,0),U.up.set(0,1,0),U.lookAt(0,0,1),t.up.set(0,1,0),t.lookAt(0,0,-1);else if(F===up)lt.up.set(0,-1,0),lt.lookAt(-1,0,0),Dt.up.set(0,-1,0),Dt.lookAt(1,0,0),Zt.up.set(0,0,1),Zt.lookAt(0,1,0),G.up.set(0,0,-1),G.lookAt(0,-1,0),U.up.set(0,-1,0),U.lookAt(0,0,1),t.up.set(0,-1,0),t.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+F);for(const g of q)this.add(g),g.updateMatrixWorld()}update(F,q){this.parent===null&&this.updateMatrixWorld();const{renderTarget:lt,activeMipmapLevel:Dt}=this;this.coordinateSystem!==F.coordinateSystem&&(this.coordinateSystem=F.coordinateSystem,this.updateCoordinateSystem());const[Zt,G,U,t,g,C]=this.children,i=F.getRenderTarget(),S=F.getActiveCubeFace(),x=F.getActiveMipmapLevel(),h=F.xr.enabled;F.xr.enabled=!1;const p=lt.texture.generateMipmaps;lt.texture.generateMipmaps=!1,F.setRenderTarget(lt,0,Dt),F.render(q,Zt),F.setRenderTarget(lt,1,Dt),F.render(q,G),F.setRenderTarget(lt,2,Dt),F.render(q,U),F.setRenderTarget(lt,3,Dt),F.render(q,t),F.setRenderTarget(lt,4,Dt),F.render(q,g),lt.texture.generateMipmaps=p,F.setRenderTarget(lt,5,Dt),F.render(q,C),F.setRenderTarget(i,S,x),F.xr.enabled=h,lt.texture.needsPMREMUpdate=!0}}class s1 extends Es{constructor(F,q,lt,Dt,Zt,G,U,t,g,C){F=F!==void 0?F:[],q=q!==void 0?q:sv,super(F,q,lt,Dt,Zt,G,U,t,g,C),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(F){this.image=F}}class w2 extends rh{constructor(F=1,q={}){super(F,F,q),this.isWebGLCubeRenderTarget=!0;const lt={width:F,height:F,depth:1},Dt=[lt,lt,lt,lt,lt,lt];this.texture=new s1(Dt,q.mapping,q.wrapS,q.wrapT,q.magFilter,q.minFilter,q.format,q.type,q.anisotropy,q.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=q.generateMipmaps!==void 0?q.generateMipmaps:!1,this.texture.minFilter=q.minFilter!==void 0?q.minFilter:fu}fromEquirectangularTexture(F,q){this.texture.type=q.type,this.texture.colorSpace=q.colorSpace,this.texture.generateMipmaps=q.generateMipmaps,this.texture.minFilter=q.minFilter,this.texture.magFilter=q.magFilter;const lt={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -41,9 +41,9 @@ import{g as Uy,c as R3}from"./index-BBkUAzwr.js";/** gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},Dt=new hv(5,5,5),Zt=new gc({name:"CubemapFromEquirect",uniforms:fv(lt.uniforms),vertexShader:lt.vertexShader,fragmentShader:lt.fragmentShader,side:Gs,blending:vc});Zt.uniforms.tEquirect.value=q;const G=new Vs(Dt,Zt),U=q.minFilter;return q.minFilter===eh&&(q.minFilter=fu),new w2(1,10,this).update(F,G),q.minFilter=U,G.geometry.dispose(),G.material.dispose(),this}clear(F,q,lt,Dt){const Zt=F.getRenderTarget();for(let G=0;G<6;G++)F.setRenderTarget(this,G),F.clear(q,lt,Dt);F.setRenderTarget(Zt)}}const w0=new bn,A2=new bn,M2=new fa;class fc{constructor(F=new bn(1,0,0),q=0){this.isPlane=!0,this.normal=F,this.constant=q}set(F,q){return this.normal.copy(F),this.constant=q,this}setComponents(F,q,lt,Dt){return this.normal.set(F,q,lt),this.constant=Dt,this}setFromNormalAndCoplanarPoint(F,q){return this.normal.copy(F),this.constant=-q.dot(this.normal),this}setFromCoplanarPoints(F,q,lt){const Dt=w0.subVectors(lt,q).cross(A2.subVectors(F,q)).normalize();return this.setFromNormalAndCoplanarPoint(Dt,F),this}copy(F){return this.normal.copy(F.normal),this.constant=F.constant,this}normalize(){const F=1/this.normal.length();return this.normal.multiplyScalar(F),this.constant*=F,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(F){return this.normal.dot(F)+this.constant}distanceToSphere(F){return this.distanceToPoint(F.center)-F.radius}projectPoint(F,q){return q.copy(F).addScaledVector(this.normal,-this.distanceToPoint(F))}intersectLine(F,q){const lt=F.delta(w0),Dt=this.normal.dot(lt);if(Dt===0)return this.distanceToPoint(F.start)===0?q.copy(F.start):null;const Zt=-(F.start.dot(this.normal)+this.constant)/Dt;return Zt<0||Zt>1?null:q.copy(F.start).addScaledVector(lt,Zt)}intersectsLine(F){const q=this.distanceToPoint(F.start),lt=this.distanceToPoint(F.end);return q<0&<>0||lt<0&&q>0}intersectsBox(F){return F.intersectsPlane(this)}intersectsSphere(F){return F.intersectsPlane(this)}coplanarPoint(F){return F.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(F,q){const lt=q||M2.getNormalMatrix(F),Dt=this.coplanarPoint(w0).applyMatrix4(F),Zt=this.normal.applyMatrix3(lt).normalize();return this.constant=-Dt.dot(Zt),this}translate(F){return this.constant-=F.dot(this.normal),this}equals(F){return F.normal.equals(this.normal)&&F.constant===this.constant}clone(){return new this.constructor().copy(this)}}const jc=new $v,jd=new bn;class u1{constructor(F=new fc,q=new fc,lt=new fc,Dt=new fc,Zt=new fc,G=new fc){this.planes=[F,q,lt,Dt,Zt,G]}set(F,q,lt,Dt,Zt,G){const U=this.planes;return U[0].copy(F),U[1].copy(q),U[2].copy(lt),U[3].copy(Dt),U[4].copy(Zt),U[5].copy(G),this}copy(F){const q=this.planes;for(let lt=0;lt<6;lt++)q[lt].copy(F.planes[lt]);return this}setFromProjectionMatrix(F,q=xf){const lt=this.planes,Dt=F.elements,Zt=Dt[0],G=Dt[1],U=Dt[2],t=Dt[3],g=Dt[4],C=Dt[5],i=Dt[6],S=Dt[7],x=Dt[8],v=Dt[9],p=Dt[10],r=Dt[11],e=Dt[12],a=Dt[13],n=Dt[14],f=Dt[15];if(lt[0].setComponents(t-Zt,S-g,r-x,f-e).normalize(),lt[1].setComponents(t+Zt,S+g,r+x,f+e).normalize(),lt[2].setComponents(t+G,S+C,r+v,f+a).normalize(),lt[3].setComponents(t-G,S-C,r-v,f-a).normalize(),lt[4].setComponents(t-U,S-i,r-p,f-n).normalize(),q===xf)lt[5].setComponents(t+U,S+i,r+p,f+n).normalize();else if(q===fp)lt[5].setComponents(U,i,p,n).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+q);return this}intersectsObject(F){if(F.boundingSphere!==void 0)F.boundingSphere===null&&F.computeBoundingSphere(),jc.copy(F.boundingSphere).applyMatrix4(F.matrixWorld);else{const q=F.geometry;q.boundingSphere===null&&q.computeBoundingSphere(),jc.copy(q.boundingSphere).applyMatrix4(F.matrixWorld)}return this.intersectsSphere(jc)}intersectsSprite(F){return jc.center.set(0,0,0),jc.radius=.7071067811865476,jc.applyMatrix4(F.matrixWorld),this.intersectsSphere(jc)}intersectsSphere(F){const q=this.planes,lt=F.center,Dt=-F.radius;for(let Zt=0;Zt<6;Zt++)if(q[Zt].distanceToPoint(lt)0?F.max.x:F.min.x,jd.y=Dt.normal.y>0?F.max.y:F.min.y,jd.z=Dt.normal.z>0?F.max.z:F.min.z,Dt.distanceToPoint(jd)<0)return!1}return!0}containsPoint(F){const q=this.planes;for(let lt=0;lt<6;lt++)if(q[lt].distanceToPoint(F)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function f1(){let _t=null,F=!1,q=null,lt=null;function Dt(Zt,G){q(Zt,G),lt=_t.requestAnimationFrame(Dt)}return{start:function(){F!==!0&&q!==null&&(lt=_t.requestAnimationFrame(Dt),F=!0)},stop:function(){_t.cancelAnimationFrame(lt),F=!1},setAnimationLoop:function(Zt){q=Zt},setContext:function(Zt){_t=Zt}}}function S2(_t){const F=new WeakMap;function q(U,t){const g=U.array,C=U.usage,i=g.byteLength,S=_t.createBuffer();_t.bindBuffer(t,S),_t.bufferData(t,g,C),U.onUploadCallback();let x;if(g instanceof Float32Array)x=_t.FLOAT;else if(g instanceof Uint16Array)U.isFloat16BufferAttribute?x=_t.HALF_FLOAT:x=_t.UNSIGNED_SHORT;else if(g instanceof Int16Array)x=_t.SHORT;else if(g instanceof Uint32Array)x=_t.UNSIGNED_INT;else if(g instanceof Int32Array)x=_t.INT;else if(g instanceof Int8Array)x=_t.BYTE;else if(g instanceof Uint8Array)x=_t.UNSIGNED_BYTE;else if(g instanceof Uint8ClampedArray)x=_t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+g);return{buffer:S,type:x,bytesPerElement:g.BYTES_PER_ELEMENT,version:U.version,size:i}}function lt(U,t,g){const C=t.array,i=t._updateRange,S=t.updateRanges;if(_t.bindBuffer(g,U),i.count===-1&&S.length===0&&_t.bufferSubData(g,0,C),S.length!==0){for(let x=0,v=S.length;x1?null:q.copy(F.start).addScaledVector(lt,Zt)}intersectsLine(F){const q=this.distanceToPoint(F.start),lt=this.distanceToPoint(F.end);return q<0&<>0||lt<0&&q>0}intersectsBox(F){return F.intersectsPlane(this)}intersectsSphere(F){return F.intersectsPlane(this)}coplanarPoint(F){return F.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(F,q){const lt=q||A2.getNormalMatrix(F),Dt=this.coplanarPoint(b0).applyMatrix4(F),Zt=this.normal.applyMatrix3(lt).normalize();return this.constant=-Dt.dot(Zt),this}translate(F){return this.constant-=F.dot(this.normal),this}equals(F){return F.normal.equals(this.normal)&&F.constant===this.constant}clone(){return new this.constructor().copy(this)}}const jc=new Qv,Zd=new bn;class l1{constructor(F=new fc,q=new fc,lt=new fc,Dt=new fc,Zt=new fc,G=new fc){this.planes=[F,q,lt,Dt,Zt,G]}set(F,q,lt,Dt,Zt,G){const U=this.planes;return U[0].copy(F),U[1].copy(q),U[2].copy(lt),U[3].copy(Dt),U[4].copy(Zt),U[5].copy(G),this}copy(F){const q=this.planes;for(let lt=0;lt<6;lt++)q[lt].copy(F.planes[lt]);return this}setFromProjectionMatrix(F,q=xf){const lt=this.planes,Dt=F.elements,Zt=Dt[0],G=Dt[1],U=Dt[2],t=Dt[3],g=Dt[4],C=Dt[5],i=Dt[6],S=Dt[7],x=Dt[8],h=Dt[9],p=Dt[10],r=Dt[11],e=Dt[12],a=Dt[13],n=Dt[14],f=Dt[15];if(lt[0].setComponents(t-Zt,S-g,r-x,f-e).normalize(),lt[1].setComponents(t+Zt,S+g,r+x,f+e).normalize(),lt[2].setComponents(t+G,S+C,r+h,f+a).normalize(),lt[3].setComponents(t-G,S-C,r-h,f-a).normalize(),lt[4].setComponents(t-U,S-i,r-p,f-n).normalize(),q===xf)lt[5].setComponents(t+U,S+i,r+p,f+n).normalize();else if(q===up)lt[5].setComponents(U,i,p,n).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+q);return this}intersectsObject(F){if(F.boundingSphere!==void 0)F.boundingSphere===null&&F.computeBoundingSphere(),jc.copy(F.boundingSphere).applyMatrix4(F.matrixWorld);else{const q=F.geometry;q.boundingSphere===null&&q.computeBoundingSphere(),jc.copy(q.boundingSphere).applyMatrix4(F.matrixWorld)}return this.intersectsSphere(jc)}intersectsSprite(F){return jc.center.set(0,0,0),jc.radius=.7071067811865476,jc.applyMatrix4(F.matrixWorld),this.intersectsSphere(jc)}intersectsSphere(F){const q=this.planes,lt=F.center,Dt=-F.radius;for(let Zt=0;Zt<6;Zt++)if(q[Zt].distanceToPoint(lt)0?F.max.x:F.min.x,Zd.y=Dt.normal.y>0?F.max.y:F.min.y,Zd.z=Dt.normal.z>0?F.max.z:F.min.z,Dt.distanceToPoint(Zd)<0)return!1}return!0}containsPoint(F){const q=this.planes;for(let lt=0;lt<6;lt++)if(q[lt].distanceToPoint(F)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function u1(){let _t=null,F=!1,q=null,lt=null;function Dt(Zt,G){q(Zt,G),lt=_t.requestAnimationFrame(Dt)}return{start:function(){F!==!0&&q!==null&&(lt=_t.requestAnimationFrame(Dt),F=!0)},stop:function(){_t.cancelAnimationFrame(lt),F=!1},setAnimationLoop:function(Zt){q=Zt},setContext:function(Zt){_t=Zt}}}function M2(_t){const F=new WeakMap;function q(U,t){const g=U.array,C=U.usage,i=g.byteLength,S=_t.createBuffer();_t.bindBuffer(t,S),_t.bufferData(t,g,C),U.onUploadCallback();let x;if(g instanceof Float32Array)x=_t.FLOAT;else if(g instanceof Uint16Array)U.isFloat16BufferAttribute?x=_t.HALF_FLOAT:x=_t.UNSIGNED_SHORT;else if(g instanceof Int16Array)x=_t.SHORT;else if(g instanceof Uint32Array)x=_t.UNSIGNED_INT;else if(g instanceof Int32Array)x=_t.INT;else if(g instanceof Int8Array)x=_t.BYTE;else if(g instanceof Uint8Array)x=_t.UNSIGNED_BYTE;else if(g instanceof Uint8ClampedArray)x=_t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+g);return{buffer:S,type:x,bytesPerElement:g.BYTES_PER_ELEMENT,version:U.version,size:i}}function lt(U,t,g){const C=t.array,i=t._updateRange,S=t.updateRanges;if(_t.bindBuffer(g,U),i.count===-1&&S.length===0&&_t.bufferSubData(g,0,C),S.length!==0){for(let x=0,h=S.length;x 0 +#endif`,U2=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; @@ -273,26 +273,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve if ( clipped ) discard; #endif #endif -#endif`,V2=`#if NUM_CLIPPING_PLANES > 0 +#endif`,H2=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,G2=`#if NUM_CLIPPING_PLANES > 0 +#endif`,V2=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,W2=`#if NUM_CLIPPING_PLANES > 0 +#endif`,G2=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,Y2=`#if defined( USE_COLOR_ALPHA ) +#endif`,W2=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,X2=`#if defined( USE_COLOR_ALPHA ) +#endif`,Y2=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,Z2=`#if defined( USE_COLOR_ALPHA ) +#endif`,X2=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,j2=`#if defined( USE_COLOR_ALPHA ) +#endif`,Z2=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -302,7 +302,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,K2=`#define PI 3.141592653589793 +#endif`,j2=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -380,7 +380,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,J2=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,K2=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -473,7 +473,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,Q2=`vec3 transformedNormal = objectNormal; +#endif`,J2=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -502,18 +502,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,$2=`#ifdef USE_DISPLACEMENTMAP +#endif`,Q2=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,q2=`#ifdef USE_DISPLACEMENTMAP +#endif`,$2=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,tT=`#ifdef USE_EMISSIVEMAP +#endif`,q2=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,eT=`#ifdef USE_EMISSIVEMAP +#endif`,tT=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,rT="gl_FragColor = linearToOutputTexel( gl_FragColor );",nT=` +#endif`,eT="gl_FragColor = linearToOutputTexel( gl_FragColor );",rT=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -541,7 +541,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,iT=`#ifdef USE_ENVMAP +}`,nT=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -570,7 +570,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,aT=`#ifdef USE_ENVMAP +#endif`,iT=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; @@ -580,7 +580,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,oT=`#ifdef USE_ENVMAP +#endif`,aT=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -591,7 +591,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,sT=`#ifdef USE_ENVMAP +#endif`,oT=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -602,7 +602,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,lT=`#ifdef USE_ENVMAP +#endif`,sT=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -619,18 +619,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,uT=`#ifdef USE_FOG +#endif`,lT=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,fT=`#ifdef USE_FOG +#endif`,uT=`#ifdef USE_FOG varying float vFogDepth; -#endif`,cT=`#ifdef USE_FOG +#endif`,fT=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,hT=`#ifdef USE_FOG +#endif`,cT=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -639,7 +639,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,vT=`#ifdef USE_GRADIENTMAP +#endif`,hT=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -651,16 +651,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,dT=`#ifdef USE_LIGHTMAP +}`,vT=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,pT=`#ifdef USE_LIGHTMAP +#endif`,dT=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,gT=`LambertMaterial material; +#endif`,pT=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,mT=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,gT=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -674,7 +674,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,yT=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,mT=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -797,7 +797,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,xT=`#ifdef USE_ENVMAP +#endif`,yT=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -830,8 +830,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,bT=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,wT=`varying vec3 vViewPosition; +#endif`,xT=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,bT=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -843,11 +843,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,TT=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,wT=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,AT=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,TT=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -864,7 +864,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,MT=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,AT=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -947,7 +947,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,ST=`struct PhysicalMaterial { +#endif`,MT=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1247,7 +1247,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,ET=` +}`,ST=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1362,7 +1362,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,_T=`#if defined( RE_IndirectDiffuse ) +#endif`,ET=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1381,33 +1381,33 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,CT=`#if defined( RE_IndirectDiffuse ) +#endif`,_T=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,LT=`#if defined( USE_LOGDEPTHBUF ) +#endif`,CT=`#if defined( USE_LOGDEPTHBUF ) gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,PT=`#if defined( USE_LOGDEPTHBUF ) +#endif`,LT=`#if defined( USE_LOGDEPTHBUF ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,RT=`#ifdef USE_LOGDEPTHBUF +#endif`,PT=`#ifdef USE_LOGDEPTHBUF varying float vFragDepth; varying float vIsPerspective; -#endif`,DT=`#ifdef USE_LOGDEPTHBUF +#endif`,RT=`#ifdef USE_LOGDEPTHBUF vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,IT=`#ifdef USE_MAP +#endif`,DT=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,FT=`#ifdef USE_MAP +#endif`,IT=`#ifdef USE_MAP uniform sampler2D map; -#endif`,zT=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,FT=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1419,7 +1419,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,kT=`#if defined( USE_POINTS_UV ) +#endif`,zT=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1431,19 +1431,19 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,OT=`float metalnessFactor = metalness; +#endif`,kT=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,NT=`#ifdef USE_METALNESSMAP +#endif`,OT=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,BT=`#ifdef USE_INSTANCING_MORPH +#endif`,NT=`#ifdef USE_INSTANCING_MORPH float morphTargetInfluences[MORPHTARGETS_COUNT]; float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; } -#endif`,UT=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,BT=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1452,7 +1452,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,HT=`#ifdef USE_MORPHNORMALS +#endif`,UT=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1464,7 +1464,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,VT=`#ifdef USE_MORPHTARGETS +#endif`,HT=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; #endif @@ -1488,7 +1488,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,GT=`#ifdef USE_MORPHTARGETS +#endif`,VT=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1506,7 +1506,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,WT=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,GT=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1547,7 +1547,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,YT=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,WT=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1562,25 +1562,25 @@ vec3 nonPerturbedNormal = normal;`,YT=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,XT=`#ifndef FLAT_SHADED +#endif`,YT=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,ZT=`#ifndef FLAT_SHADED +#endif`,XT=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,jT=`#ifndef FLAT_SHADED +#endif`,ZT=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,KT=`#ifdef USE_NORMALMAP +#endif`,jT=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1602,13 +1602,13 @@ vec3 nonPerturbedNormal = normal;`,YT=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,JT=`#ifdef USE_CLEARCOAT +#endif`,KT=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,QT=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,JT=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,$T=`#ifdef USE_CLEARCOATMAP +#endif`,QT=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1617,18 +1617,18 @@ vec3 nonPerturbedNormal = normal;`,YT=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,qT=`#ifdef USE_IRIDESCENCEMAP +#endif`,$T=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,tA=`#ifdef OPAQUE +#endif`,qT=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,eA=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,tA=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1669,9 +1669,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,rA=`#ifdef PREMULTIPLIED_ALPHA +}`,eA=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,nA=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,rA=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1679,22 +1679,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,iA=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,nA=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,aA=`#ifdef DITHERING +#endif`,iA=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,oA=`float roughnessFactor = roughness; +#endif`,aA=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,sA=`#ifdef USE_ROUGHNESSMAP +#endif`,oA=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,lA=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,sA=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -1877,7 +1877,7 @@ gl_Position = projectionMatrix * mvPosition;`,iA=`#ifdef DITHERING } return shadow; } -#endif`,uA=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,lA=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -1915,7 +1915,7 @@ gl_Position = projectionMatrix * mvPosition;`,iA=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,fA=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,uA=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -1947,7 +1947,7 @@ gl_Position = projectionMatrix * mvPosition;`,iA=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,cA=`float getShadowMask() { +#endif`,fA=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -1979,12 +1979,12 @@ gl_Position = projectionMatrix * mvPosition;`,iA=`#ifdef DITHERING #endif #endif return shadow; -}`,hA=`#ifdef USE_SKINNING +}`,cA=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,vA=`#ifdef USE_SKINNING +#endif`,hA=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -1999,7 +1999,7 @@ gl_Position = projectionMatrix * mvPosition;`,iA=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,dA=`#ifdef USE_SKINNING +#endif`,vA=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2007,7 +2007,7 @@ gl_Position = projectionMatrix * mvPosition;`,iA=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,pA=`#ifdef USE_SKINNING +#endif`,dA=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2018,17 +2018,17 @@ gl_Position = projectionMatrix * mvPosition;`,iA=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,gA=`float specularStrength; +#endif`,pA=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,mA=`#ifdef USE_SPECULARMAP +#endif`,gA=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,yA=`#if defined( TONE_MAPPING ) +#endif`,mA=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,xA=`#ifndef saturate +#endif`,yA=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2125,7 +2125,7 @@ vec3 NeutralToneMapping( vec3 color ) { float g = 1. - 1. / (desaturation * (peak - newPeak) + 1.); return mix(color, newPeak * vec3(1, 1, 1), g); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,bA=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,xA=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2146,7 +2146,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bA=`#ifdef USE_TRANSMISS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,wA=`#ifdef USE_TRANSMISSION +#endif`,bA=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2252,7 +2252,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bA=`#ifdef USE_TRANSMISS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,TA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,wA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2322,7 +2322,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bA=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,AA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,TA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2416,7 +2416,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bA=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,MA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,AA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2487,7 +2487,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bA=`#ifdef USE_TRANSMISS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,SA=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,MA=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2496,12 +2496,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bA=`#ifdef USE_TRANSMISS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const EA=`varying vec2 vUv; +#endif`;const SA=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,_A=`uniform sampler2D t2D; +}`,EA=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2513,14 +2513,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,CA=`varying vec3 vWorldDirection; +}`,_A=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,LA=`#ifdef ENVMAP_TYPE_CUBE +}`,CA=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2543,14 +2543,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,PA=`varying vec3 vWorldDirection; +}`,LA=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,RA=`uniform samplerCube tCube; +}`,PA=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2560,7 +2560,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,DA=`#include +}`,RA=`#include #include #include #include @@ -2587,7 +2587,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,IA=`#if DEPTH_PACKING == 3200 +}`,DA=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2617,7 +2617,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,FA=`#define DISTANCE +}`,IA=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2644,7 +2644,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,zA=`#define DISTANCE +}`,FA=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2668,13 +2668,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,kA=`varying vec3 vWorldDirection; +}`,zA=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,OA=`uniform sampler2D tEquirect; +}`,kA=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2683,7 +2683,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,NA=`uniform float scale; +}`,OA=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2705,7 +2705,7 @@ void main() { #include #include #include -}`,BA=`uniform vec3 diffuse; +}`,NA=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2733,7 +2733,7 @@ void main() { #include #include #include -}`,UA=`#include +}`,BA=`#include #include #include #include @@ -2765,7 +2765,7 @@ void main() { #include #include #include -}`,HA=`uniform vec3 diffuse; +}`,UA=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2813,7 +2813,7 @@ void main() { #include #include #include -}`,VA=`#define LAMBERT +}`,HA=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2852,7 +2852,7 @@ void main() { #include #include #include -}`,GA=`#define LAMBERT +}`,VA=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2909,7 +2909,7 @@ void main() { #include #include #include -}`,WA=`#define MATCAP +}`,GA=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -2943,7 +2943,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,YA=`#define MATCAP +}`,WA=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -2989,7 +2989,7 @@ void main() { #include #include #include -}`,XA=`#define NORMAL +}`,YA=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3022,7 +3022,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,ZA=`#define NORMAL +}`,XA=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3044,7 +3044,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,jA=`#define PHONG +}`,ZA=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3083,7 +3083,7 @@ void main() { #include #include #include -}`,KA=`#define PHONG +}`,jA=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3142,7 +3142,7 @@ void main() { #include #include #include -}`,JA=`#define STANDARD +}`,KA=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3185,7 +3185,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,QA=`#define STANDARD +}`,JA=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3307,7 +3307,7 @@ void main() { #include #include #include -}`,$A=`#define TOON +}`,QA=`#define TOON varying vec3 vViewPosition; #include #include @@ -3344,7 +3344,7 @@ void main() { #include #include #include -}`,qA=`#define TOON +}`,$A=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3397,7 +3397,7 @@ void main() { #include #include #include -}`,tM=`uniform float size; +}`,qA=`uniform float size; uniform float scale; #include #include @@ -3428,7 +3428,7 @@ void main() { #include #include #include -}`,eM=`uniform vec3 diffuse; +}`,tM=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3453,7 +3453,7 @@ void main() { #include #include #include -}`,rM=`#include +}`,eM=`#include #include #include #include @@ -3476,7 +3476,7 @@ void main() { #include #include #include -}`,nM=`uniform vec3 color; +}`,rM=`uniform vec3 color; uniform float opacity; #include #include @@ -3492,7 +3492,7 @@ void main() { #include #include #include -}`,iM=`uniform float rotation; +}`,nM=`uniform float rotation; uniform vec2 center; #include #include @@ -3518,7 +3518,7 @@ void main() { #include #include #include -}`,aM=`uniform vec3 diffuse; +}`,iM=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3543,7 +3543,7 @@ void main() { #include #include #include -}`,ua={alphahash_fragment:E2,alphahash_pars_fragment:_2,alphamap_fragment:C2,alphamap_pars_fragment:L2,alphatest_fragment:P2,alphatest_pars_fragment:R2,aomap_fragment:D2,aomap_pars_fragment:I2,batching_pars_vertex:F2,batching_vertex:z2,begin_vertex:k2,beginnormal_vertex:O2,bsdfs:N2,iridescence_fragment:B2,bumpmap_pars_fragment:U2,clipping_planes_fragment:H2,clipping_planes_pars_fragment:V2,clipping_planes_pars_vertex:G2,clipping_planes_vertex:W2,color_fragment:Y2,color_pars_fragment:X2,color_pars_vertex:Z2,color_vertex:j2,common:K2,cube_uv_reflection_fragment:J2,defaultnormal_vertex:Q2,displacementmap_pars_vertex:$2,displacementmap_vertex:q2,emissivemap_fragment:tT,emissivemap_pars_fragment:eT,colorspace_fragment:rT,colorspace_pars_fragment:nT,envmap_fragment:iT,envmap_common_pars_fragment:aT,envmap_pars_fragment:oT,envmap_pars_vertex:sT,envmap_physical_pars_fragment:xT,envmap_vertex:lT,fog_vertex:uT,fog_pars_vertex:fT,fog_fragment:cT,fog_pars_fragment:hT,gradientmap_pars_fragment:vT,lightmap_fragment:dT,lightmap_pars_fragment:pT,lights_lambert_fragment:gT,lights_lambert_pars_fragment:mT,lights_pars_begin:yT,lights_toon_fragment:bT,lights_toon_pars_fragment:wT,lights_phong_fragment:TT,lights_phong_pars_fragment:AT,lights_physical_fragment:MT,lights_physical_pars_fragment:ST,lights_fragment_begin:ET,lights_fragment_maps:_T,lights_fragment_end:CT,logdepthbuf_fragment:LT,logdepthbuf_pars_fragment:PT,logdepthbuf_pars_vertex:RT,logdepthbuf_vertex:DT,map_fragment:IT,map_pars_fragment:FT,map_particle_fragment:zT,map_particle_pars_fragment:kT,metalnessmap_fragment:OT,metalnessmap_pars_fragment:NT,morphinstance_vertex:BT,morphcolor_vertex:UT,morphnormal_vertex:HT,morphtarget_pars_vertex:VT,morphtarget_vertex:GT,normal_fragment_begin:WT,normal_fragment_maps:YT,normal_pars_fragment:XT,normal_pars_vertex:ZT,normal_vertex:jT,normalmap_pars_fragment:KT,clearcoat_normal_fragment_begin:JT,clearcoat_normal_fragment_maps:QT,clearcoat_pars_fragment:$T,iridescence_pars_fragment:qT,opaque_fragment:tA,packing:eA,premultiplied_alpha_fragment:rA,project_vertex:nA,dithering_fragment:iA,dithering_pars_fragment:aA,roughnessmap_fragment:oA,roughnessmap_pars_fragment:sA,shadowmap_pars_fragment:lA,shadowmap_pars_vertex:uA,shadowmap_vertex:fA,shadowmask_pars_fragment:cA,skinbase_vertex:hA,skinning_pars_vertex:vA,skinning_vertex:dA,skinnormal_vertex:pA,specularmap_fragment:gA,specularmap_pars_fragment:mA,tonemapping_fragment:yA,tonemapping_pars_fragment:xA,transmission_fragment:bA,transmission_pars_fragment:wA,uv_pars_fragment:TA,uv_pars_vertex:AA,uv_vertex:MA,worldpos_vertex:SA,background_vert:EA,background_frag:_A,backgroundCube_vert:CA,backgroundCube_frag:LA,cube_vert:PA,cube_frag:RA,depth_vert:DA,depth_frag:IA,distanceRGBA_vert:FA,distanceRGBA_frag:zA,equirect_vert:kA,equirect_frag:OA,linedashed_vert:NA,linedashed_frag:BA,meshbasic_vert:UA,meshbasic_frag:HA,meshlambert_vert:VA,meshlambert_frag:GA,meshmatcap_vert:WA,meshmatcap_frag:YA,meshnormal_vert:XA,meshnormal_frag:ZA,meshphong_vert:jA,meshphong_frag:KA,meshphysical_vert:JA,meshphysical_frag:QA,meshtoon_vert:$A,meshtoon_frag:qA,points_vert:tM,points_frag:eM,shadow_vert:rM,shadow_frag:nM,sprite_vert:iM,sprite_frag:aM},_i={common:{diffuse:{value:new ha(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new fa},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new fa}},envmap:{envMap:{value:null},envMapRotation:{value:new fa},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new fa}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new fa}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new fa},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new fa},normalScale:{value:new Wi(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new fa},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new fa}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new fa}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new fa}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ha(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ha(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0},uvTransform:{value:new fa}},sprite:{diffuse:{value:new ha(16777215)},opacity:{value:1},center:{value:new Wi(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new fa},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0}}},Fu={basic:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.fog]),vertexShader:ua.meshbasic_vert,fragmentShader:ua.meshbasic_frag},lambert:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,_i.lights,{emissive:{value:new ha(0)}}]),vertexShader:ua.meshlambert_vert,fragmentShader:ua.meshlambert_frag},phong:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,_i.lights,{emissive:{value:new ha(0)},specular:{value:new ha(1118481)},shininess:{value:30}}]),vertexShader:ua.meshphong_vert,fragmentShader:ua.meshphong_frag},standard:{uniforms:Ms([_i.common,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.roughnessmap,_i.metalnessmap,_i.fog,_i.lights,{emissive:{value:new ha(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ua.meshphysical_vert,fragmentShader:ua.meshphysical_frag},toon:{uniforms:Ms([_i.common,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.gradientmap,_i.fog,_i.lights,{emissive:{value:new ha(0)}}]),vertexShader:ua.meshtoon_vert,fragmentShader:ua.meshtoon_frag},matcap:{uniforms:Ms([_i.common,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,{matcap:{value:null}}]),vertexShader:ua.meshmatcap_vert,fragmentShader:ua.meshmatcap_frag},points:{uniforms:Ms([_i.points,_i.fog]),vertexShader:ua.points_vert,fragmentShader:ua.points_frag},dashed:{uniforms:Ms([_i.common,_i.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ua.linedashed_vert,fragmentShader:ua.linedashed_frag},depth:{uniforms:Ms([_i.common,_i.displacementmap]),vertexShader:ua.depth_vert,fragmentShader:ua.depth_frag},normal:{uniforms:Ms([_i.common,_i.bumpmap,_i.normalmap,_i.displacementmap,{opacity:{value:1}}]),vertexShader:ua.meshnormal_vert,fragmentShader:ua.meshnormal_frag},sprite:{uniforms:Ms([_i.sprite,_i.fog]),vertexShader:ua.sprite_vert,fragmentShader:ua.sprite_frag},background:{uniforms:{uvTransform:{value:new fa},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ua.background_vert,fragmentShader:ua.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new fa}},vertexShader:ua.backgroundCube_vert,fragmentShader:ua.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ua.cube_vert,fragmentShader:ua.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ua.equirect_vert,fragmentShader:ua.equirect_frag},distanceRGBA:{uniforms:Ms([_i.common,_i.displacementmap,{referencePosition:{value:new bn},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ua.distanceRGBA_vert,fragmentShader:ua.distanceRGBA_frag},shadow:{uniforms:Ms([_i.lights,_i.fog,{color:{value:new ha(0)},opacity:{value:1}}]),vertexShader:ua.shadow_vert,fragmentShader:ua.shadow_frag}};Fu.physical={uniforms:Ms([Fu.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new fa},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new fa},clearcoatNormalScale:{value:new Wi(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new fa},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new fa},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new fa},sheen:{value:0},sheenColor:{value:new ha(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new fa},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new fa},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new fa},transmissionSamplerSize:{value:new Wi},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new fa},attenuationDistance:{value:0},attenuationColor:{value:new ha(0)},specularColor:{value:new ha(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new fa},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new fa},anisotropyVector:{value:new Wi},anisotropyMap:{value:null},anisotropyMapTransform:{value:new fa}}]),vertexShader:ua.meshphysical_vert,fragmentShader:ua.meshphysical_frag};const Kd={r:0,b:0,g:0},Kc=new Ss,oM=new so;function sM(_t,F,q,lt,Dt,Zt,G){const U=new ha(0);let t=Zt===!0?0:1,g,C,i=null,S=0,x=null;function v(r,e){let a=!1,n=e.isScene===!0?e.background:null;n&&n.isTexture&&(n=(e.backgroundBlurriness>0?q:F).get(n)),n===null?p(U,t):n&&n.isColor&&(p(n,1),a=!0);const f=_t.xr.getEnvironmentBlendMode();f==="additive"?lt.buffers.color.setClear(0,0,0,1,G):f==="alpha-blend"&<.buffers.color.setClear(0,0,0,0,G),(_t.autoClear||a)&&_t.clear(_t.autoClearColor,_t.autoClearDepth,_t.autoClearStencil),n&&(n.isCubeTexture||n.mapping===vp)?(C===void 0&&(C=new Vs(new hv(1,1,1),new gc({name:"BackgroundCubeMaterial",uniforms:fv(Fu.backgroundCube.uniforms),vertexShader:Fu.backgroundCube.vertexShader,fragmentShader:Fu.backgroundCube.fragmentShader,side:Gs,depthTest:!1,depthWrite:!1,fog:!1})),C.geometry.deleteAttribute("normal"),C.geometry.deleteAttribute("uv"),C.onBeforeRender=function(c,l,m){this.matrixWorld.copyPosition(m.matrixWorld)},Object.defineProperty(C.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),Dt.update(C)),Kc.copy(e.backgroundRotation),Kc.x*=-1,Kc.y*=-1,Kc.z*=-1,n.isCubeTexture&&n.isRenderTargetTexture===!1&&(Kc.y*=-1,Kc.z*=-1),C.material.uniforms.envMap.value=n,C.material.uniforms.flipEnvMap.value=n.isCubeTexture&&n.isRenderTargetTexture===!1?-1:1,C.material.uniforms.backgroundBlurriness.value=e.backgroundBlurriness,C.material.uniforms.backgroundIntensity.value=e.backgroundIntensity,C.material.uniforms.backgroundRotation.value.setFromMatrix4(oM.makeRotationFromEuler(Kc)),C.material.toneMapped=Fa.getTransfer(n.colorSpace)!==Ya,(i!==n||S!==n.version||x!==_t.toneMapping)&&(C.material.needsUpdate=!0,i=n,S=n.version,x=_t.toneMapping),C.layers.enableAll(),r.unshift(C,C.geometry,C.material,0,0,null)):n&&n.isTexture&&(g===void 0&&(g=new Vs(new pp(2,2),new gc({name:"BackgroundMaterial",uniforms:fv(Fu.background.uniforms),vertexShader:Fu.background.vertexShader,fragmentShader:Fu.background.fragmentShader,side:Nu,depthTest:!1,depthWrite:!1,fog:!1})),g.geometry.deleteAttribute("normal"),Object.defineProperty(g.material,"map",{get:function(){return this.uniforms.t2D.value}}),Dt.update(g)),g.material.uniforms.t2D.value=n,g.material.uniforms.backgroundIntensity.value=e.backgroundIntensity,g.material.toneMapped=Fa.getTransfer(n.colorSpace)!==Ya,n.matrixAutoUpdate===!0&&n.updateMatrix(),g.material.uniforms.uvTransform.value.copy(n.matrix),(i!==n||S!==n.version||x!==_t.toneMapping)&&(g.material.needsUpdate=!0,i=n,S=n.version,x=_t.toneMapping),g.layers.enableAll(),r.unshift(g,g.geometry,g.material,0,0,null))}function p(r,e){r.getRGB(Kd,o1(_t)),lt.buffers.color.setClear(Kd.r,Kd.g,Kd.b,e,G)}return{getClearColor:function(){return U},setClearColor:function(r,e=1){U.set(r),t=e,p(U,t)},getClearAlpha:function(){return t},setClearAlpha:function(r){t=r,p(U,t)},render:v}}function lM(_t,F){const q=_t.getParameter(_t.MAX_VERTEX_ATTRIBS),lt={},Dt=S(null);let Zt=Dt,G=!1;function U(u,o,d,w,A){let _=!1;const y=i(w,d,o);Zt!==y&&(Zt=y,g(Zt.object)),_=x(u,w,d,A),_&&v(u,w,d,A),A!==null&&F.update(A,_t.ELEMENT_ARRAY_BUFFER),(_||G)&&(G=!1,f(u,o,d,w),A!==null&&_t.bindBuffer(_t.ELEMENT_ARRAY_BUFFER,F.get(A).buffer))}function t(){return _t.createVertexArray()}function g(u){return _t.bindVertexArray(u)}function C(u){return _t.deleteVertexArray(u)}function i(u,o,d){const w=d.wireframe===!0;let A=lt[u.id];A===void 0&&(A={},lt[u.id]=A);let _=A[o.id];_===void 0&&(_={},A[o.id]=_);let y=_[w];return y===void 0&&(y=S(t()),_[w]=y),y}function S(u){const o=[],d=[],w=[];for(let A=0;A=0){const L=A[T];let M=_[T];if(M===void 0&&(T==="instanceMatrix"&&u.instanceMatrix&&(M=u.instanceMatrix),T==="instanceColor"&&u.instanceColor&&(M=u.instanceColor)),L===void 0||L.attribute!==M||M&&L.data!==M.data)return!0;y++}return Zt.attributesNum!==y||Zt.index!==w}function v(u,o,d,w){const A={},_=o.attributes;let y=0;const E=d.getAttributes();for(const T in E)if(E[T].location>=0){let L=_[T];L===void 0&&(T==="instanceMatrix"&&u.instanceMatrix&&(L=u.instanceMatrix),T==="instanceColor"&&u.instanceColor&&(L=u.instanceColor));const M={};M.attribute=L,L&&L.data&&(M.data=L.data),A[T]=M,y++}Zt.attributes=A,Zt.attributesNum=y,Zt.index=w}function p(){const u=Zt.newAttributes;for(let o=0,d=u.length;o=0){let s=A[E];if(s===void 0&&(E==="instanceMatrix"&&u.instanceMatrix&&(s=u.instanceMatrix),E==="instanceColor"&&u.instanceColor&&(s=u.instanceColor)),s!==void 0){const L=s.normalized,M=s.itemSize,z=F.get(s);if(z===void 0)continue;const D=z.buffer,N=z.type,I=z.bytesPerElement,k=N===_t.INT||N===_t.UNSIGNED_INT||s.gpuType===Yy;if(s.isInterleavedBufferAttribute){const B=s.data,O=B.stride,H=s.offset;if(B.isInstancedInterleavedBuffer){for(let Y=0;Y0&&_t.getShaderPrecisionFormat(_t.FRAGMENT_SHADER,_t.HIGH_FLOAT).precision>0)return"highp";n="mediump"}return n==="mediump"&&_t.getShaderPrecisionFormat(_t.VERTEX_SHADER,_t.MEDIUM_FLOAT).precision>0&&_t.getShaderPrecisionFormat(_t.FRAGMENT_SHADER,_t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let G=q.precision!==void 0?q.precision:"highp";const U=Zt(G);U!==G&&(console.warn("THREE.WebGLRenderer:",G,"not supported, using",U,"instead."),G=U);const t=q.logarithmicDepthBuffer===!0,g=_t.getParameter(_t.MAX_TEXTURE_IMAGE_UNITS),C=_t.getParameter(_t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),i=_t.getParameter(_t.MAX_TEXTURE_SIZE),S=_t.getParameter(_t.MAX_CUBE_MAP_TEXTURE_SIZE),x=_t.getParameter(_t.MAX_VERTEX_ATTRIBS),v=_t.getParameter(_t.MAX_VERTEX_UNIFORM_VECTORS),p=_t.getParameter(_t.MAX_VARYING_VECTORS),r=_t.getParameter(_t.MAX_FRAGMENT_UNIFORM_VECTORS),e=C>0,a=_t.getParameter(_t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:Dt,getMaxPrecision:Zt,precision:G,logarithmicDepthBuffer:t,maxTextures:g,maxVertexTextures:C,maxTextureSize:i,maxCubemapSize:S,maxAttributes:x,maxVertexUniforms:v,maxVaryings:p,maxFragmentUniforms:r,vertexTextures:e,maxSamples:a}}function cM(_t){const F=this;let q=null,lt=0,Dt=!1,Zt=!1;const G=new fc,U=new fa,t={value:null,needsUpdate:!1};this.uniform=t,this.numPlanes=0,this.numIntersection=0,this.init=function(i,S){const x=i.length!==0||S||lt!==0||Dt;return Dt=S,lt=i.length,x},this.beginShadows=function(){Zt=!0,C(null)},this.endShadows=function(){Zt=!1},this.setGlobalState=function(i,S){q=C(i,S,0)},this.setState=function(i,S,x){const v=i.clippingPlanes,p=i.clipIntersection,r=i.clipShadows,e=_t.get(i);if(!Dt||v===null||v.length===0||Zt&&!r)Zt?C(null):g();else{const a=Zt?0:lt,n=a*4;let f=e.clippingState||null;t.value=f,f=C(v,S,n,x);for(let c=0;c!==n;++c)f[c]=q[c];e.clippingState=f,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=a}};function g(){t.value!==q&&(t.value=q,t.needsUpdate=lt>0),F.numPlanes=lt,F.numIntersection=0}function C(i,S,x,v){const p=i!==null?i.length:0;let r=null;if(p!==0){if(r=t.value,v!==!0||r===null){const e=x+p*4,a=S.matrixWorldInverse;U.getNormalMatrix(a),(r===null||r.length0){const g=new T2(t.height);return g.fromEquirectangularTexture(_t,G),F.set(G,g),G.addEventListener("dispose",Dt),q(g.texture,G.mapping)}else return null}}return G}function Dt(G){const U=G.target;U.removeEventListener("dispose",Dt);const t=F.get(U);t!==void 0&&(F.delete(U),t.dispose())}function Zt(){F=new WeakMap}return{get:lt,dispose:Zt}}class gp extends s1{constructor(F=-1,q=1,lt=1,Dt=-1,Zt=.1,G=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=F,this.right=q,this.top=lt,this.bottom=Dt,this.near=Zt,this.far=G,this.updateProjectionMatrix()}copy(F,q){return super.copy(F,q),this.left=F.left,this.right=F.right,this.top=F.top,this.bottom=F.bottom,this.near=F.near,this.far=F.far,this.zoom=F.zoom,this.view=F.view===null?null:Object.assign({},F.view),this}setViewOffset(F,q,lt,Dt,Zt,G){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=F,this.view.fullHeight=q,this.view.offsetX=lt,this.view.offsetY=Dt,this.view.width=Zt,this.view.height=G,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const F=(this.right-this.left)/(2*this.zoom),q=(this.top-this.bottom)/(2*this.zoom),lt=(this.right+this.left)/2,Dt=(this.top+this.bottom)/2;let Zt=lt-F,G=lt+F,U=Dt+q,t=Dt-q;if(this.view!==null&&this.view.enabled){const g=(this.right-this.left)/this.view.fullWidth/this.zoom,C=(this.top-this.bottom)/this.view.fullHeight/this.zoom;Zt+=g*this.view.offsetX,G=Zt+g*this.view.width,U-=C*this.view.offsetY,t=U-C*this.view.height}this.projectionMatrix.makeOrthographic(Zt,G,U,t,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(F){const q=super.toJSON(F);return q.object.zoom=this.zoom,q.object.left=this.left,q.object.right=this.right,q.object.top=this.top,q.object.bottom=this.bottom,q.object.near=this.near,q.object.far=this.far,this.view!==null&&(q.object.view=Object.assign({},this.view)),q}}const ev=4,ey=[.125,.215,.35,.446,.526,.582],qc=20,T0=new gp,ry=new ha;let A0=null,M0=0,S0=0,E0=!1;const Qc=(1+Math.sqrt(5))/2,Kh=1/Qc,ny=[new bn(1,1,1),new bn(-1,1,1),new bn(1,1,-1),new bn(-1,1,-1),new bn(0,Qc,Kh),new bn(0,Qc,-Kh),new bn(Kh,0,Qc),new bn(-Kh,0,Qc),new bn(Qc,Kh,0),new bn(-Qc,Kh,0)];class iy{constructor(F){this._renderer=F,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(F,q=0,lt=.1,Dt=100){A0=this._renderer.getRenderTarget(),M0=this._renderer.getActiveCubeFace(),S0=this._renderer.getActiveMipmapLevel(),E0=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const Zt=this._allocateTargets();return Zt.depthBuffer=!0,this._sceneToCubeUV(F,lt,Dt,Zt),q>0&&this._blur(Zt,0,0,q),this._applyPMREM(Zt),this._cleanup(Zt),Zt}fromEquirectangular(F,q=null){return this._fromTexture(F,q)}fromCubemap(F,q=null){return this._fromTexture(F,q)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=sy(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=oy(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(F){this._lodMax=Math.floor(Math.log2(F)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let F=0;F2?n:0,n,n),C.setRenderTarget(Dt),p&&C.render(v,U),C.render(F,U)}v.geometry.dispose(),v.material.dispose(),C.toneMapping=S,C.autoClear=i,F.background=r}_textureToCubeUV(F,q){const lt=this._renderer,Dt=F.mapping===sv||F.mapping===lv;Dt?(this._cubemapMaterial===null&&(this._cubemapMaterial=sy()),this._cubemapMaterial.uniforms.flipEnvMap.value=F.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=oy());const Zt=Dt?this._cubemapMaterial:this._equirectMaterial,G=new Vs(this._lodPlanes[0],Zt),U=Zt.uniforms;U.envMap.value=F;const t=this._cubeSize;Jd(q,0,0,3*t,2*t),lt.setRenderTarget(q),lt.render(G,T0)}_applyPMREM(F){const q=this._renderer,lt=q.autoClear;q.autoClear=!1;for(let Dt=1;Dtqc&&console.warn(`sigmaRadians, ${Zt}, is too large and will clip, as it requested ${r} samples when the maximum is set to ${qc}`);const e=[];let a=0;for(let m=0;mn-ev?Dt-n+ev:0),l=4*(this._cubeSize-f);Jd(q,c,l,3*f,2*f),t.setRenderTarget(q),t.render(i,T0)}}function vM(_t){const F=[],q=[],lt=[];let Dt=_t;const Zt=_t-ev+1+ey.length;for(let G=0;G_t-ev?t=ey[G-_t+ev-1]:G===0&&(t=0),lt.push(t);const g=1/(U-2),C=-g,i=1+g,S=[C,C,i,C,i,i,C,C,i,i,C,i],x=6,v=6,p=3,r=2,e=1,a=new Float32Array(p*v*x),n=new Float32Array(r*v*x),f=new Float32Array(e*v*x);for(let l=0;l2?0:-1,b=[m,h,0,m+2/3,h,0,m+2/3,h+1,0,m,h,0,m+2/3,h+1,0,m,h+1,0];a.set(b,p*v*l),n.set(S,r*v*l);const u=[l,l,l,l,l,l];f.set(u,e*v*l)}const c=new Ys;c.setAttribute("position",new Ws(a,p)),c.setAttribute("uv",new Ws(n,r)),c.setAttribute("faceIndex",new Ws(f,e)),F.push(c),Dt>ev&&Dt--}return{lodPlanes:F,sizeLods:q,sigmas:lt}}function ay(_t,F,q){const lt=new rh(_t,F,q);return lt.texture.mapping=vp,lt.texture.name="PMREM.cubeUv",lt.scissorTest=!0,lt}function Jd(_t,F,q,lt,Dt){_t.viewport.set(F,q,lt,Dt),_t.scissor.set(F,q,lt,Dt)}function dM(_t,F,q){const lt=new Float32Array(qc),Dt=new bn(0,1,0);return new gc({name:"SphericalGaussianBlur",defines:{n:qc,CUBEUV_TEXEL_WIDTH:1/F,CUBEUV_TEXEL_HEIGHT:1/q,CUBEUV_MAX_MIP:`${_t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:lt},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:Dt}},vertexShader:j0(),fragmentShader:` +}`,ua={alphahash_fragment:S2,alphahash_pars_fragment:E2,alphamap_fragment:_2,alphamap_pars_fragment:C2,alphatest_fragment:L2,alphatest_pars_fragment:P2,aomap_fragment:R2,aomap_pars_fragment:D2,batching_pars_vertex:I2,batching_vertex:F2,begin_vertex:z2,beginnormal_vertex:k2,bsdfs:O2,iridescence_fragment:N2,bumpmap_pars_fragment:B2,clipping_planes_fragment:U2,clipping_planes_pars_fragment:H2,clipping_planes_pars_vertex:V2,clipping_planes_vertex:G2,color_fragment:W2,color_pars_fragment:Y2,color_pars_vertex:X2,color_vertex:Z2,common:j2,cube_uv_reflection_fragment:K2,defaultnormal_vertex:J2,displacementmap_pars_vertex:Q2,displacementmap_vertex:$2,emissivemap_fragment:q2,emissivemap_pars_fragment:tT,colorspace_fragment:eT,colorspace_pars_fragment:rT,envmap_fragment:nT,envmap_common_pars_fragment:iT,envmap_pars_fragment:aT,envmap_pars_vertex:oT,envmap_physical_pars_fragment:yT,envmap_vertex:sT,fog_vertex:lT,fog_pars_vertex:uT,fog_fragment:fT,fog_pars_fragment:cT,gradientmap_pars_fragment:hT,lightmap_fragment:vT,lightmap_pars_fragment:dT,lights_lambert_fragment:pT,lights_lambert_pars_fragment:gT,lights_pars_begin:mT,lights_toon_fragment:xT,lights_toon_pars_fragment:bT,lights_phong_fragment:wT,lights_phong_pars_fragment:TT,lights_physical_fragment:AT,lights_physical_pars_fragment:MT,lights_fragment_begin:ST,lights_fragment_maps:ET,lights_fragment_end:_T,logdepthbuf_fragment:CT,logdepthbuf_pars_fragment:LT,logdepthbuf_pars_vertex:PT,logdepthbuf_vertex:RT,map_fragment:DT,map_pars_fragment:IT,map_particle_fragment:FT,map_particle_pars_fragment:zT,metalnessmap_fragment:kT,metalnessmap_pars_fragment:OT,morphinstance_vertex:NT,morphcolor_vertex:BT,morphnormal_vertex:UT,morphtarget_pars_vertex:HT,morphtarget_vertex:VT,normal_fragment_begin:GT,normal_fragment_maps:WT,normal_pars_fragment:YT,normal_pars_vertex:XT,normal_vertex:ZT,normalmap_pars_fragment:jT,clearcoat_normal_fragment_begin:KT,clearcoat_normal_fragment_maps:JT,clearcoat_pars_fragment:QT,iridescence_pars_fragment:$T,opaque_fragment:qT,packing:tA,premultiplied_alpha_fragment:eA,project_vertex:rA,dithering_fragment:nA,dithering_pars_fragment:iA,roughnessmap_fragment:aA,roughnessmap_pars_fragment:oA,shadowmap_pars_fragment:sA,shadowmap_pars_vertex:lA,shadowmap_vertex:uA,shadowmask_pars_fragment:fA,skinbase_vertex:cA,skinning_pars_vertex:hA,skinning_vertex:vA,skinnormal_vertex:dA,specularmap_fragment:pA,specularmap_pars_fragment:gA,tonemapping_fragment:mA,tonemapping_pars_fragment:yA,transmission_fragment:xA,transmission_pars_fragment:bA,uv_pars_fragment:wA,uv_pars_vertex:TA,uv_vertex:AA,worldpos_vertex:MA,background_vert:SA,background_frag:EA,backgroundCube_vert:_A,backgroundCube_frag:CA,cube_vert:LA,cube_frag:PA,depth_vert:RA,depth_frag:DA,distanceRGBA_vert:IA,distanceRGBA_frag:FA,equirect_vert:zA,equirect_frag:kA,linedashed_vert:OA,linedashed_frag:NA,meshbasic_vert:BA,meshbasic_frag:UA,meshlambert_vert:HA,meshlambert_frag:VA,meshmatcap_vert:GA,meshmatcap_frag:WA,meshnormal_vert:YA,meshnormal_frag:XA,meshphong_vert:ZA,meshphong_frag:jA,meshphysical_vert:KA,meshphysical_frag:JA,meshtoon_vert:QA,meshtoon_frag:$A,points_vert:qA,points_frag:tM,shadow_vert:eM,shadow_frag:rM,sprite_vert:nM,sprite_frag:iM},_i={common:{diffuse:{value:new ha(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new fa},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new fa}},envmap:{envMap:{value:null},envMapRotation:{value:new fa},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new fa}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new fa}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new fa},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new fa},normalScale:{value:new Wi(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new fa},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new fa}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new fa}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new fa}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ha(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ha(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0},uvTransform:{value:new fa}},sprite:{diffuse:{value:new ha(16777215)},opacity:{value:1},center:{value:new Wi(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new fa},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0}}},Fu={basic:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.fog]),vertexShader:ua.meshbasic_vert,fragmentShader:ua.meshbasic_frag},lambert:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,_i.lights,{emissive:{value:new ha(0)}}]),vertexShader:ua.meshlambert_vert,fragmentShader:ua.meshlambert_frag},phong:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,_i.lights,{emissive:{value:new ha(0)},specular:{value:new ha(1118481)},shininess:{value:30}}]),vertexShader:ua.meshphong_vert,fragmentShader:ua.meshphong_frag},standard:{uniforms:Ms([_i.common,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.roughnessmap,_i.metalnessmap,_i.fog,_i.lights,{emissive:{value:new ha(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ua.meshphysical_vert,fragmentShader:ua.meshphysical_frag},toon:{uniforms:Ms([_i.common,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.gradientmap,_i.fog,_i.lights,{emissive:{value:new ha(0)}}]),vertexShader:ua.meshtoon_vert,fragmentShader:ua.meshtoon_frag},matcap:{uniforms:Ms([_i.common,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,{matcap:{value:null}}]),vertexShader:ua.meshmatcap_vert,fragmentShader:ua.meshmatcap_frag},points:{uniforms:Ms([_i.points,_i.fog]),vertexShader:ua.points_vert,fragmentShader:ua.points_frag},dashed:{uniforms:Ms([_i.common,_i.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ua.linedashed_vert,fragmentShader:ua.linedashed_frag},depth:{uniforms:Ms([_i.common,_i.displacementmap]),vertexShader:ua.depth_vert,fragmentShader:ua.depth_frag},normal:{uniforms:Ms([_i.common,_i.bumpmap,_i.normalmap,_i.displacementmap,{opacity:{value:1}}]),vertexShader:ua.meshnormal_vert,fragmentShader:ua.meshnormal_frag},sprite:{uniforms:Ms([_i.sprite,_i.fog]),vertexShader:ua.sprite_vert,fragmentShader:ua.sprite_frag},background:{uniforms:{uvTransform:{value:new fa},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ua.background_vert,fragmentShader:ua.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new fa}},vertexShader:ua.backgroundCube_vert,fragmentShader:ua.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ua.cube_vert,fragmentShader:ua.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ua.equirect_vert,fragmentShader:ua.equirect_frag},distanceRGBA:{uniforms:Ms([_i.common,_i.displacementmap,{referencePosition:{value:new bn},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ua.distanceRGBA_vert,fragmentShader:ua.distanceRGBA_frag},shadow:{uniforms:Ms([_i.lights,_i.fog,{color:{value:new ha(0)},opacity:{value:1}}]),vertexShader:ua.shadow_vert,fragmentShader:ua.shadow_frag}};Fu.physical={uniforms:Ms([Fu.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new fa},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new fa},clearcoatNormalScale:{value:new Wi(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new fa},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new fa},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new fa},sheen:{value:0},sheenColor:{value:new ha(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new fa},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new fa},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new fa},transmissionSamplerSize:{value:new Wi},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new fa},attenuationDistance:{value:0},attenuationColor:{value:new ha(0)},specularColor:{value:new ha(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new fa},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new fa},anisotropyVector:{value:new Wi},anisotropyMap:{value:null},anisotropyMapTransform:{value:new fa}}]),vertexShader:ua.meshphysical_vert,fragmentShader:ua.meshphysical_frag};const jd={r:0,b:0,g:0},Kc=new Ss,aM=new so;function oM(_t,F,q,lt,Dt,Zt,G){const U=new ha(0);let t=Zt===!0?0:1,g,C,i=null,S=0,x=null;function h(r,e){let a=!1,n=e.isScene===!0?e.background:null;n&&n.isTexture&&(n=(e.backgroundBlurriness>0?q:F).get(n)),n===null?p(U,t):n&&n.isColor&&(p(n,1),a=!0);const f=_t.xr.getEnvironmentBlendMode();f==="additive"?lt.buffers.color.setClear(0,0,0,1,G):f==="alpha-blend"&<.buffers.color.setClear(0,0,0,0,G),(_t.autoClear||a)&&_t.clear(_t.autoClearColor,_t.autoClearDepth,_t.autoClearStencil),n&&(n.isCubeTexture||n.mapping===hp)?(C===void 0&&(C=new Vs(new cv(1,1,1),new gc({name:"BackgroundCubeMaterial",uniforms:fv(Fu.backgroundCube.uniforms),vertexShader:Fu.backgroundCube.vertexShader,fragmentShader:Fu.backgroundCube.fragmentShader,side:Gs,depthTest:!1,depthWrite:!1,fog:!1})),C.geometry.deleteAttribute("normal"),C.geometry.deleteAttribute("uv"),C.onBeforeRender=function(c,l,m){this.matrixWorld.copyPosition(m.matrixWorld)},Object.defineProperty(C.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),Dt.update(C)),Kc.copy(e.backgroundRotation),Kc.x*=-1,Kc.y*=-1,Kc.z*=-1,n.isCubeTexture&&n.isRenderTargetTexture===!1&&(Kc.y*=-1,Kc.z*=-1),C.material.uniforms.envMap.value=n,C.material.uniforms.flipEnvMap.value=n.isCubeTexture&&n.isRenderTargetTexture===!1?-1:1,C.material.uniforms.backgroundBlurriness.value=e.backgroundBlurriness,C.material.uniforms.backgroundIntensity.value=e.backgroundIntensity,C.material.uniforms.backgroundRotation.value.setFromMatrix4(aM.makeRotationFromEuler(Kc)),C.material.toneMapped=Fa.getTransfer(n.colorSpace)!==Ya,(i!==n||S!==n.version||x!==_t.toneMapping)&&(C.material.needsUpdate=!0,i=n,S=n.version,x=_t.toneMapping),C.layers.enableAll(),r.unshift(C,C.geometry,C.material,0,0,null)):n&&n.isTexture&&(g===void 0&&(g=new Vs(new dp(2,2),new gc({name:"BackgroundMaterial",uniforms:fv(Fu.background.uniforms),vertexShader:Fu.background.vertexShader,fragmentShader:Fu.background.fragmentShader,side:Nu,depthTest:!1,depthWrite:!1,fog:!1})),g.geometry.deleteAttribute("normal"),Object.defineProperty(g.material,"map",{get:function(){return this.uniforms.t2D.value}}),Dt.update(g)),g.material.uniforms.t2D.value=n,g.material.uniforms.backgroundIntensity.value=e.backgroundIntensity,g.material.toneMapped=Fa.getTransfer(n.colorSpace)!==Ya,n.matrixAutoUpdate===!0&&n.updateMatrix(),g.material.uniforms.uvTransform.value.copy(n.matrix),(i!==n||S!==n.version||x!==_t.toneMapping)&&(g.material.needsUpdate=!0,i=n,S=n.version,x=_t.toneMapping),g.layers.enableAll(),r.unshift(g,g.geometry,g.material,0,0,null))}function p(r,e){r.getRGB(jd,a1(_t)),lt.buffers.color.setClear(jd.r,jd.g,jd.b,e,G)}return{getClearColor:function(){return U},setClearColor:function(r,e=1){U.set(r),t=e,p(U,t)},getClearAlpha:function(){return t},setClearAlpha:function(r){t=r,p(U,t)},render:h}}function sM(_t,F){const q=_t.getParameter(_t.MAX_VERTEX_ATTRIBS),lt={},Dt=S(null);let Zt=Dt,G=!1;function U(u,o,d,w,A){let _=!1;const y=i(w,d,o);Zt!==y&&(Zt=y,g(Zt.object)),_=x(u,w,d,A),_&&h(u,w,d,A),A!==null&&F.update(A,_t.ELEMENT_ARRAY_BUFFER),(_||G)&&(G=!1,f(u,o,d,w),A!==null&&_t.bindBuffer(_t.ELEMENT_ARRAY_BUFFER,F.get(A).buffer))}function t(){return _t.createVertexArray()}function g(u){return _t.bindVertexArray(u)}function C(u){return _t.deleteVertexArray(u)}function i(u,o,d){const w=d.wireframe===!0;let A=lt[u.id];A===void 0&&(A={},lt[u.id]=A);let _=A[o.id];_===void 0&&(_={},A[o.id]=_);let y=_[w];return y===void 0&&(y=S(t()),_[w]=y),y}function S(u){const o=[],d=[],w=[];for(let A=0;A=0){const L=A[T];let M=_[T];if(M===void 0&&(T==="instanceMatrix"&&u.instanceMatrix&&(M=u.instanceMatrix),T==="instanceColor"&&u.instanceColor&&(M=u.instanceColor)),L===void 0||L.attribute!==M||M&&L.data!==M.data)return!0;y++}return Zt.attributesNum!==y||Zt.index!==w}function h(u,o,d,w){const A={},_=o.attributes;let y=0;const E=d.getAttributes();for(const T in E)if(E[T].location>=0){let L=_[T];L===void 0&&(T==="instanceMatrix"&&u.instanceMatrix&&(L=u.instanceMatrix),T==="instanceColor"&&u.instanceColor&&(L=u.instanceColor));const M={};M.attribute=L,L&&L.data&&(M.data=L.data),A[T]=M,y++}Zt.attributes=A,Zt.attributesNum=y,Zt.index=w}function p(){const u=Zt.newAttributes;for(let o=0,d=u.length;o=0){let s=A[E];if(s===void 0&&(E==="instanceMatrix"&&u.instanceMatrix&&(s=u.instanceMatrix),E==="instanceColor"&&u.instanceColor&&(s=u.instanceColor)),s!==void 0){const L=s.normalized,M=s.itemSize,z=F.get(s);if(z===void 0)continue;const D=z.buffer,N=z.type,I=z.bytesPerElement,k=N===_t.INT||N===_t.UNSIGNED_INT||s.gpuType===Wy;if(s.isInterleavedBufferAttribute){const B=s.data,O=B.stride,H=s.offset;if(B.isInstancedInterleavedBuffer){for(let Y=0;Y0&&_t.getShaderPrecisionFormat(_t.FRAGMENT_SHADER,_t.HIGH_FLOAT).precision>0)return"highp";n="mediump"}return n==="mediump"&&_t.getShaderPrecisionFormat(_t.VERTEX_SHADER,_t.MEDIUM_FLOAT).precision>0&&_t.getShaderPrecisionFormat(_t.FRAGMENT_SHADER,_t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let G=q.precision!==void 0?q.precision:"highp";const U=Zt(G);U!==G&&(console.warn("THREE.WebGLRenderer:",G,"not supported, using",U,"instead."),G=U);const t=q.logarithmicDepthBuffer===!0,g=_t.getParameter(_t.MAX_TEXTURE_IMAGE_UNITS),C=_t.getParameter(_t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),i=_t.getParameter(_t.MAX_TEXTURE_SIZE),S=_t.getParameter(_t.MAX_CUBE_MAP_TEXTURE_SIZE),x=_t.getParameter(_t.MAX_VERTEX_ATTRIBS),h=_t.getParameter(_t.MAX_VERTEX_UNIFORM_VECTORS),p=_t.getParameter(_t.MAX_VARYING_VECTORS),r=_t.getParameter(_t.MAX_FRAGMENT_UNIFORM_VECTORS),e=C>0,a=_t.getParameter(_t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:Dt,getMaxPrecision:Zt,precision:G,logarithmicDepthBuffer:t,maxTextures:g,maxVertexTextures:C,maxTextureSize:i,maxCubemapSize:S,maxAttributes:x,maxVertexUniforms:h,maxVaryings:p,maxFragmentUniforms:r,vertexTextures:e,maxSamples:a}}function fM(_t){const F=this;let q=null,lt=0,Dt=!1,Zt=!1;const G=new fc,U=new fa,t={value:null,needsUpdate:!1};this.uniform=t,this.numPlanes=0,this.numIntersection=0,this.init=function(i,S){const x=i.length!==0||S||lt!==0||Dt;return Dt=S,lt=i.length,x},this.beginShadows=function(){Zt=!0,C(null)},this.endShadows=function(){Zt=!1},this.setGlobalState=function(i,S){q=C(i,S,0)},this.setState=function(i,S,x){const h=i.clippingPlanes,p=i.clipIntersection,r=i.clipShadows,e=_t.get(i);if(!Dt||h===null||h.length===0||Zt&&!r)Zt?C(null):g();else{const a=Zt?0:lt,n=a*4;let f=e.clippingState||null;t.value=f,f=C(h,S,n,x);for(let c=0;c!==n;++c)f[c]=q[c];e.clippingState=f,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=a}};function g(){t.value!==q&&(t.value=q,t.needsUpdate=lt>0),F.numPlanes=lt,F.numIntersection=0}function C(i,S,x,h){const p=i!==null?i.length:0;let r=null;if(p!==0){if(r=t.value,h!==!0||r===null){const e=x+p*4,a=S.matrixWorldInverse;U.getNormalMatrix(a),(r===null||r.length0){const g=new w2(t.height);return g.fromEquirectangularTexture(_t,G),F.set(G,g),G.addEventListener("dispose",Dt),q(g.texture,G.mapping)}else return null}}return G}function Dt(G){const U=G.target;U.removeEventListener("dispose",Dt);const t=F.get(U);t!==void 0&&(F.delete(U),t.dispose())}function Zt(){F=new WeakMap}return{get:lt,dispose:Zt}}class pp extends o1{constructor(F=-1,q=1,lt=1,Dt=-1,Zt=.1,G=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=F,this.right=q,this.top=lt,this.bottom=Dt,this.near=Zt,this.far=G,this.updateProjectionMatrix()}copy(F,q){return super.copy(F,q),this.left=F.left,this.right=F.right,this.top=F.top,this.bottom=F.bottom,this.near=F.near,this.far=F.far,this.zoom=F.zoom,this.view=F.view===null?null:Object.assign({},F.view),this}setViewOffset(F,q,lt,Dt,Zt,G){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=F,this.view.fullHeight=q,this.view.offsetX=lt,this.view.offsetY=Dt,this.view.width=Zt,this.view.height=G,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const F=(this.right-this.left)/(2*this.zoom),q=(this.top-this.bottom)/(2*this.zoom),lt=(this.right+this.left)/2,Dt=(this.top+this.bottom)/2;let Zt=lt-F,G=lt+F,U=Dt+q,t=Dt-q;if(this.view!==null&&this.view.enabled){const g=(this.right-this.left)/this.view.fullWidth/this.zoom,C=(this.top-this.bottom)/this.view.fullHeight/this.zoom;Zt+=g*this.view.offsetX,G=Zt+g*this.view.width,U-=C*this.view.offsetY,t=U-C*this.view.height}this.projectionMatrix.makeOrthographic(Zt,G,U,t,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(F){const q=super.toJSON(F);return q.object.zoom=this.zoom,q.object.left=this.left,q.object.right=this.right,q.object.top=this.top,q.object.bottom=this.bottom,q.object.near=this.near,q.object.far=this.far,this.view!==null&&(q.object.view=Object.assign({},this.view)),q}}const ev=4,ty=[.125,.215,.35,.446,.526,.582],qc=20,w0=new pp,ey=new ha;let T0=null,A0=0,M0=0,S0=!1;const Qc=(1+Math.sqrt(5))/2,Kh=1/Qc,ry=[new bn(1,1,1),new bn(-1,1,1),new bn(1,1,-1),new bn(-1,1,-1),new bn(0,Qc,Kh),new bn(0,Qc,-Kh),new bn(Kh,0,Qc),new bn(-Kh,0,Qc),new bn(Qc,Kh,0),new bn(-Qc,Kh,0)];class ny{constructor(F){this._renderer=F,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(F,q=0,lt=.1,Dt=100){T0=this._renderer.getRenderTarget(),A0=this._renderer.getActiveCubeFace(),M0=this._renderer.getActiveMipmapLevel(),S0=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const Zt=this._allocateTargets();return Zt.depthBuffer=!0,this._sceneToCubeUV(F,lt,Dt,Zt),q>0&&this._blur(Zt,0,0,q),this._applyPMREM(Zt),this._cleanup(Zt),Zt}fromEquirectangular(F,q=null){return this._fromTexture(F,q)}fromCubemap(F,q=null){return this._fromTexture(F,q)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=oy(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=ay(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(F){this._lodMax=Math.floor(Math.log2(F)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let F=0;F2?n:0,n,n),C.setRenderTarget(Dt),p&&C.render(h,U),C.render(F,U)}h.geometry.dispose(),h.material.dispose(),C.toneMapping=S,C.autoClear=i,F.background=r}_textureToCubeUV(F,q){const lt=this._renderer,Dt=F.mapping===sv||F.mapping===lv;Dt?(this._cubemapMaterial===null&&(this._cubemapMaterial=oy()),this._cubemapMaterial.uniforms.flipEnvMap.value=F.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=ay());const Zt=Dt?this._cubemapMaterial:this._equirectMaterial,G=new Vs(this._lodPlanes[0],Zt),U=Zt.uniforms;U.envMap.value=F;const t=this._cubeSize;Kd(q,0,0,3*t,2*t),lt.setRenderTarget(q),lt.render(G,w0)}_applyPMREM(F){const q=this._renderer,lt=q.autoClear;q.autoClear=!1;for(let Dt=1;Dtqc&&console.warn(`sigmaRadians, ${Zt}, is too large and will clip, as it requested ${r} samples when the maximum is set to ${qc}`);const e=[];let a=0;for(let m=0;mn-ev?Dt-n+ev:0),l=4*(this._cubeSize-f);Kd(q,c,l,3*f,2*f),t.setRenderTarget(q),t.render(i,w0)}}function hM(_t){const F=[],q=[],lt=[];let Dt=_t;const Zt=_t-ev+1+ty.length;for(let G=0;G_t-ev?t=ty[G-_t+ev-1]:G===0&&(t=0),lt.push(t);const g=1/(U-2),C=-g,i=1+g,S=[C,C,i,C,i,i,C,C,i,i,C,i],x=6,h=6,p=3,r=2,e=1,a=new Float32Array(p*h*x),n=new Float32Array(r*h*x),f=new Float32Array(e*h*x);for(let l=0;l2?0:-1,b=[m,v,0,m+2/3,v,0,m+2/3,v+1,0,m,v,0,m+2/3,v+1,0,m,v+1,0];a.set(b,p*h*l),n.set(S,r*h*l);const u=[l,l,l,l,l,l];f.set(u,e*h*l)}const c=new Ys;c.setAttribute("position",new Ws(a,p)),c.setAttribute("uv",new Ws(n,r)),c.setAttribute("faceIndex",new Ws(f,e)),F.push(c),Dt>ev&&Dt--}return{lodPlanes:F,sizeLods:q,sigmas:lt}}function iy(_t,F,q){const lt=new rh(_t,F,q);return lt.texture.mapping=hp,lt.texture.name="PMREM.cubeUv",lt.scissorTest=!0,lt}function Kd(_t,F,q,lt,Dt){_t.viewport.set(F,q,lt,Dt),_t.scissor.set(F,q,lt,Dt)}function vM(_t,F,q){const lt=new Float32Array(qc),Dt=new bn(0,1,0);return new gc({name:"SphericalGaussianBlur",defines:{n:qc,CUBEUV_TEXEL_WIDTH:1/F,CUBEUV_TEXEL_HEIGHT:1/q,CUBEUV_MAX_MIP:`${_t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:lt},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:Dt}},vertexShader:Z0(),fragmentShader:` precision mediump float; precision mediump int; @@ -3603,7 +3603,7 @@ void main() { } } - `,blending:vc,depthTest:!1,depthWrite:!1})}function oy(){return new gc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:j0(),fragmentShader:` + `,blending:vc,depthTest:!1,depthWrite:!1})}function ay(){return new gc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Z0(),fragmentShader:` precision mediump float; precision mediump int; @@ -3622,7 +3622,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:vc,depthTest:!1,depthWrite:!1})}function sy(){return new gc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:j0(),fragmentShader:` + `,blending:vc,depthTest:!1,depthWrite:!1})}function oy(){return new gc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Z0(),fragmentShader:` precision mediump float; precision mediump int; @@ -3638,7 +3638,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:vc,depthTest:!1,depthWrite:!1})}function j0(){return` + `,blending:vc,depthTest:!1,depthWrite:!1})}function Z0(){return` precision mediump float; precision mediump int; @@ -3693,15 +3693,15 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function pM(_t){let F=new WeakMap,q=null;function lt(U){if(U&&U.isTexture){const t=U.mapping,g=t===z0||t===k0,C=t===sv||t===lv;if(g||C){let i=F.get(U);const S=i!==void 0?i.texture.pmremVersion:0;if(U.isRenderTargetTexture&&U.pmremVersion!==S)return q===null&&(q=new iy(_t)),i=g?q.fromEquirectangular(U,i):q.fromCubemap(U,i),i.texture.pmremVersion=U.pmremVersion,F.set(U,i),i.texture;if(i!==void 0)return i.texture;{const x=U.image;return g&&x&&x.height>0||C&&x&&Dt(x)?(q===null&&(q=new iy(_t)),i=g?q.fromEquirectangular(U):q.fromCubemap(U),i.texture.pmremVersion=U.pmremVersion,F.set(U,i),U.addEventListener("dispose",Zt),i.texture):null}}}return U}function Dt(U){let t=0;const g=6;for(let C=0;CF.maxTextureSize&&(c=Math.ceil(f/F.maxTextureSize),f=F.maxTextureSize);const l=new Float32Array(f*c*4*i),m=new r1(l,f,c,i);m.type=hc,m.needsUpdate=!0;const h=n*4;for(let u=0;u0)return _t;const Dt=F*q;let Zt=ly[Dt];if(Zt===void 0&&(Zt=new Float32Array(Dt),ly[Dt]=Zt),F!==0){lt.toArray(Zt,0);for(let G=1,U=0;G!==F;++G)U+=q,_t[G].toArray(Zt,U)}return Zt}function Po(_t,F){if(_t.length!==F.length)return!1;for(let q=0,lt=_t.length;q0||C&&x&&Dt(x)?(q===null&&(q=new ny(_t)),i=g?q.fromEquirectangular(U):q.fromCubemap(U),i.texture.pmremVersion=U.pmremVersion,F.set(U,i),U.addEventListener("dispose",Zt),i.texture):null}}}return U}function Dt(U){let t=0;const g=6;for(let C=0;CF.maxTextureSize&&(c=Math.ceil(f/F.maxTextureSize),f=F.maxTextureSize);const l=new Float32Array(f*c*4*i),m=new e1(l,f,c,i);m.type=hc,m.needsUpdate=!0;const v=n*4;for(let u=0;u0)return _t;const Dt=F*q;let Zt=sy[Dt];if(Zt===void 0&&(Zt=new Float32Array(Dt),sy[Dt]=Zt),F!==0){lt.toArray(Zt,0);for(let G=1,U=0;G!==F;++G)U+=q,_t[G].toArray(Zt,U)}return Zt}function Po(_t,F){if(_t.length!==F.length)return!1;for(let q=0,lt=_t.length;q":" "} ${U}: ${q[G]}`)}return lt.join(` -`)}function p4(_t){const F=Fa.getPrimaries(Fa.workingColorSpace),q=Fa.getPrimaries(_t);let lt;switch(F===q?lt="":F===up&&q===lp?lt="LinearDisplayP3ToLinearSRGB":F===lp&&q===up&&(lt="LinearSRGBToLinearDisplayP3"),_t){case mc:case dp:return[lt,"LinearTransferOETF"];case Iu:case Y0:return[lt,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",_t),[lt,"LinearTransferOETF"]}}function py(_t,F,q){const lt=_t.getShaderParameter(F,_t.COMPILE_STATUS),Dt=_t.getShaderInfoLog(F).trim();if(lt&&Dt==="")return"";const Zt=/ERROR: 0:(\d+)/.exec(Dt);if(Zt){const G=parseInt(Zt[1]);return q.toUpperCase()+` +`)}function d4(_t){const F=Fa.getPrimaries(Fa.workingColorSpace),q=Fa.getPrimaries(_t);let lt;switch(F===q?lt="":F===lp&&q===sp?lt="LinearDisplayP3ToLinearSRGB":F===sp&&q===lp&&(lt="LinearSRGBToLinearDisplayP3"),_t){case mc:case vp:return[lt,"LinearTransferOETF"];case Iu:case W0:return[lt,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",_t),[lt,"LinearTransferOETF"]}}function dy(_t,F,q){const lt=_t.getShaderParameter(F,_t.COMPILE_STATUS),Dt=_t.getShaderInfoLog(F).trim();if(lt&&Dt==="")return"";const Zt=/ERROR: 0:(\d+)/.exec(Dt);if(Zt){const G=parseInt(Zt[1]);return q.toUpperCase()+` `+Dt+` -`+d4(_t.getShaderSource(F),G)}else return Dt}function g4(_t,F){const q=p4(F);return`vec4 ${_t}( vec4 value ) { return ${q[0]}( ${q[1]}( value ) ); }`}function m4(_t,F){let q;switch(F){case lw:q="Linear";break;case uw:q="Reinhard";break;case fw:q="OptimizedCineon";break;case cw:q="ACESFilmic";break;case vw:q="AgX";break;case dw:q="Neutral";break;case hw:q="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",F),q="Linear"}return"vec3 "+_t+"( vec3 color ) { return "+q+"ToneMapping( color ); }"}function y4(_t){return[_t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",_t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Wv).join(` -`)}function x4(_t){const F=[];for(const q in _t){const lt=_t[q];lt!==!1&&F.push("#define "+q+" "+lt)}return F.join(` -`)}function b4(_t,F){const q={},lt=_t.getProgramParameter(F,_t.ACTIVE_ATTRIBUTES);for(let Dt=0;Dt/gm;function U0(_t){return _t.replace(w4,A4)}const T4=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function A4(_t,F){let q=ua[F];if(q===void 0){const lt=T4.get(F);if(lt!==void 0)q=ua[lt],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',F,lt);else throw new Error("Can not resolve #include <"+F+">")}return U0(q)}const M4=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function yy(_t){return _t.replace(M4,S4)}function S4(_t,F,q,lt){let Dt="";for(let Zt=parseInt(F);Zt/gm;function B0(_t){return _t.replace(b4,T4)}const w4=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function T4(_t,F){let q=ua[F];if(q===void 0){const lt=w4.get(F);if(lt!==void 0)q=ua[lt],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',F,lt);else throw new Error("Can not resolve #include <"+F+">")}return B0(q)}const A4=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function my(_t){return _t.replace(A4,M4)}function M4(_t,F,q,lt){let Dt="";for(let Zt=parseInt(F);Zt0&&(r+=` -`),e=["#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,v].filter(Wv).join(` +`),e=["#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,h].filter(Gv).join(` `),e.length>0&&(e+=` -`)):(r=[xy(q),"#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,v,q.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",q.batching?"#define USE_BATCHING":"",q.instancing?"#define USE_INSTANCING":"",q.instancingColor?"#define USE_INSTANCING_COLOR":"",q.instancingMorph?"#define USE_INSTANCING_MORPH":"",q.useFog&&q.fog?"#define USE_FOG":"",q.useFog&&q.fogExp2?"#define FOG_EXP2":"",q.map?"#define USE_MAP":"",q.envMap?"#define USE_ENVMAP":"",q.envMap?"#define "+C:"",q.lightMap?"#define USE_LIGHTMAP":"",q.aoMap?"#define USE_AOMAP":"",q.bumpMap?"#define USE_BUMPMAP":"",q.normalMap?"#define USE_NORMALMAP":"",q.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",q.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",q.displacementMap?"#define USE_DISPLACEMENTMAP":"",q.emissiveMap?"#define USE_EMISSIVEMAP":"",q.anisotropy?"#define USE_ANISOTROPY":"",q.anisotropyMap?"#define USE_ANISOTROPYMAP":"",q.clearcoatMap?"#define USE_CLEARCOATMAP":"",q.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",q.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",q.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",q.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",q.specularMap?"#define USE_SPECULARMAP":"",q.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",q.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",q.roughnessMap?"#define USE_ROUGHNESSMAP":"",q.metalnessMap?"#define USE_METALNESSMAP":"",q.alphaMap?"#define USE_ALPHAMAP":"",q.alphaHash?"#define USE_ALPHAHASH":"",q.transmission?"#define USE_TRANSMISSION":"",q.transmissionMap?"#define USE_TRANSMISSIONMAP":"",q.thicknessMap?"#define USE_THICKNESSMAP":"",q.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",q.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",q.mapUv?"#define MAP_UV "+q.mapUv:"",q.alphaMapUv?"#define ALPHAMAP_UV "+q.alphaMapUv:"",q.lightMapUv?"#define LIGHTMAP_UV "+q.lightMapUv:"",q.aoMapUv?"#define AOMAP_UV "+q.aoMapUv:"",q.emissiveMapUv?"#define EMISSIVEMAP_UV "+q.emissiveMapUv:"",q.bumpMapUv?"#define BUMPMAP_UV "+q.bumpMapUv:"",q.normalMapUv?"#define NORMALMAP_UV "+q.normalMapUv:"",q.displacementMapUv?"#define DISPLACEMENTMAP_UV "+q.displacementMapUv:"",q.metalnessMapUv?"#define METALNESSMAP_UV "+q.metalnessMapUv:"",q.roughnessMapUv?"#define ROUGHNESSMAP_UV "+q.roughnessMapUv:"",q.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+q.anisotropyMapUv:"",q.clearcoatMapUv?"#define CLEARCOATMAP_UV "+q.clearcoatMapUv:"",q.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+q.clearcoatNormalMapUv:"",q.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+q.clearcoatRoughnessMapUv:"",q.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+q.iridescenceMapUv:"",q.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+q.iridescenceThicknessMapUv:"",q.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+q.sheenColorMapUv:"",q.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+q.sheenRoughnessMapUv:"",q.specularMapUv?"#define SPECULARMAP_UV "+q.specularMapUv:"",q.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+q.specularColorMapUv:"",q.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+q.specularIntensityMapUv:"",q.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+q.transmissionMapUv:"",q.thicknessMapUv?"#define THICKNESSMAP_UV "+q.thicknessMapUv:"",q.vertexTangents&&q.flatShading===!1?"#define USE_TANGENT":"",q.vertexColors?"#define USE_COLOR":"",q.vertexAlphas?"#define USE_COLOR_ALPHA":"",q.vertexUv1s?"#define USE_UV1":"",q.vertexUv2s?"#define USE_UV2":"",q.vertexUv3s?"#define USE_UV3":"",q.pointsUvs?"#define USE_POINTS_UV":"",q.flatShading?"#define FLAT_SHADED":"",q.skinning?"#define USE_SKINNING":"",q.morphTargets?"#define USE_MORPHTARGETS":"",q.morphNormals&&q.flatShading===!1?"#define USE_MORPHNORMALS":"",q.morphColors?"#define USE_MORPHCOLORS":"",q.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE":"",q.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+q.morphTextureStride:"",q.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+q.morphTargetsCount:"",q.doubleSided?"#define DOUBLE_SIDED":"",q.flipSided?"#define FLIP_SIDED":"",q.shadowMapEnabled?"#define USE_SHADOWMAP":"",q.shadowMapEnabled?"#define "+t:"",q.sizeAttenuation?"#define USE_SIZEATTENUATION":"",q.numLightProbes>0?"#define USE_LIGHT_PROBES":"",q.useLegacyLights?"#define LEGACY_LIGHTS":"",q.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(Wv).join(` -`),e=[xy(q),"#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,v,q.useFog&&q.fog?"#define USE_FOG":"",q.useFog&&q.fogExp2?"#define FOG_EXP2":"",q.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",q.map?"#define USE_MAP":"",q.matcap?"#define USE_MATCAP":"",q.envMap?"#define USE_ENVMAP":"",q.envMap?"#define "+g:"",q.envMap?"#define "+C:"",q.envMap?"#define "+i:"",S?"#define CUBEUV_TEXEL_WIDTH "+S.texelWidth:"",S?"#define CUBEUV_TEXEL_HEIGHT "+S.texelHeight:"",S?"#define CUBEUV_MAX_MIP "+S.maxMip+".0":"",q.lightMap?"#define USE_LIGHTMAP":"",q.aoMap?"#define USE_AOMAP":"",q.bumpMap?"#define USE_BUMPMAP":"",q.normalMap?"#define USE_NORMALMAP":"",q.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",q.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",q.emissiveMap?"#define USE_EMISSIVEMAP":"",q.anisotropy?"#define USE_ANISOTROPY":"",q.anisotropyMap?"#define USE_ANISOTROPYMAP":"",q.clearcoat?"#define USE_CLEARCOAT":"",q.clearcoatMap?"#define USE_CLEARCOATMAP":"",q.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",q.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",q.iridescence?"#define USE_IRIDESCENCE":"",q.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",q.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",q.specularMap?"#define USE_SPECULARMAP":"",q.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",q.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",q.roughnessMap?"#define USE_ROUGHNESSMAP":"",q.metalnessMap?"#define USE_METALNESSMAP":"",q.alphaMap?"#define USE_ALPHAMAP":"",q.alphaTest?"#define USE_ALPHATEST":"",q.alphaHash?"#define USE_ALPHAHASH":"",q.sheen?"#define USE_SHEEN":"",q.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",q.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",q.transmission?"#define USE_TRANSMISSION":"",q.transmissionMap?"#define USE_TRANSMISSIONMAP":"",q.thicknessMap?"#define USE_THICKNESSMAP":"",q.vertexTangents&&q.flatShading===!1?"#define USE_TANGENT":"",q.vertexColors||q.instancingColor?"#define USE_COLOR":"",q.vertexAlphas?"#define USE_COLOR_ALPHA":"",q.vertexUv1s?"#define USE_UV1":"",q.vertexUv2s?"#define USE_UV2":"",q.vertexUv3s?"#define USE_UV3":"",q.pointsUvs?"#define USE_POINTS_UV":"",q.gradientMap?"#define USE_GRADIENTMAP":"",q.flatShading?"#define FLAT_SHADED":"",q.doubleSided?"#define DOUBLE_SIDED":"",q.flipSided?"#define FLIP_SIDED":"",q.shadowMapEnabled?"#define USE_SHADOWMAP":"",q.shadowMapEnabled?"#define "+t:"",q.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",q.numLightProbes>0?"#define USE_LIGHT_PROBES":"",q.useLegacyLights?"#define LEGACY_LIGHTS":"",q.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",q.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",q.toneMapping!==dc?"#define TONE_MAPPING":"",q.toneMapping!==dc?ua.tonemapping_pars_fragment:"",q.toneMapping!==dc?m4("toneMapping",q.toneMapping):"",q.dithering?"#define DITHERING":"",q.opaque?"#define OPAQUE":"",ua.colorspace_pars_fragment,g4("linearToOutputTexel",q.outputColorSpace),q.useDepthPacking?"#define DEPTH_PACKING "+q.depthPacking:"",` -`].filter(Wv).join(` -`)),G=U0(G),G=gy(G,q),G=my(G,q),U=U0(U),U=gy(U,q),U=my(U,q),G=yy(G),U=yy(U),q.isRawShaderMaterial!==!0&&(a=`#version 300 es +`)):(r=[yy(q),"#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,h,q.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",q.batching?"#define USE_BATCHING":"",q.instancing?"#define USE_INSTANCING":"",q.instancingColor?"#define USE_INSTANCING_COLOR":"",q.instancingMorph?"#define USE_INSTANCING_MORPH":"",q.useFog&&q.fog?"#define USE_FOG":"",q.useFog&&q.fogExp2?"#define FOG_EXP2":"",q.map?"#define USE_MAP":"",q.envMap?"#define USE_ENVMAP":"",q.envMap?"#define "+C:"",q.lightMap?"#define USE_LIGHTMAP":"",q.aoMap?"#define USE_AOMAP":"",q.bumpMap?"#define USE_BUMPMAP":"",q.normalMap?"#define USE_NORMALMAP":"",q.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",q.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",q.displacementMap?"#define USE_DISPLACEMENTMAP":"",q.emissiveMap?"#define USE_EMISSIVEMAP":"",q.anisotropy?"#define USE_ANISOTROPY":"",q.anisotropyMap?"#define USE_ANISOTROPYMAP":"",q.clearcoatMap?"#define USE_CLEARCOATMAP":"",q.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",q.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",q.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",q.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",q.specularMap?"#define USE_SPECULARMAP":"",q.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",q.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",q.roughnessMap?"#define USE_ROUGHNESSMAP":"",q.metalnessMap?"#define USE_METALNESSMAP":"",q.alphaMap?"#define USE_ALPHAMAP":"",q.alphaHash?"#define USE_ALPHAHASH":"",q.transmission?"#define USE_TRANSMISSION":"",q.transmissionMap?"#define USE_TRANSMISSIONMAP":"",q.thicknessMap?"#define USE_THICKNESSMAP":"",q.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",q.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",q.mapUv?"#define MAP_UV "+q.mapUv:"",q.alphaMapUv?"#define ALPHAMAP_UV "+q.alphaMapUv:"",q.lightMapUv?"#define LIGHTMAP_UV "+q.lightMapUv:"",q.aoMapUv?"#define AOMAP_UV "+q.aoMapUv:"",q.emissiveMapUv?"#define EMISSIVEMAP_UV "+q.emissiveMapUv:"",q.bumpMapUv?"#define BUMPMAP_UV "+q.bumpMapUv:"",q.normalMapUv?"#define NORMALMAP_UV "+q.normalMapUv:"",q.displacementMapUv?"#define DISPLACEMENTMAP_UV "+q.displacementMapUv:"",q.metalnessMapUv?"#define METALNESSMAP_UV "+q.metalnessMapUv:"",q.roughnessMapUv?"#define ROUGHNESSMAP_UV "+q.roughnessMapUv:"",q.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+q.anisotropyMapUv:"",q.clearcoatMapUv?"#define CLEARCOATMAP_UV "+q.clearcoatMapUv:"",q.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+q.clearcoatNormalMapUv:"",q.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+q.clearcoatRoughnessMapUv:"",q.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+q.iridescenceMapUv:"",q.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+q.iridescenceThicknessMapUv:"",q.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+q.sheenColorMapUv:"",q.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+q.sheenRoughnessMapUv:"",q.specularMapUv?"#define SPECULARMAP_UV "+q.specularMapUv:"",q.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+q.specularColorMapUv:"",q.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+q.specularIntensityMapUv:"",q.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+q.transmissionMapUv:"",q.thicknessMapUv?"#define THICKNESSMAP_UV "+q.thicknessMapUv:"",q.vertexTangents&&q.flatShading===!1?"#define USE_TANGENT":"",q.vertexColors?"#define USE_COLOR":"",q.vertexAlphas?"#define USE_COLOR_ALPHA":"",q.vertexUv1s?"#define USE_UV1":"",q.vertexUv2s?"#define USE_UV2":"",q.vertexUv3s?"#define USE_UV3":"",q.pointsUvs?"#define USE_POINTS_UV":"",q.flatShading?"#define FLAT_SHADED":"",q.skinning?"#define USE_SKINNING":"",q.morphTargets?"#define USE_MORPHTARGETS":"",q.morphNormals&&q.flatShading===!1?"#define USE_MORPHNORMALS":"",q.morphColors?"#define USE_MORPHCOLORS":"",q.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE":"",q.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+q.morphTextureStride:"",q.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+q.morphTargetsCount:"",q.doubleSided?"#define DOUBLE_SIDED":"",q.flipSided?"#define FLIP_SIDED":"",q.shadowMapEnabled?"#define USE_SHADOWMAP":"",q.shadowMapEnabled?"#define "+t:"",q.sizeAttenuation?"#define USE_SIZEATTENUATION":"",q.numLightProbes>0?"#define USE_LIGHT_PROBES":"",q.useLegacyLights?"#define LEGACY_LIGHTS":"",q.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(Gv).join(` +`),e=[yy(q),"#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,h,q.useFog&&q.fog?"#define USE_FOG":"",q.useFog&&q.fogExp2?"#define FOG_EXP2":"",q.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",q.map?"#define USE_MAP":"",q.matcap?"#define USE_MATCAP":"",q.envMap?"#define USE_ENVMAP":"",q.envMap?"#define "+g:"",q.envMap?"#define "+C:"",q.envMap?"#define "+i:"",S?"#define CUBEUV_TEXEL_WIDTH "+S.texelWidth:"",S?"#define CUBEUV_TEXEL_HEIGHT "+S.texelHeight:"",S?"#define CUBEUV_MAX_MIP "+S.maxMip+".0":"",q.lightMap?"#define USE_LIGHTMAP":"",q.aoMap?"#define USE_AOMAP":"",q.bumpMap?"#define USE_BUMPMAP":"",q.normalMap?"#define USE_NORMALMAP":"",q.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",q.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",q.emissiveMap?"#define USE_EMISSIVEMAP":"",q.anisotropy?"#define USE_ANISOTROPY":"",q.anisotropyMap?"#define USE_ANISOTROPYMAP":"",q.clearcoat?"#define USE_CLEARCOAT":"",q.clearcoatMap?"#define USE_CLEARCOATMAP":"",q.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",q.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",q.iridescence?"#define USE_IRIDESCENCE":"",q.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",q.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",q.specularMap?"#define USE_SPECULARMAP":"",q.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",q.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",q.roughnessMap?"#define USE_ROUGHNESSMAP":"",q.metalnessMap?"#define USE_METALNESSMAP":"",q.alphaMap?"#define USE_ALPHAMAP":"",q.alphaTest?"#define USE_ALPHATEST":"",q.alphaHash?"#define USE_ALPHAHASH":"",q.sheen?"#define USE_SHEEN":"",q.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",q.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",q.transmission?"#define USE_TRANSMISSION":"",q.transmissionMap?"#define USE_TRANSMISSIONMAP":"",q.thicknessMap?"#define USE_THICKNESSMAP":"",q.vertexTangents&&q.flatShading===!1?"#define USE_TANGENT":"",q.vertexColors||q.instancingColor?"#define USE_COLOR":"",q.vertexAlphas?"#define USE_COLOR_ALPHA":"",q.vertexUv1s?"#define USE_UV1":"",q.vertexUv2s?"#define USE_UV2":"",q.vertexUv3s?"#define USE_UV3":"",q.pointsUvs?"#define USE_POINTS_UV":"",q.gradientMap?"#define USE_GRADIENTMAP":"",q.flatShading?"#define FLAT_SHADED":"",q.doubleSided?"#define DOUBLE_SIDED":"",q.flipSided?"#define FLIP_SIDED":"",q.shadowMapEnabled?"#define USE_SHADOWMAP":"",q.shadowMapEnabled?"#define "+t:"",q.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",q.numLightProbes>0?"#define USE_LIGHT_PROBES":"",q.useLegacyLights?"#define LEGACY_LIGHTS":"",q.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",q.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",q.toneMapping!==dc?"#define TONE_MAPPING":"",q.toneMapping!==dc?ua.tonemapping_pars_fragment:"",q.toneMapping!==dc?g4("toneMapping",q.toneMapping):"",q.dithering?"#define DITHERING":"",q.opaque?"#define OPAQUE":"",ua.colorspace_pars_fragment,p4("linearToOutputTexel",q.outputColorSpace),q.useDepthPacking?"#define DEPTH_PACKING "+q.depthPacking:"",` +`].filter(Gv).join(` +`)),G=B0(G),G=py(G,q),G=gy(G,q),U=B0(U),U=py(U,q),U=gy(U,q),G=my(G),U=my(U),q.isRawShaderMaterial!==!0&&(a=`#version 300 es `,r=[x,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+r,e=["#define varying in",q.glslVersion===Fm?"":"layout(location = 0) out highp vec4 pc_fragColor;",q.glslVersion===Fm?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+r,e=["#define varying in",q.glslVersion===Im?"":"layout(location = 0) out highp vec4 pc_fragColor;",q.glslVersion===Im?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+e);const n=a+r+G,f=a+e+U,c=dy(Dt,Dt.VERTEX_SHADER,n),l=dy(Dt,Dt.FRAGMENT_SHADER,f);Dt.attachShader(p,c),Dt.attachShader(p,l),q.index0AttributeName!==void 0?Dt.bindAttribLocation(p,0,q.index0AttributeName):q.morphTargets===!0&&Dt.bindAttribLocation(p,0,"position"),Dt.linkProgram(p);function m(o){if(_t.debug.checkShaderErrors){const d=Dt.getProgramInfoLog(p).trim(),w=Dt.getShaderInfoLog(c).trim(),A=Dt.getShaderInfoLog(l).trim();let _=!0,y=!0;if(Dt.getProgramParameter(p,Dt.LINK_STATUS)===!1)if(_=!1,typeof _t.debug.onShaderError=="function")_t.debug.onShaderError(Dt,p,c,l);else{const E=py(Dt,c,"vertex"),T=py(Dt,l,"fragment");console.error("THREE.WebGLProgram: Shader Error "+Dt.getError()+" - VALIDATE_STATUS "+Dt.getProgramParameter(p,Dt.VALIDATE_STATUS)+` +`+e);const n=a+r+G,f=a+e+U,c=vy(Dt,Dt.VERTEX_SHADER,n),l=vy(Dt,Dt.FRAGMENT_SHADER,f);Dt.attachShader(p,c),Dt.attachShader(p,l),q.index0AttributeName!==void 0?Dt.bindAttribLocation(p,0,q.index0AttributeName):q.morphTargets===!0&&Dt.bindAttribLocation(p,0,"position"),Dt.linkProgram(p);function m(o){if(_t.debug.checkShaderErrors){const d=Dt.getProgramInfoLog(p).trim(),w=Dt.getShaderInfoLog(c).trim(),A=Dt.getShaderInfoLog(l).trim();let _=!0,y=!0;if(Dt.getProgramParameter(p,Dt.LINK_STATUS)===!1)if(_=!1,typeof _t.debug.onShaderError=="function")_t.debug.onShaderError(Dt,p,c,l);else{const E=dy(Dt,c,"vertex"),T=dy(Dt,l,"fragment");console.error("THREE.WebGLProgram: Shader Error "+Dt.getError()+" - VALIDATE_STATUS "+Dt.getProgramParameter(p,Dt.VALIDATE_STATUS)+` Material Name: `+o.name+` Material Type: `+o.type+` Program Info Log: `+d+` `+E+` -`+T)}else d!==""?console.warn("THREE.WebGLProgram: Program Info Log:",d):(w===""||A==="")&&(y=!1);y&&(o.diagnostics={runnable:_,programLog:d,vertexShader:{log:w,prefix:r},fragmentShader:{log:A,prefix:e}})}Dt.deleteShader(c),Dt.deleteShader(l),h=new ip(Dt,p),b=b4(Dt,p)}let h;this.getUniforms=function(){return h===void 0&&m(this),h};let b;this.getAttributes=function(){return b===void 0&&m(this),b};let u=q.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return u===!1&&(u=Dt.getProgramParameter(p,h4)),u},this.destroy=function(){lt.releaseStatesOfProgram(this),Dt.deleteProgram(p),this.program=void 0},this.type=q.shaderType,this.name=q.shaderName,this.id=v4++,this.cacheKey=F,this.usedTimes=1,this.program=p,this.vertexShader=c,this.fragmentShader=l,this}let D4=0;class I4{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(F){const q=F.vertexShader,lt=F.fragmentShader,Dt=this._getShaderStage(q),Zt=this._getShaderStage(lt),G=this._getShaderCacheForMaterial(F);return G.has(Dt)===!1&&(G.add(Dt),Dt.usedTimes++),G.has(Zt)===!1&&(G.add(Zt),Zt.usedTimes++),this}remove(F){const q=this.materialCache.get(F);for(const lt of q)lt.usedTimes--,lt.usedTimes===0&&this.shaderCache.delete(lt.code);return this.materialCache.delete(F),this}getVertexShaderID(F){return this._getShaderStage(F.vertexShader).id}getFragmentShaderID(F){return this._getShaderStage(F.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(F){const q=this.materialCache;let lt=q.get(F);return lt===void 0&&(lt=new Set,q.set(F,lt)),lt}_getShaderStage(F){const q=this.shaderCache;let lt=q.get(F);return lt===void 0&&(lt=new F4(F),q.set(F,lt)),lt}}class F4{constructor(F){this.id=D4++,this.code=F,this.usedTimes=0}}function z4(_t,F,q,lt,Dt,Zt,G){const U=new Z0,t=new I4,g=new Set,C=[],i=Dt.logarithmicDepthBuffer,S=Dt.vertexTextures;let x=Dt.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function p(b){return g.add(b),b===0?"uv":`uv${b}`}function r(b,u,o,d,w){const A=d.fog,_=w.geometry,y=b.isMeshStandardMaterial?d.environment:null,E=(b.isMeshStandardMaterial?q:F).get(b.envMap||y),T=E&&E.mapping===vp?E.image.height:null,s=v[b.type];b.precision!==null&&(x=Dt.getMaxPrecision(b.precision),x!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",x,"instead."));const L=_.morphAttributes.position||_.morphAttributes.normal||_.morphAttributes.color,M=L!==void 0?L.length:0;let z=0;_.morphAttributes.position!==void 0&&(z=1),_.morphAttributes.normal!==void 0&&(z=2),_.morphAttributes.color!==void 0&&(z=3);let D,N,I,k;if(s){const Se=Fu[s];D=Se.vertexShader,N=Se.fragmentShader}else D=b.vertexShader,N=b.fragmentShader,t.update(b),I=t.getVertexShaderID(b),k=t.getFragmentShaderID(b);const B=_t.getRenderTarget(),O=w.isInstancedMesh===!0,H=w.isBatchedMesh===!0,Y=!!b.map,j=!!b.matcap,et=!!E,it=!!b.aoMap,ut=!!b.lightMap,J=!!b.bumpMap,X=!!b.normalMap,tt=!!b.displacementMap,V=!!b.emissiveMap,Q=!!b.metalnessMap,ot=!!b.roughnessMap,$=b.anisotropy>0,Z=b.clearcoat>0,st=b.iridescence>0,nt=b.sheen>0,ct=b.transmission>0,gt=$&&!!b.anisotropyMap,Tt=Z&&!!b.clearcoatMap,wt=Z&&!!b.clearcoatNormalMap,Rt=Z&&!!b.clearcoatRoughnessMap,bt=st&&!!b.iridescenceMap,At=st&&!!b.iridescenceThicknessMap,mt=nt&&!!b.sheenColorMap,Lt=nt&&!!b.sheenRoughnessMap,Ht=!!b.specularMap,Ut=!!b.specularColorMap,kt=!!b.specularIntensityMap,Vt=ct&&!!b.transmissionMap,It=ct&&!!b.thicknessMap,re=!!b.gradientMap,Kt=!!b.alphaMap,$t=b.alphaTest>0,le=!!b.alphaHash,he=!!b.extensions;let de=dc;b.toneMapped&&(B===null||B.isXRRenderTarget===!0)&&(de=_t.toneMapping);const xe={shaderID:s,shaderType:b.type,shaderName:b.name,vertexShader:D,fragmentShader:N,defines:b.defines,customVertexShaderID:I,customFragmentShaderID:k,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:x,batching:H,instancing:O,instancingColor:O&&w.instanceColor!==null,instancingMorph:O&&w.morphTexture!==null,supportsVertexTextures:S,outputColorSpace:B===null?_t.outputColorSpace:B.isXRRenderTarget===!0?B.texture.colorSpace:mc,alphaToCoverage:!!b.alphaToCoverage,map:Y,matcap:j,envMap:et,envMapMode:et&&E.mapping,envMapCubeUVHeight:T,aoMap:it,lightMap:ut,bumpMap:J,normalMap:X,displacementMap:S&&tt,emissiveMap:V,normalMapObjectSpace:X&&b.normalMapType===Lw,normalMapTangentSpace:X&&b.normalMapType===Cw,metalnessMap:Q,roughnessMap:ot,anisotropy:$,anisotropyMap:gt,clearcoat:Z,clearcoatMap:Tt,clearcoatNormalMap:wt,clearcoatRoughnessMap:Rt,iridescence:st,iridescenceMap:bt,iridescenceThicknessMap:At,sheen:nt,sheenColorMap:mt,sheenRoughnessMap:Lt,specularMap:Ht,specularColorMap:Ut,specularIntensityMap:kt,transmission:ct,transmissionMap:Vt,thicknessMap:It,gradientMap:re,opaque:b.transparent===!1&&b.blending===nv&&b.alphaToCoverage===!1,alphaMap:Kt,alphaTest:$t,alphaHash:le,combine:b.combine,mapUv:Y&&p(b.map.channel),aoMapUv:it&&p(b.aoMap.channel),lightMapUv:ut&&p(b.lightMap.channel),bumpMapUv:J&&p(b.bumpMap.channel),normalMapUv:X&&p(b.normalMap.channel),displacementMapUv:tt&&p(b.displacementMap.channel),emissiveMapUv:V&&p(b.emissiveMap.channel),metalnessMapUv:Q&&p(b.metalnessMap.channel),roughnessMapUv:ot&&p(b.roughnessMap.channel),anisotropyMapUv:gt&&p(b.anisotropyMap.channel),clearcoatMapUv:Tt&&p(b.clearcoatMap.channel),clearcoatNormalMapUv:wt&&p(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Rt&&p(b.clearcoatRoughnessMap.channel),iridescenceMapUv:bt&&p(b.iridescenceMap.channel),iridescenceThicknessMapUv:At&&p(b.iridescenceThicknessMap.channel),sheenColorMapUv:mt&&p(b.sheenColorMap.channel),sheenRoughnessMapUv:Lt&&p(b.sheenRoughnessMap.channel),specularMapUv:Ht&&p(b.specularMap.channel),specularColorMapUv:Ut&&p(b.specularColorMap.channel),specularIntensityMapUv:kt&&p(b.specularIntensityMap.channel),transmissionMapUv:Vt&&p(b.transmissionMap.channel),thicknessMapUv:It&&p(b.thicknessMap.channel),alphaMapUv:Kt&&p(b.alphaMap.channel),vertexTangents:!!_.attributes.tangent&&(X||$),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!_.attributes.color&&_.attributes.color.itemSize===4,pointsUvs:w.isPoints===!0&&!!_.attributes.uv&&(Y||Kt),fog:!!A,useFog:b.fog===!0,fogExp2:!!A&&A.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:i,skinning:w.isSkinnedMesh===!0,morphTargets:_.morphAttributes.position!==void 0,morphNormals:_.morphAttributes.normal!==void 0,morphColors:_.morphAttributes.color!==void 0,morphTargetsCount:M,morphTextureStride:z,numDirLights:u.directional.length,numPointLights:u.point.length,numSpotLights:u.spot.length,numSpotLightMaps:u.spotLightMap.length,numRectAreaLights:u.rectArea.length,numHemiLights:u.hemi.length,numDirLightShadows:u.directionalShadowMap.length,numPointLightShadows:u.pointShadowMap.length,numSpotLightShadows:u.spotShadowMap.length,numSpotLightShadowsWithMaps:u.numSpotLightShadowsWithMaps,numLightProbes:u.numLightProbes,numClippingPlanes:G.numPlanes,numClipIntersection:G.numIntersection,dithering:b.dithering,shadowMapEnabled:_t.shadowMap.enabled&&o.length>0,shadowMapType:_t.shadowMap.type,toneMapping:de,useLegacyLights:_t._useLegacyLights,decodeVideoTexture:Y&&b.map.isVideoTexture===!0&&Fa.getTransfer(b.map.colorSpace)===Ya,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===yf,flipSided:b.side===Gs,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionClipCullDistance:he&&b.extensions.clipCullDistance===!0&<.has("WEBGL_clip_cull_distance"),extensionMultiDraw:he&&b.extensions.multiDraw===!0&<.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:lt.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return xe.vertexUv1s=g.has(1),xe.vertexUv2s=g.has(2),xe.vertexUv3s=g.has(3),g.clear(),xe}function e(b){const u=[];if(b.shaderID?u.push(b.shaderID):(u.push(b.customVertexShaderID),u.push(b.customFragmentShaderID)),b.defines!==void 0)for(const o in b.defines)u.push(o),u.push(b.defines[o]);return b.isRawShaderMaterial===!1&&(a(u,b),n(u,b),u.push(_t.outputColorSpace)),u.push(b.customProgramCacheKey),u.join()}function a(b,u){b.push(u.precision),b.push(u.outputColorSpace),b.push(u.envMapMode),b.push(u.envMapCubeUVHeight),b.push(u.mapUv),b.push(u.alphaMapUv),b.push(u.lightMapUv),b.push(u.aoMapUv),b.push(u.bumpMapUv),b.push(u.normalMapUv),b.push(u.displacementMapUv),b.push(u.emissiveMapUv),b.push(u.metalnessMapUv),b.push(u.roughnessMapUv),b.push(u.anisotropyMapUv),b.push(u.clearcoatMapUv),b.push(u.clearcoatNormalMapUv),b.push(u.clearcoatRoughnessMapUv),b.push(u.iridescenceMapUv),b.push(u.iridescenceThicknessMapUv),b.push(u.sheenColorMapUv),b.push(u.sheenRoughnessMapUv),b.push(u.specularMapUv),b.push(u.specularColorMapUv),b.push(u.specularIntensityMapUv),b.push(u.transmissionMapUv),b.push(u.thicknessMapUv),b.push(u.combine),b.push(u.fogExp2),b.push(u.sizeAttenuation),b.push(u.morphTargetsCount),b.push(u.morphAttributeCount),b.push(u.numDirLights),b.push(u.numPointLights),b.push(u.numSpotLights),b.push(u.numSpotLightMaps),b.push(u.numHemiLights),b.push(u.numRectAreaLights),b.push(u.numDirLightShadows),b.push(u.numPointLightShadows),b.push(u.numSpotLightShadows),b.push(u.numSpotLightShadowsWithMaps),b.push(u.numLightProbes),b.push(u.shadowMapType),b.push(u.toneMapping),b.push(u.numClippingPlanes),b.push(u.numClipIntersection),b.push(u.depthPacking)}function n(b,u){U.disableAll(),u.supportsVertexTextures&&U.enable(0),u.instancing&&U.enable(1),u.instancingColor&&U.enable(2),u.instancingMorph&&U.enable(3),u.matcap&&U.enable(4),u.envMap&&U.enable(5),u.normalMapObjectSpace&&U.enable(6),u.normalMapTangentSpace&&U.enable(7),u.clearcoat&&U.enable(8),u.iridescence&&U.enable(9),u.alphaTest&&U.enable(10),u.vertexColors&&U.enable(11),u.vertexAlphas&&U.enable(12),u.vertexUv1s&&U.enable(13),u.vertexUv2s&&U.enable(14),u.vertexUv3s&&U.enable(15),u.vertexTangents&&U.enable(16),u.anisotropy&&U.enable(17),u.alphaHash&&U.enable(18),u.batching&&U.enable(19),b.push(U.mask),U.disableAll(),u.fog&&U.enable(0),u.useFog&&U.enable(1),u.flatShading&&U.enable(2),u.logarithmicDepthBuffer&&U.enable(3),u.skinning&&U.enable(4),u.morphTargets&&U.enable(5),u.morphNormals&&U.enable(6),u.morphColors&&U.enable(7),u.premultipliedAlpha&&U.enable(8),u.shadowMapEnabled&&U.enable(9),u.useLegacyLights&&U.enable(10),u.doubleSided&&U.enable(11),u.flipSided&&U.enable(12),u.useDepthPacking&&U.enable(13),u.dithering&&U.enable(14),u.transmission&&U.enable(15),u.sheen&&U.enable(16),u.opaque&&U.enable(17),u.pointsUvs&&U.enable(18),u.decodeVideoTexture&&U.enable(19),u.alphaToCoverage&&U.enable(20),b.push(U.mask)}function f(b){const u=v[b.type];let o;if(u){const d=Fu[u];o=y2.clone(d.uniforms)}else o=b.uniforms;return o}function c(b,u){let o;for(let d=0,w=C.length;d0?lt.push(e):x.transparent===!0?Dt.push(e):q.push(e)}function t(i,S,x,v,p,r){const e=G(i,S,x,v,p,r);x.transmission>0?lt.unshift(e):x.transparent===!0?Dt.unshift(e):q.unshift(e)}function g(i,S){q.length>1&&q.sort(i||O4),lt.length>1&<.sort(S||by),Dt.length>1&&Dt.sort(S||by)}function C(){for(let i=F,S=_t.length;i=Zt.length?(G=new wy,Zt.push(G)):G=Zt[Dt],G}function q(){_t=new WeakMap}return{get:F,dispose:q}}function B4(){const _t={};return{get:function(F){if(_t[F.id]!==void 0)return _t[F.id];let q;switch(F.type){case"DirectionalLight":q={direction:new bn,color:new ha};break;case"SpotLight":q={position:new bn,direction:new bn,color:new ha,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":q={position:new bn,color:new ha,distance:0,decay:0};break;case"HemisphereLight":q={direction:new bn,skyColor:new ha,groundColor:new ha};break;case"RectAreaLight":q={color:new ha,position:new bn,halfWidth:new bn,halfHeight:new bn};break}return _t[F.id]=q,q}}}function U4(){const _t={};return{get:function(F){if(_t[F.id]!==void 0)return _t[F.id];let q;switch(F.type){case"DirectionalLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi};break;case"SpotLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi};break;case"PointLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi,shadowCameraNear:1,shadowCameraFar:1e3};break}return _t[F.id]=q,q}}}let H4=0;function V4(_t,F){return(F.castShadow?2:0)-(_t.castShadow?2:0)+(F.map?1:0)-(_t.map?1:0)}function G4(_t){const F=new B4,q=U4(),lt={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let g=0;g<9;g++)lt.probe.push(new bn);const Dt=new bn,Zt=new so,G=new so;function U(g,C){let i=0,S=0,x=0;for(let o=0;o<9;o++)lt.probe[o].set(0,0,0);let v=0,p=0,r=0,e=0,a=0,n=0,f=0,c=0,l=0,m=0,h=0;g.sort(V4);const b=C===!0?Math.PI:1;for(let o=0,d=g.length;o0&&(_t.has("OES_texture_float_linear")===!0?(lt.rectAreaLTC1=_i.LTC_FLOAT_1,lt.rectAreaLTC2=_i.LTC_FLOAT_2):(lt.rectAreaLTC1=_i.LTC_HALF_1,lt.rectAreaLTC2=_i.LTC_HALF_2)),lt.ambient[0]=i,lt.ambient[1]=S,lt.ambient[2]=x;const u=lt.hash;(u.directionalLength!==v||u.pointLength!==p||u.spotLength!==r||u.rectAreaLength!==e||u.hemiLength!==a||u.numDirectionalShadows!==n||u.numPointShadows!==f||u.numSpotShadows!==c||u.numSpotMaps!==l||u.numLightProbes!==h)&&(lt.directional.length=v,lt.spot.length=r,lt.rectArea.length=e,lt.point.length=p,lt.hemi.length=a,lt.directionalShadow.length=n,lt.directionalShadowMap.length=n,lt.pointShadow.length=f,lt.pointShadowMap.length=f,lt.spotShadow.length=c,lt.spotShadowMap.length=c,lt.directionalShadowMatrix.length=n,lt.pointShadowMatrix.length=f,lt.spotLightMatrix.length=c+l-m,lt.spotLightMap.length=l,lt.numSpotLightShadowsWithMaps=m,lt.numLightProbes=h,u.directionalLength=v,u.pointLength=p,u.spotLength=r,u.rectAreaLength=e,u.hemiLength=a,u.numDirectionalShadows=n,u.numPointShadows=f,u.numSpotShadows=c,u.numSpotMaps=l,u.numLightProbes=h,lt.version=H4++)}function t(g,C){let i=0,S=0,x=0,v=0,p=0;const r=C.matrixWorldInverse;for(let e=0,a=g.length;e=G.length?(U=new Ty(_t),G.push(U)):U=G[Zt],U}function lt(){F=new WeakMap}return{get:q,dispose:lt}}class Y4 extends ih{constructor(F){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Ew,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(F)}copy(F){return super.copy(F),this.depthPacking=F.depthPacking,this.map=F.map,this.alphaMap=F.alphaMap,this.displacementMap=F.displacementMap,this.displacementScale=F.displacementScale,this.displacementBias=F.displacementBias,this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this}}class X4 extends ih{constructor(F){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(F)}copy(F){return super.copy(F),this.map=F.map,this.alphaMap=F.alphaMap,this.displacementMap=F.displacementMap,this.displacementScale=F.displacementScale,this.displacementBias=F.displacementBias,this}}const Z4=`void main() { +`+T)}else d!==""?console.warn("THREE.WebGLProgram: Program Info Log:",d):(w===""||A==="")&&(y=!1);y&&(o.diagnostics={runnable:_,programLog:d,vertexShader:{log:w,prefix:r},fragmentShader:{log:A,prefix:e}})}Dt.deleteShader(c),Dt.deleteShader(l),v=new np(Dt,p),b=x4(Dt,p)}let v;this.getUniforms=function(){return v===void 0&&m(this),v};let b;this.getAttributes=function(){return b===void 0&&m(this),b};let u=q.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return u===!1&&(u=Dt.getProgramParameter(p,c4)),u},this.destroy=function(){lt.releaseStatesOfProgram(this),Dt.deleteProgram(p),this.program=void 0},this.type=q.shaderType,this.name=q.shaderName,this.id=h4++,this.cacheKey=F,this.usedTimes=1,this.program=p,this.vertexShader=c,this.fragmentShader=l,this}let R4=0;class D4{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(F){const q=F.vertexShader,lt=F.fragmentShader,Dt=this._getShaderStage(q),Zt=this._getShaderStage(lt),G=this._getShaderCacheForMaterial(F);return G.has(Dt)===!1&&(G.add(Dt),Dt.usedTimes++),G.has(Zt)===!1&&(G.add(Zt),Zt.usedTimes++),this}remove(F){const q=this.materialCache.get(F);for(const lt of q)lt.usedTimes--,lt.usedTimes===0&&this.shaderCache.delete(lt.code);return this.materialCache.delete(F),this}getVertexShaderID(F){return this._getShaderStage(F.vertexShader).id}getFragmentShaderID(F){return this._getShaderStage(F.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(F){const q=this.materialCache;let lt=q.get(F);return lt===void 0&&(lt=new Set,q.set(F,lt)),lt}_getShaderStage(F){const q=this.shaderCache;let lt=q.get(F);return lt===void 0&&(lt=new I4(F),q.set(F,lt)),lt}}class I4{constructor(F){this.id=R4++,this.code=F,this.usedTimes=0}}function F4(_t,F,q,lt,Dt,Zt,G){const U=new X0,t=new D4,g=new Set,C=[],i=Dt.logarithmicDepthBuffer,S=Dt.vertexTextures;let x=Dt.precision;const h={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function p(b){return g.add(b),b===0?"uv":`uv${b}`}function r(b,u,o,d,w){const A=d.fog,_=w.geometry,y=b.isMeshStandardMaterial?d.environment:null,E=(b.isMeshStandardMaterial?q:F).get(b.envMap||y),T=E&&E.mapping===hp?E.image.height:null,s=h[b.type];b.precision!==null&&(x=Dt.getMaxPrecision(b.precision),x!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",x,"instead."));const L=_.morphAttributes.position||_.morphAttributes.normal||_.morphAttributes.color,M=L!==void 0?L.length:0;let z=0;_.morphAttributes.position!==void 0&&(z=1),_.morphAttributes.normal!==void 0&&(z=2),_.morphAttributes.color!==void 0&&(z=3);let D,N,I,k;if(s){const Se=Fu[s];D=Se.vertexShader,N=Se.fragmentShader}else D=b.vertexShader,N=b.fragmentShader,t.update(b),I=t.getVertexShaderID(b),k=t.getFragmentShaderID(b);const B=_t.getRenderTarget(),O=w.isInstancedMesh===!0,H=w.isBatchedMesh===!0,Y=!!b.map,j=!!b.matcap,et=!!E,it=!!b.aoMap,ut=!!b.lightMap,J=!!b.bumpMap,X=!!b.normalMap,tt=!!b.displacementMap,V=!!b.emissiveMap,Q=!!b.metalnessMap,ot=!!b.roughnessMap,$=b.anisotropy>0,Z=b.clearcoat>0,st=b.iridescence>0,nt=b.sheen>0,ct=b.transmission>0,gt=$&&!!b.anisotropyMap,Tt=Z&&!!b.clearcoatMap,wt=Z&&!!b.clearcoatNormalMap,Rt=Z&&!!b.clearcoatRoughnessMap,bt=st&&!!b.iridescenceMap,At=st&&!!b.iridescenceThicknessMap,mt=nt&&!!b.sheenColorMap,Lt=nt&&!!b.sheenRoughnessMap,Ht=!!b.specularMap,Ut=!!b.specularColorMap,kt=!!b.specularIntensityMap,Vt=ct&&!!b.transmissionMap,It=ct&&!!b.thicknessMap,re=!!b.gradientMap,Kt=!!b.alphaMap,$t=b.alphaTest>0,le=!!b.alphaHash,he=!!b.extensions;let de=dc;b.toneMapped&&(B===null||B.isXRRenderTarget===!0)&&(de=_t.toneMapping);const xe={shaderID:s,shaderType:b.type,shaderName:b.name,vertexShader:D,fragmentShader:N,defines:b.defines,customVertexShaderID:I,customFragmentShaderID:k,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:x,batching:H,instancing:O,instancingColor:O&&w.instanceColor!==null,instancingMorph:O&&w.morphTexture!==null,supportsVertexTextures:S,outputColorSpace:B===null?_t.outputColorSpace:B.isXRRenderTarget===!0?B.texture.colorSpace:mc,alphaToCoverage:!!b.alphaToCoverage,map:Y,matcap:j,envMap:et,envMapMode:et&&E.mapping,envMapCubeUVHeight:T,aoMap:it,lightMap:ut,bumpMap:J,normalMap:X,displacementMap:S&&tt,emissiveMap:V,normalMapObjectSpace:X&&b.normalMapType===Cw,normalMapTangentSpace:X&&b.normalMapType===_w,metalnessMap:Q,roughnessMap:ot,anisotropy:$,anisotropyMap:gt,clearcoat:Z,clearcoatMap:Tt,clearcoatNormalMap:wt,clearcoatRoughnessMap:Rt,iridescence:st,iridescenceMap:bt,iridescenceThicknessMap:At,sheen:nt,sheenColorMap:mt,sheenRoughnessMap:Lt,specularMap:Ht,specularColorMap:Ut,specularIntensityMap:kt,transmission:ct,transmissionMap:Vt,thicknessMap:It,gradientMap:re,opaque:b.transparent===!1&&b.blending===nv&&b.alphaToCoverage===!1,alphaMap:Kt,alphaTest:$t,alphaHash:le,combine:b.combine,mapUv:Y&&p(b.map.channel),aoMapUv:it&&p(b.aoMap.channel),lightMapUv:ut&&p(b.lightMap.channel),bumpMapUv:J&&p(b.bumpMap.channel),normalMapUv:X&&p(b.normalMap.channel),displacementMapUv:tt&&p(b.displacementMap.channel),emissiveMapUv:V&&p(b.emissiveMap.channel),metalnessMapUv:Q&&p(b.metalnessMap.channel),roughnessMapUv:ot&&p(b.roughnessMap.channel),anisotropyMapUv:gt&&p(b.anisotropyMap.channel),clearcoatMapUv:Tt&&p(b.clearcoatMap.channel),clearcoatNormalMapUv:wt&&p(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Rt&&p(b.clearcoatRoughnessMap.channel),iridescenceMapUv:bt&&p(b.iridescenceMap.channel),iridescenceThicknessMapUv:At&&p(b.iridescenceThicknessMap.channel),sheenColorMapUv:mt&&p(b.sheenColorMap.channel),sheenRoughnessMapUv:Lt&&p(b.sheenRoughnessMap.channel),specularMapUv:Ht&&p(b.specularMap.channel),specularColorMapUv:Ut&&p(b.specularColorMap.channel),specularIntensityMapUv:kt&&p(b.specularIntensityMap.channel),transmissionMapUv:Vt&&p(b.transmissionMap.channel),thicknessMapUv:It&&p(b.thicknessMap.channel),alphaMapUv:Kt&&p(b.alphaMap.channel),vertexTangents:!!_.attributes.tangent&&(X||$),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!_.attributes.color&&_.attributes.color.itemSize===4,pointsUvs:w.isPoints===!0&&!!_.attributes.uv&&(Y||Kt),fog:!!A,useFog:b.fog===!0,fogExp2:!!A&&A.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:i,skinning:w.isSkinnedMesh===!0,morphTargets:_.morphAttributes.position!==void 0,morphNormals:_.morphAttributes.normal!==void 0,morphColors:_.morphAttributes.color!==void 0,morphTargetsCount:M,morphTextureStride:z,numDirLights:u.directional.length,numPointLights:u.point.length,numSpotLights:u.spot.length,numSpotLightMaps:u.spotLightMap.length,numRectAreaLights:u.rectArea.length,numHemiLights:u.hemi.length,numDirLightShadows:u.directionalShadowMap.length,numPointLightShadows:u.pointShadowMap.length,numSpotLightShadows:u.spotShadowMap.length,numSpotLightShadowsWithMaps:u.numSpotLightShadowsWithMaps,numLightProbes:u.numLightProbes,numClippingPlanes:G.numPlanes,numClipIntersection:G.numIntersection,dithering:b.dithering,shadowMapEnabled:_t.shadowMap.enabled&&o.length>0,shadowMapType:_t.shadowMap.type,toneMapping:de,useLegacyLights:_t._useLegacyLights,decodeVideoTexture:Y&&b.map.isVideoTexture===!0&&Fa.getTransfer(b.map.colorSpace)===Ya,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===yf,flipSided:b.side===Gs,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionClipCullDistance:he&&b.extensions.clipCullDistance===!0&<.has("WEBGL_clip_cull_distance"),extensionMultiDraw:he&&b.extensions.multiDraw===!0&<.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:lt.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return xe.vertexUv1s=g.has(1),xe.vertexUv2s=g.has(2),xe.vertexUv3s=g.has(3),g.clear(),xe}function e(b){const u=[];if(b.shaderID?u.push(b.shaderID):(u.push(b.customVertexShaderID),u.push(b.customFragmentShaderID)),b.defines!==void 0)for(const o in b.defines)u.push(o),u.push(b.defines[o]);return b.isRawShaderMaterial===!1&&(a(u,b),n(u,b),u.push(_t.outputColorSpace)),u.push(b.customProgramCacheKey),u.join()}function a(b,u){b.push(u.precision),b.push(u.outputColorSpace),b.push(u.envMapMode),b.push(u.envMapCubeUVHeight),b.push(u.mapUv),b.push(u.alphaMapUv),b.push(u.lightMapUv),b.push(u.aoMapUv),b.push(u.bumpMapUv),b.push(u.normalMapUv),b.push(u.displacementMapUv),b.push(u.emissiveMapUv),b.push(u.metalnessMapUv),b.push(u.roughnessMapUv),b.push(u.anisotropyMapUv),b.push(u.clearcoatMapUv),b.push(u.clearcoatNormalMapUv),b.push(u.clearcoatRoughnessMapUv),b.push(u.iridescenceMapUv),b.push(u.iridescenceThicknessMapUv),b.push(u.sheenColorMapUv),b.push(u.sheenRoughnessMapUv),b.push(u.specularMapUv),b.push(u.specularColorMapUv),b.push(u.specularIntensityMapUv),b.push(u.transmissionMapUv),b.push(u.thicknessMapUv),b.push(u.combine),b.push(u.fogExp2),b.push(u.sizeAttenuation),b.push(u.morphTargetsCount),b.push(u.morphAttributeCount),b.push(u.numDirLights),b.push(u.numPointLights),b.push(u.numSpotLights),b.push(u.numSpotLightMaps),b.push(u.numHemiLights),b.push(u.numRectAreaLights),b.push(u.numDirLightShadows),b.push(u.numPointLightShadows),b.push(u.numSpotLightShadows),b.push(u.numSpotLightShadowsWithMaps),b.push(u.numLightProbes),b.push(u.shadowMapType),b.push(u.toneMapping),b.push(u.numClippingPlanes),b.push(u.numClipIntersection),b.push(u.depthPacking)}function n(b,u){U.disableAll(),u.supportsVertexTextures&&U.enable(0),u.instancing&&U.enable(1),u.instancingColor&&U.enable(2),u.instancingMorph&&U.enable(3),u.matcap&&U.enable(4),u.envMap&&U.enable(5),u.normalMapObjectSpace&&U.enable(6),u.normalMapTangentSpace&&U.enable(7),u.clearcoat&&U.enable(8),u.iridescence&&U.enable(9),u.alphaTest&&U.enable(10),u.vertexColors&&U.enable(11),u.vertexAlphas&&U.enable(12),u.vertexUv1s&&U.enable(13),u.vertexUv2s&&U.enable(14),u.vertexUv3s&&U.enable(15),u.vertexTangents&&U.enable(16),u.anisotropy&&U.enable(17),u.alphaHash&&U.enable(18),u.batching&&U.enable(19),b.push(U.mask),U.disableAll(),u.fog&&U.enable(0),u.useFog&&U.enable(1),u.flatShading&&U.enable(2),u.logarithmicDepthBuffer&&U.enable(3),u.skinning&&U.enable(4),u.morphTargets&&U.enable(5),u.morphNormals&&U.enable(6),u.morphColors&&U.enable(7),u.premultipliedAlpha&&U.enable(8),u.shadowMapEnabled&&U.enable(9),u.useLegacyLights&&U.enable(10),u.doubleSided&&U.enable(11),u.flipSided&&U.enable(12),u.useDepthPacking&&U.enable(13),u.dithering&&U.enable(14),u.transmission&&U.enable(15),u.sheen&&U.enable(16),u.opaque&&U.enable(17),u.pointsUvs&&U.enable(18),u.decodeVideoTexture&&U.enable(19),u.alphaToCoverage&&U.enable(20),b.push(U.mask)}function f(b){const u=h[b.type];let o;if(u){const d=Fu[u];o=m2.clone(d.uniforms)}else o=b.uniforms;return o}function c(b,u){let o;for(let d=0,w=C.length;d0?lt.push(e):x.transparent===!0?Dt.push(e):q.push(e)}function t(i,S,x,h,p,r){const e=G(i,S,x,h,p,r);x.transmission>0?lt.unshift(e):x.transparent===!0?Dt.unshift(e):q.unshift(e)}function g(i,S){q.length>1&&q.sort(i||k4),lt.length>1&<.sort(S||xy),Dt.length>1&&Dt.sort(S||xy)}function C(){for(let i=F,S=_t.length;i=Zt.length?(G=new by,Zt.push(G)):G=Zt[Dt],G}function q(){_t=new WeakMap}return{get:F,dispose:q}}function N4(){const _t={};return{get:function(F){if(_t[F.id]!==void 0)return _t[F.id];let q;switch(F.type){case"DirectionalLight":q={direction:new bn,color:new ha};break;case"SpotLight":q={position:new bn,direction:new bn,color:new ha,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":q={position:new bn,color:new ha,distance:0,decay:0};break;case"HemisphereLight":q={direction:new bn,skyColor:new ha,groundColor:new ha};break;case"RectAreaLight":q={color:new ha,position:new bn,halfWidth:new bn,halfHeight:new bn};break}return _t[F.id]=q,q}}}function B4(){const _t={};return{get:function(F){if(_t[F.id]!==void 0)return _t[F.id];let q;switch(F.type){case"DirectionalLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi};break;case"SpotLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi};break;case"PointLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi,shadowCameraNear:1,shadowCameraFar:1e3};break}return _t[F.id]=q,q}}}let U4=0;function H4(_t,F){return(F.castShadow?2:0)-(_t.castShadow?2:0)+(F.map?1:0)-(_t.map?1:0)}function V4(_t){const F=new N4,q=B4(),lt={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let g=0;g<9;g++)lt.probe.push(new bn);const Dt=new bn,Zt=new so,G=new so;function U(g,C){let i=0,S=0,x=0;for(let o=0;o<9;o++)lt.probe[o].set(0,0,0);let h=0,p=0,r=0,e=0,a=0,n=0,f=0,c=0,l=0,m=0,v=0;g.sort(H4);const b=C===!0?Math.PI:1;for(let o=0,d=g.length;o0&&(_t.has("OES_texture_float_linear")===!0?(lt.rectAreaLTC1=_i.LTC_FLOAT_1,lt.rectAreaLTC2=_i.LTC_FLOAT_2):(lt.rectAreaLTC1=_i.LTC_HALF_1,lt.rectAreaLTC2=_i.LTC_HALF_2)),lt.ambient[0]=i,lt.ambient[1]=S,lt.ambient[2]=x;const u=lt.hash;(u.directionalLength!==h||u.pointLength!==p||u.spotLength!==r||u.rectAreaLength!==e||u.hemiLength!==a||u.numDirectionalShadows!==n||u.numPointShadows!==f||u.numSpotShadows!==c||u.numSpotMaps!==l||u.numLightProbes!==v)&&(lt.directional.length=h,lt.spot.length=r,lt.rectArea.length=e,lt.point.length=p,lt.hemi.length=a,lt.directionalShadow.length=n,lt.directionalShadowMap.length=n,lt.pointShadow.length=f,lt.pointShadowMap.length=f,lt.spotShadow.length=c,lt.spotShadowMap.length=c,lt.directionalShadowMatrix.length=n,lt.pointShadowMatrix.length=f,lt.spotLightMatrix.length=c+l-m,lt.spotLightMap.length=l,lt.numSpotLightShadowsWithMaps=m,lt.numLightProbes=v,u.directionalLength=h,u.pointLength=p,u.spotLength=r,u.rectAreaLength=e,u.hemiLength=a,u.numDirectionalShadows=n,u.numPointShadows=f,u.numSpotShadows=c,u.numSpotMaps=l,u.numLightProbes=v,lt.version=U4++)}function t(g,C){let i=0,S=0,x=0,h=0,p=0;const r=C.matrixWorldInverse;for(let e=0,a=g.length;e=G.length?(U=new wy(_t),G.push(U)):U=G[Zt],U}function lt(){F=new WeakMap}return{get:q,dispose:lt}}class W4 extends ih{constructor(F){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Sw,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(F)}copy(F){return super.copy(F),this.depthPacking=F.depthPacking,this.map=F.map,this.alphaMap=F.alphaMap,this.displacementMap=F.displacementMap,this.displacementScale=F.displacementScale,this.displacementBias=F.displacementBias,this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this}}class Y4 extends ih{constructor(F){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(F)}copy(F){return super.copy(F),this.map=F.map,this.alphaMap=F.alphaMap,this.displacementMap=F.displacementMap,this.displacementScale=F.displacementScale,this.displacementBias=F.displacementBias,this}}const X4=`void main() { gl_Position = vec4( position, 1.0 ); -}`,j4=`uniform sampler2D shadow_pass; +}`,Z4=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3770,12 +3770,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function K4(_t,F,q){let lt=new u1;const Dt=new Wi,Zt=new Wi,G=new No,U=new Y4({depthPacking:_w}),t=new X4,g={},C=q.maxTextureSize,i={[Nu]:Gs,[Gs]:Nu,[yf]:yf},S=new gc({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Wi},radius:{value:4}},vertexShader:Z4,fragmentShader:j4}),x=S.clone();x.defines.HORIZONTAL_PASS=1;const v=new Ys;v.setAttribute("position",new Ws(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new Vs(v,S),r=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Hy;let e=this.type;this.render=function(l,m,h){if(r.enabled===!1||r.autoUpdate===!1&&r.needsUpdate===!1||l.length===0)return;const b=_t.getRenderTarget(),u=_t.getActiveCubeFace(),o=_t.getActiveMipmapLevel(),d=_t.state;d.setBlending(vc),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);const w=e!==mf&&this.type===mf,A=e===mf&&this.type!==mf;for(let _=0,y=l.length;_C||Dt.y>C)&&(Dt.x>C&&(Zt.x=Math.floor(C/s.x),Dt.x=Zt.x*s.x,T.mapSize.x=Zt.x),Dt.y>C&&(Zt.y=Math.floor(C/s.y),Dt.y=Zt.y*s.y,T.mapSize.y=Zt.y)),T.map===null||w===!0||A===!0){const M=this.type!==mf?{minFilter:Il,magFilter:Il}:{};T.map!==null&&T.map.dispose(),T.map=new rh(Dt.x,Dt.y,M),T.map.texture.name=E.name+".shadowMap",T.camera.updateProjectionMatrix()}_t.setRenderTarget(T.map),_t.clear();const L=T.getViewportCount();for(let M=0;M0||m.map&&m.alphaTest>0){const d=u.uuid,w=m.uuid;let A=g[d];A===void 0&&(A={},g[d]=A);let _=A[w];_===void 0&&(_=u.clone(),A[w]=_,m.addEventListener("dispose",c)),u=_}if(u.visible=m.visible,u.wireframe=m.wireframe,b===mf?u.side=m.shadowSide!==null?m.shadowSide:m.side:u.side=m.shadowSide!==null?m.shadowSide:i[m.side],u.alphaMap=m.alphaMap,u.alphaTest=m.alphaTest,u.map=m.map,u.clipShadows=m.clipShadows,u.clippingPlanes=m.clippingPlanes,u.clipIntersection=m.clipIntersection,u.displacementMap=m.displacementMap,u.displacementScale=m.displacementScale,u.displacementBias=m.displacementBias,u.wireframeLinewidth=m.wireframeLinewidth,u.linewidth=m.linewidth,h.isPointLight===!0&&u.isMeshDistanceMaterial===!0){const d=_t.properties.get(u);d.light=h}return u}function f(l,m,h,b,u){if(l.visible===!1)return;if(l.layers.test(m.layers)&&(l.isMesh||l.isLine||l.isPoints)&&(l.castShadow||l.receiveShadow&&u===mf)&&(!l.frustumCulled||lt.intersectsObject(l))){l.modelViewMatrix.multiplyMatrices(h.matrixWorldInverse,l.matrixWorld);const w=F.update(l),A=l.material;if(Array.isArray(A)){const _=w.groups;for(let y=0,E=_.length;y=1):E.indexOf("OpenGL ES")!==-1&&(y=parseFloat(/^OpenGL ES (\d)/.exec(E)[1]),_=y>=2);let T=null,s={};const L=_t.getParameter(_t.SCISSOR_BOX),M=_t.getParameter(_t.VIEWPORT),z=new No().fromArray(L),D=new No().fromArray(M);function N(It,re,Kt,$t){const le=new Uint8Array(4),he=_t.createTexture();_t.bindTexture(It,he),_t.texParameteri(It,_t.TEXTURE_MIN_FILTER,_t.NEAREST),_t.texParameteri(It,_t.TEXTURE_MAG_FILTER,_t.NEAREST);for(let de=0;de"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new Wi,C=new WeakMap;let i;const S=new WeakMap;let x=!1;try{x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(tt,V){return x?new OffscreenCanvas(tt,V):cp("canvas")}function p(tt,V,Q){let ot=1;const $=X(tt);if(($.width>Q||$.height>Q)&&(ot=Q/Math.max($.width,$.height)),ot<1)if(typeof HTMLImageElement<"u"&&tt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&tt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&tt instanceof ImageBitmap||typeof VideoFrame<"u"&&tt instanceof VideoFrame){const Z=Math.floor(ot*$.width),st=Math.floor(ot*$.height);i===void 0&&(i=v(Z,st));const nt=V?v(Z,st):i;return nt.width=Z,nt.height=st,nt.getContext("2d").drawImage(tt,0,0,Z,st),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+$.width+"x"+$.height+") to ("+Z+"x"+st+")."),nt}else return"data"in tt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+$.width+"x"+$.height+")."),tt;return tt}function r(tt){return tt.generateMipmaps&&tt.minFilter!==Il&&tt.minFilter!==fu}function e(tt){_t.generateMipmap(tt)}function a(tt,V,Q,ot,$=!1){if(tt!==null){if(_t[tt]!==void 0)return _t[tt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+tt+"'")}let Z=V;if(V===_t.RED&&(Q===_t.FLOAT&&(Z=_t.R32F),Q===_t.HALF_FLOAT&&(Z=_t.R16F),Q===_t.UNSIGNED_BYTE&&(Z=_t.R8)),V===_t.RED_INTEGER&&(Q===_t.UNSIGNED_BYTE&&(Z=_t.R8UI),Q===_t.UNSIGNED_SHORT&&(Z=_t.R16UI),Q===_t.UNSIGNED_INT&&(Z=_t.R32UI),Q===_t.BYTE&&(Z=_t.R8I),Q===_t.SHORT&&(Z=_t.R16I),Q===_t.INT&&(Z=_t.R32I)),V===_t.RG&&(Q===_t.FLOAT&&(Z=_t.RG32F),Q===_t.HALF_FLOAT&&(Z=_t.RG16F),Q===_t.UNSIGNED_BYTE&&(Z=_t.RG8)),V===_t.RG_INTEGER&&(Q===_t.UNSIGNED_BYTE&&(Z=_t.RG8UI),Q===_t.UNSIGNED_SHORT&&(Z=_t.RG16UI),Q===_t.UNSIGNED_INT&&(Z=_t.RG32UI),Q===_t.BYTE&&(Z=_t.RG8I),Q===_t.SHORT&&(Z=_t.RG16I),Q===_t.INT&&(Z=_t.RG32I)),V===_t.RGB&&Q===_t.UNSIGNED_INT_5_9_9_9_REV&&(Z=_t.RGB9_E5),V===_t.RGBA){const st=$?sp:Fa.getTransfer(ot);Q===_t.FLOAT&&(Z=_t.RGBA32F),Q===_t.HALF_FLOAT&&(Z=_t.RGBA16F),Q===_t.UNSIGNED_BYTE&&(Z=st===Ya?_t.SRGB8_ALPHA8:_t.RGBA8),Q===_t.UNSIGNED_SHORT_4_4_4_4&&(Z=_t.RGBA4),Q===_t.UNSIGNED_SHORT_5_5_5_1&&(Z=_t.RGB5_A1)}return(Z===_t.R16F||Z===_t.R32F||Z===_t.RG16F||Z===_t.RG32F||Z===_t.RGBA16F||Z===_t.RGBA32F)&&F.get("EXT_color_buffer_float"),Z}function n(tt,V){return r(tt)===!0||tt.isFramebufferTexture&&tt.minFilter!==Il&&tt.minFilter!==fu?Math.log2(Math.max(V.width,V.height))+1:tt.mipmaps!==void 0&&tt.mipmaps.length>0?tt.mipmaps.length:tt.isCompressedTexture&&Array.isArray(tt.image)?V.mipmaps.length:1}function f(tt){const V=tt.target;V.removeEventListener("dispose",f),l(V),V.isVideoTexture&&C.delete(V)}function c(tt){const V=tt.target;V.removeEventListener("dispose",c),h(V)}function l(tt){const V=lt.get(tt);if(V.__webglInit===void 0)return;const Q=tt.source,ot=S.get(Q);if(ot){const $=ot[V.__cacheKey];$.usedTimes--,$.usedTimes===0&&m(tt),Object.keys(ot).length===0&&S.delete(Q)}lt.remove(tt)}function m(tt){const V=lt.get(tt);_t.deleteTexture(V.__webglTexture);const Q=tt.source,ot=S.get(Q);delete ot[V.__cacheKey],G.memory.textures--}function h(tt){const V=lt.get(tt);if(tt.depthTexture&&tt.depthTexture.dispose(),tt.isWebGLCubeRenderTarget)for(let ot=0;ot<6;ot++){if(Array.isArray(V.__webglFramebuffer[ot]))for(let $=0;$=Dt.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+tt+" texture units while this GPU supports only "+Dt.maxTextures),b+=1,tt}function d(tt){const V=[];return V.push(tt.wrapS),V.push(tt.wrapT),V.push(tt.wrapR||0),V.push(tt.magFilter),V.push(tt.minFilter),V.push(tt.anisotropy),V.push(tt.internalFormat),V.push(tt.format),V.push(tt.type),V.push(tt.generateMipmaps),V.push(tt.premultiplyAlpha),V.push(tt.flipY),V.push(tt.unpackAlignment),V.push(tt.colorSpace),V.join()}function w(tt,V){const Q=lt.get(tt);if(tt.isVideoTexture&&ut(tt),tt.isRenderTargetTexture===!1&&tt.version>0&&Q.__version!==tt.version){const ot=tt.image;if(ot===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ot.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{z(Q,tt,V);return}}q.bindTexture(_t.TEXTURE_2D,Q.__webglTexture,_t.TEXTURE0+V)}function A(tt,V){const Q=lt.get(tt);if(tt.version>0&&Q.__version!==tt.version){z(Q,tt,V);return}q.bindTexture(_t.TEXTURE_2D_ARRAY,Q.__webglTexture,_t.TEXTURE0+V)}function _(tt,V){const Q=lt.get(tt);if(tt.version>0&&Q.__version!==tt.version){z(Q,tt,V);return}q.bindTexture(_t.TEXTURE_3D,Q.__webglTexture,_t.TEXTURE0+V)}function y(tt,V){const Q=lt.get(tt);if(tt.version>0&&Q.__version!==tt.version){D(Q,tt,V);return}q.bindTexture(_t.TEXTURE_CUBE_MAP,Q.__webglTexture,_t.TEXTURE0+V)}const E={[O0]:_t.REPEAT,[th]:_t.CLAMP_TO_EDGE,[N0]:_t.MIRRORED_REPEAT},T={[Il]:_t.NEAREST,[pw]:_t.NEAREST_MIPMAP_NEAREST,[Ld]:_t.NEAREST_MIPMAP_LINEAR,[fu]:_t.LINEAR,[$p]:_t.LINEAR_MIPMAP_NEAREST,[eh]:_t.LINEAR_MIPMAP_LINEAR},s={[Pw]:_t.NEVER,[kw]:_t.ALWAYS,[Rw]:_t.LESS,[$y]:_t.LEQUAL,[Dw]:_t.EQUAL,[zw]:_t.GEQUAL,[Iw]:_t.GREATER,[Fw]:_t.NOTEQUAL};function L(tt,V){if(V.type===hc&&F.has("OES_texture_float_linear")===!1&&(V.magFilter===fu||V.magFilter===$p||V.magFilter===Ld||V.magFilter===eh||V.minFilter===fu||V.minFilter===$p||V.minFilter===Ld||V.minFilter===eh)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),_t.texParameteri(tt,_t.TEXTURE_WRAP_S,E[V.wrapS]),_t.texParameteri(tt,_t.TEXTURE_WRAP_T,E[V.wrapT]),(tt===_t.TEXTURE_3D||tt===_t.TEXTURE_2D_ARRAY)&&_t.texParameteri(tt,_t.TEXTURE_WRAP_R,E[V.wrapR]),_t.texParameteri(tt,_t.TEXTURE_MAG_FILTER,T[V.magFilter]),_t.texParameteri(tt,_t.TEXTURE_MIN_FILTER,T[V.minFilter]),V.compareFunction&&(_t.texParameteri(tt,_t.TEXTURE_COMPARE_MODE,_t.COMPARE_REF_TO_TEXTURE),_t.texParameteri(tt,_t.TEXTURE_COMPARE_FUNC,s[V.compareFunction])),F.has("EXT_texture_filter_anisotropic")===!0){if(V.magFilter===Il||V.minFilter!==Ld&&V.minFilter!==eh||V.type===hc&&F.has("OES_texture_float_linear")===!1)return;if(V.anisotropy>1||lt.get(V).__currentAnisotropy){const Q=F.get("EXT_texture_filter_anisotropic");_t.texParameterf(tt,Q.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(V.anisotropy,Dt.getMaxAnisotropy())),lt.get(V).__currentAnisotropy=V.anisotropy}}}function M(tt,V){let Q=!1;tt.__webglInit===void 0&&(tt.__webglInit=!0,V.addEventListener("dispose",f));const ot=V.source;let $=S.get(ot);$===void 0&&($={},S.set(ot,$));const Z=d(V);if(Z!==tt.__cacheKey){$[Z]===void 0&&($[Z]={texture:_t.createTexture(),usedTimes:0},G.memory.textures++,Q=!0),$[Z].usedTimes++;const st=$[tt.__cacheKey];st!==void 0&&($[tt.__cacheKey].usedTimes--,st.usedTimes===0&&m(V)),tt.__cacheKey=Z,tt.__webglTexture=$[Z].texture}return Q}function z(tt,V,Q){let ot=_t.TEXTURE_2D;(V.isDataArrayTexture||V.isCompressedArrayTexture)&&(ot=_t.TEXTURE_2D_ARRAY),V.isData3DTexture&&(ot=_t.TEXTURE_3D);const $=M(tt,V),Z=V.source;q.bindTexture(ot,tt.__webglTexture,_t.TEXTURE0+Q);const st=lt.get(Z);if(Z.version!==st.__version||$===!0){q.activeTexture(_t.TEXTURE0+Q);const nt=Fa.getPrimaries(Fa.workingColorSpace),ct=V.colorSpace===cc?null:Fa.getPrimaries(V.colorSpace),gt=V.colorSpace===cc||nt===ct?_t.NONE:_t.BROWSER_DEFAULT_WEBGL;_t.pixelStorei(_t.UNPACK_FLIP_Y_WEBGL,V.flipY),_t.pixelStorei(_t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),_t.pixelStorei(_t.UNPACK_ALIGNMENT,V.unpackAlignment),_t.pixelStorei(_t.UNPACK_COLORSPACE_CONVERSION_WEBGL,gt);let Tt=p(V.image,!1,Dt.maxTextureSize);Tt=J(V,Tt);const wt=Zt.convert(V.format,V.colorSpace),Rt=Zt.convert(V.type);let bt=a(V.internalFormat,wt,Rt,V.colorSpace,V.isVideoTexture);L(ot,V);let At;const mt=V.mipmaps,Lt=V.isVideoTexture!==!0&&bt!==Qy,Ht=st.__version===void 0||$===!0,Ut=Z.dataReady,kt=n(V,Tt);if(V.isDepthTexture)bt=_t.DEPTH_COMPONENT16,V.type===hc?bt=_t.DEPTH_COMPONENT32F:V.type===uv?bt=_t.DEPTH_COMPONENT24:V.type===Jv&&(bt=_t.DEPTH24_STENCIL8),Ht&&(Lt?q.texStorage2D(_t.TEXTURE_2D,1,bt,Tt.width,Tt.height):q.texImage2D(_t.TEXTURE_2D,0,bt,Tt.width,Tt.height,0,wt,Rt,null));else if(V.isDataTexture)if(mt.length>0){Lt&&Ht&&q.texStorage2D(_t.TEXTURE_2D,kt,bt,mt[0].width,mt[0].height);for(let Vt=0,It=mt.length;Vt>=1,It>>=1}}else if(mt.length>0){if(Lt&&Ht){const Vt=X(mt[0]);q.texStorage2D(_t.TEXTURE_2D,kt,bt,Vt.width,Vt.height)}for(let Vt=0,It=mt.length;Vt0&&kt++;const It=X(wt[0]);q.texStorage2D(_t.TEXTURE_CUBE_MAP,kt,mt,It.width,It.height)}for(let It=0;It<6;It++)if(Tt){Lt?Ut&&q.texSubImage2D(_t.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,0,0,wt[It].width,wt[It].height,bt,At,wt[It].data):q.texImage2D(_t.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,mt,wt[It].width,wt[It].height,0,bt,At,wt[It].data);for(let re=0;re>Z),wt=Math.max(1,V.height>>Z);$===_t.TEXTURE_3D||$===_t.TEXTURE_2D_ARRAY?q.texImage3D($,Z,ct,Tt,wt,V.depth,0,st,nt,null):q.texImage2D($,Z,ct,Tt,wt,0,st,nt,null)}q.bindFramebuffer(_t.FRAMEBUFFER,tt),it(V)?U.framebufferTexture2DMultisampleEXT(_t.FRAMEBUFFER,ot,$,lt.get(Q).__webglTexture,0,et(V)):($===_t.TEXTURE_2D||$>=_t.TEXTURE_CUBE_MAP_POSITIVE_X&&$<=_t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&_t.framebufferTexture2D(_t.FRAMEBUFFER,ot,$,lt.get(Q).__webglTexture,Z),q.bindFramebuffer(_t.FRAMEBUFFER,null)}function I(tt,V,Q){if(_t.bindRenderbuffer(_t.RENDERBUFFER,tt),V.depthBuffer&&!V.stencilBuffer){let ot=_t.DEPTH_COMPONENT24;if(Q||it(V)){const $=V.depthTexture;$&&$.isDepthTexture&&($.type===hc?ot=_t.DEPTH_COMPONENT32F:$.type===uv&&(ot=_t.DEPTH_COMPONENT24));const Z=et(V);it(V)?U.renderbufferStorageMultisampleEXT(_t.RENDERBUFFER,Z,ot,V.width,V.height):_t.renderbufferStorageMultisample(_t.RENDERBUFFER,Z,ot,V.width,V.height)}else _t.renderbufferStorage(_t.RENDERBUFFER,ot,V.width,V.height);_t.framebufferRenderbuffer(_t.FRAMEBUFFER,_t.DEPTH_ATTACHMENT,_t.RENDERBUFFER,tt)}else if(V.depthBuffer&&V.stencilBuffer){const ot=et(V);Q&&it(V)===!1?_t.renderbufferStorageMultisample(_t.RENDERBUFFER,ot,_t.DEPTH24_STENCIL8,V.width,V.height):it(V)?U.renderbufferStorageMultisampleEXT(_t.RENDERBUFFER,ot,_t.DEPTH24_STENCIL8,V.width,V.height):_t.renderbufferStorage(_t.RENDERBUFFER,_t.DEPTH_STENCIL,V.width,V.height),_t.framebufferRenderbuffer(_t.FRAMEBUFFER,_t.DEPTH_STENCIL_ATTACHMENT,_t.RENDERBUFFER,tt)}else{const ot=V.textures;for(let $=0;$1;if(st||(ot.__webglTexture===void 0&&(ot.__webglTexture=_t.createTexture()),ot.__version=V.version,G.memory.textures++),Z){Q.__webglFramebuffer=[];for(let nt=0;nt<6;nt++)if(V.mipmaps&&V.mipmaps.length>0){Q.__webglFramebuffer[nt]=[];for(let ct=0;ct0){Q.__webglFramebuffer=[];for(let nt=0;nt0&&it(tt)===!1){Q.__webglMultisampledFramebuffer=_t.createFramebuffer(),Q.__webglColorRenderbuffer=[],q.bindFramebuffer(_t.FRAMEBUFFER,Q.__webglMultisampledFramebuffer);for(let nt=0;nt<$.length;nt++){const ct=$[nt];Q.__webglColorRenderbuffer[nt]=_t.createRenderbuffer(),_t.bindRenderbuffer(_t.RENDERBUFFER,Q.__webglColorRenderbuffer[nt]);const gt=Zt.convert(ct.format,ct.colorSpace),Tt=Zt.convert(ct.type),wt=a(ct.internalFormat,gt,Tt,ct.colorSpace,tt.isXRRenderTarget===!0),Rt=et(tt);_t.renderbufferStorageMultisample(_t.RENDERBUFFER,Rt,wt,tt.width,tt.height),_t.framebufferRenderbuffer(_t.FRAMEBUFFER,_t.COLOR_ATTACHMENT0+nt,_t.RENDERBUFFER,Q.__webglColorRenderbuffer[nt])}_t.bindRenderbuffer(_t.RENDERBUFFER,null),tt.depthBuffer&&(Q.__webglDepthRenderbuffer=_t.createRenderbuffer(),I(Q.__webglDepthRenderbuffer,tt,!0)),q.bindFramebuffer(_t.FRAMEBUFFER,null)}}if(Z){q.bindTexture(_t.TEXTURE_CUBE_MAP,ot.__webglTexture),L(_t.TEXTURE_CUBE_MAP,V);for(let nt=0;nt<6;nt++)if(V.mipmaps&&V.mipmaps.length>0)for(let ct=0;ct0)for(let ct=0;ct0&&it(tt)===!1){const V=tt.textures,Q=tt.width,ot=tt.height;let $=_t.COLOR_BUFFER_BIT;const Z=[],st=tt.stencilBuffer?_t.DEPTH_STENCIL_ATTACHMENT:_t.DEPTH_ATTACHMENT,nt=lt.get(tt),ct=V.length>1;if(ct)for(let gt=0;gt0&&F.has("WEBGL_multisampled_render_to_texture")===!0&&V.__useRenderToTexture!==!1}function ut(tt){const V=G.render.frame;C.get(tt)!==V&&(C.set(tt,V),tt.update())}function J(tt,V){const Q=tt.colorSpace,ot=tt.format,$=tt.type;return tt.isCompressedTexture===!0||tt.isVideoTexture===!0||Q!==mc&&Q!==cc&&(Fa.getTransfer(Q)===Ya?(ot!==zu||$!==pc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Q)),V}function X(tt){return typeof HTMLImageElement<"u"&&tt instanceof HTMLImageElement?(g.width=tt.naturalWidth||tt.width,g.height=tt.naturalHeight||tt.height):typeof VideoFrame<"u"&&tt instanceof VideoFrame?(g.width=tt.displayWidth,g.height=tt.displayHeight):(g.width=tt.width,g.height=tt.height),g}this.allocateTextureUnit=o,this.resetTextureUnits=u,this.setTexture2D=w,this.setTexture2DArray=A,this.setTexture3D=_,this.setTextureCube=y,this.rebindTextures=O,this.setupRenderTarget=H,this.updateRenderTargetMipmap=Y,this.updateMultisampleRenderTarget=j,this.setupDepthRenderbuffer=B,this.setupFrameBufferTexture=N,this.useMultisampledRTT=it}function $4(_t,F){function q(lt,Dt=cc){let Zt;const G=Fa.getTransfer(Dt);if(lt===pc)return _t.UNSIGNED_BYTE;if(lt===Xy)return _t.UNSIGNED_SHORT_4_4_4_4;if(lt===Zy)return _t.UNSIGNED_SHORT_5_5_5_1;if(lt===yw)return _t.UNSIGNED_INT_5_9_9_9_REV;if(lt===gw)return _t.BYTE;if(lt===mw)return _t.SHORT;if(lt===Wy)return _t.UNSIGNED_SHORT;if(lt===Yy)return _t.INT;if(lt===uv)return _t.UNSIGNED_INT;if(lt===hc)return _t.FLOAT;if(lt===op)return _t.HALF_FLOAT;if(lt===xw)return _t.ALPHA;if(lt===bw)return _t.RGB;if(lt===zu)return _t.RGBA;if(lt===ww)return _t.LUMINANCE;if(lt===Tw)return _t.LUMINANCE_ALPHA;if(lt===iv)return _t.DEPTH_COMPONENT;if(lt===Zv)return _t.DEPTH_STENCIL;if(lt===Aw)return _t.RED;if(lt===jy)return _t.RED_INTEGER;if(lt===Mw)return _t.RG;if(lt===Ky)return _t.RG_INTEGER;if(lt===Jy)return _t.RGBA_INTEGER;if(lt===qp||lt===t0||lt===e0||lt===r0)if(G===Ya)if(Zt=F.get("WEBGL_compressed_texture_s3tc_srgb"),Zt!==null){if(lt===qp)return Zt.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(lt===t0)return Zt.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(lt===e0)return Zt.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(lt===r0)return Zt.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(Zt=F.get("WEBGL_compressed_texture_s3tc"),Zt!==null){if(lt===qp)return Zt.COMPRESSED_RGB_S3TC_DXT1_EXT;if(lt===t0)return Zt.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(lt===e0)return Zt.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(lt===r0)return Zt.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(lt===lm||lt===um||lt===fm||lt===cm)if(Zt=F.get("WEBGL_compressed_texture_pvrtc"),Zt!==null){if(lt===lm)return Zt.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(lt===um)return Zt.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(lt===fm)return Zt.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(lt===cm)return Zt.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(lt===Qy)return Zt=F.get("WEBGL_compressed_texture_etc1"),Zt!==null?Zt.COMPRESSED_RGB_ETC1_WEBGL:null;if(lt===hm||lt===vm)if(Zt=F.get("WEBGL_compressed_texture_etc"),Zt!==null){if(lt===hm)return G===Ya?Zt.COMPRESSED_SRGB8_ETC2:Zt.COMPRESSED_RGB8_ETC2;if(lt===vm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:Zt.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(lt===dm||lt===pm||lt===gm||lt===mm||lt===ym||lt===xm||lt===bm||lt===wm||lt===Tm||lt===Am||lt===Mm||lt===Sm||lt===Em||lt===_m)if(Zt=F.get("WEBGL_compressed_texture_astc"),Zt!==null){if(lt===dm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:Zt.COMPRESSED_RGBA_ASTC_4x4_KHR;if(lt===pm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:Zt.COMPRESSED_RGBA_ASTC_5x4_KHR;if(lt===gm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:Zt.COMPRESSED_RGBA_ASTC_5x5_KHR;if(lt===mm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:Zt.COMPRESSED_RGBA_ASTC_6x5_KHR;if(lt===ym)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:Zt.COMPRESSED_RGBA_ASTC_6x6_KHR;if(lt===xm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:Zt.COMPRESSED_RGBA_ASTC_8x5_KHR;if(lt===bm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:Zt.COMPRESSED_RGBA_ASTC_8x6_KHR;if(lt===wm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:Zt.COMPRESSED_RGBA_ASTC_8x8_KHR;if(lt===Tm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:Zt.COMPRESSED_RGBA_ASTC_10x5_KHR;if(lt===Am)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:Zt.COMPRESSED_RGBA_ASTC_10x6_KHR;if(lt===Mm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:Zt.COMPRESSED_RGBA_ASTC_10x8_KHR;if(lt===Sm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:Zt.COMPRESSED_RGBA_ASTC_10x10_KHR;if(lt===Em)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:Zt.COMPRESSED_RGBA_ASTC_12x10_KHR;if(lt===_m)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:Zt.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(lt===n0||lt===Cm||lt===Lm)if(Zt=F.get("EXT_texture_compression_bptc"),Zt!==null){if(lt===n0)return G===Ya?Zt.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:Zt.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(lt===Cm)return Zt.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(lt===Lm)return Zt.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(lt===Sw||lt===Pm||lt===Rm||lt===Dm)if(Zt=F.get("EXT_texture_compression_rgtc"),Zt!==null){if(lt===n0)return Zt.COMPRESSED_RED_RGTC1_EXT;if(lt===Pm)return Zt.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(lt===Rm)return Zt.COMPRESSED_RED_GREEN_RGTC2_EXT;if(lt===Dm)return Zt.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return lt===Jv?_t.UNSIGNED_INT_24_8:_t[lt]!==void 0?_t[lt]:null}return{convert:q}}class q4 extends uu{constructor(F=[]){super(),this.isArrayCamera=!0,this.cameras=F}}class rv extends Bo{constructor(){super(),this.isGroup=!0,this.type="Group"}}const tS={type:"move"};class C0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new rv,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new rv,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new bn,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new bn),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new rv,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new bn,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new bn),this._grip}dispatchEvent(F){return this._targetRay!==null&&this._targetRay.dispatchEvent(F),this._grip!==null&&this._grip.dispatchEvent(F),this._hand!==null&&this._hand.dispatchEvent(F),this}connect(F){if(F&&F.hand){const q=this._hand;if(q)for(const lt of F.hand.values())this._getHandJoint(q,lt)}return this.dispatchEvent({type:"connected",data:F}),this}disconnect(F){return this.dispatchEvent({type:"disconnected",data:F}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(F,q,lt){let Dt=null,Zt=null,G=null;const U=this._targetRay,t=this._grip,g=this._hand;if(F&&q.session.visibilityState!=="visible-blurred"){if(g&&F.hand){G=!0;for(const p of F.hand.values()){const r=q.getJointPose(p,lt),e=this._getHandJoint(g,p);r!==null&&(e.matrix.fromArray(r.transform.matrix),e.matrix.decompose(e.position,e.rotation,e.scale),e.matrixWorldNeedsUpdate=!0,e.jointRadius=r.radius),e.visible=r!==null}const C=g.joints["index-finger-tip"],i=g.joints["thumb-tip"],S=C.position.distanceTo(i.position),x=.02,v=.005;g.inputState.pinching&&S>x+v?(g.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:F.handedness,target:this})):!g.inputState.pinching&&S<=x-v&&(g.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:F.handedness,target:this}))}else t!==null&&F.gripSpace&&(Zt=q.getPose(F.gripSpace,lt),Zt!==null&&(t.matrix.fromArray(Zt.transform.matrix),t.matrix.decompose(t.position,t.rotation,t.scale),t.matrixWorldNeedsUpdate=!0,Zt.linearVelocity?(t.hasLinearVelocity=!0,t.linearVelocity.copy(Zt.linearVelocity)):t.hasLinearVelocity=!1,Zt.angularVelocity?(t.hasAngularVelocity=!0,t.angularVelocity.copy(Zt.angularVelocity)):t.hasAngularVelocity=!1));U!==null&&(Dt=q.getPose(F.targetRaySpace,lt),Dt===null&&Zt!==null&&(Dt=Zt),Dt!==null&&(U.matrix.fromArray(Dt.transform.matrix),U.matrix.decompose(U.position,U.rotation,U.scale),U.matrixWorldNeedsUpdate=!0,Dt.linearVelocity?(U.hasLinearVelocity=!0,U.linearVelocity.copy(Dt.linearVelocity)):U.hasLinearVelocity=!1,Dt.angularVelocity?(U.hasAngularVelocity=!0,U.angularVelocity.copy(Dt.angularVelocity)):U.hasAngularVelocity=!1,this.dispatchEvent(tS)))}return U!==null&&(U.visible=Dt!==null),t!==null&&(t.visible=Zt!==null),g!==null&&(g.visible=G!==null),this}_getHandJoint(F,q){if(F.joints[q.jointName]===void 0){const lt=new rv;lt.matrixAutoUpdate=!1,lt.visible=!1,F.joints[q.jointName]=lt,F.add(lt)}return F.joints[q.jointName]}}const eS=` +}`;function j4(_t,F,q){let lt=new l1;const Dt=new Wi,Zt=new Wi,G=new No,U=new W4({depthPacking:Ew}),t=new Y4,g={},C=q.maxTextureSize,i={[Nu]:Gs,[Gs]:Nu,[yf]:yf},S=new gc({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Wi},radius:{value:4}},vertexShader:X4,fragmentShader:Z4}),x=S.clone();x.defines.HORIZONTAL_PASS=1;const h=new Ys;h.setAttribute("position",new Ws(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new Vs(h,S),r=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Uy;let e=this.type;this.render=function(l,m,v){if(r.enabled===!1||r.autoUpdate===!1&&r.needsUpdate===!1||l.length===0)return;const b=_t.getRenderTarget(),u=_t.getActiveCubeFace(),o=_t.getActiveMipmapLevel(),d=_t.state;d.setBlending(vc),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);const w=e!==mf&&this.type===mf,A=e===mf&&this.type!==mf;for(let _=0,y=l.length;_C||Dt.y>C)&&(Dt.x>C&&(Zt.x=Math.floor(C/s.x),Dt.x=Zt.x*s.x,T.mapSize.x=Zt.x),Dt.y>C&&(Zt.y=Math.floor(C/s.y),Dt.y=Zt.y*s.y,T.mapSize.y=Zt.y)),T.map===null||w===!0||A===!0){const M=this.type!==mf?{minFilter:Il,magFilter:Il}:{};T.map!==null&&T.map.dispose(),T.map=new rh(Dt.x,Dt.y,M),T.map.texture.name=E.name+".shadowMap",T.camera.updateProjectionMatrix()}_t.setRenderTarget(T.map),_t.clear();const L=T.getViewportCount();for(let M=0;M0||m.map&&m.alphaTest>0){const d=u.uuid,w=m.uuid;let A=g[d];A===void 0&&(A={},g[d]=A);let _=A[w];_===void 0&&(_=u.clone(),A[w]=_,m.addEventListener("dispose",c)),u=_}if(u.visible=m.visible,u.wireframe=m.wireframe,b===mf?u.side=m.shadowSide!==null?m.shadowSide:m.side:u.side=m.shadowSide!==null?m.shadowSide:i[m.side],u.alphaMap=m.alphaMap,u.alphaTest=m.alphaTest,u.map=m.map,u.clipShadows=m.clipShadows,u.clippingPlanes=m.clippingPlanes,u.clipIntersection=m.clipIntersection,u.displacementMap=m.displacementMap,u.displacementScale=m.displacementScale,u.displacementBias=m.displacementBias,u.wireframeLinewidth=m.wireframeLinewidth,u.linewidth=m.linewidth,v.isPointLight===!0&&u.isMeshDistanceMaterial===!0){const d=_t.properties.get(u);d.light=v}return u}function f(l,m,v,b,u){if(l.visible===!1)return;if(l.layers.test(m.layers)&&(l.isMesh||l.isLine||l.isPoints)&&(l.castShadow||l.receiveShadow&&u===mf)&&(!l.frustumCulled||lt.intersectsObject(l))){l.modelViewMatrix.multiplyMatrices(v.matrixWorldInverse,l.matrixWorld);const w=F.update(l),A=l.material;if(Array.isArray(A)){const _=w.groups;for(let y=0,E=_.length;y=1):E.indexOf("OpenGL ES")!==-1&&(y=parseFloat(/^OpenGL ES (\d)/.exec(E)[1]),_=y>=2);let T=null,s={};const L=_t.getParameter(_t.SCISSOR_BOX),M=_t.getParameter(_t.VIEWPORT),z=new No().fromArray(L),D=new No().fromArray(M);function N(It,re,Kt,$t){const le=new Uint8Array(4),he=_t.createTexture();_t.bindTexture(It,he),_t.texParameteri(It,_t.TEXTURE_MIN_FILTER,_t.NEAREST),_t.texParameteri(It,_t.TEXTURE_MAG_FILTER,_t.NEAREST);for(let de=0;de"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new Wi,C=new WeakMap;let i;const S=new WeakMap;let x=!1;try{x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function h(tt,V){return x?new OffscreenCanvas(tt,V):fp("canvas")}function p(tt,V,Q){let ot=1;const $=X(tt);if(($.width>Q||$.height>Q)&&(ot=Q/Math.max($.width,$.height)),ot<1)if(typeof HTMLImageElement<"u"&&tt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&tt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&tt instanceof ImageBitmap||typeof VideoFrame<"u"&&tt instanceof VideoFrame){const Z=Math.floor(ot*$.width),st=Math.floor(ot*$.height);i===void 0&&(i=h(Z,st));const nt=V?h(Z,st):i;return nt.width=Z,nt.height=st,nt.getContext("2d").drawImage(tt,0,0,Z,st),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+$.width+"x"+$.height+") to ("+Z+"x"+st+")."),nt}else return"data"in tt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+$.width+"x"+$.height+")."),tt;return tt}function r(tt){return tt.generateMipmaps&&tt.minFilter!==Il&&tt.minFilter!==fu}function e(tt){_t.generateMipmap(tt)}function a(tt,V,Q,ot,$=!1){if(tt!==null){if(_t[tt]!==void 0)return _t[tt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+tt+"'")}let Z=V;if(V===_t.RED&&(Q===_t.FLOAT&&(Z=_t.R32F),Q===_t.HALF_FLOAT&&(Z=_t.R16F),Q===_t.UNSIGNED_BYTE&&(Z=_t.R8)),V===_t.RED_INTEGER&&(Q===_t.UNSIGNED_BYTE&&(Z=_t.R8UI),Q===_t.UNSIGNED_SHORT&&(Z=_t.R16UI),Q===_t.UNSIGNED_INT&&(Z=_t.R32UI),Q===_t.BYTE&&(Z=_t.R8I),Q===_t.SHORT&&(Z=_t.R16I),Q===_t.INT&&(Z=_t.R32I)),V===_t.RG&&(Q===_t.FLOAT&&(Z=_t.RG32F),Q===_t.HALF_FLOAT&&(Z=_t.RG16F),Q===_t.UNSIGNED_BYTE&&(Z=_t.RG8)),V===_t.RG_INTEGER&&(Q===_t.UNSIGNED_BYTE&&(Z=_t.RG8UI),Q===_t.UNSIGNED_SHORT&&(Z=_t.RG16UI),Q===_t.UNSIGNED_INT&&(Z=_t.RG32UI),Q===_t.BYTE&&(Z=_t.RG8I),Q===_t.SHORT&&(Z=_t.RG16I),Q===_t.INT&&(Z=_t.RG32I)),V===_t.RGB&&Q===_t.UNSIGNED_INT_5_9_9_9_REV&&(Z=_t.RGB9_E5),V===_t.RGBA){const st=$?op:Fa.getTransfer(ot);Q===_t.FLOAT&&(Z=_t.RGBA32F),Q===_t.HALF_FLOAT&&(Z=_t.RGBA16F),Q===_t.UNSIGNED_BYTE&&(Z=st===Ya?_t.SRGB8_ALPHA8:_t.RGBA8),Q===_t.UNSIGNED_SHORT_4_4_4_4&&(Z=_t.RGBA4),Q===_t.UNSIGNED_SHORT_5_5_5_1&&(Z=_t.RGB5_A1)}return(Z===_t.R16F||Z===_t.R32F||Z===_t.RG16F||Z===_t.RG32F||Z===_t.RGBA16F||Z===_t.RGBA32F)&&F.get("EXT_color_buffer_float"),Z}function n(tt,V){return r(tt)===!0||tt.isFramebufferTexture&&tt.minFilter!==Il&&tt.minFilter!==fu?Math.log2(Math.max(V.width,V.height))+1:tt.mipmaps!==void 0&&tt.mipmaps.length>0?tt.mipmaps.length:tt.isCompressedTexture&&Array.isArray(tt.image)?V.mipmaps.length:1}function f(tt){const V=tt.target;V.removeEventListener("dispose",f),l(V),V.isVideoTexture&&C.delete(V)}function c(tt){const V=tt.target;V.removeEventListener("dispose",c),v(V)}function l(tt){const V=lt.get(tt);if(V.__webglInit===void 0)return;const Q=tt.source,ot=S.get(Q);if(ot){const $=ot[V.__cacheKey];$.usedTimes--,$.usedTimes===0&&m(tt),Object.keys(ot).length===0&&S.delete(Q)}lt.remove(tt)}function m(tt){const V=lt.get(tt);_t.deleteTexture(V.__webglTexture);const Q=tt.source,ot=S.get(Q);delete ot[V.__cacheKey],G.memory.textures--}function v(tt){const V=lt.get(tt);if(tt.depthTexture&&tt.depthTexture.dispose(),tt.isWebGLCubeRenderTarget)for(let ot=0;ot<6;ot++){if(Array.isArray(V.__webglFramebuffer[ot]))for(let $=0;$=Dt.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+tt+" texture units while this GPU supports only "+Dt.maxTextures),b+=1,tt}function d(tt){const V=[];return V.push(tt.wrapS),V.push(tt.wrapT),V.push(tt.wrapR||0),V.push(tt.magFilter),V.push(tt.minFilter),V.push(tt.anisotropy),V.push(tt.internalFormat),V.push(tt.format),V.push(tt.type),V.push(tt.generateMipmaps),V.push(tt.premultiplyAlpha),V.push(tt.flipY),V.push(tt.unpackAlignment),V.push(tt.colorSpace),V.join()}function w(tt,V){const Q=lt.get(tt);if(tt.isVideoTexture&&ut(tt),tt.isRenderTargetTexture===!1&&tt.version>0&&Q.__version!==tt.version){const ot=tt.image;if(ot===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ot.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{z(Q,tt,V);return}}q.bindTexture(_t.TEXTURE_2D,Q.__webglTexture,_t.TEXTURE0+V)}function A(tt,V){const Q=lt.get(tt);if(tt.version>0&&Q.__version!==tt.version){z(Q,tt,V);return}q.bindTexture(_t.TEXTURE_2D_ARRAY,Q.__webglTexture,_t.TEXTURE0+V)}function _(tt,V){const Q=lt.get(tt);if(tt.version>0&&Q.__version!==tt.version){z(Q,tt,V);return}q.bindTexture(_t.TEXTURE_3D,Q.__webglTexture,_t.TEXTURE0+V)}function y(tt,V){const Q=lt.get(tt);if(tt.version>0&&Q.__version!==tt.version){D(Q,tt,V);return}q.bindTexture(_t.TEXTURE_CUBE_MAP,Q.__webglTexture,_t.TEXTURE0+V)}const E={[k0]:_t.REPEAT,[th]:_t.CLAMP_TO_EDGE,[O0]:_t.MIRRORED_REPEAT},T={[Il]:_t.NEAREST,[dw]:_t.NEAREST_MIPMAP_NEAREST,[Cd]:_t.NEAREST_MIPMAP_LINEAR,[fu]:_t.LINEAR,[Qp]:_t.LINEAR_MIPMAP_NEAREST,[eh]:_t.LINEAR_MIPMAP_LINEAR},s={[Lw]:_t.NEVER,[zw]:_t.ALWAYS,[Pw]:_t.LESS,[Qy]:_t.LEQUAL,[Rw]:_t.EQUAL,[Fw]:_t.GEQUAL,[Dw]:_t.GREATER,[Iw]:_t.NOTEQUAL};function L(tt,V){if(V.type===hc&&F.has("OES_texture_float_linear")===!1&&(V.magFilter===fu||V.magFilter===Qp||V.magFilter===Cd||V.magFilter===eh||V.minFilter===fu||V.minFilter===Qp||V.minFilter===Cd||V.minFilter===eh)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),_t.texParameteri(tt,_t.TEXTURE_WRAP_S,E[V.wrapS]),_t.texParameteri(tt,_t.TEXTURE_WRAP_T,E[V.wrapT]),(tt===_t.TEXTURE_3D||tt===_t.TEXTURE_2D_ARRAY)&&_t.texParameteri(tt,_t.TEXTURE_WRAP_R,E[V.wrapR]),_t.texParameteri(tt,_t.TEXTURE_MAG_FILTER,T[V.magFilter]),_t.texParameteri(tt,_t.TEXTURE_MIN_FILTER,T[V.minFilter]),V.compareFunction&&(_t.texParameteri(tt,_t.TEXTURE_COMPARE_MODE,_t.COMPARE_REF_TO_TEXTURE),_t.texParameteri(tt,_t.TEXTURE_COMPARE_FUNC,s[V.compareFunction])),F.has("EXT_texture_filter_anisotropic")===!0){if(V.magFilter===Il||V.minFilter!==Cd&&V.minFilter!==eh||V.type===hc&&F.has("OES_texture_float_linear")===!1)return;if(V.anisotropy>1||lt.get(V).__currentAnisotropy){const Q=F.get("EXT_texture_filter_anisotropic");_t.texParameterf(tt,Q.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(V.anisotropy,Dt.getMaxAnisotropy())),lt.get(V).__currentAnisotropy=V.anisotropy}}}function M(tt,V){let Q=!1;tt.__webglInit===void 0&&(tt.__webglInit=!0,V.addEventListener("dispose",f));const ot=V.source;let $=S.get(ot);$===void 0&&($={},S.set(ot,$));const Z=d(V);if(Z!==tt.__cacheKey){$[Z]===void 0&&($[Z]={texture:_t.createTexture(),usedTimes:0},G.memory.textures++,Q=!0),$[Z].usedTimes++;const st=$[tt.__cacheKey];st!==void 0&&($[tt.__cacheKey].usedTimes--,st.usedTimes===0&&m(V)),tt.__cacheKey=Z,tt.__webglTexture=$[Z].texture}return Q}function z(tt,V,Q){let ot=_t.TEXTURE_2D;(V.isDataArrayTexture||V.isCompressedArrayTexture)&&(ot=_t.TEXTURE_2D_ARRAY),V.isData3DTexture&&(ot=_t.TEXTURE_3D);const $=M(tt,V),Z=V.source;q.bindTexture(ot,tt.__webglTexture,_t.TEXTURE0+Q);const st=lt.get(Z);if(Z.version!==st.__version||$===!0){q.activeTexture(_t.TEXTURE0+Q);const nt=Fa.getPrimaries(Fa.workingColorSpace),ct=V.colorSpace===cc?null:Fa.getPrimaries(V.colorSpace),gt=V.colorSpace===cc||nt===ct?_t.NONE:_t.BROWSER_DEFAULT_WEBGL;_t.pixelStorei(_t.UNPACK_FLIP_Y_WEBGL,V.flipY),_t.pixelStorei(_t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),_t.pixelStorei(_t.UNPACK_ALIGNMENT,V.unpackAlignment),_t.pixelStorei(_t.UNPACK_COLORSPACE_CONVERSION_WEBGL,gt);let Tt=p(V.image,!1,Dt.maxTextureSize);Tt=J(V,Tt);const wt=Zt.convert(V.format,V.colorSpace),Rt=Zt.convert(V.type);let bt=a(V.internalFormat,wt,Rt,V.colorSpace,V.isVideoTexture);L(ot,V);let At;const mt=V.mipmaps,Lt=V.isVideoTexture!==!0&&bt!==Jy,Ht=st.__version===void 0||$===!0,Ut=Z.dataReady,kt=n(V,Tt);if(V.isDepthTexture)bt=_t.DEPTH_COMPONENT16,V.type===hc?bt=_t.DEPTH_COMPONENT32F:V.type===uv?bt=_t.DEPTH_COMPONENT24:V.type===Kv&&(bt=_t.DEPTH24_STENCIL8),Ht&&(Lt?q.texStorage2D(_t.TEXTURE_2D,1,bt,Tt.width,Tt.height):q.texImage2D(_t.TEXTURE_2D,0,bt,Tt.width,Tt.height,0,wt,Rt,null));else if(V.isDataTexture)if(mt.length>0){Lt&&Ht&&q.texStorage2D(_t.TEXTURE_2D,kt,bt,mt[0].width,mt[0].height);for(let Vt=0,It=mt.length;Vt>=1,It>>=1}}else if(mt.length>0){if(Lt&&Ht){const Vt=X(mt[0]);q.texStorage2D(_t.TEXTURE_2D,kt,bt,Vt.width,Vt.height)}for(let Vt=0,It=mt.length;Vt0&&kt++;const It=X(wt[0]);q.texStorage2D(_t.TEXTURE_CUBE_MAP,kt,mt,It.width,It.height)}for(let It=0;It<6;It++)if(Tt){Lt?Ut&&q.texSubImage2D(_t.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,0,0,wt[It].width,wt[It].height,bt,At,wt[It].data):q.texImage2D(_t.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,mt,wt[It].width,wt[It].height,0,bt,At,wt[It].data);for(let re=0;re>Z),wt=Math.max(1,V.height>>Z);$===_t.TEXTURE_3D||$===_t.TEXTURE_2D_ARRAY?q.texImage3D($,Z,ct,Tt,wt,V.depth,0,st,nt,null):q.texImage2D($,Z,ct,Tt,wt,0,st,nt,null)}q.bindFramebuffer(_t.FRAMEBUFFER,tt),it(V)?U.framebufferTexture2DMultisampleEXT(_t.FRAMEBUFFER,ot,$,lt.get(Q).__webglTexture,0,et(V)):($===_t.TEXTURE_2D||$>=_t.TEXTURE_CUBE_MAP_POSITIVE_X&&$<=_t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&_t.framebufferTexture2D(_t.FRAMEBUFFER,ot,$,lt.get(Q).__webglTexture,Z),q.bindFramebuffer(_t.FRAMEBUFFER,null)}function I(tt,V,Q){if(_t.bindRenderbuffer(_t.RENDERBUFFER,tt),V.depthBuffer&&!V.stencilBuffer){let ot=_t.DEPTH_COMPONENT24;if(Q||it(V)){const $=V.depthTexture;$&&$.isDepthTexture&&($.type===hc?ot=_t.DEPTH_COMPONENT32F:$.type===uv&&(ot=_t.DEPTH_COMPONENT24));const Z=et(V);it(V)?U.renderbufferStorageMultisampleEXT(_t.RENDERBUFFER,Z,ot,V.width,V.height):_t.renderbufferStorageMultisample(_t.RENDERBUFFER,Z,ot,V.width,V.height)}else _t.renderbufferStorage(_t.RENDERBUFFER,ot,V.width,V.height);_t.framebufferRenderbuffer(_t.FRAMEBUFFER,_t.DEPTH_ATTACHMENT,_t.RENDERBUFFER,tt)}else if(V.depthBuffer&&V.stencilBuffer){const ot=et(V);Q&&it(V)===!1?_t.renderbufferStorageMultisample(_t.RENDERBUFFER,ot,_t.DEPTH24_STENCIL8,V.width,V.height):it(V)?U.renderbufferStorageMultisampleEXT(_t.RENDERBUFFER,ot,_t.DEPTH24_STENCIL8,V.width,V.height):_t.renderbufferStorage(_t.RENDERBUFFER,_t.DEPTH_STENCIL,V.width,V.height),_t.framebufferRenderbuffer(_t.FRAMEBUFFER,_t.DEPTH_STENCIL_ATTACHMENT,_t.RENDERBUFFER,tt)}else{const ot=V.textures;for(let $=0;$1;if(st||(ot.__webglTexture===void 0&&(ot.__webglTexture=_t.createTexture()),ot.__version=V.version,G.memory.textures++),Z){Q.__webglFramebuffer=[];for(let nt=0;nt<6;nt++)if(V.mipmaps&&V.mipmaps.length>0){Q.__webglFramebuffer[nt]=[];for(let ct=0;ct0){Q.__webglFramebuffer=[];for(let nt=0;nt0&&it(tt)===!1){Q.__webglMultisampledFramebuffer=_t.createFramebuffer(),Q.__webglColorRenderbuffer=[],q.bindFramebuffer(_t.FRAMEBUFFER,Q.__webglMultisampledFramebuffer);for(let nt=0;nt<$.length;nt++){const ct=$[nt];Q.__webglColorRenderbuffer[nt]=_t.createRenderbuffer(),_t.bindRenderbuffer(_t.RENDERBUFFER,Q.__webglColorRenderbuffer[nt]);const gt=Zt.convert(ct.format,ct.colorSpace),Tt=Zt.convert(ct.type),wt=a(ct.internalFormat,gt,Tt,ct.colorSpace,tt.isXRRenderTarget===!0),Rt=et(tt);_t.renderbufferStorageMultisample(_t.RENDERBUFFER,Rt,wt,tt.width,tt.height),_t.framebufferRenderbuffer(_t.FRAMEBUFFER,_t.COLOR_ATTACHMENT0+nt,_t.RENDERBUFFER,Q.__webglColorRenderbuffer[nt])}_t.bindRenderbuffer(_t.RENDERBUFFER,null),tt.depthBuffer&&(Q.__webglDepthRenderbuffer=_t.createRenderbuffer(),I(Q.__webglDepthRenderbuffer,tt,!0)),q.bindFramebuffer(_t.FRAMEBUFFER,null)}}if(Z){q.bindTexture(_t.TEXTURE_CUBE_MAP,ot.__webglTexture),L(_t.TEXTURE_CUBE_MAP,V);for(let nt=0;nt<6;nt++)if(V.mipmaps&&V.mipmaps.length>0)for(let ct=0;ct0)for(let ct=0;ct0&&it(tt)===!1){const V=tt.textures,Q=tt.width,ot=tt.height;let $=_t.COLOR_BUFFER_BIT;const Z=[],st=tt.stencilBuffer?_t.DEPTH_STENCIL_ATTACHMENT:_t.DEPTH_ATTACHMENT,nt=lt.get(tt),ct=V.length>1;if(ct)for(let gt=0;gt0&&F.has("WEBGL_multisampled_render_to_texture")===!0&&V.__useRenderToTexture!==!1}function ut(tt){const V=G.render.frame;C.get(tt)!==V&&(C.set(tt,V),tt.update())}function J(tt,V){const Q=tt.colorSpace,ot=tt.format,$=tt.type;return tt.isCompressedTexture===!0||tt.isVideoTexture===!0||Q!==mc&&Q!==cc&&(Fa.getTransfer(Q)===Ya?(ot!==zu||$!==pc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Q)),V}function X(tt){return typeof HTMLImageElement<"u"&&tt instanceof HTMLImageElement?(g.width=tt.naturalWidth||tt.width,g.height=tt.naturalHeight||tt.height):typeof VideoFrame<"u"&&tt instanceof VideoFrame?(g.width=tt.displayWidth,g.height=tt.displayHeight):(g.width=tt.width,g.height=tt.height),g}this.allocateTextureUnit=o,this.resetTextureUnits=u,this.setTexture2D=w,this.setTexture2DArray=A,this.setTexture3D=_,this.setTextureCube=y,this.rebindTextures=O,this.setupRenderTarget=H,this.updateRenderTargetMipmap=Y,this.updateMultisampleRenderTarget=j,this.setupDepthRenderbuffer=B,this.setupFrameBufferTexture=N,this.useMultisampledRTT=it}function Q4(_t,F){function q(lt,Dt=cc){let Zt;const G=Fa.getTransfer(Dt);if(lt===pc)return _t.UNSIGNED_BYTE;if(lt===Yy)return _t.UNSIGNED_SHORT_4_4_4_4;if(lt===Xy)return _t.UNSIGNED_SHORT_5_5_5_1;if(lt===mw)return _t.UNSIGNED_INT_5_9_9_9_REV;if(lt===pw)return _t.BYTE;if(lt===gw)return _t.SHORT;if(lt===Gy)return _t.UNSIGNED_SHORT;if(lt===Wy)return _t.INT;if(lt===uv)return _t.UNSIGNED_INT;if(lt===hc)return _t.FLOAT;if(lt===ap)return _t.HALF_FLOAT;if(lt===yw)return _t.ALPHA;if(lt===xw)return _t.RGB;if(lt===zu)return _t.RGBA;if(lt===bw)return _t.LUMINANCE;if(lt===ww)return _t.LUMINANCE_ALPHA;if(lt===iv)return _t.DEPTH_COMPONENT;if(lt===Xv)return _t.DEPTH_STENCIL;if(lt===Tw)return _t.RED;if(lt===Zy)return _t.RED_INTEGER;if(lt===Aw)return _t.RG;if(lt===jy)return _t.RG_INTEGER;if(lt===Ky)return _t.RGBA_INTEGER;if(lt===$p||lt===qp||lt===t0||lt===e0)if(G===Ya)if(Zt=F.get("WEBGL_compressed_texture_s3tc_srgb"),Zt!==null){if(lt===$p)return Zt.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(lt===qp)return Zt.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(lt===t0)return Zt.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(lt===e0)return Zt.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(Zt=F.get("WEBGL_compressed_texture_s3tc"),Zt!==null){if(lt===$p)return Zt.COMPRESSED_RGB_S3TC_DXT1_EXT;if(lt===qp)return Zt.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(lt===t0)return Zt.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(lt===e0)return Zt.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(lt===sm||lt===lm||lt===um||lt===fm)if(Zt=F.get("WEBGL_compressed_texture_pvrtc"),Zt!==null){if(lt===sm)return Zt.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(lt===lm)return Zt.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(lt===um)return Zt.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(lt===fm)return Zt.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(lt===Jy)return Zt=F.get("WEBGL_compressed_texture_etc1"),Zt!==null?Zt.COMPRESSED_RGB_ETC1_WEBGL:null;if(lt===cm||lt===hm)if(Zt=F.get("WEBGL_compressed_texture_etc"),Zt!==null){if(lt===cm)return G===Ya?Zt.COMPRESSED_SRGB8_ETC2:Zt.COMPRESSED_RGB8_ETC2;if(lt===hm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:Zt.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(lt===vm||lt===dm||lt===pm||lt===gm||lt===mm||lt===ym||lt===xm||lt===bm||lt===wm||lt===Tm||lt===Am||lt===Mm||lt===Sm||lt===Em)if(Zt=F.get("WEBGL_compressed_texture_astc"),Zt!==null){if(lt===vm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:Zt.COMPRESSED_RGBA_ASTC_4x4_KHR;if(lt===dm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:Zt.COMPRESSED_RGBA_ASTC_5x4_KHR;if(lt===pm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:Zt.COMPRESSED_RGBA_ASTC_5x5_KHR;if(lt===gm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:Zt.COMPRESSED_RGBA_ASTC_6x5_KHR;if(lt===mm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:Zt.COMPRESSED_RGBA_ASTC_6x6_KHR;if(lt===ym)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:Zt.COMPRESSED_RGBA_ASTC_8x5_KHR;if(lt===xm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:Zt.COMPRESSED_RGBA_ASTC_8x6_KHR;if(lt===bm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:Zt.COMPRESSED_RGBA_ASTC_8x8_KHR;if(lt===wm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:Zt.COMPRESSED_RGBA_ASTC_10x5_KHR;if(lt===Tm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:Zt.COMPRESSED_RGBA_ASTC_10x6_KHR;if(lt===Am)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:Zt.COMPRESSED_RGBA_ASTC_10x8_KHR;if(lt===Mm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:Zt.COMPRESSED_RGBA_ASTC_10x10_KHR;if(lt===Sm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:Zt.COMPRESSED_RGBA_ASTC_12x10_KHR;if(lt===Em)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:Zt.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(lt===r0||lt===_m||lt===Cm)if(Zt=F.get("EXT_texture_compression_bptc"),Zt!==null){if(lt===r0)return G===Ya?Zt.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:Zt.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(lt===_m)return Zt.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(lt===Cm)return Zt.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(lt===Mw||lt===Lm||lt===Pm||lt===Rm)if(Zt=F.get("EXT_texture_compression_rgtc"),Zt!==null){if(lt===r0)return Zt.COMPRESSED_RED_RGTC1_EXT;if(lt===Lm)return Zt.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(lt===Pm)return Zt.COMPRESSED_RED_GREEN_RGTC2_EXT;if(lt===Rm)return Zt.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return lt===Kv?_t.UNSIGNED_INT_24_8:_t[lt]!==void 0?_t[lt]:null}return{convert:q}}class $4 extends uu{constructor(F=[]){super(),this.isArrayCamera=!0,this.cameras=F}}class rv extends Bo{constructor(){super(),this.isGroup=!0,this.type="Group"}}const q4={type:"move"};class _0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new rv,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new rv,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new bn,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new bn),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new rv,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new bn,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new bn),this._grip}dispatchEvent(F){return this._targetRay!==null&&this._targetRay.dispatchEvent(F),this._grip!==null&&this._grip.dispatchEvent(F),this._hand!==null&&this._hand.dispatchEvent(F),this}connect(F){if(F&&F.hand){const q=this._hand;if(q)for(const lt of F.hand.values())this._getHandJoint(q,lt)}return this.dispatchEvent({type:"connected",data:F}),this}disconnect(F){return this.dispatchEvent({type:"disconnected",data:F}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(F,q,lt){let Dt=null,Zt=null,G=null;const U=this._targetRay,t=this._grip,g=this._hand;if(F&&q.session.visibilityState!=="visible-blurred"){if(g&&F.hand){G=!0;for(const p of F.hand.values()){const r=q.getJointPose(p,lt),e=this._getHandJoint(g,p);r!==null&&(e.matrix.fromArray(r.transform.matrix),e.matrix.decompose(e.position,e.rotation,e.scale),e.matrixWorldNeedsUpdate=!0,e.jointRadius=r.radius),e.visible=r!==null}const C=g.joints["index-finger-tip"],i=g.joints["thumb-tip"],S=C.position.distanceTo(i.position),x=.02,h=.005;g.inputState.pinching&&S>x+h?(g.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:F.handedness,target:this})):!g.inputState.pinching&&S<=x-h&&(g.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:F.handedness,target:this}))}else t!==null&&F.gripSpace&&(Zt=q.getPose(F.gripSpace,lt),Zt!==null&&(t.matrix.fromArray(Zt.transform.matrix),t.matrix.decompose(t.position,t.rotation,t.scale),t.matrixWorldNeedsUpdate=!0,Zt.linearVelocity?(t.hasLinearVelocity=!0,t.linearVelocity.copy(Zt.linearVelocity)):t.hasLinearVelocity=!1,Zt.angularVelocity?(t.hasAngularVelocity=!0,t.angularVelocity.copy(Zt.angularVelocity)):t.hasAngularVelocity=!1));U!==null&&(Dt=q.getPose(F.targetRaySpace,lt),Dt===null&&Zt!==null&&(Dt=Zt),Dt!==null&&(U.matrix.fromArray(Dt.transform.matrix),U.matrix.decompose(U.position,U.rotation,U.scale),U.matrixWorldNeedsUpdate=!0,Dt.linearVelocity?(U.hasLinearVelocity=!0,U.linearVelocity.copy(Dt.linearVelocity)):U.hasLinearVelocity=!1,Dt.angularVelocity?(U.hasAngularVelocity=!0,U.angularVelocity.copy(Dt.angularVelocity)):U.hasAngularVelocity=!1,this.dispatchEvent(q4)))}return U!==null&&(U.visible=Dt!==null),t!==null&&(t.visible=Zt!==null),g!==null&&(g.visible=G!==null),this}_getHandJoint(F,q){if(F.joints[q.jointName]===void 0){const lt=new rv;lt.matrixAutoUpdate=!1,lt.visible=!1,F.joints[q.jointName]=lt,F.add(lt)}return F.joints[q.jointName]}}const tS=` void main() { gl_Position = vec4( position, 1.0 ); -}`,rS=` +}`,eS=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -3794,13 +3794,13 @@ void main() { } -}`;class nS{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(F,q,lt){if(this.texture===null){const Dt=new Es,Zt=F.properties.get(Dt);Zt.__webglTexture=q.texture,(q.depthNear!=lt.depthNear||q.depthFar!=lt.depthFar)&&(this.depthNear=q.depthNear,this.depthFar=q.depthFar),this.texture=Dt}}render(F,q){if(this.texture!==null){if(this.mesh===null){const lt=q.cameras[0].viewport,Dt=new gc({vertexShader:eS,fragmentShader:rS,uniforms:{depthColor:{value:this.texture},depthWidth:{value:lt.z},depthHeight:{value:lt.w}}});this.mesh=new Vs(new pp(20,20),Dt)}F.render(this.mesh,q)}}reset(){this.texture=null,this.mesh=null}}class iS extends nh{constructor(F,q){super();const lt=this;let Dt=null,Zt=1,G=null,U="local-floor",t=1,g=null,C=null,i=null,S=null,x=null,v=null;const p=new nS,r=q.getContextAttributes();let e=null,a=null;const n=[],f=[],c=new Wi;let l=null;const m=new uu;m.layers.enable(1),m.viewport=new No;const h=new uu;h.layers.enable(2),h.viewport=new No;const b=[m,h],u=new q4;u.layers.enable(1),u.layers.enable(2);let o=null,d=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(N){let I=n[N];return I===void 0&&(I=new C0,n[N]=I),I.getTargetRaySpace()},this.getControllerGrip=function(N){let I=n[N];return I===void 0&&(I=new C0,n[N]=I),I.getGripSpace()},this.getHand=function(N){let I=n[N];return I===void 0&&(I=new C0,n[N]=I),I.getHandSpace()};function w(N){const I=f.indexOf(N.inputSource);if(I===-1)return;const k=n[I];k!==void 0&&(k.update(N.inputSource,N.frame,g||G),k.dispatchEvent({type:N.type,data:N.inputSource}))}function A(){Dt.removeEventListener("select",w),Dt.removeEventListener("selectstart",w),Dt.removeEventListener("selectend",w),Dt.removeEventListener("squeeze",w),Dt.removeEventListener("squeezestart",w),Dt.removeEventListener("squeezeend",w),Dt.removeEventListener("end",A),Dt.removeEventListener("inputsourceschange",_);for(let N=0;N=0&&(f[B]=null,n[B].disconnect(k))}for(let I=0;I=f.length){f.push(k),B=H;break}else if(f[H]===null){f[H]=k,B=H;break}if(B===-1)break}const O=n[B];O&&O.connect(k)}}const y=new bn,E=new bn;function T(N,I,k){y.setFromMatrixPosition(I.matrixWorld),E.setFromMatrixPosition(k.matrixWorld);const B=y.distanceTo(E),O=I.projectionMatrix.elements,H=k.projectionMatrix.elements,Y=O[14]/(O[10]-1),j=O[14]/(O[10]+1),et=(O[9]+1)/O[5],it=(O[9]-1)/O[5],ut=(O[8]-1)/O[0],J=(H[8]+1)/H[0],X=Y*ut,tt=Y*J,V=B/(-ut+J),Q=V*-ut;I.matrixWorld.decompose(N.position,N.quaternion,N.scale),N.translateX(Q),N.translateZ(V),N.matrixWorld.compose(N.position,N.quaternion,N.scale),N.matrixWorldInverse.copy(N.matrixWorld).invert();const ot=Y+V,$=j+V,Z=X-Q,st=tt+(B-Q),nt=et*j/$*ot,ct=it*j/$*ot;N.projectionMatrix.makePerspective(Z,st,nt,ct,ot,$),N.projectionMatrixInverse.copy(N.projectionMatrix).invert()}function s(N,I){I===null?N.matrixWorld.copy(N.matrix):N.matrixWorld.multiplyMatrices(I.matrixWorld,N.matrix),N.matrixWorldInverse.copy(N.matrixWorld).invert()}this.updateCamera=function(N){if(Dt===null)return;p.texture!==null&&(N.near=p.depthNear,N.far=p.depthFar),u.near=h.near=m.near=N.near,u.far=h.far=m.far=N.far,(o!==u.near||d!==u.far)&&(Dt.updateRenderState({depthNear:u.near,depthFar:u.far}),o=u.near,d=u.far,m.near=o,m.far=d,h.near=o,h.far=d,m.updateProjectionMatrix(),h.updateProjectionMatrix(),N.updateProjectionMatrix());const I=N.parent,k=u.cameras;s(u,I);for(let B=0;B0&&(r.alphaTest.value=e.alphaTest);const a=F.get(e),n=a.envMap,f=a.envMapRotation;if(n&&(r.envMap.value=n,Jc.copy(f),Jc.x*=-1,Jc.y*=-1,Jc.z*=-1,n.isCubeTexture&&n.isRenderTargetTexture===!1&&(Jc.y*=-1,Jc.z*=-1),r.envMapRotation.value.setFromMatrix4(aS.makeRotationFromEuler(Jc)),r.flipEnvMap.value=n.isCubeTexture&&n.isRenderTargetTexture===!1?-1:1,r.reflectivity.value=e.reflectivity,r.ior.value=e.ior,r.refractionRatio.value=e.refractionRatio),e.lightMap){r.lightMap.value=e.lightMap;const c=_t._useLegacyLights===!0?Math.PI:1;r.lightMapIntensity.value=e.lightMapIntensity*c,q(e.lightMap,r.lightMapTransform)}e.aoMap&&(r.aoMap.value=e.aoMap,r.aoMapIntensity.value=e.aoMapIntensity,q(e.aoMap,r.aoMapTransform))}function G(r,e){r.diffuse.value.copy(e.color),r.opacity.value=e.opacity,e.map&&(r.map.value=e.map,q(e.map,r.mapTransform))}function U(r,e){r.dashSize.value=e.dashSize,r.totalSize.value=e.dashSize+e.gapSize,r.scale.value=e.scale}function t(r,e,a,n){r.diffuse.value.copy(e.color),r.opacity.value=e.opacity,r.size.value=e.size*a,r.scale.value=n*.5,e.map&&(r.map.value=e.map,q(e.map,r.uvTransform)),e.alphaMap&&(r.alphaMap.value=e.alphaMap,q(e.alphaMap,r.alphaMapTransform)),e.alphaTest>0&&(r.alphaTest.value=e.alphaTest)}function g(r,e){r.diffuse.value.copy(e.color),r.opacity.value=e.opacity,r.rotation.value=e.rotation,e.map&&(r.map.value=e.map,q(e.map,r.mapTransform)),e.alphaMap&&(r.alphaMap.value=e.alphaMap,q(e.alphaMap,r.alphaMapTransform)),e.alphaTest>0&&(r.alphaTest.value=e.alphaTest)}function C(r,e){r.specular.value.copy(e.specular),r.shininess.value=Math.max(e.shininess,1e-4)}function i(r,e){e.gradientMap&&(r.gradientMap.value=e.gradientMap)}function S(r,e){r.metalness.value=e.metalness,e.metalnessMap&&(r.metalnessMap.value=e.metalnessMap,q(e.metalnessMap,r.metalnessMapTransform)),r.roughness.value=e.roughness,e.roughnessMap&&(r.roughnessMap.value=e.roughnessMap,q(e.roughnessMap,r.roughnessMapTransform)),e.envMap&&(r.envMapIntensity.value=e.envMapIntensity)}function x(r,e,a){r.ior.value=e.ior,e.sheen>0&&(r.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),r.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(r.sheenColorMap.value=e.sheenColorMap,q(e.sheenColorMap,r.sheenColorMapTransform)),e.sheenRoughnessMap&&(r.sheenRoughnessMap.value=e.sheenRoughnessMap,q(e.sheenRoughnessMap,r.sheenRoughnessMapTransform))),e.clearcoat>0&&(r.clearcoat.value=e.clearcoat,r.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(r.clearcoatMap.value=e.clearcoatMap,q(e.clearcoatMap,r.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,q(e.clearcoatRoughnessMap,r.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(r.clearcoatNormalMap.value=e.clearcoatNormalMap,q(e.clearcoatNormalMap,r.clearcoatNormalMapTransform),r.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===Gs&&r.clearcoatNormalScale.value.negate())),e.iridescence>0&&(r.iridescence.value=e.iridescence,r.iridescenceIOR.value=e.iridescenceIOR,r.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(r.iridescenceMap.value=e.iridescenceMap,q(e.iridescenceMap,r.iridescenceMapTransform)),e.iridescenceThicknessMap&&(r.iridescenceThicknessMap.value=e.iridescenceThicknessMap,q(e.iridescenceThicknessMap,r.iridescenceThicknessMapTransform))),e.transmission>0&&(r.transmission.value=e.transmission,r.transmissionSamplerMap.value=a.texture,r.transmissionSamplerSize.value.set(a.width,a.height),e.transmissionMap&&(r.transmissionMap.value=e.transmissionMap,q(e.transmissionMap,r.transmissionMapTransform)),r.thickness.value=e.thickness,e.thicknessMap&&(r.thicknessMap.value=e.thicknessMap,q(e.thicknessMap,r.thicknessMapTransform)),r.attenuationDistance.value=e.attenuationDistance,r.attenuationColor.value.copy(e.attenuationColor)),e.anisotropy>0&&(r.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(r.anisotropyMap.value=e.anisotropyMap,q(e.anisotropyMap,r.anisotropyMapTransform))),r.specularIntensity.value=e.specularIntensity,r.specularColor.value.copy(e.specularColor),e.specularColorMap&&(r.specularColorMap.value=e.specularColorMap,q(e.specularColorMap,r.specularColorMapTransform)),e.specularIntensityMap&&(r.specularIntensityMap.value=e.specularIntensityMap,q(e.specularIntensityMap,r.specularIntensityMapTransform))}function v(r,e){e.matcap&&(r.matcap.value=e.matcap)}function p(r,e){const a=F.get(e).light;r.referencePosition.value.setFromMatrixPosition(a.matrixWorld),r.nearDistance.value=a.shadow.camera.near,r.farDistance.value=a.shadow.camera.far}return{refreshFogUniforms:lt,refreshMaterialUniforms:Dt}}function sS(_t,F,q,lt){let Dt={},Zt={},G=[];const U=_t.getParameter(_t.MAX_UNIFORM_BUFFER_BINDINGS);function t(a,n){const f=n.program;lt.uniformBlockBinding(a,f)}function g(a,n){let f=Dt[a.id];f===void 0&&(v(a),f=C(a),Dt[a.id]=f,a.addEventListener("dispose",r));const c=n.program;lt.updateUBOMapping(a,c);const l=F.render.frame;Zt[a.id]!==l&&(S(a),Zt[a.id]=l)}function C(a){const n=i();a.__bindingPointIndex=n;const f=_t.createBuffer(),c=a.__size,l=a.usage;return _t.bindBuffer(_t.UNIFORM_BUFFER,f),_t.bufferData(_t.UNIFORM_BUFFER,c,l),_t.bindBuffer(_t.UNIFORM_BUFFER,null),_t.bindBufferBase(_t.UNIFORM_BUFFER,n,f),f}function i(){for(let a=0;a0&&(f+=c-l),a.__size=f,a.__cache={},this}function p(a){const n={boundary:0,storage:0};return typeof a=="number"||typeof a=="boolean"?(n.boundary=4,n.storage=4):a.isVector2?(n.boundary=8,n.storage=8):a.isVector3||a.isColor?(n.boundary=16,n.storage=12):a.isVector4?(n.boundary=16,n.storage=16):a.isMatrix3?(n.boundary=48,n.storage=48):a.isMatrix4?(n.boundary=64,n.storage=64):a.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",a),n}function r(a){const n=a.target;n.removeEventListener("dispose",r);const f=G.indexOf(n.__bindingPointIndex);G.splice(f,1),_t.deleteBuffer(Dt[n.id]),delete Dt[n.id],delete Zt[n.id]}function e(){for(const a in Dt)_t.deleteBuffer(Dt[a]);G=[],Dt={},Zt={}}return{bind:t,update:g,dispose:e}}class m1{constructor(F={}){const{canvas:q=t2(),context:lt=null,depth:Dt=!0,stencil:Zt=!1,alpha:G=!1,antialias:U=!1,premultipliedAlpha:t=!0,preserveDrawingBuffer:g=!1,powerPreference:C="default",failIfMajorPerformanceCaveat:i=!1}=F;this.isWebGLRenderer=!0;let S;if(lt!==null){if(typeof WebGLRenderingContext<"u"&< instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");S=lt.getContextAttributes().alpha}else S=G;const x=new Uint32Array(4),v=new Int32Array(4);let p=null,r=null;const e=[],a=[];this.domElement=q,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Iu,this._useLegacyLights=!1,this.toneMapping=dc,this.toneMappingExposure=1;const n=this;let f=!1,c=0,l=0,m=null,h=-1,b=null;const u=new No,o=new No;let d=null;const w=new ha(0);let A=0,_=q.width,y=q.height,E=1,T=null,s=null;const L=new No(0,0,_,y),M=new No(0,0,_,y);let z=!1;const D=new u1;let N=!1,I=!1;const k=new so,B=new Wi,O=new bn,H={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Y(){return m===null?E:1}let j=lt;function et(ve,Le){const ce=q.getContext(ve,Le);return ce!==null?ce:null}try{const ve={alpha:!0,depth:Dt,stencil:Zt,antialias:U,premultipliedAlpha:t,preserveDrawingBuffer:g,powerPreference:C,failIfMajorPerformanceCaveat:i};if("setAttribute"in q&&q.setAttribute("data-engine",`three.js r${W0}`),q.addEventListener("webglcontextlost",re,!1),q.addEventListener("webglcontextrestored",Kt,!1),q.addEventListener("webglcontextcreationerror",$t,!1),j===null){const Le="webgl2";if(j=et(Le,ve),j===null)throw et(Le)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(ve){throw console.error("THREE.WebGLRenderer: "+ve.message),ve}let it,ut,J,X,tt,V,Q,ot,$,Z,st,nt,ct,gt,Tt,wt,Rt,bt,At,mt,Lt,Ht,Ut,kt;function Vt(){it=new gM(j),it.init(),ut=new fM(j,it,F),Ht=new $4(j,it),J=new J4(j),X=new xM(j),tt=new k4,V=new Q4(j,it,J,tt,ut,Ht,X),Q=new hM(n),ot=new pM(n),$=new S2(j),Ut=new lM(j,$),Z=new mM(j,$,X,Ut),st=new wM(j,Z,$,X),At=new bM(j,ut,V),wt=new cM(tt),nt=new z4(n,Q,ot,it,ut,Ut,wt),ct=new oS(n,tt),gt=new N4,Tt=new W4(it),bt=new sM(n,Q,ot,J,st,S,t),Rt=new K4(n,st,ut),kt=new sS(j,X,ut,J),mt=new uM(j,it,X),Lt=new yM(j,it,X),X.programs=nt.programs,n.capabilities=ut,n.extensions=it,n.properties=tt,n.renderLists=gt,n.shadowMap=Rt,n.state=J,n.info=X}Vt();const It=new iS(n,j);this.xr=It,this.getContext=function(){return j},this.getContextAttributes=function(){return j.getContextAttributes()},this.forceContextLoss=function(){const ve=it.get("WEBGL_lose_context");ve&&ve.loseContext()},this.forceContextRestore=function(){const ve=it.get("WEBGL_lose_context");ve&&ve.restoreContext()},this.getPixelRatio=function(){return E},this.setPixelRatio=function(ve){ve!==void 0&&(E=ve,this.setSize(_,y,!1))},this.getSize=function(ve){return ve.set(_,y)},this.setSize=function(ve,Le,ce=!0){if(It.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}_=ve,y=Le,q.width=Math.floor(ve*E),q.height=Math.floor(Le*E),ce===!0&&(q.style.width=ve+"px",q.style.height=Le+"px"),this.setViewport(0,0,ve,Le)},this.getDrawingBufferSize=function(ve){return ve.set(_*E,y*E).floor()},this.setDrawingBufferSize=function(ve,Le,ce){_=ve,y=Le,E=ce,q.width=Math.floor(ve*ce),q.height=Math.floor(Le*ce),this.setViewport(0,0,ve,Le)},this.getCurrentViewport=function(ve){return ve.copy(u)},this.getViewport=function(ve){return ve.copy(L)},this.setViewport=function(ve,Le,ce,Te){ve.isVector4?L.set(ve.x,ve.y,ve.z,ve.w):L.set(ve,Le,ce,Te),J.viewport(u.copy(L).multiplyScalar(E).round())},this.getScissor=function(ve){return ve.copy(M)},this.setScissor=function(ve,Le,ce,Te){ve.isVector4?M.set(ve.x,ve.y,ve.z,ve.w):M.set(ve,Le,ce,Te),J.scissor(o.copy(M).multiplyScalar(E).round())},this.getScissorTest=function(){return z},this.setScissorTest=function(ve){J.setScissorTest(z=ve)},this.setOpaqueSort=function(ve){T=ve},this.setTransparentSort=function(ve){s=ve},this.getClearColor=function(ve){return ve.copy(bt.getClearColor())},this.setClearColor=function(){bt.setClearColor.apply(bt,arguments)},this.getClearAlpha=function(){return bt.getClearAlpha()},this.setClearAlpha=function(){bt.setClearAlpha.apply(bt,arguments)},this.clear=function(ve=!0,Le=!0,ce=!0){let Te=0;if(ve){let Be=!1;if(m!==null){const ir=m.texture.format;Be=ir===Jy||ir===Ky||ir===jy}if(Be){const ir=m.texture.type,pe=ir===pc||ir===uv||ir===Wy||ir===Jv||ir===Xy||ir===Zy,Xe=bt.getClearColor(),Ke=bt.getClearAlpha(),or=Xe.r,$e=Xe.g,ge=Xe.b;pe?(x[0]=or,x[1]=$e,x[2]=ge,x[3]=Ke,j.clearBufferuiv(j.COLOR,0,x)):(v[0]=or,v[1]=$e,v[2]=ge,v[3]=Ke,j.clearBufferiv(j.COLOR,0,v))}else Te|=j.COLOR_BUFFER_BIT}Le&&(Te|=j.DEPTH_BUFFER_BIT),ce&&(Te|=j.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),j.clear(Te)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){q.removeEventListener("webglcontextlost",re,!1),q.removeEventListener("webglcontextrestored",Kt,!1),q.removeEventListener("webglcontextcreationerror",$t,!1),gt.dispose(),Tt.dispose(),tt.dispose(),Q.dispose(),ot.dispose(),st.dispose(),Ut.dispose(),kt.dispose(),nt.dispose(),It.dispose(),It.removeEventListener("sessionstart",zt),It.removeEventListener("sessionend",Xt),Jt.stop()};function re(ve){ve.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),f=!0}function Kt(){console.log("THREE.WebGLRenderer: Context Restored."),f=!1;const ve=X.autoReset,Le=Rt.enabled,ce=Rt.autoUpdate,Te=Rt.needsUpdate,Be=Rt.type;Vt(),X.autoReset=ve,Rt.enabled=Le,Rt.autoUpdate=ce,Rt.needsUpdate=Te,Rt.type=Be}function $t(ve){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",ve.statusMessage)}function le(ve){const Le=ve.target;Le.removeEventListener("dispose",le),he(Le)}function he(ve){de(ve),tt.remove(ve)}function de(ve){const Le=tt.get(ve).programs;Le!==void 0&&(Le.forEach(function(ce){nt.releaseProgram(ce)}),ve.isShaderMaterial&&nt.releaseShaderCache(ve))}this.renderBufferDirect=function(ve,Le,ce,Te,Be,ir){Le===null&&(Le=H);const pe=Be.isMesh&&Be.matrixWorld.determinant()<0,Xe=ie(ve,Le,ce,Te,Be);J.setMaterial(Te,pe);let Ke=ce.index,or=1;if(Te.wireframe===!0){if(Ke=Z.getWireframeAttribute(ce),Ke===void 0)return;or=2}const $e=ce.drawRange,ge=ce.attributes.position;let se=$e.start*or,Ae=($e.start+$e.count)*or;ir!==null&&(se=Math.max(se,ir.start*or),Ae=Math.min(Ae,(ir.start+ir.count)*or)),Ke!==null?(se=Math.max(se,0),Ae=Math.min(Ae,Ke.count)):ge!=null&&(se=Math.max(se,0),Ae=Math.min(Ae,ge.count));const Ce=Ae-se;if(Ce<0||Ce===1/0)return;Ut.setup(Be,Te,Xe,ce,Ke);let Ie,Pe=mt;if(Ke!==null&&(Ie=$.get(Ke),Pe=Lt,Pe.setIndex(Ie)),Be.isMesh)Te.wireframe===!0?(J.setLineWidth(Te.wireframeLinewidth*Y()),Pe.setMode(j.LINES)):Pe.setMode(j.TRIANGLES);else if(Be.isLine){let ke=Te.linewidth;ke===void 0&&(ke=1),J.setLineWidth(ke*Y()),Be.isLineSegments?Pe.setMode(j.LINES):Be.isLineLoop?Pe.setMode(j.LINE_LOOP):Pe.setMode(j.LINE_STRIP)}else Be.isPoints?Pe.setMode(j.POINTS):Be.isSprite&&Pe.setMode(j.TRIANGLES);if(Be.isBatchedMesh)Pe.renderMultiDraw(Be._multiDrawStarts,Be._multiDrawCounts,Be._multiDrawCount);else if(Be.isInstancedMesh)Pe.renderInstances(se,Ce,Be.count);else if(ce.isInstancedBufferGeometry){const ke=ce._maxInstanceCount!==void 0?ce._maxInstanceCount:1/0,Ve=Math.min(ce.instanceCount,ke);Pe.renderInstances(se,Ce,Ve)}else Pe.render(se,Ce)};function xe(ve,Le,ce){ve.transparent===!0&&ve.side===yf&&ve.forceSinglePass===!1?(ve.side=Gs,ve.needsUpdate=!0,Mt(ve,Le,ce),ve.side=Nu,ve.needsUpdate=!0,Mt(ve,Le,ce),ve.side=yf):Mt(ve,Le,ce)}this.compile=function(ve,Le,ce=null){ce===null&&(ce=ve),r=Tt.get(ce),r.init(),a.push(r),ce.traverseVisible(function(Be){Be.isLight&&Be.layers.test(Le.layers)&&(r.pushLight(Be),Be.castShadow&&r.pushShadow(Be))}),ve!==ce&&ve.traverseVisible(function(Be){Be.isLight&&Be.layers.test(Le.layers)&&(r.pushLight(Be),Be.castShadow&&r.pushShadow(Be))}),r.setupLights(n._useLegacyLights);const Te=new Set;return ve.traverse(function(Be){const ir=Be.material;if(ir)if(Array.isArray(ir))for(let pe=0;pe{function ir(){if(Te.forEach(function(pe){tt.get(pe).currentProgram.isReady()&&Te.delete(pe)}),Te.size===0){Be(ve);return}setTimeout(ir,10)}it.get("KHR_parallel_shader_compile")!==null?ir():setTimeout(ir,10)})};let Se=null;function ne(ve){Se&&Se(ve)}function zt(){Jt.stop()}function Xt(){Jt.start()}const Jt=new f1;Jt.setAnimationLoop(ne),typeof self<"u"&&Jt.setContext(self),this.setAnimationLoop=function(ve){Se=ve,It.setAnimationLoop(ve),ve===null?Jt.stop():Jt.start()},It.addEventListener("sessionstart",zt),It.addEventListener("sessionend",Xt),this.render=function(ve,Le){if(Le!==void 0&&Le.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(f===!0)return;ve.matrixWorldAutoUpdate===!0&&ve.updateMatrixWorld(),Le.parent===null&&Le.matrixWorldAutoUpdate===!0&&Le.updateMatrixWorld(),It.enabled===!0&&It.isPresenting===!0&&(It.cameraAutoUpdate===!0&&It.updateCamera(Le),Le=It.getCamera()),ve.isScene===!0&&ve.onBeforeRender(n,ve,Le,m),r=Tt.get(ve,a.length),r.init(),a.push(r),k.multiplyMatrices(Le.projectionMatrix,Le.matrixWorldInverse),D.setFromProjectionMatrix(k),I=this.localClippingEnabled,N=wt.init(this.clippingPlanes,I),p=gt.get(ve,e.length),p.init(),e.push(p),Wt(ve,Le,0,n.sortObjects),p.finish(),n.sortObjects===!0&&p.sort(T,s),this.info.render.frame++,N===!0&&wt.beginShadows();const ce=r.state.shadowsArray;if(Rt.render(ce,ve,Le),N===!0&&wt.endShadows(),this.info.autoReset===!0&&this.info.reset(),(It.enabled===!1||It.isPresenting===!1||It.hasDepthSensing()===!1)&&bt.render(p,ve),r.setupLights(n._useLegacyLights),Le.isArrayCamera){const Te=Le.cameras;for(let Be=0,ir=Te.length;Be0?r=a[a.length-1]:r=null,e.pop(),e.length>0?p=e[e.length-1]:p=null};function Wt(ve,Le,ce,Te){if(ve.visible===!1)return;if(ve.layers.test(Le.layers)){if(ve.isGroup)ce=ve.renderOrder;else if(ve.isLOD)ve.autoUpdate===!0&&ve.update(Le);else if(ve.isLight)r.pushLight(ve),ve.castShadow&&r.pushShadow(ve);else if(ve.isSprite){if(!ve.frustumCulled||D.intersectsSprite(ve)){Te&&O.setFromMatrixPosition(ve.matrixWorld).applyMatrix4(k);const pe=st.update(ve),Xe=ve.material;Xe.visible&&p.push(ve,pe,Xe,ce,O.z,null)}}else if((ve.isMesh||ve.isLine||ve.isPoints)&&(!ve.frustumCulled||D.intersectsObject(ve))){const pe=st.update(ve),Xe=ve.material;if(Te&&(ve.boundingSphere!==void 0?(ve.boundingSphere===null&&ve.computeBoundingSphere(),O.copy(ve.boundingSphere.center)):(pe.boundingSphere===null&&pe.computeBoundingSphere(),O.copy(pe.boundingSphere.center)),O.applyMatrix4(ve.matrixWorld).applyMatrix4(k)),Array.isArray(Xe)){const Ke=pe.groups;for(let or=0,$e=Ke.length;or<$e;or++){const ge=Ke[or],se=Xe[ge.materialIndex];se&&se.visible&&p.push(ve,pe,se,ce,O.z,ge)}}else Xe.visible&&p.push(ve,pe,Xe,ce,O.z,null)}}const ir=ve.children;for(let pe=0,Xe=ir.length;pe0&&xt(Be,ir,Le,ce),Te&&J.viewport(u.copy(Te)),Be.length>0&&yt(Be,Le,ce),ir.length>0&&yt(ir,Le,ce),pe.length>0&&yt(pe,Le,ce),J.buffers.depth.setTest(!0),J.buffers.depth.setMask(!0),J.buffers.color.setMask(!0),J.setPolygonOffset(!1)}function xt(ve,Le,ce,Te){if((ce.isScene===!0?ce.overrideMaterial:null)!==null)return;if(r.state.transmissionRenderTarget===null){r.state.transmissionRenderTarget=new rh(1,1,{generateMipmaps:!0,type:it.has("EXT_color_buffer_half_float")||it.has("EXT_color_buffer_float")?op:pc,minFilter:eh,samples:4,stencilBuffer:Zt});const or=tt.get(r.state.transmissionRenderTarget);or.__isTransmissionRenderTarget=!0}const ir=r.state.transmissionRenderTarget;n.getDrawingBufferSize(B),ir.setSize(B.x,B.y);const pe=n.getRenderTarget();n.setRenderTarget(ir),n.getClearColor(w),A=n.getClearAlpha(),A<1&&n.setClearColor(16777215,.5),n.clear();const Xe=n.toneMapping;n.toneMapping=dc,yt(ve,ce,Te),V.updateMultisampleRenderTarget(ir),V.updateRenderTargetMipmap(ir);let Ke=!1;for(let or=0,$e=Le.length;or<$e;or++){const ge=Le[or],se=ge.object,Ae=ge.geometry,Ce=ge.material,Ie=ge.group;if(Ce.side===yf&&se.layers.test(Te.layers)){const Pe=Ce.side;Ce.side=Gs,Ce.needsUpdate=!0,Et(se,ce,Te,Ae,Ce,Ie),Ce.side=Pe,Ce.needsUpdate=!0,Ke=!0}}Ke===!0&&(V.updateMultisampleRenderTarget(ir),V.updateRenderTargetMipmap(ir)),n.setRenderTarget(pe),n.setClearColor(w,A),n.toneMapping=Xe}function yt(ve,Le,ce){const Te=Le.isScene===!0?Le.overrideMaterial:null;for(let Be=0,ir=ve.length;Be0),ge=!!ce.morphAttributes.position,se=!!ce.morphAttributes.normal,Ae=!!ce.morphAttributes.color;let Ce=dc;Te.toneMapped&&(m===null||m.isXRRenderTarget===!0)&&(Ce=n.toneMapping);const Ie=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,Pe=Ie!==void 0?Ie.length:0,ke=tt.get(Te),Ve=r.state.lights;if(N===!0&&(I===!0||ve!==b)){const Qe=ve===b&&Te.id===h;wt.setState(Te,ve,Qe)}let Je=!1;Te.version===ke.__version?(ke.needsLights&&ke.lightsStateVersion!==Ve.state.version||ke.outputColorSpace!==Xe||Be.isBatchedMesh&&ke.batching===!1||!Be.isBatchedMesh&&ke.batching===!0||Be.isInstancedMesh&&ke.instancing===!1||!Be.isInstancedMesh&&ke.instancing===!0||Be.isSkinnedMesh&&ke.skinning===!1||!Be.isSkinnedMesh&&ke.skinning===!0||Be.isInstancedMesh&&ke.instancingColor===!0&&Be.instanceColor===null||Be.isInstancedMesh&&ke.instancingColor===!1&&Be.instanceColor!==null||Be.isInstancedMesh&&ke.instancingMorph===!0&&Be.morphTexture===null||Be.isInstancedMesh&&ke.instancingMorph===!1&&Be.morphTexture!==null||ke.envMap!==Ke||Te.fog===!0&&ke.fog!==ir||ke.numClippingPlanes!==void 0&&(ke.numClippingPlanes!==wt.numPlanes||ke.numIntersection!==wt.numIntersection)||ke.vertexAlphas!==or||ke.vertexTangents!==$e||ke.morphTargets!==ge||ke.morphNormals!==se||ke.morphColors!==Ae||ke.toneMapping!==Ce||ke.morphTargetsCount!==Pe)&&(Je=!0):(Je=!0,ke.__version=Te.version);let ur=ke.currentProgram;Je===!0&&(ur=Mt(Te,Le,Be));let hr=!1,vr=!1,Yt=!1;const Gt=ur.getUniforms(),Ne=ke.uniforms;if(J.useProgram(ur.program)&&(hr=!0,vr=!0,Yt=!0),Te.id!==h&&(h=Te.id,vr=!0),hr||b!==ve){Gt.setValue(j,"projectionMatrix",ve.projectionMatrix),Gt.setValue(j,"viewMatrix",ve.matrixWorldInverse);const Qe=Gt.map.cameraPosition;Qe!==void 0&&Qe.setValue(j,O.setFromMatrixPosition(ve.matrixWorld)),ut.logarithmicDepthBuffer&&Gt.setValue(j,"logDepthBufFC",2/(Math.log(ve.far+1)/Math.LN2)),(Te.isMeshPhongMaterial||Te.isMeshToonMaterial||Te.isMeshLambertMaterial||Te.isMeshBasicMaterial||Te.isMeshStandardMaterial||Te.isShaderMaterial)&&Gt.setValue(j,"isOrthographic",ve.isOrthographicCamera===!0),b!==ve&&(b=ve,vr=!0,Yt=!0)}if(Be.isSkinnedMesh){Gt.setOptional(j,Be,"bindMatrix"),Gt.setOptional(j,Be,"bindMatrixInverse");const Qe=Be.skeleton;Qe&&(Qe.boneTexture===null&&Qe.computeBoneTexture(),Gt.setValue(j,"boneTexture",Qe.boneTexture,V))}Be.isBatchedMesh&&(Gt.setOptional(j,Be,"batchingTexture"),Gt.setValue(j,"batchingTexture",Be._matricesTexture,V));const Oe=ce.morphAttributes;if((Oe.position!==void 0||Oe.normal!==void 0||Oe.color!==void 0)&&At.update(Be,ce,ur),(vr||ke.receiveShadow!==Be.receiveShadow)&&(ke.receiveShadow=Be.receiveShadow,Gt.setValue(j,"receiveShadow",Be.receiveShadow)),Te.isMeshGouraudMaterial&&Te.envMap!==null&&(Ne.envMap.value=Ke,Ne.flipEnvMap.value=Ke.isCubeTexture&&Ke.isRenderTargetTexture===!1?-1:1),Te.isMeshStandardMaterial&&Te.envMap===null&&Le.environment!==null&&(Ne.envMapIntensity.value=Le.environmentIntensity),vr&&(Gt.setValue(j,"toneMappingExposure",n.toneMappingExposure),ke.needsLights&&me(Ne,Yt),ir&&Te.fog===!0&&ct.refreshFogUniforms(Ne,ir),ct.refreshMaterialUniforms(Ne,Te,E,y,r.state.transmissionRenderTarget),ip.upload(j,Nt(ke),Ne,V)),Te.isShaderMaterial&&Te.uniformsNeedUpdate===!0&&(ip.upload(j,Nt(ke),Ne,V),Te.uniformsNeedUpdate=!1),Te.isSpriteMaterial&&Gt.setValue(j,"center",Be.center),Gt.setValue(j,"modelViewMatrix",Be.modelViewMatrix),Gt.setValue(j,"normalMatrix",Be.normalMatrix),Gt.setValue(j,"modelMatrix",Be.matrixWorld),Te.isShaderMaterial||Te.isRawShaderMaterial){const Qe=Te.uniformsGroups;for(let er=0,fr=Qe.length;er0&&V.useMultisampledRTT(ve)===!1?Be=tt.get(ve).__webglMultisampledFramebuffer:Array.isArray($e)?Be=$e[ce]:Be=$e,u.copy(ve.viewport),o.copy(ve.scissor),d=ve.scissorTest}else u.copy(L).multiplyScalar(E).floor(),o.copy(M).multiplyScalar(E).floor(),d=z;if(J.bindFramebuffer(j.FRAMEBUFFER,Be)&&Te&&J.drawBuffers(ve,Be),J.viewport(u),J.scissor(o),J.setScissorTest(d),ir){const Ke=tt.get(ve.texture);j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_CUBE_MAP_POSITIVE_X+Le,Ke.__webglTexture,ce)}else if(pe){const Ke=tt.get(ve.texture),or=Le||0;j.framebufferTextureLayer(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,Ke.__webglTexture,ce||0,or)}h=-1},this.readRenderTargetPixels=function(ve,Le,ce,Te,Be,ir,pe){if(!(ve&&ve.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Xe=tt.get(ve).__webglFramebuffer;if(ve.isWebGLCubeRenderTarget&&pe!==void 0&&(Xe=Xe[pe]),Xe){J.bindFramebuffer(j.FRAMEBUFFER,Xe);try{const Ke=ve.texture,or=Ke.format,$e=Ke.type;if(or!==zu&&Ht.convert(or)!==j.getParameter(j.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ge=$e===op&&(it.has("EXT_color_buffer_half_float")||it.has("EXT_color_buffer_float"));if($e!==pc&&Ht.convert($e)!==j.getParameter(j.IMPLEMENTATION_COLOR_READ_TYPE)&&$e!==hc&&!ge){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Le>=0&&Le<=ve.width-Te&&ce>=0&&ce<=ve.height-Be&&j.readPixels(Le,ce,Te,Be,Ht.convert(or),Ht.convert($e),ir)}finally{const Ke=m!==null?tt.get(m).__webglFramebuffer:null;J.bindFramebuffer(j.FRAMEBUFFER,Ke)}}},this.copyFramebufferToTexture=function(ve,Le,ce=0){const Te=Math.pow(2,-ce),Be=Math.floor(Le.image.width*Te),ir=Math.floor(Le.image.height*Te);V.setTexture2D(Le,0),j.copyTexSubImage2D(j.TEXTURE_2D,ce,0,0,ve.x,ve.y,Be,ir),J.unbindTexture()},this.copyTextureToTexture=function(ve,Le,ce,Te=0){const Be=Le.image.width,ir=Le.image.height,pe=Ht.convert(ce.format),Xe=Ht.convert(ce.type);V.setTexture2D(ce,0),j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,ce.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ce.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,ce.unpackAlignment),Le.isDataTexture?j.texSubImage2D(j.TEXTURE_2D,Te,ve.x,ve.y,Be,ir,pe,Xe,Le.image.data):Le.isCompressedTexture?j.compressedTexSubImage2D(j.TEXTURE_2D,Te,ve.x,ve.y,Le.mipmaps[0].width,Le.mipmaps[0].height,pe,Le.mipmaps[0].data):j.texSubImage2D(j.TEXTURE_2D,Te,ve.x,ve.y,pe,Xe,Le.image),Te===0&&ce.generateMipmaps&&j.generateMipmap(j.TEXTURE_2D),J.unbindTexture()},this.copyTextureToTexture3D=function(ve,Le,ce,Te,Be=0){const ir=Math.round(ve.max.x-ve.min.x),pe=Math.round(ve.max.y-ve.min.y),Xe=ve.max.z-ve.min.z+1,Ke=Ht.convert(Te.format),or=Ht.convert(Te.type);let $e;if(Te.isData3DTexture)V.setTexture3D(Te,0),$e=j.TEXTURE_3D;else if(Te.isDataArrayTexture||Te.isCompressedArrayTexture)V.setTexture2DArray(Te,0),$e=j.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,Te.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Te.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,Te.unpackAlignment);const ge=j.getParameter(j.UNPACK_ROW_LENGTH),se=j.getParameter(j.UNPACK_IMAGE_HEIGHT),Ae=j.getParameter(j.UNPACK_SKIP_PIXELS),Ce=j.getParameter(j.UNPACK_SKIP_ROWS),Ie=j.getParameter(j.UNPACK_SKIP_IMAGES),Pe=ce.isCompressedTexture?ce.mipmaps[Be]:ce.image;j.pixelStorei(j.UNPACK_ROW_LENGTH,Pe.width),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,Pe.height),j.pixelStorei(j.UNPACK_SKIP_PIXELS,ve.min.x),j.pixelStorei(j.UNPACK_SKIP_ROWS,ve.min.y),j.pixelStorei(j.UNPACK_SKIP_IMAGES,ve.min.z),ce.isDataTexture||ce.isData3DTexture?j.texSubImage3D($e,Be,Le.x,Le.y,Le.z,ir,pe,Xe,Ke,or,Pe.data):Te.isCompressedArrayTexture?j.compressedTexSubImage3D($e,Be,Le.x,Le.y,Le.z,ir,pe,Xe,Ke,Pe.data):j.texSubImage3D($e,Be,Le.x,Le.y,Le.z,ir,pe,Xe,Ke,or,Pe),j.pixelStorei(j.UNPACK_ROW_LENGTH,ge),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,se),j.pixelStorei(j.UNPACK_SKIP_PIXELS,Ae),j.pixelStorei(j.UNPACK_SKIP_ROWS,Ce),j.pixelStorei(j.UNPACK_SKIP_IMAGES,Ie),Be===0&&Te.generateMipmaps&&j.generateMipmap($e),J.unbindTexture()},this.initTexture=function(ve){ve.isCubeTexture?V.setTextureCube(ve,0):ve.isData3DTexture?V.setTexture3D(ve,0):ve.isDataArrayTexture||ve.isCompressedArrayTexture?V.setTexture2DArray(ve,0):V.setTexture2D(ve,0),J.unbindTexture()},this.resetState=function(){c=0,l=0,m=null,J.reset(),Ut.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return xf}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(F){this._outputColorSpace=F;const q=this.getContext();q.drawingBufferColorSpace=F===Y0?"display-p3":"srgb",q.unpackColorSpace=Fa.workingColorSpace===dp?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(F){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=F}}class y1 extends Bo{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Ss,this.environmentIntensity=1,this.environmentRotation=new Ss,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(F,q){return super.copy(F,q),F.background!==null&&(this.background=F.background.clone()),F.environment!==null&&(this.environment=F.environment.clone()),F.fog!==null&&(this.fog=F.fog.clone()),this.backgroundBlurriness=F.backgroundBlurriness,this.backgroundIntensity=F.backgroundIntensity,this.backgroundRotation.copy(F.backgroundRotation),this.environmentIntensity=F.environmentIntensity,this.environmentRotation.copy(F.environmentRotation),F.overrideMaterial!==null&&(this.overrideMaterial=F.overrideMaterial.clone()),this.matrixAutoUpdate=F.matrixAutoUpdate,this}toJSON(F){const q=super.toJSON(F);return this.fog!==null&&(q.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(q.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(q.object.backgroundIntensity=this.backgroundIntensity),q.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(q.object.environmentIntensity=this.environmentIntensity),q.object.environmentRotation=this.environmentRotation.toArray(),q}}class lS{constructor(F,q){this.isInterleavedBuffer=!0,this.array=F,this.stride=q,this.count=F!==void 0?F.length/q:0,this.usage=B0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=bf()}onUploadCallback(){}set needsUpdate(F){F===!0&&this.version++}get updateRange(){return t1("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(F){return this.usage=F,this}addUpdateRange(F,q){this.updateRanges.push({start:F,count:q})}clearUpdateRanges(){this.updateRanges.length=0}copy(F){return this.array=new F.array.constructor(F.array),this.count=F.count,this.stride=F.stride,this.usage=F.usage,this}copyAt(F,q,lt){F*=this.stride,lt*=q.stride;for(let Dt=0,Zt=this.stride;DtF.far||q.push({distance:t,point:Hv.clone(),uv:hu.getInterpolation(Hv,Qd,Gv,$d,Ay,L0,My,new Wi),face:null,object:this})}copy(F,q){return super.copy(F,q),F.center!==void 0&&this.center.copy(F.center),this.material=F.material,this}}function qd(_t,F,q,lt,Dt,Zt){qh.subVectors(_t,q).addScalar(.5).multiply(lt),Dt!==void 0?(Vv.x=Zt*qh.x-Dt*qh.y,Vv.y=Dt*qh.x+Zt*qh.y):Vv.copy(qh),_t.copy(F),_t.x+=Vv.x,_t.y+=Vv.y,_t.applyMatrix4(b1)}class yp extends ih{constructor(F){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new ha(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(F)}copy(F){return super.copy(F),this.color.copy(F.color),this.map=F.map,this.linewidth=F.linewidth,this.linecap=F.linecap,this.linejoin=F.linejoin,this.fog=F.fog,this}}const Sy=new bn,Ey=new bn,_y=new so,P0=new qv,tp=new $v;class uS extends Bo{constructor(F=new Ys,q=new yp){super(),this.isLine=!0,this.type="Line",this.geometry=F,this.material=q,this.updateMorphTargets()}copy(F,q){return super.copy(F,q),this.material=Array.isArray(F.material)?F.material.slice():F.material,this.geometry=F.geometry,this}computeLineDistances(){const F=this.geometry;if(F.index===null){const q=F.attributes.position,lt=[0];for(let Dt=1,Zt=q.count;Dtt)continue;S.applyMatrix4(this.matrixWorld);const h=F.ray.origin.distanceTo(S);hF.far||q.push({distance:h,point:i.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{const e=Math.max(0,G.start),a=Math.min(r.count,G.start+G.count);for(let n=e,f=a-1;nt)continue;S.applyMatrix4(this.matrixWorld);const l=F.ray.origin.distanceTo(S);lF.far||q.push({distance:l,point:i.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const q=this.geometry.morphAttributes,lt=Object.keys(q);if(lt.length>0){const Dt=q[lt[0]];if(Dt!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Zt=0,G=Dt.length;Zt0){const Dt=q[lt[0]];if(Dt!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Zt=0,G=Dt.length;ZtDt.far)return;Zt.push({distance:g,distanceToRay:Math.sqrt(U),point:t,index:F,face:null,object:G})}}class cS extends Es{constructor(F,q,lt,Dt,Zt,G,U,t,g){super(F,q,lt,Dt,Zt,G,U,t,g),this.isCanvasTexture=!0,this.needsUpdate=!0}}class xp extends Ys{constructor(F=1,q=32,lt=16,Dt=0,Zt=Math.PI*2,G=0,U=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:F,widthSegments:q,heightSegments:lt,phiStart:Dt,phiLength:Zt,thetaStart:G,thetaLength:U},q=Math.max(3,Math.floor(q)),lt=Math.max(2,Math.floor(lt));const t=Math.min(G+U,Math.PI);let g=0;const C=[],i=new bn,S=new bn,x=[],v=[],p=[],r=[];for(let e=0;e<=lt;e++){const a=[],n=e/lt;let f=0;e===0&&G===0?f=.5/q:e===lt&&t===Math.PI&&(f=-.5/q);for(let c=0;c<=q;c++){const l=c/q;i.x=-F*Math.cos(Dt+l*Zt)*Math.sin(G+n*U),i.y=F*Math.cos(G+n*U),i.z=F*Math.sin(Dt+l*Zt)*Math.sin(G+n*U),v.push(i.x,i.y,i.z),S.copy(i).normalize(),p.push(S.x,S.y,S.z),r.push(l+f,1-n),a.push(g++)}C.push(a)}for(let e=0;e0)&&x.push(n,f,l),(e!==lt-1||tF.clone()))}}class IS{constructor(F=new S1){this.force=F}simulate(F,q){const lt=q.bodies.map(Zt=>{const G=this.rateUpdate(Zt.velocity,Zt.acceleration,F);return Zt.clone(this.rateUpdate(Zt.position,G,F),G)}),Dt=this.force.getForces(lt);return lt.forEach((Zt,G)=>{Zt.acceleration=Dt[G].divideScalar(Zt.mass)}),new bp(lt)}rateUpdate(F,q,lt){return q.clone().multiplyScalar(lt).add(F)}}class FS{constructor(F=new S1,q=[1,2,2,1]){if(this.force=F,q.length!==4)throw new Error("Weights for RK4 must be of length 4");this.weights=q}simulate(F,q){let lt=q.bodies.map(S=>({kv:[S.acceleration.clone()],kx:[S.velocity.clone()]}));const Dt=this.getInterKV(q.bodies,lt,0,F/2),Zt=this.getInterKX(q.bodies,lt,0,F/2);lt.forEach((S,x)=>{S.kv.push(Dt[x]),S.kx.push(Zt[x])});const G=this.getInterKV(q.bodies,lt,1,F/2),U=this.getInterKX(q.bodies,lt,1,F/2);lt.forEach((S,x)=>{S.kv.push(G[x]),S.kx.push(U[x])});const t=this.getInterKV(q.bodies,lt,2,F),g=this.getInterKX(q.bodies,lt,2,F);lt.forEach((S,x)=>{S.kv.push(t[x]),S.kx.push(g[x])});const C=q.bodies.map((S,x)=>{const v=new bn,p=new bn;return lt[x].kx.forEach((r,e)=>{v.add(r.multiplyScalar(this.weights[e]))}),lt[x].kv.forEach((r,e)=>{p.add(r.multiplyScalar(this.weights[e]))}),S.clone(v.multiplyScalar(F/6).add(S.position),p.multiplyScalar(F/6).add(S.velocity))}),i=this.force.getForces(C);return C.forEach((S,x)=>{S.acceleration=i[x].divideScalar(S.mass)}),new bp(C)}getInterKV(F,q,lt,Dt){let Zt=F.map((G,U)=>{let t=G.clone();return t.position.add(q[U].kx[lt].clone().multiplyScalar(Dt)),t});return this.force.getForces(Zt).map((G,U)=>G.divideScalar(F[U].mass))}getInterKX(F,q,lt,Dt){return F.map((Zt,G)=>Zt.velocity.clone().add(q[G].kv[lt].clone().multiplyScalar(Dt)))}}/** +}`;class rS{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(F,q,lt){if(this.texture===null){const Dt=new Es,Zt=F.properties.get(Dt);Zt.__webglTexture=q.texture,(q.depthNear!=lt.depthNear||q.depthFar!=lt.depthFar)&&(this.depthNear=q.depthNear,this.depthFar=q.depthFar),this.texture=Dt}}render(F,q){if(this.texture!==null){if(this.mesh===null){const lt=q.cameras[0].viewport,Dt=new gc({vertexShader:tS,fragmentShader:eS,uniforms:{depthColor:{value:this.texture},depthWidth:{value:lt.z},depthHeight:{value:lt.w}}});this.mesh=new Vs(new dp(20,20),Dt)}F.render(this.mesh,q)}}reset(){this.texture=null,this.mesh=null}}class nS extends nh{constructor(F,q){super();const lt=this;let Dt=null,Zt=1,G=null,U="local-floor",t=1,g=null,C=null,i=null,S=null,x=null,h=null;const p=new rS,r=q.getContextAttributes();let e=null,a=null;const n=[],f=[],c=new Wi;let l=null;const m=new uu;m.layers.enable(1),m.viewport=new No;const v=new uu;v.layers.enable(2),v.viewport=new No;const b=[m,v],u=new $4;u.layers.enable(1),u.layers.enable(2);let o=null,d=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(N){let I=n[N];return I===void 0&&(I=new _0,n[N]=I),I.getTargetRaySpace()},this.getControllerGrip=function(N){let I=n[N];return I===void 0&&(I=new _0,n[N]=I),I.getGripSpace()},this.getHand=function(N){let I=n[N];return I===void 0&&(I=new _0,n[N]=I),I.getHandSpace()};function w(N){const I=f.indexOf(N.inputSource);if(I===-1)return;const k=n[I];k!==void 0&&(k.update(N.inputSource,N.frame,g||G),k.dispatchEvent({type:N.type,data:N.inputSource}))}function A(){Dt.removeEventListener("select",w),Dt.removeEventListener("selectstart",w),Dt.removeEventListener("selectend",w),Dt.removeEventListener("squeeze",w),Dt.removeEventListener("squeezestart",w),Dt.removeEventListener("squeezeend",w),Dt.removeEventListener("end",A),Dt.removeEventListener("inputsourceschange",_);for(let N=0;N=0&&(f[B]=null,n[B].disconnect(k))}for(let I=0;I=f.length){f.push(k),B=H;break}else if(f[H]===null){f[H]=k,B=H;break}if(B===-1)break}const O=n[B];O&&O.connect(k)}}const y=new bn,E=new bn;function T(N,I,k){y.setFromMatrixPosition(I.matrixWorld),E.setFromMatrixPosition(k.matrixWorld);const B=y.distanceTo(E),O=I.projectionMatrix.elements,H=k.projectionMatrix.elements,Y=O[14]/(O[10]-1),j=O[14]/(O[10]+1),et=(O[9]+1)/O[5],it=(O[9]-1)/O[5],ut=(O[8]-1)/O[0],J=(H[8]+1)/H[0],X=Y*ut,tt=Y*J,V=B/(-ut+J),Q=V*-ut;I.matrixWorld.decompose(N.position,N.quaternion,N.scale),N.translateX(Q),N.translateZ(V),N.matrixWorld.compose(N.position,N.quaternion,N.scale),N.matrixWorldInverse.copy(N.matrixWorld).invert();const ot=Y+V,$=j+V,Z=X-Q,st=tt+(B-Q),nt=et*j/$*ot,ct=it*j/$*ot;N.projectionMatrix.makePerspective(Z,st,nt,ct,ot,$),N.projectionMatrixInverse.copy(N.projectionMatrix).invert()}function s(N,I){I===null?N.matrixWorld.copy(N.matrix):N.matrixWorld.multiplyMatrices(I.matrixWorld,N.matrix),N.matrixWorldInverse.copy(N.matrixWorld).invert()}this.updateCamera=function(N){if(Dt===null)return;p.texture!==null&&(N.near=p.depthNear,N.far=p.depthFar),u.near=v.near=m.near=N.near,u.far=v.far=m.far=N.far,(o!==u.near||d!==u.far)&&(Dt.updateRenderState({depthNear:u.near,depthFar:u.far}),o=u.near,d=u.far,m.near=o,m.far=d,v.near=o,v.far=d,m.updateProjectionMatrix(),v.updateProjectionMatrix(),N.updateProjectionMatrix());const I=N.parent,k=u.cameras;s(u,I);for(let B=0;B0&&(r.alphaTest.value=e.alphaTest);const a=F.get(e),n=a.envMap,f=a.envMapRotation;if(n&&(r.envMap.value=n,Jc.copy(f),Jc.x*=-1,Jc.y*=-1,Jc.z*=-1,n.isCubeTexture&&n.isRenderTargetTexture===!1&&(Jc.y*=-1,Jc.z*=-1),r.envMapRotation.value.setFromMatrix4(iS.makeRotationFromEuler(Jc)),r.flipEnvMap.value=n.isCubeTexture&&n.isRenderTargetTexture===!1?-1:1,r.reflectivity.value=e.reflectivity,r.ior.value=e.ior,r.refractionRatio.value=e.refractionRatio),e.lightMap){r.lightMap.value=e.lightMap;const c=_t._useLegacyLights===!0?Math.PI:1;r.lightMapIntensity.value=e.lightMapIntensity*c,q(e.lightMap,r.lightMapTransform)}e.aoMap&&(r.aoMap.value=e.aoMap,r.aoMapIntensity.value=e.aoMapIntensity,q(e.aoMap,r.aoMapTransform))}function G(r,e){r.diffuse.value.copy(e.color),r.opacity.value=e.opacity,e.map&&(r.map.value=e.map,q(e.map,r.mapTransform))}function U(r,e){r.dashSize.value=e.dashSize,r.totalSize.value=e.dashSize+e.gapSize,r.scale.value=e.scale}function t(r,e,a,n){r.diffuse.value.copy(e.color),r.opacity.value=e.opacity,r.size.value=e.size*a,r.scale.value=n*.5,e.map&&(r.map.value=e.map,q(e.map,r.uvTransform)),e.alphaMap&&(r.alphaMap.value=e.alphaMap,q(e.alphaMap,r.alphaMapTransform)),e.alphaTest>0&&(r.alphaTest.value=e.alphaTest)}function g(r,e){r.diffuse.value.copy(e.color),r.opacity.value=e.opacity,r.rotation.value=e.rotation,e.map&&(r.map.value=e.map,q(e.map,r.mapTransform)),e.alphaMap&&(r.alphaMap.value=e.alphaMap,q(e.alphaMap,r.alphaMapTransform)),e.alphaTest>0&&(r.alphaTest.value=e.alphaTest)}function C(r,e){r.specular.value.copy(e.specular),r.shininess.value=Math.max(e.shininess,1e-4)}function i(r,e){e.gradientMap&&(r.gradientMap.value=e.gradientMap)}function S(r,e){r.metalness.value=e.metalness,e.metalnessMap&&(r.metalnessMap.value=e.metalnessMap,q(e.metalnessMap,r.metalnessMapTransform)),r.roughness.value=e.roughness,e.roughnessMap&&(r.roughnessMap.value=e.roughnessMap,q(e.roughnessMap,r.roughnessMapTransform)),e.envMap&&(r.envMapIntensity.value=e.envMapIntensity)}function x(r,e,a){r.ior.value=e.ior,e.sheen>0&&(r.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),r.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(r.sheenColorMap.value=e.sheenColorMap,q(e.sheenColorMap,r.sheenColorMapTransform)),e.sheenRoughnessMap&&(r.sheenRoughnessMap.value=e.sheenRoughnessMap,q(e.sheenRoughnessMap,r.sheenRoughnessMapTransform))),e.clearcoat>0&&(r.clearcoat.value=e.clearcoat,r.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(r.clearcoatMap.value=e.clearcoatMap,q(e.clearcoatMap,r.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,q(e.clearcoatRoughnessMap,r.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(r.clearcoatNormalMap.value=e.clearcoatNormalMap,q(e.clearcoatNormalMap,r.clearcoatNormalMapTransform),r.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===Gs&&r.clearcoatNormalScale.value.negate())),e.iridescence>0&&(r.iridescence.value=e.iridescence,r.iridescenceIOR.value=e.iridescenceIOR,r.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(r.iridescenceMap.value=e.iridescenceMap,q(e.iridescenceMap,r.iridescenceMapTransform)),e.iridescenceThicknessMap&&(r.iridescenceThicknessMap.value=e.iridescenceThicknessMap,q(e.iridescenceThicknessMap,r.iridescenceThicknessMapTransform))),e.transmission>0&&(r.transmission.value=e.transmission,r.transmissionSamplerMap.value=a.texture,r.transmissionSamplerSize.value.set(a.width,a.height),e.transmissionMap&&(r.transmissionMap.value=e.transmissionMap,q(e.transmissionMap,r.transmissionMapTransform)),r.thickness.value=e.thickness,e.thicknessMap&&(r.thicknessMap.value=e.thicknessMap,q(e.thicknessMap,r.thicknessMapTransform)),r.attenuationDistance.value=e.attenuationDistance,r.attenuationColor.value.copy(e.attenuationColor)),e.anisotropy>0&&(r.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(r.anisotropyMap.value=e.anisotropyMap,q(e.anisotropyMap,r.anisotropyMapTransform))),r.specularIntensity.value=e.specularIntensity,r.specularColor.value.copy(e.specularColor),e.specularColorMap&&(r.specularColorMap.value=e.specularColorMap,q(e.specularColorMap,r.specularColorMapTransform)),e.specularIntensityMap&&(r.specularIntensityMap.value=e.specularIntensityMap,q(e.specularIntensityMap,r.specularIntensityMapTransform))}function h(r,e){e.matcap&&(r.matcap.value=e.matcap)}function p(r,e){const a=F.get(e).light;r.referencePosition.value.setFromMatrixPosition(a.matrixWorld),r.nearDistance.value=a.shadow.camera.near,r.farDistance.value=a.shadow.camera.far}return{refreshFogUniforms:lt,refreshMaterialUniforms:Dt}}function oS(_t,F,q,lt){let Dt={},Zt={},G=[];const U=_t.getParameter(_t.MAX_UNIFORM_BUFFER_BINDINGS);function t(a,n){const f=n.program;lt.uniformBlockBinding(a,f)}function g(a,n){let f=Dt[a.id];f===void 0&&(h(a),f=C(a),Dt[a.id]=f,a.addEventListener("dispose",r));const c=n.program;lt.updateUBOMapping(a,c);const l=F.render.frame;Zt[a.id]!==l&&(S(a),Zt[a.id]=l)}function C(a){const n=i();a.__bindingPointIndex=n;const f=_t.createBuffer(),c=a.__size,l=a.usage;return _t.bindBuffer(_t.UNIFORM_BUFFER,f),_t.bufferData(_t.UNIFORM_BUFFER,c,l),_t.bindBuffer(_t.UNIFORM_BUFFER,null),_t.bindBufferBase(_t.UNIFORM_BUFFER,n,f),f}function i(){for(let a=0;a0&&(f+=c-l),a.__size=f,a.__cache={},this}function p(a){const n={boundary:0,storage:0};return typeof a=="number"||typeof a=="boolean"?(n.boundary=4,n.storage=4):a.isVector2?(n.boundary=8,n.storage=8):a.isVector3||a.isColor?(n.boundary=16,n.storage=12):a.isVector4?(n.boundary=16,n.storage=16):a.isMatrix3?(n.boundary=48,n.storage=48):a.isMatrix4?(n.boundary=64,n.storage=64):a.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",a),n}function r(a){const n=a.target;n.removeEventListener("dispose",r);const f=G.indexOf(n.__bindingPointIndex);G.splice(f,1),_t.deleteBuffer(Dt[n.id]),delete Dt[n.id],delete Zt[n.id]}function e(){for(const a in Dt)_t.deleteBuffer(Dt[a]);G=[],Dt={},Zt={}}return{bind:t,update:g,dispose:e}}class g1{constructor(F={}){const{canvas:q=qw(),context:lt=null,depth:Dt=!0,stencil:Zt=!1,alpha:G=!1,antialias:U=!1,premultipliedAlpha:t=!0,preserveDrawingBuffer:g=!1,powerPreference:C="default",failIfMajorPerformanceCaveat:i=!1}=F;this.isWebGLRenderer=!0;let S;if(lt!==null){if(typeof WebGLRenderingContext<"u"&< instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");S=lt.getContextAttributes().alpha}else S=G;const x=new Uint32Array(4),h=new Int32Array(4);let p=null,r=null;const e=[],a=[];this.domElement=q,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Iu,this._useLegacyLights=!1,this.toneMapping=dc,this.toneMappingExposure=1;const n=this;let f=!1,c=0,l=0,m=null,v=-1,b=null;const u=new No,o=new No;let d=null;const w=new ha(0);let A=0,_=q.width,y=q.height,E=1,T=null,s=null;const L=new No(0,0,_,y),M=new No(0,0,_,y);let z=!1;const D=new l1;let N=!1,I=!1;const k=new so,B=new Wi,O=new bn,H={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Y(){return m===null?E:1}let j=lt;function et(ve,Le){const ce=q.getContext(ve,Le);return ce!==null?ce:null}try{const ve={alpha:!0,depth:Dt,stencil:Zt,antialias:U,premultipliedAlpha:t,preserveDrawingBuffer:g,powerPreference:C,failIfMajorPerformanceCaveat:i};if("setAttribute"in q&&q.setAttribute("data-engine",`three.js r${G0}`),q.addEventListener("webglcontextlost",re,!1),q.addEventListener("webglcontextrestored",Kt,!1),q.addEventListener("webglcontextcreationerror",$t,!1),j===null){const Le="webgl2";if(j=et(Le,ve),j===null)throw et(Le)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(ve){throw console.error("THREE.WebGLRenderer: "+ve.message),ve}let it,ut,J,X,tt,V,Q,ot,$,Z,st,nt,ct,gt,Tt,wt,Rt,bt,At,mt,Lt,Ht,Ut,kt;function Vt(){it=new pM(j),it.init(),ut=new uM(j,it,F),Ht=new Q4(j,it),J=new K4(j),X=new yM(j),tt=new z4,V=new J4(j,it,J,tt,ut,Ht,X),Q=new cM(n),ot=new dM(n),$=new M2(j),Ut=new sM(j,$),Z=new gM(j,$,X,Ut),st=new bM(j,Z,$,X),At=new xM(j,ut,V),wt=new fM(tt),nt=new F4(n,Q,ot,it,ut,Ut,wt),ct=new aS(n,tt),gt=new O4,Tt=new G4(it),bt=new oM(n,Q,ot,J,st,S,t),Rt=new j4(n,st,ut),kt=new oS(j,X,ut,J),mt=new lM(j,it,X),Lt=new mM(j,it,X),X.programs=nt.programs,n.capabilities=ut,n.extensions=it,n.properties=tt,n.renderLists=gt,n.shadowMap=Rt,n.state=J,n.info=X}Vt();const It=new nS(n,j);this.xr=It,this.getContext=function(){return j},this.getContextAttributes=function(){return j.getContextAttributes()},this.forceContextLoss=function(){const ve=it.get("WEBGL_lose_context");ve&&ve.loseContext()},this.forceContextRestore=function(){const ve=it.get("WEBGL_lose_context");ve&&ve.restoreContext()},this.getPixelRatio=function(){return E},this.setPixelRatio=function(ve){ve!==void 0&&(E=ve,this.setSize(_,y,!1))},this.getSize=function(ve){return ve.set(_,y)},this.setSize=function(ve,Le,ce=!0){if(It.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}_=ve,y=Le,q.width=Math.floor(ve*E),q.height=Math.floor(Le*E),ce===!0&&(q.style.width=ve+"px",q.style.height=Le+"px"),this.setViewport(0,0,ve,Le)},this.getDrawingBufferSize=function(ve){return ve.set(_*E,y*E).floor()},this.setDrawingBufferSize=function(ve,Le,ce){_=ve,y=Le,E=ce,q.width=Math.floor(ve*ce),q.height=Math.floor(Le*ce),this.setViewport(0,0,ve,Le)},this.getCurrentViewport=function(ve){return ve.copy(u)},this.getViewport=function(ve){return ve.copy(L)},this.setViewport=function(ve,Le,ce,Te){ve.isVector4?L.set(ve.x,ve.y,ve.z,ve.w):L.set(ve,Le,ce,Te),J.viewport(u.copy(L).multiplyScalar(E).round())},this.getScissor=function(ve){return ve.copy(M)},this.setScissor=function(ve,Le,ce,Te){ve.isVector4?M.set(ve.x,ve.y,ve.z,ve.w):M.set(ve,Le,ce,Te),J.scissor(o.copy(M).multiplyScalar(E).round())},this.getScissorTest=function(){return z},this.setScissorTest=function(ve){J.setScissorTest(z=ve)},this.setOpaqueSort=function(ve){T=ve},this.setTransparentSort=function(ve){s=ve},this.getClearColor=function(ve){return ve.copy(bt.getClearColor())},this.setClearColor=function(){bt.setClearColor.apply(bt,arguments)},this.getClearAlpha=function(){return bt.getClearAlpha()},this.setClearAlpha=function(){bt.setClearAlpha.apply(bt,arguments)},this.clear=function(ve=!0,Le=!0,ce=!0){let Te=0;if(ve){let Be=!1;if(m!==null){const ir=m.texture.format;Be=ir===Ky||ir===jy||ir===Zy}if(Be){const ir=m.texture.type,pe=ir===pc||ir===uv||ir===Gy||ir===Kv||ir===Yy||ir===Xy,Xe=bt.getClearColor(),Ke=bt.getClearAlpha(),or=Xe.r,$e=Xe.g,ge=Xe.b;pe?(x[0]=or,x[1]=$e,x[2]=ge,x[3]=Ke,j.clearBufferuiv(j.COLOR,0,x)):(h[0]=or,h[1]=$e,h[2]=ge,h[3]=Ke,j.clearBufferiv(j.COLOR,0,h))}else Te|=j.COLOR_BUFFER_BIT}Le&&(Te|=j.DEPTH_BUFFER_BIT),ce&&(Te|=j.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),j.clear(Te)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){q.removeEventListener("webglcontextlost",re,!1),q.removeEventListener("webglcontextrestored",Kt,!1),q.removeEventListener("webglcontextcreationerror",$t,!1),gt.dispose(),Tt.dispose(),tt.dispose(),Q.dispose(),ot.dispose(),st.dispose(),Ut.dispose(),kt.dispose(),nt.dispose(),It.dispose(),It.removeEventListener("sessionstart",zt),It.removeEventListener("sessionend",Xt),Jt.stop()};function re(ve){ve.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),f=!0}function Kt(){console.log("THREE.WebGLRenderer: Context Restored."),f=!1;const ve=X.autoReset,Le=Rt.enabled,ce=Rt.autoUpdate,Te=Rt.needsUpdate,Be=Rt.type;Vt(),X.autoReset=ve,Rt.enabled=Le,Rt.autoUpdate=ce,Rt.needsUpdate=Te,Rt.type=Be}function $t(ve){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",ve.statusMessage)}function le(ve){const Le=ve.target;Le.removeEventListener("dispose",le),he(Le)}function he(ve){de(ve),tt.remove(ve)}function de(ve){const Le=tt.get(ve).programs;Le!==void 0&&(Le.forEach(function(ce){nt.releaseProgram(ce)}),ve.isShaderMaterial&&nt.releaseShaderCache(ve))}this.renderBufferDirect=function(ve,Le,ce,Te,Be,ir){Le===null&&(Le=H);const pe=Be.isMesh&&Be.matrixWorld.determinant()<0,Xe=ie(ve,Le,ce,Te,Be);J.setMaterial(Te,pe);let Ke=ce.index,or=1;if(Te.wireframe===!0){if(Ke=Z.getWireframeAttribute(ce),Ke===void 0)return;or=2}const $e=ce.drawRange,ge=ce.attributes.position;let se=$e.start*or,Ae=($e.start+$e.count)*or;ir!==null&&(se=Math.max(se,ir.start*or),Ae=Math.min(Ae,(ir.start+ir.count)*or)),Ke!==null?(se=Math.max(se,0),Ae=Math.min(Ae,Ke.count)):ge!=null&&(se=Math.max(se,0),Ae=Math.min(Ae,ge.count));const Ce=Ae-se;if(Ce<0||Ce===1/0)return;Ut.setup(Be,Te,Xe,ce,Ke);let Ie,Pe=mt;if(Ke!==null&&(Ie=$.get(Ke),Pe=Lt,Pe.setIndex(Ie)),Be.isMesh)Te.wireframe===!0?(J.setLineWidth(Te.wireframeLinewidth*Y()),Pe.setMode(j.LINES)):Pe.setMode(j.TRIANGLES);else if(Be.isLine){let ke=Te.linewidth;ke===void 0&&(ke=1),J.setLineWidth(ke*Y()),Be.isLineSegments?Pe.setMode(j.LINES):Be.isLineLoop?Pe.setMode(j.LINE_LOOP):Pe.setMode(j.LINE_STRIP)}else Be.isPoints?Pe.setMode(j.POINTS):Be.isSprite&&Pe.setMode(j.TRIANGLES);if(Be.isBatchedMesh)Pe.renderMultiDraw(Be._multiDrawStarts,Be._multiDrawCounts,Be._multiDrawCount);else if(Be.isInstancedMesh)Pe.renderInstances(se,Ce,Be.count);else if(ce.isInstancedBufferGeometry){const ke=ce._maxInstanceCount!==void 0?ce._maxInstanceCount:1/0,Ve=Math.min(ce.instanceCount,ke);Pe.renderInstances(se,Ce,Ve)}else Pe.render(se,Ce)};function xe(ve,Le,ce){ve.transparent===!0&&ve.side===yf&&ve.forceSinglePass===!1?(ve.side=Gs,ve.needsUpdate=!0,Mt(ve,Le,ce),ve.side=Nu,ve.needsUpdate=!0,Mt(ve,Le,ce),ve.side=yf):Mt(ve,Le,ce)}this.compile=function(ve,Le,ce=null){ce===null&&(ce=ve),r=Tt.get(ce),r.init(),a.push(r),ce.traverseVisible(function(Be){Be.isLight&&Be.layers.test(Le.layers)&&(r.pushLight(Be),Be.castShadow&&r.pushShadow(Be))}),ve!==ce&&ve.traverseVisible(function(Be){Be.isLight&&Be.layers.test(Le.layers)&&(r.pushLight(Be),Be.castShadow&&r.pushShadow(Be))}),r.setupLights(n._useLegacyLights);const Te=new Set;return ve.traverse(function(Be){const ir=Be.material;if(ir)if(Array.isArray(ir))for(let pe=0;pe{function ir(){if(Te.forEach(function(pe){tt.get(pe).currentProgram.isReady()&&Te.delete(pe)}),Te.size===0){Be(ve);return}setTimeout(ir,10)}it.get("KHR_parallel_shader_compile")!==null?ir():setTimeout(ir,10)})};let Se=null;function ne(ve){Se&&Se(ve)}function zt(){Jt.stop()}function Xt(){Jt.start()}const Jt=new u1;Jt.setAnimationLoop(ne),typeof self<"u"&&Jt.setContext(self),this.setAnimationLoop=function(ve){Se=ve,It.setAnimationLoop(ve),ve===null?Jt.stop():Jt.start()},It.addEventListener("sessionstart",zt),It.addEventListener("sessionend",Xt),this.render=function(ve,Le){if(Le!==void 0&&Le.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(f===!0)return;ve.matrixWorldAutoUpdate===!0&&ve.updateMatrixWorld(),Le.parent===null&&Le.matrixWorldAutoUpdate===!0&&Le.updateMatrixWorld(),It.enabled===!0&&It.isPresenting===!0&&(It.cameraAutoUpdate===!0&&It.updateCamera(Le),Le=It.getCamera()),ve.isScene===!0&&ve.onBeforeRender(n,ve,Le,m),r=Tt.get(ve,a.length),r.init(),a.push(r),k.multiplyMatrices(Le.projectionMatrix,Le.matrixWorldInverse),D.setFromProjectionMatrix(k),I=this.localClippingEnabled,N=wt.init(this.clippingPlanes,I),p=gt.get(ve,e.length),p.init(),e.push(p),Wt(ve,Le,0,n.sortObjects),p.finish(),n.sortObjects===!0&&p.sort(T,s),this.info.render.frame++,N===!0&&wt.beginShadows();const ce=r.state.shadowsArray;if(Rt.render(ce,ve,Le),N===!0&&wt.endShadows(),this.info.autoReset===!0&&this.info.reset(),(It.enabled===!1||It.isPresenting===!1||It.hasDepthSensing()===!1)&&bt.render(p,ve),r.setupLights(n._useLegacyLights),Le.isArrayCamera){const Te=Le.cameras;for(let Be=0,ir=Te.length;Be0?r=a[a.length-1]:r=null,e.pop(),e.length>0?p=e[e.length-1]:p=null};function Wt(ve,Le,ce,Te){if(ve.visible===!1)return;if(ve.layers.test(Le.layers)){if(ve.isGroup)ce=ve.renderOrder;else if(ve.isLOD)ve.autoUpdate===!0&&ve.update(Le);else if(ve.isLight)r.pushLight(ve),ve.castShadow&&r.pushShadow(ve);else if(ve.isSprite){if(!ve.frustumCulled||D.intersectsSprite(ve)){Te&&O.setFromMatrixPosition(ve.matrixWorld).applyMatrix4(k);const pe=st.update(ve),Xe=ve.material;Xe.visible&&p.push(ve,pe,Xe,ce,O.z,null)}}else if((ve.isMesh||ve.isLine||ve.isPoints)&&(!ve.frustumCulled||D.intersectsObject(ve))){const pe=st.update(ve),Xe=ve.material;if(Te&&(ve.boundingSphere!==void 0?(ve.boundingSphere===null&&ve.computeBoundingSphere(),O.copy(ve.boundingSphere.center)):(pe.boundingSphere===null&&pe.computeBoundingSphere(),O.copy(pe.boundingSphere.center)),O.applyMatrix4(ve.matrixWorld).applyMatrix4(k)),Array.isArray(Xe)){const Ke=pe.groups;for(let or=0,$e=Ke.length;or<$e;or++){const ge=Ke[or],se=Xe[ge.materialIndex];se&&se.visible&&p.push(ve,pe,se,ce,O.z,ge)}}else Xe.visible&&p.push(ve,pe,Xe,ce,O.z,null)}}const ir=ve.children;for(let pe=0,Xe=ir.length;pe0&&xt(Be,ir,Le,ce),Te&&J.viewport(u.copy(Te)),Be.length>0&&yt(Be,Le,ce),ir.length>0&&yt(ir,Le,ce),pe.length>0&&yt(pe,Le,ce),J.buffers.depth.setTest(!0),J.buffers.depth.setMask(!0),J.buffers.color.setMask(!0),J.setPolygonOffset(!1)}function xt(ve,Le,ce,Te){if((ce.isScene===!0?ce.overrideMaterial:null)!==null)return;if(r.state.transmissionRenderTarget===null){r.state.transmissionRenderTarget=new rh(1,1,{generateMipmaps:!0,type:it.has("EXT_color_buffer_half_float")||it.has("EXT_color_buffer_float")?ap:pc,minFilter:eh,samples:4,stencilBuffer:Zt});const or=tt.get(r.state.transmissionRenderTarget);or.__isTransmissionRenderTarget=!0}const ir=r.state.transmissionRenderTarget;n.getDrawingBufferSize(B),ir.setSize(B.x,B.y);const pe=n.getRenderTarget();n.setRenderTarget(ir),n.getClearColor(w),A=n.getClearAlpha(),A<1&&n.setClearColor(16777215,.5),n.clear();const Xe=n.toneMapping;n.toneMapping=dc,yt(ve,ce,Te),V.updateMultisampleRenderTarget(ir),V.updateRenderTargetMipmap(ir);let Ke=!1;for(let or=0,$e=Le.length;or<$e;or++){const ge=Le[or],se=ge.object,Ae=ge.geometry,Ce=ge.material,Ie=ge.group;if(Ce.side===yf&&se.layers.test(Te.layers)){const Pe=Ce.side;Ce.side=Gs,Ce.needsUpdate=!0,Et(se,ce,Te,Ae,Ce,Ie),Ce.side=Pe,Ce.needsUpdate=!0,Ke=!0}}Ke===!0&&(V.updateMultisampleRenderTarget(ir),V.updateRenderTargetMipmap(ir)),n.setRenderTarget(pe),n.setClearColor(w,A),n.toneMapping=Xe}function yt(ve,Le,ce){const Te=Le.isScene===!0?Le.overrideMaterial:null;for(let Be=0,ir=ve.length;Be0),ge=!!ce.morphAttributes.position,se=!!ce.morphAttributes.normal,Ae=!!ce.morphAttributes.color;let Ce=dc;Te.toneMapped&&(m===null||m.isXRRenderTarget===!0)&&(Ce=n.toneMapping);const Ie=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,Pe=Ie!==void 0?Ie.length:0,ke=tt.get(Te),Ve=r.state.lights;if(N===!0&&(I===!0||ve!==b)){const Qe=ve===b&&Te.id===v;wt.setState(Te,ve,Qe)}let Je=!1;Te.version===ke.__version?(ke.needsLights&&ke.lightsStateVersion!==Ve.state.version||ke.outputColorSpace!==Xe||Be.isBatchedMesh&&ke.batching===!1||!Be.isBatchedMesh&&ke.batching===!0||Be.isInstancedMesh&&ke.instancing===!1||!Be.isInstancedMesh&&ke.instancing===!0||Be.isSkinnedMesh&&ke.skinning===!1||!Be.isSkinnedMesh&&ke.skinning===!0||Be.isInstancedMesh&&ke.instancingColor===!0&&Be.instanceColor===null||Be.isInstancedMesh&&ke.instancingColor===!1&&Be.instanceColor!==null||Be.isInstancedMesh&&ke.instancingMorph===!0&&Be.morphTexture===null||Be.isInstancedMesh&&ke.instancingMorph===!1&&Be.morphTexture!==null||ke.envMap!==Ke||Te.fog===!0&&ke.fog!==ir||ke.numClippingPlanes!==void 0&&(ke.numClippingPlanes!==wt.numPlanes||ke.numIntersection!==wt.numIntersection)||ke.vertexAlphas!==or||ke.vertexTangents!==$e||ke.morphTargets!==ge||ke.morphNormals!==se||ke.morphColors!==Ae||ke.toneMapping!==Ce||ke.morphTargetsCount!==Pe)&&(Je=!0):(Je=!0,ke.__version=Te.version);let ur=ke.currentProgram;Je===!0&&(ur=Mt(Te,Le,Be));let hr=!1,vr=!1,Yt=!1;const Gt=ur.getUniforms(),Ne=ke.uniforms;if(J.useProgram(ur.program)&&(hr=!0,vr=!0,Yt=!0),Te.id!==v&&(v=Te.id,vr=!0),hr||b!==ve){Gt.setValue(j,"projectionMatrix",ve.projectionMatrix),Gt.setValue(j,"viewMatrix",ve.matrixWorldInverse);const Qe=Gt.map.cameraPosition;Qe!==void 0&&Qe.setValue(j,O.setFromMatrixPosition(ve.matrixWorld)),ut.logarithmicDepthBuffer&&Gt.setValue(j,"logDepthBufFC",2/(Math.log(ve.far+1)/Math.LN2)),(Te.isMeshPhongMaterial||Te.isMeshToonMaterial||Te.isMeshLambertMaterial||Te.isMeshBasicMaterial||Te.isMeshStandardMaterial||Te.isShaderMaterial)&&Gt.setValue(j,"isOrthographic",ve.isOrthographicCamera===!0),b!==ve&&(b=ve,vr=!0,Yt=!0)}if(Be.isSkinnedMesh){Gt.setOptional(j,Be,"bindMatrix"),Gt.setOptional(j,Be,"bindMatrixInverse");const Qe=Be.skeleton;Qe&&(Qe.boneTexture===null&&Qe.computeBoneTexture(),Gt.setValue(j,"boneTexture",Qe.boneTexture,V))}Be.isBatchedMesh&&(Gt.setOptional(j,Be,"batchingTexture"),Gt.setValue(j,"batchingTexture",Be._matricesTexture,V));const Oe=ce.morphAttributes;if((Oe.position!==void 0||Oe.normal!==void 0||Oe.color!==void 0)&&At.update(Be,ce,ur),(vr||ke.receiveShadow!==Be.receiveShadow)&&(ke.receiveShadow=Be.receiveShadow,Gt.setValue(j,"receiveShadow",Be.receiveShadow)),Te.isMeshGouraudMaterial&&Te.envMap!==null&&(Ne.envMap.value=Ke,Ne.flipEnvMap.value=Ke.isCubeTexture&&Ke.isRenderTargetTexture===!1?-1:1),Te.isMeshStandardMaterial&&Te.envMap===null&&Le.environment!==null&&(Ne.envMapIntensity.value=Le.environmentIntensity),vr&&(Gt.setValue(j,"toneMappingExposure",n.toneMappingExposure),ke.needsLights&&me(Ne,Yt),ir&&Te.fog===!0&&ct.refreshFogUniforms(Ne,ir),ct.refreshMaterialUniforms(Ne,Te,E,y,r.state.transmissionRenderTarget),np.upload(j,Nt(ke),Ne,V)),Te.isShaderMaterial&&Te.uniformsNeedUpdate===!0&&(np.upload(j,Nt(ke),Ne,V),Te.uniformsNeedUpdate=!1),Te.isSpriteMaterial&&Gt.setValue(j,"center",Be.center),Gt.setValue(j,"modelViewMatrix",Be.modelViewMatrix),Gt.setValue(j,"normalMatrix",Be.normalMatrix),Gt.setValue(j,"modelMatrix",Be.matrixWorld),Te.isShaderMaterial||Te.isRawShaderMaterial){const Qe=Te.uniformsGroups;for(let er=0,fr=Qe.length;er0&&V.useMultisampledRTT(ve)===!1?Be=tt.get(ve).__webglMultisampledFramebuffer:Array.isArray($e)?Be=$e[ce]:Be=$e,u.copy(ve.viewport),o.copy(ve.scissor),d=ve.scissorTest}else u.copy(L).multiplyScalar(E).floor(),o.copy(M).multiplyScalar(E).floor(),d=z;if(J.bindFramebuffer(j.FRAMEBUFFER,Be)&&Te&&J.drawBuffers(ve,Be),J.viewport(u),J.scissor(o),J.setScissorTest(d),ir){const Ke=tt.get(ve.texture);j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_CUBE_MAP_POSITIVE_X+Le,Ke.__webglTexture,ce)}else if(pe){const Ke=tt.get(ve.texture),or=Le||0;j.framebufferTextureLayer(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,Ke.__webglTexture,ce||0,or)}v=-1},this.readRenderTargetPixels=function(ve,Le,ce,Te,Be,ir,pe){if(!(ve&&ve.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Xe=tt.get(ve).__webglFramebuffer;if(ve.isWebGLCubeRenderTarget&&pe!==void 0&&(Xe=Xe[pe]),Xe){J.bindFramebuffer(j.FRAMEBUFFER,Xe);try{const Ke=ve.texture,or=Ke.format,$e=Ke.type;if(or!==zu&&Ht.convert(or)!==j.getParameter(j.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ge=$e===ap&&(it.has("EXT_color_buffer_half_float")||it.has("EXT_color_buffer_float"));if($e!==pc&&Ht.convert($e)!==j.getParameter(j.IMPLEMENTATION_COLOR_READ_TYPE)&&$e!==hc&&!ge){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Le>=0&&Le<=ve.width-Te&&ce>=0&&ce<=ve.height-Be&&j.readPixels(Le,ce,Te,Be,Ht.convert(or),Ht.convert($e),ir)}finally{const Ke=m!==null?tt.get(m).__webglFramebuffer:null;J.bindFramebuffer(j.FRAMEBUFFER,Ke)}}},this.copyFramebufferToTexture=function(ve,Le,ce=0){const Te=Math.pow(2,-ce),Be=Math.floor(Le.image.width*Te),ir=Math.floor(Le.image.height*Te);V.setTexture2D(Le,0),j.copyTexSubImage2D(j.TEXTURE_2D,ce,0,0,ve.x,ve.y,Be,ir),J.unbindTexture()},this.copyTextureToTexture=function(ve,Le,ce,Te=0){const Be=Le.image.width,ir=Le.image.height,pe=Ht.convert(ce.format),Xe=Ht.convert(ce.type);V.setTexture2D(ce,0),j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,ce.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ce.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,ce.unpackAlignment),Le.isDataTexture?j.texSubImage2D(j.TEXTURE_2D,Te,ve.x,ve.y,Be,ir,pe,Xe,Le.image.data):Le.isCompressedTexture?j.compressedTexSubImage2D(j.TEXTURE_2D,Te,ve.x,ve.y,Le.mipmaps[0].width,Le.mipmaps[0].height,pe,Le.mipmaps[0].data):j.texSubImage2D(j.TEXTURE_2D,Te,ve.x,ve.y,pe,Xe,Le.image),Te===0&&ce.generateMipmaps&&j.generateMipmap(j.TEXTURE_2D),J.unbindTexture()},this.copyTextureToTexture3D=function(ve,Le,ce,Te,Be=0){const ir=Math.round(ve.max.x-ve.min.x),pe=Math.round(ve.max.y-ve.min.y),Xe=ve.max.z-ve.min.z+1,Ke=Ht.convert(Te.format),or=Ht.convert(Te.type);let $e;if(Te.isData3DTexture)V.setTexture3D(Te,0),$e=j.TEXTURE_3D;else if(Te.isDataArrayTexture||Te.isCompressedArrayTexture)V.setTexture2DArray(Te,0),$e=j.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,Te.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Te.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,Te.unpackAlignment);const ge=j.getParameter(j.UNPACK_ROW_LENGTH),se=j.getParameter(j.UNPACK_IMAGE_HEIGHT),Ae=j.getParameter(j.UNPACK_SKIP_PIXELS),Ce=j.getParameter(j.UNPACK_SKIP_ROWS),Ie=j.getParameter(j.UNPACK_SKIP_IMAGES),Pe=ce.isCompressedTexture?ce.mipmaps[Be]:ce.image;j.pixelStorei(j.UNPACK_ROW_LENGTH,Pe.width),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,Pe.height),j.pixelStorei(j.UNPACK_SKIP_PIXELS,ve.min.x),j.pixelStorei(j.UNPACK_SKIP_ROWS,ve.min.y),j.pixelStorei(j.UNPACK_SKIP_IMAGES,ve.min.z),ce.isDataTexture||ce.isData3DTexture?j.texSubImage3D($e,Be,Le.x,Le.y,Le.z,ir,pe,Xe,Ke,or,Pe.data):Te.isCompressedArrayTexture?j.compressedTexSubImage3D($e,Be,Le.x,Le.y,Le.z,ir,pe,Xe,Ke,Pe.data):j.texSubImage3D($e,Be,Le.x,Le.y,Le.z,ir,pe,Xe,Ke,or,Pe),j.pixelStorei(j.UNPACK_ROW_LENGTH,ge),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,se),j.pixelStorei(j.UNPACK_SKIP_PIXELS,Ae),j.pixelStorei(j.UNPACK_SKIP_ROWS,Ce),j.pixelStorei(j.UNPACK_SKIP_IMAGES,Ie),Be===0&&Te.generateMipmaps&&j.generateMipmap($e),J.unbindTexture()},this.initTexture=function(ve){ve.isCubeTexture?V.setTextureCube(ve,0):ve.isData3DTexture?V.setTexture3D(ve,0):ve.isDataArrayTexture||ve.isCompressedArrayTexture?V.setTexture2DArray(ve,0):V.setTexture2D(ve,0),J.unbindTexture()},this.resetState=function(){c=0,l=0,m=null,J.reset(),Ut.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return xf}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(F){this._outputColorSpace=F;const q=this.getContext();q.drawingBufferColorSpace=F===W0?"display-p3":"srgb",q.unpackColorSpace=Fa.workingColorSpace===vp?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(F){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=F}}class m1 extends Bo{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Ss,this.environmentIntensity=1,this.environmentRotation=new Ss,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(F,q){return super.copy(F,q),F.background!==null&&(this.background=F.background.clone()),F.environment!==null&&(this.environment=F.environment.clone()),F.fog!==null&&(this.fog=F.fog.clone()),this.backgroundBlurriness=F.backgroundBlurriness,this.backgroundIntensity=F.backgroundIntensity,this.backgroundRotation.copy(F.backgroundRotation),this.environmentIntensity=F.environmentIntensity,this.environmentRotation.copy(F.environmentRotation),F.overrideMaterial!==null&&(this.overrideMaterial=F.overrideMaterial.clone()),this.matrixAutoUpdate=F.matrixAutoUpdate,this}toJSON(F){const q=super.toJSON(F);return this.fog!==null&&(q.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(q.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(q.object.backgroundIntensity=this.backgroundIntensity),q.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(q.object.environmentIntensity=this.environmentIntensity),q.object.environmentRotation=this.environmentRotation.toArray(),q}}class sS{constructor(F,q){this.isInterleavedBuffer=!0,this.array=F,this.stride=q,this.count=F!==void 0?F.length/q:0,this.usage=N0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=bf()}onUploadCallback(){}set needsUpdate(F){F===!0&&this.version++}get updateRange(){return qy("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(F){return this.usage=F,this}addUpdateRange(F,q){this.updateRanges.push({start:F,count:q})}clearUpdateRanges(){this.updateRanges.length=0}copy(F){return this.array=new F.array.constructor(F.array),this.count=F.count,this.stride=F.stride,this.usage=F.usage,this}copyAt(F,q,lt){F*=this.stride,lt*=q.stride;for(let Dt=0,Zt=this.stride;DtF.far||q.push({distance:t,point:Uv.clone(),uv:hu.getInterpolation(Uv,Jd,Vv,Qd,Ty,C0,Ay,new Wi),face:null,object:this})}copy(F,q){return super.copy(F,q),F.center!==void 0&&this.center.copy(F.center),this.material=F.material,this}}function $d(_t,F,q,lt,Dt,Zt){qh.subVectors(_t,q).addScalar(.5).multiply(lt),Dt!==void 0?(Hv.x=Zt*qh.x-Dt*qh.y,Hv.y=Dt*qh.x+Zt*qh.y):Hv.copy(qh),_t.copy(F),_t.x+=Hv.x,_t.y+=Hv.y,_t.applyMatrix4(x1)}class mp extends ih{constructor(F){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new ha(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(F)}copy(F){return super.copy(F),this.color.copy(F.color),this.map=F.map,this.linewidth=F.linewidth,this.linecap=F.linecap,this.linejoin=F.linejoin,this.fog=F.fog,this}}const My=new bn,Sy=new bn,Ey=new so,L0=new $v,qd=new Qv;class lS extends Bo{constructor(F=new Ys,q=new mp){super(),this.isLine=!0,this.type="Line",this.geometry=F,this.material=q,this.updateMorphTargets()}copy(F,q){return super.copy(F,q),this.material=Array.isArray(F.material)?F.material.slice():F.material,this.geometry=F.geometry,this}computeLineDistances(){const F=this.geometry;if(F.index===null){const q=F.attributes.position,lt=[0];for(let Dt=1,Zt=q.count;Dtt)continue;S.applyMatrix4(this.matrixWorld);const v=F.ray.origin.distanceTo(S);vF.far||q.push({distance:v,point:i.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{const e=Math.max(0,G.start),a=Math.min(r.count,G.start+G.count);for(let n=e,f=a-1;nt)continue;S.applyMatrix4(this.matrixWorld);const l=F.ray.origin.distanceTo(S);lF.far||q.push({distance:l,point:i.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const q=this.geometry.morphAttributes,lt=Object.keys(q);if(lt.length>0){const Dt=q[lt[0]];if(Dt!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Zt=0,G=Dt.length;Zt0){const Dt=q[lt[0]];if(Dt!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Zt=0,G=Dt.length;ZtDt.far)return;Zt.push({distance:g,distanceToRay:Math.sqrt(U),point:t,index:F,face:null,object:G})}}class fS extends Es{constructor(F,q,lt,Dt,Zt,G,U,t,g){super(F,q,lt,Dt,Zt,G,U,t,g),this.isCanvasTexture=!0,this.needsUpdate=!0}}class yp extends Ys{constructor(F=1,q=32,lt=16,Dt=0,Zt=Math.PI*2,G=0,U=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:F,widthSegments:q,heightSegments:lt,phiStart:Dt,phiLength:Zt,thetaStart:G,thetaLength:U},q=Math.max(3,Math.floor(q)),lt=Math.max(2,Math.floor(lt));const t=Math.min(G+U,Math.PI);let g=0;const C=[],i=new bn,S=new bn,x=[],h=[],p=[],r=[];for(let e=0;e<=lt;e++){const a=[],n=e/lt;let f=0;e===0&&G===0?f=.5/q:e===lt&&t===Math.PI&&(f=-.5/q);for(let c=0;c<=q;c++){const l=c/q;i.x=-F*Math.cos(Dt+l*Zt)*Math.sin(G+n*U),i.y=F*Math.cos(G+n*U),i.z=F*Math.sin(Dt+l*Zt)*Math.sin(G+n*U),h.push(i.x,i.y,i.z),S.copy(i).normalize(),p.push(S.x,S.y,S.z),r.push(l+f,1-n),a.push(g++)}C.push(a)}for(let e=0;e0)&&x.push(n,f,l),(e!==lt-1||tF.clone()))}}class DS{constructor(F=new M1){this.force=F}simulate(F,q){const lt=q.bodies.map(Zt=>{const G=this.rateUpdate(Zt.velocity,Zt.acceleration,F);return Zt.clone(this.rateUpdate(Zt.position,G,F),G)}),Dt=this.force.getForces(lt);return lt.forEach((Zt,G)=>{Zt.acceleration=Dt[G].divideScalar(Zt.mass)}),new xp(lt)}rateUpdate(F,q,lt){return q.clone().multiplyScalar(lt).add(F)}}class IS{constructor(F=new M1,q=[1,2,2,1]){if(this.force=F,q.length!==4)throw new Error("Weights for RK4 must be of length 4");this.weights=q}simulate(F,q){let lt=q.bodies.map(S=>({kv:[S.acceleration.clone()],kx:[S.velocity.clone()]}));const Dt=this.getInterKV(q.bodies,lt,0,F/2),Zt=this.getInterKX(q.bodies,lt,0,F/2);lt.forEach((S,x)=>{S.kv.push(Dt[x]),S.kx.push(Zt[x])});const G=this.getInterKV(q.bodies,lt,1,F/2),U=this.getInterKX(q.bodies,lt,1,F/2);lt.forEach((S,x)=>{S.kv.push(G[x]),S.kx.push(U[x])});const t=this.getInterKV(q.bodies,lt,2,F),g=this.getInterKX(q.bodies,lt,2,F);lt.forEach((S,x)=>{S.kv.push(t[x]),S.kx.push(g[x])});const C=q.bodies.map((S,x)=>{const h=new bn,p=new bn;return lt[x].kx.forEach((r,e)=>{h.add(r.multiplyScalar(this.weights[e]))}),lt[x].kv.forEach((r,e)=>{p.add(r.multiplyScalar(this.weights[e]))}),S.clone(h.multiplyScalar(F/6).add(S.position),p.multiplyScalar(F/6).add(S.velocity))}),i=this.force.getForces(C);return C.forEach((S,x)=>{S.acceleration=i[x].divideScalar(S.mass)}),new xp(C)}getInterKV(F,q,lt,Dt){let Zt=F.map((G,U)=>{let t=G.clone();return t.position.add(q[U].kx[lt].clone().multiplyScalar(Dt)),t});return this.force.getForces(Zt).map((G,U)=>G.divideScalar(F[U].mass))}getInterKX(F,q,lt,Dt){return F.map((Zt,G)=>Zt.velocity.clone().add(q[G].kv[lt].clone().multiplyScalar(Dt)))}}/** * lil-gui * https://lil-gui.georgealways.com * @version 0.19.2 * @author George Michael Brower * @license MIT - */class Ou{constructor(F,q,lt,Dt,Zt="div"){this.parent=F,this.object=q,this.property=lt,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(Zt),this.domElement.classList.add("controller"),this.domElement.classList.add(Dt),this.$name=document.createElement("div"),this.$name.classList.add("name"),Ou.nextNameID=Ou.nextNameID||0,this.$name.id=`lil-gui-name-${++Ou.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",G=>G.stopPropagation()),this.domElement.addEventListener("keyup",G=>G.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(lt)}name(F){return this._name=F,this.$name.textContent=F,this}onChange(F){return this._onChange=F,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(F){return this._onFinishChange=F,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(F=!0){return this.disable(!F)}disable(F=!0){return F===this._disabled?this:(this._disabled=F,this.domElement.classList.toggle("disabled",F),this.$disable.toggleAttribute("disabled",F),this)}show(F=!0){return this._hidden=!F,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(F){const q=this.parent.add(this.object,this.property,F);return q.name(this._name),this.destroy(),q}min(F){return this}max(F){return this}step(F){return this}decimals(F){return this}listen(F=!0){return this._listening=F,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const F=this.save();F!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=F}getValue(){return this.object[this.property]}setValue(F){return this.getValue()!==F&&(this.object[this.property]=F,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(F){return this.setValue(F),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class vS extends Ou{constructor(F,q,lt){super(F,q,lt,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function G0(_t){let F,q;return(F=_t.match(/(#|0x)?([a-f0-9]{6})/i))?q=F[2]:(F=_t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?q=parseInt(F[1]).toString(16).padStart(2,0)+parseInt(F[2]).toString(16).padStart(2,0)+parseInt(F[3]).toString(16).padStart(2,0):(F=_t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(q=F[1]+F[1]+F[2]+F[2]+F[3]+F[3]),q?"#"+q:!1}const dS={isPrimitive:!0,match:_t=>typeof _t=="string",fromHexString:G0,toHexString:G0},Kv={isPrimitive:!0,match:_t=>typeof _t=="number",fromHexString:_t=>parseInt(_t.substring(1),16),toHexString:_t=>"#"+_t.toString(16).padStart(6,0)},pS={isPrimitive:!1,match:_t=>Array.isArray(_t),fromHexString(_t,F,q=1){const lt=Kv.fromHexString(_t);F[0]=(lt>>16&255)/255*q,F[1]=(lt>>8&255)/255*q,F[2]=(lt&255)/255*q},toHexString([_t,F,q],lt=1){lt=255/lt;const Dt=_t*lt<<16^F*lt<<8^q*lt<<0;return Kv.toHexString(Dt)}},gS={isPrimitive:!1,match:_t=>Object(_t)===_t,fromHexString(_t,F,q=1){const lt=Kv.fromHexString(_t);F.r=(lt>>16&255)/255*q,F.g=(lt>>8&255)/255*q,F.b=(lt&255)/255*q},toHexString({r:_t,g:F,b:q},lt=1){lt=255/lt;const Dt=_t*lt<<16^F*lt<<8^q*lt<<0;return Kv.toHexString(Dt)}},mS=[dS,Kv,pS,gS];function yS(_t){return mS.find(F=>F.match(_t))}class xS extends Ou{constructor(F,q,lt,Dt){super(F,q,lt,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=yS(this.initialValue),this._rgbScale=Dt,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const Zt=G0(this.$text.value);Zt&&this._setValueFromHexString(Zt)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(F){if(this._format.isPrimitive){const q=this._format.fromHexString(F);this.setValue(q)}else this._format.fromHexString(F,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(F){return this._setValueFromHexString(F),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class R0 extends Ou{constructor(F,q,lt){super(F,q,lt,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",Dt=>{Dt.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class bS extends Ou{constructor(F,q,lt,Dt,Zt,G){super(F,q,lt,"number"),this._initInput(),this.min(Dt),this.max(Zt);const U=G!==void 0;this.step(U?G:this._getImplicitStep(),U),this.updateDisplay()}decimals(F){return this._decimals=F,this.updateDisplay(),this}min(F){return this._min=F,this._onUpdateMinMax(),this}max(F){return this._max=F,this._onUpdateMinMax(),this}step(F,q=!0){return this._step=F,this._stepExplicit=q,this}updateDisplay(){const F=this.getValue();if(this._hasSlider){let q=(F-this._min)/(this._max-this._min);q=Math.max(0,Math.min(q,1)),this.$fill.style.width=q*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?F:F.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const q=()=>{let a=parseFloat(this.$input.value);isNaN(a)||(this._stepExplicit&&(a=this._snap(a)),this.setValue(this._clamp(a)))},lt=a=>{const n=parseFloat(this.$input.value);isNaN(n)||(this._snapClampSetValue(n+a),this.$input.value=this.getValue())},Dt=a=>{a.key==="Enter"&&this.$input.blur(),a.code==="ArrowUp"&&(a.preventDefault(),lt(this._step*this._arrowKeyMultiplier(a))),a.code==="ArrowDown"&&(a.preventDefault(),lt(this._step*this._arrowKeyMultiplier(a)*-1))},Zt=a=>{this._inputFocused&&(a.preventDefault(),lt(this._step*this._normalizeMouseWheel(a)))};let G=!1,U,t,g,C,i;const S=5,x=a=>{U=a.clientX,t=g=a.clientY,G=!0,C=this.getValue(),i=0,window.addEventListener("mousemove",v),window.addEventListener("mouseup",p)},v=a=>{if(G){const n=a.clientX-U,f=a.clientY-t;Math.abs(f)>S?(a.preventDefault(),this.$input.blur(),G=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(n)>S&&p()}if(!G){const n=a.clientY-g;i-=n*this._step*this._arrowKeyMultiplier(a),C+i>this._max?i=this._max-C:C+i{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",p)},r=()=>{this._inputFocused=!0},e=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",q),this.$input.addEventListener("keydown",Dt),this.$input.addEventListener("wheel",Zt,{passive:!1}),this.$input.addEventListener("mousedown",x),this.$input.addEventListener("focus",r),this.$input.addEventListener("blur",e)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const F=(e,a,n,f,c)=>(e-a)/(n-a)*(c-f)+f,q=e=>{const a=this.$slider.getBoundingClientRect();let n=F(e,a.left,a.right,this._min,this._max);this._snapClampSetValue(n)},lt=e=>{this._setDraggingStyle(!0),q(e.clientX),window.addEventListener("mousemove",Dt),window.addEventListener("mouseup",Zt)},Dt=e=>{q(e.clientX)},Zt=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",Dt),window.removeEventListener("mouseup",Zt)};let G=!1,U,t;const g=e=>{e.preventDefault(),this._setDraggingStyle(!0),q(e.touches[0].clientX),G=!1},C=e=>{e.touches.length>1||(this._hasScrollBar?(U=e.touches[0].clientX,t=e.touches[0].clientY,G=!0):g(e),window.addEventListener("touchmove",i,{passive:!1}),window.addEventListener("touchend",S))},i=e=>{if(G){const a=e.touches[0].clientX-U,n=e.touches[0].clientY-t;Math.abs(a)>Math.abs(n)?g(e):(window.removeEventListener("touchmove",i),window.removeEventListener("touchend",S))}else e.preventDefault(),q(e.touches[0].clientX)},S=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",i),window.removeEventListener("touchend",S)},x=this._callOnFinishChange.bind(this),v=400;let p;const r=e=>{if(Math.abs(e.deltaX)this._max&&(F=this._max),F}_snapClampSetValue(F){this.setValue(this._clamp(this._snap(F)))}get _hasScrollBar(){const F=this.parent.root.$children;return F.scrollHeight>F.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}}class wS extends Ou{constructor(F,q,lt,Dt){super(F,q,lt,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(Dt)}options(F){return this._values=Array.isArray(F)?F:Object.values(F),this._names=Array.isArray(F)?F:Object.keys(F),this.$select.replaceChildren(),this._names.forEach(q=>{const lt=document.createElement("option");lt.textContent=q,this.$select.appendChild(lt)}),this.updateDisplay(),this}updateDisplay(){const F=this.getValue(),q=this._values.indexOf(F);return this.$select.selectedIndex=q,this.$display.textContent=q===-1?F:this._names[q],this}}class TS extends Ou{constructor(F,q,lt){super(F,q,lt,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",Dt=>{Dt.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}const AS=`.lil-gui { + */class Ou{constructor(F,q,lt,Dt,Zt="div"){this.parent=F,this.object=q,this.property=lt,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(Zt),this.domElement.classList.add("controller"),this.domElement.classList.add(Dt),this.$name=document.createElement("div"),this.$name.classList.add("name"),Ou.nextNameID=Ou.nextNameID||0,this.$name.id=`lil-gui-name-${++Ou.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",G=>G.stopPropagation()),this.domElement.addEventListener("keyup",G=>G.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(lt)}name(F){return this._name=F,this.$name.textContent=F,this}onChange(F){return this._onChange=F,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(F){return this._onFinishChange=F,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(F=!0){return this.disable(!F)}disable(F=!0){return F===this._disabled?this:(this._disabled=F,this.domElement.classList.toggle("disabled",F),this.$disable.toggleAttribute("disabled",F),this)}show(F=!0){return this._hidden=!F,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(F){const q=this.parent.add(this.object,this.property,F);return q.name(this._name),this.destroy(),q}min(F){return this}max(F){return this}step(F){return this}decimals(F){return this}listen(F=!0){return this._listening=F,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const F=this.save();F!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=F}getValue(){return this.object[this.property]}setValue(F){return this.getValue()!==F&&(this.object[this.property]=F,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(F){return this.setValue(F),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class hS extends Ou{constructor(F,q,lt){super(F,q,lt,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function V0(_t){let F,q;return(F=_t.match(/(#|0x)?([a-f0-9]{6})/i))?q=F[2]:(F=_t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?q=parseInt(F[1]).toString(16).padStart(2,0)+parseInt(F[2]).toString(16).padStart(2,0)+parseInt(F[3]).toString(16).padStart(2,0):(F=_t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(q=F[1]+F[1]+F[2]+F[2]+F[3]+F[3]),q?"#"+q:!1}const vS={isPrimitive:!0,match:_t=>typeof _t=="string",fromHexString:V0,toHexString:V0},jv={isPrimitive:!0,match:_t=>typeof _t=="number",fromHexString:_t=>parseInt(_t.substring(1),16),toHexString:_t=>"#"+_t.toString(16).padStart(6,0)},dS={isPrimitive:!1,match:_t=>Array.isArray(_t),fromHexString(_t,F,q=1){const lt=jv.fromHexString(_t);F[0]=(lt>>16&255)/255*q,F[1]=(lt>>8&255)/255*q,F[2]=(lt&255)/255*q},toHexString([_t,F,q],lt=1){lt=255/lt;const Dt=_t*lt<<16^F*lt<<8^q*lt<<0;return jv.toHexString(Dt)}},pS={isPrimitive:!1,match:_t=>Object(_t)===_t,fromHexString(_t,F,q=1){const lt=jv.fromHexString(_t);F.r=(lt>>16&255)/255*q,F.g=(lt>>8&255)/255*q,F.b=(lt&255)/255*q},toHexString({r:_t,g:F,b:q},lt=1){lt=255/lt;const Dt=_t*lt<<16^F*lt<<8^q*lt<<0;return jv.toHexString(Dt)}},gS=[vS,jv,dS,pS];function mS(_t){return gS.find(F=>F.match(_t))}class yS extends Ou{constructor(F,q,lt,Dt){super(F,q,lt,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=mS(this.initialValue),this._rgbScale=Dt,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const Zt=V0(this.$text.value);Zt&&this._setValueFromHexString(Zt)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(F){if(this._format.isPrimitive){const q=this._format.fromHexString(F);this.setValue(q)}else this._format.fromHexString(F,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(F){return this._setValueFromHexString(F),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class P0 extends Ou{constructor(F,q,lt){super(F,q,lt,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",Dt=>{Dt.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class xS extends Ou{constructor(F,q,lt,Dt,Zt,G){super(F,q,lt,"number"),this._initInput(),this.min(Dt),this.max(Zt);const U=G!==void 0;this.step(U?G:this._getImplicitStep(),U),this.updateDisplay()}decimals(F){return this._decimals=F,this.updateDisplay(),this}min(F){return this._min=F,this._onUpdateMinMax(),this}max(F){return this._max=F,this._onUpdateMinMax(),this}step(F,q=!0){return this._step=F,this._stepExplicit=q,this}updateDisplay(){const F=this.getValue();if(this._hasSlider){let q=(F-this._min)/(this._max-this._min);q=Math.max(0,Math.min(q,1)),this.$fill.style.width=q*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?F:F.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const q=()=>{let a=parseFloat(this.$input.value);isNaN(a)||(this._stepExplicit&&(a=this._snap(a)),this.setValue(this._clamp(a)))},lt=a=>{const n=parseFloat(this.$input.value);isNaN(n)||(this._snapClampSetValue(n+a),this.$input.value=this.getValue())},Dt=a=>{a.key==="Enter"&&this.$input.blur(),a.code==="ArrowUp"&&(a.preventDefault(),lt(this._step*this._arrowKeyMultiplier(a))),a.code==="ArrowDown"&&(a.preventDefault(),lt(this._step*this._arrowKeyMultiplier(a)*-1))},Zt=a=>{this._inputFocused&&(a.preventDefault(),lt(this._step*this._normalizeMouseWheel(a)))};let G=!1,U,t,g,C,i;const S=5,x=a=>{U=a.clientX,t=g=a.clientY,G=!0,C=this.getValue(),i=0,window.addEventListener("mousemove",h),window.addEventListener("mouseup",p)},h=a=>{if(G){const n=a.clientX-U,f=a.clientY-t;Math.abs(f)>S?(a.preventDefault(),this.$input.blur(),G=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(n)>S&&p()}if(!G){const n=a.clientY-g;i-=n*this._step*this._arrowKeyMultiplier(a),C+i>this._max?i=this._max-C:C+i{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",p)},r=()=>{this._inputFocused=!0},e=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",q),this.$input.addEventListener("keydown",Dt),this.$input.addEventListener("wheel",Zt,{passive:!1}),this.$input.addEventListener("mousedown",x),this.$input.addEventListener("focus",r),this.$input.addEventListener("blur",e)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const F=(e,a,n,f,c)=>(e-a)/(n-a)*(c-f)+f,q=e=>{const a=this.$slider.getBoundingClientRect();let n=F(e,a.left,a.right,this._min,this._max);this._snapClampSetValue(n)},lt=e=>{this._setDraggingStyle(!0),q(e.clientX),window.addEventListener("mousemove",Dt),window.addEventListener("mouseup",Zt)},Dt=e=>{q(e.clientX)},Zt=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",Dt),window.removeEventListener("mouseup",Zt)};let G=!1,U,t;const g=e=>{e.preventDefault(),this._setDraggingStyle(!0),q(e.touches[0].clientX),G=!1},C=e=>{e.touches.length>1||(this._hasScrollBar?(U=e.touches[0].clientX,t=e.touches[0].clientY,G=!0):g(e),window.addEventListener("touchmove",i,{passive:!1}),window.addEventListener("touchend",S))},i=e=>{if(G){const a=e.touches[0].clientX-U,n=e.touches[0].clientY-t;Math.abs(a)>Math.abs(n)?g(e):(window.removeEventListener("touchmove",i),window.removeEventListener("touchend",S))}else e.preventDefault(),q(e.touches[0].clientX)},S=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",i),window.removeEventListener("touchend",S)},x=this._callOnFinishChange.bind(this),h=400;let p;const r=e=>{if(Math.abs(e.deltaX)this._max&&(F=this._max),F}_snapClampSetValue(F){this.setValue(this._clamp(this._snap(F)))}get _hasScrollBar(){const F=this.parent.root.$children;return F.scrollHeight>F.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}}class bS extends Ou{constructor(F,q,lt,Dt){super(F,q,lt,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(Dt)}options(F){return this._values=Array.isArray(F)?F:Object.values(F),this._names=Array.isArray(F)?F:Object.keys(F),this.$select.replaceChildren(),this._names.forEach(q=>{const lt=document.createElement("option");lt.textContent=q,this.$select.appendChild(lt)}),this.updateDisplay(),this}updateDisplay(){const F=this.getValue(),q=this._values.indexOf(F);return this.$select.selectedIndex=q,this.$display.textContent=q===-1?F:this._names[q],this}}class wS extends Ou{constructor(F,q,lt){super(F,q,lt,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",Dt=>{Dt.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}const TS=`.lil-gui { font-family: var(--font-family); font-size: var(--font-size); line-height: 1; @@ -4221,29 +4221,29 @@ void main() { @font-face { font-family: "lil-gui"; src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff"); -}`;function MS(_t){const F=document.createElement("style");F.innerHTML=_t;const q=document.querySelector("head link[rel=stylesheet], head style");q?document.head.insertBefore(F,q):document.head.appendChild(F)}let ky=!1;class dv{constructor({parent:F,autoPlace:q=F===void 0,container:lt,width:Dt,title:Zt="Controls",closeFolders:G=!1,injectStyles:U=!0,touchStyles:t=!0}={}){if(this.parent=F,this.root=F?F.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",g=>{(g.code==="Enter"||g.code==="Space")&&(g.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(Zt),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),t&&this.domElement.classList.add("allow-touch-styles"),!ky&&U&&(MS(AS),ky=!0),lt?lt.appendChild(this.domElement):q&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),Dt&&this.domElement.style.setProperty("--width",Dt+"px"),this._closeFolders=G}add(F,q,lt,Dt,Zt){if(Object(lt)===lt)return new wS(this,F,q,lt);const G=F[q];switch(typeof G){case"number":return new bS(this,F,q,lt,Dt,Zt);case"boolean":return new vS(this,F,q);case"string":return new TS(this,F,q);case"function":return new R0(this,F,q)}console.error(`gui.add failed +}`;function AS(_t){const F=document.createElement("style");F.innerHTML=_t;const q=document.querySelector("head link[rel=stylesheet], head style");q?document.head.insertBefore(F,q):document.head.appendChild(F)}let zy=!1;class vv{constructor({parent:F,autoPlace:q=F===void 0,container:lt,width:Dt,title:Zt="Controls",closeFolders:G=!1,injectStyles:U=!0,touchStyles:t=!0}={}){if(this.parent=F,this.root=F?F.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",g=>{(g.code==="Enter"||g.code==="Space")&&(g.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(Zt),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),t&&this.domElement.classList.add("allow-touch-styles"),!zy&&U&&(AS(TS),zy=!0),lt?lt.appendChild(this.domElement):q&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),Dt&&this.domElement.style.setProperty("--width",Dt+"px"),this._closeFolders=G}add(F,q,lt,Dt,Zt){if(Object(lt)===lt)return new bS(this,F,q,lt);const G=F[q];switch(typeof G){case"number":return new xS(this,F,q,lt,Dt,Zt);case"boolean":return new hS(this,F,q);case"string":return new wS(this,F,q);case"function":return new P0(this,F,q)}console.error(`gui.add failed property:`,q,` object:`,F,` - value:`,G)}addColor(F,q,lt=1){return new xS(this,F,q,lt)}addFolder(F){const q=new dv({parent:this,title:F});return this.root._closeFolders&&q.close(),q}load(F,q=!0){return F.controllers&&this.controllers.forEach(lt=>{lt instanceof R0||lt._name in F.controllers&<.load(F.controllers[lt._name])}),q&&F.folders&&this.folders.forEach(lt=>{lt._title in F.folders&<.load(F.folders[lt._title])}),this}save(F=!0){const q={controllers:{},folders:{}};return this.controllers.forEach(lt=>{if(!(lt instanceof R0)){if(lt._name in q.controllers)throw new Error(`Cannot save GUI with duplicate property "${lt._name}"`);q.controllers[lt._name]=lt.save()}}),F&&this.folders.forEach(lt=>{if(lt._title in q.folders)throw new Error(`Cannot save GUI with duplicate folder "${lt._title}"`);q.folders[lt._title]=lt.save()}),q}open(F=!0){return this._setClosed(!F),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(F){this._closed!==F&&(this._closed=F,this._callOnOpenClose(this))}show(F=!0){return this._hidden=!F,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(F=!0){return this._setClosed(!F),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const q=this.$children.clientHeight;this.$children.style.height=q+"px",this.domElement.classList.add("transition");const lt=Zt=>{Zt.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",lt))};this.$children.addEventListener("transitionend",lt);const Dt=F?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!F),requestAnimationFrame(()=>{this.$children.style.height=Dt+"px"})}),this}title(F){return this._title=F,this.$title.textContent=F,this}reset(F=!0){return(F?this.controllersRecursive():this.controllers).forEach(lt=>lt.reset()),this}onChange(F){return this._onChange=F,this}_callOnChange(F){this.parent&&this.parent._callOnChange(F),this._onChange!==void 0&&this._onChange.call(this,{object:F.object,property:F.property,value:F.getValue(),controller:F})}onFinishChange(F){return this._onFinishChange=F,this}_callOnFinishChange(F){this.parent&&this.parent._callOnFinishChange(F),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:F.object,property:F.property,value:F.getValue(),controller:F})}onOpenClose(F){return this._onOpenClose=F,this}_callOnOpenClose(F){this.parent&&this.parent._callOnOpenClose(F),this._onOpenClose!==void 0&&this._onOpenClose.call(this,F)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(F=>F.destroy())}controllersRecursive(){let F=Array.from(this.controllers);return this.folders.forEach(q=>{F=F.concat(q.controllersRecursive())}),F}foldersRecursive(){let F=Array.from(this.folders);return this.folders.forEach(q=>{F=F.concat(q.foldersRecursive())}),F}}var E1={exports:{}};(function(_t,F){(function(lt,Dt){_t.exports=Dt()})(self,function(){return function(){var q={79288:function(G,U,t){var g=t(3400),C={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in C){var S=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");g.addStyleRule(S,C[i])}},86712:function(G,U,t){G.exports=t(84224)},37240:function(G,U,t){G.exports=t(51132)},29744:function(G,U,t){G.exports=t(94456)},29352:function(G,U,t){G.exports=t(67244)},96144:function(G,U,t){G.exports=t(97776)},53219:function(G,U,t){G.exports=t(61712)},4624:function(G,U,t){G.exports=t(95856)},54543:function(G,U,t){G.exports=t(54272)},45e3:function(G,U,t){G.exports=t(85404)},62300:function(G,U,t){G.exports=t(26048)},6920:function(G,U,t){G.exports=t(66240)},10264:function(G,U,t){G.exports=t(40448)},32016:function(G,U,t){G.exports=t(64884)},27528:function(G,U,t){G.exports=t(15088)},75556:function(G,U,t){G.exports=t(76744)},39204:function(G,U,t){G.exports=t(94704)},73996:function(G,U,t){G.exports=t(62396)},16489:function(G,U,t){G.exports=t(32028)},5e3:function(G,U,t){G.exports=t(81932)},77280:function(G,U,t){G.exports=t(45536)},33992:function(G,U,t){G.exports=t(42600)},17600:function(G,U,t){G.exports=t(21536)},49116:function(G,U,t){G.exports=t(65664)},46808:function(G,U,t){G.exports=t(29044)},36168:function(G,U,t){G.exports=t(48928)},13792:function(G,U,t){var g=t(32016);g.register([t(37240),t(29352),t(5e3),t(33992),t(17600),t(49116),t(6920),t(67484),t(79440),t(39204),t(83096),t(36168),t(20260),t(63560),t(65832),t(46808),t(73996),t(48824),t(89904),t(25120),t(13752),t(4340),t(62300),t(29800),t(8363),t(54543),t(86636),t(42192),t(32140),t(77280),t(89296),t(56816),t(70192),t(45e3),t(27528),t(84764),t(3920),t(50248),t(4624),t(69967),t(10264),t(86152),t(53219),t(81604),t(63796),t(29744),t(89336),t(86712),t(75556),t(16489),t(97312),t(96144)]),G.exports=g},3920:function(G,U,t){G.exports=t(43480)},25120:function(G,U,t){G.exports=t(6296)},4340:function(G,U,t){G.exports=t(7404)},86152:function(G,U,t){G.exports=t(65456)},56816:function(G,U,t){G.exports=t(22020)},89296:function(G,U,t){G.exports=t(29928)},20260:function(G,U,t){G.exports=t(75792)},32140:function(G,U,t){G.exports=t(156)},84764:function(G,U,t){G.exports=t(45499)},48824:function(G,U,t){G.exports=t(3296)},69967:function(G,U,t){G.exports=t(4184)},8363:function(G,U,t){G.exports=t(36952)},86636:function(G,U,t){G.exports=t(38983)},70192:function(G,U,t){G.exports=t(11572)},81604:function(G,U,t){G.exports=t(76924)},63796:function(G,U,t){G.exports=t(62944)},89336:function(G,U,t){G.exports=t(95443)},67484:function(G,U,t){G.exports=t(34864)},97312:function(G,U,t){G.exports=t(76272)},42192:function(G,U,t){G.exports=t(97924)},29800:function(G,U,t){G.exports=t(15436)},63560:function(G,U,t){G.exports=t(5621)},89904:function(G,U,t){G.exports=t(91304)},50248:function(G,U,t){G.exports=t(41724)},65832:function(G,U,t){G.exports=t(31991)},79440:function(G,U,t){G.exports=t(22869)},13752:function(G,U,t){G.exports=t(67776)},83096:function(G,U,t){G.exports=t(95952)},72196:function(G){G.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},13916:function(G,U,t){var g=t(72196),C=t(25376),i=t(33816),S=t(31780).templatedArray;t(36208),G.exports=S("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:C({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:g.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:g.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:C({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},90272:function(G,U,t){var g=t(3400),C=t(54460),i=t(23816).draw;G.exports=function(p){var r=p._fullLayout,e=g.filterVisible(r.annotations);if(e.length&&p._fullData.length)return g.syncOrAsync([i,S],p)};function S(v){var p=v._fullLayout;g.filterVisible(p.annotations).forEach(function(r){var e=C.getFromId(v,r.xref),a=C.getFromId(v,r.yref),n=C.getRefType(r.xref),f=C.getRefType(r.yref);r._extremes={},n==="range"&&x(r,e),f==="range"&&x(r,a)})}function x(v,p){var r=p._id,e=r.charAt(0),a=v[e],n=v["a"+e],f=v[e+"ref"],c=v["a"+e+"ref"],l=v["_"+e+"padplus"],m=v["_"+e+"padminus"],h={x:1,y:-1}[e]*v[e+"shift"],b=3*v.arrowsize*v.arrowwidth||0,u=b+h,o=b-h,d=3*v.startarrowsize*v.arrowwidth||0,w=d+h,A=d-h,_;if(c===f){var y=C.findExtremes(p,[p.r2c(a)],{ppadplus:u,ppadminus:o}),E=C.findExtremes(p,[p.r2c(n)],{ppadplus:Math.max(l,w),ppadminus:Math.max(m,A)});_={min:[y.min[0],E.min[0]],max:[y.max[0],E.max[0]]}}else w=n?w+n:w,A=n?A-n:A,_=C.findExtremes(p,[p.r2c(a)],{ppadplus:Math.max(l,u,w),ppadminus:Math.max(m,o,A)});v._extremes[r]=_}},42300:function(G,U,t){var g=t(3400),C=t(24040),i=t(31780).arrayEditor;G.exports={hasClickToShow:S,onClick:x};function S(r,e){var a=v(r,e);return a.on.length>0||a.explicitOff.length>0}function x(r,e){var a=v(r,e),n=a.on,f=a.off.concat(a.explicitOff),c={},l=r._fullLayout.annotations,m,h;if(n.length||f.length){for(m=0;m.6666666666666666?$e="right":$e="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[$e]}for(var It=!1,re=["x","y"],Kt=0;Kt1)&&(he===le?(jt=de.r2fraction(d["a"+$t]),(jt<0||jt>1)&&(It=!0)):It=!0),Ft=de._offset+de.r2p(d[$t]),Et=.5}else{var ie=Nt==="domain";$t==="x"?(yt=d[$t],Ft=ie?de._offset+de._length*yt:Ft=T.l+T.w*yt):(yt=1-d[$t],Ft=ie?de._offset+de._length*yt:Ft=T.t+T.h*yt),Et=d.showarrow?.5:yt}if(d.showarrow){Wt.head=Ft;var me=d["a"+$t];if(Mt=Se*Vt(.5,d.xanchor)-ne*Vt(.5,d.yanchor),he===le){var be=v.getRefType(he);be==="domain"?($t==="y"&&(me=1-me),Wt.tail=de._offset+de._length*me):be==="paper"?$t==="y"?(me=1-me,Wt.tail=T.t+T.h*me):Wt.tail=T.l+T.w*me:Wt.tail=de._offset+de.r2p(me),xt=Mt}else Wt.tail=Ft+me,xt=Mt+me;Wt.text=Wt.tail+Mt;var ve=E[$t==="x"?"width":"height"];if(le==="paper"&&(Wt.head=S.constrain(Wt.head,1,ve-1)),he==="pixel"){var Le=-Math.max(Wt.tail-3,Wt.text),ce=Math.min(Wt.tail+3,Wt.text)-ve;Le>0?(Wt.tail+=Le,Wt.text+=Le):ce>0&&(Wt.tail-=ce,Wt.text-=ce)}Wt.tail+=Jt,Wt.head+=Jt}else Mt=zt*Vt(Et,Xt),xt=Mt,Wt.text=Ft+Mt;Wt.text+=Jt,Mt+=Jt,xt+=Jt,d["_"+$t+"padplus"]=zt/2+xt,d["_"+$t+"padminus"]=zt/2-xt,d["_"+$t+"size"]=zt,d["_"+$t+"shift"]=Mt}if(It){ut.remove();return}var Te=0,Be=0;if(d.align!=="left"&&(Te=(Lt-At)*(d.align==="center"?.5:1)),d.valign!=="top"&&(Be=(Ht-mt)*(d.valign==="middle"?.5:1)),Rt)wt.select("svg").attr({x:tt+Te-1,y:tt+Be}).call(r.setClipUrl,Q?k:null,o);else{var ir=tt+Be-bt.top,pe=tt+Te-bt.left;st.call(a.positionText,pe,ir).call(r.setClipUrl,Q?k:null,o)}ot.select("rect").call(r.setRect,tt,tt,Lt,Ht),V.call(r.setRect,J/2,J/2,Ut-J,kt-J),ut.call(r.setTranslate,Math.round(B.x.text-Ut/2),Math.round(B.y.text-kt/2)),Y.attr({transform:"rotate("+O+","+B.x.text+","+B.y.text+")"});var Xe=function(or,$e){H.selectAll(".annotation-arrow-g").remove();var ge=B.x.head,se=B.y.head,Ae=B.x.tail+or,Ce=B.y.tail+$e,Ie=B.x.text+or,Pe=B.y.text+$e,ke=S.rotationXYMatrix(O,Ie,Pe),Ve=S.apply2DTransform(ke),Je=S.apply2DTransform2(ke),ur=+V.attr("width"),hr=+V.attr("height"),vr=Ie-.5*ur,Yt=vr+ur,Gt=Pe-.5*hr,Ne=Gt+hr,Oe=[[vr,Gt,vr,Ne],[vr,Ne,Yt,Ne],[Yt,Ne,Yt,Gt],[Yt,Gt,vr,Gt]].map(Je);if(!Oe.reduce(function(Dr,cn){return Dr^!!S.segmentsIntersect(ge,se,ge+1e6,se+1e6,cn[0],cn[1],cn[2],cn[3])},!1)){Oe.forEach(function(Dr){var cn=S.segmentsIntersect(Ae,Ce,ge,se,Dr[0],Dr[1],Dr[2],Dr[3]);cn&&(Ae=cn.x,Ce=cn.y)});var Qe=d.arrowwidth,er=d.arrowcolor,fr=d.arrowside,rr=H.append("g").style({opacity:p.opacity(er)}).classed("annotation-arrow-g",!0),He=rr.append("path").attr("d","M"+Ae+","+Ce+"L"+ge+","+se).style("stroke-width",Qe+"px").call(p.stroke,p.rgb(er));if(l(He,fr,d),s.annotationPosition&&He.node().parentNode&&!A){var dr=ge,mr=se;if(d.standoff){var xr=Math.sqrt(Math.pow(ge-Ae,2)+Math.pow(se-Ce,2));dr+=d.standoff*(Ae-ge)/xr,mr+=d.standoff*(Ce-se)/xr}var pr=rr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Ae-dr)+","+(Ce-mr),transform:x(dr,mr)}).style("stroke-width",Qe+6+"px").call(p.stroke,"rgba(0,0,0,0)").call(p.fill,"rgba(0,0,0,0)"),Gr,Pr;f.init({element:pr.node(),gd:o,prepFn:function(){var Dr=r.getTranslate(ut);Gr=Dr.x,Pr=Dr.y,_&&_.autorange&&D(_._name+".autorange",!0),y&&y.autorange&&D(y._name+".autorange",!0)},moveFn:function(Dr,cn){var rn=Ve(Gr,Pr),Cn=rn[0]+Dr,En=rn[1]+cn;ut.call(r.setTranslate,Cn,En),N("x",b(_,Dr,"x",T,d)),N("y",b(y,cn,"y",T,d)),d.axref===d.xref&&N("ax",b(_,Dr,"ax",T,d)),d.ayref===d.yref&&N("ay",b(y,cn,"ay",T,d)),rr.attr("transform",x(Dr,cn)),Y.attr({transform:"rotate("+O+","+Cn+","+En+")"})},doneFn:function(){C.call("_guiRelayout",o,I());var Dr=document.querySelector(".js-notes-box-panel");Dr&&Dr.redraw(Dr.selectedObj)}})}}};if(d.showarrow&&Xe(0,0),j){var Ke;f.init({element:ut.node(),gd:o,prepFn:function(){Ke=Y.attr("transform")},moveFn:function(or,$e){var ge="pointer";if(d.showarrow)d.axref===d.xref?N("ax",b(_,or,"ax",T,d)):N("ax",d.ax+or),d.ayref===d.yref?N("ay",b(y,$e,"ay",T.w,d)):N("ay",d.ay+$e),Xe(or,$e);else{if(A)return;var se,Ae;if(_)se=b(_,or,"x",T,d);else{var Ce=d._xsize/T.w,Ie=d.x+(d._xshift-d.xshift)/T.w-Ce/2;se=f.align(Ie+or/T.w,Ce,0,1,d.xanchor)}if(y)Ae=b(y,$e,"y",T,d);else{var Pe=d._ysize/T.h,ke=d.y-(d._yshift+d.yshift)/T.h-Pe/2;Ae=f.align(ke-$e/T.h,Pe,0,1,d.yanchor)}N("x",se),N("y",Ae),(!_||!y)&&(ge=f.getCursor(_?.5:se,y?.5:Ae,d.xanchor,d.yanchor))}Y.attr({transform:x(or,$e)+Ke}),n(ut,ge)},clickFn:function(or,$e){d.captureevents&&o.emit("plotly_clickannotation",it($e))},doneFn:function(){n(ut),C.call("_guiRelayout",o,I());var or=document.querySelector(".js-notes-box-panel");or&&or.redraw(or.selectedObj)}})}}s.annotationText?st.call(a.makeEditable,{delegate:ut,gd:o}).call(nt).on("edit",function(gt){d.text=gt,this.call(nt),N("text",gt),_&&_.autorange&&D(_._name+".autorange",!0),y&&y.autorange&&D(y._name+".autorange",!0),C.call("_guiRelayout",o,I())}):st.call(nt)}},33652:function(G,U,t){var g=t(33428),C=t(76308),i=t(72196),S=t(3400),x=S.strScale,v=S.strRotate,p=S.strTranslate;G.exports=function(e,a,n){var f=e.node(),c=i[n.arrowhead||0],l=i[n.startarrowhead||0],m=(n.arrowwidth||1)*(n.arrowsize||1),h=(n.arrowwidth||1)*(n.startarrowsize||1),b=a.indexOf("start")>=0,u=a.indexOf("end")>=0,o=c.backoff*m+n.standoff,d=l.backoff*h+n.startstandoff,w,A,_,y;if(f.nodeName==="line"){w={x:+e.attr("x1"),y:+e.attr("y1")},A={x:+e.attr("x2"),y:+e.attr("y2")};var E=w.x-A.x,T=w.y-A.y;if(_=Math.atan2(T,E),y=_+Math.PI,o&&d&&o+d>Math.sqrt(E*E+T*T)){Y();return}if(o){if(o*o>E*E+T*T){Y();return}var s=o*Math.cos(_),L=o*Math.sin(_);A.x+=s,A.y+=L,e.attr({x2:A.x,y2:A.y})}if(d){if(d*d>E*E+T*T){Y();return}var M=d*Math.cos(_),z=d*Math.sin(_);w.x-=M,w.y-=z,e.attr({x1:w.x,y1:w.y})}}else if(f.nodeName==="path"){var D=f.getTotalLength(),N="";if(D1){n=!0;break}}n?x.fullLayout._infolayer.select(".annotation-"+x.id+'[data-index="'+e+'"]').remove():(a._pdata=C(x.glplot.cameraParams,[v.xaxis.r2l(a.x)*p[0],v.yaxis.r2l(a.y)*p[1],v.zaxis.r2l(a.z)*p[2]]),g(x.graphDiv,a,e,x.id,a._xa,a._ya))}}},56864:function(G,U,t){var g=t(24040),C=t(3400);G.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:t(45899)}}},layoutAttributes:t(45899),handleDefaults:t(52808),includeBasePlot:i,convert:t(42456),draw:t(71836)};function i(S,x){var v=g.subplotsRegistry.gl3d;if(v)for(var p=v.attrRegex,r=Object.keys(S),e=0;e=0)))return e;if(l===3)f[l]>1&&(f[l]=1);else if(f[l]>=1)return e}var m=Math.round(f[0]*255)+", "+Math.round(f[1]*255)+", "+Math.round(f[2]*255);return c?"rgba("+m+", "+f[3]+")":"rgb("+m+")"}},42996:function(G,U,t){var g=t(94724),C=t(25376),i=t(92880).extendFlat,S=t(67824).overrideAll;G.exports=S({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:g.linecolor,outlinewidth:g.linewidth,bordercolor:g.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:i({},g.ticks,{dflt:""}),ticklabeloverflow:i({},g.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:C({}),tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,separatethousands:g.separatethousands,exponentformat:g.exponentformat,minexponent:g.minexponent,showexponent:g.showexponent,title:{text:{valType:"string"},font:C({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:C({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},63964:function(G){G.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},64013:function(G,U,t){var g=t(3400),C=t(31780),i=t(26332),S=t(25404),x=t(95936),v=t(42568),p=t(42996);G.exports=function(e,a,n){var f=C.newContainer(a,"colorbar"),c=e.colorbar||{};function l(B,O){return g.coerce(c,f,p,B,O)}var m=n.margin||{t:0,b:0,l:0,r:0},h=n.width-m.l-m.r,b=n.height-m.t-m.b,u=l("orientation"),o=u==="v",d=l("thicknessmode");l("thickness",d==="fraction"?30/(o?h:b):30);var w=l("lenmode");l("len",w==="fraction"?1:o?b:h);var A=l("yref"),_=l("xref"),y=A==="paper",E=_==="paper",T,s,L,M="left";o?(L="middle",M=E?"left":"right",T=E?1.02:1,s=.5):(L=y?"bottom":"top",M="center",T=.5,s=y?1.02:1),g.coerce(c,f,{x:{valType:"number",min:E?-2:0,max:E?3:1,dflt:T}},"x"),g.coerce(c,f,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:s}},"y"),l("xanchor",M),l("xpad"),l("yanchor",L),l("ypad"),g.noneOrAll(c,f,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var z=g.coerce(c,f,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:o?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",z.indexOf("inside")!==-1?"hide past domain":"hide past div"),i(c,f,l,"linear");var D=n.font,N={noAutotickangles:!0,outerTicks:!1,font:D};z.indexOf("inside")!==-1&&(N.bgColor="black"),v(c,f,l,"linear",N),x(c,f,l,"linear",N),S(c,f,l,"linear",N),l("title.text",n._dfltTitle.colorbar);var I=f.showticklabels?f.tickfont:D,k=g.extendFlat({},I,{color:D.color,size:g.bigFont(I.size)});g.coerceFont(l,"title.font",k),l("title.side",o?"top":"right")}},37848:function(G,U,t){var g=t(33428),C=t(49760),i=t(7316),S=t(24040),x=t(54460),v=t(86476),p=t(3400),r=p.strTranslate,e=t(92880).extendFlat,a=t(93972),n=t(43616),f=t(76308),c=t(81668),l=t(72736),m=t(94288).flipScale,h=t(28336),b=t(37668),u=t(94724),o=t(84284),d=o.LINE_SPACING,w=o.FROM_TL,A=o.FROM_BR,_=t(63964).cn;function y(z){var D=z._fullLayout,N=D._infolayer.selectAll("g."+_.colorbar).data(E(z),function(I){return I._id});N.enter().append("g").attr("class",function(I){return I._id}).classed(_.colorbar,!0),N.each(function(I){var k=g.select(this);p.ensureSingle(k,"rect",_.cbbg),p.ensureSingle(k,"g",_.cbfills),p.ensureSingle(k,"g",_.cblines),p.ensureSingle(k,"g",_.cbaxis,function(O){O.classed(_.crisp,!0)}),p.ensureSingle(k,"g",_.cbtitleunshift,function(O){O.append("g").classed(_.cbtitle,!0)}),p.ensureSingle(k,"rect",_.cboutline);var B=T(k,I,z);B&&B.then&&(z._promises||[]).push(B),z._context.edits.colorbarPosition&&s(k,I,z)}),N.exit().each(function(I){i.autoMargin(z,I._id)}).remove(),N.order()}function E(z){var D=z._fullLayout,N=z.calcdata,I=[],k,B,O,H;function Y($){return e($,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function j(){typeof H.calc=="function"?H.calc(z,O,k):(k._fillgradient=B.reversescale?m(B.colorscale):B.colorscale,k._zrange=[B[H.min],B[H.max]])}for(var et=0;et1){var Wt=Math.pow(10,Math.floor(Math.log(Jt)/Math.LN10));zt*=Wt*p.roundUp(Jt/Wt,[2,5,10]),(Math.abs(bt.start)/bt.size+1e-6)%1<2e-6&&(Se.tick0=0)}Se.dtick=zt}Se.domain=I?[de+X/Z.h,de+Vt-X/Z.h]:[de+J/Z.w,de+Vt-J/Z.w],Se.setScale(),z.attr("transform",r(Math.round(Z.l),Math.round(Z.t)));var Ft=z.select("."+_.cbtitleunshift).attr("transform",r(-Math.round(Z.l),-Math.round(Z.t))),xt=Se.ticklabelposition,yt=Se.title.font.size,Et=z.select("."+_.cbaxis),Mt,Nt=0,jt=0;function ie(ce,Te){var Be={propContainer:Se,propName:D._propPrefix+"title",traceIndex:D._traceIndex,_meta:D._meta,placeholder:$._dfltTitle.colorbar,containerGroup:z.select("."+_.cbtitle)},ir=ce.charAt(0)==="h"?ce.substr(1):"h"+ce;z.selectAll("."+ir+",."+ir+"-math-group").remove(),c.draw(N,ce,e(Be,Te||{}))}function me(){if(I&&ne||!I&&!ne){var ce,Te;gt==="top"&&(ce=J+Z.l+It*tt,Te=X+Z.t+re*(1-de-Vt)+3+yt*.75),gt==="bottom"&&(ce=J+Z.l+It*tt,Te=X+Z.t+re*(1-de)-3-yt*.25),gt==="right"&&(Te=X+Z.t+re*V+3+yt*.75,ce=J+Z.l+It*de),ie(Se._id+"title",{attributes:{x:ce,y:Te,"text-anchor":I?"start":"middle"}})}}function be(){if(I&&!ne||!I&&ne){var ce=Se.position||0,Te=Se._offset+Se._length/2,Be,ir;if(gt==="right")ir=Te,Be=Z.l+It*ce+10+yt*(Se.showticklabels?1:.5);else if(Be=Te,gt==="bottom"&&(ir=Z.t+re*ce+10+(xt.indexOf("inside")===-1?Se.tickfont.size:0)+(Se.ticks!=="intside"&&D.ticklen||0)),gt==="top"){var pe=ct.text.split("
    ").length;ir=Z.t+re*ce+10-Ht-d*yt*pe}ie((I?"h":"v")+Se._id+"title",{avoid:{selection:g.select(N).selectAll("g."+Se._id+"tick"),side:gt,offsetTop:I?0:Z.t,offsetLeft:I?Z.l:0,maxShift:I?$.width:$.height},attributes:{x:Be,y:ir,"text-anchor":"middle"},transform:{rotate:I?-90:0,offset:0}})}}function ve(){if(!I&&!ne||I&&ne){var ce=z.select("."+_.cbtitle),Te=ce.select("text"),Be=[-Y/2,Y/2],ir=ce.select(".h"+Se._id+"title-math-group").node(),pe=15.6;Te.node()&&(pe=parseInt(Te.node().style.fontSize,10)*d);var Xe;if(ir?(Xe=n.bBox(ir),jt=Xe.width,Nt=Xe.height,Nt>pe&&(Be[1]-=(Nt-pe)/2)):Te.node()&&!Te.classed(_.jsPlaceholder)&&(Xe=n.bBox(Te.node()),jt=Xe.width,Nt=Xe.height),I){if(Nt){if(Nt+=5,gt==="top")Se.domain[1]-=Nt/Z.h,Be[1]*=-1;else{Se.domain[0]+=Nt/Z.h;var Ke=l.lineCount(Te);Be[1]+=(1-Ke)*pe}ce.attr("transform",r(Be[0],Be[1])),Se.setScale()}}else jt&&(gt==="right"&&(Se.domain[0]+=(jt+yt/2)/Z.w),ce.attr("transform",r(Be[0],Be[1])),Se.setScale())}z.selectAll("."+_.cbfills+",."+_.cblines).attr("transform",I?r(0,Math.round(Z.h*(1-Se.domain[1]))):r(Math.round(Z.w*Se.domain[0]),0)),Et.attr("transform",I?r(0,Math.round(-Z.t)):r(Math.round(-Z.l),0));var or=z.select("."+_.cbfills).selectAll("rect."+_.cbfill).attr("style","").data(mt);or.enter().append("rect").classed(_.cbfill,!0).attr("style",""),or.exit().remove();var $e=Tt.map(Se.c2p).map(Math.round).sort(function(Ie,Pe){return Ie-Pe});or.each(function(Ie,Pe){var ke=[Pe===0?Tt[0]:(mt[Pe]+mt[Pe-1])/2,Pe===mt.length-1?Tt[1]:(mt[Pe]+mt[Pe+1])/2].map(Se.c2p).map(Math.round);I&&(ke[1]=p.constrain(ke[1]+(ke[1]>ke[0])?1:-1,$e[0],$e[1]));var Ve=g.select(this).attr(I?"x":"y",Kt).attr(I?"y":"x",g.min(ke)).attr(I?"width":"height",Math.max(Ht,2)).attr(I?"height":"width",Math.max(g.max(ke)-g.min(ke),2));if(D._fillgradient)n.gradient(Ve,N,D._id,I?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var Je=Rt(Ie).replace("e-","");Ve.attr("fill",C(Je).toHexString())}});var ge=z.select("."+_.cblines).selectAll("path."+_.cbline).data(nt.color&&nt.width?Lt:[]);ge.enter().append("path").classed(_.cbline,!0),ge.exit().remove(),ge.each(function(Ie){var Pe=Kt,ke=Math.round(Se.c2p(Ie))+nt.width/2%1;g.select(this).attr("d","M"+(I?Pe+","+ke:ke+","+Pe)+(I?"h":"v")+Ht).call(n.lineGroupStyle,nt.width,wt(Ie),nt.dash)}),Et.selectAll("g."+Se._id+"tick,path").remove();var se=Kt+Ht+(Y||0)/2-(D.ticks==="outside"?1:0),Ae=x.calcTicks(Se),Ce=x.getTickSigns(Se)[2];return x.drawTicks(N,Se,{vals:Se.ticks==="inside"?x.clipEnds(Se,Ae):Ae,layer:Et,path:x.makeTickPath(Se,se,Ce),transFn:x.makeTransTickFn(Se)}),x.drawLabels(N,Se,{vals:Ae,layer:Et,transFn:x.makeTransTickLabelFn(Se),labelFns:x.makeLabelFns(Se,se)})}function Le(){var ce,Te=Ht+Y/2;xt.indexOf("inside")===-1&&(ce=n.bBox(Et.node()),Te+=I?ce.width:ce.height),Mt=Ft.select("text");var Be=0,ir=I&>==="top",pe=!I&>==="right",Xe=0;if(Mt.node()&&!Mt.classed(_.jsPlaceholder)){var Ke,or=Ft.select(".h"+Se._id+"title-math-group").node();or&&(I&&ne||!I&&!ne)?(ce=n.bBox(or),Be=ce.width,Ke=ce.height):(ce=n.bBox(Ft.node()),Be=ce.right-Z.l-(I?Kt:xe),Ke=ce.bottom-Z.t-(I?xe:Kt),!I&>==="top"&&(Te+=ce.height,Xe=ce.height)),pe&&(Mt.attr("transform",r(Be/2+yt/2,0)),Be*=2),Te=Math.max(Te,I?Be:Ke)}var $e=(I?J:X)*2+Te+j+Y/2,ge=0;!I&&ct.text&&ut==="bottom"&&V<=0&&(ge=$e/2,$e+=ge,Xe+=ge),$._hColorbarMoveTitle=ge,$._hColorbarMoveCBTitle=Xe;var se=j+Y,Ae=(I?Kt:xe)-se/2-(I?J:0),Ce=(I?xe:Kt)-(I?kt:X+Xe-ge);z.select("."+_.cbbg).attr("x",Ae).attr("y",Ce).attr(I?"width":"height",Math.max($e-ge,2)).attr(I?"height":"width",Math.max(kt+se,2)).call(f.fill,et).call(f.stroke,D.bordercolor).style("stroke-width",j);var Ie=pe?Math.max(Be-10,0):0;z.selectAll("."+_.cboutline).attr("x",(I?Kt:xe+J)+Ie).attr("y",(I?xe+X-kt:Kt)+(ir?Nt:0)).attr(I?"width":"height",Math.max(Ht,2)).attr(I?"height":"width",Math.max(kt-(I?2*X+Nt:2*J+Ie),2)).call(f.stroke,D.outlinecolor).style({fill:"none","stroke-width":Y});var Pe=I?$t*$e:0,ke=I?0:(1-le)*$e-Xe;if(Pe=ot?Z.l-Pe:-Pe,ke=Q?Z.t-ke:-ke,z.attr("transform",r(Pe,ke)),!I&&(j||C(et).getAlpha()&&!C.equals($.paper_bgcolor,et))){var Ve=Et.selectAll("text"),Je=Ve[0].length,ur=z.select("."+_.cbbg).node(),hr=n.bBox(ur),vr=n.getTranslate(z),Yt=2;Ve.each(function(mr,xr){var pr=0,Gr=Je-1;if(xr===pr||xr===Gr){var Pr=n.bBox(this),Dr=n.getTranslate(this),cn;if(xr===Gr){var rn=Pr.right+Dr.x,Cn=hr.right+vr.x+xe-j-Yt+tt;cn=Cn-rn,cn>0&&(cn=0)}else if(xr===pr){var En=Pr.left+Dr.x,Tr=hr.left+vr.x+xe+j+Yt;cn=Tr-En,cn<0&&(cn=0)}cn&&(Je<3?this.setAttribute("transform","translate("+cn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Gt={},Ne=w[it],Oe=A[it],Qe=w[ut],er=A[ut],fr=$e-Ht;I?(B==="pixels"?(Gt.y=V,Gt.t=kt*Qe,Gt.b=kt*er):(Gt.t=Gt.b=0,Gt.yt=V+k*Qe,Gt.yb=V-k*er),H==="pixels"?(Gt.x=tt,Gt.l=$e*Ne,Gt.r=$e*Oe):(Gt.l=fr*Ne,Gt.r=fr*Oe,Gt.xl=tt-O*Ne,Gt.xr=tt+O*Oe)):(B==="pixels"?(Gt.x=tt,Gt.l=kt*Ne,Gt.r=kt*Oe):(Gt.l=Gt.r=0,Gt.xl=tt+k*Ne,Gt.xr=tt-k*Oe),H==="pixels"?(Gt.y=1-V,Gt.t=$e*Qe,Gt.b=$e*er):(Gt.t=fr*Qe,Gt.b=fr*er,Gt.yt=V-O*Qe,Gt.yb=V+O*er));var rr=D.y<.5?"b":"t",He=D.x<.5?"l":"r";N._fullLayout._reservedMargin[D._id]={};var dr={r:$.width-Ae-Pe,l:Ae+Gt.r,b:$.height-Ce-ke,t:Ce+Gt.b};ot&&Q?i.autoMargin(N,D._id,Gt):ot?N._fullLayout._reservedMargin[D._id][rr]=dr[rr]:Q||I?N._fullLayout._reservedMargin[D._id][He]=dr[He]:N._fullLayout._reservedMargin[D._id][rr]=dr[rr]}return p.syncOrAsync([i.previousPromises,me,ve,be,i.previousPromises,Le],N)}function s(z,D,N){var I=D.orientation==="v",k=N._fullLayout,B=k._size,O,H,Y;v.init({element:z.node(),gd:N,prepFn:function(){O=z.attr("transform"),a(z)},moveFn:function(j,et){z.attr("transform",O+r(j,et)),H=v.align((I?D._uFrac:D._vFrac)+j/B.w,I?D._thickFrac:D._lenFrac,0,1,D.xanchor),Y=v.align((I?D._vFrac:1-D._uFrac)-et/B.h,I?D._lenFrac:D._thickFrac,0,1,D.yanchor);var it=v.getCursor(H,Y,D.xanchor,D.yanchor);a(z,it)},doneFn:function(){if(a(z),H!==void 0&&Y!==void 0){var j={};j[D._propPrefix+"x"]=H,j[D._propPrefix+"y"]=Y,D._traceIndex!==void 0?S.call("_guiRestyle",N,j,D._traceIndex):S.call("_guiRelayout",N,j)}}})}function L(z,D,N){var I=D._levels,k=[],B=[],O,H,Y=I.end+I.size/100,j=I.size,et=1.001*N[0]-.001*N[1],it=1.001*N[1]-.001*N[0];for(H=0;H<1e5&&(O=I.start+H*j,!(j>0?O>=Y:O<=Y));H++)O>et&&O0?O>=Y:O<=Y));H++)O>N[0]&&Oh-l?l=h-(m-h):m-h=0?o=r.colorscale.sequential:o=r.colorscale.sequentialminus,f._sync("colorscale",o)}}},95504:function(G,U,t){var g=t(3400),C=t(94288).hasColorscale,i=t(94288).extractOpts;G.exports=function(x,v){function p(l,m){var h=l["_"+m];h!==void 0&&(l[m]=h)}function r(l,m){var h=m.container?g.nestedProperty(l,m.container).get():l;if(h)if(h.coloraxis)h._colorAx=v[h.coloraxis];else{var b=i(h),u=b.auto;(u||b.min===void 0)&&p(h,m.min),(u||b.max===void 0)&&p(h,m.max),b.autocolorscale&&p(h,"colorscale")}}for(var e=0;e=0;o--,d++){var w=h[o];u[d]=[1-w[0],w[1]]}return u}function c(h,b){b=b||{};for(var u=h.domain,o=h.range,d=o.length,w=new Array(d),A=0;A1.3333333333333333-p?v:p}},67416:function(G,U,t){var g=t(3400),C=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];G.exports=function(S,x,v,p){return v==="left"?S=0:v==="center"?S=1:v==="right"?S=2:S=g.constrain(Math.floor(S*3),0,2),p==="bottom"?x=0:p==="middle"?x=1:p==="top"?x=2:x=g.constrain(Math.floor(x*3),0,2),C[x][S]}},72760:function(G,U){U.selectMode=function(t){return t==="lasso"||t==="select"},U.drawMode=function(t){return t==="drawclosedpath"||t==="drawopenpath"||t==="drawline"||t==="drawrect"||t==="drawcircle"},U.openMode=function(t){return t==="drawline"||t==="drawopenpath"},U.rectMode=function(t){return t==="select"||t==="drawline"||t==="drawrect"||t==="drawcircle"},U.freeMode=function(t){return t==="lasso"||t==="drawclosedpath"||t==="drawopenpath"},U.selectingOrDrawing=function(t){return U.freeMode(t)||U.rectMode(t)}},86476:function(G,U,t){var g=t(29128),C=t(52264),i=t(89184),S=t(3400).removeElement,x=t(33816),v=G.exports={};v.align=t(78316),v.getCursor=t(67416);var p=t(2616);v.unhover=p.wrapped,v.unhoverRaw=p.raw,v.init=function(n){var f=n.gd,c=1,l=f._context.doubleClickDelay,m=n.element,h,b,u,o,d,w,A,_;f._mouseDownTime||(f._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=T,i?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=T,m.addEventListener("touchstart",T,{passive:!1})):m.ontouchstart=T;function y(M,z,D){return Math.abs(M)"u"&&typeof M.clientY>"u"&&(M.clientX=h,M.clientY=b),u=new Date().getTime(),u-f._mouseDownTimel&&(c=Math.max(c-1,1)),f._dragged)n.doneFn&&n.doneFn();else if(n.clickFn&&n.clickFn(c,w),!_){var z;try{z=new MouseEvent("click",M)}catch{var D=e(M);z=document.createEvent("MouseEvents"),z.initMouseEvent("click",M.bubbles,M.cancelable,M.view,M.detail,M.screenX,M.screenY,D[0],D[1],M.ctrlKey,M.altKey,M.shiftKey,M.metaKey,M.button,M.relatedTarget)}A.dispatchEvent(z)}f._dragging=!1,f._dragged=!1}};function r(){var a=document.createElement("div");a.className="dragcover";var n=a.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(a),a}v.coverSlip=r;function e(a){return g(a.changedTouches?a.changedTouches[0]:a,document.body)}},2616:function(G,U,t){var g=t(95924),C=t(91200),i=t(52200).getGraphDiv,S=t(92456),x=G.exports={};x.wrapped=function(v,p,r){v=i(v),v._fullLayout&&C.clear(v._fullLayout._uid+S.HOVERID),x.raw(v,p,r)},x.raw=function(p,r){var e=p._fullLayout,a=p._hoverdata;r||(r={}),!(r.target&&!p._dragged&&g.triggerHandler(p,"plotly_beforehover",r)===!1)&&(e._hoverlayer.selectAll("g").remove(),e._hoverlayer.selectAll("line").remove(),e._hoverlayer.selectAll("circle").remove(),p._hoverdata=void 0,r.target&&a&&p.emit("plotly_unhover",{event:r,points:a}))}},98192:function(G,U){U.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},U.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},43616:function(G,U,t){var g=t(33428),C=t(3400),i=C.numberFormat,S=t(38248),x=t(49760),v=t(24040),p=t(76308),r=t(8932),e=C.strTranslate,a=t(72736),n=t(9616),f=t(84284),c=f.LINE_SPACING,l=t(13448).DESELECTDIM,m=t(43028),h=t(7152),b=t(10624).appendArrayPointValue,u=G.exports={};u.font=function(bt,At,mt,Lt){C.isPlainObject(At)&&(Lt=At.color,mt=At.size,At=At.family),At&&bt.style("font-family",At),mt+1&&bt.style("font-size",mt+"px"),Lt&&bt.call(p.fill,Lt)},u.setPosition=function(bt,At,mt){bt.attr("x",At).attr("y",mt)},u.setSize=function(bt,At,mt){bt.attr("width",At).attr("height",mt)},u.setRect=function(bt,At,mt,Lt,Ht){bt.call(u.setPosition,At,mt).call(u.setSize,Lt,Ht)},u.translatePoint=function(bt,At,mt,Lt){var Ht=mt.c2p(bt.x),Ut=Lt.c2p(bt.y);if(S(Ht)&&S(Ut)&&At.node())At.node().nodeName==="text"?At.attr("x",Ht).attr("y",Ut):At.attr("transform",e(Ht,Ut));else return!1;return!0},u.translatePoints=function(bt,At,mt){bt.each(function(Lt){var Ht=g.select(this);u.translatePoint(Lt,Ht,At,mt)})},u.hideOutsideRangePoint=function(bt,At,mt,Lt,Ht,Ut){At.attr("display",mt.isPtWithinRange(bt,Ht)&&Lt.isPtWithinRange(bt,Ut)?null:"none")},u.hideOutsideRangePoints=function(bt,At){if(At._hasClipOnAxisFalse){var mt=At.xaxis,Lt=At.yaxis;bt.each(function(Ht){var Ut=Ht[0].trace,kt=Ut.xcalendar,Vt=Ut.ycalendar,It=v.traceIs(Ut,"bar-like")?".bartext":".point,.textpoint";bt.selectAll(It).each(function(re){u.hideOutsideRangePoint(re,g.select(this),mt,Lt,kt,Vt)})})}},u.crispRound=function(bt,At,mt){return!At||!S(At)?mt||0:bt._context.staticPlot?At:At<1?1:Math.round(At)},u.singleLineStyle=function(bt,At,mt,Lt,Ht){At.style("fill","none");var Ut=(((bt||[])[0]||{}).trace||{}).line||{},kt=mt||Ut.width||0,Vt=Ht||Ut.dash||"";p.stroke(At,Lt||Ut.color),u.dashLine(At,Vt,kt)},u.lineGroupStyle=function(bt,At,mt,Lt){bt.style("fill","none").each(function(Ht){var Ut=(((Ht||[])[0]||{}).trace||{}).line||{},kt=At||Ut.width||0,Vt=Lt||Ut.dash||"";g.select(this).call(p.stroke,mt||Ut.color).call(u.dashLine,Vt,kt)})},u.dashLine=function(bt,At,mt){mt=+mt||0,At=u.dashStyle(At,mt),bt.style({"stroke-dasharray":At,"stroke-width":mt+"px"})},u.dashStyle=function(bt,At){At=+At||1;var mt=Math.max(At,3);return bt==="solid"?bt="":bt==="dot"?bt=mt+"px,"+mt+"px":bt==="dash"?bt=3*mt+"px,"+3*mt+"px":bt==="longdash"?bt=5*mt+"px,"+5*mt+"px":bt==="dashdot"?bt=3*mt+"px,"+mt+"px,"+mt+"px,"+mt+"px":bt==="longdashdot"&&(bt=5*mt+"px,"+2*mt+"px,"+mt+"px,"+2*mt+"px"),bt};function o(bt,At,mt,Lt){var Ht=At.fillpattern,Ut=At.fillgradient,kt=Ht&&u.getPatternAttr(Ht.shape,0,"");if(kt){var Vt=u.getPatternAttr(Ht.bgcolor,0,null),It=u.getPatternAttr(Ht.fgcolor,0,null),re=Ht.fgopacity,Kt=u.getPatternAttr(Ht.size,0,8),$t=u.getPatternAttr(Ht.solidity,0,.3),le=At.uid;u.pattern(bt,"point",mt,le,kt,Kt,$t,void 0,Ht.fillmode,Vt,It,re)}else if(Ut&&Ut.type!=="none"){var he=Ut.type,de="scatterfill-"+At.uid;if(Lt&&(de="legendfill-"+At.uid),!Lt&&(Ut.start!==void 0||Ut.stop!==void 0)){var xe,Se;he==="horizontal"?(xe={x:Ut.start,y:0},Se={x:Ut.stop,y:0}):he==="vertical"&&(xe={x:0,y:Ut.start},Se={x:0,y:Ut.stop}),xe.x=At._xA.c2p(xe.x===void 0?At._extremes.x.min[0].val:xe.x,!0),xe.y=At._yA.c2p(xe.y===void 0?At._extremes.y.min[0].val:xe.y,!0),Se.x=At._xA.c2p(Se.x===void 0?At._extremes.x.max[0].val:Se.x,!0),Se.y=At._yA.c2p(Se.y===void 0?At._extremes.y.max[0].val:Se.y,!0),bt.call(T,mt,de,"linear",Ut.colorscale,"fill",xe,Se,!0,!1)}else he==="horizontal"&&(he=he+"reversed"),bt.call(u.gradient,mt,de,he,Ut.colorscale,"fill")}else At.fillcolor&&bt.call(p.fill,At.fillcolor)}u.singleFillStyle=function(bt,At){var mt=g.select(bt.node()),Lt=mt.data(),Ht=((Lt[0]||[])[0]||{}).trace||{};o(bt,Ht,At,!1)},u.fillGroupStyle=function(bt,At,mt){bt.style("stroke-width",0).each(function(Lt){var Ht=g.select(this);Lt[0].trace&&o(Ht,Lt[0].trace,At,mt)})};var d=t(71984);u.symbolNames=[],u.symbolFuncs=[],u.symbolBackOffs=[],u.symbolNeedLines={},u.symbolNoDot={},u.symbolNoFill={},u.symbolList=[],Object.keys(d).forEach(function(bt){var At=d[bt],mt=At.n;u.symbolList.push(mt,String(mt),bt,mt+100,String(mt+100),bt+"-open"),u.symbolNames[mt]=bt,u.symbolFuncs[mt]=At.f,u.symbolBackOffs[mt]=At.backoff||0,At.needLine&&(u.symbolNeedLines[mt]=!0),At.noDot?u.symbolNoDot[mt]=!0:u.symbolList.push(mt+200,String(mt+200),bt+"-dot",mt+300,String(mt+300),bt+"-open-dot"),At.noFill&&(u.symbolNoFill[mt]=!0)});var w=u.symbolNames.length,A="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";u.symbolNumber=function(bt){if(S(bt))bt=+bt;else if(typeof bt=="string"){var At=0;bt.indexOf("-open")>0&&(At=100,bt=bt.replace("-open","")),bt.indexOf("-dot")>0&&(At+=200,bt=bt.replace("-dot","")),bt=u.symbolNames.indexOf(bt),bt>=0&&(bt+=At)}return bt%100>=w||bt>=400?0:Math.floor(Math.max(bt,0))};function _(bt,At,mt,Lt){var Ht=bt%100;return u.symbolFuncs[Ht](At,mt,Lt)+(bt>=200?A:"")}var y=i("~f"),E={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};u.gradient=function(bt,At,mt,Lt,Ht,Ut){var kt=E[Lt];return T(bt,At,mt,kt.type,Ht,Ut,kt.start,kt.stop,!1,kt.reversed)};function T(bt,At,mt,Lt,Ht,Ut,kt,Vt,It,re){var Kt=Ht.length,$t;Lt==="linear"?$t={node:"linearGradient",attrs:{x1:kt.x,y1:kt.y,x2:Vt.x,y2:Vt.y,gradientUnits:It?"userSpaceOnUse":"objectBoundingBox"},reversed:re}:Lt==="radial"&&($t={node:"radialGradient",reversed:re});for(var le=new Array(Kt),he=0;he=0&&bt.i===void 0&&(bt.i=Ut.i),At.style("opacity",Lt.selectedOpacityFn?Lt.selectedOpacityFn(bt):bt.mo===void 0?kt.opacity:bt.mo),Lt.ms2mrc){var It;bt.ms==="various"||kt.size==="various"?It=3:It=Lt.ms2mrc(bt.ms),bt.mrc=It,Lt.selectedSizeFn&&(It=bt.mrc=Lt.selectedSizeFn(bt));var re=u.symbolNumber(bt.mx||kt.symbol)||0;bt.om=re%200>=100;var Kt=Rt(bt,mt),$t=V(bt,mt);At.attr("d",_(re,It,Kt,$t))}var le=!1,he,de,xe;if(bt.so)xe=Vt.outlierwidth,de=Vt.outliercolor,he=kt.outliercolor;else{var Se=(Vt||{}).width;xe=(bt.mlw+1||Se+1||(bt.trace?(bt.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in bt?de=bt.mlcc=Lt.lineScale(bt.mlc):C.isArrayOrTypedArray(Vt.color)?de=p.defaultLine:de=Vt.color,C.isArrayOrTypedArray(kt.color)&&(he=p.defaultLine,le=!0),"mc"in bt?he=bt.mcc=Lt.markerScale(bt.mc):he=kt.color||kt.colors||"rgba(0,0,0,0)",Lt.selectedColorFn&&(he=Lt.selectedColorFn(bt))}if(bt.om)At.call(p.stroke,he).style({"stroke-width":(xe||1)+"px",fill:"none"});else{At.style("stroke-width",(bt.isBlank?0:xe)+"px");var ne=kt.gradient,zt=bt.mgt;zt?le=!0:zt=ne&&ne.type,C.isArrayOrTypedArray(zt)&&(zt=zt[0],E[zt]||(zt=0));var Xt=kt.pattern,Jt=Xt&&u.getPatternAttr(Xt.shape,bt.i,"");if(zt&&zt!=="none"){var Wt=bt.mgc;Wt?le=!0:Wt=ne.color;var Ft=mt.uid;le&&(Ft+="-"+bt.i),u.gradient(At,Ht,Ft,zt,[[0,Wt],[1,he]],"fill")}else if(Jt){var xt=!1,yt=Xt.fgcolor;!yt&&Ut&&Ut.color&&(yt=Ut.color,xt=!0);var Et=u.getPatternAttr(yt,bt.i,Ut&&Ut.color||null),Mt=u.getPatternAttr(Xt.bgcolor,bt.i,null),Nt=Xt.fgopacity,jt=u.getPatternAttr(Xt.size,bt.i,8),ie=u.getPatternAttr(Xt.solidity,bt.i,.3);xt=xt||bt.mcc||C.isArrayOrTypedArray(Xt.shape)||C.isArrayOrTypedArray(Xt.bgcolor)||C.isArrayOrTypedArray(Xt.fgcolor)||C.isArrayOrTypedArray(Xt.size)||C.isArrayOrTypedArray(Xt.solidity);var me=mt.uid;xt&&(me+="-"+bt.i),u.pattern(At,"point",Ht,me,Jt,jt,ie,bt.mcc,Xt.fillmode,Mt,Et,Nt)}else C.isArrayOrTypedArray(he)?p.fill(At,he[bt.i]):p.fill(At,he);xe&&p.stroke(At,de)}},u.makePointStyleFns=function(bt){var At={},mt=bt.marker;return At.markerScale=u.tryColorscale(mt,""),At.lineScale=u.tryColorscale(mt,"line"),v.traceIs(bt,"symbols")&&(At.ms2mrc=m.isBubble(bt)?h(bt):function(){return(mt.size||6)/2}),bt.selectedpoints&&C.extendFlat(At,u.makeSelectedPointStyleFns(bt)),At},u.makeSelectedPointStyleFns=function(bt){var At={},mt=bt.selected||{},Lt=bt.unselected||{},Ht=bt.marker||{},Ut=mt.marker||{},kt=Lt.marker||{},Vt=Ht.opacity,It=Ut.opacity,re=kt.opacity,Kt=It!==void 0,$t=re!==void 0;(C.isArrayOrTypedArray(Vt)||Kt||$t)&&(At.selectedOpacityFn=function(Jt){var Wt=Jt.mo===void 0?Ht.opacity:Jt.mo;return Jt.selected?Kt?It:Wt:$t?re:l*Wt});var le=Ht.color,he=Ut.color,de=kt.color;(he||de)&&(At.selectedColorFn=function(Jt){var Wt=Jt.mcc||le;return Jt.selected?he||Wt:de||Wt});var xe=Ht.size,Se=Ut.size,ne=kt.size,zt=Se!==void 0,Xt=ne!==void 0;return v.traceIs(bt,"symbols")&&(zt||Xt)&&(At.selectedSizeFn=function(Jt){var Wt=Jt.mrc||xe/2;return Jt.selected?zt?Se/2:Wt:Xt?ne/2:Wt}),At},u.makeSelectedTextStyleFns=function(bt){var At={},mt=bt.selected||{},Lt=bt.unselected||{},Ht=bt.textfont||{},Ut=mt.textfont||{},kt=Lt.textfont||{},Vt=Ht.color,It=Ut.color,re=kt.color;return At.selectedTextColorFn=function(Kt){var $t=Kt.tc||Vt;return Kt.selected?It||$t:re||(It?$t:p.addOpacity($t,l))},At},u.selectedPointStyle=function(bt,At){if(!(!bt.size()||!At.selectedpoints)){var mt=u.makeSelectedPointStyleFns(At),Lt=At.marker||{},Ht=[];mt.selectedOpacityFn&&Ht.push(function(Ut,kt){Ut.style("opacity",mt.selectedOpacityFn(kt))}),mt.selectedColorFn&&Ht.push(function(Ut,kt){p.fill(Ut,mt.selectedColorFn(kt))}),mt.selectedSizeFn&&Ht.push(function(Ut,kt){var Vt=kt.mx||Lt.symbol||0,It=mt.selectedSizeFn(kt);Ut.attr("d",_(u.symbolNumber(Vt),It,Rt(kt,At),V(kt,At))),kt.mrc2=It}),Ht.length&&bt.each(function(Ut){for(var kt=g.select(this),Vt=0;Vt0?mt:0}u.textPointStyle=function(bt,At,mt){if(bt.size()){var Lt;if(At.selectedpoints){var Ht=u.makeSelectedTextStyleFns(At);Lt=Ht.selectedTextColorFn}var Ut=At.texttemplate,kt=mt._fullLayout;bt.each(function(Vt){var It=g.select(this),re=Ut?C.extractOption(Vt,At,"txt","texttemplate"):C.extractOption(Vt,At,"tx","text");if(!re&&re!==0){It.remove();return}if(Ut){var Kt=At._module.formatLabels,$t=Kt?Kt(Vt,At,kt):{},le={};b(le,At,Vt.i);var he=At._meta||{};re=C.texttemplateString(re,$t,kt._d3locale,le,Vt,he)}var de=Vt.tp||At.textposition,xe=M(Vt,At),Se=Lt?Lt(Vt):Vt.tc||At.textfont.color;It.call(u.font,Vt.tf||At.textfont.family,xe,Se).text(re).call(a.convertToTspans,mt).call(L,de,xe,Vt.mrc)})}},u.selectedTextStyle=function(bt,At){if(!(!bt.size()||!At.selectedpoints)){var mt=u.makeSelectedTextStyleFns(At);bt.each(function(Lt){var Ht=g.select(this),Ut=mt.selectedTextColorFn(Lt),kt=Lt.tp||At.textposition,Vt=M(Lt,At);p.fill(Ht,Ut);var It=v.traceIs(At,"bar-like");L(Ht,kt,Vt,Lt.mrc2||Lt.mrc,It)})}};var z=.5;u.smoothopen=function(bt,At){if(bt.length<3)return"M"+bt.join("L");var mt="M"+bt[0],Lt=[],Ht;for(Ht=1;Ht=It||Jt>=Kt&&Jt<=It)&&(Wt<=$t&&Wt>=re||Wt>=$t&&Wt<=re)&&(bt=[Jt,Wt])}return bt}u.applyBackoff=j,u.makeTester=function(){var bt=C.ensureSingleById(g.select("body"),"svg","js-plotly-tester",function(mt){mt.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),At=C.ensureSingle(bt,"path","js-reference-point",function(mt){mt.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});u.tester=bt,u.testref=At},u.savedBBoxes={};var et=0,it=1e4;u.bBox=function(bt,At,mt){mt||(mt=ut(bt));var Lt;if(mt){if(Lt=u.savedBBoxes[mt],Lt)return C.extendFlat({},Lt)}else if(bt.childNodes.length===1){var Ht=bt.childNodes[0];if(mt=ut(Ht),mt){var Ut=+Ht.getAttribute("x")||0,kt=+Ht.getAttribute("y")||0,Vt=Ht.getAttribute("transform");if(!Vt){var It=u.bBox(Ht,!1,mt);return Ut&&(It.left+=Ut,It.right+=Ut),kt&&(It.top+=kt,It.bottom+=kt),It}if(mt+="~"+Ut+"~"+kt+"~"+Vt,Lt=u.savedBBoxes[mt],Lt)return C.extendFlat({},Lt)}}var re,Kt;At?re=bt:(Kt=u.tester.node(),re=bt.cloneNode(!0),Kt.appendChild(re)),g.select(re).attr("transform",null).call(a.positionText,0,0);var $t=re.getBoundingClientRect(),le=u.testref.node().getBoundingClientRect();At||Kt.removeChild(re);var he={height:$t.height,width:$t.width,left:$t.left-le.left,top:$t.top-le.top,right:$t.right-le.left,bottom:$t.bottom-le.top};return et>=it&&(u.savedBBoxes={},et=0),mt&&(u.savedBBoxes[mt]=he),et++,C.extendFlat({},he)};function ut(bt){var At=bt.getAttribute("data-unformatted");if(At!==null)return At+bt.getAttribute("data-math")+bt.getAttribute("text-anchor")+bt.getAttribute("style")}u.setClipUrl=function(bt,At,mt){bt.attr("clip-path",J(At,mt))};function J(bt,At){if(!bt)return null;var mt=At._context,Lt=mt._exportedPlot?"":mt._baseUrl||"";return Lt?"url('"+Lt+"#"+bt+"')":"url(#"+bt+")"}u.getTranslate=function(bt){var At=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,mt=bt.attr?"attr":"getAttribute",Lt=bt[mt]("transform")||"",Ht=Lt.replace(At,function(Ut,kt,Vt){return[kt,Vt].join(" ")}).split(" ");return{x:+Ht[0]||0,y:+Ht[1]||0}},u.setTranslate=function(bt,At,mt){var Lt=/(\btranslate\(.*?\);?)/,Ht=bt.attr?"attr":"getAttribute",Ut=bt.attr?"attr":"setAttribute",kt=bt[Ht]("transform")||"";return At=At||0,mt=mt||0,kt=kt.replace(Lt,"").trim(),kt+=e(At,mt),kt=kt.trim(),bt[Ut]("transform",kt),kt},u.getScale=function(bt){var At=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,mt=bt.attr?"attr":"getAttribute",Lt=bt[mt]("transform")||"",Ht=Lt.replace(At,function(Ut,kt,Vt){return[kt,Vt].join(" ")}).split(" ");return{x:+Ht[0]||1,y:+Ht[1]||1}},u.setScale=function(bt,At,mt){var Lt=/(\bscale\(.*?\);?)/,Ht=bt.attr?"attr":"getAttribute",Ut=bt.attr?"attr":"setAttribute",kt=bt[Ht]("transform")||"";return At=At||1,mt=mt||1,kt=kt.replace(Lt,"").trim(),kt+="scale("+At+","+mt+")",kt=kt.trim(),bt[Ut]("transform",kt),kt};var X=/\s*sc.*/;u.setPointGroupScale=function(bt,At,mt){if(At=At||1,mt=mt||1,!!bt){var Lt=At===1&&mt===1?"":"scale("+At+","+mt+")";bt.each(function(){var Ht=(this.getAttribute("transform")||"").replace(X,"");Ht+=Lt,Ht=Ht.trim(),this.setAttribute("transform",Ht)})}};var tt=/translate\([^)]*\)\s*$/;u.setTextPointsScale=function(bt,At,mt){bt&&bt.each(function(){var Lt,Ht=g.select(this),Ut=Ht.select("text");if(Ut.node()){var kt=parseFloat(Ut.attr("x")||0),Vt=parseFloat(Ut.attr("y")||0),It=(Ht.attr("transform")||"").match(tt);At===1&&mt===1?Lt=[]:Lt=[e(kt,Vt),"scale("+At+","+mt+")",e(-kt,-Vt)],It&&Lt.push(It),Ht.attr("transform",Lt.join(""))}})};function V(bt,At){var mt;return bt&&(mt=bt.mf),mt===void 0&&(mt=At.marker&&At.marker.standoff||0),!At._geo&&!At._xA?-mt:mt}u.getMarkerStandoff=V;var Q=Math.atan2,ot=Math.cos,$=Math.sin;function Z(bt,At){var mt=At[0],Lt=At[1];return[mt*ot(bt)-Lt*$(bt),mt*$(bt)+Lt*ot(bt)]}var st,nt,ct,gt,Tt,wt;function Rt(bt,At){var mt=bt.ma;mt===void 0&&(mt=At.marker.angle,(!mt||C.isArrayOrTypedArray(mt))&&(mt=0));var Lt,Ht,Ut=At.marker.angleref;if(Ut==="previous"||Ut==="north"){if(At._geo){var kt=At._geo.project(bt.lonlat);Lt=kt[0],Ht=kt[1]}else{var Vt=At._xA,It=At._yA;if(Vt&&It)Lt=Vt.c2p(bt.x),Ht=It.c2p(bt.y);else return 90}if(At._geo){var re=bt.lonlat[0],Kt=bt.lonlat[1],$t=At._geo.project([re,Kt+1e-5]),le=At._geo.project([re+1e-5,Kt]),he=Q(le[1]-Ht,le[0]-Lt),de=Q($t[1]-Ht,$t[0]-Lt),xe;if(Ut==="north")xe=mt/180*Math.PI;else if(Ut==="previous"){var Se=re/180*Math.PI,ne=Kt/180*Math.PI,zt=st/180*Math.PI,Xt=nt/180*Math.PI,Jt=zt-Se,Wt=ot(Xt)*$(Jt),Ft=$(Xt)*ot(ne)-ot(Xt)*$(ne)*ot(Jt);xe=-Q(Wt,Ft)-Math.PI,st=re,nt=Kt}var xt=Z(he,[ot(xe),0]),yt=Z(de,[$(xe),0]);mt=Q(xt[1]+yt[1],xt[0]+yt[0])/Math.PI*180,Ut==="previous"&&!(wt===At.uid&&bt.i===Tt+1)&&(mt=null)}if(Ut==="previous"&&!At._geo)if(wt===At.uid&&bt.i===Tt+1&&S(Lt)&&S(Ht)){var Et=Lt-ct,Mt=Ht-gt,Nt=At.line&&At.line.shape||"",jt=Nt.slice(Nt.length-1);jt==="h"&&(Mt=0),jt==="v"&&(Et=0),mt+=Q(Mt,Et)/Math.PI*180+90}else mt=null}return ct=Lt,gt=Ht,Tt=bt.i,wt=At.uid,mt}u.getMarkerAngle=Rt},71984:function(G,U,t){var g=t(21984),C=t(33428).round,i="M0,0Z",S=Math.sqrt(2),x=Math.sqrt(3),v=Math.PI,p=Math.cos,r=Math.sin;G.exports={circle:{n:0,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o="M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z";return b?l(h,b,o):o}},square:{n:1,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")}},diamond:{n:2,f:function(m,h,b){if(e(h))return i;var u=C(m*1.3,2);return l(h,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z")}},cross:{n:3,f:function(m,h,b){if(e(h))return i;var u=C(m*.4,2),o=C(m*1.2,2);return l(h,b,"M"+o+","+u+"H"+u+"V"+o+"H-"+u+"V"+u+"H-"+o+"V-"+u+"H-"+u+"V-"+o+"H"+u+"V-"+u+"H"+o+"Z")}},x:{n:4,f:function(m,h,b){if(e(h))return i;var u=C(m*.8/S,2),o="l"+u+","+u,d="l"+u+",-"+u,w="l-"+u+",-"+u,A="l-"+u+","+u;return l(h,b,"M0,"+u+o+d+w+d+w+A+w+A+o+A+o+"Z")}},"triangle-up":{n:5,f:function(m,h,b){if(e(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M-"+u+","+o+"H"+u+"L0,-"+d+"Z")}},"triangle-down":{n:6,f:function(m,h,b){if(e(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M-"+u+",-"+o+"H"+u+"L0,"+d+"Z")}},"triangle-left":{n:7,f:function(m,h,b){if(e(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M"+o+",-"+u+"V"+u+"L-"+d+",0Z")}},"triangle-right":{n:8,f:function(m,h,b){if(e(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M-"+o+",-"+u+"V"+u+"L"+d+",0Z")}},"triangle-ne":{n:9,f:function(m,h,b){if(e(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M-"+o+",-"+u+"H"+u+"V"+o+"Z")}},"triangle-se":{n:10,f:function(m,h,b){if(e(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M"+u+",-"+o+"V"+u+"H-"+o+"Z")}},"triangle-sw":{n:11,f:function(m,h,b){if(e(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M"+o+","+u+"H-"+u+"V-"+o+"Z")}},"triangle-nw":{n:12,f:function(m,h,b){if(e(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M-"+u+","+o+"V-"+u+"H"+o+"Z")}},pentagon:{n:13,f:function(m,h,b){if(e(h))return i;var u=C(m*.951,2),o=C(m*.588,2),d=C(-m,2),w=C(m*-.309,2),A=C(m*.809,2);return l(h,b,"M"+u+","+w+"L"+o+","+A+"H-"+o+"L-"+u+","+w+"L0,"+d+"Z")}},hexagon:{n:14,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m/2,2),d=C(m*x/2,2);return l(h,b,"M"+d+",-"+o+"V"+o+"L0,"+u+"L-"+d+","+o+"V-"+o+"L0,-"+u+"Z")}},hexagon2:{n:15,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m/2,2),d=C(m*x/2,2);return l(h,b,"M-"+o+","+d+"H"+o+"L"+u+",0L"+o+",-"+d+"H-"+o+"L-"+u+",0Z")}},octagon:{n:16,f:function(m,h,b){if(e(h))return i;var u=C(m*.924,2),o=C(m*.383,2);return l(h,b,"M-"+o+",-"+u+"H"+o+"L"+u+",-"+o+"V"+o+"L"+o+","+u+"H-"+o+"L-"+u+","+o+"V-"+o+"Z")}},star:{n:17,f:function(m,h,b){if(e(h))return i;var u=m*1.4,o=C(u*.225,2),d=C(u*.951,2),w=C(u*.363,2),A=C(u*.588,2),_=C(-u,2),y=C(u*-.309,2),E=C(u*.118,2),T=C(u*.809,2),s=C(u*.382,2);return l(h,b,"M"+o+","+y+"H"+d+"L"+w+","+E+"L"+A+","+T+"L0,"+s+"L-"+A+","+T+"L-"+w+","+E+"L-"+d+","+y+"H-"+o+"L0,"+_+"Z")}},hexagram:{n:18,f:function(m,h,b){if(e(h))return i;var u=C(m*.66,2),o=C(m*.38,2),d=C(m*.76,2);return l(h,b,"M-"+d+",0l-"+o+",-"+u+"h"+d+"l"+o+",-"+u+"l"+o+","+u+"h"+d+"l-"+o+","+u+"l"+o+","+u+"h-"+d+"l-"+o+","+u+"l-"+o+",-"+u+"h-"+d+"Z")}},"star-triangle-up":{n:19,f:function(m,h,b){if(e(h))return i;var u=C(m*x*.8,2),o=C(m*.8,2),d=C(m*1.6,2),w=C(m*4,2),A="A "+w+","+w+" 0 0 1 ";return l(h,b,"M-"+u+","+o+A+u+","+o+A+"0,-"+d+A+"-"+u+","+o+"Z")}},"star-triangle-down":{n:20,f:function(m,h,b){if(e(h))return i;var u=C(m*x*.8,2),o=C(m*.8,2),d=C(m*1.6,2),w=C(m*4,2),A="A "+w+","+w+" 0 0 1 ";return l(h,b,"M"+u+",-"+o+A+"-"+u+",-"+o+A+"0,"+d+A+u+",-"+o+"Z")}},"star-square":{n:21,f:function(m,h,b){if(e(h))return i;var u=C(m*1.1,2),o=C(m*2,2),d="A "+o+","+o+" 0 0 1 ";return l(h,b,"M-"+u+",-"+u+d+"-"+u+","+u+d+u+","+u+d+u+",-"+u+d+"-"+u+",-"+u+"Z")}},"star-diamond":{n:22,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2),o=C(m*1.9,2),d="A "+o+","+o+" 0 0 1 ";return l(h,b,"M-"+u+",0"+d+"0,"+u+d+u+",0"+d+"0,-"+u+d+"-"+u+",0Z")}},"diamond-tall":{n:23,f:function(m,h,b){if(e(h))return i;var u=C(m*.7,2),o=C(m*1.4,2);return l(h,b,"M0,"+o+"L"+u+",0L0,-"+o+"L-"+u+",0Z")}},"diamond-wide":{n:24,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2),o=C(m*.7,2);return l(h,b,"M0,"+o+"L"+u+",0L0,-"+o+"L-"+u+",0Z")}},hourglass:{n:25,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z")},noDot:!0},bowtie:{n:26,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z")},noDot:!0},"circle-cross":{n:27,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m/S,2);return l(h,b,"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(m,h,b){if(e(h))return i;var u=C(m*1.3,2);return l(h,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(m,h,b){if(e(h))return i;var u=C(m*1.3,2),o=C(m*.65,2);return l(h,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+o+",-"+o+"L"+o+","+o+"M-"+o+","+o+"L"+o+",-"+o)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*.85,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(m,h,b){if(e(h))return i;var u=C(m/2,2),o=C(m,2);return l(h,b,"M"+u+","+o+"V-"+o+"M"+(u-o)+",-"+o+"V"+o+"M"+o+","+u+"H-"+o+"M-"+o+","+(u-o)+"H"+o)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M-"+u+","+d+"L0,0M"+u+","+d+"L0,0M0,-"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M-"+u+",-"+d+"L0,0M"+u+",-"+d+"L0,0M0,"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M"+d+","+u+"L0,0M"+d+",-"+u+"L0,0M-"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M-"+d+","+u+"L0,0M-"+d+",-"+u+"L0,0M"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2);return l(h,b,"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2);return l(h,b,"M0,"+u+"V-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"L-"+u+",-"+u)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M0,0L-"+u+","+o+"H"+u+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M0,0L-"+u+",-"+o+"H"+u+"Z")},noDot:!0},"arrow-left":{n:47,f:function(m,h,b){if(e(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,0L"+u+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-right":{n:48,f:function(m,h,b){if(e(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,0L-"+u+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M-"+u+",0H"+u+"M0,0L-"+u+","+o+"H"+u+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M-"+u+",0H"+u+"M0,0L-"+u+",-"+o+"H"+u+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(m,h,b){if(e(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,-"+o+"V"+o+"M0,0L"+u+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(m,h,b){if(e(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,-"+o+"V"+o+"M0,0L-"+u+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(m,h,b){if(e(h))return i;var u=v/2.5,o=2*m*p(u),d=2*m*r(u);return l(h,b,"M0,0L"+-o+","+d+"L"+o+","+d+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(m,h,b){if(e(h))return i;var u=v/4,o=2*m*p(u),d=2*m*r(u);return l(h,b,"M0,0L"+-o+","+d+"A "+2*m+","+2*m+" 0 0 1 "+o+","+d+"Z")},backoff:.4,noDot:!0}};function e(m){return m===null}var a,n,f,c;function l(m,h,b){if((!m||m%360===0)&&!h)return b;if(f===m&&c===h&&a===b)return n;f=m,c=h,a=b;function u(D,N){var I=p(D),k=r(D),B=N[0],O=N[1]+(h||0);return[B*I-O*k,B*k+O*I]}for(var o=m/180*v,d=0,w=0,A=g(b),_="",y=0;y0,m=p._context.staticPlot;r.each(function(h){var b=h[0].trace,u=b.error_x||{},o=b.error_y||{},d;b.ids&&(d=function(y){return y.id});var w=S.hasMarkers(b)&&b.marker.maxdisplayed>0;!o.visible&&!u.visible&&(h=[]);var A=g.select(this).selectAll("g.errorbar").data(h,d);if(A.exit().remove(),!!h.length){u.visible||A.selectAll("path.xerror").remove(),o.visible||A.selectAll("path.yerror").remove(),A.style("opacity",1);var _=A.enter().append("g").classed("errorbar",!0);l&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),i.setClipUrl(A,e.layerClipId,p),A.each(function(y){var E=g.select(this),T=x(y,f,c);if(!(w&&!y.vis)){var s,L=E.select("path.yerror");if(o.visible&&C(T.x)&&C(T.yh)&&C(T.ys)){var M=o.width;s="M"+(T.x-M)+","+T.yh+"h"+2*M+"m-"+M+",0V"+T.ys,T.noYS||(s+="m-"+M+",0h"+2*M),n=!L.size(),n?L=E.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):l&&(L=L.transition().duration(a.duration).ease(a.easing)),L.attr("d",s)}else L.remove();var z=E.select("path.xerror");if(u.visible&&C(T.y)&&C(T.xh)&&C(T.xs)){var D=(u.copy_ystyle?o:u).width;s="M"+T.xh+","+(T.y-D)+"v"+2*D+"m0,-"+D+"H"+T.xs,T.noXS||(s+="m0,-"+D+"v"+2*D),n=!z.size(),n?z=E.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):l&&(z=z.transition().duration(a.duration).ease(a.easing)),z.attr("d",s)}else z.remove()}})}})};function x(v,p,r){var e={x:p.c2p(v.x),y:r.c2p(v.y)};return v.yh!==void 0&&(e.yh=r.c2p(v.yh),e.ys=r.c2p(v.ys),C(e.ys)||(e.noYS=!0,e.ys=r.c2p(v.ys,!0))),v.xh!==void 0&&(e.xh=p.c2p(v.xh),e.xs=p.c2p(v.xs),C(e.xs)||(e.noXS=!0,e.xs=p.c2p(v.xs,!0))),e}},92036:function(G,U,t){var g=t(33428),C=t(76308);G.exports=function(S){S.each(function(x){var v=x[0].trace,p=v.error_y||{},r=v.error_x||{},e=g.select(this);e.selectAll("path.yerror").style("stroke-width",p.thickness+"px").call(C.stroke,p.color),r.copy_ystyle&&(r=p),e.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(C.stroke,r.color)})}},55756:function(G,U,t){var g=t(25376),C=t(65460).hoverlabel,i=t(92880).extendFlat;G.exports={hoverlabel:{bgcolor:i({},C.bgcolor,{arrayOk:!0}),bordercolor:i({},C.bordercolor,{arrayOk:!0}),font:g({arrayOk:!0,editType:"none"}),align:i({},C.align,{arrayOk:!0}),namelength:i({},C.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(G,U,t){var g=t(3400),C=t(24040);G.exports=function(x){var v=x.calcdata,p=x._fullLayout;function r(c){return function(l){return g.coerceHoverinfo({hoverinfo:l},{_module:c._module},p)}}for(var e=0;e=0&&e.indexAt[0]._length||ie<0||ie>mt[0]._length)return f.unhoverRaw(Q,ot)}if(ot.pointerX=jt+At[0]._offset,ot.pointerY=ie+mt[0]._offset,"xval"in ot?le=m.flat(nt,ot.xval):le=m.p2c(At,jt),"yval"in ot?he=m.flat(nt,ot.yval):he=m.p2c(mt,ie),!C(le[0])||!C(he[0]))return S.warn("Fx.hover failed",ot,Q),f.unhoverRaw(Q,ot)}var ve=1/0;function Le(Cr,Wr){for(xe=0;xe<$t.length;xe++)if(Se=$t[xe],!(!Se||!Se[0]||!Se[0].trace)&&(ne=Se[0].trace,!(ne.visible!==!0||ne._length===0)&&["carpet","contourcarpet"].indexOf(ne._module.name)===-1)){if(ne.type==="splom"?(Xt=0,zt=nt[Xt]):(zt=m.getSubplot(ne),Xt=nt.indexOf(zt)),Jt=Vt,m.isUnifiedHover(Jt)&&(Jt=Jt.charAt(0)),xt={cd:Se,trace:ne,xa:At[Xt],ya:mt[Xt],maxHoverDistance:It,maxSpikeDistance:re,index:!1,distance:Math.min(ve,It),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:n.defaultLine,name:ne.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},ct[zt]&&(xt.subplot=ct[zt]._subplot),ct._splomScenes&&ct._splomScenes[ne.uid]&&(xt.scene=ct._splomScenes[ne.uid]),yt=Kt.length,Jt==="array"){var Ur=ot[xe];"pointNumber"in Ur?(xt.index=Ur.pointNumber,Jt="closest"):(Jt="","xval"in Ur&&(Wt=Ur.xval,Jt="x"),"yval"in Ur&&(Ft=Ur.yval,Jt=Jt?"closest":"y"))}else Cr!==void 0&&Wr!==void 0?(Wt=Cr,Ft=Wr):(Wt=le[Xt],Ft=he[Xt]);if(It!==0)if(ne._module&&ne._module.hoverPoints){var an=ne._module.hoverPoints(xt,Wt,Ft,Jt,{finiteRange:!0,hoverLayer:ct._hoverlayer});if(an)for(var pn,gn=0;gnyt&&(Kt.splice(0,yt),ve=Kt[0].distance),wt&&re!==0&&Kt.length===0){xt.distance=re,xt.index=!1;var _n=ne._module.hoverPoints(xt,Wt,Ft,"closest",{hoverLayer:ct._hoverlayer});if(_n&&(_n=_n.filter(function(ri){return ri.spikeDistance<=re})),_n&&_n.length){var kn,ni=_n.filter(function(ri){return ri.xa.showspikes&&ri.xa.spikesnap!=="hovered data"});if(ni.length){var ci=ni[0];C(ci.x0)&&C(ci.y0)&&(kn=Te(ci),(!Et.vLinePoint||Et.vLinePoint.spikeDistance>kn.spikeDistance)&&(Et.vLinePoint=kn))}var di=_n.filter(function(ri){return ri.ya.showspikes&&ri.ya.spikesnap!=="hovered data"});if(di.length){var li=di[0];C(li.x0)&&C(li.y0)&&(kn=Te(li),(!Et.hLinePoint||Et.hLinePoint.spikeDistance>kn.spikeDistance)&&(Et.hLinePoint=kn))}}}}}Le();function ce(Cr,Wr,Ur){for(var an=null,pn=1/0,gn,_n=0;_n0&&Math.abs(Cr.distance)Pe-1;Yt--)vr(Kt[Yt]);Kt=Je,Xe()}var Gt=Q._hoverdata,Ne=[],Oe=X(Q),Qe=tt(Q);for(de=0;de1||Kt.length>1)||Vt==="closest"&&Mt&&Kt.length>1,rn=n.combine(ct.plot_bgcolor||n.background,ct.paper_bgcolor),Cn=D(Kt,{gd:Q,hovermode:Vt,rotateLabels:cn,bgColor:rn,container:ct._hoverlayer,outerContainer:ct._paper.node(),commonLabelOpts:ct.hoverlabel,hoverdistance:ct.hoverdistance}),En=Cn.hoverLabels;if(m.isUnifiedHover(Vt)||(I(En,cn,ct,Cn.commonLabelBoundingBox),O(En,cn,ct._invScaleX,ct._invScaleY)),st&&st.tagName){var Tr=l.getComponentMethod("annotations","hasClickToShow")(Q,Ne);e(g.select(st),Tr?"pointer":"")}!st||Z||!j(Q,ot,Gt)||(Gt&&Q.emit("plotly_unhover",{event:ot,points:Gt}),Q.emit("plotly_hover",{event:ot,points:Q._hoverdata,xaxes:At,yaxes:mt,xvals:le,yvals:he}))}function M(Q){return[Q.trace.index,Q.index,Q.x0,Q.y0,Q.name,Q.attr,Q.xa?Q.xa._id:"",Q.ya?Q.ya._id:""].join(",")}var z=/([\s\S]*)<\/extra>/;function D(Q,ot){var $=ot.gd,Z=$._fullLayout,st=ot.hovermode,nt=ot.rotateLabels,ct=ot.bgColor,gt=ot.container,Tt=ot.outerContainer,wt=ot.commonLabelOpts||{};if(Q.length===0)return[[]];var Rt=ot.fontFamily||h.HOVERFONT,bt=ot.fontSize||h.HOVERFONTSIZE,At=Q[0],mt=At.xa,Lt=At.ya,Ht=st.charAt(0),Ut=Ht+"Label",kt=At[Ut];if(kt===void 0&&mt.type==="multicategory")for(var Vt=0;VtZ.width-Qe&&(er=Z.width-Qe),ke.attr("d","M"+(Gt-er)+",0L"+(Gt-er+y)+","+Oe+y+"H"+Qe+"v"+Oe+(E*2+Yt.height)+"H"+-Qe+"V"+Oe+y+"H"+(Gt-er-y)+"Z"),Gt=er,zt.minX=Gt-Qe,zt.maxX=Gt+Qe,mt.side==="top"?(zt.minY=Ne-(E*2+Yt.height),zt.maxY=Ne-E):(zt.minY=Ne+E,zt.maxY=Ne+(E*2+Yt.height))}else{var fr,rr,He;Lt.side==="right"?(fr="start",rr=1,He="",Gt=mt._offset+mt._length):(fr="end",rr=-1,He="-",Gt=mt._offset),Ne=Lt._offset+(At.y0+At.y1)/2,Ve.attr("text-anchor",fr),ke.attr("d","M0,0L"+He+y+","+y+"V"+(E+Yt.height/2)+"h"+He+(E*2+Yt.width)+"V-"+(E+Yt.height/2)+"H"+He+y+"V-"+y+"Z"),zt.minY=Ne-(E+Yt.height/2),zt.maxY=Ne+(E+Yt.height/2),Lt.side==="right"?(zt.minX=Gt+y,zt.maxX=Gt+y+(E*2+Yt.width)):(zt.minX=Gt-y-(E*2+Yt.width),zt.maxX=Gt-y);var dr=Yt.height/2,mr=re-Yt.top-dr,xr="clip"+Z._uid+"commonlabel"+Lt._id,pr;if(Gt=0?Ae=or:$e+Le=0?Ae=$e:ge+Le=0?Ce=Xe:Ke+ce<$t&&Ke>=0?Ce=Ke:se+ce<$t?Ce=se:Xe-ir=0,(Pe.idealAlign==="top"||!cn)&&rn?(dr-=xr/2,Pe.anchor="end"):cn?(dr+=xr/2,Pe.anchor="start"):Pe.anchor="middle",Pe.crossPos=dr;else{if(Pe.pos=dr,cn=He+mr/2+Dr<=Kt,rn=He-mr/2-Dr>=0,(Pe.idealAlign==="left"||!cn)&&rn)He-=mr/2,Pe.anchor="end";else if(cn)He+=mr/2,Pe.anchor="start";else{Pe.anchor="middle";var Cn=Dr/2,En=He+Cn-Kt,Tr=He-Cn;En>0&&(He-=En),Tr<0&&(He+=-Tr)}Pe.crossPos=He}Oe.attr("text-anchor",Pe.anchor),er&&Qe.attr("text-anchor",Pe.anchor),ke.attr("transform",x(He,dr)+(nt?v(o):""))}),{hoverLabels:Ie,commonLabelBoundingBox:zt}}function N(Q,ot,$,Z,st,nt){var ct="",gt="";Q.nameOverride!==void 0&&(Q.name=Q.nameOverride),Q.name&&(Q.trace._meta&&(Q.name=S.templateString(Q.name,Q.trace._meta)),ct=it(Q.name,Q.nameLength));var Tt=$.charAt(0),wt=Tt==="x"?"y":"x";Q.zLabel!==void 0?(Q.xLabel!==void 0&&(gt+="x: "+Q.xLabel+"
    "),Q.yLabel!==void 0&&(gt+="y: "+Q.yLabel+"
    "),Q.trace.type!=="choropleth"&&Q.trace.type!=="choroplethmapbox"&&(gt+=(gt?"z: ":"")+Q.zLabel)):ot&&Q[Tt+"Label"]===st?gt=Q[wt+"Label"]||"":Q.xLabel===void 0?Q.yLabel!==void 0&&Q.trace.type!=="scattercarpet"&&(gt=Q.yLabel):Q.yLabel===void 0?gt=Q.xLabel:gt="("+Q.xLabel+", "+Q.yLabel+")",(Q.text||Q.text===0)&&!Array.isArray(Q.text)&&(gt+=(gt?"
    ":"")+Q.text),Q.extraText!==void 0&&(gt+=(gt?"
    ":"")+Q.extraText),nt&>===""&&!Q.hovertemplate&&(ct===""&&nt.remove(),gt=ct);var Rt=Q.hovertemplate||!1;if(Rt){var bt=Q.hovertemplateLabels||Q;Q[Tt+"Label"]!==st&&(bt[Tt+"other"]=bt[Tt+"Val"],bt[Tt+"otherLabel"]=bt[Tt+"Label"]),gt=S.hovertemplateString(Rt,bt,Z._d3locale,Q.eventData[0]||{},Q.trace._meta),gt=gt.replace(z,function(At,mt){return ct=it(mt,Q.nameLength),""})}return[gt,ct]}function I(Q,ot,$,Z){var st=ot?"xa":"ya",nt=ot?"ya":"xa",ct=0,gt=1,Tt=Q.size(),wt=new Array(Tt),Rt=0,bt=Z.minX,At=Z.maxX,mt=Z.minY,Lt=Z.maxY,Ht=function(Wt){return Wt*$._invScaleX},Ut=function(Wt){return Wt*$._invScaleY};Q.each(function(Wt){var Ft=Wt[st],xt=Wt[nt],yt=Ft._id.charAt(0)==="x",Et=Ft.range;Rt===0&&Et&&Et[0]>Et[1]!==yt&&(gt=-1);var Mt=0,Nt=yt?$.width:$.height;if($.hovermode==="x"||$.hovermode==="y"){var jt=k(Wt,ot),ie=Wt.anchor,me=ie==="end"?-1:1,be,ve;if(ie==="middle")be=Wt.crossPos+(yt?Ut(jt.y-Wt.by/2):Ht(Wt.bx/2+Wt.tx2width/2)),ve=be+(yt?Ut(Wt.by):Ht(Wt.bx));else if(yt)be=Wt.crossPos+Ut(y+jt.y)-Ut(Wt.by/2-y),ve=be+Ut(Wt.by);else{var Le=Ht(me*y+jt.x),ce=Le+Ht(me*Wt.bx);be=Wt.crossPos+Math.min(Le,ce),ve=Wt.crossPos+Math.max(Le,ce)}yt?mt!==void 0&&Lt!==void 0&&Math.min(ve,Lt)-Math.max(be,mt)>1&&(xt.side==="left"?(Mt=xt._mainLinePosition,Nt=$.width):Nt=xt._mainLinePosition):bt!==void 0&&At!==void 0&&Math.min(ve,At)-Math.max(be,bt)>1&&(xt.side==="top"?(Mt=xt._mainLinePosition,Nt=$.height):Nt=xt._mainLinePosition)}wt[Rt++]=[{datum:Wt,traceIndex:Wt.trace.index,dp:0,pos:Wt.pos,posref:Wt.posref,size:Wt.by*(yt?w:1)/2,pmin:Mt,pmax:Nt}]}),wt.sort(function(Wt,Ft){return Wt[0].posref-Ft[0].posref||gt*(Ft[0].traceIndex-Wt[0].traceIndex)});var kt,Vt,It,re,Kt,$t,le;function he(Wt){var Ft=Wt[0],xt=Wt[Wt.length-1];if(Vt=Ft.pmin-Ft.pos-Ft.dp+Ft.size,It=xt.pos+xt.dp+xt.size-Ft.pmax,Vt>.01){for(Kt=Wt.length-1;Kt>=0;Kt--)Wt[Kt].dp+=Vt;kt=!1}if(!(It<.01)){if(Vt<-.01){for(Kt=Wt.length-1;Kt>=0;Kt--)Wt[Kt].dp-=It;kt=!1}if(kt){var yt=0;for(re=0;reFt.pmax&&yt++;for(re=Wt.length-1;re>=0&&!(yt<=0);re--)$t=Wt[re],$t.pos>Ft.pmax-1&&($t.del=!0,yt--);for(re=0;re=0;Kt--)Wt[Kt].dp-=It;for(re=Wt.length-1;re>=0&&!(yt<=0);re--)$t=Wt[re],$t.pos+$t.dp+$t.size>Ft.pmax&&($t.del=!0,yt--)}}}for(;!kt&&ct<=Tt;){for(ct++,kt=!0,re=0;re.01&&Se.pmin===ne.pmin&&Se.pmax===ne.pmax){for(Kt=xe.length-1;Kt>=0;Kt--)xe[Kt].dp+=Vt;for(de.push.apply(de,xe),wt.splice(re+1,1),le=0,Kt=de.length-1;Kt>=0;Kt--)le+=de[Kt].dp;for(It=le/de.length,Kt=de.length-1;Kt>=0;Kt--)de[Kt].dp-=It;kt=!1}else re++}wt.forEach(he)}for(re=wt.length-1;re>=0;re--){var zt=wt[re];for(Kt=zt.length-1;Kt>=0;Kt--){var Xt=zt[Kt],Jt=Xt.datum;Jt.offset=Xt.dp,Jt.del=Xt.del}}}function k(Q,ot){var $=0,Z=Q.offset;return ot&&(Z*=-_,$=Q.offset*A),{x:$,y:Z}}function B(Q){var ot={start:1,end:-1,middle:0}[Q.anchor],$=ot*(y+E),Z=$+ot*(Q.txwidth+E),st=Q.anchor==="middle";return st&&($-=Q.tx2width/2,Z+=Q.txwidth/2+E),{alignShift:ot,textShiftX:$,text2ShiftX:Z}}function O(Q,ot,$,Z){var st=function(ct){return ct*$},nt=function(ct){return ct*Z};Q.each(function(ct){var gt=g.select(this);if(ct.del)return gt.remove();var Tt=gt.select("text.nums"),wt=ct.anchor,Rt=wt==="end"?-1:1,bt=B(ct),At=k(ct,ot),mt=At.x,Lt=At.y,Ht=wt==="middle";gt.select("path").attr("d",Ht?"M-"+st(ct.bx/2+ct.tx2width/2)+","+nt(Lt-ct.by/2)+"h"+st(ct.bx)+"v"+nt(ct.by)+"h-"+st(ct.bx)+"Z":"M0,0L"+st(Rt*y+mt)+","+nt(y+Lt)+"v"+nt(ct.by/2-y)+"h"+st(Rt*ct.bx)+"v-"+nt(ct.by)+"H"+st(Rt*y+mt)+"V"+nt(Lt-y)+"Z");var Ut=mt+bt.textShiftX,kt=Lt+ct.ty0-ct.by/2+E,Vt=ct.textAlign||"auto";Vt!=="auto"&&(Vt==="left"&&wt!=="start"?(Tt.attr("text-anchor","start"),Ut=Ht?-ct.bx/2-ct.tx2width/2+E:-ct.bx-E):Vt==="right"&&wt!=="end"&&(Tt.attr("text-anchor","end"),Ut=Ht?ct.bx/2-ct.tx2width/2-E:ct.bx+E)),Tt.call(r.positionText,st(Ut),nt(kt)),ct.tx2width&&(gt.select("text.name").call(r.positionText,st(bt.text2ShiftX+bt.alignShift*E+mt),nt(Lt+ct.ty0-ct.by/2+E)),gt.select("rect").call(a.setRect,st(bt.text2ShiftX+(bt.alignShift-1)*ct.tx2width/2+mt),nt(Lt-ct.by/2-1),st(ct.tx2width),nt(ct.by+2)))})}function H(Q,ot){var $=Q.index,Z=Q.trace||{},st=Q.cd[0],nt=Q.cd[$]||{};function ct(At){return At||C(At)&&At===0}var gt=Array.isArray($)?function(At,mt){var Lt=S.castOption(st,$,At);return ct(Lt)?Lt:S.extractOption({},Z,"",mt)}:function(At,mt){return S.extractOption(nt,Z,At,mt)};function Tt(At,mt,Lt){var Ht=gt(mt,Lt);ct(Ht)&&(Q[At]=Ht)}if(Tt("hoverinfo","hi","hoverinfo"),Tt("bgcolor","hbg","hoverlabel.bgcolor"),Tt("borderColor","hbc","hoverlabel.bordercolor"),Tt("fontFamily","htf","hoverlabel.font.family"),Tt("fontSize","hts","hoverlabel.font.size"),Tt("fontColor","htc","hoverlabel.font.color"),Tt("nameLength","hnl","hoverlabel.namelength"),Tt("textAlign","hta","hoverlabel.align"),Q.posref=ot==="y"||ot==="closest"&&Z.orientation==="h"?Q.xa._offset+(Q.x0+Q.x1)/2:Q.ya._offset+(Q.y0+Q.y1)/2,Q.x0=S.constrain(Q.x0,0,Q.xa._length),Q.x1=S.constrain(Q.x1,0,Q.xa._length),Q.y0=S.constrain(Q.y0,0,Q.ya._length),Q.y1=S.constrain(Q.y1,0,Q.ya._length),Q.xLabelVal!==void 0&&(Q.xLabel="xLabel"in Q?Q.xLabel:c.hoverLabelText(Q.xa,Q.xLabelVal,Z.xhoverformat),Q.xVal=Q.xa.c2d(Q.xLabelVal)),Q.yLabelVal!==void 0&&(Q.yLabel="yLabel"in Q?Q.yLabel:c.hoverLabelText(Q.ya,Q.yLabelVal,Z.yhoverformat),Q.yVal=Q.ya.c2d(Q.yLabelVal)),Q.zLabelVal!==void 0&&Q.zLabel===void 0&&(Q.zLabel=String(Q.zLabelVal)),!isNaN(Q.xerr)&&!(Q.xa.type==="log"&&Q.xerr<=0)){var wt=c.tickText(Q.xa,Q.xa.c2l(Q.xerr),"hover").text;Q.xerrneg!==void 0?Q.xLabel+=" +"+wt+" / -"+c.tickText(Q.xa,Q.xa.c2l(Q.xerrneg),"hover").text:Q.xLabel+=" ± "+wt,ot==="x"&&(Q.distance+=1)}if(!isNaN(Q.yerr)&&!(Q.ya.type==="log"&&Q.yerr<=0)){var Rt=c.tickText(Q.ya,Q.ya.c2l(Q.yerr),"hover").text;Q.yerrneg!==void 0?Q.yLabel+=" +"+Rt+" / -"+c.tickText(Q.ya,Q.ya.c2l(Q.yerrneg),"hover").text:Q.yLabel+=" ± "+Rt,ot==="y"&&(Q.distance+=1)}var bt=Q.hoverinfo||Q.trace.hoverinfo;return bt&&bt!=="all"&&(bt=Array.isArray(bt)?bt:bt.split("+"),bt.indexOf("x")===-1&&(Q.xLabel=void 0),bt.indexOf("y")===-1&&(Q.yLabel=void 0),bt.indexOf("z")===-1&&(Q.zLabel=void 0),bt.indexOf("text")===-1&&(Q.text=void 0),bt.indexOf("name")===-1&&(Q.name=void 0)),Q}function Y(Q,ot,$){var Z=$.container,st=$.fullLayout,nt=st._size,ct=$.event,gt=!!ot.hLinePoint,Tt=!!ot.vLinePoint,wt,Rt;if(Z.selectAll(".spikeline").remove(),!!(Tt||gt)){var bt=n.combine(st.plot_bgcolor,st.paper_bgcolor);if(gt){var At=ot.hLinePoint,mt,Lt;wt=At&&At.xa,Rt=At&&At.ya;var Ht=Rt.spikesnap;Ht==="cursor"?(mt=ct.pointerX,Lt=ct.pointerY):(mt=wt._offset+At.x,Lt=Rt._offset+At.y);var Ut=i.readability(At.color,bt)<1.5?n.contrast(bt):At.color,kt=Rt.spikemode,Vt=Rt.spikethickness,It=Rt.spikecolor||Ut,re=c.getPxPosition(Q,Rt),Kt,$t;if(kt.indexOf("toaxis")!==-1||kt.indexOf("across")!==-1){if(kt.indexOf("toaxis")!==-1&&(Kt=re,$t=mt),kt.indexOf("across")!==-1){var le=Rt._counterDomainMin,he=Rt._counterDomainMax;Rt.anchor==="free"&&(le=Math.min(le,Rt.position),he=Math.max(he,Rt.position)),Kt=nt.l+le*nt.w,$t=nt.l+he*nt.w}Z.insert("line",":first-child").attr({x1:Kt,x2:$t,y1:Lt,y2:Lt,"stroke-width":Vt,stroke:It,"stroke-dasharray":a.dashStyle(Rt.spikedash,Vt)}).classed("spikeline",!0).classed("crisp",!0),Z.insert("line",":first-child").attr({x1:Kt,x2:$t,y1:Lt,y2:Lt,"stroke-width":Vt+2,stroke:bt}).classed("spikeline",!0).classed("crisp",!0)}kt.indexOf("marker")!==-1&&Z.insert("circle",":first-child").attr({cx:re+(Rt.side!=="right"?Vt:-Vt),cy:Lt,r:Vt,fill:It}).classed("spikeline",!0)}if(Tt){var de=ot.vLinePoint,xe,Se;wt=de&&de.xa,Rt=de&&de.ya;var ne=wt.spikesnap;ne==="cursor"?(xe=ct.pointerX,Se=ct.pointerY):(xe=wt._offset+de.x,Se=Rt._offset+de.y);var zt=i.readability(de.color,bt)<1.5?n.contrast(bt):de.color,Xt=wt.spikemode,Jt=wt.spikethickness,Wt=wt.spikecolor||zt,Ft=c.getPxPosition(Q,wt),xt,yt;if(Xt.indexOf("toaxis")!==-1||Xt.indexOf("across")!==-1){if(Xt.indexOf("toaxis")!==-1&&(xt=Ft,yt=Se),Xt.indexOf("across")!==-1){var Et=wt._counterDomainMin,Mt=wt._counterDomainMax;wt.anchor==="free"&&(Et=Math.min(Et,wt.position),Mt=Math.max(Mt,wt.position)),xt=nt.t+(1-Mt)*nt.h,yt=nt.t+(1-Et)*nt.h}Z.insert("line",":first-child").attr({x1:xe,x2:xe,y1:xt,y2:yt,"stroke-width":Jt,stroke:Wt,"stroke-dasharray":a.dashStyle(wt.spikedash,Jt)}).classed("spikeline",!0).classed("crisp",!0),Z.insert("line",":first-child").attr({x1:xe,x2:xe,y1:xt,y2:yt,"stroke-width":Jt+2,stroke:bt}).classed("spikeline",!0).classed("crisp",!0)}Xt.indexOf("marker")!==-1&&Z.insert("circle",":first-child").attr({cx:xe,cy:Ft-(wt.side!=="top"?Jt:-Jt),r:Jt,fill:Wt}).classed("spikeline",!0)}}}function j(Q,ot,$){if(!$||$.length!==Q._hoverdata.length)return!0;for(var Z=$.length-1;Z>=0;Z--){var st=$[Z],nt=Q._hoverdata[Z];if(st.curveNumber!==nt.curveNumber||String(st.pointNumber)!==String(nt.pointNumber)||String(st.pointNumbers)!==String(nt.pointNumbers))return!0}return!1}function et(Q,ot){return!ot||ot.vLinePoint!==Q._spikepoints.vLinePoint||ot.hLinePoint!==Q._spikepoints.hLinePoint}function it(Q,ot){return r.plainText(Q||"",{len:ot,allowedTags:["br","sub","sup","b","i","em"]})}function ut(Q,ot){for(var $=ot.charAt(0),Z=[],st=[],nt=[],ct=0;ct1)){delete c.grid;return}if(!b&&!u&&!o){var s=y("pattern")==="independent";s&&(b=!0)}_._hasSubplotGrid=b;var L=y("roworder"),M=L==="top to bottom",z=b?.2:.1,D=b?.3:.1,N,I;d&&c._splomGridDflt&&(N=c._splomGridDflt.xside,I=c._splomGridDflt.yside),_._domains={x:e("x",y,z,N,T),y:e("y",y,D,I,E,M)}}function e(f,c,l,m,h,b){var u=c(f+"gap",l),o=c("domain."+f);c(f+"side",m);for(var d=new Array(h),w=o[0],A=(o[1]-w)/(h-u),_=A*(1-u),y=0;y(e==="legend"?1:0));if(M===!1&&(n[e]=void 0),!(M===!1&&!c.uirevision)&&(m("uirevision",n.uirevision),M!==!1)){m("borderwidth");var z=m("orientation"),D=m("yref"),N=m("xref"),I=z==="h",k=D==="paper",B=N==="paper",O,H,Y,j="left";I?(O=0,g.getComponentMethod("rangeslider","isVisible")(a.xaxis)?k?(H=1.1,Y="bottom"):(H=1,Y="top"):k?(H=-.1,Y="top"):(H=0,Y="bottom")):(H=1,Y="auto",B?O=1.02:(O=1,j="right")),C.coerce(c,l,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:O}},"x"),C.coerce(c,l,{y:{valType:"number",editType:"legend",min:k?-2:0,max:k?3:1,dflt:H}},"y"),m("traceorder",y),p.isGrouped(n[e])&&m("tracegroupgap"),m("entrywidth"),m("entrywidthmode"),m("indentation"),m("itemsizing"),m("itemwidth"),m("itemclick"),m("itemdoubleclick"),m("groupclick"),m("xanchor",j),m("yanchor",Y),m("valign"),C.noneOrAll(c,l,["x","y"]);var et=m("title.text");if(et){m("title.side",I?"left":"top");var it=C.extendFlat({},h,{size:C.bigFont(h.size)});C.coerceFont(m,"title.font",it)}}}}G.exports=function(a,n,f){var c,l=f.slice(),m=n.shapes;if(m)for(c=0;c1)}var Z=j.hiddenlabels||[];if(!J&&(!j.showlegend||!X.length))return ut.selectAll("."+et).remove(),j._topdefs.select("#"+it).remove(),i.autoMargin(O,et);var st=C.ensureSingle(ut,"g",et,function(mt){J||mt.attr("pointer-events","all")}),nt=C.ensureSingleById(j._topdefs,"clipPath",it,function(mt){mt.append("rect")}),ct=C.ensureSingle(st,"rect","bg",function(mt){mt.attr("shape-rendering","crispEdges")});ct.call(r.stroke,Y.bordercolor).call(r.fill,Y.bgcolor).style("stroke-width",Y.borderwidth+"px");var gt=C.ensureSingle(st,"g","scrollbox"),Tt=Y.title;Y._titleWidth=0,Y._titleHeight=0;var wt;Tt.text?(wt=C.ensureSingle(gt,"text",et+"titletext"),wt.attr("text-anchor","start").call(p.font,Tt.font).text(Tt.text),L(wt,gt,O,Y,o)):gt.selectAll("."+et+"titletext").remove();var Rt=C.ensureSingle(st,"rect","scrollbar",function(mt){mt.attr(n.scrollBarEnterAttrs).call(r.fill,n.scrollBarColor)}),bt=gt.selectAll("g.groups").data(X);bt.enter().append("g").attr("class","groups"),bt.exit().remove();var At=bt.selectAll("g.traces").data(C.identity);At.enter().append("g").attr("class","traces"),At.exit().remove(),At.style("opacity",function(mt){var Lt=mt[0].trace;return S.traceIs(Lt,"pie-like")?Z.indexOf(mt[0].label)!==-1?.5:1:Lt.visible==="legendonly"?.5:1}).each(function(){g.select(this).call(E,O,Y)}).call(b,O,Y).each(function(){J||g.select(this).call(s,O,et)}),C.syncOrAsync([i.previousPromises,function(){return D(O,bt,At,Y)},function(){var mt=j._size,Lt=Y.borderwidth,Ht=Y.xref==="paper",Ut=Y.yref==="paper";if(Tt.text&&w(wt,Y,Lt),!J){var kt,Vt;Ht?kt=mt.l+mt.w*Y.x-l[I(Y)]*Y._width:kt=j.width*Y.x-l[I(Y)]*Y._width,Ut?Vt=mt.t+mt.h*(1-Y.y)-l[k(Y)]*Y._effHeight:Vt=j.height*(1-Y.y)-l[k(Y)]*Y._effHeight;var It=N(O,et,kt,Vt);if(It)return;if(j.margin.autoexpand){var re=kt,Kt=Vt;kt=Ht?C.constrain(kt,0,j.width-Y._width):re,Vt=Ut?C.constrain(Vt,0,j.height-Y._effHeight):Kt,kt!==re&&C.log("Constrain "+et+".x to make legend fit inside graph"),Vt!==Kt&&C.log("Constrain "+et+".y to make legend fit inside graph")}p.setTranslate(st,kt,Vt)}if(Rt.on(".drag",null),st.on("wheel",null),J||Y._height<=Y._maxHeight||O._context.staticPlot){var $t=Y._effHeight;J&&($t=Y._height),ct.attr({width:Y._width-Lt,height:$t-Lt,x:Lt/2,y:Lt/2}),p.setTranslate(gt,0,0),nt.select("rect").attr({width:Y._width-2*Lt,height:$t-2*Lt,x:Lt,y:Lt}),p.setClipUrl(gt,it,O),p.setRect(Rt,0,0,0,0),delete Y._scrollY}else{var le=Math.max(n.scrollBarMinHeight,Y._effHeight*Y._effHeight/Y._height),he=Y._effHeight-le-2*n.scrollBarMargin,de=Y._height-Y._effHeight,xe=he/de,Se=Math.min(Y._scrollY||0,de);ct.attr({width:Y._width-2*Lt+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-Lt,x:Lt/2,y:Lt/2}),nt.select("rect").attr({width:Y._width-2*Lt+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-2*Lt,x:Lt,y:Lt+Se}),p.setClipUrl(gt,it,O),yt(Se,le,xe),st.on("wheel",function(){Se=C.constrain(Y._scrollY+g.event.deltaY/he*de,0,de),yt(Se,le,xe),Se!==0&&Se!==de&&g.event.preventDefault()});var ne,zt,Xt,Jt=function(ie,me,be){var ve=(be-me)/xe+ie;return C.constrain(ve,0,de)},Wt=function(ie,me,be){var ve=(me-be)/xe+ie;return C.constrain(ve,0,de)},Ft=g.behavior.drag().on("dragstart",function(){var ie=g.event.sourceEvent;ie.type==="touchstart"?ne=ie.changedTouches[0].clientY:ne=ie.clientY,Xt=Se}).on("drag",function(){var ie=g.event.sourceEvent;ie.buttons===2||ie.ctrlKey||(ie.type==="touchmove"?zt=ie.changedTouches[0].clientY:zt=ie.clientY,Se=Jt(Xt,ne,zt),yt(Se,le,xe))});Rt.call(Ft);var xt=g.behavior.drag().on("dragstart",function(){var ie=g.event.sourceEvent;ie.type==="touchstart"&&(ne=ie.changedTouches[0].clientY,Xt=Se)}).on("drag",function(){var ie=g.event.sourceEvent;ie.type==="touchmove"&&(zt=ie.changedTouches[0].clientY,Se=Wt(Xt,ne,zt),yt(Se,le,xe))});gt.call(xt)}function yt(ie,me,be){Y._scrollY=O._fullLayout[et]._scrollY=ie,p.setTranslate(gt,0,-ie),p.setRect(Rt,Y._width,n.scrollBarMargin+ie*be,n.scrollBarWidth,me),nt.select("rect").attr("y",Lt+ie)}if(O._context.edits.legendPosition){var Et,Mt,Nt,jt;st.classed("cursor-move",!0),v.init({element:st.node(),gd:O,prepFn:function(){var ie=p.getTranslate(st);Nt=ie.x,jt=ie.y},moveFn:function(ie,me){var be=Nt+ie,ve=jt+me;p.setTranslate(st,be,ve),Et=v.align(be,Y._width,mt.l,mt.l+mt.w,Y.xanchor),Mt=v.align(ve+Y._height,-Y._height,mt.t+mt.h,mt.t,Y.yanchor)},doneFn:function(){if(Et!==void 0&&Mt!==void 0){var ie={};ie[et+".x"]=Et,ie[et+".y"]=Mt,S.call("_guiRelayout",O,ie)}},clickFn:function(ie,me){var be=ut.selectAll("g.traces").filter(function(){var ve=this.getBoundingClientRect();return me.clientX>=ve.left&&me.clientX<=ve.right&&me.clientY>=ve.top&&me.clientY<=ve.bottom});be.size()>0&&y(O,st,be,ie,me)}})}}],O)}}function _(O,H,Y){var j=O[0],et=j.width,it=H.entrywidthmode,ut=j.trace.legendwidth||H.entrywidth;return it==="fraction"?H._maxWidth*ut:Y+(ut||et)}function y(O,H,Y,j,et){var it=Y.data()[0][0].trace,ut={event:et,node:Y.node(),curveNumber:it.index,expandedIndex:it._expandedIndex,data:O.data,layout:O.layout,frames:O._transitionData._frames,config:O._context,fullData:O._fullData,fullLayout:O._fullLayout};it._group&&(ut.group=it._group),S.traceIs(it,"pie-like")&&(ut.label=Y.datum()[0].label);var J=x.triggerHandler(O,"plotly_legendclick",ut);if(j===1){if(J===!1)return;H._clickTimeout=setTimeout(function(){O._fullLayout&&a(Y,O,j)},O._context.doubleClickDelay)}else if(j===2){H._clickTimeout&&clearTimeout(H._clickTimeout),O._legendMouseDownTime=0;var X=x.triggerHandler(O,"plotly_legenddoubleclick",ut);X!==!1&&J!==!1&&a(Y,O,j)}}function E(O,H,Y){var j=B(Y),et=O.data()[0][0],it=et.trace,ut=S.traceIs(it,"pie-like"),J=!Y._inHover&&H._context.edits.legendText&&!ut,X=Y._maxNameLength,tt,V;et.groupTitle?(tt=et.groupTitle.text,V=et.groupTitle.font):(V=Y.font,Y.entries?tt=et.text:(tt=ut?et.label:it.name,it._meta&&(tt=C.templateString(tt,it._meta))));var Q=C.ensureSingle(O,"text",j+"text");Q.attr("text-anchor","start").call(p.font,V).text(J?T(tt,X):tt);var ot=Y.indentation+Y.itemwidth+n.itemGap*2;e.positionText(Q,ot,0),J?Q.call(e.makeEditable,{gd:H,text:tt}).call(L,O,H,Y).on("edit",function($){this.text(T($,X)).call(L,O,H,Y);var Z=et.trace._fullInput||{},st={};if(S.hasTransform(Z,"groupby")){var nt=S.getTransformIndices(Z,"groupby"),ct=nt[nt.length-1],gt=C.keyedContainer(Z,"transforms["+ct+"].styles","target","value.name");gt.set(et.trace._group,$),st=gt.constructUpdate()}else st.name=$;return Z._isShape?S.call("_guiRelayout",H,"shapes["+it.index+"].name",st.name):S.call("_guiRestyle",H,st,it.index)}):L(Q,O,H,Y)}function T(O,H){var Y=Math.max(4,H);if(O&&O.trim().length>=Y/2)return O;O=O||"";for(var j=Y-O.length;j>0;j--)O+=" ";return O}function s(O,H,Y){var j=H._context.doubleClickDelay,et,it=1,ut=C.ensureSingle(O,"rect",Y+"toggle",function(J){H._context.staticPlot||J.style("cursor","pointer").attr("pointer-events","all"),J.call(r.fill,"rgba(0,0,0,0)")});H._context.staticPlot||(ut.on("mousedown",function(){et=new Date().getTime(),et-H._legendMouseDownTimej&&(it=Math.max(it-1,1)),y(H,J,O,it,g.event)}}))}function L(O,H,Y,j,et){j._inHover&&O.attr("data-notex",!0),e.convertToTspans(O,Y,function(){M(H,Y,j,et)})}function M(O,H,Y,j){var et=O.data()[0][0];if(!Y._inHover&&et&&!et.trace.showlegend){O.remove();return}var it=O.select("g[class*=math-group]"),ut=it.node(),J=B(Y);Y||(Y=H._fullLayout[J]);var X=Y.borderwidth,tt;j===o?tt=Y.title.font:et.groupTitle?tt=et.groupTitle.font:tt=Y.font;var V=tt.size*c,Q,ot;if(ut){var $=p.bBox(ut);Q=$.height,ot=$.width,j===o?p.setTranslate(it,X,X+Q*.75):p.setTranslate(it,0,Q*.25)}else{var Z="."+J+(j===o?"title":"")+"text",st=O.select(Z),nt=e.lineCount(st),ct=st.node();if(Q=V*nt,ot=ct?p.bBox(ct).width:0,j===o)Y.title.side==="left"&&(ot+=n.itemGap*2),e.positionText(st,X+n.titlePad,X+V);else{var gt=n.itemGap*2+Y.indentation+Y.itemwidth;et.groupTitle&&(gt=n.itemGap,ot-=Y.indentation+Y.itemwidth),e.positionText(st,gt,-V*((nt-1)/2-.3))}}j===o?(Y._titleWidth=ot,Y._titleHeight=Q):(et.lineHeight=V,et.height=Math.max(Q,16)+3,et.width=ot)}function z(O){var H=0,Y=0,j=O.title.side;return j&&(j.indexOf("left")!==-1&&(H=O._titleWidth),j.indexOf("top")!==-1&&(Y=O._titleHeight)),[H,Y]}function D(O,H,Y,j){var et=O._fullLayout,it=B(j);j||(j=et[it]);var ut=et._size,J=u.isVertical(j),X=u.isGrouped(j),tt=j.entrywidthmode==="fraction",V=j.borderwidth,Q=2*V,ot=n.itemGap,$=j.indentation+j.itemwidth+ot*2,Z=2*(V+ot),st=k(j),nt=j.y<0||j.y===0&&st==="top",ct=j.y>1||j.y===1&&st==="bottom",gt=j.tracegroupgap,Tt={};j._maxHeight=Math.max(nt||ct?et.height/2:ut.h,30);var wt=0;j._width=0,j._height=0;var Rt=z(j);if(J)Y.each(function(Xt){var Jt=Xt[0].height;p.setTranslate(this,V+Rt[0],V+Rt[1]+j._height+Jt/2+ot),j._height+=Jt,j._width=Math.max(j._width,Xt[0].width)}),wt=$+j._width,j._width+=ot+$+Q,j._height+=Z,X&&(H.each(function(Xt,Jt){p.setTranslate(this,0,Jt*j.tracegroupgap)}),j._height+=(j._lgroupsLength-1)*j.tracegroupgap);else{var bt=I(j),At=j.x<0||j.x===0&&bt==="right",mt=j.x>1||j.x===1&&bt==="left",Lt=ct||nt,Ht=et.width/2;j._maxWidth=Math.max(At?Lt&&bt==="left"?ut.l+ut.w:Ht:mt?Lt&&bt==="right"?ut.r+ut.w:Ht:ut.w,2*$);var Ut=0,kt=0;Y.each(function(Xt){var Jt=_(Xt,j,$);Ut=Math.max(Ut,Jt),kt+=Jt}),wt=null;var Vt=0;if(X){var It=0,re=0,Kt=0;H.each(function(){var Xt=0,Jt=0;g.select(this).selectAll("g.traces").each(function(Ft){var xt=_(Ft,j,$),yt=Ft[0].height;p.setTranslate(this,Rt[0],Rt[1]+V+ot+yt/2+Jt),Jt+=yt,Xt=Math.max(Xt,xt),Tt[Ft[0].trace.legendgroup]=Xt});var Wt=Xt+ot;re>0&&Wt+V+re>j._maxWidth?(Vt=Math.max(Vt,re),re=0,Kt+=It+gt,It=Jt):It=Math.max(It,Jt),p.setTranslate(this,re,Kt),re+=Wt}),j._width=Math.max(Vt,re)+V,j._height=Kt+It+Z}else{var $t=Y.size(),le=kt+Q+($t-1)*ot=j._maxWidth&&(Vt=Math.max(Vt,Se),de=0,xe+=he,j._height+=he,he=0),p.setTranslate(this,Rt[0]+V+de,Rt[1]+V+xe+Jt/2+ot),Se=de+Wt+ot,de+=Ft,he=Math.max(he,Jt)}),le?(j._width=de+Q,j._height=he+Z):(j._width=Math.max(Vt,Se)+Q,j._height+=he+Z)}}j._width=Math.ceil(Math.max(j._width+Rt[0],j._titleWidth+2*(V+n.titlePad))),j._height=Math.ceil(Math.max(j._height+Rt[1],j._titleHeight+2*(V+n.itemGap))),j._effHeight=Math.min(j._height,j._maxHeight);var ne=O._context.edits,zt=ne.legendText||ne.legendPosition;Y.each(function(Xt){var Jt=g.select(this).select("."+it+"toggle"),Wt=Xt[0].height,Ft=Xt[0].trace.legendgroup,xt=_(Xt,j,$);X&&Ft!==""&&(xt=Tt[Ft]);var yt=zt?$:wt||xt;!J&&!tt&&(yt+=ot/2),p.setRect(Jt,0,-Wt/2,yt,Wt)})}function N(O,H,Y,j){var et=O._fullLayout,it=et[H],ut=I(it),J=k(it),X=it.xref==="paper",tt=it.yref==="paper";O._fullLayout._reservedMargin[H]={};var V=it.y<.5?"b":"t",Q=it.x<.5?"l":"r",ot={r:et.width-Y,l:Y+it._width,b:et.height-j,t:j+it._effHeight};if(X&&tt)return i.autoMargin(O,H,{x:it.x,y:it.y,l:it._width*l[ut],r:it._width*m[ut],b:it._effHeight*m[J],t:it._effHeight*l[J]});X?O._fullLayout._reservedMargin[H][V]=ot[V]:tt||it.orientation==="v"?O._fullLayout._reservedMargin[H][Q]=ot[Q]:O._fullLayout._reservedMargin[H][V]=ot[V]}function I(O){return C.isRightAnchor(O)?"right":C.isCenterAnchor(O)?"center":"left"}function k(O){return C.isBottomAnchor(O)?"bottom":C.isMiddleAnchor(O)?"middle":"top"}function B(O){return O._id||"legend"}},35456:function(G,U,t){var g=t(24040),C=t(42451);G.exports=function(S,x,v){var p=x._inHover,r=C.isGrouped(x),e=C.isReversed(x),a={},n=[],f=!1,c={},l=0,m=0,h,b;function u(O,H,Y){if(x.visible!==!1&&!(v&&O!==x._id))if(H===""||!C.isGrouped(x)){var j="~~i"+l;n.push(j),a[j]=[Y],l++}else n.indexOf(H)===-1?(n.push(H),f=!0,a[H]=[Y]):a[H].push(Y)}for(h=0;hM&&(L=M)}T[h][0]._groupMinRank=L,T[h][0]._preGroupSort=h}var z=function(O,H){return O[0]._groupMinRank-H[0]._groupMinRank||O[0]._preGroupSort-H[0]._preGroupSort},D=function(O,H){return O.trace.legendrank-H.trace.legendrank||O._preSort-H._preSort};for(T.forEach(function(O,H){O[0]._preGroupSort=H}),T.sort(z),h=0;h0)Q=X.width;else return 0;return E?V:Math.min(Q,tt)};w.each(function(J){var X=g.select(this),tt=i.ensureSingle(X,"g","layers");tt.style("opacity",J[0].trace.opacity);var V=_.indentation,Q=_.valign,ot=J[0].lineHeight,$=J[0].height;if(Q==="middle"&&V===0||!ot||!$)tt.attr("transform",null);else{var Z={top:1,bottom:-1}[Q],st=Z*(.5*(ot-$+3))||0,nt=_.indentation;tt.attr("transform",S(nt,st))}var ct=tt.selectAll("g.legendfill").data([J]);ct.enter().append("g").classed("legendfill",!0);var gt=tt.selectAll("g.legendlines").data([J]);gt.enter().append("g").classed("legendlines",!0);var Tt=tt.selectAll("g.legendsymbols").data([J]);Tt.enter().append("g").classed("legendsymbols",!0),Tt.selectAll("g.legendpoints").data([J]).enter().append("g").classed("legendpoints",!0)}).each(ut).each(N).each(k).each(I).each(O).each(et).each(j).each(z).each(D).each(H).each(Y);function z(J){var X=u(J),tt=X.showFill,V=X.showLine,Q=X.showGradientLine,ot=X.showGradientFill,$=X.anyFill,Z=X.anyLine,st=J[0],nt=st.trace,ct,gt,Tt=p(nt),wt=Tt.colorscale,Rt=Tt.reversescale,bt=function(Vt){if(Vt.size())if(tt)x.fillGroupStyle(Vt,A,!0);else{var It="legendfill-"+nt.uid;x.gradient(Vt,A,It,b(Rt),wt,"fill")}},At=function(Vt){if(Vt.size()){var It="legendline-"+nt.uid;x.lineGroupStyle(Vt),x.gradient(Vt,A,It,b(Rt),wt,"stroke")}},mt=r.hasMarkers(nt)||!$?"M5,0":Z?"M5,-2":"M5,-3",Lt=g.select(this),Ht=Lt.select(".legendfill").selectAll("path").data(tt||ot?[J]:[]);if(Ht.enter().append("path").classed("js-fill",!0),Ht.exit().remove(),Ht.attr("d",mt+"h"+T+"v6h-"+T+"z").call(bt),V||Q){var Ut=M(void 0,nt.line,m,c);gt=i.minExtend(nt,{line:{width:Ut}}),ct=[i.minExtend(st,{trace:gt})]}var kt=Lt.select(".legendlines").selectAll("path").data(V||Q?[ct]:[]);kt.enter().append("path").classed("js-line",!0),kt.exit().remove(),kt.attr("d",mt+(Q?"l"+T+",0.0001":"h"+T)).call(V?x.lineGroupStyle:At)}function D(J){var X=u(J),tt=X.anyFill,V=X.anyLine,Q=X.showLine,ot=X.showMarker,$=J[0],Z=$.trace,st=!ot&&!V&&!tt&&r.hasText(Z),nt,ct;function gt(Ht,Ut,kt,Vt){var It=i.nestedProperty(Z,Ht).get(),re=i.isArrayOrTypedArray(It)&&Ut?Ut(It):It;if(E&&re&&Vt!==void 0&&(re=Vt),kt){if(rekt[1])return kt[1]}return re}function Tt(Ht){return $._distinct&&$.index&&Ht[$.index]?Ht[$.index]:Ht[0]}if(ot||st||Q){var wt={},Rt={};if(ot){wt.mc=gt("marker.color",Tt),wt.mx=gt("marker.symbol",Tt),wt.mo=gt("marker.opacity",i.mean,[.2,1]),wt.mlc=gt("marker.line.color",Tt),wt.mlw=gt("marker.line.width",i.mean,[0,5],l),Rt.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var bt=gt("marker.size",i.mean,[2,16],f);wt.ms=bt,Rt.marker.size=bt}Q&&(Rt.line={width:gt("line.width",Tt,[0,10],c)}),st&&(wt.tx="Aa",wt.tp=gt("textposition",Tt),wt.ts=10,wt.tc=gt("textfont.color",Tt),wt.tf=gt("textfont.family",Tt)),nt=[i.minExtend($,wt)],ct=i.minExtend(Z,Rt),ct.selectedpoints=null,ct.texttemplate=null}var At=g.select(this).select("g.legendpoints"),mt=At.selectAll("path.scatterpts").data(ot?nt:[]);mt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",L),mt.exit().remove(),mt.call(x.pointStyle,ct,A),ot&&(nt[0].mrc=3);var Lt=At.selectAll("g.pointtext").data(st?nt:[]);Lt.enter().append("g").classed("pointtext",!0).append("text").attr("transform",L),Lt.exit().remove(),Lt.selectAll("text").call(x.textPointStyle,ct,A)}function N(J){var X=J[0].trace,tt=X.type==="waterfall";if(J[0]._distinct&&tt){var V=J[0].trace[J[0].dir].marker;return J[0].mc=V.color,J[0].mlw=V.line.width,J[0].mlc=V.line.color,B(J,this,"waterfall")}var Q=[];X.visible&&tt&&(Q=J[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var ot=g.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Q);ot.enter().append("path").classed("legendwaterfall",!0).attr("transform",L).style("stroke-miterlimit",1),ot.exit().remove(),ot.each(function($){var Z=g.select(this),st=X[$[0]].marker,nt=M(void 0,st.line,h,l);Z.attr("d",$[1]).style("stroke-width",nt+"px").call(v.fill,st.color),nt&&Z.call(v.stroke,st.line.color)})}function I(J){B(J,this)}function k(J){B(J,this,"funnel")}function B(J,X,tt){var V=J[0].trace,Q=V.marker||{},ot=Q.line||{},$=Q.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Z=tt?V.visible&&V.type===tt:C.traceIs(V,"bar"),st=g.select(X).select("g.legendpoints").selectAll("path.legend"+tt).data(Z?[J]:[]);st.enter().append("path").classed("legend"+tt,!0).attr("d",$).attr("transform",L),st.exit().remove(),st.each(function(nt){var ct=g.select(this),gt=nt[0],Tt=M(gt.mlw,Q.line,h,l);ct.style("stroke-width",Tt+"px");var wt=gt.mcc;if(!_._inHover&&"mc"in gt){var Rt=p(Q),bt=Rt.mid;bt===void 0&&(bt=(Rt.max+Rt.min)/2),wt=x.tryColorscale(Q,"")(bt)}var At=wt||gt.mc||Q.color,mt=Q.pattern,Lt=mt&&x.getPatternAttr(mt.shape,0,"");if(Lt){var Ht=x.getPatternAttr(mt.bgcolor,0,null),Ut=x.getPatternAttr(mt.fgcolor,0,null),kt=mt.fgopacity,Vt=o(mt.size,8,10),It=o(mt.solidity,.5,1),re="legend-"+V.uid;ct.call(x.pattern,"legend",A,re,Lt,Vt,It,wt,mt.fillmode,Ht,Ut,kt)}else ct.call(v.fill,At);Tt&&v.stroke(ct,gt.mlc||ot.color)})}function O(J){var X=J[0].trace,tt=g.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&C.traceIs(X,"box-violin")?[J]:[]);tt.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",L),tt.exit().remove(),tt.each(function(){var V=g.select(this);if((X.boxpoints==="all"||X.points==="all")&&v.opacity(X.fillcolor)===0&&v.opacity((X.line||{}).color)===0){var Q=i.minExtend(X,{marker:{size:E?f:i.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});tt.call(x.pointStyle,Q,A)}else{var ot=M(void 0,X.line,h,l);V.style("stroke-width",ot+"px").call(v.fill,X.fillcolor),ot&&v.stroke(V,X.line.color)}})}function H(J){var X=J[0].trace,tt=g.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[J,J]:[]);tt.enter().append("path").classed("legendcandle",!0).attr("d",function(V,Q){return Q?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",L).style("stroke-miterlimit",1),tt.exit().remove(),tt.each(function(V,Q){var ot=g.select(this),$=X[Q?"increasing":"decreasing"],Z=M(void 0,$.line,h,l);ot.style("stroke-width",Z+"px").call(v.fill,$.fillcolor),Z&&v.stroke(ot,$.line.color)})}function Y(J){var X=J[0].trace,tt=g.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[J,J]:[]);tt.enter().append("path").classed("legendohlc",!0).attr("d",function(V,Q){return Q?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",L).style("stroke-miterlimit",1),tt.exit().remove(),tt.each(function(V,Q){var ot=g.select(this),$=X[Q?"increasing":"decreasing"],Z=M(void 0,$.line,h,l);ot.style("fill","none").call(x.dashLine,$.line.dash,Z),Z&&v.stroke(ot,$.line.color)})}function j(J){it(J,this,"pie")}function et(J){it(J,this,"funnelarea")}function it(J,X,tt){var V=J[0],Q=V.trace,ot=tt?Q.visible&&Q.type===tt:C.traceIs(Q,tt),$=g.select(X).select("g.legendpoints").selectAll("path.legend"+tt).data(ot?[J]:[]);if($.enter().append("path").classed("legend"+tt,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",L),$.exit().remove(),$.size()){var Z=Q.marker||{},st=M(a(Z.line.width,V.pts),Z.line,h,l),nt="pieLike",ct=i.minExtend(Q,{marker:{line:{width:st}}},nt),gt=i.minExtend(V,{trace:ct},nt);e($,gt,ct,A)}}function ut(J){var X=J[0].trace,tt,V=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":V=[["M-15,-2V4H15V-2Z"]],tt=!0;break;case"choropleth":case"choroplethmapbox":V=[["M-6,-6V6H6V-6Z"]],tt=!0;break;case"densitymapbox":V=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],tt="radial";break;case"cone":V=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],tt=!1;break;case"streamtube":V=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],tt=!1;break;case"surface":V=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],tt=!0;break;case"mesh3d":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],tt=!1;break;case"volume":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],tt=!0;break;case"isosurface":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],tt=!1;break}var Q=g.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(V);Q.enter().append("path").classed("legend3dandfriends",!0).attr("transform",L).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(ot,$){var Z=g.select(this),st=p(X),nt=st.colorscale,ct=st.reversescale,gt=function(bt){if(bt.size()){var At="legendfill-"+X.uid;x.gradient(bt,A,At,b(ct,tt==="radial"),nt,"fill")}},Tt;if(nt){if(!tt){var Rt=nt.length;Tt=$===0?nt[ct?Rt-1:0][1]:$===1?nt[ct?0:Rt-1][1]:nt[Math.floor((Rt-1)/2)][1]}}else{var wt=X.vertexcolor||X.facecolor||X.color;Tt=i.isArrayOrTypedArray(wt)?wt[$]||wt[0]:wt}Z.attr("d",ot[0]),Tt?Z.call(v.fill,Tt):Z.call(gt)})}};function b(d,w){var A=w?"radial":"horizontal";return A+(d?"":"reversed")}function u(d){var w=d[0].trace,A=w.contours,_=r.hasLines(w),y=r.hasMarkers(w),E=w.visible&&w.fill&&w.fill!=="none",T=!1,s=!1;if(A){var L=A.coloring;L==="lines"?T=!0:_=L==="none"||L==="heatmap"||A.showlines,A.type==="constraint"?E=A._operation!=="=":(L==="fill"||L==="heatmap")&&(s=!0)}return{showMarker:y,showLine:_,showFill:E,showGradientLine:T,showGradientFill:s,anyLine:_||T,anyFill:E||s}}function o(d,w,A){return d&&i.isArrayOrTypedArray(d)?w:d>A?A:d}},66540:function(G,U,t){t(76052),G.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},44248:function(G,U,t){var g=t(24040),C=t(7316),i=t(79811),S=t(9224),x=t(4016).eraseActiveShape,v=t(3400),p=v._,r=G.exports={};r.toImage={name:"toImage",title:function(d){var w=d._context.toImageButtonOptions||{},A=w.format||"png";return A==="png"?p(d,"Download plot as a png"):p(d,"Download plot")},icon:S.camera,click:function(d){var w=d._context.toImageButtonOptions,A={format:w.format||"png"};v.notifier(p(d,"Taking snapshot - this may take a few seconds"),"long"),A.format!=="svg"&&v.isIE()&&(v.notifier(p(d,"IE only supports svg. Changing format to svg."),"long"),A.format="svg"),["filename","width","height","scale"].forEach(function(_){_ in w&&(A[_]=w[_])}),g.call("downloadImage",d,A).then(function(_){v.notifier(p(d,"Snapshot succeeded")+" - "+_,"long")}).catch(function(){v.notifier(p(d,"Sorry, there was a problem downloading your snapshot!"),"long")})}},r.sendDataToCloud={name:"sendDataToCloud",title:function(d){return p(d,"Edit in Chart Studio")},icon:S.disk,click:function(d){C.sendDataToCloud(d)}},r.editInChartStudio={name:"editInChartStudio",title:function(d){return p(d,"Edit in Chart Studio")},icon:S.pencil,click:function(d){C.sendDataToCloud(d)}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(d){return p(d,"Zoom")},attr:"dragmode",val:"zoom",icon:S.zoombox,click:e},r.pan2d={name:"pan2d",_cat:"pan",title:function(d){return p(d,"Pan")},attr:"dragmode",val:"pan",icon:S.pan,click:e},r.select2d={name:"select2d",_cat:"select",title:function(d){return p(d,"Box Select")},attr:"dragmode",val:"select",icon:S.selectbox,click:e},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(d){return p(d,"Lasso Select")},attr:"dragmode",val:"lasso",icon:S.lasso,click:e},r.drawclosedpath={name:"drawclosedpath",title:function(d){return p(d,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:S.drawclosedpath,click:e},r.drawopenpath={name:"drawopenpath",title:function(d){return p(d,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:S.drawopenpath,click:e},r.drawline={name:"drawline",title:function(d){return p(d,"Draw line")},attr:"dragmode",val:"drawline",icon:S.drawline,click:e},r.drawrect={name:"drawrect",title:function(d){return p(d,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:S.drawrect,click:e},r.drawcircle={name:"drawcircle",title:function(d){return p(d,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:S.drawcircle,click:e},r.eraseshape={name:"eraseshape",title:function(d){return p(d,"Erase active shape")},icon:S.eraseshape,click:x},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(d){return p(d,"Zoom in")},attr:"zoom",val:"in",icon:S.zoom_plus,click:e},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(d){return p(d,"Zoom out")},attr:"zoom",val:"out",icon:S.zoom_minus,click:e},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(d){return p(d,"Autoscale")},attr:"zoom",val:"auto",icon:S.autoscale,click:e},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(d){return p(d,"Reset axes")},attr:"zoom",val:"reset",icon:S.home,click:e},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(d){return p(d,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:S.tooltip_basic,gravity:"ne",click:e},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(d){return p(d,"Compare data on hover")},attr:"hovermode",val:function(d){return d._fullLayout._isHoriz?"y":"x"},icon:S.tooltip_compare,gravity:"ne",click:e};function e(d,w){var A=w.currentTarget,_=A.getAttribute("data-attr"),y=A.getAttribute("data-val")||!0,E=d._fullLayout,T={},s=i.list(d,null,!0),L=E._cartesianSpikesEnabled,M,z;if(_==="zoom"){var D=y==="in"?.5:2,N=(1+D)/2,I=(1-D)/2,k;for(z=0;z1?(it=["toggleHover"],ut=["resetViews"]):T?(et=["zoomInGeo","zoomOutGeo"],it=["hoverClosestGeo"],ut=["resetGeo"]):E?(it=["hoverClosest3d"],ut=["resetCameraDefault3d","resetCameraLastSave3d"]):D?(et=["zoomInMapbox","zoomOutMapbox"],it=["toggleHover"],ut=["resetViewMapbox"]):M?it=["hoverClosestGl2d"]:s?it=["hoverClosestPie"]:k?(it=["hoverClosestCartesian","hoverCompareCartesian"],ut=["resetViewSankey"]):it=["toggleHover"],y&&(it=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(f(b)||O)&&(it=[]),(y||M)&&!B&&(et=["zoomIn2d","zoomOut2d","autoScale2d"],ut[0]!=="resetViews"&&(ut=["resetScale2d"])),E?J=["zoom3d","pan3d","orbitRotation","tableRotation"]:(y||M)&&!B||z?J=["zoom2d","pan2d"]:D||T?J=["pan2d"]:N&&(J=["zoom2d"]),n(b)&&J.push("select2d","lasso2d");var X=[],tt=function($){X.indexOf($)===-1&&it.indexOf($)!==-1&&X.push($)};if(Array.isArray(A)){for(var V=[],Q=0;Q0);if(o){var d=r(n,f,c);b("x",d[0]),b("y",d[1]),g.noneOrAll(a,n,["x","y"]),b("xanchor"),b("yanchor"),g.coerceFont(b,"font",f.font);var w=b("bgcolor");b("activecolor",C.contrast(w,v.lightAmount,v.darkAmount)),b("bordercolor"),b("borderwidth")}};function p(e,a,n,f){var c=f.calendar;function l(b,u){return g.coerce(e,a,x.buttons,b,u)}var m=l("visible");if(m){var h=l("step");h!=="all"&&(c&&c!=="gregorian"&&(h==="month"||h==="year")?a.stepmode="backward":l("stepmode"),l("count")),l("label")}}function r(e,a,n){for(var f=n.filter(function(h){return a[h].anchor===e._id}),c=0,l=0;l=At.max)Rt=nt[bt+1];else if(wt=At.pmax)Rt=nt[bt+1];else if(wt0?E.touches[0].clientX:0}function m(E,T,s,L){if(T._context.staticPlot)return;var M=E.select("rect."+c.slideBoxClassName).node(),z=E.select("rect."+c.grabAreaMinClassName).node(),D=E.select("rect."+c.grabAreaMaxClassName).node();function N(){var I=g.event,k=I.target,B=l(I),O=B-E.node().getBoundingClientRect().left,H=L.d2p(s._rl[0]),Y=L.d2p(s._rl[1]),j=n.coverSlip();this.addEventListener("touchmove",et),this.addEventListener("touchend",it),j.addEventListener("mousemove",et),j.addEventListener("mouseup",it);function et(ut){var J=l(ut),X=+J-B,tt,V,Q;switch(k){case M:if(Q="ew-resize",H+X>s._length||Y+X<0)return;tt=H+X,V=Y+X;break;case z:if(Q="col-resize",H+X>s._length)return;tt=H+X,V=Y;break;case D:if(Q="col-resize",Y+X<0)return;tt=H,V=Y+X;break;default:Q="ew-resize",tt=O,V=O+X;break}if(V=0;N--){var I=A.append("path").attr(y).style("opacity",N?.1:E).call(S.stroke,s).call(S.fill,T).call(x.dashLine,N?"solid":M,N?4+L:L);if(f(I,h,o),z){var k=v(h.layout,"selections",o);I.style({cursor:"move"});var B={element:I.node(),plotinfo:d,gd:h,editHelpers:k,isActiveSelection:!0},O=g(_,h);C(O,I,B)}else I.style("pointer-events",N?"all":"none");D[N]=I}var H=D[0],Y=D[1];Y.node().addEventListener("click",function(){return c(h,H)})}}function f(h,b,u){var o=u.xref+u.yref;x.setClipUrl(h,"clip"+b._fullLayout._uid+o,b)}function c(h,b){if(a(h)){var u=b.node(),o=+u.getAttribute("data-index");if(o>=0){if(o===h._fullLayout._activeSelectionIndex){m(h);return}h._fullLayout._activeSelectionIndex=o,h._fullLayout._deactivateSelection=m,e(h)}}}function l(h){if(a(h)){var b=h._fullLayout.selections.length-1;h._fullLayout._activeSelectionIndex=b,h._fullLayout._deactivateSelection=m,e(h)}}function m(h){if(a(h)){var b=h._fullLayout._activeSelectionIndex;b>=0&&(i(h),delete h._fullLayout._activeSelectionIndex,e(h))}}},34200:function(G,U,t){var g=t(98192).u,C=t(92880).extendFlat;G.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:C({},g,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(G){G.exports=function(t,g,C){C("newselection.mode");var i=C("newselection.line.width");i&&(C("newselection.line.color"),C("newselection.line.dash")),C("activeselection.fillcolor"),C("activeselection.opacity")}},5968:function(G,U,t){var g=t(72760),C=g.selectMode,i=t(1936),S=i.clearOutline,x=t(9856),v=x.readPaths,p=x.writePaths,r=x.fixDatesForPaths;G.exports=function(a,n){if(a.length){var f=a[0][0];if(f){var c=f.getAttribute("d"),l=n.gd,m=l._fullLayout.newselection,h=n.plotinfo,b=h.xaxis,u=h.yaxis,o=n.isActiveSelection,d=n.dragmode,w=(l.layout||{}).selections||[];if(!C(d)&&o!==void 0){var A=l._fullLayout._activeSelectionIndex;if(A=0){Te._fullLayout._deactivateShape(Te);return}if(!me){var En=Be.clickmode;s.done(Gr).then(function(){if(s.clear(Gr),rn===2){for(rr.remove(),Qe=0;Qe-1&&it(Cn,Te,yt.xaxes,yt.yaxes,yt.subplot,yt,rr),En==="event"&&Xt(Te,void 0);v.click(Te,Cn,Ke.id)}).catch(y.error)}},yt.doneFn=function(){xr.remove(),s.done(Gr).then(function(){s.clear(Gr),!ir&&Oe&&yt.selectionDefs&&(Oe.subtract=vr,yt.selectionDefs.push(Oe),yt.mergedPolygons.length=0,[].push.apply(yt.mergedPolygons,Ne)),(ir||me)&&$(yt,ir),yt.doneFnCompleted&&yt.doneFnCompleted(Pr),be&&Xt(Te,fr)}).catch(y.error)}}function it(Wt,Ft,xt,yt,Et,Mt,Nt){var jt=Ft._hoverdata,ie=Ft._fullLayout,me=ie.clickmode,be=me.indexOf("event")>-1,ve=[],Le,ce,Te,Be,ir,pe,Xe,Ke,or,$e;if(ct(jt)){V(Wt,Ft,Mt),Le=st(Ft,xt,yt,Et);var ge=gt(jt,Le),se=ge.pointNumbers.length>0;if(se?wt(Le,ge):Rt(Le)&&(Xe=Tt(ge))){for(Nt&&Nt.remove(),$e=0;$e=0}function ot(Wt){return Wt._fullLayout._activeSelectionIndex>=0}function $(Wt,Ft){var xt=Wt.dragmode,yt=Wt.plotinfo,Et=Wt.gd;Q(Et)&&Et._fullLayout._deactivateShape(Et),ot(Et)&&Et._fullLayout._deactivateSelection(Et);var Mt=Et._fullLayout,Nt=Mt._zoomlayer,jt=n(xt),ie=c(xt);if(jt||ie){var me=Nt.selectAll(".select-outline-"+yt.id);if(me&&Et._fullLayout._outlining){var be;jt&&(be=w(me,Wt)),be&&i.call("_guiRelayout",Et,{shapes:be});var ve;ie&&!j(Wt)&&(ve=A(me,Wt)),ve&&(Et._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Et,{selections:ve}).then(function(){Ft&&_(Et)})),Et._fullLayout._outlining=!1}}yt.selection={},yt.selection.selectionDefs=Wt.selectionDefs=[],yt.selection.mergedPolygons=Wt.mergedPolygons=[]}function Z(Wt){return Wt._id}function st(Wt,Ft,xt,yt){if(!Wt.calcdata)return[];var Et=[],Mt=Ft.map(Z),Nt=xt.map(Z),jt,ie,me;for(me=0;me0,Mt=Et?yt[0]:xt;return Ft.selectedpoints?Ft.selectedpoints.indexOf(Mt)>-1:!1}function wt(Wt,Ft){var xt=[],yt,Et,Mt,Nt;for(Nt=0;Nt0&&xt.push(yt);if(xt.length===1&&(Mt=xt[0]===Ft.searchInfo,Mt&&(Et=Ft.searchInfo.cd[0].trace,Et.selectedpoints.length===Ft.pointNumbers.length))){for(Nt=0;Nt1||(Ft+=yt.selectedpoints.length,Ft>1)))return!1;return Ft===1}function bt(Wt,Ft,xt){var yt;for(yt=0;yt-1&&Ft;if(!Nt&&Ft){var rn=$t(Wt,!0);if(rn.length){var Cn=rn[0].xref,En=rn[0].yref;if(Cn&&En){var Tr=de(rn),Cr=Se([L(Wt,Cn,"x"),L(Wt,En,"y")]);Cr(Pr,Tr)}}Wt._fullLayout._noEmitSelectedAtStart?Wt._fullLayout._noEmitSelectedAtStart=!1:cn&&Xt(Wt,Pr),Le._reselect=!1}if(!Nt&&Le._deselect){var Wr=Le._deselect;jt=Wr.xref,ie=Wr.yref,It(jt,ie,be)||re(Wt,jt,ie,yt),cn&&(Pr.points.length?Xt(Wt,Pr):Jt(Wt)),Le._deselect=!1}return{eventData:Pr,selectionTesters:xt}}function Vt(Wt){var Ft=Wt.calcdata;if(Ft)for(var xt=0;xt0?u+m:m;return{ppad:m,ppadplus:h?d:w,ppadminus:h?w:d}}else return{ppad:m}}function r(e,a,n,f,c){var l=e.type==="category"||e.type==="multicategory"?e.r2c:e.d2c;if(a!==void 0)return[l(a),l(n)];if(f){var m=1/0,h=-1/0,b=f.match(i.segmentRE),u,o,d,w,A;for(e.type==="date"&&(l=S.decodeDate(l)),u=0;uh&&(h=A)));if(h>=m)return[m,h]}}},85448:function(G){G.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},43712:function(G,U,t){var g=t(3400),C=t(54460),i=t(51272),S=t(46056),x=t(65152);G.exports=function(e,a){i(e,a,{name:"shapes",handleItemDefaults:p})};function v(r,e){return r?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}function p(r,e,a){function n(J,X){return g.coerce(r,e,S,J,X)}e._isShape=!0;var f=n("visible");if(f){var c=n("showlegend");c&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),g.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var l=n("path"),m=l?"path":"rect",h=n("type",m),b=h!=="path";b&&delete e.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var u=n("line.width");u&&(n("line.color"),n("line.dash"));for(var o=n("xsizemode"),d=n("ysizemode"),w=["x","y"],A=0;A<2;A++){var _=w[A],y=_+"anchor",E=_==="x"?o:d,T={_fullLayout:a},s,L,M,z=C.coerceRef(r,e,T,_,void 0,"paper"),D=C.getRefType(z);if(D==="range"?(s=C.getFromId(T,z),s._shapeIndices.push(e._index),M=x.rangeToShapePosition(s),L=x.shapePositionToRange(s)):L=M=g.identity,b){var N=.25,I=.75,k=_+"0",B=_+"1",O=r[k],H=r[B];r[k]=L(r[k],!0),r[B]=L(r[B],!0),E==="pixel"?(n(k,0),n(B,10)):(C.coercePosition(e,T,n,z,k,N),C.coercePosition(e,T,n,z,B,I)),e[k]=M(e[k]),e[B]=M(e[B]),r[k]=O,r[B]=H}if(E==="pixel"){var Y=r[y];r[y]=L(r[y],!0),C.coercePosition(e,T,n,z,y,.25),e[y]=M(e[y]),r[y]=Y}}b&&g.noneOrAll(r,e,["x0","x1","y0","y1"]);var j=h==="line",et,it;if(b&&(et=n("label.texttemplate")),et||(it=n("label.text")),it||et){n("label.textangle");var ut=n("label.textposition",j?"middle":"middle center");n("label.xanchor"),n("label.yanchor",v(j,ut)),n("label.padding"),g.coerceFont(n,"label.font",a.font)}}}},60728:function(G,U,t){var g=t(3400),C=t(54460),i=t(72736),S=t(43616),x=t(9856).readPaths,v=t(65152),p=v.getPathString,r=t(97728),e=t(84284).FROM_TL;G.exports=function(c,l,m,h){if(h.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var b;if(m.label.texttemplate){var u={};if(m.type!=="path"){var o=C.getFromId(c,m.xref),d=C.getFromId(c,m.yref);for(var w in r){var A=r[w](m,o,d);A!==void 0&&(u[w]=A)}}b=g.texttemplateStringForShapes(m.label.texttemplate,{},c._fullLayout._d3locale,u)}else b=m.label.text;var _={"data-index":l},y=m.label.font,E={"data-notex":1},T=h.append("g").attr(_).classed("shape-label",!0),s=T.append("text").attr(E).classed("shape-label-text",!0).text(b),L,M,z,D;if(m.path){var N=p(c,m),I=x(N,c);L=1/0,z=1/0,M=-1/0,D=-1/0;for(var k=0;k=f?h=c-m:h=m-c,-180/Math.PI*Math.atan2(h,b)}function n(f,c,l,m,h,b,u){var o=h.label.textposition,d=h.label.textangle,w=h.label.padding,A=h.type,_=Math.PI/180*b,y=Math.sin(_),E=Math.cos(_),T=h.label.xanchor,s=h.label.yanchor,L,M,z,D;if(A==="line"){o==="start"?(L=f,M=c):o==="end"?(L=l,M=m):(L=(f+l)/2,M=(c+m)/2),T==="auto"&&(o==="start"?d==="auto"?l>f?T="left":lf?T="right":lf?T="right":lf?T="left":l1&&!(mt.length===2&&mt[1][0]==="Z")&&(J===0&&(mt[0][0]="M"),L[ut]=mt,I(),k())}}function nt(mt,Lt){if(mt===2){ut=+Lt.srcElement.getAttribute("data-i"),J=+Lt.srcElement.getAttribute("data-j");var Ht=L[ut];!b(Ht)&&!u(Ht)&&st()}}function ct(mt){et=[];for(var Lt=0;LtI&&xt>k&&!Jt.shiftKey?f.getCursor(yt/Ft,1-Et/xt):"move";c(L,Mt),It=Mt.split("-")[0]}}function le(Jt){u(s)||(B&&(X=mt(M.xanchor)),O&&(tt=Lt(M.yanchor)),M.type==="path"?gt=M.path:(et=B?M.x0:mt(M.x0),it=O?M.y0:Lt(M.y0),ut=B?M.x1:mt(M.x1),J=O?M.y1:Lt(M.y1)),etJ?(V=it,Z="y0",Q=J,st="y1"):(V=J,Z="y1",Q=it,st="y0"),$t(Jt),ne(D,M),Xt(L,M,s),Vt.moveFn=It==="move"?xe:Se,Vt.altKey=Jt.altKey)}function he(){u(s)||(c(L),zt(D),w(L,s,M),C.call("_guiRelayout",s,N.getUpdateObj()))}function de(){u(s)||zt(D)}function xe(Jt,Wt){if(M.type==="path"){var Ft=function(Et){return Et},xt=Ft,yt=Ft;B?j("xanchor",M.xanchor=Ht(X+Jt)):(xt=function(Mt){return Ht(mt(Mt)+Jt)},wt&&wt.type==="date"&&(xt=m.encodeDate(xt))),O?j("yanchor",M.yanchor=Ut(tt+Wt)):(yt=function(Mt){return Ut(Lt(Mt)+Wt)},bt&&bt.type==="date"&&(yt=m.encodeDate(yt))),j("path",M.path=_(gt,xt,yt))}else B?j("xanchor",M.xanchor=Ht(X+Jt)):(j("x0",M.x0=Ht(et+Jt)),j("x1",M.x1=Ht(ut+Jt))),O?j("yanchor",M.yanchor=Ut(tt+Wt)):(j("y0",M.y0=Ut(it+Wt)),j("y1",M.y1=Ut(J+Wt)));L.attr("d",h(s,M)),ne(D,M),p(s,z,M,Tt)}function Se(Jt,Wt){if(Y){var Ft=function(pe){return pe},xt=Ft,yt=Ft;B?j("xanchor",M.xanchor=Ht(X+Jt)):(xt=function(Xe){return Ht(mt(Xe)+Jt)},wt&&wt.type==="date"&&(xt=m.encodeDate(xt))),O?j("yanchor",M.yanchor=Ut(tt+Wt)):(yt=function(Xe){return Ut(Lt(Xe)+Wt)},bt&&bt.type==="date"&&(yt=m.encodeDate(yt))),j("path",M.path=_(gt,xt,yt))}else if(H){if(It==="resize-over-start-point"){var Et=et+Jt,Mt=O?it-Wt:it+Wt;j("x0",M.x0=B?Et:Ht(Et)),j("y0",M.y0=O?Mt:Ut(Mt))}else if(It==="resize-over-end-point"){var Nt=ut+Jt,jt=O?J-Wt:J+Wt;j("x1",M.x1=B?Nt:Ht(Nt)),j("y1",M.y1=O?jt:Ut(jt))}}else{var ie=function(pe){return It.indexOf(pe)!==-1},me=ie("n"),be=ie("s"),ve=ie("w"),Le=ie("e"),ce=me?V+Wt:V,Te=be?Q+Wt:Q,Be=ve?ot+Jt:ot,ir=Le?$+Jt:$;O&&(me&&(ce=V-Wt),be&&(Te=Q-Wt)),(!O&&Te-ce>k||O&&ce-Te>k)&&(j(Z,M[Z]=O?ce:Ut(ce)),j(st,M[st]=O?Te:Ut(Te))),ir-Be>I&&(j(nt,M[nt]=B?Be:Ht(Be)),j(ct,M[ct]=B?ir:Ht(ir)))}L.attr("d",h(s,M)),ne(D,M),p(s,z,M,Tt)}function ne(Jt,Wt){(B||O)&&Ft();function Ft(){var xt=Wt.type!=="path",yt=Jt.selectAll(".visual-cue").data([0]),Et=1;yt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Et}).classed("visual-cue",!0);var Mt=mt(B?Wt.xanchor:i.midRange(xt?[Wt.x0,Wt.x1]:m.extractPathCoords(Wt.path,l.paramIsX))),Nt=Lt(O?Wt.yanchor:i.midRange(xt?[Wt.y0,Wt.y1]:m.extractPathCoords(Wt.path,l.paramIsY)));if(Mt=m.roundPositionForSharpStrokeRendering(Mt,Et),Nt=m.roundPositionForSharpStrokeRendering(Nt,Et),B&&O){var jt="M"+(Mt-1-Et)+","+(Nt-1-Et)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";yt.attr("d",jt)}else if(B){var ie="M"+(Mt-1-Et)+","+(Nt-9-Et)+"v18 h2 v-18 Z";yt.attr("d",ie)}else{var me="M"+(Mt-9-Et)+","+(Nt-1-Et)+"h18 v2 h-18 Z";yt.attr("d",me)}}}function zt(Jt){Jt.selectAll(".visual-cue").remove()}function Xt(Jt,Wt,Ft){var xt=Wt.xref,yt=Wt.yref,Et=S.getFromId(Ft,xt),Mt=S.getFromId(Ft,yt),Nt="";xt!=="paper"&&!Et.autorange&&(Nt+=xt),yt!=="paper"&&!Mt.autorange&&(Nt+=yt),a.setClipUrl(Jt,Nt?"clip"+Ft._fullLayout._uid+Nt:null,Ft)}}function _(s,L,M){return s.replace(l.segmentRE,function(z){var D=0,N=z.charAt(0),I=l.paramIsX[N],k=l.paramIsY[N],B=l.numParams[N],O=z.substr(1).replace(l.paramRE,function(H){return D>=B||(I[D]?H=L(H):k[D]&&(H=M(H)),D++),H});return N+O})}function y(s,L){if(o(s)){var M=L.node(),z=+M.getAttribute("data-index");if(z>=0){if(z===s._fullLayout._activeShapeIndex){E(s);return}s._fullLayout._activeShapeIndex=z,s._fullLayout._deactivateShape=E,b(s)}}}function E(s){if(o(s)){var L=s._fullLayout._activeShapeIndex;L>=0&&(r(s),delete s._fullLayout._activeShapeIndex,b(s))}}function T(s){if(o(s)){r(s);var L=s._fullLayout._activeShapeIndex,M=(s.layout||{}).shapes||[];if(L0&&du&&(d="X"),d});return l>u&&(o=o.replace(/[\s,]*X.*/,""),C.log("Ignoring extra params in segment "+c)),m+o})}},41592:function(G,U,t){var g=t(4016);G.exports={moduleType:"component",name:"shapes",layoutAttributes:t(46056),supplyLayoutDefaults:t(43712),supplyDrawNewShapeDefaults:t(65144),includeBasePlot:t(36632)("shapes"),calcAutorange:t(96084),draw:g.draw,drawOne:g.drawOne}},97728:function(G){function U(c,l){return l?l.d2l(c):c}function t(c,l){return l?l.l2d(c):c}function g(c){return c.x0}function C(c){return c.x1}function i(c){return c.y0}function S(c){return c.y1}function x(c,l){return U(c.x1,l)-U(c.x0,l)}function v(c,l,m){return U(c.y1,m)-U(c.y0,m)}function p(c,l){return Math.abs(x(c,l))}function r(c,l,m){return Math.abs(v(c,l,m))}function e(c,l,m){return c.type!=="line"?void 0:Math.sqrt(Math.pow(x(c,l),2)+Math.pow(v(c,l,m),2))}function a(c,l){return t((U(c.x1,l)+U(c.x0,l))/2,l)}function n(c,l,m){return t((U(c.y1,m)+U(c.y0,m))/2,m)}function f(c,l,m){return c.type!=="line"?void 0:v(c,l,m)/x(c,l)}G.exports={x0:g,x1:C,y0:i,y1:S,slope:f,dx:x,dy:v,width:p,height:r,length:e,xcenter:a,ycenter:n}},89861:function(G,U,t){var g=t(25376),C=t(66741),i=t(92880).extendDeepAll,S=t(67824).overrideAll,x=t(85656),v=t(31780).templatedArray,p=t(60876),r=v("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});G.exports=S(v("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:r,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(C({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:x.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:g({})},font:g({}),activebgcolor:{valType:"color",dflt:p.gripBgActiveColor},bgcolor:{valType:"color",dflt:p.railBgColor},bordercolor:{valType:"color",dflt:p.railBorderColor},borderwidth:{valType:"number",min:0,dflt:p.railBorderWidth},ticklen:{valType:"number",min:0,dflt:p.tickLength},tickcolor:{valType:"color",dflt:p.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:p.minorTickLength}}),"arraydraw","from-root")},60876:function(G){G.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(G,U,t){var g=t(3400),C=t(51272),i=t(89861),S=t(60876),x=S.name,v=i.steps;G.exports=function(a,n){C(a,n,{name:x,handleItemDefaults:p})};function p(e,a,n){function f(d,w){return g.coerce(e,a,i,d,w)}for(var c=C(e,a,{name:"steps",handleItemDefaults:r}),l=0,m=0;m0?[0]:[]);Y.enter().append("g").classed(e.containerClassName,!0).style("cursor",B?null:"ew-resize");function j(J){J._commandObserver&&(J._commandObserver.remove(),delete J._commandObserver),C.autoMargin(k,l(J))}if(Y.exit().each(function(){g.select(this).selectAll("g."+e.groupClassName).each(j)}).remove(),H.length!==0){var et=Y.selectAll("g."+e.groupClassName).data(H,h);et.enter().append("g").classed(e.groupClassName,!0),et.exit().each(j).remove();for(var it=0;it0&&(et=et.transition().duration(k.transition.duration).ease(k.transition.easing)),et.attr("transform",v(j-e.gripWidth*.5,k._dims.currentValueTotalHeight))}}function M(I,k){var B=I._dims;return B.inputAreaStart+e.stepInset+(B.inputAreaLength-2*e.stepInset)*Math.min(1,Math.max(0,k))}function z(I,k){var B=I._dims;return Math.min(1,Math.max(0,(k-e.stepInset-B.inputAreaStart)/(B.inputAreaLength-2*e.stepInset-2*B.inputAreaStart)))}function D(I,k,B){var O=B._dims,H=x.ensureSingle(I,"rect",e.railTouchRectClass,function(Y){Y.call(E,k,I,B).style("pointer-events","all")});H.attr({width:O.inputAreaLength,height:Math.max(O.inputAreaWidth,e.tickOffset+B.ticklen+O.labelHeight)}).call(i.fill,B.bgcolor).attr("opacity",0),S.setTranslate(H,0,O.currentValueTotalHeight)}function N(I,k){var B=k._dims,O=B.inputAreaLength-e.railInset*2,H=x.ensureSingle(I,"rect",e.railRectClass);H.attr({width:O,height:e.railWidth,rx:e.railRadius,ry:e.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,k.bordercolor).call(i.fill,k.bgcolor).style("stroke-width",k.borderwidth+"px"),S.setTranslate(H,e.railInset,(B.inputAreaWidth-e.railWidth)*.5+B.currentValueTotalHeight)}},97544:function(G,U,t){var g=t(60876);G.exports={moduleType:"component",name:g.name,layoutAttributes:t(89861),supplyLayoutDefaults:t(8132),draw:t(79664)}},81668:function(G,U,t){var g=t(33428),C=t(38248),i=t(7316),S=t(24040),x=t(3400),v=x.strTranslate,p=t(43616),r=t(76308),e=t(72736),a=t(13448),n=t(84284).OPPOSITE_SIDE,f=/ [XY][0-9]* /;function c(l,m,h){var b=h.propContainer,u=h.propName,o=h.placeholder,d=h.traceIndex,w=h.avoid||{},A=h.attributes,_=h.transform,y=h.containerGroup,E=l._fullLayout,T=1,s=!1,L=b.title,M=(L&&L.text?L.text:"").trim(),z=L&&L.font?L.font:{},D=z.family,N=z.size,I=z.color,k;u==="title.text"?k="titleText":u.indexOf("axis")!==-1?k="axisTitleText":u.indexOf("colorbar"!==-1)&&(k="colorbarTitleText");var B=l._context.edits[k];M===""?T=0:M.replace(f," % ")===o.replace(f," % ")&&(T=.2,s=!0,B||(M="")),h._meta?M=x.templateString(M,h._meta):E._meta&&(M=x.templateString(M,E._meta));var O=M||B,H;y||(y=x.ensureSingle(E._infolayer,"g","g-"+m),H=E._hColorbarMoveTitle);var Y=y.selectAll("text").data(O?[0]:[]);if(Y.enter().append("text"),Y.text(M).attr("class",m),Y.exit().remove(),!O)return y;function j(J){x.syncOrAsync([et,it],J)}function et(J){var X;return!_&&H&&(_={}),_?(X="",_.rotate&&(X+="rotate("+[_.rotate,A.x,A.y]+")"),(_.offset||H)&&(X+=v(0,(_.offset||0)-(H||0)))):X=null,J.attr("transform",X),J.style({"font-family":D,"font-size":g.round(N,2)+"px",fill:r.rgb(I),opacity:T*r.opacity(I),"font-weight":i.fontWeight}).attr(A).call(e.convertToTspans,l),i.previousPromises(l)}function it(J){var X=g.select(J.node().parentNode);if(w&&w.selection&&w.side&&M){X.attr("transform",null);var tt=n[w.side],V=w.side==="left"||w.side==="top"?-1:1,Q=C(w.pad)?w.pad:2,ot=p.bBox(X.node()),$={t:0,b:0,l:0,r:0},Z=l._fullLayout._reservedMargin;for(var st in Z)for(var nt in Z[st]){var ct=Z[st][nt];$[nt]=Math.max($[nt],ct)}var gt={left:$.l,top:$.t,right:E.width-$.r,bottom:E.height-$.b},Tt=w.maxShift||V*(gt[w.side]-ot[w.side]),wt=0;if(Tt<0)wt=Tt;else{var Rt=w.offsetLeft||0,bt=w.offsetTop||0;ot.left-=Rt,ot.right-=Rt,ot.top-=bt,ot.bottom-=bt,w.selection.each(function(){var mt=p.bBox(this);x.bBoxIntersect(ot,mt,Q)&&(wt=Math.max(wt,V*(mt[w.side]-ot[tt])+Q))}),wt=Math.min(Tt,wt),b._titleScoot=Math.abs(wt)}if(wt>0||Tt<0){var At={left:[-wt,0],right:[wt,0],top:[0,-wt],bottom:[0,wt]}[w.side];X.attr("transform",v(At[0],At[1]))}}}Y.call(j);function ut(){T=0,s=!0,Y.text(o).on("mouseover.opacity",function(){g.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){g.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}return B&&(M?Y.on(".opacity",null):ut(),Y.call(e.makeEditable,{gd:l}).on("edit",function(J){d!==void 0?S.call("_guiRestyle",l,u,J,d):S.call("_guiRelayout",l,u,J)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(j)}).on("input",function(J){this.text(J||" ").call(e.positionText,A.x,A.y)})),Y.classed("js-placeholder",s),y}G.exports={draw:c}},88444:function(G,U,t){var g=t(25376),C=t(22548),i=t(92880).extendFlat,S=t(67824).overrideAll,x=t(66741),v=t(31780).templatedArray,p=v("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});G.exports=S(v("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:p,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(x({editType:"arraydraw"}),{}),font:g({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:C.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(G){G.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},91384:function(G,U,t){var g=t(3400),C=t(51272),i=t(88444),S=t(73712),x=S.name,v=i.buttons;G.exports=function(a,n){var f={name:x,handleItemDefaults:p};C(a,n,f)};function p(e,a,n){function f(m,h){return g.coerce(e,a,i,m,h)}var c=C(e,a,{name:"buttons",handleItemDefaults:r}),l=f("visible",c.length>0);l&&(f("active"),f("direction"),f("type"),f("showactive"),f("x"),f("y"),g.noneOrAll(e,a,["x","y"]),f("xanchor"),f("yanchor"),f("pad.t"),f("pad.r"),f("pad.b"),f("pad.l"),g.coerceFont(f,"font",n.font),f("bgcolor",n.paper_bgcolor),f("bordercolor"),f("borderwidth"))}function r(e,a){function n(c,l){return g.coerce(e,a,v,c,l)}var f=n("visible",e.method==="skip"||Array.isArray(e.args));f&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}},14420:function(G,U,t){var g=t(33428),C=t(7316),i=t(76308),S=t(43616),x=t(3400),v=t(72736),p=t(31780).arrayEditor,r=t(84284).LINE_SPACING,e=t(73712),a=t(37400);G.exports=function(z){var D=z._fullLayout,N=x.filterVisible(D[e.name]);function I(it){C.autoMargin(z,T(it))}var k=D._menulayer.selectAll("g."+e.containerClassName).data(N.length>0?[0]:[]);if(k.enter().append("g").classed(e.containerClassName,!0).style("cursor","pointer"),k.exit().each(function(){g.select(this).selectAll("g."+e.headerGroupClassName).each(I)}).remove(),N.length!==0){var B=k.selectAll("g."+e.headerGroupClassName).data(N,n);B.enter().append("g").classed(e.headerGroupClassName,!0);for(var O=x.ensureSingle(k,"g",e.dropdownButtonGroupClassName,function(it){it.style("pointer-events","all")}),H=0;HA,z=x.barLength+2*x.barPad,D=x.barWidth+2*x.barPad,N=c,I=m+h;I+D>f&&(I=f-D);var k=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);k.exit().on(".drag",null).remove(),k.enter().append("rect").classed("scrollbar-horizontal",!0).call(C.fill,x.barColor),M?(this.hbar=k.attr({rx:x.barRadius,ry:x.barRadius,x:N,y:I,width:z,height:D}),this._hbarXMin=N+z/2,this._hbarTranslateMax=A-z):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var B=h>_,O=x.barWidth+2*x.barPad,H=x.barLength+2*x.barPad,Y=c+l,j=m;Y+O>n&&(Y=n-O);var et=this.container.selectAll("rect.scrollbar-vertical").data(B?[0]:[]);et.exit().on(".drag",null).remove(),et.enter().append("rect").classed("scrollbar-vertical",!0).call(C.fill,x.barColor),B?(this.vbar=et.attr({rx:x.barRadius,ry:x.barRadius,x:Y,y:j,width:O,height:H}),this._vbarYMin=j+H/2,this._vbarTranslateMax=_-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var it=this.id,ut=y-.5,J=B?E+O+.5:E+.5,X=T-.5,tt=M?s+D+.5:s+.5,V=a._topdefs.selectAll("#"+it).data(M||B?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",it).append("rect"),M||B?(this._clipRect=V.select("rect").attr({x:Math.floor(ut),y:Math.floor(X),width:Math.ceil(J)-Math.floor(ut),height:Math.ceil(tt)-Math.floor(X)}),this.container.call(i.setClipUrl,it,this.gd),this.bg.attr({x:c,y:m,width:l,height:h})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||B){var Q=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Q);var ot=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault(),g.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(ot),B&&this.vbar.on(".drag",null).call(ot)}this.setTranslate(r,e)},x.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},x.prototype._onBoxDrag=function(){var p=this.translateX,r=this.translateY;this.hbar&&(p-=g.event.dx),this.vbar&&(r-=g.event.dy),this.setTranslate(p,r)},x.prototype._onBoxWheel=function(){var p=this.translateX,r=this.translateY;this.hbar&&(p+=g.event.deltaY),this.vbar&&(r+=g.event.deltaY),this.setTranslate(p,r)},x.prototype._onBarDrag=function(){var p=this.translateX,r=this.translateY;if(this.hbar){var e=p+this._hbarXMin,a=e+this._hbarTranslateMax,n=S.constrain(g.event.x,e,a),f=(n-e)/(a-e),c=this.position.w-this._box.w;p=f*c}if(this.vbar){var l=r+this._vbarYMin,m=l+this._vbarTranslateMax,h=S.constrain(g.event.y,l,m),b=(h-l)/(m-l),u=this.position.h-this._box.h;r=b*u}this.setTranslate(p,r)},x.prototype.setTranslate=function(p,r){var e=this.position.w-this._box.w,a=this.position.h-this._box.h;if(p=S.constrain(p||0,0,e),r=S.constrain(r||0,0,a),this.translateX=p,this.translateY=r,this.container.call(i.setTranslate,this._box.l-this.position.l-p,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+p-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var n=p/e;this.hbar.call(i.setTranslate,p+n*this._hbarTranslateMax,r)}if(this.vbar){var f=r/a;this.vbar.call(i.setTranslate,p,r+f*this._vbarTranslateMax)}}},84284:function(G){G.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},36208:function(G){G.exports={axisRefDescription:function(U,t,g){return["If set to a",U,"axis id (e.g. *"+U+"* or","*"+U+"2*), the `"+U+"` position refers to a",U,"coordinate. If set to *paper*, the `"+U+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+g+"). If set to a",U,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+U+"2 domain* refers to the domain of the second",U," axis and a",U,"position of 0.5 refers to the","point between the",t,"and the",g,"of the domain of the","second",U,"axis."].join(" ")}}},48164:function(G){G.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},26880:function(G){G.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},69104:function(G){G.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(G){G.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87792:function(G){G.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},13448:function(G){G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(G){G.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},2264:function(G,U){U.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],U.STYLE=U.CSS_DECLARATIONS.map(function(t){return t.join(": ")+"; "}).join("")},9616:function(G,U){U.xmlns="http://www.w3.org/2000/xmlns/",U.svg="http://www.w3.org/2000/svg",U.xlink="http://www.w3.org/1999/xlink",U.svgAttrs={xmlns:U.svg,"xmlns:xlink":U.xlink}},64884:function(G,U,t){U.version=t(25788).version,t(88324),t(79288);for(var g=t(24040),C=U.register=g.register,i=t(22448),S=Object.keys(i),x=0;x",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},98308:function(G,U){U.isLeftAnchor=function(g){return g.xanchor==="left"||g.xanchor==="auto"&&g.x<=.3333333333333333},U.isCenterAnchor=function(g){return g.xanchor==="center"||g.xanchor==="auto"&&g.x>.3333333333333333&&g.x<.6666666666666666},U.isRightAnchor=function(g){return g.xanchor==="right"||g.xanchor==="auto"&&g.x>=.6666666666666666},U.isTopAnchor=function(g){return g.yanchor==="top"||g.yanchor==="auto"&&g.y>=.6666666666666666},U.isMiddleAnchor=function(g){return g.yanchor==="middle"||g.yanchor==="auto"&&g.y>.3333333333333333&&g.y<.6666666666666666},U.isBottomAnchor=function(g){return g.yanchor==="bottom"||g.yanchor==="auto"&&g.y<=.3333333333333333}},11864:function(G,U,t){var g=t(20435),C=g.mod,i=g.modHalf,S=Math.PI,x=2*S;function v(b){return b/180*S}function p(b){return b/S*180}function r(b){return Math.abs(b[1]-b[0])>x-1e-14}function e(b,u){return i(u-b,x)}function a(b,u){return Math.abs(e(b,u))}function n(b,u){if(r(u))return!0;var o,d;u[0]d&&(d+=x);var w=C(b,x),A=w+x;return w>=o&&w<=d||A>=o&&A<=d}function f(b,u,o,d){if(!n(u,d))return!1;var w,A;return o[0]=w&&b<=A}function c(b,u,o,d,w,A,_){w=w||0,A=A||0;var y=r([o,d]),E,T,s,L,M;y?(E=0,T=S,s=x):o"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};e.uint8c=e.u1c,e.uint8=e.u1,e.int8=e.i1,e.uint16=e.u2,e.int16=e.i2,e.uint32=e.u4,e.int32=e.i4,e.float32=e.f4,e.float64=e.f8;function a(c){return c.constructor===ArrayBuffer}U.isArrayBuffer=a,U.decodeTypedArraySpec=function(c){var l=[],m=n(c),h=m.dtype,b=e[h];if(!b)throw new Error('Error in dtype: "'+h+'"');var u=b.BYTES_PER_ELEMENT,o=m.bdata;a(o)||(o=g(o));var d=m.shape===void 0?[o.byteLength/u]:(""+m.shape).split(",");d.reverse();var w=d.length,A,_,y=+d[0],E=u*y,T=0;if(w===1)l=new b(o);else if(w===2)for(A=+d[1],_=0;_b.max?m.set(h):m.set(+l)}},integer:{coerceFunction:function(l,m,h,b){l%1||!g(l)||b.min!==void 0&&lb.max?m.set(h):m.set(+l)}},string:{coerceFunction:function(l,m,h,b){if(typeof l!="string"){var u=typeof l=="number";b.strict===!0||!u?m.set(h):m.set(String(l))}else b.noBlank&&!l?m.set(h):m.set(l)}},color:{coerceFunction:function(l,m,h){C(l).isValid()?m.set(l):m.set(h)}},colorlist:{coerceFunction:function(l,m,h){function b(u){return C(u).isValid()}!Array.isArray(l)||!l.length?m.set(h):l.every(b)?m.set(l):m.set(h)}},colorscale:{coerceFunction:function(l,m,h){m.set(S.get(l,h))}},angle:{coerceFunction:function(l,m,h){l==="auto"?m.set("auto"):g(l)?m.set(e(+l,360)):m.set(h)}},subplotid:{coerceFunction:function(l,m,h,b){var u=b.regex||r(h);if(typeof l=="string"&&u.test(l)){m.set(l);return}m.set(h)},validateFunction:function(l,m){var h=m.dflt;return l===h?!0:typeof l!="string"?!1:!!r(h).test(l)}},flaglist:{coerceFunction:function(l,m,h,b){if((b.extras||[]).indexOf(l)!==-1){m.set(l);return}if(typeof l!="string"){m.set(h);return}for(var u=l.split("+"),o=0;o=o&&I<=d?I:v}if(typeof I!="string"&&typeof I!="number")return v;I=String(I);var Y=b(k),j=I.charAt(0);Y&&(j==="G"||j==="g")&&(I=I.substr(1),k="");var et=Y&&k.substr(0,7)==="chinese",it=I.match(et?m:l);if(!it)return v;var ut=it[1],J=it[3]||"1",X=Number(it[5]||1),tt=Number(it[7]||0),V=Number(it[9]||0),Q=Number(it[11]||0);if(Y){if(ut.length===2)return v;ut=Number(ut);var ot;try{var $=f.getComponentMethod("calendars","getCal")(k);if(et){var Z=J.charAt(J.length-1)==="i";J=parseInt(J,10),ot=$.newDate(ut,$.toMonthIndex(ut,J,Z),X)}else ot=$.newDate(ut,Number(J),X)}catch{return v}return ot?(ot.toJD()-n)*p+tt*r+V*e+Q*a:v}ut.length===2?ut=(Number(ut)+2e3-h)%100+h:ut=Number(ut),J-=1;var st=new Date(Date.UTC(2e3,J,X,tt,V));return st.setUTCFullYear(ut),st.getUTCMonth()!==J||st.getUTCDate()!==X?v:st.getTime()+Q*a},o=U.MIN_MS=U.dateTime2ms("-9999"),d=U.MAX_MS=U.dateTime2ms("9999-12-31 23:59:59.9999"),U.isDateTime=function(I,k){return U.dateTime2ms(I,k)!==v};function w(I,k){return String(I+Math.pow(10,k)).substr(1)}var A=90*p,_=3*r,y=5*e;U.ms2DateTime=function(I,k,B){if(typeof I!="number"||!(I>=o&&I<=d))return v;k||(k=0);var O=Math.floor(S(I+.05,1)*10),H=Math.round(I-O/10),Y,j,et,it,ut,J;if(b(B)){var X=Math.floor(H/p)+n,tt=Math.floor(S(I,p));try{Y=f.getComponentMethod("calendars","getCal")(B).fromJD(X).formatDate("yyyy-mm-dd")}catch{Y=c("G%Y-%m-%d")(new Date(H))}if(Y.charAt(0)==="-")for(;Y.length<11;)Y="-0"+Y.substr(1);else for(;Y.length<10;)Y="0"+Y;j=k=o+p&&I<=d-p))return v;var k=Math.floor(S(I+.05,1)*10),B=new Date(Math.round(I-k/10)),O=g("%Y-%m-%d")(B),H=B.getHours(),Y=B.getMinutes(),j=B.getSeconds(),et=B.getUTCMilliseconds()*10+k;return E(O,H,Y,j,et)};function E(I,k,B,O,H){if((k||B||O||H)&&(I+=" "+w(k,2)+":"+w(B,2),(O||H)&&(I+=":"+w(O,2),H))){for(var Y=4;H%10===0;)Y-=1,H/=10;I+="."+w(H,Y)}return I}U.cleanDate=function(I,k,B){if(I===v)return k;if(U.isJSDate(I)||typeof I=="number"&&isFinite(I)){if(b(B))return i.error("JS Dates and milliseconds are incompatible with world calendars",I),k;if(I=U.ms2DateTimeLocal(+I),!I&&k!==void 0)return k}else if(!U.isDateTime(I,B))return i.error("unrecognized date",I),k;return I};var T=/%\d?f/g,s=/%h/g,L={1:"1",2:"1",3:"2",4:"2"};function M(I,k,B,O){I=I.replace(T,function(Y){var j=Math.min(+Y.charAt(1)||6,6),et=(k/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return et});var H=new Date(Math.floor(k+.05));if(I=I.replace(s,function(){return L[B("%q")(H)]}),b(O))try{I=f.getComponentMethod("calendars","worldCalFmt")(I,k,O)}catch{return"Invalid"}return B(I)(H)}var z=[59,59.9,59.99,59.999,59.9999];function D(I,k){var B=S(I+.05,p),O=w(Math.floor(B/r),2)+":"+w(S(Math.floor(B/e),60),2);if(k!=="M"){C(k)||(k=0);var H=Math.min(S(I/a,60),z[k]),Y=(100+H).toFixed(k).substr(1);k>0&&(Y=Y.replace(/0+$/,"").replace(/[\.]$/,"")),O+=":"+Y}return O}U.formatDate=function(I,k,B,O,H,Y){if(H=b(H)&&H,!k)if(B==="y")k=Y.year;else if(B==="m")k=Y.month;else if(B==="d")k=Y.dayMonth+` + value:`,G)}addColor(F,q,lt=1){return new yS(this,F,q,lt)}addFolder(F){const q=new vv({parent:this,title:F});return this.root._closeFolders&&q.close(),q}load(F,q=!0){return F.controllers&&this.controllers.forEach(lt=>{lt instanceof P0||lt._name in F.controllers&<.load(F.controllers[lt._name])}),q&&F.folders&&this.folders.forEach(lt=>{lt._title in F.folders&<.load(F.folders[lt._title])}),this}save(F=!0){const q={controllers:{},folders:{}};return this.controllers.forEach(lt=>{if(!(lt instanceof P0)){if(lt._name in q.controllers)throw new Error(`Cannot save GUI with duplicate property "${lt._name}"`);q.controllers[lt._name]=lt.save()}}),F&&this.folders.forEach(lt=>{if(lt._title in q.folders)throw new Error(`Cannot save GUI with duplicate folder "${lt._title}"`);q.folders[lt._title]=lt.save()}),q}open(F=!0){return this._setClosed(!F),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(F){this._closed!==F&&(this._closed=F,this._callOnOpenClose(this))}show(F=!0){return this._hidden=!F,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(F=!0){return this._setClosed(!F),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const q=this.$children.clientHeight;this.$children.style.height=q+"px",this.domElement.classList.add("transition");const lt=Zt=>{Zt.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",lt))};this.$children.addEventListener("transitionend",lt);const Dt=F?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!F),requestAnimationFrame(()=>{this.$children.style.height=Dt+"px"})}),this}title(F){return this._title=F,this.$title.textContent=F,this}reset(F=!0){return(F?this.controllersRecursive():this.controllers).forEach(lt=>lt.reset()),this}onChange(F){return this._onChange=F,this}_callOnChange(F){this.parent&&this.parent._callOnChange(F),this._onChange!==void 0&&this._onChange.call(this,{object:F.object,property:F.property,value:F.getValue(),controller:F})}onFinishChange(F){return this._onFinishChange=F,this}_callOnFinishChange(F){this.parent&&this.parent._callOnFinishChange(F),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:F.object,property:F.property,value:F.getValue(),controller:F})}onOpenClose(F){return this._onOpenClose=F,this}_callOnOpenClose(F){this.parent&&this.parent._callOnOpenClose(F),this._onOpenClose!==void 0&&this._onOpenClose.call(this,F)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(F=>F.destroy())}controllersRecursive(){let F=Array.from(this.controllers);return this.folders.forEach(q=>{F=F.concat(q.controllersRecursive())}),F}foldersRecursive(){let F=Array.from(this.folders);return this.folders.forEach(q=>{F=F.concat(q.foldersRecursive())}),F}}var S1={exports:{}};(function(_t,F){(function(lt,Dt){_t.exports=Dt()})(self,function(){return function(){var q={79288:function(G,U,t){var g=t(3400),C={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in C){var S=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");g.addStyleRule(S,C[i])}},86712:function(G,U,t){G.exports=t(84224)},37240:function(G,U,t){G.exports=t(51132)},29744:function(G,U,t){G.exports=t(94456)},29352:function(G,U,t){G.exports=t(67244)},96144:function(G,U,t){G.exports=t(97776)},53219:function(G,U,t){G.exports=t(61712)},4624:function(G,U,t){G.exports=t(95856)},54543:function(G,U,t){G.exports=t(54272)},45e3:function(G,U,t){G.exports=t(85404)},62300:function(G,U,t){G.exports=t(26048)},6920:function(G,U,t){G.exports=t(66240)},10264:function(G,U,t){G.exports=t(40448)},32016:function(G,U,t){G.exports=t(64884)},27528:function(G,U,t){G.exports=t(15088)},75556:function(G,U,t){G.exports=t(76744)},39204:function(G,U,t){G.exports=t(94704)},73996:function(G,U,t){G.exports=t(62396)},16489:function(G,U,t){G.exports=t(32028)},5e3:function(G,U,t){G.exports=t(81932)},77280:function(G,U,t){G.exports=t(45536)},33992:function(G,U,t){G.exports=t(42600)},17600:function(G,U,t){G.exports=t(21536)},49116:function(G,U,t){G.exports=t(65664)},46808:function(G,U,t){G.exports=t(29044)},36168:function(G,U,t){G.exports=t(48928)},13792:function(G,U,t){var g=t(32016);g.register([t(37240),t(29352),t(5e3),t(33992),t(17600),t(49116),t(6920),t(67484),t(79440),t(39204),t(83096),t(36168),t(20260),t(63560),t(65832),t(46808),t(73996),t(48824),t(89904),t(25120),t(13752),t(4340),t(62300),t(29800),t(8363),t(54543),t(86636),t(42192),t(32140),t(77280),t(89296),t(56816),t(70192),t(45e3),t(27528),t(84764),t(3920),t(50248),t(4624),t(69967),t(10264),t(86152),t(53219),t(81604),t(63796),t(29744),t(89336),t(86712),t(75556),t(16489),t(97312),t(96144)]),G.exports=g},3920:function(G,U,t){G.exports=t(43480)},25120:function(G,U,t){G.exports=t(6296)},4340:function(G,U,t){G.exports=t(7404)},86152:function(G,U,t){G.exports=t(65456)},56816:function(G,U,t){G.exports=t(22020)},89296:function(G,U,t){G.exports=t(29928)},20260:function(G,U,t){G.exports=t(75792)},32140:function(G,U,t){G.exports=t(156)},84764:function(G,U,t){G.exports=t(45499)},48824:function(G,U,t){G.exports=t(3296)},69967:function(G,U,t){G.exports=t(4184)},8363:function(G,U,t){G.exports=t(36952)},86636:function(G,U,t){G.exports=t(38983)},70192:function(G,U,t){G.exports=t(11572)},81604:function(G,U,t){G.exports=t(76924)},63796:function(G,U,t){G.exports=t(62944)},89336:function(G,U,t){G.exports=t(95443)},67484:function(G,U,t){G.exports=t(34864)},97312:function(G,U,t){G.exports=t(76272)},42192:function(G,U,t){G.exports=t(97924)},29800:function(G,U,t){G.exports=t(15436)},63560:function(G,U,t){G.exports=t(5621)},89904:function(G,U,t){G.exports=t(91304)},50248:function(G,U,t){G.exports=t(41724)},65832:function(G,U,t){G.exports=t(31991)},79440:function(G,U,t){G.exports=t(22869)},13752:function(G,U,t){G.exports=t(67776)},83096:function(G,U,t){G.exports=t(95952)},72196:function(G){G.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},13916:function(G,U,t){var g=t(72196),C=t(25376),i=t(33816),S=t(31780).templatedArray;t(36208),G.exports=S("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:C({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:g.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:g.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:C({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},90272:function(G,U,t){var g=t(3400),C=t(54460),i=t(23816).draw;G.exports=function(p){var r=p._fullLayout,e=g.filterVisible(r.annotations);if(e.length&&p._fullData.length)return g.syncOrAsync([i,S],p)};function S(h){var p=h._fullLayout;g.filterVisible(p.annotations).forEach(function(r){var e=C.getFromId(h,r.xref),a=C.getFromId(h,r.yref),n=C.getRefType(r.xref),f=C.getRefType(r.yref);r._extremes={},n==="range"&&x(r,e),f==="range"&&x(r,a)})}function x(h,p){var r=p._id,e=r.charAt(0),a=h[e],n=h["a"+e],f=h[e+"ref"],c=h["a"+e+"ref"],l=h["_"+e+"padplus"],m=h["_"+e+"padminus"],v={x:1,y:-1}[e]*h[e+"shift"],b=3*h.arrowsize*h.arrowwidth||0,u=b+v,o=b-v,d=3*h.startarrowsize*h.arrowwidth||0,w=d+v,A=d-v,_;if(c===f){var y=C.findExtremes(p,[p.r2c(a)],{ppadplus:u,ppadminus:o}),E=C.findExtremes(p,[p.r2c(n)],{ppadplus:Math.max(l,w),ppadminus:Math.max(m,A)});_={min:[y.min[0],E.min[0]],max:[y.max[0],E.max[0]]}}else w=n?w+n:w,A=n?A-n:A,_=C.findExtremes(p,[p.r2c(a)],{ppadplus:Math.max(l,u,w),ppadminus:Math.max(m,o,A)});h._extremes[r]=_}},42300:function(G,U,t){var g=t(3400),C=t(24040),i=t(31780).arrayEditor;G.exports={hasClickToShow:S,onClick:x};function S(r,e){var a=h(r,e);return a.on.length>0||a.explicitOff.length>0}function x(r,e){var a=h(r,e),n=a.on,f=a.off.concat(a.explicitOff),c={},l=r._fullLayout.annotations,m,v;if(n.length||f.length){for(m=0;m.6666666666666666?$e="right":$e="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[$e]}for(var It=!1,re=["x","y"],Kt=0;Kt1)&&(he===le?(jt=de.r2fraction(d["a"+$t]),(jt<0||jt>1)&&(It=!0)):It=!0),Ft=de._offset+de.r2p(d[$t]),Et=.5}else{var ie=Nt==="domain";$t==="x"?(yt=d[$t],Ft=ie?de._offset+de._length*yt:Ft=T.l+T.w*yt):(yt=1-d[$t],Ft=ie?de._offset+de._length*yt:Ft=T.t+T.h*yt),Et=d.showarrow?.5:yt}if(d.showarrow){Wt.head=Ft;var me=d["a"+$t];if(Mt=Se*Vt(.5,d.xanchor)-ne*Vt(.5,d.yanchor),he===le){var be=h.getRefType(he);be==="domain"?($t==="y"&&(me=1-me),Wt.tail=de._offset+de._length*me):be==="paper"?$t==="y"?(me=1-me,Wt.tail=T.t+T.h*me):Wt.tail=T.l+T.w*me:Wt.tail=de._offset+de.r2p(me),xt=Mt}else Wt.tail=Ft+me,xt=Mt+me;Wt.text=Wt.tail+Mt;var ve=E[$t==="x"?"width":"height"];if(le==="paper"&&(Wt.head=S.constrain(Wt.head,1,ve-1)),he==="pixel"){var Le=-Math.max(Wt.tail-3,Wt.text),ce=Math.min(Wt.tail+3,Wt.text)-ve;Le>0?(Wt.tail+=Le,Wt.text+=Le):ce>0&&(Wt.tail-=ce,Wt.text-=ce)}Wt.tail+=Jt,Wt.head+=Jt}else Mt=zt*Vt(Et,Xt),xt=Mt,Wt.text=Ft+Mt;Wt.text+=Jt,Mt+=Jt,xt+=Jt,d["_"+$t+"padplus"]=zt/2+xt,d["_"+$t+"padminus"]=zt/2-xt,d["_"+$t+"size"]=zt,d["_"+$t+"shift"]=Mt}if(It){ut.remove();return}var Te=0,Be=0;if(d.align!=="left"&&(Te=(Lt-At)*(d.align==="center"?.5:1)),d.valign!=="top"&&(Be=(Ht-mt)*(d.valign==="middle"?.5:1)),Rt)wt.select("svg").attr({x:tt+Te-1,y:tt+Be}).call(r.setClipUrl,Q?k:null,o);else{var ir=tt+Be-bt.top,pe=tt+Te-bt.left;st.call(a.positionText,pe,ir).call(r.setClipUrl,Q?k:null,o)}ot.select("rect").call(r.setRect,tt,tt,Lt,Ht),V.call(r.setRect,J/2,J/2,Ut-J,kt-J),ut.call(r.setTranslate,Math.round(B.x.text-Ut/2),Math.round(B.y.text-kt/2)),Y.attr({transform:"rotate("+O+","+B.x.text+","+B.y.text+")"});var Xe=function(or,$e){H.selectAll(".annotation-arrow-g").remove();var ge=B.x.head,se=B.y.head,Ae=B.x.tail+or,Ce=B.y.tail+$e,Ie=B.x.text+or,Pe=B.y.text+$e,ke=S.rotationXYMatrix(O,Ie,Pe),Ve=S.apply2DTransform(ke),Je=S.apply2DTransform2(ke),ur=+V.attr("width"),hr=+V.attr("height"),vr=Ie-.5*ur,Yt=vr+ur,Gt=Pe-.5*hr,Ne=Gt+hr,Oe=[[vr,Gt,vr,Ne],[vr,Ne,Yt,Ne],[Yt,Ne,Yt,Gt],[Yt,Gt,vr,Gt]].map(Je);if(!Oe.reduce(function(Dr,cn){return Dr^!!S.segmentsIntersect(ge,se,ge+1e6,se+1e6,cn[0],cn[1],cn[2],cn[3])},!1)){Oe.forEach(function(Dr){var cn=S.segmentsIntersect(Ae,Ce,ge,se,Dr[0],Dr[1],Dr[2],Dr[3]);cn&&(Ae=cn.x,Ce=cn.y)});var Qe=d.arrowwidth,er=d.arrowcolor,fr=d.arrowside,rr=H.append("g").style({opacity:p.opacity(er)}).classed("annotation-arrow-g",!0),He=rr.append("path").attr("d","M"+Ae+","+Ce+"L"+ge+","+se).style("stroke-width",Qe+"px").call(p.stroke,p.rgb(er));if(l(He,fr,d),s.annotationPosition&&He.node().parentNode&&!A){var dr=ge,mr=se;if(d.standoff){var xr=Math.sqrt(Math.pow(ge-Ae,2)+Math.pow(se-Ce,2));dr+=d.standoff*(Ae-ge)/xr,mr+=d.standoff*(Ce-se)/xr}var pr=rr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Ae-dr)+","+(Ce-mr),transform:x(dr,mr)}).style("stroke-width",Qe+6+"px").call(p.stroke,"rgba(0,0,0,0)").call(p.fill,"rgba(0,0,0,0)"),Gr,Pr;f.init({element:pr.node(),gd:o,prepFn:function(){var Dr=r.getTranslate(ut);Gr=Dr.x,Pr=Dr.y,_&&_.autorange&&D(_._name+".autorange",!0),y&&y.autorange&&D(y._name+".autorange",!0)},moveFn:function(Dr,cn){var rn=Ve(Gr,Pr),Cn=rn[0]+Dr,En=rn[1]+cn;ut.call(r.setTranslate,Cn,En),N("x",b(_,Dr,"x",T,d)),N("y",b(y,cn,"y",T,d)),d.axref===d.xref&&N("ax",b(_,Dr,"ax",T,d)),d.ayref===d.yref&&N("ay",b(y,cn,"ay",T,d)),rr.attr("transform",x(Dr,cn)),Y.attr({transform:"rotate("+O+","+Cn+","+En+")"})},doneFn:function(){C.call("_guiRelayout",o,I());var Dr=document.querySelector(".js-notes-box-panel");Dr&&Dr.redraw(Dr.selectedObj)}})}}};if(d.showarrow&&Xe(0,0),j){var Ke;f.init({element:ut.node(),gd:o,prepFn:function(){Ke=Y.attr("transform")},moveFn:function(or,$e){var ge="pointer";if(d.showarrow)d.axref===d.xref?N("ax",b(_,or,"ax",T,d)):N("ax",d.ax+or),d.ayref===d.yref?N("ay",b(y,$e,"ay",T.w,d)):N("ay",d.ay+$e),Xe(or,$e);else{if(A)return;var se,Ae;if(_)se=b(_,or,"x",T,d);else{var Ce=d._xsize/T.w,Ie=d.x+(d._xshift-d.xshift)/T.w-Ce/2;se=f.align(Ie+or/T.w,Ce,0,1,d.xanchor)}if(y)Ae=b(y,$e,"y",T,d);else{var Pe=d._ysize/T.h,ke=d.y-(d._yshift+d.yshift)/T.h-Pe/2;Ae=f.align(ke-$e/T.h,Pe,0,1,d.yanchor)}N("x",se),N("y",Ae),(!_||!y)&&(ge=f.getCursor(_?.5:se,y?.5:Ae,d.xanchor,d.yanchor))}Y.attr({transform:x(or,$e)+Ke}),n(ut,ge)},clickFn:function(or,$e){d.captureevents&&o.emit("plotly_clickannotation",it($e))},doneFn:function(){n(ut),C.call("_guiRelayout",o,I());var or=document.querySelector(".js-notes-box-panel");or&&or.redraw(or.selectedObj)}})}}s.annotationText?st.call(a.makeEditable,{delegate:ut,gd:o}).call(nt).on("edit",function(gt){d.text=gt,this.call(nt),N("text",gt),_&&_.autorange&&D(_._name+".autorange",!0),y&&y.autorange&&D(y._name+".autorange",!0),C.call("_guiRelayout",o,I())}):st.call(nt)}},33652:function(G,U,t){var g=t(33428),C=t(76308),i=t(72196),S=t(3400),x=S.strScale,h=S.strRotate,p=S.strTranslate;G.exports=function(e,a,n){var f=e.node(),c=i[n.arrowhead||0],l=i[n.startarrowhead||0],m=(n.arrowwidth||1)*(n.arrowsize||1),v=(n.arrowwidth||1)*(n.startarrowsize||1),b=a.indexOf("start")>=0,u=a.indexOf("end")>=0,o=c.backoff*m+n.standoff,d=l.backoff*v+n.startstandoff,w,A,_,y;if(f.nodeName==="line"){w={x:+e.attr("x1"),y:+e.attr("y1")},A={x:+e.attr("x2"),y:+e.attr("y2")};var E=w.x-A.x,T=w.y-A.y;if(_=Math.atan2(T,E),y=_+Math.PI,o&&d&&o+d>Math.sqrt(E*E+T*T)){Y();return}if(o){if(o*o>E*E+T*T){Y();return}var s=o*Math.cos(_),L=o*Math.sin(_);A.x+=s,A.y+=L,e.attr({x2:A.x,y2:A.y})}if(d){if(d*d>E*E+T*T){Y();return}var M=d*Math.cos(_),z=d*Math.sin(_);w.x-=M,w.y-=z,e.attr({x1:w.x,y1:w.y})}}else if(f.nodeName==="path"){var D=f.getTotalLength(),N="";if(D1){n=!0;break}}n?x.fullLayout._infolayer.select(".annotation-"+x.id+'[data-index="'+e+'"]').remove():(a._pdata=C(x.glplot.cameraParams,[h.xaxis.r2l(a.x)*p[0],h.yaxis.r2l(a.y)*p[1],h.zaxis.r2l(a.z)*p[2]]),g(x.graphDiv,a,e,x.id,a._xa,a._ya))}}},56864:function(G,U,t){var g=t(24040),C=t(3400);G.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:t(45899)}}},layoutAttributes:t(45899),handleDefaults:t(52808),includeBasePlot:i,convert:t(42456),draw:t(71836)};function i(S,x){var h=g.subplotsRegistry.gl3d;if(h)for(var p=h.attrRegex,r=Object.keys(S),e=0;e=0)))return e;if(l===3)f[l]>1&&(f[l]=1);else if(f[l]>=1)return e}var m=Math.round(f[0]*255)+", "+Math.round(f[1]*255)+", "+Math.round(f[2]*255);return c?"rgba("+m+", "+f[3]+")":"rgb("+m+")"}},42996:function(G,U,t){var g=t(94724),C=t(25376),i=t(92880).extendFlat,S=t(67824).overrideAll;G.exports=S({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:g.linecolor,outlinewidth:g.linewidth,bordercolor:g.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:i({},g.ticks,{dflt:""}),ticklabeloverflow:i({},g.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:C({}),tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,separatethousands:g.separatethousands,exponentformat:g.exponentformat,minexponent:g.minexponent,showexponent:g.showexponent,title:{text:{valType:"string"},font:C({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:C({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},63964:function(G){G.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},64013:function(G,U,t){var g=t(3400),C=t(31780),i=t(26332),S=t(25404),x=t(95936),h=t(42568),p=t(42996);G.exports=function(e,a,n){var f=C.newContainer(a,"colorbar"),c=e.colorbar||{};function l(B,O){return g.coerce(c,f,p,B,O)}var m=n.margin||{t:0,b:0,l:0,r:0},v=n.width-m.l-m.r,b=n.height-m.t-m.b,u=l("orientation"),o=u==="v",d=l("thicknessmode");l("thickness",d==="fraction"?30/(o?v:b):30);var w=l("lenmode");l("len",w==="fraction"?1:o?b:v);var A=l("yref"),_=l("xref"),y=A==="paper",E=_==="paper",T,s,L,M="left";o?(L="middle",M=E?"left":"right",T=E?1.02:1,s=.5):(L=y?"bottom":"top",M="center",T=.5,s=y?1.02:1),g.coerce(c,f,{x:{valType:"number",min:E?-2:0,max:E?3:1,dflt:T}},"x"),g.coerce(c,f,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:s}},"y"),l("xanchor",M),l("xpad"),l("yanchor",L),l("ypad"),g.noneOrAll(c,f,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var z=g.coerce(c,f,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:o?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",z.indexOf("inside")!==-1?"hide past domain":"hide past div"),i(c,f,l,"linear");var D=n.font,N={noAutotickangles:!0,outerTicks:!1,font:D};z.indexOf("inside")!==-1&&(N.bgColor="black"),h(c,f,l,"linear",N),x(c,f,l,"linear",N),S(c,f,l,"linear",N),l("title.text",n._dfltTitle.colorbar);var I=f.showticklabels?f.tickfont:D,k=g.extendFlat({},I,{color:D.color,size:g.bigFont(I.size)});g.coerceFont(l,"title.font",k),l("title.side",o?"top":"right")}},37848:function(G,U,t){var g=t(33428),C=t(49760),i=t(7316),S=t(24040),x=t(54460),h=t(86476),p=t(3400),r=p.strTranslate,e=t(92880).extendFlat,a=t(93972),n=t(43616),f=t(76308),c=t(81668),l=t(72736),m=t(94288).flipScale,v=t(28336),b=t(37668),u=t(94724),o=t(84284),d=o.LINE_SPACING,w=o.FROM_TL,A=o.FROM_BR,_=t(63964).cn;function y(z){var D=z._fullLayout,N=D._infolayer.selectAll("g."+_.colorbar).data(E(z),function(I){return I._id});N.enter().append("g").attr("class",function(I){return I._id}).classed(_.colorbar,!0),N.each(function(I){var k=g.select(this);p.ensureSingle(k,"rect",_.cbbg),p.ensureSingle(k,"g",_.cbfills),p.ensureSingle(k,"g",_.cblines),p.ensureSingle(k,"g",_.cbaxis,function(O){O.classed(_.crisp,!0)}),p.ensureSingle(k,"g",_.cbtitleunshift,function(O){O.append("g").classed(_.cbtitle,!0)}),p.ensureSingle(k,"rect",_.cboutline);var B=T(k,I,z);B&&B.then&&(z._promises||[]).push(B),z._context.edits.colorbarPosition&&s(k,I,z)}),N.exit().each(function(I){i.autoMargin(z,I._id)}).remove(),N.order()}function E(z){var D=z._fullLayout,N=z.calcdata,I=[],k,B,O,H;function Y($){return e($,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function j(){typeof H.calc=="function"?H.calc(z,O,k):(k._fillgradient=B.reversescale?m(B.colorscale):B.colorscale,k._zrange=[B[H.min],B[H.max]])}for(var et=0;et1){var Wt=Math.pow(10,Math.floor(Math.log(Jt)/Math.LN10));zt*=Wt*p.roundUp(Jt/Wt,[2,5,10]),(Math.abs(bt.start)/bt.size+1e-6)%1<2e-6&&(Se.tick0=0)}Se.dtick=zt}Se.domain=I?[de+X/Z.h,de+Vt-X/Z.h]:[de+J/Z.w,de+Vt-J/Z.w],Se.setScale(),z.attr("transform",r(Math.round(Z.l),Math.round(Z.t)));var Ft=z.select("."+_.cbtitleunshift).attr("transform",r(-Math.round(Z.l),-Math.round(Z.t))),xt=Se.ticklabelposition,yt=Se.title.font.size,Et=z.select("."+_.cbaxis),Mt,Nt=0,jt=0;function ie(ce,Te){var Be={propContainer:Se,propName:D._propPrefix+"title",traceIndex:D._traceIndex,_meta:D._meta,placeholder:$._dfltTitle.colorbar,containerGroup:z.select("."+_.cbtitle)},ir=ce.charAt(0)==="h"?ce.substr(1):"h"+ce;z.selectAll("."+ir+",."+ir+"-math-group").remove(),c.draw(N,ce,e(Be,Te||{}))}function me(){if(I&&ne||!I&&!ne){var ce,Te;gt==="top"&&(ce=J+Z.l+It*tt,Te=X+Z.t+re*(1-de-Vt)+3+yt*.75),gt==="bottom"&&(ce=J+Z.l+It*tt,Te=X+Z.t+re*(1-de)-3-yt*.25),gt==="right"&&(Te=X+Z.t+re*V+3+yt*.75,ce=J+Z.l+It*de),ie(Se._id+"title",{attributes:{x:ce,y:Te,"text-anchor":I?"start":"middle"}})}}function be(){if(I&&!ne||!I&&ne){var ce=Se.position||0,Te=Se._offset+Se._length/2,Be,ir;if(gt==="right")ir=Te,Be=Z.l+It*ce+10+yt*(Se.showticklabels?1:.5);else if(Be=Te,gt==="bottom"&&(ir=Z.t+re*ce+10+(xt.indexOf("inside")===-1?Se.tickfont.size:0)+(Se.ticks!=="intside"&&D.ticklen||0)),gt==="top"){var pe=ct.text.split("
    ").length;ir=Z.t+re*ce+10-Ht-d*yt*pe}ie((I?"h":"v")+Se._id+"title",{avoid:{selection:g.select(N).selectAll("g."+Se._id+"tick"),side:gt,offsetTop:I?0:Z.t,offsetLeft:I?Z.l:0,maxShift:I?$.width:$.height},attributes:{x:Be,y:ir,"text-anchor":"middle"},transform:{rotate:I?-90:0,offset:0}})}}function ve(){if(!I&&!ne||I&&ne){var ce=z.select("."+_.cbtitle),Te=ce.select("text"),Be=[-Y/2,Y/2],ir=ce.select(".h"+Se._id+"title-math-group").node(),pe=15.6;Te.node()&&(pe=parseInt(Te.node().style.fontSize,10)*d);var Xe;if(ir?(Xe=n.bBox(ir),jt=Xe.width,Nt=Xe.height,Nt>pe&&(Be[1]-=(Nt-pe)/2)):Te.node()&&!Te.classed(_.jsPlaceholder)&&(Xe=n.bBox(Te.node()),jt=Xe.width,Nt=Xe.height),I){if(Nt){if(Nt+=5,gt==="top")Se.domain[1]-=Nt/Z.h,Be[1]*=-1;else{Se.domain[0]+=Nt/Z.h;var Ke=l.lineCount(Te);Be[1]+=(1-Ke)*pe}ce.attr("transform",r(Be[0],Be[1])),Se.setScale()}}else jt&&(gt==="right"&&(Se.domain[0]+=(jt+yt/2)/Z.w),ce.attr("transform",r(Be[0],Be[1])),Se.setScale())}z.selectAll("."+_.cbfills+",."+_.cblines).attr("transform",I?r(0,Math.round(Z.h*(1-Se.domain[1]))):r(Math.round(Z.w*Se.domain[0]),0)),Et.attr("transform",I?r(0,Math.round(-Z.t)):r(Math.round(-Z.l),0));var or=z.select("."+_.cbfills).selectAll("rect."+_.cbfill).attr("style","").data(mt);or.enter().append("rect").classed(_.cbfill,!0).attr("style",""),or.exit().remove();var $e=Tt.map(Se.c2p).map(Math.round).sort(function(Ie,Pe){return Ie-Pe});or.each(function(Ie,Pe){var ke=[Pe===0?Tt[0]:(mt[Pe]+mt[Pe-1])/2,Pe===mt.length-1?Tt[1]:(mt[Pe]+mt[Pe+1])/2].map(Se.c2p).map(Math.round);I&&(ke[1]=p.constrain(ke[1]+(ke[1]>ke[0])?1:-1,$e[0],$e[1]));var Ve=g.select(this).attr(I?"x":"y",Kt).attr(I?"y":"x",g.min(ke)).attr(I?"width":"height",Math.max(Ht,2)).attr(I?"height":"width",Math.max(g.max(ke)-g.min(ke),2));if(D._fillgradient)n.gradient(Ve,N,D._id,I?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var Je=Rt(Ie).replace("e-","");Ve.attr("fill",C(Je).toHexString())}});var ge=z.select("."+_.cblines).selectAll("path."+_.cbline).data(nt.color&&nt.width?Lt:[]);ge.enter().append("path").classed(_.cbline,!0),ge.exit().remove(),ge.each(function(Ie){var Pe=Kt,ke=Math.round(Se.c2p(Ie))+nt.width/2%1;g.select(this).attr("d","M"+(I?Pe+","+ke:ke+","+Pe)+(I?"h":"v")+Ht).call(n.lineGroupStyle,nt.width,wt(Ie),nt.dash)}),Et.selectAll("g."+Se._id+"tick,path").remove();var se=Kt+Ht+(Y||0)/2-(D.ticks==="outside"?1:0),Ae=x.calcTicks(Se),Ce=x.getTickSigns(Se)[2];return x.drawTicks(N,Se,{vals:Se.ticks==="inside"?x.clipEnds(Se,Ae):Ae,layer:Et,path:x.makeTickPath(Se,se,Ce),transFn:x.makeTransTickFn(Se)}),x.drawLabels(N,Se,{vals:Ae,layer:Et,transFn:x.makeTransTickLabelFn(Se),labelFns:x.makeLabelFns(Se,se)})}function Le(){var ce,Te=Ht+Y/2;xt.indexOf("inside")===-1&&(ce=n.bBox(Et.node()),Te+=I?ce.width:ce.height),Mt=Ft.select("text");var Be=0,ir=I&>==="top",pe=!I&>==="right",Xe=0;if(Mt.node()&&!Mt.classed(_.jsPlaceholder)){var Ke,or=Ft.select(".h"+Se._id+"title-math-group").node();or&&(I&&ne||!I&&!ne)?(ce=n.bBox(or),Be=ce.width,Ke=ce.height):(ce=n.bBox(Ft.node()),Be=ce.right-Z.l-(I?Kt:xe),Ke=ce.bottom-Z.t-(I?xe:Kt),!I&>==="top"&&(Te+=ce.height,Xe=ce.height)),pe&&(Mt.attr("transform",r(Be/2+yt/2,0)),Be*=2),Te=Math.max(Te,I?Be:Ke)}var $e=(I?J:X)*2+Te+j+Y/2,ge=0;!I&&ct.text&&ut==="bottom"&&V<=0&&(ge=$e/2,$e+=ge,Xe+=ge),$._hColorbarMoveTitle=ge,$._hColorbarMoveCBTitle=Xe;var se=j+Y,Ae=(I?Kt:xe)-se/2-(I?J:0),Ce=(I?xe:Kt)-(I?kt:X+Xe-ge);z.select("."+_.cbbg).attr("x",Ae).attr("y",Ce).attr(I?"width":"height",Math.max($e-ge,2)).attr(I?"height":"width",Math.max(kt+se,2)).call(f.fill,et).call(f.stroke,D.bordercolor).style("stroke-width",j);var Ie=pe?Math.max(Be-10,0):0;z.selectAll("."+_.cboutline).attr("x",(I?Kt:xe+J)+Ie).attr("y",(I?xe+X-kt:Kt)+(ir?Nt:0)).attr(I?"width":"height",Math.max(Ht,2)).attr(I?"height":"width",Math.max(kt-(I?2*X+Nt:2*J+Ie),2)).call(f.stroke,D.outlinecolor).style({fill:"none","stroke-width":Y});var Pe=I?$t*$e:0,ke=I?0:(1-le)*$e-Xe;if(Pe=ot?Z.l-Pe:-Pe,ke=Q?Z.t-ke:-ke,z.attr("transform",r(Pe,ke)),!I&&(j||C(et).getAlpha()&&!C.equals($.paper_bgcolor,et))){var Ve=Et.selectAll("text"),Je=Ve[0].length,ur=z.select("."+_.cbbg).node(),hr=n.bBox(ur),vr=n.getTranslate(z),Yt=2;Ve.each(function(mr,xr){var pr=0,Gr=Je-1;if(xr===pr||xr===Gr){var Pr=n.bBox(this),Dr=n.getTranslate(this),cn;if(xr===Gr){var rn=Pr.right+Dr.x,Cn=hr.right+vr.x+xe-j-Yt+tt;cn=Cn-rn,cn>0&&(cn=0)}else if(xr===pr){var En=Pr.left+Dr.x,Tr=hr.left+vr.x+xe+j+Yt;cn=Tr-En,cn<0&&(cn=0)}cn&&(Je<3?this.setAttribute("transform","translate("+cn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Gt={},Ne=w[it],Oe=A[it],Qe=w[ut],er=A[ut],fr=$e-Ht;I?(B==="pixels"?(Gt.y=V,Gt.t=kt*Qe,Gt.b=kt*er):(Gt.t=Gt.b=0,Gt.yt=V+k*Qe,Gt.yb=V-k*er),H==="pixels"?(Gt.x=tt,Gt.l=$e*Ne,Gt.r=$e*Oe):(Gt.l=fr*Ne,Gt.r=fr*Oe,Gt.xl=tt-O*Ne,Gt.xr=tt+O*Oe)):(B==="pixels"?(Gt.x=tt,Gt.l=kt*Ne,Gt.r=kt*Oe):(Gt.l=Gt.r=0,Gt.xl=tt+k*Ne,Gt.xr=tt-k*Oe),H==="pixels"?(Gt.y=1-V,Gt.t=$e*Qe,Gt.b=$e*er):(Gt.t=fr*Qe,Gt.b=fr*er,Gt.yt=V-O*Qe,Gt.yb=V+O*er));var rr=D.y<.5?"b":"t",He=D.x<.5?"l":"r";N._fullLayout._reservedMargin[D._id]={};var dr={r:$.width-Ae-Pe,l:Ae+Gt.r,b:$.height-Ce-ke,t:Ce+Gt.b};ot&&Q?i.autoMargin(N,D._id,Gt):ot?N._fullLayout._reservedMargin[D._id][rr]=dr[rr]:Q||I?N._fullLayout._reservedMargin[D._id][He]=dr[He]:N._fullLayout._reservedMargin[D._id][rr]=dr[rr]}return p.syncOrAsync([i.previousPromises,me,ve,be,i.previousPromises,Le],N)}function s(z,D,N){var I=D.orientation==="v",k=N._fullLayout,B=k._size,O,H,Y;h.init({element:z.node(),gd:N,prepFn:function(){O=z.attr("transform"),a(z)},moveFn:function(j,et){z.attr("transform",O+r(j,et)),H=h.align((I?D._uFrac:D._vFrac)+j/B.w,I?D._thickFrac:D._lenFrac,0,1,D.xanchor),Y=h.align((I?D._vFrac:1-D._uFrac)-et/B.h,I?D._lenFrac:D._thickFrac,0,1,D.yanchor);var it=h.getCursor(H,Y,D.xanchor,D.yanchor);a(z,it)},doneFn:function(){if(a(z),H!==void 0&&Y!==void 0){var j={};j[D._propPrefix+"x"]=H,j[D._propPrefix+"y"]=Y,D._traceIndex!==void 0?S.call("_guiRestyle",N,j,D._traceIndex):S.call("_guiRelayout",N,j)}}})}function L(z,D,N){var I=D._levels,k=[],B=[],O,H,Y=I.end+I.size/100,j=I.size,et=1.001*N[0]-.001*N[1],it=1.001*N[1]-.001*N[0];for(H=0;H<1e5&&(O=I.start+H*j,!(j>0?O>=Y:O<=Y));H++)O>et&&O0?O>=Y:O<=Y));H++)O>N[0]&&Ov-l?l=v-(m-v):m-v=0?o=r.colorscale.sequential:o=r.colorscale.sequentialminus,f._sync("colorscale",o)}}},95504:function(G,U,t){var g=t(3400),C=t(94288).hasColorscale,i=t(94288).extractOpts;G.exports=function(x,h){function p(l,m){var v=l["_"+m];v!==void 0&&(l[m]=v)}function r(l,m){var v=m.container?g.nestedProperty(l,m.container).get():l;if(v)if(v.coloraxis)v._colorAx=h[v.coloraxis];else{var b=i(v),u=b.auto;(u||b.min===void 0)&&p(v,m.min),(u||b.max===void 0)&&p(v,m.max),b.autocolorscale&&p(v,"colorscale")}}for(var e=0;e=0;o--,d++){var w=v[o];u[d]=[1-w[0],w[1]]}return u}function c(v,b){b=b||{};for(var u=v.domain,o=v.range,d=o.length,w=new Array(d),A=0;A1.3333333333333333-p?h:p}},67416:function(G,U,t){var g=t(3400),C=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];G.exports=function(S,x,h,p){return h==="left"?S=0:h==="center"?S=1:h==="right"?S=2:S=g.constrain(Math.floor(S*3),0,2),p==="bottom"?x=0:p==="middle"?x=1:p==="top"?x=2:x=g.constrain(Math.floor(x*3),0,2),C[x][S]}},72760:function(G,U){U.selectMode=function(t){return t==="lasso"||t==="select"},U.drawMode=function(t){return t==="drawclosedpath"||t==="drawopenpath"||t==="drawline"||t==="drawrect"||t==="drawcircle"},U.openMode=function(t){return t==="drawline"||t==="drawopenpath"},U.rectMode=function(t){return t==="select"||t==="drawline"||t==="drawrect"||t==="drawcircle"},U.freeMode=function(t){return t==="lasso"||t==="drawclosedpath"||t==="drawopenpath"},U.selectingOrDrawing=function(t){return U.freeMode(t)||U.rectMode(t)}},86476:function(G,U,t){var g=t(29128),C=t(52264),i=t(89184),S=t(3400).removeElement,x=t(33816),h=G.exports={};h.align=t(78316),h.getCursor=t(67416);var p=t(2616);h.unhover=p.wrapped,h.unhoverRaw=p.raw,h.init=function(n){var f=n.gd,c=1,l=f._context.doubleClickDelay,m=n.element,v,b,u,o,d,w,A,_;f._mouseDownTime||(f._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=T,i?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=T,m.addEventListener("touchstart",T,{passive:!1})):m.ontouchstart=T;function y(M,z,D){return Math.abs(M)"u"&&typeof M.clientY>"u"&&(M.clientX=v,M.clientY=b),u=new Date().getTime(),u-f._mouseDownTimel&&(c=Math.max(c-1,1)),f._dragged)n.doneFn&&n.doneFn();else if(n.clickFn&&n.clickFn(c,w),!_){var z;try{z=new MouseEvent("click",M)}catch{var D=e(M);z=document.createEvent("MouseEvents"),z.initMouseEvent("click",M.bubbles,M.cancelable,M.view,M.detail,M.screenX,M.screenY,D[0],D[1],M.ctrlKey,M.altKey,M.shiftKey,M.metaKey,M.button,M.relatedTarget)}A.dispatchEvent(z)}f._dragging=!1,f._dragged=!1}};function r(){var a=document.createElement("div");a.className="dragcover";var n=a.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(a),a}h.coverSlip=r;function e(a){return g(a.changedTouches?a.changedTouches[0]:a,document.body)}},2616:function(G,U,t){var g=t(95924),C=t(91200),i=t(52200).getGraphDiv,S=t(92456),x=G.exports={};x.wrapped=function(h,p,r){h=i(h),h._fullLayout&&C.clear(h._fullLayout._uid+S.HOVERID),x.raw(h,p,r)},x.raw=function(p,r){var e=p._fullLayout,a=p._hoverdata;r||(r={}),!(r.target&&!p._dragged&&g.triggerHandler(p,"plotly_beforehover",r)===!1)&&(e._hoverlayer.selectAll("g").remove(),e._hoverlayer.selectAll("line").remove(),e._hoverlayer.selectAll("circle").remove(),p._hoverdata=void 0,r.target&&a&&p.emit("plotly_unhover",{event:r,points:a}))}},98192:function(G,U){U.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},U.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},43616:function(G,U,t){var g=t(33428),C=t(3400),i=C.numberFormat,S=t(38248),x=t(49760),h=t(24040),p=t(76308),r=t(8932),e=C.strTranslate,a=t(72736),n=t(9616),f=t(84284),c=f.LINE_SPACING,l=t(13448).DESELECTDIM,m=t(43028),v=t(7152),b=t(10624).appendArrayPointValue,u=G.exports={};u.font=function(bt,At,mt,Lt){C.isPlainObject(At)&&(Lt=At.color,mt=At.size,At=At.family),At&&bt.style("font-family",At),mt+1&&bt.style("font-size",mt+"px"),Lt&&bt.call(p.fill,Lt)},u.setPosition=function(bt,At,mt){bt.attr("x",At).attr("y",mt)},u.setSize=function(bt,At,mt){bt.attr("width",At).attr("height",mt)},u.setRect=function(bt,At,mt,Lt,Ht){bt.call(u.setPosition,At,mt).call(u.setSize,Lt,Ht)},u.translatePoint=function(bt,At,mt,Lt){var Ht=mt.c2p(bt.x),Ut=Lt.c2p(bt.y);if(S(Ht)&&S(Ut)&&At.node())At.node().nodeName==="text"?At.attr("x",Ht).attr("y",Ut):At.attr("transform",e(Ht,Ut));else return!1;return!0},u.translatePoints=function(bt,At,mt){bt.each(function(Lt){var Ht=g.select(this);u.translatePoint(Lt,Ht,At,mt)})},u.hideOutsideRangePoint=function(bt,At,mt,Lt,Ht,Ut){At.attr("display",mt.isPtWithinRange(bt,Ht)&&Lt.isPtWithinRange(bt,Ut)?null:"none")},u.hideOutsideRangePoints=function(bt,At){if(At._hasClipOnAxisFalse){var mt=At.xaxis,Lt=At.yaxis;bt.each(function(Ht){var Ut=Ht[0].trace,kt=Ut.xcalendar,Vt=Ut.ycalendar,It=h.traceIs(Ut,"bar-like")?".bartext":".point,.textpoint";bt.selectAll(It).each(function(re){u.hideOutsideRangePoint(re,g.select(this),mt,Lt,kt,Vt)})})}},u.crispRound=function(bt,At,mt){return!At||!S(At)?mt||0:bt._context.staticPlot?At:At<1?1:Math.round(At)},u.singleLineStyle=function(bt,At,mt,Lt,Ht){At.style("fill","none");var Ut=(((bt||[])[0]||{}).trace||{}).line||{},kt=mt||Ut.width||0,Vt=Ht||Ut.dash||"";p.stroke(At,Lt||Ut.color),u.dashLine(At,Vt,kt)},u.lineGroupStyle=function(bt,At,mt,Lt){bt.style("fill","none").each(function(Ht){var Ut=(((Ht||[])[0]||{}).trace||{}).line||{},kt=At||Ut.width||0,Vt=Lt||Ut.dash||"";g.select(this).call(p.stroke,mt||Ut.color).call(u.dashLine,Vt,kt)})},u.dashLine=function(bt,At,mt){mt=+mt||0,At=u.dashStyle(At,mt),bt.style({"stroke-dasharray":At,"stroke-width":mt+"px"})},u.dashStyle=function(bt,At){At=+At||1;var mt=Math.max(At,3);return bt==="solid"?bt="":bt==="dot"?bt=mt+"px,"+mt+"px":bt==="dash"?bt=3*mt+"px,"+3*mt+"px":bt==="longdash"?bt=5*mt+"px,"+5*mt+"px":bt==="dashdot"?bt=3*mt+"px,"+mt+"px,"+mt+"px,"+mt+"px":bt==="longdashdot"&&(bt=5*mt+"px,"+2*mt+"px,"+mt+"px,"+2*mt+"px"),bt};function o(bt,At,mt,Lt){var Ht=At.fillpattern,Ut=At.fillgradient,kt=Ht&&u.getPatternAttr(Ht.shape,0,"");if(kt){var Vt=u.getPatternAttr(Ht.bgcolor,0,null),It=u.getPatternAttr(Ht.fgcolor,0,null),re=Ht.fgopacity,Kt=u.getPatternAttr(Ht.size,0,8),$t=u.getPatternAttr(Ht.solidity,0,.3),le=At.uid;u.pattern(bt,"point",mt,le,kt,Kt,$t,void 0,Ht.fillmode,Vt,It,re)}else if(Ut&&Ut.type!=="none"){var he=Ut.type,de="scatterfill-"+At.uid;if(Lt&&(de="legendfill-"+At.uid),!Lt&&(Ut.start!==void 0||Ut.stop!==void 0)){var xe,Se;he==="horizontal"?(xe={x:Ut.start,y:0},Se={x:Ut.stop,y:0}):he==="vertical"&&(xe={x:0,y:Ut.start},Se={x:0,y:Ut.stop}),xe.x=At._xA.c2p(xe.x===void 0?At._extremes.x.min[0].val:xe.x,!0),xe.y=At._yA.c2p(xe.y===void 0?At._extremes.y.min[0].val:xe.y,!0),Se.x=At._xA.c2p(Se.x===void 0?At._extremes.x.max[0].val:Se.x,!0),Se.y=At._yA.c2p(Se.y===void 0?At._extremes.y.max[0].val:Se.y,!0),bt.call(T,mt,de,"linear",Ut.colorscale,"fill",xe,Se,!0,!1)}else he==="horizontal"&&(he=he+"reversed"),bt.call(u.gradient,mt,de,he,Ut.colorscale,"fill")}else At.fillcolor&&bt.call(p.fill,At.fillcolor)}u.singleFillStyle=function(bt,At){var mt=g.select(bt.node()),Lt=mt.data(),Ht=((Lt[0]||[])[0]||{}).trace||{};o(bt,Ht,At,!1)},u.fillGroupStyle=function(bt,At,mt){bt.style("stroke-width",0).each(function(Lt){var Ht=g.select(this);Lt[0].trace&&o(Ht,Lt[0].trace,At,mt)})};var d=t(71984);u.symbolNames=[],u.symbolFuncs=[],u.symbolBackOffs=[],u.symbolNeedLines={},u.symbolNoDot={},u.symbolNoFill={},u.symbolList=[],Object.keys(d).forEach(function(bt){var At=d[bt],mt=At.n;u.symbolList.push(mt,String(mt),bt,mt+100,String(mt+100),bt+"-open"),u.symbolNames[mt]=bt,u.symbolFuncs[mt]=At.f,u.symbolBackOffs[mt]=At.backoff||0,At.needLine&&(u.symbolNeedLines[mt]=!0),At.noDot?u.symbolNoDot[mt]=!0:u.symbolList.push(mt+200,String(mt+200),bt+"-dot",mt+300,String(mt+300),bt+"-open-dot"),At.noFill&&(u.symbolNoFill[mt]=!0)});var w=u.symbolNames.length,A="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";u.symbolNumber=function(bt){if(S(bt))bt=+bt;else if(typeof bt=="string"){var At=0;bt.indexOf("-open")>0&&(At=100,bt=bt.replace("-open","")),bt.indexOf("-dot")>0&&(At+=200,bt=bt.replace("-dot","")),bt=u.symbolNames.indexOf(bt),bt>=0&&(bt+=At)}return bt%100>=w||bt>=400?0:Math.floor(Math.max(bt,0))};function _(bt,At,mt,Lt){var Ht=bt%100;return u.symbolFuncs[Ht](At,mt,Lt)+(bt>=200?A:"")}var y=i("~f"),E={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};u.gradient=function(bt,At,mt,Lt,Ht,Ut){var kt=E[Lt];return T(bt,At,mt,kt.type,Ht,Ut,kt.start,kt.stop,!1,kt.reversed)};function T(bt,At,mt,Lt,Ht,Ut,kt,Vt,It,re){var Kt=Ht.length,$t;Lt==="linear"?$t={node:"linearGradient",attrs:{x1:kt.x,y1:kt.y,x2:Vt.x,y2:Vt.y,gradientUnits:It?"userSpaceOnUse":"objectBoundingBox"},reversed:re}:Lt==="radial"&&($t={node:"radialGradient",reversed:re});for(var le=new Array(Kt),he=0;he=0&&bt.i===void 0&&(bt.i=Ut.i),At.style("opacity",Lt.selectedOpacityFn?Lt.selectedOpacityFn(bt):bt.mo===void 0?kt.opacity:bt.mo),Lt.ms2mrc){var It;bt.ms==="various"||kt.size==="various"?It=3:It=Lt.ms2mrc(bt.ms),bt.mrc=It,Lt.selectedSizeFn&&(It=bt.mrc=Lt.selectedSizeFn(bt));var re=u.symbolNumber(bt.mx||kt.symbol)||0;bt.om=re%200>=100;var Kt=Rt(bt,mt),$t=V(bt,mt);At.attr("d",_(re,It,Kt,$t))}var le=!1,he,de,xe;if(bt.so)xe=Vt.outlierwidth,de=Vt.outliercolor,he=kt.outliercolor;else{var Se=(Vt||{}).width;xe=(bt.mlw+1||Se+1||(bt.trace?(bt.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in bt?de=bt.mlcc=Lt.lineScale(bt.mlc):C.isArrayOrTypedArray(Vt.color)?de=p.defaultLine:de=Vt.color,C.isArrayOrTypedArray(kt.color)&&(he=p.defaultLine,le=!0),"mc"in bt?he=bt.mcc=Lt.markerScale(bt.mc):he=kt.color||kt.colors||"rgba(0,0,0,0)",Lt.selectedColorFn&&(he=Lt.selectedColorFn(bt))}if(bt.om)At.call(p.stroke,he).style({"stroke-width":(xe||1)+"px",fill:"none"});else{At.style("stroke-width",(bt.isBlank?0:xe)+"px");var ne=kt.gradient,zt=bt.mgt;zt?le=!0:zt=ne&&ne.type,C.isArrayOrTypedArray(zt)&&(zt=zt[0],E[zt]||(zt=0));var Xt=kt.pattern,Jt=Xt&&u.getPatternAttr(Xt.shape,bt.i,"");if(zt&&zt!=="none"){var Wt=bt.mgc;Wt?le=!0:Wt=ne.color;var Ft=mt.uid;le&&(Ft+="-"+bt.i),u.gradient(At,Ht,Ft,zt,[[0,Wt],[1,he]],"fill")}else if(Jt){var xt=!1,yt=Xt.fgcolor;!yt&&Ut&&Ut.color&&(yt=Ut.color,xt=!0);var Et=u.getPatternAttr(yt,bt.i,Ut&&Ut.color||null),Mt=u.getPatternAttr(Xt.bgcolor,bt.i,null),Nt=Xt.fgopacity,jt=u.getPatternAttr(Xt.size,bt.i,8),ie=u.getPatternAttr(Xt.solidity,bt.i,.3);xt=xt||bt.mcc||C.isArrayOrTypedArray(Xt.shape)||C.isArrayOrTypedArray(Xt.bgcolor)||C.isArrayOrTypedArray(Xt.fgcolor)||C.isArrayOrTypedArray(Xt.size)||C.isArrayOrTypedArray(Xt.solidity);var me=mt.uid;xt&&(me+="-"+bt.i),u.pattern(At,"point",Ht,me,Jt,jt,ie,bt.mcc,Xt.fillmode,Mt,Et,Nt)}else C.isArrayOrTypedArray(he)?p.fill(At,he[bt.i]):p.fill(At,he);xe&&p.stroke(At,de)}},u.makePointStyleFns=function(bt){var At={},mt=bt.marker;return At.markerScale=u.tryColorscale(mt,""),At.lineScale=u.tryColorscale(mt,"line"),h.traceIs(bt,"symbols")&&(At.ms2mrc=m.isBubble(bt)?v(bt):function(){return(mt.size||6)/2}),bt.selectedpoints&&C.extendFlat(At,u.makeSelectedPointStyleFns(bt)),At},u.makeSelectedPointStyleFns=function(bt){var At={},mt=bt.selected||{},Lt=bt.unselected||{},Ht=bt.marker||{},Ut=mt.marker||{},kt=Lt.marker||{},Vt=Ht.opacity,It=Ut.opacity,re=kt.opacity,Kt=It!==void 0,$t=re!==void 0;(C.isArrayOrTypedArray(Vt)||Kt||$t)&&(At.selectedOpacityFn=function(Jt){var Wt=Jt.mo===void 0?Ht.opacity:Jt.mo;return Jt.selected?Kt?It:Wt:$t?re:l*Wt});var le=Ht.color,he=Ut.color,de=kt.color;(he||de)&&(At.selectedColorFn=function(Jt){var Wt=Jt.mcc||le;return Jt.selected?he||Wt:de||Wt});var xe=Ht.size,Se=Ut.size,ne=kt.size,zt=Se!==void 0,Xt=ne!==void 0;return h.traceIs(bt,"symbols")&&(zt||Xt)&&(At.selectedSizeFn=function(Jt){var Wt=Jt.mrc||xe/2;return Jt.selected?zt?Se/2:Wt:Xt?ne/2:Wt}),At},u.makeSelectedTextStyleFns=function(bt){var At={},mt=bt.selected||{},Lt=bt.unselected||{},Ht=bt.textfont||{},Ut=mt.textfont||{},kt=Lt.textfont||{},Vt=Ht.color,It=Ut.color,re=kt.color;return At.selectedTextColorFn=function(Kt){var $t=Kt.tc||Vt;return Kt.selected?It||$t:re||(It?$t:p.addOpacity($t,l))},At},u.selectedPointStyle=function(bt,At){if(!(!bt.size()||!At.selectedpoints)){var mt=u.makeSelectedPointStyleFns(At),Lt=At.marker||{},Ht=[];mt.selectedOpacityFn&&Ht.push(function(Ut,kt){Ut.style("opacity",mt.selectedOpacityFn(kt))}),mt.selectedColorFn&&Ht.push(function(Ut,kt){p.fill(Ut,mt.selectedColorFn(kt))}),mt.selectedSizeFn&&Ht.push(function(Ut,kt){var Vt=kt.mx||Lt.symbol||0,It=mt.selectedSizeFn(kt);Ut.attr("d",_(u.symbolNumber(Vt),It,Rt(kt,At),V(kt,At))),kt.mrc2=It}),Ht.length&&bt.each(function(Ut){for(var kt=g.select(this),Vt=0;Vt0?mt:0}u.textPointStyle=function(bt,At,mt){if(bt.size()){var Lt;if(At.selectedpoints){var Ht=u.makeSelectedTextStyleFns(At);Lt=Ht.selectedTextColorFn}var Ut=At.texttemplate,kt=mt._fullLayout;bt.each(function(Vt){var It=g.select(this),re=Ut?C.extractOption(Vt,At,"txt","texttemplate"):C.extractOption(Vt,At,"tx","text");if(!re&&re!==0){It.remove();return}if(Ut){var Kt=At._module.formatLabels,$t=Kt?Kt(Vt,At,kt):{},le={};b(le,At,Vt.i);var he=At._meta||{};re=C.texttemplateString(re,$t,kt._d3locale,le,Vt,he)}var de=Vt.tp||At.textposition,xe=M(Vt,At),Se=Lt?Lt(Vt):Vt.tc||At.textfont.color;It.call(u.font,Vt.tf||At.textfont.family,xe,Se).text(re).call(a.convertToTspans,mt).call(L,de,xe,Vt.mrc)})}},u.selectedTextStyle=function(bt,At){if(!(!bt.size()||!At.selectedpoints)){var mt=u.makeSelectedTextStyleFns(At);bt.each(function(Lt){var Ht=g.select(this),Ut=mt.selectedTextColorFn(Lt),kt=Lt.tp||At.textposition,Vt=M(Lt,At);p.fill(Ht,Ut);var It=h.traceIs(At,"bar-like");L(Ht,kt,Vt,Lt.mrc2||Lt.mrc,It)})}};var z=.5;u.smoothopen=function(bt,At){if(bt.length<3)return"M"+bt.join("L");var mt="M"+bt[0],Lt=[],Ht;for(Ht=1;Ht=It||Jt>=Kt&&Jt<=It)&&(Wt<=$t&&Wt>=re||Wt>=$t&&Wt<=re)&&(bt=[Jt,Wt])}return bt}u.applyBackoff=j,u.makeTester=function(){var bt=C.ensureSingleById(g.select("body"),"svg","js-plotly-tester",function(mt){mt.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),At=C.ensureSingle(bt,"path","js-reference-point",function(mt){mt.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});u.tester=bt,u.testref=At},u.savedBBoxes={};var et=0,it=1e4;u.bBox=function(bt,At,mt){mt||(mt=ut(bt));var Lt;if(mt){if(Lt=u.savedBBoxes[mt],Lt)return C.extendFlat({},Lt)}else if(bt.childNodes.length===1){var Ht=bt.childNodes[0];if(mt=ut(Ht),mt){var Ut=+Ht.getAttribute("x")||0,kt=+Ht.getAttribute("y")||0,Vt=Ht.getAttribute("transform");if(!Vt){var It=u.bBox(Ht,!1,mt);return Ut&&(It.left+=Ut,It.right+=Ut),kt&&(It.top+=kt,It.bottom+=kt),It}if(mt+="~"+Ut+"~"+kt+"~"+Vt,Lt=u.savedBBoxes[mt],Lt)return C.extendFlat({},Lt)}}var re,Kt;At?re=bt:(Kt=u.tester.node(),re=bt.cloneNode(!0),Kt.appendChild(re)),g.select(re).attr("transform",null).call(a.positionText,0,0);var $t=re.getBoundingClientRect(),le=u.testref.node().getBoundingClientRect();At||Kt.removeChild(re);var he={height:$t.height,width:$t.width,left:$t.left-le.left,top:$t.top-le.top,right:$t.right-le.left,bottom:$t.bottom-le.top};return et>=it&&(u.savedBBoxes={},et=0),mt&&(u.savedBBoxes[mt]=he),et++,C.extendFlat({},he)};function ut(bt){var At=bt.getAttribute("data-unformatted");if(At!==null)return At+bt.getAttribute("data-math")+bt.getAttribute("text-anchor")+bt.getAttribute("style")}u.setClipUrl=function(bt,At,mt){bt.attr("clip-path",J(At,mt))};function J(bt,At){if(!bt)return null;var mt=At._context,Lt=mt._exportedPlot?"":mt._baseUrl||"";return Lt?"url('"+Lt+"#"+bt+"')":"url(#"+bt+")"}u.getTranslate=function(bt){var At=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,mt=bt.attr?"attr":"getAttribute",Lt=bt[mt]("transform")||"",Ht=Lt.replace(At,function(Ut,kt,Vt){return[kt,Vt].join(" ")}).split(" ");return{x:+Ht[0]||0,y:+Ht[1]||0}},u.setTranslate=function(bt,At,mt){var Lt=/(\btranslate\(.*?\);?)/,Ht=bt.attr?"attr":"getAttribute",Ut=bt.attr?"attr":"setAttribute",kt=bt[Ht]("transform")||"";return At=At||0,mt=mt||0,kt=kt.replace(Lt,"").trim(),kt+=e(At,mt),kt=kt.trim(),bt[Ut]("transform",kt),kt},u.getScale=function(bt){var At=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,mt=bt.attr?"attr":"getAttribute",Lt=bt[mt]("transform")||"",Ht=Lt.replace(At,function(Ut,kt,Vt){return[kt,Vt].join(" ")}).split(" ");return{x:+Ht[0]||1,y:+Ht[1]||1}},u.setScale=function(bt,At,mt){var Lt=/(\bscale\(.*?\);?)/,Ht=bt.attr?"attr":"getAttribute",Ut=bt.attr?"attr":"setAttribute",kt=bt[Ht]("transform")||"";return At=At||1,mt=mt||1,kt=kt.replace(Lt,"").trim(),kt+="scale("+At+","+mt+")",kt=kt.trim(),bt[Ut]("transform",kt),kt};var X=/\s*sc.*/;u.setPointGroupScale=function(bt,At,mt){if(At=At||1,mt=mt||1,!!bt){var Lt=At===1&&mt===1?"":"scale("+At+","+mt+")";bt.each(function(){var Ht=(this.getAttribute("transform")||"").replace(X,"");Ht+=Lt,Ht=Ht.trim(),this.setAttribute("transform",Ht)})}};var tt=/translate\([^)]*\)\s*$/;u.setTextPointsScale=function(bt,At,mt){bt&&bt.each(function(){var Lt,Ht=g.select(this),Ut=Ht.select("text");if(Ut.node()){var kt=parseFloat(Ut.attr("x")||0),Vt=parseFloat(Ut.attr("y")||0),It=(Ht.attr("transform")||"").match(tt);At===1&&mt===1?Lt=[]:Lt=[e(kt,Vt),"scale("+At+","+mt+")",e(-kt,-Vt)],It&&Lt.push(It),Ht.attr("transform",Lt.join(""))}})};function V(bt,At){var mt;return bt&&(mt=bt.mf),mt===void 0&&(mt=At.marker&&At.marker.standoff||0),!At._geo&&!At._xA?-mt:mt}u.getMarkerStandoff=V;var Q=Math.atan2,ot=Math.cos,$=Math.sin;function Z(bt,At){var mt=At[0],Lt=At[1];return[mt*ot(bt)-Lt*$(bt),mt*$(bt)+Lt*ot(bt)]}var st,nt,ct,gt,Tt,wt;function Rt(bt,At){var mt=bt.ma;mt===void 0&&(mt=At.marker.angle,(!mt||C.isArrayOrTypedArray(mt))&&(mt=0));var Lt,Ht,Ut=At.marker.angleref;if(Ut==="previous"||Ut==="north"){if(At._geo){var kt=At._geo.project(bt.lonlat);Lt=kt[0],Ht=kt[1]}else{var Vt=At._xA,It=At._yA;if(Vt&&It)Lt=Vt.c2p(bt.x),Ht=It.c2p(bt.y);else return 90}if(At._geo){var re=bt.lonlat[0],Kt=bt.lonlat[1],$t=At._geo.project([re,Kt+1e-5]),le=At._geo.project([re+1e-5,Kt]),he=Q(le[1]-Ht,le[0]-Lt),de=Q($t[1]-Ht,$t[0]-Lt),xe;if(Ut==="north")xe=mt/180*Math.PI;else if(Ut==="previous"){var Se=re/180*Math.PI,ne=Kt/180*Math.PI,zt=st/180*Math.PI,Xt=nt/180*Math.PI,Jt=zt-Se,Wt=ot(Xt)*$(Jt),Ft=$(Xt)*ot(ne)-ot(Xt)*$(ne)*ot(Jt);xe=-Q(Wt,Ft)-Math.PI,st=re,nt=Kt}var xt=Z(he,[ot(xe),0]),yt=Z(de,[$(xe),0]);mt=Q(xt[1]+yt[1],xt[0]+yt[0])/Math.PI*180,Ut==="previous"&&!(wt===At.uid&&bt.i===Tt+1)&&(mt=null)}if(Ut==="previous"&&!At._geo)if(wt===At.uid&&bt.i===Tt+1&&S(Lt)&&S(Ht)){var Et=Lt-ct,Mt=Ht-gt,Nt=At.line&&At.line.shape||"",jt=Nt.slice(Nt.length-1);jt==="h"&&(Mt=0),jt==="v"&&(Et=0),mt+=Q(Mt,Et)/Math.PI*180+90}else mt=null}return ct=Lt,gt=Ht,Tt=bt.i,wt=At.uid,mt}u.getMarkerAngle=Rt},71984:function(G,U,t){var g=t(21984),C=t(33428).round,i="M0,0Z",S=Math.sqrt(2),x=Math.sqrt(3),h=Math.PI,p=Math.cos,r=Math.sin;G.exports={circle:{n:0,f:function(m,v,b){if(e(v))return i;var u=C(m,2),o="M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z";return b?l(v,b,o):o}},square:{n:1,f:function(m,v,b){if(e(v))return i;var u=C(m,2);return l(v,b,"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")}},diamond:{n:2,f:function(m,v,b){if(e(v))return i;var u=C(m*1.3,2);return l(v,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z")}},cross:{n:3,f:function(m,v,b){if(e(v))return i;var u=C(m*.4,2),o=C(m*1.2,2);return l(v,b,"M"+o+","+u+"H"+u+"V"+o+"H-"+u+"V"+u+"H-"+o+"V-"+u+"H-"+u+"V-"+o+"H"+u+"V-"+u+"H"+o+"Z")}},x:{n:4,f:function(m,v,b){if(e(v))return i;var u=C(m*.8/S,2),o="l"+u+","+u,d="l"+u+",-"+u,w="l-"+u+",-"+u,A="l-"+u+","+u;return l(v,b,"M0,"+u+o+d+w+d+w+A+w+A+o+A+o+"Z")}},"triangle-up":{n:5,f:function(m,v,b){if(e(v))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(v,b,"M-"+u+","+o+"H"+u+"L0,-"+d+"Z")}},"triangle-down":{n:6,f:function(m,v,b){if(e(v))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(v,b,"M-"+u+",-"+o+"H"+u+"L0,"+d+"Z")}},"triangle-left":{n:7,f:function(m,v,b){if(e(v))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(v,b,"M"+o+",-"+u+"V"+u+"L-"+d+",0Z")}},"triangle-right":{n:8,f:function(m,v,b){if(e(v))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(v,b,"M-"+o+",-"+u+"V"+u+"L"+d+",0Z")}},"triangle-ne":{n:9,f:function(m,v,b){if(e(v))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(v,b,"M-"+o+",-"+u+"H"+u+"V"+o+"Z")}},"triangle-se":{n:10,f:function(m,v,b){if(e(v))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(v,b,"M"+u+",-"+o+"V"+u+"H-"+o+"Z")}},"triangle-sw":{n:11,f:function(m,v,b){if(e(v))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(v,b,"M"+o+","+u+"H-"+u+"V-"+o+"Z")}},"triangle-nw":{n:12,f:function(m,v,b){if(e(v))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(v,b,"M-"+u+","+o+"V-"+u+"H"+o+"Z")}},pentagon:{n:13,f:function(m,v,b){if(e(v))return i;var u=C(m*.951,2),o=C(m*.588,2),d=C(-m,2),w=C(m*-.309,2),A=C(m*.809,2);return l(v,b,"M"+u+","+w+"L"+o+","+A+"H-"+o+"L-"+u+","+w+"L0,"+d+"Z")}},hexagon:{n:14,f:function(m,v,b){if(e(v))return i;var u=C(m,2),o=C(m/2,2),d=C(m*x/2,2);return l(v,b,"M"+d+",-"+o+"V"+o+"L0,"+u+"L-"+d+","+o+"V-"+o+"L0,-"+u+"Z")}},hexagon2:{n:15,f:function(m,v,b){if(e(v))return i;var u=C(m,2),o=C(m/2,2),d=C(m*x/2,2);return l(v,b,"M-"+o+","+d+"H"+o+"L"+u+",0L"+o+",-"+d+"H-"+o+"L-"+u+",0Z")}},octagon:{n:16,f:function(m,v,b){if(e(v))return i;var u=C(m*.924,2),o=C(m*.383,2);return l(v,b,"M-"+o+",-"+u+"H"+o+"L"+u+",-"+o+"V"+o+"L"+o+","+u+"H-"+o+"L-"+u+","+o+"V-"+o+"Z")}},star:{n:17,f:function(m,v,b){if(e(v))return i;var u=m*1.4,o=C(u*.225,2),d=C(u*.951,2),w=C(u*.363,2),A=C(u*.588,2),_=C(-u,2),y=C(u*-.309,2),E=C(u*.118,2),T=C(u*.809,2),s=C(u*.382,2);return l(v,b,"M"+o+","+y+"H"+d+"L"+w+","+E+"L"+A+","+T+"L0,"+s+"L-"+A+","+T+"L-"+w+","+E+"L-"+d+","+y+"H-"+o+"L0,"+_+"Z")}},hexagram:{n:18,f:function(m,v,b){if(e(v))return i;var u=C(m*.66,2),o=C(m*.38,2),d=C(m*.76,2);return l(v,b,"M-"+d+",0l-"+o+",-"+u+"h"+d+"l"+o+",-"+u+"l"+o+","+u+"h"+d+"l-"+o+","+u+"l"+o+","+u+"h-"+d+"l-"+o+","+u+"l-"+o+",-"+u+"h-"+d+"Z")}},"star-triangle-up":{n:19,f:function(m,v,b){if(e(v))return i;var u=C(m*x*.8,2),o=C(m*.8,2),d=C(m*1.6,2),w=C(m*4,2),A="A "+w+","+w+" 0 0 1 ";return l(v,b,"M-"+u+","+o+A+u+","+o+A+"0,-"+d+A+"-"+u+","+o+"Z")}},"star-triangle-down":{n:20,f:function(m,v,b){if(e(v))return i;var u=C(m*x*.8,2),o=C(m*.8,2),d=C(m*1.6,2),w=C(m*4,2),A="A "+w+","+w+" 0 0 1 ";return l(v,b,"M"+u+",-"+o+A+"-"+u+",-"+o+A+"0,"+d+A+u+",-"+o+"Z")}},"star-square":{n:21,f:function(m,v,b){if(e(v))return i;var u=C(m*1.1,2),o=C(m*2,2),d="A "+o+","+o+" 0 0 1 ";return l(v,b,"M-"+u+",-"+u+d+"-"+u+","+u+d+u+","+u+d+u+",-"+u+d+"-"+u+",-"+u+"Z")}},"star-diamond":{n:22,f:function(m,v,b){if(e(v))return i;var u=C(m*1.4,2),o=C(m*1.9,2),d="A "+o+","+o+" 0 0 1 ";return l(v,b,"M-"+u+",0"+d+"0,"+u+d+u+",0"+d+"0,-"+u+d+"-"+u+",0Z")}},"diamond-tall":{n:23,f:function(m,v,b){if(e(v))return i;var u=C(m*.7,2),o=C(m*1.4,2);return l(v,b,"M0,"+o+"L"+u+",0L0,-"+o+"L-"+u+",0Z")}},"diamond-wide":{n:24,f:function(m,v,b){if(e(v))return i;var u=C(m*1.4,2),o=C(m*.7,2);return l(v,b,"M0,"+o+"L"+u+",0L0,-"+o+"L-"+u+",0Z")}},hourglass:{n:25,f:function(m,v,b){if(e(v))return i;var u=C(m,2);return l(v,b,"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z")},noDot:!0},bowtie:{n:26,f:function(m,v,b){if(e(v))return i;var u=C(m,2);return l(v,b,"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z")},noDot:!0},"circle-cross":{n:27,f:function(m,v,b){if(e(v))return i;var u=C(m,2);return l(v,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(m,v,b){if(e(v))return i;var u=C(m,2),o=C(m/S,2);return l(v,b,"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(m,v,b){if(e(v))return i;var u=C(m,2);return l(v,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(m,v,b){if(e(v))return i;var u=C(m,2);return l(v,b,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(m,v,b){if(e(v))return i;var u=C(m*1.3,2);return l(v,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(m,v,b){if(e(v))return i;var u=C(m*1.3,2),o=C(m*.65,2);return l(v,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+o+",-"+o+"L"+o+","+o+"M-"+o+","+o+"L"+o+",-"+o)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(m,v,b){if(e(v))return i;var u=C(m*1.4,2);return l(v,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(m,v,b){if(e(v))return i;var u=C(m,2);return l(v,b,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(m,v,b){if(e(v))return i;var u=C(m*1.2,2),o=C(m*.85,2);return l(v,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(m,v,b){if(e(v))return i;var u=C(m/2,2),o=C(m,2);return l(v,b,"M"+u+","+o+"V-"+o+"M"+(u-o)+",-"+o+"V"+o+"M"+o+","+u+"H-"+o+"M-"+o+","+(u-o)+"H"+o)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(m,v,b){if(e(v))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(v,b,"M-"+u+","+d+"L0,0M"+u+","+d+"L0,0M0,-"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(m,v,b){if(e(v))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(v,b,"M-"+u+",-"+d+"L0,0M"+u+",-"+d+"L0,0M0,"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(m,v,b){if(e(v))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(v,b,"M"+d+","+u+"L0,0M"+d+",-"+u+"L0,0M-"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(m,v,b){if(e(v))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(v,b,"M-"+d+","+u+"L0,0M-"+d+",-"+u+"L0,0M"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(m,v,b){if(e(v))return i;var u=C(m*1.4,2);return l(v,b,"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(m,v,b){if(e(v))return i;var u=C(m*1.4,2);return l(v,b,"M0,"+u+"V-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(m,v,b){if(e(v))return i;var u=C(m,2);return l(v,b,"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(m,v,b){if(e(v))return i;var u=C(m,2);return l(v,b,"M"+u+","+u+"L-"+u+",-"+u)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(m,v,b){if(e(v))return i;var u=C(m,2),o=C(m*2,2);return l(v,b,"M0,0L-"+u+","+o+"H"+u+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(m,v,b){if(e(v))return i;var u=C(m,2),o=C(m*2,2);return l(v,b,"M0,0L-"+u+",-"+o+"H"+u+"Z")},noDot:!0},"arrow-left":{n:47,f:function(m,v,b){if(e(v))return i;var u=C(m*2,2),o=C(m,2);return l(v,b,"M0,0L"+u+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-right":{n:48,f:function(m,v,b){if(e(v))return i;var u=C(m*2,2),o=C(m,2);return l(v,b,"M0,0L-"+u+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(m,v,b){if(e(v))return i;var u=C(m,2),o=C(m*2,2);return l(v,b,"M-"+u+",0H"+u+"M0,0L-"+u+","+o+"H"+u+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(m,v,b){if(e(v))return i;var u=C(m,2),o=C(m*2,2);return l(v,b,"M-"+u+",0H"+u+"M0,0L-"+u+",-"+o+"H"+u+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(m,v,b){if(e(v))return i;var u=C(m*2,2),o=C(m,2);return l(v,b,"M0,-"+o+"V"+o+"M0,0L"+u+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(m,v,b){if(e(v))return i;var u=C(m*2,2),o=C(m,2);return l(v,b,"M0,-"+o+"V"+o+"M0,0L-"+u+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(m,v,b){if(e(v))return i;var u=h/2.5,o=2*m*p(u),d=2*m*r(u);return l(v,b,"M0,0L"+-o+","+d+"L"+o+","+d+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(m,v,b){if(e(v))return i;var u=h/4,o=2*m*p(u),d=2*m*r(u);return l(v,b,"M0,0L"+-o+","+d+"A "+2*m+","+2*m+" 0 0 1 "+o+","+d+"Z")},backoff:.4,noDot:!0}};function e(m){return m===null}var a,n,f,c;function l(m,v,b){if((!m||m%360===0)&&!v)return b;if(f===m&&c===v&&a===b)return n;f=m,c=v,a=b;function u(D,N){var I=p(D),k=r(D),B=N[0],O=N[1]+(v||0);return[B*I-O*k,B*k+O*I]}for(var o=m/180*h,d=0,w=0,A=g(b),_="",y=0;y0,m=p._context.staticPlot;r.each(function(v){var b=v[0].trace,u=b.error_x||{},o=b.error_y||{},d;b.ids&&(d=function(y){return y.id});var w=S.hasMarkers(b)&&b.marker.maxdisplayed>0;!o.visible&&!u.visible&&(v=[]);var A=g.select(this).selectAll("g.errorbar").data(v,d);if(A.exit().remove(),!!v.length){u.visible||A.selectAll("path.xerror").remove(),o.visible||A.selectAll("path.yerror").remove(),A.style("opacity",1);var _=A.enter().append("g").classed("errorbar",!0);l&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),i.setClipUrl(A,e.layerClipId,p),A.each(function(y){var E=g.select(this),T=x(y,f,c);if(!(w&&!y.vis)){var s,L=E.select("path.yerror");if(o.visible&&C(T.x)&&C(T.yh)&&C(T.ys)){var M=o.width;s="M"+(T.x-M)+","+T.yh+"h"+2*M+"m-"+M+",0V"+T.ys,T.noYS||(s+="m-"+M+",0h"+2*M),n=!L.size(),n?L=E.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):l&&(L=L.transition().duration(a.duration).ease(a.easing)),L.attr("d",s)}else L.remove();var z=E.select("path.xerror");if(u.visible&&C(T.y)&&C(T.xh)&&C(T.xs)){var D=(u.copy_ystyle?o:u).width;s="M"+T.xh+","+(T.y-D)+"v"+2*D+"m0,-"+D+"H"+T.xs,T.noXS||(s+="m0,-"+D+"v"+2*D),n=!z.size(),n?z=E.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):l&&(z=z.transition().duration(a.duration).ease(a.easing)),z.attr("d",s)}else z.remove()}})}})};function x(h,p,r){var e={x:p.c2p(h.x),y:r.c2p(h.y)};return h.yh!==void 0&&(e.yh=r.c2p(h.yh),e.ys=r.c2p(h.ys),C(e.ys)||(e.noYS=!0,e.ys=r.c2p(h.ys,!0))),h.xh!==void 0&&(e.xh=p.c2p(h.xh),e.xs=p.c2p(h.xs),C(e.xs)||(e.noXS=!0,e.xs=p.c2p(h.xs,!0))),e}},92036:function(G,U,t){var g=t(33428),C=t(76308);G.exports=function(S){S.each(function(x){var h=x[0].trace,p=h.error_y||{},r=h.error_x||{},e=g.select(this);e.selectAll("path.yerror").style("stroke-width",p.thickness+"px").call(C.stroke,p.color),r.copy_ystyle&&(r=p),e.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(C.stroke,r.color)})}},55756:function(G,U,t){var g=t(25376),C=t(65460).hoverlabel,i=t(92880).extendFlat;G.exports={hoverlabel:{bgcolor:i({},C.bgcolor,{arrayOk:!0}),bordercolor:i({},C.bordercolor,{arrayOk:!0}),font:g({arrayOk:!0,editType:"none"}),align:i({},C.align,{arrayOk:!0}),namelength:i({},C.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(G,U,t){var g=t(3400),C=t(24040);G.exports=function(x){var h=x.calcdata,p=x._fullLayout;function r(c){return function(l){return g.coerceHoverinfo({hoverinfo:l},{_module:c._module},p)}}for(var e=0;e=0&&e.indexAt[0]._length||ie<0||ie>mt[0]._length)return f.unhoverRaw(Q,ot)}if(ot.pointerX=jt+At[0]._offset,ot.pointerY=ie+mt[0]._offset,"xval"in ot?le=m.flat(nt,ot.xval):le=m.p2c(At,jt),"yval"in ot?he=m.flat(nt,ot.yval):he=m.p2c(mt,ie),!C(le[0])||!C(he[0]))return S.warn("Fx.hover failed",ot,Q),f.unhoverRaw(Q,ot)}var ve=1/0;function Le(Cr,Wr){for(xe=0;xe<$t.length;xe++)if(Se=$t[xe],!(!Se||!Se[0]||!Se[0].trace)&&(ne=Se[0].trace,!(ne.visible!==!0||ne._length===0)&&["carpet","contourcarpet"].indexOf(ne._module.name)===-1)){if(ne.type==="splom"?(Xt=0,zt=nt[Xt]):(zt=m.getSubplot(ne),Xt=nt.indexOf(zt)),Jt=Vt,m.isUnifiedHover(Jt)&&(Jt=Jt.charAt(0)),xt={cd:Se,trace:ne,xa:At[Xt],ya:mt[Xt],maxHoverDistance:It,maxSpikeDistance:re,index:!1,distance:Math.min(ve,It),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:n.defaultLine,name:ne.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},ct[zt]&&(xt.subplot=ct[zt]._subplot),ct._splomScenes&&ct._splomScenes[ne.uid]&&(xt.scene=ct._splomScenes[ne.uid]),yt=Kt.length,Jt==="array"){var Ur=ot[xe];"pointNumber"in Ur?(xt.index=Ur.pointNumber,Jt="closest"):(Jt="","xval"in Ur&&(Wt=Ur.xval,Jt="x"),"yval"in Ur&&(Ft=Ur.yval,Jt=Jt?"closest":"y"))}else Cr!==void 0&&Wr!==void 0?(Wt=Cr,Ft=Wr):(Wt=le[Xt],Ft=he[Xt]);if(It!==0)if(ne._module&&ne._module.hoverPoints){var an=ne._module.hoverPoints(xt,Wt,Ft,Jt,{finiteRange:!0,hoverLayer:ct._hoverlayer});if(an)for(var pn,gn=0;gnyt&&(Kt.splice(0,yt),ve=Kt[0].distance),wt&&re!==0&&Kt.length===0){xt.distance=re,xt.index=!1;var _n=ne._module.hoverPoints(xt,Wt,Ft,"closest",{hoverLayer:ct._hoverlayer});if(_n&&(_n=_n.filter(function(ri){return ri.spikeDistance<=re})),_n&&_n.length){var kn,ni=_n.filter(function(ri){return ri.xa.showspikes&&ri.xa.spikesnap!=="hovered data"});if(ni.length){var ci=ni[0];C(ci.x0)&&C(ci.y0)&&(kn=Te(ci),(!Et.vLinePoint||Et.vLinePoint.spikeDistance>kn.spikeDistance)&&(Et.vLinePoint=kn))}var di=_n.filter(function(ri){return ri.ya.showspikes&&ri.ya.spikesnap!=="hovered data"});if(di.length){var li=di[0];C(li.x0)&&C(li.y0)&&(kn=Te(li),(!Et.hLinePoint||Et.hLinePoint.spikeDistance>kn.spikeDistance)&&(Et.hLinePoint=kn))}}}}}Le();function ce(Cr,Wr,Ur){for(var an=null,pn=1/0,gn,_n=0;_n0&&Math.abs(Cr.distance)Pe-1;Yt--)vr(Kt[Yt]);Kt=Je,Xe()}var Gt=Q._hoverdata,Ne=[],Oe=X(Q),Qe=tt(Q);for(de=0;de1||Kt.length>1)||Vt==="closest"&&Mt&&Kt.length>1,rn=n.combine(ct.plot_bgcolor||n.background,ct.paper_bgcolor),Cn=D(Kt,{gd:Q,hovermode:Vt,rotateLabels:cn,bgColor:rn,container:ct._hoverlayer,outerContainer:ct._paper.node(),commonLabelOpts:ct.hoverlabel,hoverdistance:ct.hoverdistance}),En=Cn.hoverLabels;if(m.isUnifiedHover(Vt)||(I(En,cn,ct,Cn.commonLabelBoundingBox),O(En,cn,ct._invScaleX,ct._invScaleY)),st&&st.tagName){var Tr=l.getComponentMethod("annotations","hasClickToShow")(Q,Ne);e(g.select(st),Tr?"pointer":"")}!st||Z||!j(Q,ot,Gt)||(Gt&&Q.emit("plotly_unhover",{event:ot,points:Gt}),Q.emit("plotly_hover",{event:ot,points:Q._hoverdata,xaxes:At,yaxes:mt,xvals:le,yvals:he}))}function M(Q){return[Q.trace.index,Q.index,Q.x0,Q.y0,Q.name,Q.attr,Q.xa?Q.xa._id:"",Q.ya?Q.ya._id:""].join(",")}var z=/([\s\S]*)<\/extra>/;function D(Q,ot){var $=ot.gd,Z=$._fullLayout,st=ot.hovermode,nt=ot.rotateLabels,ct=ot.bgColor,gt=ot.container,Tt=ot.outerContainer,wt=ot.commonLabelOpts||{};if(Q.length===0)return[[]];var Rt=ot.fontFamily||v.HOVERFONT,bt=ot.fontSize||v.HOVERFONTSIZE,At=Q[0],mt=At.xa,Lt=At.ya,Ht=st.charAt(0),Ut=Ht+"Label",kt=At[Ut];if(kt===void 0&&mt.type==="multicategory")for(var Vt=0;VtZ.width-Qe&&(er=Z.width-Qe),ke.attr("d","M"+(Gt-er)+",0L"+(Gt-er+y)+","+Oe+y+"H"+Qe+"v"+Oe+(E*2+Yt.height)+"H"+-Qe+"V"+Oe+y+"H"+(Gt-er-y)+"Z"),Gt=er,zt.minX=Gt-Qe,zt.maxX=Gt+Qe,mt.side==="top"?(zt.minY=Ne-(E*2+Yt.height),zt.maxY=Ne-E):(zt.minY=Ne+E,zt.maxY=Ne+(E*2+Yt.height))}else{var fr,rr,He;Lt.side==="right"?(fr="start",rr=1,He="",Gt=mt._offset+mt._length):(fr="end",rr=-1,He="-",Gt=mt._offset),Ne=Lt._offset+(At.y0+At.y1)/2,Ve.attr("text-anchor",fr),ke.attr("d","M0,0L"+He+y+","+y+"V"+(E+Yt.height/2)+"h"+He+(E*2+Yt.width)+"V-"+(E+Yt.height/2)+"H"+He+y+"V-"+y+"Z"),zt.minY=Ne-(E+Yt.height/2),zt.maxY=Ne+(E+Yt.height/2),Lt.side==="right"?(zt.minX=Gt+y,zt.maxX=Gt+y+(E*2+Yt.width)):(zt.minX=Gt-y-(E*2+Yt.width),zt.maxX=Gt-y);var dr=Yt.height/2,mr=re-Yt.top-dr,xr="clip"+Z._uid+"commonlabel"+Lt._id,pr;if(Gt=0?Ae=or:$e+Le=0?Ae=$e:ge+Le=0?Ce=Xe:Ke+ce<$t&&Ke>=0?Ce=Ke:se+ce<$t?Ce=se:Xe-ir=0,(Pe.idealAlign==="top"||!cn)&&rn?(dr-=xr/2,Pe.anchor="end"):cn?(dr+=xr/2,Pe.anchor="start"):Pe.anchor="middle",Pe.crossPos=dr;else{if(Pe.pos=dr,cn=He+mr/2+Dr<=Kt,rn=He-mr/2-Dr>=0,(Pe.idealAlign==="left"||!cn)&&rn)He-=mr/2,Pe.anchor="end";else if(cn)He+=mr/2,Pe.anchor="start";else{Pe.anchor="middle";var Cn=Dr/2,En=He+Cn-Kt,Tr=He-Cn;En>0&&(He-=En),Tr<0&&(He+=-Tr)}Pe.crossPos=He}Oe.attr("text-anchor",Pe.anchor),er&&Qe.attr("text-anchor",Pe.anchor),ke.attr("transform",x(He,dr)+(nt?h(o):""))}),{hoverLabels:Ie,commonLabelBoundingBox:zt}}function N(Q,ot,$,Z,st,nt){var ct="",gt="";Q.nameOverride!==void 0&&(Q.name=Q.nameOverride),Q.name&&(Q.trace._meta&&(Q.name=S.templateString(Q.name,Q.trace._meta)),ct=it(Q.name,Q.nameLength));var Tt=$.charAt(0),wt=Tt==="x"?"y":"x";Q.zLabel!==void 0?(Q.xLabel!==void 0&&(gt+="x: "+Q.xLabel+"
    "),Q.yLabel!==void 0&&(gt+="y: "+Q.yLabel+"
    "),Q.trace.type!=="choropleth"&&Q.trace.type!=="choroplethmapbox"&&(gt+=(gt?"z: ":"")+Q.zLabel)):ot&&Q[Tt+"Label"]===st?gt=Q[wt+"Label"]||"":Q.xLabel===void 0?Q.yLabel!==void 0&&Q.trace.type!=="scattercarpet"&&(gt=Q.yLabel):Q.yLabel===void 0?gt=Q.xLabel:gt="("+Q.xLabel+", "+Q.yLabel+")",(Q.text||Q.text===0)&&!Array.isArray(Q.text)&&(gt+=(gt?"
    ":"")+Q.text),Q.extraText!==void 0&&(gt+=(gt?"
    ":"")+Q.extraText),nt&>===""&&!Q.hovertemplate&&(ct===""&&nt.remove(),gt=ct);var Rt=Q.hovertemplate||!1;if(Rt){var bt=Q.hovertemplateLabels||Q;Q[Tt+"Label"]!==st&&(bt[Tt+"other"]=bt[Tt+"Val"],bt[Tt+"otherLabel"]=bt[Tt+"Label"]),gt=S.hovertemplateString(Rt,bt,Z._d3locale,Q.eventData[0]||{},Q.trace._meta),gt=gt.replace(z,function(At,mt){return ct=it(mt,Q.nameLength),""})}return[gt,ct]}function I(Q,ot,$,Z){var st=ot?"xa":"ya",nt=ot?"ya":"xa",ct=0,gt=1,Tt=Q.size(),wt=new Array(Tt),Rt=0,bt=Z.minX,At=Z.maxX,mt=Z.minY,Lt=Z.maxY,Ht=function(Wt){return Wt*$._invScaleX},Ut=function(Wt){return Wt*$._invScaleY};Q.each(function(Wt){var Ft=Wt[st],xt=Wt[nt],yt=Ft._id.charAt(0)==="x",Et=Ft.range;Rt===0&&Et&&Et[0]>Et[1]!==yt&&(gt=-1);var Mt=0,Nt=yt?$.width:$.height;if($.hovermode==="x"||$.hovermode==="y"){var jt=k(Wt,ot),ie=Wt.anchor,me=ie==="end"?-1:1,be,ve;if(ie==="middle")be=Wt.crossPos+(yt?Ut(jt.y-Wt.by/2):Ht(Wt.bx/2+Wt.tx2width/2)),ve=be+(yt?Ut(Wt.by):Ht(Wt.bx));else if(yt)be=Wt.crossPos+Ut(y+jt.y)-Ut(Wt.by/2-y),ve=be+Ut(Wt.by);else{var Le=Ht(me*y+jt.x),ce=Le+Ht(me*Wt.bx);be=Wt.crossPos+Math.min(Le,ce),ve=Wt.crossPos+Math.max(Le,ce)}yt?mt!==void 0&&Lt!==void 0&&Math.min(ve,Lt)-Math.max(be,mt)>1&&(xt.side==="left"?(Mt=xt._mainLinePosition,Nt=$.width):Nt=xt._mainLinePosition):bt!==void 0&&At!==void 0&&Math.min(ve,At)-Math.max(be,bt)>1&&(xt.side==="top"?(Mt=xt._mainLinePosition,Nt=$.height):Nt=xt._mainLinePosition)}wt[Rt++]=[{datum:Wt,traceIndex:Wt.trace.index,dp:0,pos:Wt.pos,posref:Wt.posref,size:Wt.by*(yt?w:1)/2,pmin:Mt,pmax:Nt}]}),wt.sort(function(Wt,Ft){return Wt[0].posref-Ft[0].posref||gt*(Ft[0].traceIndex-Wt[0].traceIndex)});var kt,Vt,It,re,Kt,$t,le;function he(Wt){var Ft=Wt[0],xt=Wt[Wt.length-1];if(Vt=Ft.pmin-Ft.pos-Ft.dp+Ft.size,It=xt.pos+xt.dp+xt.size-Ft.pmax,Vt>.01){for(Kt=Wt.length-1;Kt>=0;Kt--)Wt[Kt].dp+=Vt;kt=!1}if(!(It<.01)){if(Vt<-.01){for(Kt=Wt.length-1;Kt>=0;Kt--)Wt[Kt].dp-=It;kt=!1}if(kt){var yt=0;for(re=0;reFt.pmax&&yt++;for(re=Wt.length-1;re>=0&&!(yt<=0);re--)$t=Wt[re],$t.pos>Ft.pmax-1&&($t.del=!0,yt--);for(re=0;re=0;Kt--)Wt[Kt].dp-=It;for(re=Wt.length-1;re>=0&&!(yt<=0);re--)$t=Wt[re],$t.pos+$t.dp+$t.size>Ft.pmax&&($t.del=!0,yt--)}}}for(;!kt&&ct<=Tt;){for(ct++,kt=!0,re=0;re.01&&Se.pmin===ne.pmin&&Se.pmax===ne.pmax){for(Kt=xe.length-1;Kt>=0;Kt--)xe[Kt].dp+=Vt;for(de.push.apply(de,xe),wt.splice(re+1,1),le=0,Kt=de.length-1;Kt>=0;Kt--)le+=de[Kt].dp;for(It=le/de.length,Kt=de.length-1;Kt>=0;Kt--)de[Kt].dp-=It;kt=!1}else re++}wt.forEach(he)}for(re=wt.length-1;re>=0;re--){var zt=wt[re];for(Kt=zt.length-1;Kt>=0;Kt--){var Xt=zt[Kt],Jt=Xt.datum;Jt.offset=Xt.dp,Jt.del=Xt.del}}}function k(Q,ot){var $=0,Z=Q.offset;return ot&&(Z*=-_,$=Q.offset*A),{x:$,y:Z}}function B(Q){var ot={start:1,end:-1,middle:0}[Q.anchor],$=ot*(y+E),Z=$+ot*(Q.txwidth+E),st=Q.anchor==="middle";return st&&($-=Q.tx2width/2,Z+=Q.txwidth/2+E),{alignShift:ot,textShiftX:$,text2ShiftX:Z}}function O(Q,ot,$,Z){var st=function(ct){return ct*$},nt=function(ct){return ct*Z};Q.each(function(ct){var gt=g.select(this);if(ct.del)return gt.remove();var Tt=gt.select("text.nums"),wt=ct.anchor,Rt=wt==="end"?-1:1,bt=B(ct),At=k(ct,ot),mt=At.x,Lt=At.y,Ht=wt==="middle";gt.select("path").attr("d",Ht?"M-"+st(ct.bx/2+ct.tx2width/2)+","+nt(Lt-ct.by/2)+"h"+st(ct.bx)+"v"+nt(ct.by)+"h-"+st(ct.bx)+"Z":"M0,0L"+st(Rt*y+mt)+","+nt(y+Lt)+"v"+nt(ct.by/2-y)+"h"+st(Rt*ct.bx)+"v-"+nt(ct.by)+"H"+st(Rt*y+mt)+"V"+nt(Lt-y)+"Z");var Ut=mt+bt.textShiftX,kt=Lt+ct.ty0-ct.by/2+E,Vt=ct.textAlign||"auto";Vt!=="auto"&&(Vt==="left"&&wt!=="start"?(Tt.attr("text-anchor","start"),Ut=Ht?-ct.bx/2-ct.tx2width/2+E:-ct.bx-E):Vt==="right"&&wt!=="end"&&(Tt.attr("text-anchor","end"),Ut=Ht?ct.bx/2-ct.tx2width/2-E:ct.bx+E)),Tt.call(r.positionText,st(Ut),nt(kt)),ct.tx2width&&(gt.select("text.name").call(r.positionText,st(bt.text2ShiftX+bt.alignShift*E+mt),nt(Lt+ct.ty0-ct.by/2+E)),gt.select("rect").call(a.setRect,st(bt.text2ShiftX+(bt.alignShift-1)*ct.tx2width/2+mt),nt(Lt-ct.by/2-1),st(ct.tx2width),nt(ct.by+2)))})}function H(Q,ot){var $=Q.index,Z=Q.trace||{},st=Q.cd[0],nt=Q.cd[$]||{};function ct(At){return At||C(At)&&At===0}var gt=Array.isArray($)?function(At,mt){var Lt=S.castOption(st,$,At);return ct(Lt)?Lt:S.extractOption({},Z,"",mt)}:function(At,mt){return S.extractOption(nt,Z,At,mt)};function Tt(At,mt,Lt){var Ht=gt(mt,Lt);ct(Ht)&&(Q[At]=Ht)}if(Tt("hoverinfo","hi","hoverinfo"),Tt("bgcolor","hbg","hoverlabel.bgcolor"),Tt("borderColor","hbc","hoverlabel.bordercolor"),Tt("fontFamily","htf","hoverlabel.font.family"),Tt("fontSize","hts","hoverlabel.font.size"),Tt("fontColor","htc","hoverlabel.font.color"),Tt("nameLength","hnl","hoverlabel.namelength"),Tt("textAlign","hta","hoverlabel.align"),Q.posref=ot==="y"||ot==="closest"&&Z.orientation==="h"?Q.xa._offset+(Q.x0+Q.x1)/2:Q.ya._offset+(Q.y0+Q.y1)/2,Q.x0=S.constrain(Q.x0,0,Q.xa._length),Q.x1=S.constrain(Q.x1,0,Q.xa._length),Q.y0=S.constrain(Q.y0,0,Q.ya._length),Q.y1=S.constrain(Q.y1,0,Q.ya._length),Q.xLabelVal!==void 0&&(Q.xLabel="xLabel"in Q?Q.xLabel:c.hoverLabelText(Q.xa,Q.xLabelVal,Z.xhoverformat),Q.xVal=Q.xa.c2d(Q.xLabelVal)),Q.yLabelVal!==void 0&&(Q.yLabel="yLabel"in Q?Q.yLabel:c.hoverLabelText(Q.ya,Q.yLabelVal,Z.yhoverformat),Q.yVal=Q.ya.c2d(Q.yLabelVal)),Q.zLabelVal!==void 0&&Q.zLabel===void 0&&(Q.zLabel=String(Q.zLabelVal)),!isNaN(Q.xerr)&&!(Q.xa.type==="log"&&Q.xerr<=0)){var wt=c.tickText(Q.xa,Q.xa.c2l(Q.xerr),"hover").text;Q.xerrneg!==void 0?Q.xLabel+=" +"+wt+" / -"+c.tickText(Q.xa,Q.xa.c2l(Q.xerrneg),"hover").text:Q.xLabel+=" ± "+wt,ot==="x"&&(Q.distance+=1)}if(!isNaN(Q.yerr)&&!(Q.ya.type==="log"&&Q.yerr<=0)){var Rt=c.tickText(Q.ya,Q.ya.c2l(Q.yerr),"hover").text;Q.yerrneg!==void 0?Q.yLabel+=" +"+Rt+" / -"+c.tickText(Q.ya,Q.ya.c2l(Q.yerrneg),"hover").text:Q.yLabel+=" ± "+Rt,ot==="y"&&(Q.distance+=1)}var bt=Q.hoverinfo||Q.trace.hoverinfo;return bt&&bt!=="all"&&(bt=Array.isArray(bt)?bt:bt.split("+"),bt.indexOf("x")===-1&&(Q.xLabel=void 0),bt.indexOf("y")===-1&&(Q.yLabel=void 0),bt.indexOf("z")===-1&&(Q.zLabel=void 0),bt.indexOf("text")===-1&&(Q.text=void 0),bt.indexOf("name")===-1&&(Q.name=void 0)),Q}function Y(Q,ot,$){var Z=$.container,st=$.fullLayout,nt=st._size,ct=$.event,gt=!!ot.hLinePoint,Tt=!!ot.vLinePoint,wt,Rt;if(Z.selectAll(".spikeline").remove(),!!(Tt||gt)){var bt=n.combine(st.plot_bgcolor,st.paper_bgcolor);if(gt){var At=ot.hLinePoint,mt,Lt;wt=At&&At.xa,Rt=At&&At.ya;var Ht=Rt.spikesnap;Ht==="cursor"?(mt=ct.pointerX,Lt=ct.pointerY):(mt=wt._offset+At.x,Lt=Rt._offset+At.y);var Ut=i.readability(At.color,bt)<1.5?n.contrast(bt):At.color,kt=Rt.spikemode,Vt=Rt.spikethickness,It=Rt.spikecolor||Ut,re=c.getPxPosition(Q,Rt),Kt,$t;if(kt.indexOf("toaxis")!==-1||kt.indexOf("across")!==-1){if(kt.indexOf("toaxis")!==-1&&(Kt=re,$t=mt),kt.indexOf("across")!==-1){var le=Rt._counterDomainMin,he=Rt._counterDomainMax;Rt.anchor==="free"&&(le=Math.min(le,Rt.position),he=Math.max(he,Rt.position)),Kt=nt.l+le*nt.w,$t=nt.l+he*nt.w}Z.insert("line",":first-child").attr({x1:Kt,x2:$t,y1:Lt,y2:Lt,"stroke-width":Vt,stroke:It,"stroke-dasharray":a.dashStyle(Rt.spikedash,Vt)}).classed("spikeline",!0).classed("crisp",!0),Z.insert("line",":first-child").attr({x1:Kt,x2:$t,y1:Lt,y2:Lt,"stroke-width":Vt+2,stroke:bt}).classed("spikeline",!0).classed("crisp",!0)}kt.indexOf("marker")!==-1&&Z.insert("circle",":first-child").attr({cx:re+(Rt.side!=="right"?Vt:-Vt),cy:Lt,r:Vt,fill:It}).classed("spikeline",!0)}if(Tt){var de=ot.vLinePoint,xe,Se;wt=de&&de.xa,Rt=de&&de.ya;var ne=wt.spikesnap;ne==="cursor"?(xe=ct.pointerX,Se=ct.pointerY):(xe=wt._offset+de.x,Se=Rt._offset+de.y);var zt=i.readability(de.color,bt)<1.5?n.contrast(bt):de.color,Xt=wt.spikemode,Jt=wt.spikethickness,Wt=wt.spikecolor||zt,Ft=c.getPxPosition(Q,wt),xt,yt;if(Xt.indexOf("toaxis")!==-1||Xt.indexOf("across")!==-1){if(Xt.indexOf("toaxis")!==-1&&(xt=Ft,yt=Se),Xt.indexOf("across")!==-1){var Et=wt._counterDomainMin,Mt=wt._counterDomainMax;wt.anchor==="free"&&(Et=Math.min(Et,wt.position),Mt=Math.max(Mt,wt.position)),xt=nt.t+(1-Mt)*nt.h,yt=nt.t+(1-Et)*nt.h}Z.insert("line",":first-child").attr({x1:xe,x2:xe,y1:xt,y2:yt,"stroke-width":Jt,stroke:Wt,"stroke-dasharray":a.dashStyle(wt.spikedash,Jt)}).classed("spikeline",!0).classed("crisp",!0),Z.insert("line",":first-child").attr({x1:xe,x2:xe,y1:xt,y2:yt,"stroke-width":Jt+2,stroke:bt}).classed("spikeline",!0).classed("crisp",!0)}Xt.indexOf("marker")!==-1&&Z.insert("circle",":first-child").attr({cx:xe,cy:Ft-(wt.side!=="top"?Jt:-Jt),r:Jt,fill:Wt}).classed("spikeline",!0)}}}function j(Q,ot,$){if(!$||$.length!==Q._hoverdata.length)return!0;for(var Z=$.length-1;Z>=0;Z--){var st=$[Z],nt=Q._hoverdata[Z];if(st.curveNumber!==nt.curveNumber||String(st.pointNumber)!==String(nt.pointNumber)||String(st.pointNumbers)!==String(nt.pointNumbers))return!0}return!1}function et(Q,ot){return!ot||ot.vLinePoint!==Q._spikepoints.vLinePoint||ot.hLinePoint!==Q._spikepoints.hLinePoint}function it(Q,ot){return r.plainText(Q||"",{len:ot,allowedTags:["br","sub","sup","b","i","em"]})}function ut(Q,ot){for(var $=ot.charAt(0),Z=[],st=[],nt=[],ct=0;ct1)){delete c.grid;return}if(!b&&!u&&!o){var s=y("pattern")==="independent";s&&(b=!0)}_._hasSubplotGrid=b;var L=y("roworder"),M=L==="top to bottom",z=b?.2:.1,D=b?.3:.1,N,I;d&&c._splomGridDflt&&(N=c._splomGridDflt.xside,I=c._splomGridDflt.yside),_._domains={x:e("x",y,z,N,T),y:e("y",y,D,I,E,M)}}function e(f,c,l,m,v,b){var u=c(f+"gap",l),o=c("domain."+f);c(f+"side",m);for(var d=new Array(v),w=o[0],A=(o[1]-w)/(v-u),_=A*(1-u),y=0;y(e==="legend"?1:0));if(M===!1&&(n[e]=void 0),!(M===!1&&!c.uirevision)&&(m("uirevision",n.uirevision),M!==!1)){m("borderwidth");var z=m("orientation"),D=m("yref"),N=m("xref"),I=z==="h",k=D==="paper",B=N==="paper",O,H,Y,j="left";I?(O=0,g.getComponentMethod("rangeslider","isVisible")(a.xaxis)?k?(H=1.1,Y="bottom"):(H=1,Y="top"):k?(H=-.1,Y="top"):(H=0,Y="bottom")):(H=1,Y="auto",B?O=1.02:(O=1,j="right")),C.coerce(c,l,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:O}},"x"),C.coerce(c,l,{y:{valType:"number",editType:"legend",min:k?-2:0,max:k?3:1,dflt:H}},"y"),m("traceorder",y),p.isGrouped(n[e])&&m("tracegroupgap"),m("entrywidth"),m("entrywidthmode"),m("indentation"),m("itemsizing"),m("itemwidth"),m("itemclick"),m("itemdoubleclick"),m("groupclick"),m("xanchor",j),m("yanchor",Y),m("valign"),C.noneOrAll(c,l,["x","y"]);var et=m("title.text");if(et){m("title.side",I?"left":"top");var it=C.extendFlat({},v,{size:C.bigFont(v.size)});C.coerceFont(m,"title.font",it)}}}}G.exports=function(a,n,f){var c,l=f.slice(),m=n.shapes;if(m)for(c=0;c1)}var Z=j.hiddenlabels||[];if(!J&&(!j.showlegend||!X.length))return ut.selectAll("."+et).remove(),j._topdefs.select("#"+it).remove(),i.autoMargin(O,et);var st=C.ensureSingle(ut,"g",et,function(mt){J||mt.attr("pointer-events","all")}),nt=C.ensureSingleById(j._topdefs,"clipPath",it,function(mt){mt.append("rect")}),ct=C.ensureSingle(st,"rect","bg",function(mt){mt.attr("shape-rendering","crispEdges")});ct.call(r.stroke,Y.bordercolor).call(r.fill,Y.bgcolor).style("stroke-width",Y.borderwidth+"px");var gt=C.ensureSingle(st,"g","scrollbox"),Tt=Y.title;Y._titleWidth=0,Y._titleHeight=0;var wt;Tt.text?(wt=C.ensureSingle(gt,"text",et+"titletext"),wt.attr("text-anchor","start").call(p.font,Tt.font).text(Tt.text),L(wt,gt,O,Y,o)):gt.selectAll("."+et+"titletext").remove();var Rt=C.ensureSingle(st,"rect","scrollbar",function(mt){mt.attr(n.scrollBarEnterAttrs).call(r.fill,n.scrollBarColor)}),bt=gt.selectAll("g.groups").data(X);bt.enter().append("g").attr("class","groups"),bt.exit().remove();var At=bt.selectAll("g.traces").data(C.identity);At.enter().append("g").attr("class","traces"),At.exit().remove(),At.style("opacity",function(mt){var Lt=mt[0].trace;return S.traceIs(Lt,"pie-like")?Z.indexOf(mt[0].label)!==-1?.5:1:Lt.visible==="legendonly"?.5:1}).each(function(){g.select(this).call(E,O,Y)}).call(b,O,Y).each(function(){J||g.select(this).call(s,O,et)}),C.syncOrAsync([i.previousPromises,function(){return D(O,bt,At,Y)},function(){var mt=j._size,Lt=Y.borderwidth,Ht=Y.xref==="paper",Ut=Y.yref==="paper";if(Tt.text&&w(wt,Y,Lt),!J){var kt,Vt;Ht?kt=mt.l+mt.w*Y.x-l[I(Y)]*Y._width:kt=j.width*Y.x-l[I(Y)]*Y._width,Ut?Vt=mt.t+mt.h*(1-Y.y)-l[k(Y)]*Y._effHeight:Vt=j.height*(1-Y.y)-l[k(Y)]*Y._effHeight;var It=N(O,et,kt,Vt);if(It)return;if(j.margin.autoexpand){var re=kt,Kt=Vt;kt=Ht?C.constrain(kt,0,j.width-Y._width):re,Vt=Ut?C.constrain(Vt,0,j.height-Y._effHeight):Kt,kt!==re&&C.log("Constrain "+et+".x to make legend fit inside graph"),Vt!==Kt&&C.log("Constrain "+et+".y to make legend fit inside graph")}p.setTranslate(st,kt,Vt)}if(Rt.on(".drag",null),st.on("wheel",null),J||Y._height<=Y._maxHeight||O._context.staticPlot){var $t=Y._effHeight;J&&($t=Y._height),ct.attr({width:Y._width-Lt,height:$t-Lt,x:Lt/2,y:Lt/2}),p.setTranslate(gt,0,0),nt.select("rect").attr({width:Y._width-2*Lt,height:$t-2*Lt,x:Lt,y:Lt}),p.setClipUrl(gt,it,O),p.setRect(Rt,0,0,0,0),delete Y._scrollY}else{var le=Math.max(n.scrollBarMinHeight,Y._effHeight*Y._effHeight/Y._height),he=Y._effHeight-le-2*n.scrollBarMargin,de=Y._height-Y._effHeight,xe=he/de,Se=Math.min(Y._scrollY||0,de);ct.attr({width:Y._width-2*Lt+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-Lt,x:Lt/2,y:Lt/2}),nt.select("rect").attr({width:Y._width-2*Lt+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-2*Lt,x:Lt,y:Lt+Se}),p.setClipUrl(gt,it,O),yt(Se,le,xe),st.on("wheel",function(){Se=C.constrain(Y._scrollY+g.event.deltaY/he*de,0,de),yt(Se,le,xe),Se!==0&&Se!==de&&g.event.preventDefault()});var ne,zt,Xt,Jt=function(ie,me,be){var ve=(be-me)/xe+ie;return C.constrain(ve,0,de)},Wt=function(ie,me,be){var ve=(me-be)/xe+ie;return C.constrain(ve,0,de)},Ft=g.behavior.drag().on("dragstart",function(){var ie=g.event.sourceEvent;ie.type==="touchstart"?ne=ie.changedTouches[0].clientY:ne=ie.clientY,Xt=Se}).on("drag",function(){var ie=g.event.sourceEvent;ie.buttons===2||ie.ctrlKey||(ie.type==="touchmove"?zt=ie.changedTouches[0].clientY:zt=ie.clientY,Se=Jt(Xt,ne,zt),yt(Se,le,xe))});Rt.call(Ft);var xt=g.behavior.drag().on("dragstart",function(){var ie=g.event.sourceEvent;ie.type==="touchstart"&&(ne=ie.changedTouches[0].clientY,Xt=Se)}).on("drag",function(){var ie=g.event.sourceEvent;ie.type==="touchmove"&&(zt=ie.changedTouches[0].clientY,Se=Wt(Xt,ne,zt),yt(Se,le,xe))});gt.call(xt)}function yt(ie,me,be){Y._scrollY=O._fullLayout[et]._scrollY=ie,p.setTranslate(gt,0,-ie),p.setRect(Rt,Y._width,n.scrollBarMargin+ie*be,n.scrollBarWidth,me),nt.select("rect").attr("y",Lt+ie)}if(O._context.edits.legendPosition){var Et,Mt,Nt,jt;st.classed("cursor-move",!0),h.init({element:st.node(),gd:O,prepFn:function(){var ie=p.getTranslate(st);Nt=ie.x,jt=ie.y},moveFn:function(ie,me){var be=Nt+ie,ve=jt+me;p.setTranslate(st,be,ve),Et=h.align(be,Y._width,mt.l,mt.l+mt.w,Y.xanchor),Mt=h.align(ve+Y._height,-Y._height,mt.t+mt.h,mt.t,Y.yanchor)},doneFn:function(){if(Et!==void 0&&Mt!==void 0){var ie={};ie[et+".x"]=Et,ie[et+".y"]=Mt,S.call("_guiRelayout",O,ie)}},clickFn:function(ie,me){var be=ut.selectAll("g.traces").filter(function(){var ve=this.getBoundingClientRect();return me.clientX>=ve.left&&me.clientX<=ve.right&&me.clientY>=ve.top&&me.clientY<=ve.bottom});be.size()>0&&y(O,st,be,ie,me)}})}}],O)}}function _(O,H,Y){var j=O[0],et=j.width,it=H.entrywidthmode,ut=j.trace.legendwidth||H.entrywidth;return it==="fraction"?H._maxWidth*ut:Y+(ut||et)}function y(O,H,Y,j,et){var it=Y.data()[0][0].trace,ut={event:et,node:Y.node(),curveNumber:it.index,expandedIndex:it._expandedIndex,data:O.data,layout:O.layout,frames:O._transitionData._frames,config:O._context,fullData:O._fullData,fullLayout:O._fullLayout};it._group&&(ut.group=it._group),S.traceIs(it,"pie-like")&&(ut.label=Y.datum()[0].label);var J=x.triggerHandler(O,"plotly_legendclick",ut);if(j===1){if(J===!1)return;H._clickTimeout=setTimeout(function(){O._fullLayout&&a(Y,O,j)},O._context.doubleClickDelay)}else if(j===2){H._clickTimeout&&clearTimeout(H._clickTimeout),O._legendMouseDownTime=0;var X=x.triggerHandler(O,"plotly_legenddoubleclick",ut);X!==!1&&J!==!1&&a(Y,O,j)}}function E(O,H,Y){var j=B(Y),et=O.data()[0][0],it=et.trace,ut=S.traceIs(it,"pie-like"),J=!Y._inHover&&H._context.edits.legendText&&!ut,X=Y._maxNameLength,tt,V;et.groupTitle?(tt=et.groupTitle.text,V=et.groupTitle.font):(V=Y.font,Y.entries?tt=et.text:(tt=ut?et.label:it.name,it._meta&&(tt=C.templateString(tt,it._meta))));var Q=C.ensureSingle(O,"text",j+"text");Q.attr("text-anchor","start").call(p.font,V).text(J?T(tt,X):tt);var ot=Y.indentation+Y.itemwidth+n.itemGap*2;e.positionText(Q,ot,0),J?Q.call(e.makeEditable,{gd:H,text:tt}).call(L,O,H,Y).on("edit",function($){this.text(T($,X)).call(L,O,H,Y);var Z=et.trace._fullInput||{},st={};if(S.hasTransform(Z,"groupby")){var nt=S.getTransformIndices(Z,"groupby"),ct=nt[nt.length-1],gt=C.keyedContainer(Z,"transforms["+ct+"].styles","target","value.name");gt.set(et.trace._group,$),st=gt.constructUpdate()}else st.name=$;return Z._isShape?S.call("_guiRelayout",H,"shapes["+it.index+"].name",st.name):S.call("_guiRestyle",H,st,it.index)}):L(Q,O,H,Y)}function T(O,H){var Y=Math.max(4,H);if(O&&O.trim().length>=Y/2)return O;O=O||"";for(var j=Y-O.length;j>0;j--)O+=" ";return O}function s(O,H,Y){var j=H._context.doubleClickDelay,et,it=1,ut=C.ensureSingle(O,"rect",Y+"toggle",function(J){H._context.staticPlot||J.style("cursor","pointer").attr("pointer-events","all"),J.call(r.fill,"rgba(0,0,0,0)")});H._context.staticPlot||(ut.on("mousedown",function(){et=new Date().getTime(),et-H._legendMouseDownTimej&&(it=Math.max(it-1,1)),y(H,J,O,it,g.event)}}))}function L(O,H,Y,j,et){j._inHover&&O.attr("data-notex",!0),e.convertToTspans(O,Y,function(){M(H,Y,j,et)})}function M(O,H,Y,j){var et=O.data()[0][0];if(!Y._inHover&&et&&!et.trace.showlegend){O.remove();return}var it=O.select("g[class*=math-group]"),ut=it.node(),J=B(Y);Y||(Y=H._fullLayout[J]);var X=Y.borderwidth,tt;j===o?tt=Y.title.font:et.groupTitle?tt=et.groupTitle.font:tt=Y.font;var V=tt.size*c,Q,ot;if(ut){var $=p.bBox(ut);Q=$.height,ot=$.width,j===o?p.setTranslate(it,X,X+Q*.75):p.setTranslate(it,0,Q*.25)}else{var Z="."+J+(j===o?"title":"")+"text",st=O.select(Z),nt=e.lineCount(st),ct=st.node();if(Q=V*nt,ot=ct?p.bBox(ct).width:0,j===o)Y.title.side==="left"&&(ot+=n.itemGap*2),e.positionText(st,X+n.titlePad,X+V);else{var gt=n.itemGap*2+Y.indentation+Y.itemwidth;et.groupTitle&&(gt=n.itemGap,ot-=Y.indentation+Y.itemwidth),e.positionText(st,gt,-V*((nt-1)/2-.3))}}j===o?(Y._titleWidth=ot,Y._titleHeight=Q):(et.lineHeight=V,et.height=Math.max(Q,16)+3,et.width=ot)}function z(O){var H=0,Y=0,j=O.title.side;return j&&(j.indexOf("left")!==-1&&(H=O._titleWidth),j.indexOf("top")!==-1&&(Y=O._titleHeight)),[H,Y]}function D(O,H,Y,j){var et=O._fullLayout,it=B(j);j||(j=et[it]);var ut=et._size,J=u.isVertical(j),X=u.isGrouped(j),tt=j.entrywidthmode==="fraction",V=j.borderwidth,Q=2*V,ot=n.itemGap,$=j.indentation+j.itemwidth+ot*2,Z=2*(V+ot),st=k(j),nt=j.y<0||j.y===0&&st==="top",ct=j.y>1||j.y===1&&st==="bottom",gt=j.tracegroupgap,Tt={};j._maxHeight=Math.max(nt||ct?et.height/2:ut.h,30);var wt=0;j._width=0,j._height=0;var Rt=z(j);if(J)Y.each(function(Xt){var Jt=Xt[0].height;p.setTranslate(this,V+Rt[0],V+Rt[1]+j._height+Jt/2+ot),j._height+=Jt,j._width=Math.max(j._width,Xt[0].width)}),wt=$+j._width,j._width+=ot+$+Q,j._height+=Z,X&&(H.each(function(Xt,Jt){p.setTranslate(this,0,Jt*j.tracegroupgap)}),j._height+=(j._lgroupsLength-1)*j.tracegroupgap);else{var bt=I(j),At=j.x<0||j.x===0&&bt==="right",mt=j.x>1||j.x===1&&bt==="left",Lt=ct||nt,Ht=et.width/2;j._maxWidth=Math.max(At?Lt&&bt==="left"?ut.l+ut.w:Ht:mt?Lt&&bt==="right"?ut.r+ut.w:Ht:ut.w,2*$);var Ut=0,kt=0;Y.each(function(Xt){var Jt=_(Xt,j,$);Ut=Math.max(Ut,Jt),kt+=Jt}),wt=null;var Vt=0;if(X){var It=0,re=0,Kt=0;H.each(function(){var Xt=0,Jt=0;g.select(this).selectAll("g.traces").each(function(Ft){var xt=_(Ft,j,$),yt=Ft[0].height;p.setTranslate(this,Rt[0],Rt[1]+V+ot+yt/2+Jt),Jt+=yt,Xt=Math.max(Xt,xt),Tt[Ft[0].trace.legendgroup]=Xt});var Wt=Xt+ot;re>0&&Wt+V+re>j._maxWidth?(Vt=Math.max(Vt,re),re=0,Kt+=It+gt,It=Jt):It=Math.max(It,Jt),p.setTranslate(this,re,Kt),re+=Wt}),j._width=Math.max(Vt,re)+V,j._height=Kt+It+Z}else{var $t=Y.size(),le=kt+Q+($t-1)*ot=j._maxWidth&&(Vt=Math.max(Vt,Se),de=0,xe+=he,j._height+=he,he=0),p.setTranslate(this,Rt[0]+V+de,Rt[1]+V+xe+Jt/2+ot),Se=de+Wt+ot,de+=Ft,he=Math.max(he,Jt)}),le?(j._width=de+Q,j._height=he+Z):(j._width=Math.max(Vt,Se)+Q,j._height+=he+Z)}}j._width=Math.ceil(Math.max(j._width+Rt[0],j._titleWidth+2*(V+n.titlePad))),j._height=Math.ceil(Math.max(j._height+Rt[1],j._titleHeight+2*(V+n.itemGap))),j._effHeight=Math.min(j._height,j._maxHeight);var ne=O._context.edits,zt=ne.legendText||ne.legendPosition;Y.each(function(Xt){var Jt=g.select(this).select("."+it+"toggle"),Wt=Xt[0].height,Ft=Xt[0].trace.legendgroup,xt=_(Xt,j,$);X&&Ft!==""&&(xt=Tt[Ft]);var yt=zt?$:wt||xt;!J&&!tt&&(yt+=ot/2),p.setRect(Jt,0,-Wt/2,yt,Wt)})}function N(O,H,Y,j){var et=O._fullLayout,it=et[H],ut=I(it),J=k(it),X=it.xref==="paper",tt=it.yref==="paper";O._fullLayout._reservedMargin[H]={};var V=it.y<.5?"b":"t",Q=it.x<.5?"l":"r",ot={r:et.width-Y,l:Y+it._width,b:et.height-j,t:j+it._effHeight};if(X&&tt)return i.autoMargin(O,H,{x:it.x,y:it.y,l:it._width*l[ut],r:it._width*m[ut],b:it._effHeight*m[J],t:it._effHeight*l[J]});X?O._fullLayout._reservedMargin[H][V]=ot[V]:tt||it.orientation==="v"?O._fullLayout._reservedMargin[H][Q]=ot[Q]:O._fullLayout._reservedMargin[H][V]=ot[V]}function I(O){return C.isRightAnchor(O)?"right":C.isCenterAnchor(O)?"center":"left"}function k(O){return C.isBottomAnchor(O)?"bottom":C.isMiddleAnchor(O)?"middle":"top"}function B(O){return O._id||"legend"}},35456:function(G,U,t){var g=t(24040),C=t(42451);G.exports=function(S,x,h){var p=x._inHover,r=C.isGrouped(x),e=C.isReversed(x),a={},n=[],f=!1,c={},l=0,m=0,v,b;function u(O,H,Y){if(x.visible!==!1&&!(h&&O!==x._id))if(H===""||!C.isGrouped(x)){var j="~~i"+l;n.push(j),a[j]=[Y],l++}else n.indexOf(H)===-1?(n.push(H),f=!0,a[H]=[Y]):a[H].push(Y)}for(v=0;vM&&(L=M)}T[v][0]._groupMinRank=L,T[v][0]._preGroupSort=v}var z=function(O,H){return O[0]._groupMinRank-H[0]._groupMinRank||O[0]._preGroupSort-H[0]._preGroupSort},D=function(O,H){return O.trace.legendrank-H.trace.legendrank||O._preSort-H._preSort};for(T.forEach(function(O,H){O[0]._preGroupSort=H}),T.sort(z),v=0;v0)Q=X.width;else return 0;return E?V:Math.min(Q,tt)};w.each(function(J){var X=g.select(this),tt=i.ensureSingle(X,"g","layers");tt.style("opacity",J[0].trace.opacity);var V=_.indentation,Q=_.valign,ot=J[0].lineHeight,$=J[0].height;if(Q==="middle"&&V===0||!ot||!$)tt.attr("transform",null);else{var Z={top:1,bottom:-1}[Q],st=Z*(.5*(ot-$+3))||0,nt=_.indentation;tt.attr("transform",S(nt,st))}var ct=tt.selectAll("g.legendfill").data([J]);ct.enter().append("g").classed("legendfill",!0);var gt=tt.selectAll("g.legendlines").data([J]);gt.enter().append("g").classed("legendlines",!0);var Tt=tt.selectAll("g.legendsymbols").data([J]);Tt.enter().append("g").classed("legendsymbols",!0),Tt.selectAll("g.legendpoints").data([J]).enter().append("g").classed("legendpoints",!0)}).each(ut).each(N).each(k).each(I).each(O).each(et).each(j).each(z).each(D).each(H).each(Y);function z(J){var X=u(J),tt=X.showFill,V=X.showLine,Q=X.showGradientLine,ot=X.showGradientFill,$=X.anyFill,Z=X.anyLine,st=J[0],nt=st.trace,ct,gt,Tt=p(nt),wt=Tt.colorscale,Rt=Tt.reversescale,bt=function(Vt){if(Vt.size())if(tt)x.fillGroupStyle(Vt,A,!0);else{var It="legendfill-"+nt.uid;x.gradient(Vt,A,It,b(Rt),wt,"fill")}},At=function(Vt){if(Vt.size()){var It="legendline-"+nt.uid;x.lineGroupStyle(Vt),x.gradient(Vt,A,It,b(Rt),wt,"stroke")}},mt=r.hasMarkers(nt)||!$?"M5,0":Z?"M5,-2":"M5,-3",Lt=g.select(this),Ht=Lt.select(".legendfill").selectAll("path").data(tt||ot?[J]:[]);if(Ht.enter().append("path").classed("js-fill",!0),Ht.exit().remove(),Ht.attr("d",mt+"h"+T+"v6h-"+T+"z").call(bt),V||Q){var Ut=M(void 0,nt.line,m,c);gt=i.minExtend(nt,{line:{width:Ut}}),ct=[i.minExtend(st,{trace:gt})]}var kt=Lt.select(".legendlines").selectAll("path").data(V||Q?[ct]:[]);kt.enter().append("path").classed("js-line",!0),kt.exit().remove(),kt.attr("d",mt+(Q?"l"+T+",0.0001":"h"+T)).call(V?x.lineGroupStyle:At)}function D(J){var X=u(J),tt=X.anyFill,V=X.anyLine,Q=X.showLine,ot=X.showMarker,$=J[0],Z=$.trace,st=!ot&&!V&&!tt&&r.hasText(Z),nt,ct;function gt(Ht,Ut,kt,Vt){var It=i.nestedProperty(Z,Ht).get(),re=i.isArrayOrTypedArray(It)&&Ut?Ut(It):It;if(E&&re&&Vt!==void 0&&(re=Vt),kt){if(rekt[1])return kt[1]}return re}function Tt(Ht){return $._distinct&&$.index&&Ht[$.index]?Ht[$.index]:Ht[0]}if(ot||st||Q){var wt={},Rt={};if(ot){wt.mc=gt("marker.color",Tt),wt.mx=gt("marker.symbol",Tt),wt.mo=gt("marker.opacity",i.mean,[.2,1]),wt.mlc=gt("marker.line.color",Tt),wt.mlw=gt("marker.line.width",i.mean,[0,5],l),Rt.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var bt=gt("marker.size",i.mean,[2,16],f);wt.ms=bt,Rt.marker.size=bt}Q&&(Rt.line={width:gt("line.width",Tt,[0,10],c)}),st&&(wt.tx="Aa",wt.tp=gt("textposition",Tt),wt.ts=10,wt.tc=gt("textfont.color",Tt),wt.tf=gt("textfont.family",Tt)),nt=[i.minExtend($,wt)],ct=i.minExtend(Z,Rt),ct.selectedpoints=null,ct.texttemplate=null}var At=g.select(this).select("g.legendpoints"),mt=At.selectAll("path.scatterpts").data(ot?nt:[]);mt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",L),mt.exit().remove(),mt.call(x.pointStyle,ct,A),ot&&(nt[0].mrc=3);var Lt=At.selectAll("g.pointtext").data(st?nt:[]);Lt.enter().append("g").classed("pointtext",!0).append("text").attr("transform",L),Lt.exit().remove(),Lt.selectAll("text").call(x.textPointStyle,ct,A)}function N(J){var X=J[0].trace,tt=X.type==="waterfall";if(J[0]._distinct&&tt){var V=J[0].trace[J[0].dir].marker;return J[0].mc=V.color,J[0].mlw=V.line.width,J[0].mlc=V.line.color,B(J,this,"waterfall")}var Q=[];X.visible&&tt&&(Q=J[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var ot=g.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Q);ot.enter().append("path").classed("legendwaterfall",!0).attr("transform",L).style("stroke-miterlimit",1),ot.exit().remove(),ot.each(function($){var Z=g.select(this),st=X[$[0]].marker,nt=M(void 0,st.line,v,l);Z.attr("d",$[1]).style("stroke-width",nt+"px").call(h.fill,st.color),nt&&Z.call(h.stroke,st.line.color)})}function I(J){B(J,this)}function k(J){B(J,this,"funnel")}function B(J,X,tt){var V=J[0].trace,Q=V.marker||{},ot=Q.line||{},$=Q.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Z=tt?V.visible&&V.type===tt:C.traceIs(V,"bar"),st=g.select(X).select("g.legendpoints").selectAll("path.legend"+tt).data(Z?[J]:[]);st.enter().append("path").classed("legend"+tt,!0).attr("d",$).attr("transform",L),st.exit().remove(),st.each(function(nt){var ct=g.select(this),gt=nt[0],Tt=M(gt.mlw,Q.line,v,l);ct.style("stroke-width",Tt+"px");var wt=gt.mcc;if(!_._inHover&&"mc"in gt){var Rt=p(Q),bt=Rt.mid;bt===void 0&&(bt=(Rt.max+Rt.min)/2),wt=x.tryColorscale(Q,"")(bt)}var At=wt||gt.mc||Q.color,mt=Q.pattern,Lt=mt&&x.getPatternAttr(mt.shape,0,"");if(Lt){var Ht=x.getPatternAttr(mt.bgcolor,0,null),Ut=x.getPatternAttr(mt.fgcolor,0,null),kt=mt.fgopacity,Vt=o(mt.size,8,10),It=o(mt.solidity,.5,1),re="legend-"+V.uid;ct.call(x.pattern,"legend",A,re,Lt,Vt,It,wt,mt.fillmode,Ht,Ut,kt)}else ct.call(h.fill,At);Tt&&h.stroke(ct,gt.mlc||ot.color)})}function O(J){var X=J[0].trace,tt=g.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&C.traceIs(X,"box-violin")?[J]:[]);tt.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",L),tt.exit().remove(),tt.each(function(){var V=g.select(this);if((X.boxpoints==="all"||X.points==="all")&&h.opacity(X.fillcolor)===0&&h.opacity((X.line||{}).color)===0){var Q=i.minExtend(X,{marker:{size:E?f:i.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});tt.call(x.pointStyle,Q,A)}else{var ot=M(void 0,X.line,v,l);V.style("stroke-width",ot+"px").call(h.fill,X.fillcolor),ot&&h.stroke(V,X.line.color)}})}function H(J){var X=J[0].trace,tt=g.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[J,J]:[]);tt.enter().append("path").classed("legendcandle",!0).attr("d",function(V,Q){return Q?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",L).style("stroke-miterlimit",1),tt.exit().remove(),tt.each(function(V,Q){var ot=g.select(this),$=X[Q?"increasing":"decreasing"],Z=M(void 0,$.line,v,l);ot.style("stroke-width",Z+"px").call(h.fill,$.fillcolor),Z&&h.stroke(ot,$.line.color)})}function Y(J){var X=J[0].trace,tt=g.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[J,J]:[]);tt.enter().append("path").classed("legendohlc",!0).attr("d",function(V,Q){return Q?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",L).style("stroke-miterlimit",1),tt.exit().remove(),tt.each(function(V,Q){var ot=g.select(this),$=X[Q?"increasing":"decreasing"],Z=M(void 0,$.line,v,l);ot.style("fill","none").call(x.dashLine,$.line.dash,Z),Z&&h.stroke(ot,$.line.color)})}function j(J){it(J,this,"pie")}function et(J){it(J,this,"funnelarea")}function it(J,X,tt){var V=J[0],Q=V.trace,ot=tt?Q.visible&&Q.type===tt:C.traceIs(Q,tt),$=g.select(X).select("g.legendpoints").selectAll("path.legend"+tt).data(ot?[J]:[]);if($.enter().append("path").classed("legend"+tt,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",L),$.exit().remove(),$.size()){var Z=Q.marker||{},st=M(a(Z.line.width,V.pts),Z.line,v,l),nt="pieLike",ct=i.minExtend(Q,{marker:{line:{width:st}}},nt),gt=i.minExtend(V,{trace:ct},nt);e($,gt,ct,A)}}function ut(J){var X=J[0].trace,tt,V=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":V=[["M-15,-2V4H15V-2Z"]],tt=!0;break;case"choropleth":case"choroplethmapbox":V=[["M-6,-6V6H6V-6Z"]],tt=!0;break;case"densitymapbox":V=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],tt="radial";break;case"cone":V=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],tt=!1;break;case"streamtube":V=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],tt=!1;break;case"surface":V=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],tt=!0;break;case"mesh3d":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],tt=!1;break;case"volume":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],tt=!0;break;case"isosurface":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],tt=!1;break}var Q=g.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(V);Q.enter().append("path").classed("legend3dandfriends",!0).attr("transform",L).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(ot,$){var Z=g.select(this),st=p(X),nt=st.colorscale,ct=st.reversescale,gt=function(bt){if(bt.size()){var At="legendfill-"+X.uid;x.gradient(bt,A,At,b(ct,tt==="radial"),nt,"fill")}},Tt;if(nt){if(!tt){var Rt=nt.length;Tt=$===0?nt[ct?Rt-1:0][1]:$===1?nt[ct?0:Rt-1][1]:nt[Math.floor((Rt-1)/2)][1]}}else{var wt=X.vertexcolor||X.facecolor||X.color;Tt=i.isArrayOrTypedArray(wt)?wt[$]||wt[0]:wt}Z.attr("d",ot[0]),Tt?Z.call(h.fill,Tt):Z.call(gt)})}};function b(d,w){var A=w?"radial":"horizontal";return A+(d?"":"reversed")}function u(d){var w=d[0].trace,A=w.contours,_=r.hasLines(w),y=r.hasMarkers(w),E=w.visible&&w.fill&&w.fill!=="none",T=!1,s=!1;if(A){var L=A.coloring;L==="lines"?T=!0:_=L==="none"||L==="heatmap"||A.showlines,A.type==="constraint"?E=A._operation!=="=":(L==="fill"||L==="heatmap")&&(s=!0)}return{showMarker:y,showLine:_,showFill:E,showGradientLine:T,showGradientFill:s,anyLine:_||T,anyFill:E||s}}function o(d,w,A){return d&&i.isArrayOrTypedArray(d)?w:d>A?A:d}},66540:function(G,U,t){t(76052),G.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},44248:function(G,U,t){var g=t(24040),C=t(7316),i=t(79811),S=t(9224),x=t(4016).eraseActiveShape,h=t(3400),p=h._,r=G.exports={};r.toImage={name:"toImage",title:function(d){var w=d._context.toImageButtonOptions||{},A=w.format||"png";return A==="png"?p(d,"Download plot as a png"):p(d,"Download plot")},icon:S.camera,click:function(d){var w=d._context.toImageButtonOptions,A={format:w.format||"png"};h.notifier(p(d,"Taking snapshot - this may take a few seconds"),"long"),A.format!=="svg"&&h.isIE()&&(h.notifier(p(d,"IE only supports svg. Changing format to svg."),"long"),A.format="svg"),["filename","width","height","scale"].forEach(function(_){_ in w&&(A[_]=w[_])}),g.call("downloadImage",d,A).then(function(_){h.notifier(p(d,"Snapshot succeeded")+" - "+_,"long")}).catch(function(){h.notifier(p(d,"Sorry, there was a problem downloading your snapshot!"),"long")})}},r.sendDataToCloud={name:"sendDataToCloud",title:function(d){return p(d,"Edit in Chart Studio")},icon:S.disk,click:function(d){C.sendDataToCloud(d)}},r.editInChartStudio={name:"editInChartStudio",title:function(d){return p(d,"Edit in Chart Studio")},icon:S.pencil,click:function(d){C.sendDataToCloud(d)}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(d){return p(d,"Zoom")},attr:"dragmode",val:"zoom",icon:S.zoombox,click:e},r.pan2d={name:"pan2d",_cat:"pan",title:function(d){return p(d,"Pan")},attr:"dragmode",val:"pan",icon:S.pan,click:e},r.select2d={name:"select2d",_cat:"select",title:function(d){return p(d,"Box Select")},attr:"dragmode",val:"select",icon:S.selectbox,click:e},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(d){return p(d,"Lasso Select")},attr:"dragmode",val:"lasso",icon:S.lasso,click:e},r.drawclosedpath={name:"drawclosedpath",title:function(d){return p(d,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:S.drawclosedpath,click:e},r.drawopenpath={name:"drawopenpath",title:function(d){return p(d,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:S.drawopenpath,click:e},r.drawline={name:"drawline",title:function(d){return p(d,"Draw line")},attr:"dragmode",val:"drawline",icon:S.drawline,click:e},r.drawrect={name:"drawrect",title:function(d){return p(d,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:S.drawrect,click:e},r.drawcircle={name:"drawcircle",title:function(d){return p(d,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:S.drawcircle,click:e},r.eraseshape={name:"eraseshape",title:function(d){return p(d,"Erase active shape")},icon:S.eraseshape,click:x},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(d){return p(d,"Zoom in")},attr:"zoom",val:"in",icon:S.zoom_plus,click:e},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(d){return p(d,"Zoom out")},attr:"zoom",val:"out",icon:S.zoom_minus,click:e},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(d){return p(d,"Autoscale")},attr:"zoom",val:"auto",icon:S.autoscale,click:e},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(d){return p(d,"Reset axes")},attr:"zoom",val:"reset",icon:S.home,click:e},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(d){return p(d,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:S.tooltip_basic,gravity:"ne",click:e},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(d){return p(d,"Compare data on hover")},attr:"hovermode",val:function(d){return d._fullLayout._isHoriz?"y":"x"},icon:S.tooltip_compare,gravity:"ne",click:e};function e(d,w){var A=w.currentTarget,_=A.getAttribute("data-attr"),y=A.getAttribute("data-val")||!0,E=d._fullLayout,T={},s=i.list(d,null,!0),L=E._cartesianSpikesEnabled,M,z;if(_==="zoom"){var D=y==="in"?.5:2,N=(1+D)/2,I=(1-D)/2,k;for(z=0;z1?(it=["toggleHover"],ut=["resetViews"]):T?(et=["zoomInGeo","zoomOutGeo"],it=["hoverClosestGeo"],ut=["resetGeo"]):E?(it=["hoverClosest3d"],ut=["resetCameraDefault3d","resetCameraLastSave3d"]):D?(et=["zoomInMapbox","zoomOutMapbox"],it=["toggleHover"],ut=["resetViewMapbox"]):M?it=["hoverClosestGl2d"]:s?it=["hoverClosestPie"]:k?(it=["hoverClosestCartesian","hoverCompareCartesian"],ut=["resetViewSankey"]):it=["toggleHover"],y&&(it=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(f(b)||O)&&(it=[]),(y||M)&&!B&&(et=["zoomIn2d","zoomOut2d","autoScale2d"],ut[0]!=="resetViews"&&(ut=["resetScale2d"])),E?J=["zoom3d","pan3d","orbitRotation","tableRotation"]:(y||M)&&!B||z?J=["zoom2d","pan2d"]:D||T?J=["pan2d"]:N&&(J=["zoom2d"]),n(b)&&J.push("select2d","lasso2d");var X=[],tt=function($){X.indexOf($)===-1&&it.indexOf($)!==-1&&X.push($)};if(Array.isArray(A)){for(var V=[],Q=0;Q0);if(o){var d=r(n,f,c);b("x",d[0]),b("y",d[1]),g.noneOrAll(a,n,["x","y"]),b("xanchor"),b("yanchor"),g.coerceFont(b,"font",f.font);var w=b("bgcolor");b("activecolor",C.contrast(w,h.lightAmount,h.darkAmount)),b("bordercolor"),b("borderwidth")}};function p(e,a,n,f){var c=f.calendar;function l(b,u){return g.coerce(e,a,x.buttons,b,u)}var m=l("visible");if(m){var v=l("step");v!=="all"&&(c&&c!=="gregorian"&&(v==="month"||v==="year")?a.stepmode="backward":l("stepmode"),l("count")),l("label")}}function r(e,a,n){for(var f=n.filter(function(v){return a[v].anchor===e._id}),c=0,l=0;l=At.max)Rt=nt[bt+1];else if(wt=At.pmax)Rt=nt[bt+1];else if(wt0?E.touches[0].clientX:0}function m(E,T,s,L){if(T._context.staticPlot)return;var M=E.select("rect."+c.slideBoxClassName).node(),z=E.select("rect."+c.grabAreaMinClassName).node(),D=E.select("rect."+c.grabAreaMaxClassName).node();function N(){var I=g.event,k=I.target,B=l(I),O=B-E.node().getBoundingClientRect().left,H=L.d2p(s._rl[0]),Y=L.d2p(s._rl[1]),j=n.coverSlip();this.addEventListener("touchmove",et),this.addEventListener("touchend",it),j.addEventListener("mousemove",et),j.addEventListener("mouseup",it);function et(ut){var J=l(ut),X=+J-B,tt,V,Q;switch(k){case M:if(Q="ew-resize",H+X>s._length||Y+X<0)return;tt=H+X,V=Y+X;break;case z:if(Q="col-resize",H+X>s._length)return;tt=H+X,V=Y;break;case D:if(Q="col-resize",Y+X<0)return;tt=H,V=Y+X;break;default:Q="ew-resize",tt=O,V=O+X;break}if(V=0;N--){var I=A.append("path").attr(y).style("opacity",N?.1:E).call(S.stroke,s).call(S.fill,T).call(x.dashLine,N?"solid":M,N?4+L:L);if(f(I,v,o),z){var k=h(v.layout,"selections",o);I.style({cursor:"move"});var B={element:I.node(),plotinfo:d,gd:v,editHelpers:k,isActiveSelection:!0},O=g(_,v);C(O,I,B)}else I.style("pointer-events",N?"all":"none");D[N]=I}var H=D[0],Y=D[1];Y.node().addEventListener("click",function(){return c(v,H)})}}function f(v,b,u){var o=u.xref+u.yref;x.setClipUrl(v,"clip"+b._fullLayout._uid+o,b)}function c(v,b){if(a(v)){var u=b.node(),o=+u.getAttribute("data-index");if(o>=0){if(o===v._fullLayout._activeSelectionIndex){m(v);return}v._fullLayout._activeSelectionIndex=o,v._fullLayout._deactivateSelection=m,e(v)}}}function l(v){if(a(v)){var b=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=b,v._fullLayout._deactivateSelection=m,e(v)}}function m(v){if(a(v)){var b=v._fullLayout._activeSelectionIndex;b>=0&&(i(v),delete v._fullLayout._activeSelectionIndex,e(v))}}},34200:function(G,U,t){var g=t(98192).u,C=t(92880).extendFlat;G.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:C({},g,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(G){G.exports=function(t,g,C){C("newselection.mode");var i=C("newselection.line.width");i&&(C("newselection.line.color"),C("newselection.line.dash")),C("activeselection.fillcolor"),C("activeselection.opacity")}},5968:function(G,U,t){var g=t(72760),C=g.selectMode,i=t(1936),S=i.clearOutline,x=t(9856),h=x.readPaths,p=x.writePaths,r=x.fixDatesForPaths;G.exports=function(a,n){if(a.length){var f=a[0][0];if(f){var c=f.getAttribute("d"),l=n.gd,m=l._fullLayout.newselection,v=n.plotinfo,b=v.xaxis,u=v.yaxis,o=n.isActiveSelection,d=n.dragmode,w=(l.layout||{}).selections||[];if(!C(d)&&o!==void 0){var A=l._fullLayout._activeSelectionIndex;if(A=0){Te._fullLayout._deactivateShape(Te);return}if(!me){var En=Be.clickmode;s.done(Gr).then(function(){if(s.clear(Gr),rn===2){for(rr.remove(),Qe=0;Qe-1&&it(Cn,Te,yt.xaxes,yt.yaxes,yt.subplot,yt,rr),En==="event"&&Xt(Te,void 0);h.click(Te,Cn,Ke.id)}).catch(y.error)}},yt.doneFn=function(){xr.remove(),s.done(Gr).then(function(){s.clear(Gr),!ir&&Oe&&yt.selectionDefs&&(Oe.subtract=vr,yt.selectionDefs.push(Oe),yt.mergedPolygons.length=0,[].push.apply(yt.mergedPolygons,Ne)),(ir||me)&&$(yt,ir),yt.doneFnCompleted&&yt.doneFnCompleted(Pr),be&&Xt(Te,fr)}).catch(y.error)}}function it(Wt,Ft,xt,yt,Et,Mt,Nt){var jt=Ft._hoverdata,ie=Ft._fullLayout,me=ie.clickmode,be=me.indexOf("event")>-1,ve=[],Le,ce,Te,Be,ir,pe,Xe,Ke,or,$e;if(ct(jt)){V(Wt,Ft,Mt),Le=st(Ft,xt,yt,Et);var ge=gt(jt,Le),se=ge.pointNumbers.length>0;if(se?wt(Le,ge):Rt(Le)&&(Xe=Tt(ge))){for(Nt&&Nt.remove(),$e=0;$e=0}function ot(Wt){return Wt._fullLayout._activeSelectionIndex>=0}function $(Wt,Ft){var xt=Wt.dragmode,yt=Wt.plotinfo,Et=Wt.gd;Q(Et)&&Et._fullLayout._deactivateShape(Et),ot(Et)&&Et._fullLayout._deactivateSelection(Et);var Mt=Et._fullLayout,Nt=Mt._zoomlayer,jt=n(xt),ie=c(xt);if(jt||ie){var me=Nt.selectAll(".select-outline-"+yt.id);if(me&&Et._fullLayout._outlining){var be;jt&&(be=w(me,Wt)),be&&i.call("_guiRelayout",Et,{shapes:be});var ve;ie&&!j(Wt)&&(ve=A(me,Wt)),ve&&(Et._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Et,{selections:ve}).then(function(){Ft&&_(Et)})),Et._fullLayout._outlining=!1}}yt.selection={},yt.selection.selectionDefs=Wt.selectionDefs=[],yt.selection.mergedPolygons=Wt.mergedPolygons=[]}function Z(Wt){return Wt._id}function st(Wt,Ft,xt,yt){if(!Wt.calcdata)return[];var Et=[],Mt=Ft.map(Z),Nt=xt.map(Z),jt,ie,me;for(me=0;me0,Mt=Et?yt[0]:xt;return Ft.selectedpoints?Ft.selectedpoints.indexOf(Mt)>-1:!1}function wt(Wt,Ft){var xt=[],yt,Et,Mt,Nt;for(Nt=0;Nt0&&xt.push(yt);if(xt.length===1&&(Mt=xt[0]===Ft.searchInfo,Mt&&(Et=Ft.searchInfo.cd[0].trace,Et.selectedpoints.length===Ft.pointNumbers.length))){for(Nt=0;Nt1||(Ft+=yt.selectedpoints.length,Ft>1)))return!1;return Ft===1}function bt(Wt,Ft,xt){var yt;for(yt=0;yt-1&&Ft;if(!Nt&&Ft){var rn=$t(Wt,!0);if(rn.length){var Cn=rn[0].xref,En=rn[0].yref;if(Cn&&En){var Tr=de(rn),Cr=Se([L(Wt,Cn,"x"),L(Wt,En,"y")]);Cr(Pr,Tr)}}Wt._fullLayout._noEmitSelectedAtStart?Wt._fullLayout._noEmitSelectedAtStart=!1:cn&&Xt(Wt,Pr),Le._reselect=!1}if(!Nt&&Le._deselect){var Wr=Le._deselect;jt=Wr.xref,ie=Wr.yref,It(jt,ie,be)||re(Wt,jt,ie,yt),cn&&(Pr.points.length?Xt(Wt,Pr):Jt(Wt)),Le._deselect=!1}return{eventData:Pr,selectionTesters:xt}}function Vt(Wt){var Ft=Wt.calcdata;if(Ft)for(var xt=0;xt0?u+m:m;return{ppad:m,ppadplus:v?d:w,ppadminus:v?w:d}}else return{ppad:m}}function r(e,a,n,f,c){var l=e.type==="category"||e.type==="multicategory"?e.r2c:e.d2c;if(a!==void 0)return[l(a),l(n)];if(f){var m=1/0,v=-1/0,b=f.match(i.segmentRE),u,o,d,w,A;for(e.type==="date"&&(l=S.decodeDate(l)),u=0;uv&&(v=A)));if(v>=m)return[m,v]}}},85448:function(G){G.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},43712:function(G,U,t){var g=t(3400),C=t(54460),i=t(51272),S=t(46056),x=t(65152);G.exports=function(e,a){i(e,a,{name:"shapes",handleItemDefaults:p})};function h(r,e){return r?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}function p(r,e,a){function n(J,X){return g.coerce(r,e,S,J,X)}e._isShape=!0;var f=n("visible");if(f){var c=n("showlegend");c&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),g.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var l=n("path"),m=l?"path":"rect",v=n("type",m),b=v!=="path";b&&delete e.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var u=n("line.width");u&&(n("line.color"),n("line.dash"));for(var o=n("xsizemode"),d=n("ysizemode"),w=["x","y"],A=0;A<2;A++){var _=w[A],y=_+"anchor",E=_==="x"?o:d,T={_fullLayout:a},s,L,M,z=C.coerceRef(r,e,T,_,void 0,"paper"),D=C.getRefType(z);if(D==="range"?(s=C.getFromId(T,z),s._shapeIndices.push(e._index),M=x.rangeToShapePosition(s),L=x.shapePositionToRange(s)):L=M=g.identity,b){var N=.25,I=.75,k=_+"0",B=_+"1",O=r[k],H=r[B];r[k]=L(r[k],!0),r[B]=L(r[B],!0),E==="pixel"?(n(k,0),n(B,10)):(C.coercePosition(e,T,n,z,k,N),C.coercePosition(e,T,n,z,B,I)),e[k]=M(e[k]),e[B]=M(e[B]),r[k]=O,r[B]=H}if(E==="pixel"){var Y=r[y];r[y]=L(r[y],!0),C.coercePosition(e,T,n,z,y,.25),e[y]=M(e[y]),r[y]=Y}}b&&g.noneOrAll(r,e,["x0","x1","y0","y1"]);var j=v==="line",et,it;if(b&&(et=n("label.texttemplate")),et||(it=n("label.text")),it||et){n("label.textangle");var ut=n("label.textposition",j?"middle":"middle center");n("label.xanchor"),n("label.yanchor",h(j,ut)),n("label.padding"),g.coerceFont(n,"label.font",a.font)}}}},60728:function(G,U,t){var g=t(3400),C=t(54460),i=t(72736),S=t(43616),x=t(9856).readPaths,h=t(65152),p=h.getPathString,r=t(97728),e=t(84284).FROM_TL;G.exports=function(c,l,m,v){if(v.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var b;if(m.label.texttemplate){var u={};if(m.type!=="path"){var o=C.getFromId(c,m.xref),d=C.getFromId(c,m.yref);for(var w in r){var A=r[w](m,o,d);A!==void 0&&(u[w]=A)}}b=g.texttemplateStringForShapes(m.label.texttemplate,{},c._fullLayout._d3locale,u)}else b=m.label.text;var _={"data-index":l},y=m.label.font,E={"data-notex":1},T=v.append("g").attr(_).classed("shape-label",!0),s=T.append("text").attr(E).classed("shape-label-text",!0).text(b),L,M,z,D;if(m.path){var N=p(c,m),I=x(N,c);L=1/0,z=1/0,M=-1/0,D=-1/0;for(var k=0;k=f?v=c-m:v=m-c,-180/Math.PI*Math.atan2(v,b)}function n(f,c,l,m,v,b,u){var o=v.label.textposition,d=v.label.textangle,w=v.label.padding,A=v.type,_=Math.PI/180*b,y=Math.sin(_),E=Math.cos(_),T=v.label.xanchor,s=v.label.yanchor,L,M,z,D;if(A==="line"){o==="start"?(L=f,M=c):o==="end"?(L=l,M=m):(L=(f+l)/2,M=(c+m)/2),T==="auto"&&(o==="start"?d==="auto"?l>f?T="left":lf?T="right":lf?T="right":lf?T="left":l1&&!(mt.length===2&&mt[1][0]==="Z")&&(J===0&&(mt[0][0]="M"),L[ut]=mt,I(),k())}}function nt(mt,Lt){if(mt===2){ut=+Lt.srcElement.getAttribute("data-i"),J=+Lt.srcElement.getAttribute("data-j");var Ht=L[ut];!b(Ht)&&!u(Ht)&&st()}}function ct(mt){et=[];for(var Lt=0;LtI&&xt>k&&!Jt.shiftKey?f.getCursor(yt/Ft,1-Et/xt):"move";c(L,Mt),It=Mt.split("-")[0]}}function le(Jt){u(s)||(B&&(X=mt(M.xanchor)),O&&(tt=Lt(M.yanchor)),M.type==="path"?gt=M.path:(et=B?M.x0:mt(M.x0),it=O?M.y0:Lt(M.y0),ut=B?M.x1:mt(M.x1),J=O?M.y1:Lt(M.y1)),etJ?(V=it,Z="y0",Q=J,st="y1"):(V=J,Z="y1",Q=it,st="y0"),$t(Jt),ne(D,M),Xt(L,M,s),Vt.moveFn=It==="move"?xe:Se,Vt.altKey=Jt.altKey)}function he(){u(s)||(c(L),zt(D),w(L,s,M),C.call("_guiRelayout",s,N.getUpdateObj()))}function de(){u(s)||zt(D)}function xe(Jt,Wt){if(M.type==="path"){var Ft=function(Et){return Et},xt=Ft,yt=Ft;B?j("xanchor",M.xanchor=Ht(X+Jt)):(xt=function(Mt){return Ht(mt(Mt)+Jt)},wt&&wt.type==="date"&&(xt=m.encodeDate(xt))),O?j("yanchor",M.yanchor=Ut(tt+Wt)):(yt=function(Mt){return Ut(Lt(Mt)+Wt)},bt&&bt.type==="date"&&(yt=m.encodeDate(yt))),j("path",M.path=_(gt,xt,yt))}else B?j("xanchor",M.xanchor=Ht(X+Jt)):(j("x0",M.x0=Ht(et+Jt)),j("x1",M.x1=Ht(ut+Jt))),O?j("yanchor",M.yanchor=Ut(tt+Wt)):(j("y0",M.y0=Ut(it+Wt)),j("y1",M.y1=Ut(J+Wt)));L.attr("d",v(s,M)),ne(D,M),p(s,z,M,Tt)}function Se(Jt,Wt){if(Y){var Ft=function(pe){return pe},xt=Ft,yt=Ft;B?j("xanchor",M.xanchor=Ht(X+Jt)):(xt=function(Xe){return Ht(mt(Xe)+Jt)},wt&&wt.type==="date"&&(xt=m.encodeDate(xt))),O?j("yanchor",M.yanchor=Ut(tt+Wt)):(yt=function(Xe){return Ut(Lt(Xe)+Wt)},bt&&bt.type==="date"&&(yt=m.encodeDate(yt))),j("path",M.path=_(gt,xt,yt))}else if(H){if(It==="resize-over-start-point"){var Et=et+Jt,Mt=O?it-Wt:it+Wt;j("x0",M.x0=B?Et:Ht(Et)),j("y0",M.y0=O?Mt:Ut(Mt))}else if(It==="resize-over-end-point"){var Nt=ut+Jt,jt=O?J-Wt:J+Wt;j("x1",M.x1=B?Nt:Ht(Nt)),j("y1",M.y1=O?jt:Ut(jt))}}else{var ie=function(pe){return It.indexOf(pe)!==-1},me=ie("n"),be=ie("s"),ve=ie("w"),Le=ie("e"),ce=me?V+Wt:V,Te=be?Q+Wt:Q,Be=ve?ot+Jt:ot,ir=Le?$+Jt:$;O&&(me&&(ce=V-Wt),be&&(Te=Q-Wt)),(!O&&Te-ce>k||O&&ce-Te>k)&&(j(Z,M[Z]=O?ce:Ut(ce)),j(st,M[st]=O?Te:Ut(Te))),ir-Be>I&&(j(nt,M[nt]=B?Be:Ht(Be)),j(ct,M[ct]=B?ir:Ht(ir)))}L.attr("d",v(s,M)),ne(D,M),p(s,z,M,Tt)}function ne(Jt,Wt){(B||O)&&Ft();function Ft(){var xt=Wt.type!=="path",yt=Jt.selectAll(".visual-cue").data([0]),Et=1;yt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Et}).classed("visual-cue",!0);var Mt=mt(B?Wt.xanchor:i.midRange(xt?[Wt.x0,Wt.x1]:m.extractPathCoords(Wt.path,l.paramIsX))),Nt=Lt(O?Wt.yanchor:i.midRange(xt?[Wt.y0,Wt.y1]:m.extractPathCoords(Wt.path,l.paramIsY)));if(Mt=m.roundPositionForSharpStrokeRendering(Mt,Et),Nt=m.roundPositionForSharpStrokeRendering(Nt,Et),B&&O){var jt="M"+(Mt-1-Et)+","+(Nt-1-Et)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";yt.attr("d",jt)}else if(B){var ie="M"+(Mt-1-Et)+","+(Nt-9-Et)+"v18 h2 v-18 Z";yt.attr("d",ie)}else{var me="M"+(Mt-9-Et)+","+(Nt-1-Et)+"h18 v2 h-18 Z";yt.attr("d",me)}}}function zt(Jt){Jt.selectAll(".visual-cue").remove()}function Xt(Jt,Wt,Ft){var xt=Wt.xref,yt=Wt.yref,Et=S.getFromId(Ft,xt),Mt=S.getFromId(Ft,yt),Nt="";xt!=="paper"&&!Et.autorange&&(Nt+=xt),yt!=="paper"&&!Mt.autorange&&(Nt+=yt),a.setClipUrl(Jt,Nt?"clip"+Ft._fullLayout._uid+Nt:null,Ft)}}function _(s,L,M){return s.replace(l.segmentRE,function(z){var D=0,N=z.charAt(0),I=l.paramIsX[N],k=l.paramIsY[N],B=l.numParams[N],O=z.substr(1).replace(l.paramRE,function(H){return D>=B||(I[D]?H=L(H):k[D]&&(H=M(H)),D++),H});return N+O})}function y(s,L){if(o(s)){var M=L.node(),z=+M.getAttribute("data-index");if(z>=0){if(z===s._fullLayout._activeShapeIndex){E(s);return}s._fullLayout._activeShapeIndex=z,s._fullLayout._deactivateShape=E,b(s)}}}function E(s){if(o(s)){var L=s._fullLayout._activeShapeIndex;L>=0&&(r(s),delete s._fullLayout._activeShapeIndex,b(s))}}function T(s){if(o(s)){r(s);var L=s._fullLayout._activeShapeIndex,M=(s.layout||{}).shapes||[];if(L0&&du&&(d="X"),d});return l>u&&(o=o.replace(/[\s,]*X.*/,""),C.log("Ignoring extra params in segment "+c)),m+o})}},41592:function(G,U,t){var g=t(4016);G.exports={moduleType:"component",name:"shapes",layoutAttributes:t(46056),supplyLayoutDefaults:t(43712),supplyDrawNewShapeDefaults:t(65144),includeBasePlot:t(36632)("shapes"),calcAutorange:t(96084),draw:g.draw,drawOne:g.drawOne}},97728:function(G){function U(c,l){return l?l.d2l(c):c}function t(c,l){return l?l.l2d(c):c}function g(c){return c.x0}function C(c){return c.x1}function i(c){return c.y0}function S(c){return c.y1}function x(c,l){return U(c.x1,l)-U(c.x0,l)}function h(c,l,m){return U(c.y1,m)-U(c.y0,m)}function p(c,l){return Math.abs(x(c,l))}function r(c,l,m){return Math.abs(h(c,l,m))}function e(c,l,m){return c.type!=="line"?void 0:Math.sqrt(Math.pow(x(c,l),2)+Math.pow(h(c,l,m),2))}function a(c,l){return t((U(c.x1,l)+U(c.x0,l))/2,l)}function n(c,l,m){return t((U(c.y1,m)+U(c.y0,m))/2,m)}function f(c,l,m){return c.type!=="line"?void 0:h(c,l,m)/x(c,l)}G.exports={x0:g,x1:C,y0:i,y1:S,slope:f,dx:x,dy:h,width:p,height:r,length:e,xcenter:a,ycenter:n}},89861:function(G,U,t){var g=t(25376),C=t(66741),i=t(92880).extendDeepAll,S=t(67824).overrideAll,x=t(85656),h=t(31780).templatedArray,p=t(60876),r=h("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});G.exports=S(h("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:r,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(C({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:x.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:g({})},font:g({}),activebgcolor:{valType:"color",dflt:p.gripBgActiveColor},bgcolor:{valType:"color",dflt:p.railBgColor},bordercolor:{valType:"color",dflt:p.railBorderColor},borderwidth:{valType:"number",min:0,dflt:p.railBorderWidth},ticklen:{valType:"number",min:0,dflt:p.tickLength},tickcolor:{valType:"color",dflt:p.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:p.minorTickLength}}),"arraydraw","from-root")},60876:function(G){G.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(G,U,t){var g=t(3400),C=t(51272),i=t(89861),S=t(60876),x=S.name,h=i.steps;G.exports=function(a,n){C(a,n,{name:x,handleItemDefaults:p})};function p(e,a,n){function f(d,w){return g.coerce(e,a,i,d,w)}for(var c=C(e,a,{name:"steps",handleItemDefaults:r}),l=0,m=0;m0?[0]:[]);Y.enter().append("g").classed(e.containerClassName,!0).style("cursor",B?null:"ew-resize");function j(J){J._commandObserver&&(J._commandObserver.remove(),delete J._commandObserver),C.autoMargin(k,l(J))}if(Y.exit().each(function(){g.select(this).selectAll("g."+e.groupClassName).each(j)}).remove(),H.length!==0){var et=Y.selectAll("g."+e.groupClassName).data(H,v);et.enter().append("g").classed(e.groupClassName,!0),et.exit().each(j).remove();for(var it=0;it0&&(et=et.transition().duration(k.transition.duration).ease(k.transition.easing)),et.attr("transform",h(j-e.gripWidth*.5,k._dims.currentValueTotalHeight))}}function M(I,k){var B=I._dims;return B.inputAreaStart+e.stepInset+(B.inputAreaLength-2*e.stepInset)*Math.min(1,Math.max(0,k))}function z(I,k){var B=I._dims;return Math.min(1,Math.max(0,(k-e.stepInset-B.inputAreaStart)/(B.inputAreaLength-2*e.stepInset-2*B.inputAreaStart)))}function D(I,k,B){var O=B._dims,H=x.ensureSingle(I,"rect",e.railTouchRectClass,function(Y){Y.call(E,k,I,B).style("pointer-events","all")});H.attr({width:O.inputAreaLength,height:Math.max(O.inputAreaWidth,e.tickOffset+B.ticklen+O.labelHeight)}).call(i.fill,B.bgcolor).attr("opacity",0),S.setTranslate(H,0,O.currentValueTotalHeight)}function N(I,k){var B=k._dims,O=B.inputAreaLength-e.railInset*2,H=x.ensureSingle(I,"rect",e.railRectClass);H.attr({width:O,height:e.railWidth,rx:e.railRadius,ry:e.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,k.bordercolor).call(i.fill,k.bgcolor).style("stroke-width",k.borderwidth+"px"),S.setTranslate(H,e.railInset,(B.inputAreaWidth-e.railWidth)*.5+B.currentValueTotalHeight)}},97544:function(G,U,t){var g=t(60876);G.exports={moduleType:"component",name:g.name,layoutAttributes:t(89861),supplyLayoutDefaults:t(8132),draw:t(79664)}},81668:function(G,U,t){var g=t(33428),C=t(38248),i=t(7316),S=t(24040),x=t(3400),h=x.strTranslate,p=t(43616),r=t(76308),e=t(72736),a=t(13448),n=t(84284).OPPOSITE_SIDE,f=/ [XY][0-9]* /;function c(l,m,v){var b=v.propContainer,u=v.propName,o=v.placeholder,d=v.traceIndex,w=v.avoid||{},A=v.attributes,_=v.transform,y=v.containerGroup,E=l._fullLayout,T=1,s=!1,L=b.title,M=(L&&L.text?L.text:"").trim(),z=L&&L.font?L.font:{},D=z.family,N=z.size,I=z.color,k;u==="title.text"?k="titleText":u.indexOf("axis")!==-1?k="axisTitleText":u.indexOf("colorbar"!==-1)&&(k="colorbarTitleText");var B=l._context.edits[k];M===""?T=0:M.replace(f," % ")===o.replace(f," % ")&&(T=.2,s=!0,B||(M="")),v._meta?M=x.templateString(M,v._meta):E._meta&&(M=x.templateString(M,E._meta));var O=M||B,H;y||(y=x.ensureSingle(E._infolayer,"g","g-"+m),H=E._hColorbarMoveTitle);var Y=y.selectAll("text").data(O?[0]:[]);if(Y.enter().append("text"),Y.text(M).attr("class",m),Y.exit().remove(),!O)return y;function j(J){x.syncOrAsync([et,it],J)}function et(J){var X;return!_&&H&&(_={}),_?(X="",_.rotate&&(X+="rotate("+[_.rotate,A.x,A.y]+")"),(_.offset||H)&&(X+=h(0,(_.offset||0)-(H||0)))):X=null,J.attr("transform",X),J.style({"font-family":D,"font-size":g.round(N,2)+"px",fill:r.rgb(I),opacity:T*r.opacity(I),"font-weight":i.fontWeight}).attr(A).call(e.convertToTspans,l),i.previousPromises(l)}function it(J){var X=g.select(J.node().parentNode);if(w&&w.selection&&w.side&&M){X.attr("transform",null);var tt=n[w.side],V=w.side==="left"||w.side==="top"?-1:1,Q=C(w.pad)?w.pad:2,ot=p.bBox(X.node()),$={t:0,b:0,l:0,r:0},Z=l._fullLayout._reservedMargin;for(var st in Z)for(var nt in Z[st]){var ct=Z[st][nt];$[nt]=Math.max($[nt],ct)}var gt={left:$.l,top:$.t,right:E.width-$.r,bottom:E.height-$.b},Tt=w.maxShift||V*(gt[w.side]-ot[w.side]),wt=0;if(Tt<0)wt=Tt;else{var Rt=w.offsetLeft||0,bt=w.offsetTop||0;ot.left-=Rt,ot.right-=Rt,ot.top-=bt,ot.bottom-=bt,w.selection.each(function(){var mt=p.bBox(this);x.bBoxIntersect(ot,mt,Q)&&(wt=Math.max(wt,V*(mt[w.side]-ot[tt])+Q))}),wt=Math.min(Tt,wt),b._titleScoot=Math.abs(wt)}if(wt>0||Tt<0){var At={left:[-wt,0],right:[wt,0],top:[0,-wt],bottom:[0,wt]}[w.side];X.attr("transform",h(At[0],At[1]))}}}Y.call(j);function ut(){T=0,s=!0,Y.text(o).on("mouseover.opacity",function(){g.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){g.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}return B&&(M?Y.on(".opacity",null):ut(),Y.call(e.makeEditable,{gd:l}).on("edit",function(J){d!==void 0?S.call("_guiRestyle",l,u,J,d):S.call("_guiRelayout",l,u,J)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(j)}).on("input",function(J){this.text(J||" ").call(e.positionText,A.x,A.y)})),Y.classed("js-placeholder",s),y}G.exports={draw:c}},88444:function(G,U,t){var g=t(25376),C=t(22548),i=t(92880).extendFlat,S=t(67824).overrideAll,x=t(66741),h=t(31780).templatedArray,p=h("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});G.exports=S(h("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:p,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(x({editType:"arraydraw"}),{}),font:g({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:C.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(G){G.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},91384:function(G,U,t){var g=t(3400),C=t(51272),i=t(88444),S=t(73712),x=S.name,h=i.buttons;G.exports=function(a,n){var f={name:x,handleItemDefaults:p};C(a,n,f)};function p(e,a,n){function f(m,v){return g.coerce(e,a,i,m,v)}var c=C(e,a,{name:"buttons",handleItemDefaults:r}),l=f("visible",c.length>0);l&&(f("active"),f("direction"),f("type"),f("showactive"),f("x"),f("y"),g.noneOrAll(e,a,["x","y"]),f("xanchor"),f("yanchor"),f("pad.t"),f("pad.r"),f("pad.b"),f("pad.l"),g.coerceFont(f,"font",n.font),f("bgcolor",n.paper_bgcolor),f("bordercolor"),f("borderwidth"))}function r(e,a){function n(c,l){return g.coerce(e,a,h,c,l)}var f=n("visible",e.method==="skip"||Array.isArray(e.args));f&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}},14420:function(G,U,t){var g=t(33428),C=t(7316),i=t(76308),S=t(43616),x=t(3400),h=t(72736),p=t(31780).arrayEditor,r=t(84284).LINE_SPACING,e=t(73712),a=t(37400);G.exports=function(z){var D=z._fullLayout,N=x.filterVisible(D[e.name]);function I(it){C.autoMargin(z,T(it))}var k=D._menulayer.selectAll("g."+e.containerClassName).data(N.length>0?[0]:[]);if(k.enter().append("g").classed(e.containerClassName,!0).style("cursor","pointer"),k.exit().each(function(){g.select(this).selectAll("g."+e.headerGroupClassName).each(I)}).remove(),N.length!==0){var B=k.selectAll("g."+e.headerGroupClassName).data(N,n);B.enter().append("g").classed(e.headerGroupClassName,!0);for(var O=x.ensureSingle(k,"g",e.dropdownButtonGroupClassName,function(it){it.style("pointer-events","all")}),H=0;HA,z=x.barLength+2*x.barPad,D=x.barWidth+2*x.barPad,N=c,I=m+v;I+D>f&&(I=f-D);var k=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);k.exit().on(".drag",null).remove(),k.enter().append("rect").classed("scrollbar-horizontal",!0).call(C.fill,x.barColor),M?(this.hbar=k.attr({rx:x.barRadius,ry:x.barRadius,x:N,y:I,width:z,height:D}),this._hbarXMin=N+z/2,this._hbarTranslateMax=A-z):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var B=v>_,O=x.barWidth+2*x.barPad,H=x.barLength+2*x.barPad,Y=c+l,j=m;Y+O>n&&(Y=n-O);var et=this.container.selectAll("rect.scrollbar-vertical").data(B?[0]:[]);et.exit().on(".drag",null).remove(),et.enter().append("rect").classed("scrollbar-vertical",!0).call(C.fill,x.barColor),B?(this.vbar=et.attr({rx:x.barRadius,ry:x.barRadius,x:Y,y:j,width:O,height:H}),this._vbarYMin=j+H/2,this._vbarTranslateMax=_-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var it=this.id,ut=y-.5,J=B?E+O+.5:E+.5,X=T-.5,tt=M?s+D+.5:s+.5,V=a._topdefs.selectAll("#"+it).data(M||B?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",it).append("rect"),M||B?(this._clipRect=V.select("rect").attr({x:Math.floor(ut),y:Math.floor(X),width:Math.ceil(J)-Math.floor(ut),height:Math.ceil(tt)-Math.floor(X)}),this.container.call(i.setClipUrl,it,this.gd),this.bg.attr({x:c,y:m,width:l,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||B){var Q=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Q);var ot=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault(),g.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(ot),B&&this.vbar.on(".drag",null).call(ot)}this.setTranslate(r,e)},x.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},x.prototype._onBoxDrag=function(){var p=this.translateX,r=this.translateY;this.hbar&&(p-=g.event.dx),this.vbar&&(r-=g.event.dy),this.setTranslate(p,r)},x.prototype._onBoxWheel=function(){var p=this.translateX,r=this.translateY;this.hbar&&(p+=g.event.deltaY),this.vbar&&(r+=g.event.deltaY),this.setTranslate(p,r)},x.prototype._onBarDrag=function(){var p=this.translateX,r=this.translateY;if(this.hbar){var e=p+this._hbarXMin,a=e+this._hbarTranslateMax,n=S.constrain(g.event.x,e,a),f=(n-e)/(a-e),c=this.position.w-this._box.w;p=f*c}if(this.vbar){var l=r+this._vbarYMin,m=l+this._vbarTranslateMax,v=S.constrain(g.event.y,l,m),b=(v-l)/(m-l),u=this.position.h-this._box.h;r=b*u}this.setTranslate(p,r)},x.prototype.setTranslate=function(p,r){var e=this.position.w-this._box.w,a=this.position.h-this._box.h;if(p=S.constrain(p||0,0,e),r=S.constrain(r||0,0,a),this.translateX=p,this.translateY=r,this.container.call(i.setTranslate,this._box.l-this.position.l-p,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+p-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var n=p/e;this.hbar.call(i.setTranslate,p+n*this._hbarTranslateMax,r)}if(this.vbar){var f=r/a;this.vbar.call(i.setTranslate,p,r+f*this._vbarTranslateMax)}}},84284:function(G){G.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},36208:function(G){G.exports={axisRefDescription:function(U,t,g){return["If set to a",U,"axis id (e.g. *"+U+"* or","*"+U+"2*), the `"+U+"` position refers to a",U,"coordinate. If set to *paper*, the `"+U+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+g+"). If set to a",U,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+U+"2 domain* refers to the domain of the second",U," axis and a",U,"position of 0.5 refers to the","point between the",t,"and the",g,"of the domain of the","second",U,"axis."].join(" ")}}},48164:function(G){G.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},26880:function(G){G.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},69104:function(G){G.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(G){G.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87792:function(G){G.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},13448:function(G){G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(G){G.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},2264:function(G,U){U.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],U.STYLE=U.CSS_DECLARATIONS.map(function(t){return t.join(": ")+"; "}).join("")},9616:function(G,U){U.xmlns="http://www.w3.org/2000/xmlns/",U.svg="http://www.w3.org/2000/svg",U.xlink="http://www.w3.org/1999/xlink",U.svgAttrs={xmlns:U.svg,"xmlns:xlink":U.xlink}},64884:function(G,U,t){U.version=t(25788).version,t(88324),t(79288);for(var g=t(24040),C=U.register=g.register,i=t(22448),S=Object.keys(i),x=0;x",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},98308:function(G,U){U.isLeftAnchor=function(g){return g.xanchor==="left"||g.xanchor==="auto"&&g.x<=.3333333333333333},U.isCenterAnchor=function(g){return g.xanchor==="center"||g.xanchor==="auto"&&g.x>.3333333333333333&&g.x<.6666666666666666},U.isRightAnchor=function(g){return g.xanchor==="right"||g.xanchor==="auto"&&g.x>=.6666666666666666},U.isTopAnchor=function(g){return g.yanchor==="top"||g.yanchor==="auto"&&g.y>=.6666666666666666},U.isMiddleAnchor=function(g){return g.yanchor==="middle"||g.yanchor==="auto"&&g.y>.3333333333333333&&g.y<.6666666666666666},U.isBottomAnchor=function(g){return g.yanchor==="bottom"||g.yanchor==="auto"&&g.y<=.3333333333333333}},11864:function(G,U,t){var g=t(20435),C=g.mod,i=g.modHalf,S=Math.PI,x=2*S;function h(b){return b/180*S}function p(b){return b/S*180}function r(b){return Math.abs(b[1]-b[0])>x-1e-14}function e(b,u){return i(u-b,x)}function a(b,u){return Math.abs(e(b,u))}function n(b,u){if(r(u))return!0;var o,d;u[0]d&&(d+=x);var w=C(b,x),A=w+x;return w>=o&&w<=d||A>=o&&A<=d}function f(b,u,o,d){if(!n(u,d))return!1;var w,A;return o[0]=w&&b<=A}function c(b,u,o,d,w,A,_){w=w||0,A=A||0;var y=r([o,d]),E,T,s,L,M;y?(E=0,T=S,s=x):o"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};e.uint8c=e.u1c,e.uint8=e.u1,e.int8=e.i1,e.uint16=e.u2,e.int16=e.i2,e.uint32=e.u4,e.int32=e.i4,e.float32=e.f4,e.float64=e.f8;function a(c){return c.constructor===ArrayBuffer}U.isArrayBuffer=a,U.decodeTypedArraySpec=function(c){var l=[],m=n(c),v=m.dtype,b=e[v];if(!b)throw new Error('Error in dtype: "'+v+'"');var u=b.BYTES_PER_ELEMENT,o=m.bdata;a(o)||(o=g(o));var d=m.shape===void 0?[o.byteLength/u]:(""+m.shape).split(",");d.reverse();var w=d.length,A,_,y=+d[0],E=u*y,T=0;if(w===1)l=new b(o);else if(w===2)for(A=+d[1],_=0;_b.max?m.set(v):m.set(+l)}},integer:{coerceFunction:function(l,m,v,b){l%1||!g(l)||b.min!==void 0&&lb.max?m.set(v):m.set(+l)}},string:{coerceFunction:function(l,m,v,b){if(typeof l!="string"){var u=typeof l=="number";b.strict===!0||!u?m.set(v):m.set(String(l))}else b.noBlank&&!l?m.set(v):m.set(l)}},color:{coerceFunction:function(l,m,v){C(l).isValid()?m.set(l):m.set(v)}},colorlist:{coerceFunction:function(l,m,v){function b(u){return C(u).isValid()}!Array.isArray(l)||!l.length?m.set(v):l.every(b)?m.set(l):m.set(v)}},colorscale:{coerceFunction:function(l,m,v){m.set(S.get(l,v))}},angle:{coerceFunction:function(l,m,v){l==="auto"?m.set("auto"):g(l)?m.set(e(+l,360)):m.set(v)}},subplotid:{coerceFunction:function(l,m,v,b){var u=b.regex||r(v);if(typeof l=="string"&&u.test(l)){m.set(l);return}m.set(v)},validateFunction:function(l,m){var v=m.dflt;return l===v?!0:typeof l!="string"?!1:!!r(v).test(l)}},flaglist:{coerceFunction:function(l,m,v,b){if((b.extras||[]).indexOf(l)!==-1){m.set(l);return}if(typeof l!="string"){m.set(v);return}for(var u=l.split("+"),o=0;o=o&&I<=d?I:h}if(typeof I!="string"&&typeof I!="number")return h;I=String(I);var Y=b(k),j=I.charAt(0);Y&&(j==="G"||j==="g")&&(I=I.substr(1),k="");var et=Y&&k.substr(0,7)==="chinese",it=I.match(et?m:l);if(!it)return h;var ut=it[1],J=it[3]||"1",X=Number(it[5]||1),tt=Number(it[7]||0),V=Number(it[9]||0),Q=Number(it[11]||0);if(Y){if(ut.length===2)return h;ut=Number(ut);var ot;try{var $=f.getComponentMethod("calendars","getCal")(k);if(et){var Z=J.charAt(J.length-1)==="i";J=parseInt(J,10),ot=$.newDate(ut,$.toMonthIndex(ut,J,Z),X)}else ot=$.newDate(ut,Number(J),X)}catch{return h}return ot?(ot.toJD()-n)*p+tt*r+V*e+Q*a:h}ut.length===2?ut=(Number(ut)+2e3-v)%100+v:ut=Number(ut),J-=1;var st=new Date(Date.UTC(2e3,J,X,tt,V));return st.setUTCFullYear(ut),st.getUTCMonth()!==J||st.getUTCDate()!==X?h:st.getTime()+Q*a},o=U.MIN_MS=U.dateTime2ms("-9999"),d=U.MAX_MS=U.dateTime2ms("9999-12-31 23:59:59.9999"),U.isDateTime=function(I,k){return U.dateTime2ms(I,k)!==h};function w(I,k){return String(I+Math.pow(10,k)).substr(1)}var A=90*p,_=3*r,y=5*e;U.ms2DateTime=function(I,k,B){if(typeof I!="number"||!(I>=o&&I<=d))return h;k||(k=0);var O=Math.floor(S(I+.05,1)*10),H=Math.round(I-O/10),Y,j,et,it,ut,J;if(b(B)){var X=Math.floor(H/p)+n,tt=Math.floor(S(I,p));try{Y=f.getComponentMethod("calendars","getCal")(B).fromJD(X).formatDate("yyyy-mm-dd")}catch{Y=c("G%Y-%m-%d")(new Date(H))}if(Y.charAt(0)==="-")for(;Y.length<11;)Y="-0"+Y.substr(1);else for(;Y.length<10;)Y="0"+Y;j=k=o+p&&I<=d-p))return h;var k=Math.floor(S(I+.05,1)*10),B=new Date(Math.round(I-k/10)),O=g("%Y-%m-%d")(B),H=B.getHours(),Y=B.getMinutes(),j=B.getSeconds(),et=B.getUTCMilliseconds()*10+k;return E(O,H,Y,j,et)};function E(I,k,B,O,H){if((k||B||O||H)&&(I+=" "+w(k,2)+":"+w(B,2),(O||H)&&(I+=":"+w(O,2),H))){for(var Y=4;H%10===0;)Y-=1,H/=10;I+="."+w(H,Y)}return I}U.cleanDate=function(I,k,B){if(I===h)return k;if(U.isJSDate(I)||typeof I=="number"&&isFinite(I)){if(b(B))return i.error("JS Dates and milliseconds are incompatible with world calendars",I),k;if(I=U.ms2DateTimeLocal(+I),!I&&k!==void 0)return k}else if(!U.isDateTime(I,B))return i.error("unrecognized date",I),k;return I};var T=/%\d?f/g,s=/%h/g,L={1:"1",2:"1",3:"2",4:"2"};function M(I,k,B,O){I=I.replace(T,function(Y){var j=Math.min(+Y.charAt(1)||6,6),et=(k/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return et});var H=new Date(Math.floor(k+.05));if(I=I.replace(s,function(){return L[B("%q")(H)]}),b(O))try{I=f.getComponentMethod("calendars","worldCalFmt")(I,k,O)}catch{return"Invalid"}return B(I)(H)}var z=[59,59.9,59.99,59.999,59.9999];function D(I,k){var B=S(I+.05,p),O=w(Math.floor(B/r),2)+":"+w(S(Math.floor(B/e),60),2);if(k!=="M"){C(k)||(k=0);var H=Math.min(S(I/a,60),z[k]),Y=(100+H).toFixed(k).substr(1);k>0&&(Y=Y.replace(/0+$/,"").replace(/[\.]$/,"")),O+=":"+Y}return O}U.formatDate=function(I,k,B,O,H,Y){if(H=b(H)&&H,!k)if(B==="y")k=Y.year;else if(B==="m")k=Y.month;else if(B==="d")k=Y.dayMonth+` `+Y.year;else return D(I,B)+` -`+M(Y.dayMonthYear,I,O,H);return M(k,I,O,H)};var N=3*p;U.incrementMonth=function(I,k,B){B=b(B)&&B;var O=S(I,p);if(I=Math.round(I-O),B)try{var H=Math.round(I/p)+n,Y=f.getComponentMethod("calendars","getCal")(B),j=Y.fromJD(H);return k%12?Y.add(j,k,"m"):Y.add(j,k/12,"y"),(j.toJD()-n)*p+O}catch{i.error("invalid ms "+I+" in calendar "+B)}var et=new Date(I+N);return et.setUTCMonth(et.getUTCMonth()+k)+O-N},U.findExactDates=function(I,k){for(var B=0,O=0,H=0,Y=0,j,et,it=b(k)&&f.getComponentMethod("calendars","getCal")(k),ut=0;ut0&&D[N+1][0]<0)return N;return null}switch(y==="RUS"||y==="FJI"?T=function(D){var N;if(z(D)===null)N=D;else for(N=new Array(D.length),M=0;MN?I[k++]=[D[M][0]+360,D[M][1]]:M===N?(I[k++]=D[M],I[k++]=[D[M][0],-90]):I[k++]=D[M];var B=a.tester(I);B.pts.pop(),E.push(B)}:T=function(D){E.push(a.tester(D))},A.type){case"MultiPolygon":for(s=0;s<_.length;s++)for(L=0;L<_[s].length;L++)T(_[s][L]);break;case"Polygon":for(s=0;s<_.length;s++)T(_[s]);break}return E}function h(w){var A=w.geojson,_=window.PlotlyGeoAssets||{},y=typeof A=="string"?_[A]:A;return r(y)?y:(p.error("Oops ... something went wrong when fetching "+A),!1)}function b(w){var A=w[0].trace,_=h(A);if(!_)return!1;var y={},E=[],T;for(T=0;TE&&(E=L,_=s)}else _=A;return S.default(_).geometry.coordinates}function o(w){var A=window.PlotlyGeoAssets||{},_=[];function y(M){return new Promise(function(z,D){g.json(M,function(N,I){if(N){delete A[M];var k=N.status===404?'GeoJSON at URL "'+M+'" does not exist.':"Unexpected error while fetching from "+M;return D(new Error(k))}return A[M]=I,z(I)})})}function E(M){return new Promise(function(z,D){var N=0,I=setInterval(function(){if(A[M]&&A[M]!=="pending")return clearInterval(I),z(A[M]);if(N>100)return clearInterval(I),D("Unexpected error while fetching from "+M);N++},50)})}for(var T=0;T0&&(x.push(v),v=[])}return v.length>0&&x.push(v),x},U.makeLine=function(C){return C.length===1?{type:"LineString",coordinates:C[0]}:{type:"MultiLineString",coordinates:C}},U.makePolygon=function(C){if(C.length===1)return{type:"Polygon",coordinates:C};for(var i=new Array(C.length),S=0;S1||A<0||A>1?null:{x:p+m*A,y:r+u*A}}U.segmentDistance=function(r,e,a,n,f,c,l,m){if(C(r,e,a,n,f,c,l,m))return 0;var h=a-r,b=n-e,u=l-f,o=m-c,d=h*h+b*b,w=u*u+o*o,A=Math.min(i(h,b,d,f-r,c-e),i(h,b,d,l-r,m-e),i(u,o,w,r-f,e-c),i(u,o,w,a-f,n-c));return Math.sqrt(A)};function i(p,r,e,a,n){var f=a*p+n*r;if(f<0)return a*a+n*n;if(f>e){var c=a-p,l=n-r;return c*c+l*l}else{var m=a*r-n*p;return m*m/e}}var S,x,v;U.getTextLocation=function(r,e,a,n){if((r!==x||n!==v)&&(S={},x=r,v=n),S[a])return S[a];var f=r.getPointAtLength(g(a-n/2,e)),c=r.getPointAtLength(g(a+n/2,e)),l=Math.atan((c.y-f.y)/(c.x-f.x)),m=r.getPointAtLength(g(a,e)),h=(m.x*4+f.x+c.x)/6,b=(m.y*4+f.y+c.y)/6,u={x:h,y:b,theta:l};return S[a]=u,u},U.clearLocationCache=function(){x=null},U.getVisibleSegment=function(r,e,a){var n=e.left,f=e.right,c=e.top,l=e.bottom,m=0,h=r.getTotalLength(),b=h,u,o;function d(A){var _=r.getPointAtLength(A);A===0?u=_:A===h&&(o=_);var y=_.xf?_.x-f:0,E=_.yl?_.y-l:0;return Math.sqrt(y*y+E*E)}for(var w=d(m);w;){if(m+=w+a,m>b)return;w=d(m)}for(w=d(b);w;){if(b-=w+a,m>b)return;w=d(b)}return{min:m,max:b,len:b-m,total:h,isClosed:m===0&&b===h&&Math.abs(u.x-o.x)<.1&&Math.abs(u.y-o.y)<.1}},U.findPointOnPath=function(r,e,a,n){n=n||{};for(var f=n.pathLength||r.getTotalLength(),c=n.tolerance||.001,l=n.iterationLimit||30,m=r.getPointAtLength(0)[a]>r.getPointAtLength(f)[a]?-1:1,h=0,b=0,u=f,o,d,w;h0?u=o:b=o,h++}return d}},33040:function(G,U,t){var g=t(38248),C=t(49760),i=t(72160),S=t(8932),x=t(22548).defaultLine,v=t(38116).isArrayOrTypedArray,p=i(x),r=1;function e(l,m){var h=l;return h[3]*=m,h}function a(l){if(g(l))return p;var m=i(l);return m.length?m:p}function n(l){return g(l)?l:r}function f(l,m,h){var b=l.color;b&&b._inputArray&&(b=b._inputArray);var u=v(b),o=v(m),d=S.extractOpts(l),w=[],A,_,y,E,T;if(d.colorscale!==void 0?A=S.makeColorScaleFuncFromTrace(l):A=a,u?_=function(L,M){return L[M]===void 0?p:i(A(L[M]))}:_=a,o?y=function(L,M){return L[M]===void 0?r:n(L[M])}:y=n,u||o)for(var s=0;s1?(C*t+C*g)/C:t+g,S=String(i).length;if(S>16){var x=String(g).length,v=String(t).length;if(S>=v+x){var p=parseFloat(i).toPrecision(12);p.indexOf("e+")===-1&&(i=+p)}}return i}},3400:function(G,U,t){var g=t(33428),C=t(94336).E9,i=t(57624).E9,S=t(38248),x=t(39032),v=x.FP_SAFE,p=-v,r=x.BADNUM,e=G.exports={};e.adjustFormat=function(ot){return!ot||/^\d[.]\df/.test(ot)||/[.]\d%/.test(ot)?ot:ot==="0.f"?"~f":/^\d%/.test(ot)?"~%":/^\ds/.test(ot)?"~s":!/^[~,.0$]/.test(ot)&&/[&fps]/.test(ot)?"~"+ot:ot};var a={};e.warnBadFormat=function(Q){var ot=String(Q);a[ot]||(a[ot]=1,e.warn('encountered bad format: "'+ot+'"'))},e.noFormat=function(Q){return String(Q)},e.numberFormat=function(Q){var ot;try{ot=i(e.adjustFormat(Q))}catch{return e.warnBadFormat(Q),e.noFormat}return ot},e.nestedProperty=t(22296),e.keyedContainer=t(37804),e.relativeAttr=t(23193),e.isPlainObject=t(63620),e.toLogRange=t(36896),e.relinkPrivateKeys=t(51528);var n=t(38116);e.isArrayBuffer=n.isArrayBuffer,e.isTypedArray=n.isTypedArray,e.isArrayOrTypedArray=n.isArrayOrTypedArray,e.isArray1D=n.isArray1D,e.ensureArray=n.ensureArray,e.concat=n.concat,e.maxRowLength=n.maxRowLength,e.minRowLength=n.minRowLength;var f=t(20435);e.mod=f.mod,e.modHalf=f.modHalf;var c=t(63064);e.valObjectMeta=c.valObjectMeta,e.coerce=c.coerce,e.coerce2=c.coerce2,e.coerceFont=c.coerceFont,e.coercePattern=c.coercePattern,e.coerceHoverinfo=c.coerceHoverinfo,e.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,e.validate=c.validate;var l=t(67555);e.dateTime2ms=l.dateTime2ms,e.isDateTime=l.isDateTime,e.ms2DateTime=l.ms2DateTime,e.ms2DateTimeLocal=l.ms2DateTimeLocal,e.cleanDate=l.cleanDate,e.isJSDate=l.isJSDate,e.formatDate=l.formatDate,e.incrementMonth=l.incrementMonth,e.dateTick0=l.dateTick0,e.dfltRange=l.dfltRange,e.findExactDates=l.findExactDates,e.MIN_MS=l.MIN_MS,e.MAX_MS=l.MAX_MS;var m=t(14952);e.findBin=m.findBin,e.sorterAsc=m.sorterAsc,e.sorterDes=m.sorterDes,e.distinctVals=m.distinctVals,e.roundUp=m.roundUp,e.sort=m.sort,e.findIndexOfMin=m.findIndexOfMin,e.sortObjectKeys=t(95376);var h=t(63084);e.aggNums=h.aggNums,e.len=h.len,e.mean=h.mean,e.median=h.median,e.midRange=h.midRange,e.variance=h.variance,e.stdev=h.stdev,e.interp=h.interp;var b=t(52248);e.init2dArray=b.init2dArray,e.transposeRagged=b.transposeRagged,e.dot=b.dot,e.translationMatrix=b.translationMatrix,e.rotationMatrix=b.rotationMatrix,e.rotationXYMatrix=b.rotationXYMatrix,e.apply3DTransform=b.apply3DTransform,e.apply2DTransform=b.apply2DTransform,e.apply2DTransform2=b.apply2DTransform2,e.convertCssMatrix=b.convertCssMatrix,e.inverseTransformMatrix=b.inverseTransformMatrix;var u=t(11864);e.deg2rad=u.deg2rad,e.rad2deg=u.rad2deg,e.angleDelta=u.angleDelta,e.angleDist=u.angleDist,e.isFullCircle=u.isFullCircle,e.isAngleInsideSector=u.isAngleInsideSector,e.isPtInsideSector=u.isPtInsideSector,e.pathArc=u.pathArc,e.pathSector=u.pathSector,e.pathAnnulus=u.pathAnnulus;var o=t(98308);e.isLeftAnchor=o.isLeftAnchor,e.isCenterAnchor=o.isCenterAnchor,e.isRightAnchor=o.isRightAnchor,e.isTopAnchor=o.isTopAnchor,e.isMiddleAnchor=o.isMiddleAnchor,e.isBottomAnchor=o.isBottomAnchor;var d=t(92348);e.segmentsIntersect=d.segmentsIntersect,e.segmentDistance=d.segmentDistance,e.getTextLocation=d.getTextLocation,e.clearLocationCache=d.clearLocationCache,e.getVisibleSegment=d.getVisibleSegment,e.findPointOnPath=d.findPointOnPath;var w=t(92880);e.extendFlat=w.extendFlat,e.extendDeep=w.extendDeep,e.extendDeepAll=w.extendDeepAll,e.extendDeepNoArrays=w.extendDeepNoArrays;var A=t(24248);e.log=A.log,e.warn=A.warn,e.error=A.error;var _=t(53756);e.counterRegex=_.counter;var y=t(91200);e.throttle=y.throttle,e.throttleDone=y.done,e.clearThrottle=y.clear;var E=t(52200);e.getGraphDiv=E.getGraphDiv,e.isPlotDiv=E.isPlotDiv,e.removeElement=E.removeElement,e.addStyleRule=E.addStyleRule,e.addRelatedStyleRule=E.addRelatedStyleRule,e.deleteRelatedStyleRule=E.deleteRelatedStyleRule,e.getFullTransformMatrix=E.getFullTransformMatrix,e.getElementTransformMatrix=E.getElementTransformMatrix,e.getElementAndAncestors=E.getElementAndAncestors,e.equalDomRects=E.equalDomRects,e.clearResponsive=t(75352),e.preserveDrawingBuffer=t(34296),e.makeTraceGroups=t(30988),e._=t(98356),e.notifier=t(41792),e.filterUnique=t(68944),e.filterVisible=t(43880),e.pushUnique=t(52416),e.increment=t(1396),e.cleanNumber=t(54037),e.ensureNumber=function(ot){return S(ot)?(ot=Number(ot),ot>v||ot=ot?!1:S(Q)&&Q>=0&&Q%1===0},e.noop=t(16628),e.identity=t(35536),e.repeat=function(Q,ot){for(var $=new Array(ot),Z=0;Z$?Math.max($,Math.min(ot,Q)):Math.max(ot,Math.min($,Q))},e.bBoxIntersect=function(Q,ot,$){return $=$||0,Q.left<=ot.right+$&&ot.left<=Q.right+$&&Q.top<=ot.bottom+$&&ot.top<=Q.bottom+$},e.simpleMap=function(Q,ot,$,Z,st){for(var nt=Q.length,ct=new Array(nt),gt=0;gt=Math.pow(2,$)?st>10?(e.warn("randstr failed uniqueness"),ct):Q(ot,$,Z,(st||0)+1):ct},e.OptionControl=function(Q,ot){Q||(Q={}),ot||(ot="opt");var $={};return $.optionList=[],$._newoption=function(Z){Z[ot]=Q,$[Z.name]=Z,$.optionList.push(Z)},$["_"+ot]=Q,$},e.smooth=function(Q,ot){if(ot=Math.round(ot)||0,ot<2)return Q;var $=Q.length,Z=2*$,st=2*ot-1,nt=new Array(st),ct=new Array($),gt,Tt,wt,Rt;for(gt=0;gt=Z&&(wt-=Z*Math.floor(wt/Z)),wt<0?wt=-1-wt:wt>=$&&(wt=Z-1-wt),Rt+=Q[wt]*nt[Tt];ct[gt]=Rt}return ct},e.syncOrAsync=function(Q,ot,$){var Z,st;function nt(){return e.syncOrAsync(Q,ot,$)}for(;Q.length;)if(st=Q.splice(0,1)[0],Z=st(ot),Z&&Z.then)return Z.then(nt);return $&&$(ot)},e.stripTrailingSlash=function(Q){return Q.substr(-1)==="/"?Q.substr(0,Q.length-1):Q},e.noneOrAll=function(Q,ot,$){if(Q){var Z=!1,st=!0,nt,ct;for(nt=0;nt<$.length;nt++)ct=Q[$[nt]],ct!=null?Z=!0:st=!1;if(Z&&!st)for(nt=0;nt<$.length;nt++)Q[$[nt]]=ot[$[nt]]}},e.mergeArray=function(Q,ot,$,Z){var st=typeof Z=="function";if(e.isArrayOrTypedArray(Q))for(var nt=Math.min(Q.length,ot.length),ct=0;ct0?st:0})},e.fillArray=function(Q,ot,$,Z){if(Z=Z||e.identity,e.isArrayOrTypedArray(Q))for(var st=0;st1?st+ct[1]:"";if(nt&&(ct.length>1||gt.length>4||$))for(;Z.test(gt);)gt=gt.replace(Z,"$1"+nt+"$2");return gt+Tt},e.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var k=/^\w*$/;e.templateString=function(Q,ot){var $={};return Q.replace(e.TEMPLATE_STRING_REGEX,function(Z,st){var nt;return k.test(st)?nt=ot[st]:($[st]=$[st]||e.nestedProperty(ot,st).get,nt=$[st]()),e.isValidTextValue(nt)?nt:""})};var B={max:10,count:0,name:"hovertemplate"};e.hovertemplateString=function(){return it.apply(B,arguments)};var O={max:10,count:0,name:"texttemplate"};e.texttemplateString=function(){return it.apply(O,arguments)};var H=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Y(Q){var ot=Q.match(H);return ot?{key:ot[1],op:ot[2],number:Number(ot[3])}:{key:Q,op:null,number:null}}var j={max:10,count:0,name:"texttemplate",parseMultDiv:!0};e.texttemplateStringForShapes=function(){return it.apply(j,arguments)};var et=/^[:|\|]/;function it(Q,ot,$){var Z=this,st=arguments;ot||(ot={});var nt={};return Q.replace(e.TEMPLATE_STRING_REGEX,function(ct,gt,Tt){var wt=gt==="xother"||gt==="yother",Rt=gt==="_xother"||gt==="_yother",bt=gt==="_xother_"||gt==="_yother_",At=gt==="xother_"||gt==="yother_",mt=wt||Rt||At||bt,Lt=gt;(Rt||bt)&&(Lt=Lt.substring(1)),(At||bt)&&(Lt=Lt.substring(0,Lt.length-1));var Ht=null,Ut=null;if(Z.parseMultDiv){var kt=Y(Lt);Lt=kt.key,Ht=kt.op,Ut=kt.number}var Vt;if(mt){if(Vt=ot[Lt],Vt===void 0)return""}else{var It,re;for(re=3;re=ut&&ct<=J,wt=gt>=ut&><=J;if(Tt&&(Z=10*Z+ct-ut),wt&&(st=10*st+gt-ut),!Tt||!wt){if(Z!==st)return Z-st;if(ct!==gt)return ct-gt}}return st-Z};var X=2e9;e.seedPseudoRandom=function(){X=2e9},e.pseudoRandom=function(){var Q=X;return X=(69069*X+1)%4294967296,Math.abs(X-Q)<429496729?e.pseudoRandom():X/4294967296},e.fillText=function(Q,ot,$){var Z=Array.isArray($)?function(ct){$.push(ct)}:function(ct){$.text=ct},st=e.extractOption(Q,ot,"htx","hovertext");if(e.isValidTextValue(st))return Z(st);var nt=e.extractOption(Q,ot,"tx","text");if(e.isValidTextValue(nt))return Z(nt)},e.isValidTextValue=function(Q){return Q||Q===0},e.formatPercent=function(Q,ot){ot=ot||0;for(var $=(Math.round(100*Q*Math.pow(10,ot))*Math.pow(.1,ot)).toFixed(ot)+"%",Z=0;Z1&&(wt=1):wt=0,e.strTranslate(st-wt*($+ct),nt-wt*(Z+gt))+e.strScale(wt)+(Tt?"rotate("+Tt+(ot?"":" "+$+" "+Z)+")":"")},e.setTransormAndDisplay=function(Q,ot){Q.attr("transform",e.getTextTransform(ot)),Q.style("display",ot.scale?null:"none")},e.ensureUniformFontSize=function(Q,ot){var $=e.extendFlat({},ot);return $.size=Math.max(ot.size,Q._fullLayout.uniformtext.minsize||0),$},e.join2=function(Q,ot,$){var Z=Q.length;return Z>1?Q.slice(0,-1).join(ot)+$+Q[Z-1]:Q.join(ot)},e.bigFont=function(Q){return Math.round(1.2*Q)};var tt=e.getFirefoxVersion(),V=tt!==null&&tt<86;e.getPositionFromD3Event=function(){return V?[g.event.layerX,g.event.layerY]:[g.event.offsetX,g.event.offsetY]}},63620:function(G){G.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},37804:function(G,U,t){var g=t(22296),C=/^\w*$/,i=0,S=1,x=2,v=3,p=4;G.exports=function(e,a,n,f){n=n||"name",f=f||"value";var c,l,m,h={};a&&a.length?(m=g(e,a),l=m.get()):l=e,a=a||"";var b={};if(l)for(c=0;c2)return h[w]=h[w]|x,o.set(d,null);if(u){for(c=w;c1){var x=["LOG:"];for(S=0;S1){var v=[];for(S=0;S"),"long")}},i.warn=function(){var S;if(g.logging>0){var x=["WARN:"];for(S=0;S0){var v=[];for(S=0;S"),"stick")}},i.error=function(){var S;if(g.logging>0){var x=["ERROR:"];for(S=0;S0){var v=[];for(S=0;S"),"stick")}}},30988:function(G,U,t){var g=t(33428);G.exports=function(i,S,x){var v=i.selectAll("g."+x.replace(/\s/g,".")).data(S,function(r){return r[0].trace.uid});v.exit().remove(),v.enter().append("g").attr("class",x),v.order();var p=i.classed("rangeplot")?"nodeRangePlot3":"node3";return v.each(function(r){r[0][p]=g.select(this)}),v}},52248:function(G,U,t){var g=t(36524);U.init2dArray=function(C,i){for(var S=new Array(C),x=0;xC/2?g-Math.round(g/C)*C:g}G.exports={mod:U,modHalf:t}},22296:function(G,U,t){var g=t(38248),C=t(38116).isArrayOrTypedArray;G.exports=function(f,c){if(g(c))c=String(c);else if(typeof c!="string"||c.substr(c.length-4)==="[-1]")throw"bad property string";var l=c.split("."),m,h,b,u;for(u=0;u/g),l=0;lr||w===C||wa||o&&c(u))}function m(u,o){var d=u[0],w=u[1];if(d===C||dr||w===C||wa)return!1;var A=v.length,_=v[0][0],y=v[0][1],E=0,T,s,L,M,z;for(T=1;TMath.max(s,_)||w>Math.max(L,y)))if(wn||Math.abs(g(m,c))>r)return!0;return!1},i.filter=function(x,v){var p=[x[0]],r=0,e=0;function a(f){x.push(f);var c=p.length,l=r;p.splice(e+1);for(var m=l+1;m1){var n=x.pop();a(n)}return{addPt:a,raw:x,filtered:p}}},5048:function(G,U,t){var g=t(16576),C=t(28624);G.exports=function(S,x,v){var p=S._fullLayout,r=!0;return p._glcanvas.each(function(e){if(e.regl){e.regl.preloadCachedCode(v);return}if(!(e.pick&&!p._has("parcoords"))){try{e.regl=C({canvas:this,attributes:{antialias:!e.pick,preserveDrawingBuffer:!0},pixelRatio:S._context.plotGlPixelRatio||t.g.devicePixelRatio,extensions:x||[],cachedCode:v||{}})}catch{r=!1}e.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(a){S&&S.emit&&S.emit("plotly_webglcontextlost",{event:a,layer:e.key})},!1)}}),r||g({container:p._glcontainer.node()}),r}},34296:function(G,U,t){var g=t(38248),C=t(25928);G.exports=function(x){var v;if(x&&x.hasOwnProperty("userAgent")?v=x.userAgent:v=i(),typeof v!="string")return!0;var p=C({ua:{headers:{"user-agent":v}},tablet:!0,featureDetect:!1});if(!p)for(var r=v.split(" "),e=1;e-1;n--){var f=r[n];if(f.substr(0,8)==="Version/"){var c=f.substr(8).split(".")[0];if(g(c)&&(c=+c),c>=13)return!0}}}return p};function i(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}},52416:function(G){G.exports=function(t,g){if(g instanceof RegExp){for(var C=g.toString(),i=0;iC.queueLength&&(x.undoQueue.queue.shift(),x.undoQueue.index--)},S.startSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!0,x.undoQueue.beginSequence=!0},S.stopSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!1,x.undoQueue.beginSequence=!1},S.undo=function(v){var p,r;if(!(v.undoQueue===void 0||isNaN(v.undoQueue.index)||v.undoQueue.index<=0)){for(v.undoQueue.index--,p=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,r=0;r=v.undoQueue.queue.length)){for(p=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,r=0;r1?(n[l-1]-n[0])/(l-1):1,b,u;for(h>=0?u=f?v:p:u=f?e:r,a+=h*x*(f?-1:1)*(h>=0?1:-1);c90&&C.log("Long binary search..."),c-1};function v(a,n){return an}function e(a,n){return a>=n}U.sorterAsc=function(a,n){return a-n},U.sorterDes=function(a,n){return n-a},U.distinctVals=function(a){var n=a.slice();n.sort(U.sorterAsc);var f;for(f=n.length-1;f>-1&&n[f]===S;f--);for(var c=n[f]-n[0]||1,l=c/(f||1)/1e4,m=[],h,b=0;b<=f;b++){var u=n[b],o=u-h;h===void 0?(m.push(u),h=u):o>l&&(c=Math.min(c,o),m.push(u),h=u)}return{vals:m,minDiff:c}},U.roundUp=function(a,n,f){for(var c=0,l=n.length-1,m,h=0,b=f?0:1,u=f?1:0,o=f?Math.ceil:Math.floor;c0&&(c=1),f&&c)return a.sort(n)}return c?a:a.reverse()},U.findIndexOfMin=function(a,n){n=n||i;for(var f=1/0,c,l=0;lx.length)&&(v=x.length),g(S)||(S=!1),C(x[0])){for(r=new Array(v),p=0;pi.length-1)return i[i.length-1];var x=S%1;return x*i[Math.ceil(S)]+(1-x)*i[Math.floor(S)]}},43080:function(G,U,t){var g=t(72160);function C(i){return i?g(i):[0,0,0,1]}G.exports=C},9188:function(G,U,t){var g=t(2264),C=t(43616),i=t(3400),S=null;function x(){if(S!==null)return S;S=!1;var v=i.isIE()||i.isSafari()||i.isIOS();if(window.navigator.userAgent&&!v){var p=Array.from(g.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")S=p.some(function(f){return r.apply(null,f)});else{var e=C.tester.append("image").attr("style",g.STYLE),a=window.getComputedStyle(e.node()),n=a.imageRendering;S=p.some(function(f){var c=f[1];return n===c||n===c.toLowerCase()}),e.remove()}}return S}G.exports=x},72736:function(G,U,t){var g=t(33428),C=t(3400),i=C.strTranslate,S=t(9616),x=t(84284).LINE_SPACING,v=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;U.convertToTspans=function(B,O,H){var Y=B.text(),j=!B.attr("data-notex")&&O&&O._context.typesetMath&&typeof MathJax<"u"&&Y.match(v),et=g.select(B.node().parentNode);if(et.empty())return;var it=B.attr("class")?B.attr("class").split(" ")[0]:"text";it+="-math",et.selectAll("svg."+it).remove(),et.selectAll("g."+it+"-group").remove(),B.style("display",null).attr({"data-unformatted":Y,"data-math":"N"});function ut(){et.empty()||(it=B.attr("class")+"-math",et.select("svg."+it).remove()),B.text("").style("white-space","pre");var J=D(B.node(),Y);J&&B.style("pointer-events","all"),U.positionText(B),H&&H.call(B)}return j?(O&&O._promises||[]).push(new Promise(function(J){B.style("display","none");var X=parseInt(B.node().style.fontSize,10),tt={fontSize:X};n(j[2],tt,function(V,Q,ot){et.selectAll("svg."+it).remove(),et.selectAll("g."+it+"-group").remove();var $=V&&V.select("svg");if(!$||!$.node()){ut(),J();return}var Z=et.append("g").classed(it+"-group",!0).attr({"pointer-events":"none","data-unformatted":Y,"data-math":"Y"});Z.node().appendChild($.node()),Q&&Q.node()&&$.node().insertBefore(Q.node().cloneNode(!0),$.node().firstChild);var st=ot.width,nt=ot.height;$.attr({class:it,height:nt,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ct=B.node().style.fill||"black",gt=$.select("g");gt.attr({fill:ct,stroke:ct});var Tt=gt.node().getBoundingClientRect(),wt=Tt.width,Rt=Tt.height;(wt>st||Rt>nt)&&($.style("overflow","hidden"),Tt=$.node().getBoundingClientRect(),wt=Tt.width,Rt=Tt.height);var bt=+B.attr("x"),At=+B.attr("y"),mt=X||B.node().getBoundingClientRect().height,Lt=-mt/4;if(it[0]==="y")Z.attr({transform:"rotate("+[-90,bt,At]+")"+i(-wt/2,Lt-Rt/2)});else if(it[0]==="l")At=Lt-Rt/2;else if(it[0]==="a"&&it.indexOf("atitle")!==0)bt=0,At=Lt;else{var Ht=B.attr("text-anchor");bt=bt-wt*(Ht==="middle"?.5:Ht==="end"?1:0),At=At+Lt-Rt/2}$.attr({x:bt,y:At}),H&&H.call(B,Z),J(Z)})})):ut(),B};var p=/(<|<|<)/g,r=/(>|>|>)/g;function e(B){return B.replace(p,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function n(B,O,H){var Y=parseInt((MathJax.version||"").split(".")[0]);if(Y!==2&&Y!==3){C.warn("No MathJax version:",MathJax.version);return}var j,et,it,ut,J=function(){return et=C.extendDeepAll({},MathJax.Hub.config),it=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},X=function(){et=C.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},tt=function(){if(j=MathJax.Hub.config.menuSettings.renderer,j!=="SVG")return MathJax.Hub.setRenderer("SVG")},V=function(){j=MathJax.config.startup.output,j!=="svg"&&(MathJax.config.startup.output="svg")},Q=function(){var ct="math-output-"+C.randstr({},64);ut=g.select("body").append("div").attr({id:ct}).style({visibility:"hidden",position:"absolute","font-size":O.fontSize+"px"}).text(e(B));var gt=ut.node();return Y===2?MathJax.Hub.Typeset(gt):MathJax.typeset([gt])},ot=function(){var ct=ut.select(Y===2?".MathJax_SVG":".MathJax"),gt=!ct.empty()&&ut.select("svg").node();if(!gt)C.log("There was an error in the tex syntax.",B),H();else{var Tt=gt.getBoundingClientRect(),wt;Y===2?wt=g.select("body").select("#MathJax_SVG_glyphs"):wt=ct.select("defs"),H(ct,wt,Tt)}ut.remove()},$=function(){if(j!=="SVG")return MathJax.Hub.setRenderer(j)},Z=function(){j!=="svg"&&(MathJax.config.startup.output=j)},st=function(){return it!==void 0&&(MathJax.Hub.processSectionDelay=it),MathJax.Hub.Config(et)},nt=function(){MathJax.config=et};Y===2?MathJax.Hub.Queue(J,tt,Q,ot,$,st):Y===3&&(X(),V(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){Q(),ot(),Z(),nt()}))}var f={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},c={sub:"0.3em",sup:"-0.6em"},l={sub:"-0.21em",sup:"0.42em"},m="​",h=["http:","https:","mailto:","",void 0,":"],b=U.NEWLINES=/(\r\n?|\n)/g,u=/(<[^<>]*>)/,o=/<(\/?)([^ >]*)(\s+(.*))?>/i,d=//i;U.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,y=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function E(B,O){if(!B)return null;var H=B.match(O),Y=H&&(H[3]||H[4]);return Y&&M(Y)}var T=/(^|;)\s*color:/;U.plainText=function(B,O){O=O||{};for(var H=O.len!==void 0&&O.len!==-1?O.len:1/0,Y=O.allowedTags!==void 0?O.allowedTags:["br"],j="...",et=j.length,it=B.split(u),ut=[],J="",X=0,tt=0;ttet?ut.push(V.substr(0,Z-et)+j):ut.push(V.substr(0,Z));break}J=""}}return ut.join("")};var s={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function M(B){return B.replace(L,function(O,H){var Y;return H.charAt(0)==="#"?Y=z(H.charAt(1)==="x"?parseInt(H.substr(2),16):parseInt(H.substr(1),10)):Y=s[H],Y||O})}U.convertEntities=M;function z(B){if(!(B>1114111)){var O=String.fromCodePoint;if(O)return O(B);var H=String.fromCharCode;return B<=65535?H(B):H((B>>10)+55232,B%1024+56320)}}function D(B,O){O=O.replace(b," ");var H=!1,Y=[],j,et=-1;function it(){et++;var Rt=document.createElementNS(S.svg,"tspan");g.select(Rt).attr({class:"line",dy:et*x+"em"}),B.appendChild(Rt),j=Rt;var bt=Y;if(Y=[{node:Rt}],bt.length>1)for(var At=1;At.",O);return}var bt=Y.pop();Rt!==bt.type&&C.log("Start tag <"+bt.type+"> doesnt match end tag <"+Rt+">. Pretending it did match.",O),j=Y[Y.length-1].node}var tt=d.test(O);tt?it():(j=B,Y=[{node:B}]);for(var V=O.split(u),Q=0;Qv.ts+S){e();return}v.timer=setTimeout(function(){e(),v.timer=null},S)},U.done=function(C){var i=t[C];return!i||!i.timer?Promise.resolve():new Promise(function(S){var x=i.onDone;i.onDone=function(){x&&x(),S(),i.onDone=null}})},U.clear=function(C){if(C)g(t[C]),delete t[C];else for(var i in t)U.clear(i)};function g(C){C&&C.timer!==null&&(clearTimeout(C.timer),C.timer=null)}},36896:function(G,U,t){var g=t(38248);G.exports=function(i,S){if(i>0)return Math.log(i)/Math.LN10;var x=Math.log(Math.min(S[0],S[1]))/Math.LN10;return g(x)||(x=Math.log(Math.max(S[0],S[1]))/Math.LN10-6),x}},59972:function(G,U,t){var g=G.exports={},C=t(79552).locationmodeToLayer,i=t(55712).NO;g.getTopojsonName=function(S){return[S.scope.replace(/ /g,"-"),"_",S.resolution.toString(),"m"].join("")},g.getTopojsonPath=function(S,x){return S+x+".json"},g.getTopojsonFeatures=function(S,x){var v=C[S.locationmode],p=x.objects[v];return i(x,p).features}},11680:function(G){G.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(G){G.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},69820:function(G,U,t){var g=t(24040);G.exports=function(i){for(var S=g.layoutArrayContainers,x=g.layoutArrayRegexes,v=i.split("[")[0],p,r,e=0;e0&&S.log("Clearing previous rejected promises from queue."),d._promises=[]},U.cleanLayout=function(d){var w,A;d||(d={}),d.xaxis1&&(d.xaxis||(d.xaxis=d.xaxis1),delete d.xaxis1),d.yaxis1&&(d.yaxis||(d.yaxis=d.yaxis1),delete d.yaxis1),d.scene1&&(d.scene||(d.scene=d.scene1),delete d.scene1);var _=(x.subplotsRegistry.cartesian||{}).attrRegex,y=(x.subplotsRegistry.polar||{}).attrRegex,E=(x.subplotsRegistry.ternary||{}).attrRegex,T=(x.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(d);for(w=0;w3?(tt.x=1.02,tt.xanchor="left"):tt.x<-2&&(tt.x=-.02,tt.xanchor="right"),tt.y>3?(tt.y=1.02,tt.yanchor="bottom"):tt.y<-2&&(tt.y=-.02,tt.yanchor="top")),f(d),d.dragmode==="rotate"&&(d.dragmode="orbit"),p.clean(d),d.template&&d.template.layout&&U.cleanLayout(d.template.layout),d};function n(d,w){var A=d[w],_=w.charAt(0);A&&A!=="paper"&&(d[w]=r(A,_,!0))}function f(d){d&&((typeof d.title=="string"||typeof d.title=="number")&&(d.title={text:d.title}),w("titlefont","font"),w("titleposition","position"),w("titleside","side"),w("titleoffset","offset"));function w(A,_){var y=d[A],E=d.title&&d.title[_];y&&!E&&(d.title||(d.title={}),d.title[_]=d[A],delete d[A])}}U.cleanData=function(d){for(var w=0;w0)return d.substr(0,w)}U.hasParent=function(d,w){for(var A=u(w);A;){if(A in d)return!0;A=u(A)}return!1};var o=["x","y","z"];U.clearAxisTypes=function(d,w,A){for(var _=0;_1&&i.warn("Full array edits are incompatible with other edits",l);var w=n[""][""];if(p(w))a.set(null);else if(Array.isArray(w))a.set(w);else return i.warn("Unrecognized full array edit value",l,w),!0;return u?!1:(m(o,d),h(e),!0)}var A=Object.keys(n).map(Number).sort(S),_=a.get(),y=_||[],E=c(d,l).get(),T=[],s=-1,L=y.length,M,z,D,N,I,k,B,O;for(M=0;My.length-(B?0:1)){i.warn("index out of range",l,D);continue}if(k!==void 0)I.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",l,D),p(k)?T.push(D):B?(k==="add"&&(k={}),y.splice(D,0,k),E&&E.splice(D,0,{})):i.warn("Unrecognized full object edit value",l,D,k),s===-1&&(s=D);else for(z=0;z=0;M--)y.splice(T[M],1),E&&E.splice(T[M],1);if(y.length?_||a.set(y):a.set(null),u)return!1;if(m(o,d),b!==C){var H;if(s===-1)H=A;else{for(L=Math.max(y.length,L),H=[],M=0;M=s));M++)H.push(D);for(M=s;M=Mt.data.length||me<-Mt.data.length)throw new Error(jt+" must be valid indices for gd.data.");if(Nt.indexOf(me,ie+1)>-1||me>=0&&Nt.indexOf(-Mt.data.length+me)>-1||me<0&&Nt.indexOf(Mt.data.length+me)>-1)throw new Error("each index in "+jt+" must be unique.")}}function H(Mt,Nt,jt){if(!Array.isArray(Mt.data))throw new Error("gd.data must be an array.");if(typeof Nt>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Nt)||(Nt=[Nt]),O(Mt,Nt,"currentIndices"),typeof jt<"u"&&!Array.isArray(jt)&&(jt=[jt]),typeof jt<"u"&&O(Mt,jt,"newIndices"),typeof jt<"u"&&Nt.length!==jt.length)throw new Error("current and new indices must be of equal length.")}function Y(Mt,Nt,jt){var ie,me;if(!Array.isArray(Mt.data))throw new Error("gd.data must be an array.");if(typeof Nt>"u")throw new Error("traces must be defined.");for(Array.isArray(Nt)||(Nt=[Nt]),ie=0;ie"u")throw new Error("indices must be an integer or array of integers");O(Mt,jt,"indices");for(var be in Nt){if(!Array.isArray(Nt[be])||Nt[be].length!==jt.length)throw new Error("attribute "+be+" must be an array of length equal to indices array length");if(me&&(!(be in ie)||!Array.isArray(ie[be])||ie[be].length!==Nt[be].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function et(Mt,Nt,jt,ie){var me=S.isPlainObject(ie),be=[],ve,Le,ce,Te,Be;Array.isArray(jt)||(jt=[jt]),jt=B(jt,Mt.data.length-1);for(var ir in Nt)for(var pe=0;pe=0&&Be=0&&Be"u")return Te=U.redraw(Mt),p.add(Mt,me,ve,be,Le),Te;Array.isArray(jt)||(jt=[jt]);try{H(Mt,ie,jt)}catch(Be){throw Mt.data.splice(Mt.data.length-Nt.length,Nt.length),Be}return p.startSequence(Mt),p.add(Mt,me,ve,be,Le),Te=U.moveTraces(Mt,ie,jt),p.stopSequence(Mt),Te}function V(Mt,Nt){Mt=S.getGraphDiv(Mt);var jt=[],ie=U.addTraces,me=V,be=[Mt,jt,Nt],ve=[Mt,Nt],Le,ce;if(typeof Nt>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Nt)||(Nt=[Nt]),O(Mt,Nt,"indices"),Nt=B(Nt,Mt.data.length-1),Nt.sort(S.sorterDes),Le=0;Le"u")for(jt=[],Te=0;Te-1&&be.indexOf("grouptitlefont")===-1?Le(be,be.replace("titlefont","title.font")):be.indexOf("titleposition")>-1?Le(be,be.replace("titleposition","title.position")):be.indexOf("titleside")>-1?Le(be,be.replace("titleside","title.side")):be.indexOf("titleoffset")>-1&&Le(be,be.replace("titleoffset","title.offset"));function Le(ce,Te){Mt[Te]=Mt[ce],delete Mt[ce]}}function Tt(Mt,Nt,jt){Mt=S.getGraphDiv(Mt),w.clearPromiseQueue(Mt);var ie={};if(typeof Nt=="string")ie[Nt]=jt;else if(S.isPlainObject(Nt))ie=S.extendFlat({},Nt);else return S.warn("Relayout fail.",Nt,jt),Promise.reject();Object.keys(ie).length&&(Mt.changed=!0);var me=Lt(Mt,ie),be=me.flags;be.calc&&(Mt.calcdata=void 0);var ve=[a.previousPromises];be.layoutReplot?ve.push(A.layoutReplot):Object.keys(ie).length&&(wt(Mt,be,me)||a.supplyDefaults(Mt),be.legend&&ve.push(A.doLegend),be.layoutstyle&&ve.push(A.layoutStyles),be.axrange&&Rt(ve,me.rangesAltered),be.ticks&&ve.push(A.doTicksRelayout),be.modebar&&ve.push(A.doModeBar),be.camera&&ve.push(A.doCamera),be.colorbars&&ve.push(A.doColorBars),ve.push(L)),ve.push(a.rehover,a.redrag,a.reselect),p.add(Mt,Tt,[Mt,me.undoit],Tt,[Mt,me.redoit]);var Le=S.syncOrAsync(ve,Mt);return(!Le||!Le.then)&&(Le=Promise.resolve(Mt)),Le.then(function(){return Mt.emit("plotly_relayout",me.eventData),Mt})}function wt(Mt,Nt,jt){var ie=Mt._fullLayout;if(!Nt.axrange)return!1;for(var me in Nt)if(me!=="axrange"&&Nt[me])return!1;var be,ve,Le=function(Xe,Ke){return S.coerce(be,ve,c,Xe,Ke)},ce={};for(var Te in jt.rangesAltered){var Be=n.id2name(Te);if(be=Mt.layout[Be],ve=ie[Be],f(be,ve,Le,ce),ve._matchGroup){for(var ir in ve._matchGroup)if(ir!==Te){var pe=ie[n.id2name(ir)];pe.autorange=ve.autorange,pe.range=ve.range.slice(),pe._input.range=ve.range.slice()}}}return!0}function Rt(Mt,Nt){var jt=Nt?function(ie){var me=[],be=!0;for(var ve in Nt){var Le=n.getFromId(ie,ve);if(me.push(ve),(Le.ticklabelposition||"").indexOf("inside")!==-1&&Le._anchorAxis&&me.push(Le._anchorAxis._id),Le._matchGroup)for(var ce in Le._matchGroup)Nt[ce]||me.push(ce)}return n.draw(ie,me,{skipTitle:be})}:function(ie){return n.draw(ie,"redraw")};Mt.push(u,A.doAutoRangeAndConstraints,jt,A.drawData,A.finalDraw)}var bt=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,At=/^[xyz]axis[0-9]*\.autorange$/,mt=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Lt(Mt,Nt){var jt=Mt.layout,ie=Mt._fullLayout,me=ie._guiEditing,be=Z(ie._preGUI,me),ve=Object.keys(Nt),Le=n.list(Mt),ce=S.extendDeepAll({},Nt),Te={},Be,ir,pe;for(gt(Nt),ve=Object.keys(Nt),ir=0;ir0&&typeof Ve.parts[hr]!="string";)hr--;var vr=Ve.parts[hr],Yt=Ve.parts[hr-1]+"."+vr,Gt=Ve.parts.slice(0,hr).join("."),Ne=x(Mt.layout,Gt).get(),Oe=x(ie,Gt).get(),Qe=Ve.get();if(Je!==void 0){ge[ke]=Je,se[ke]=vr==="reverse"?Je:$(Qe);var er=e.getLayoutValObject(ie,Ve.parts);if(er&&er.impliedEdits&&Je!==null)for(var fr in er.impliedEdits)Ae(S.relativeAttr(ke,fr),er.impliedEdits[fr]);if(["width","height"].indexOf(ke)!==-1)if(Je){Ae("autosize",null);var rr=ke==="height"?"width":"height";Ae(rr,ie[rr])}else ie[ke]=Mt._initialAutoSize[ke];else if(ke==="autosize")Ae("width",Je?null:ie.width),Ae("height",Je?null:ie.height);else if(Yt.match(bt))Pe(Yt),x(ie,Gt+"._inputRange").set(null);else if(Yt.match(At)){Pe(Yt),x(ie,Gt+"._inputRange").set(null);var He=x(ie,Gt).get();He._inputDomain&&(He._input.domain=He._inputDomain.slice())}else Yt.match(mt)&&x(ie,Gt+"._inputDomain").set(null);if(vr==="type"){Ie=Ne;var dr=Oe.type==="linear"&&Je==="log",mr=Oe.type==="log"&&Je==="linear";if(dr||mr){if(!Ie||!Ie.range)Ae(Gt+".autorange",!0);else if(Oe.autorange)dr&&(Ie.range=Ie.range[1]>Ie.range[0]?[1,2]:[2,1]);else{var xr=Ie.range[0],pr=Ie.range[1];dr?(xr<=0&&pr<=0&&Ae(Gt+".autorange",!0),xr<=0?xr=pr/1e6:pr<=0&&(pr=xr/1e6),Ae(Gt+".range[0]",Math.log(xr)/Math.LN10),Ae(Gt+".range[1]",Math.log(pr)/Math.LN10)):(Ae(Gt+".range[0]",Math.pow(10,xr)),Ae(Gt+".range[1]",Math.pow(10,pr)))}Array.isArray(ie._subplots.polar)&&ie._subplots.polar.length&&ie[Ve.parts[0]]&&Ve.parts[1]==="radialaxis"&&delete ie[Ve.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Mt,Oe,Je,Ae),r.getComponentMethod("images","convertCoords")(Mt,Oe,Je,Ae)}else Ae(Gt+".autorange",!0),Ae(Gt+".range",null);x(ie,Gt+"._inputRange").set(null)}else if(vr.match(y)){var Gr=x(ie,ke).get(),Pr=(Je||{}).type;(!Pr||Pr==="-")&&(Pr="linear"),r.getComponentMethod("annotations","convertCoords")(Mt,Gr,Pr,Ae),r.getComponentMethod("images","convertCoords")(Mt,Gr,Pr,Ae)}var Dr=d.containerArrayMatch(ke);if(Dr){Be=Dr.array,ir=Dr.index;var cn=Dr.property,rn=er||{editType:"calc"};ir!==""&&cn===""&&(d.isAddVal(Je)?se[ke]=null:d.isRemoveVal(Je)?se[ke]=(x(jt,Be).get()||[])[ir]:S.warn("unrecognized full object value",Nt)),_.update($e,rn),Te[Be]||(Te[Be]={});var Cn=Te[Be][ir];Cn||(Cn=Te[Be][ir]={}),Cn[cn]=Je,delete Nt[ke]}else vr==="reverse"?(Ne.range?Ne.range.reverse():(Ae(Gt+".autorange",!0),Ne.range=[1,0]),Oe.autorange?$e.calc=!0:$e.plot=!0):(ke==="dragmode"&&(Je===!1&&Qe!==!1||Je!==!1&&Qe===!1)||ie._has("scatter-like")&&ie._has("regl")&&ke==="dragmode"&&(Je==="lasso"||Je==="select")&&!(Qe==="lasso"||Qe==="select")||ie._has("gl2d")?$e.plot=!0:er?_.update($e,er):$e.calc=!0,Ve.set(Je))}}for(Be in Te){var En=d.applyContainerArrayChanges(Mt,be(jt,Be),Te[Be],$e,be);En||($e.plot=!0)}for(var Tr in Ce){Ie=n.getFromId(Mt,Tr);var Cr=Ie&&Ie._constraintGroup;if(Cr){$e.calc=!0;for(var Wr in Cr)Ce[Wr]||(n.getFromId(Mt,Wr)._constraintShrinkable=!0)}}(Ht(Mt)||Nt.height||Nt.width)&&($e.plot=!0);var Ur=ie.shapes;for(ir=0;ir1;)if(ie.pop(),jt=x(Nt,ie.join(".")+".uirevision").get(),jt!==void 0)return jt;return Nt.uirevision}function $t(Mt,Nt){for(var jt=0;jt=me.length?me[0]:me[Te]:me}function Le(Te){return Array.isArray(be)?Te>=be.length?be[0]:be[Te]:be}function ce(Te,Be){var ir=0;return function(){if(Te&&++ir===Be)return Te()}}return new Promise(function(Te,Be){function ir(){if(ie._frameQueue.length!==0){for(;ie._frameQueue.length;){var vr=ie._frameQueue.pop();vr.onInterrupt&&vr.onInterrupt()}Mt.emit("plotly_animationinterrupted",[])}}function pe(vr){if(vr.length!==0){for(var Yt=0;Ytie._timeToNext&&Ke()};vr()}var $e=0;function ge(vr){return Array.isArray(me)?$e>=me.length?vr.transitionOpts=me[$e]:vr.transitionOpts=me[0]:vr.transitionOpts=me,$e++,vr}var se,Ae,Ce=[],Ie=Nt==null,Pe=Array.isArray(Nt),ke=!Ie&&!Pe&&S.isPlainObject(Nt);if(ke)Ce.push({type:"object",data:ge(S.extendFlat({},Nt))});else if(Ie||["string","number"].indexOf(typeof Nt)!==-1)for(se=0;se0&&urur)&&hr.push(Ae);Ce=hr}}Ce.length>0?pe(Ce):(Mt.emit("plotly_animated"),Te())})}function Wt(Mt,Nt,jt){if(Mt=S.getGraphDiv(Mt),Nt==null)return Promise.resolve();if(!S.isPlotDiv(Mt))throw new Error("This element is not a Plotly plot: "+Mt+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var ie,me,be,ve,Le=Mt._transitionData._frames,ce=Mt._transitionData._frameHash;if(!Array.isArray(Nt))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Nt);var Te=Le.length+Nt.length*2,Be=[],ir={};for(ie=Nt.length-1;ie>=0;ie--)if(S.isPlainObject(Nt[ie])){var pe=Nt[ie].name,Xe=(ce[pe]||ir[pe]||{}).name,Ke=Nt[ie].name,or=ce[Xe]||ir[Xe];Xe&&Ke&&typeof Ke=="number"&&or&&EVe.index?-1:ke.index=0;ie--){if(me=Be[ie].frame,typeof me.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!me.name)for(;ce[me.name="frame "+Mt._transitionData._counter++];);if(ce[me.name]){for(be=0;be=0;jt--)ie=Nt[jt],be.push({type:"delete",index:ie}),ve.unshift({type:"insert",index:ie,value:me[ie]});var Le=a.modifyFrames,ce=a.modifyFrames,Te=[Mt,ve],Be=[Mt,be];return p&&p.add(Mt,Le,Te,ce,Be),a.modifyFrames(Mt,be)}function xt(Mt){Mt=S.getGraphDiv(Mt);var Nt=Mt._fullLayout||{},jt=Mt._fullData||[];return a.cleanPlot([],{},jt,Nt),a.purge(Mt),v.purge(Mt),Nt._container&&Nt._container.remove(),delete Mt._context,Mt}function yt(Mt){var Nt=Mt._fullLayout,jt=Mt.getBoundingClientRect();if(!S.equalDomRects(jt,Nt._lastBBox)){var ie=Nt._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Mt));Nt._invScaleX=Math.sqrt(ie[0][0]*ie[0][0]+ie[0][1]*ie[0][1]+ie[0][2]*ie[0][2]),Nt._invScaleY=Math.sqrt(ie[1][0]*ie[1][0]+ie[1][1]*ie[1][1]+ie[1][2]*ie[1][2]),Nt._lastBBox=jt}}function Et(Mt){var Nt=g.select(Mt),jt=Mt._fullLayout;if(jt._calcInverseTransform=yt,jt._calcInverseTransform(Mt),jt._container=Nt.selectAll(".plot-container").data([0]),jt._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),jt._paperdiv=jt._container.selectAll(".svg-container").data([0]),jt._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),jt._glcontainer=jt._paperdiv.selectAll(".gl-container").data([{}]),jt._glcontainer.enter().append("div").classed("gl-container",!0),jt._paperdiv.selectAll(".main-svg").remove(),jt._paperdiv.select(".modebar-container").remove(),jt._paper=jt._paperdiv.insert("svg",":first-child").classed("main-svg",!0),jt._toppaper=jt._paperdiv.append("svg").classed("main-svg",!0),jt._modebardiv=jt._paperdiv.append("div"),delete jt._modeBar,jt._hoverpaper=jt._paperdiv.append("svg").classed("main-svg",!0),!jt._uid){var ie={};g.selectAll("defs").each(function(){this.id&&(ie[this.id.split("-")[1]]=1)}),jt._uid=S.randstr(ie)}jt._paperdiv.selectAll(".main-svg").attr(b.svgAttrs),jt._defs=jt._paper.append("defs").attr("id","defs-"+jt._uid),jt._clips=jt._defs.append("g").classed("clips",!0),jt._topdefs=jt._toppaper.append("defs").attr("id","topdefs-"+jt._uid),jt._topclips=jt._topdefs.append("g").classed("clips",!0),jt._bgLayer=jt._paper.append("g").classed("bglayer",!0),jt._draggers=jt._paper.append("g").classed("draglayer",!0);var me=jt._paper.append("g").classed("layer-below",!0);jt._imageLowerLayer=me.append("g").classed("imagelayer",!0),jt._shapeLowerLayer=me.append("g").classed("shapelayer",!0),jt._cartesianlayer=jt._paper.append("g").classed("cartesianlayer",!0),jt._polarlayer=jt._paper.append("g").classed("polarlayer",!0),jt._smithlayer=jt._paper.append("g").classed("smithlayer",!0),jt._ternarylayer=jt._paper.append("g").classed("ternarylayer",!0),jt._geolayer=jt._paper.append("g").classed("geolayer",!0),jt._funnelarealayer=jt._paper.append("g").classed("funnelarealayer",!0),jt._pielayer=jt._paper.append("g").classed("pielayer",!0),jt._iciclelayer=jt._paper.append("g").classed("iciclelayer",!0),jt._treemaplayer=jt._paper.append("g").classed("treemaplayer",!0),jt._sunburstlayer=jt._paper.append("g").classed("sunburstlayer",!0),jt._indicatorlayer=jt._toppaper.append("g").classed("indicatorlayer",!0),jt._glimages=jt._paper.append("g").classed("glimages",!0);var be=jt._toppaper.append("g").classed("layer-above",!0);jt._imageUpperLayer=be.append("g").classed("imagelayer",!0),jt._shapeUpperLayer=be.append("g").classed("shapelayer",!0),jt._selectionLayer=jt._toppaper.append("g").classed("selectionlayer",!0),jt._infolayer=jt._toppaper.append("g").classed("infolayer",!0),jt._menulayer=jt._toppaper.append("g").classed("menulayer",!0),jt._zoomlayer=jt._toppaper.append("g").classed("zoomlayer",!0),jt._hoverlayer=jt._hoverpaper.append("g").classed("hoverlayer",!0),jt._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Mt.emit("plotly_framework")}U.animate=Jt,U.addFrames=Wt,U.deleteFrames=Ft,U.addTraces=tt,U.deleteTraces=V,U.extendTraces=J,U.moveTraces=Q,U.prependTraces=X,U.newPlot=k,U._doPlot=s,U.purge=xt,U.react=xe,U.redraw=I,U.relayout=Tt,U.restyle=ot,U.setPlotConfig=M,U.update=Ut,U._guiRelayout=kt(Tt),U._guiRestyle=kt(ot),U._guiUpdate=kt(Ut),U._storeDirectGUIEdit=nt},20556:function(G){var U={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},t={};function g(C,i){for(var S in C){var x=C[S];x.valType?i[S]=x.dflt:(i[S]||(i[S]={}),g(x,i[S]))}}g(U,t),G.exports={configAttributes:U,dfltConfig:t}},73060:function(G,U,t){var g=t(24040),C=t(3400),i=t(45464),S=t(64859),x=t(16672),v=t(85656),p=t(20556).configAttributes,r=t(67824),e=C.extendDeepAll,a=C.isPlainObject,n=C.isArrayOrTypedArray,f=C.nestedProperty,c=C.valObjectMeta,l="_isSubplotObj",m="_isLinkedToArray",h="_arrayAttrRegexps",b="_deprecated",u=[l,m,h,b];U.IS_SUBPLOT_OBJ=l,U.IS_LINKED_TO_ARRAY=m,U.DEPRECATED=b,U.UNDERSCORE_ATTRS=u,U.get=function(){var N={};g.allTypes.forEach(function(k){N[k]=A(k)});var I={};return Object.keys(g.transformsRegistry).forEach(function(k){I[k]=y(k)}),{defs:{valObjects:c,metaKeys:u.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:N,layout:_(),transforms:I,frames:E(),animation:T(v),config:T(p)}},U.crawl=function(N,I,k,B){var O=k||0;B=B||"",Object.keys(N).forEach(function(H){var Y=N[H];if(u.indexOf(H)===-1){var j=(B?B+".":"")+H;I(Y,H,N,O,j),!U.isValObject(Y)&&a(Y)&&H!=="impliedEdits"&&U.crawl(Y,I,O+1,j)}})},U.isValObject=function(N){return N&&N.valType!==void 0},U.findArrayAttributes=function(N){var I=[],k=[],B=[],O,H;function Y(X,tt,V,Q){k=k.slice(0,Q).concat([tt]),B=B.slice(0,Q).concat([X&&X._isLinkedToArray]);var ot=X&&(X.valType==="data_array"||X.arrayOk===!0)&&!(k[Q-1]==="colorbar"&&(tt==="ticktext"||tt==="tickvals"));ot&&j(O,0,"")}function j(X,tt,V){var Q=X[k[tt]],ot=V+k[tt];if(tt===k.length-1)n(Q)&&I.push(H+ot);else if(B[tt]){if(Array.isArray(Q))for(var $=0;$=Y.length)return!1;O=(g.transformsRegistry[Y[j].type]||{}).attributes,H=O&&O[I[2]],B=3}else{var et=N._module;if(et||(et=(g.modules[N.type||i.type.dflt]||{})._module),!et)return!1;if(O=et.attributes,H=O&&O[k],!H){var it=et.basePlotModule;it&&it.attributes&&(H=it.attributes[k])}H||(H=i[k])}return d(H,I,B)},U.getLayoutValObject=function(N,I){var k=o(N,I[0]);return d(k,I,1)};function o(N,I){var k,B,O,H,Y=N._basePlotModules;if(Y){var j;for(k=0;k=H.length)return!1;if(N.dimensions===2){if(k++,I.length===k)return N;var Y=I[k];if(!w(Y))return!1;N=H[O][Y]}else N=H[O]}else N=H}}return N}function w(N){return N===Math.round(N)&&N>=0}function A(N){var I,k;I=g.modules[N]._module,k=I.basePlotModule;var B={};B.type=null;var O=e({},i),H=e({},I.attributes);U.crawl(H,function(et,it,ut,J,X){f(O,X).set(void 0),et===void 0&&f(H,X).set(void 0)}),e(B,O),g.traceIs(N,"noOpacity")&&delete B.opacity,g.traceIs(N,"showLegend")||(delete B.showlegend,delete B.legendgroup),g.traceIs(N,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),I.selectPoints||delete B.selectedpoints,e(B,H),k.attributes&&e(B,k.attributes),B.type=N;var Y={meta:I.meta||{},categories:I.categories||{},animatable:!!I.animatable,type:N,attributes:T(B)};if(I.layoutAttributes){var j={};e(j,I.layoutAttributes),Y.layoutAttributes=T(j)}return I.animatable||U.crawl(Y,function(et){U.isValObject(et)&&"anim"in et&&delete et.anim}),Y}function _(){var N={},I,k;e(N,S);for(I in g.subplotsRegistry)if(k=g.subplotsRegistry[I],!!k.layoutAttributes)if(Array.isArray(k.attr))for(var B=0;B=a&&(e._input||{})._templateitemname;f&&(n=a);var c=r+"["+n+"]",l;function m(){l={},f&&(l[c]={},l[c][i]=f)}m();function h(d,w){l[d]=w}function b(d,w){f?g.nestedProperty(l[c],d).set(w):l[c+"."+d]=w}function u(){var d=l;return m(),d}function o(d,w){d&&b(d,w);var A=u();for(var _ in A)g.nestedProperty(p,_).set(A[_])}return{modifyBase:h,modifyItem:b,getUpdateObj:u,applyUpdate:o}}},39172:function(G,U,t){var g=t(33428),C=t(24040),i=t(7316),S=t(3400),x=t(72736),v=t(73696),p=t(76308),r=t(43616),e=t(81668),a=t(45460),n=t(54460),f=t(84284),c=t(71888),l=c.enforce,m=c.clean,h=t(19280).doAutoRange,b="start",u="middle",o="end";U.layoutStyles=function(k){return S.syncOrAsync([i.doAutoMargin,w],k)};function d(k,B,O){for(var H=0;H=k[1]||Y[1]<=k[0])&&j[0]B[0])return!0}return!1}function w(k){var B=k._fullLayout,O=B._size,H=O.p,Y=n.list(k,"",!0),j,et,it,ut,J,X;if(B._paperdiv.style({width:k._context.responsive&&B.autosize&&!k._context._hasZeroWidth&&!k.layout.width?"100%":B.width+"px",height:k._context.responsive&&B.autosize&&!k._context._hasZeroHeight&&!k.layout.height?"100%":B.height+"px"}).selectAll(".main-svg").call(r.setSize,B.width,B.height),k._context.setBackground(k,B.paper_bgcolor),U.drawMainTitle(k),a.manage(k),!B._has("cartesian"))return i.previousPromises(k);function tt(xt,yt,Et){var Mt=xt._lw/2;if(xt._id.charAt(0)==="x"){if(yt){if(Et==="top")return yt._offset-H-Mt}else return O.t+O.h*(1-(xt.position||0))+Mt%1;return yt._offset+yt._length+H+Mt}if(yt){if(Et==="right")return yt._offset+yt._length+H+Mt}else return O.l+O.w*(xt.position||0)+Mt%1;return yt._offset-H-Mt}for(j=0;j0){L(k,j,J,ut),it.attr({x:et,y:j,"text-anchor":H,dy:D(B.yanchor)}).call(x.positionText,et,j);var X=(B.text.match(x.BR_TAG_ALL)||[]).length;if(X){var tt=f.LINE_SPACING*X+f.MID_SHIFT;B.y===0&&(tt=-tt),it.selectAll(".line").each(function(){var V=+this.getAttribute("dy").slice(0,-2)-tt+"em";this.setAttribute("dy",V)})}}}};function E(k,B,O,H,Y){var j=B.yref==="paper"?k._fullLayout._size.h:k._fullLayout.height,et=S.isTopAnchor(B)?H:H-Y,it=O==="b"?j-et:et;return S.isTopAnchor(B)&&O==="t"||S.isBottomAnchor(B)&&O==="b"?!1:it.5?"t":"b",et=k._fullLayout.margin[j],it=0;return B.yref==="paper"?it=O+B.pad.t+B.pad.b:B.yref==="container"&&(it=T(j,H,Y,k._fullLayout.height,O)+B.pad.t+B.pad.b),it>et?it:0}function L(k,B,O,H){var Y="title.automargin",j=k._fullLayout.title,et=j.y>.5?"t":"b",it={x:j.x,y:j.y,t:0,b:0},ut={};j.yref==="paper"&&E(k,j,et,B,H)?it[et]=O:j.yref==="container"&&(ut[et]=O,k._fullLayout._reservedMargin[Y]=ut),i.allowAutoMargin(k,Y),i.autoMargin(k,Y,it)}function M(k,B){var O=k.title,H=k._size,Y=0;switch(B===b?Y=O.pad.l:B===o&&(Y=-O.pad.r),O.xref){case"paper":return H.l+H.w*O.x+Y;case"container":default:return k.width*O.x+Y}}function z(k,B){var O=k.title,H=k._size,Y=0;if(B==="0em"||!B?Y=-O.pad.b:B===f.CAP_SHIFT+"em"&&(Y=O.pad.t),O.y==="auto")return H.t/2;switch(O.yref){case"paper":return H.t+H.h-H.h*O.y+Y;case"container":default:return k.height-k.height*O.y+Y}}function D(k){return k==="top"?f.CAP_SHIFT+.3+"em":k==="bottom"?"-0.3em":f.MID_SHIFT+"em"}function N(k){var B=k.title,O=u;return S.isRightAnchor(B)?O=o:S.isLeftAnchor(B)&&(O=b),O}function I(k){var B=k.title,O="0em";return S.isTopAnchor(B)?O=f.CAP_SHIFT+"em":S.isMiddleAnchor(B)&&(O=f.MID_SHIFT+"em"),O}U.doTraceStyle=function(k){var B=k.calcdata,O=[],H;for(H=0;HI?A.push({code:"unused",traceType:M,templateCount:N,dataCount:I}):I>N&&A.push({code:"reused",traceType:M,templateCount:N,dataCount:I})}}function k(B,O){for(var H in B)if(H.charAt(0)!=="_"){var Y=B[H],j=c(B,H,O);C(Y)?(Array.isArray(B)&&Y._template===!1&&Y.templateitemname&&A.push({code:"missing",path:j,templateitemname:Y.templateitemname}),k(Y,j)):Array.isArray(Y)&&l(Y)&&k(Y,j)}}if(k({data:y,layout:_},""),A.length)return A.map(m)};function l(h){for(var b=0;b1&&A.push(f("object","layout"))),C.supplyDefaults(_);for(var T=_._fullData,s=y.length,L=0;LM.length&&w.push(f("unused",A,s.concat(M.length)));var B=M.length,O=Array.isArray(k);O&&(B=Math.min(B,k.length));var H,Y,j,et,it;if(z.dimensions===2)for(Y=0;YM[Y].length&&w.push(f("unused",A,s.concat(Y,M[Y].length)));var ut=M[Y].length;for(H=0;H<(O?Math.min(ut,k[Y].length):ut);H++)j=O?k[Y][H]:k,et=L[Y][H],it=M[Y][H],g.validate(et,j)?it!==et&&it!==+et&&w.push(f("dynamic",A,s.concat(Y,H),et,it)):w.push(f("value",A,s.concat(Y,H),et))}else w.push(f("array",A,s.concat(Y),L[Y]));else for(Y=0;Y0&&Math.round(m)===m)l=m;else return{vals:n}}for(var h=e.calendar,b=f==="start",u=f==="end",o=r[a+"period0"],d=i(o,h)||0,w=[],A=[],_=[],y=n.length,E=0;ET;)M=S(M,-l,h);for(;M<=T;)M=S(M,l,h);L=S(M,-l,h)}else{for(s=Math.round((T-d)/c),M=d+s*c;M>T;)M-=c;for(;M<=T;)M+=c;L=M-c}w[E]=b?L:u?M:(L+M)/2,A[E]=L,_[E]=M}return{vals:w,starts:A,ends:_}}},26720:function(G){G.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(G,U,t){var g=t(33428),C=t(38248),i=t(3400),S=t(39032).FP_SAFE,x=t(24040),v=t(43616),p=t(79811),r=p.getFromId,e=p.isLinked;G.exports={applyAutorangeOptions:s,getAutoRange:a,makePadFn:f,doAutoRange:h,findExtremes:b,concatExtremes:m};function a(L,M){var z,D,N=[],I=L._fullLayout,k=f(I,M,0),B=f(I,M,1),O=m(L,M),H=O.min,Y=O.max;if(H.length===0||Y.length===0)return i.simpleMap(M.range,M.r2l);var j=H[0].val,et=Y[0].val;for(z=1;z0&&(gt=Q-k(Z)-B(st),gt>ot?Tt/gt>$&&(nt=Z,ct=st,$=Tt/gt):Tt/Q>$&&(nt={val:Z.val,nopad:1},ct={val:st.val,nopad:1},$=Tt/Q));function wt(Lt,Ht){return Math.max(Lt,B(Ht))}if(j===et){var Rt=j-1,bt=j+1;if(tt)if(j===0)N=[0,1];else{var At=(j>0?Y:H).reduce(wt,0),mt=j/(1-Math.min(.5,At/Q));N=j>0?[0,mt]:[mt,0]}else V?N=[Math.max(0,Rt),Math.max(1,bt)]:N=[Rt,bt]}else tt?(nt.val>=0&&(nt={val:0,nopad:1}),ct.val<=0&&(ct={val:0,nopad:1})):V&&(nt.val-$*k(nt)<0&&(nt={val:0,nopad:1}),ct.val<=0&&(ct={val:1,nopad:1})),$=(ct.val-nt.val-n(M,Z.val,st.val))/(Q-k(nt)-B(ct)),N=[nt.val-$*k(nt),ct.val+$*B(ct)];return N=s(N,M),M.limitRange&&M.limitRange(),ut&&N.reverse(),i.simpleMap(N,M.l2r||Number)}function n(L,M,z){var D=0;if(L.rangebreaks)for(var N=L.locateBreaks(M,z),I=0;I0?z.ppadplus:z.ppadminus)||z.ppad||0),Z=ot((L._m>0?z.ppadminus:z.ppadplus)||z.ppad||0),st=ot(z.vpadplus||z.vpad),nt=ot(z.vpadminus||z.vpad);if(!H){if(V=1/0,Q=-1/0,O)for(j=0;j0&&(V=et),et>Q&&et-S&&(V=et),et>Q&&et=Tt;j--)gt(j);return{min:D,max:N,opts:z}}function u(L,M,z,D){d(L,M,z,D,A)}function o(L,M,z,D){d(L,M,z,D,_)}function d(L,M,z,D,N){for(var I=D.tozero,k=D.extrapad,B=!0,O=0;O=z&&(H.extrapad||!k)){B=!1;break}else N(M,H.val)&&H.pad<=z&&(k||!H.extrapad)&&(L.splice(O,1),O--)}if(B){var Y=I&&M===0;L.push({val:M,pad:Y?0:z,extrapad:Y?!1:k})}}function w(L){return C(L)&&Math.abs(L)=M}function y(L,M){var z=M.autorangeoptions;return z&&z.minallowed!==void 0&&T(M,z.minallowed,z.maxallowed)?z.minallowed:z&&z.clipmin!==void 0&&T(M,z.clipmin,z.clipmax)?Math.max(L,M.d2l(z.clipmin)):L}function E(L,M){var z=M.autorangeoptions;return z&&z.maxallowed!==void 0&&T(M,z.minallowed,z.maxallowed)?z.maxallowed:z&&z.clipmax!==void 0&&T(M,z.clipmin,z.clipmax)?Math.min(L,M.d2l(z.clipmax)):L}function T(L,M,z){return M!==void 0&&z!==void 0?(M=L.d2l(M),z=L.d2l(z),M=O&&(I=O,z=O),k<=O&&(k=O,D=O)}}return z=y(z,M),D=E(D,M),[z,D]}},76808:function(G){G.exports=function(t,g,C){var i,S;if(C){var x=g==="reversed"||g==="min reversed"||g==="max reversed";i=C[x?1:0],S=C[x?0:1]}var v=t("autorangeoptions.minallowed",S===null?i:void 0),p=t("autorangeoptions.maxallowed",i===null?S:void 0);v===void 0&&t("autorangeoptions.clipmin"),p===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},54460:function(G,U,t){var g=t(33428),C=t(38248),i=t(7316),S=t(24040),x=t(3400),v=x.strTranslate,p=t(72736),r=t(81668),e=t(76308),a=t(43616),n=t(94724),f=t(98728),c=t(39032),l=c.ONEMAXYEAR,m=c.ONEAVGYEAR,h=c.ONEMINYEAR,b=c.ONEMAXQUARTER,u=c.ONEAVGQUARTER,o=c.ONEMINQUARTER,d=c.ONEMAXMONTH,w=c.ONEAVGMONTH,A=c.ONEMINMONTH,_=c.ONEWEEK,y=c.ONEDAY,E=y/2,T=c.ONEHOUR,s=c.ONEMIN,L=c.ONESEC,M=c.MINUS_SIGN,z=c.BADNUM,D={K:"zeroline"},N={K:"gridline",L:"path"},I={K:"minor-gridline",L:"path"},k={K:"tick",L:"path"},B={K:"tick",L:"text"},O={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},H=t(84284),Y=H.MID_SHIFT,j=H.CAP_SHIFT,et=H.LINE_SPACING,it=H.OPPOSITE_SIDE,ut=3,J=G.exports={};J.setConvert=t(78344);var X=t(52976),tt=t(79811),V=tt.idSort,Q=tt.isLinked;J.id2name=tt.id2name,J.name2id=tt.name2id,J.cleanId=tt.cleanId,J.list=tt.list,J.listIds=tt.listIds,J.getFromId=tt.getFromId,J.getFromTrace=tt.getFromTrace;var ot=t(19280);J.getAutoRange=ot.getAutoRange,J.findExtremes=ot.findExtremes;var $=1e-4;function Z(Yt){var Gt=(Yt[1]-Yt[0])*$;return[Yt[0]-Gt,Yt[1]+Gt]}J.coerceRef=function(Yt,Gt,Ne,Oe,Qe,er){var fr=Oe.charAt(Oe.length-1),rr=Ne._fullLayout._subplots[fr+"axis"],He=Oe+"ref",dr={};return Qe||(Qe=rr[0]||(typeof er=="string"?er:er[0])),er||(er=Qe),rr=rr.concat(rr.map(function(mr){return mr+" domain"})),dr[He]={valType:"enumerated",values:rr.concat(er?typeof er=="string"?[er]:er:[]),dflt:Qe},x.coerce(Yt,Gt,dr,He)},J.getRefType=function(Yt){return Yt===void 0?Yt:Yt==="paper"?"paper":Yt==="pixel"?"pixel":/( domain)$/.test(Yt)?"domain":"range"},J.coercePosition=function(Yt,Gt,Ne,Oe,Qe,er){var fr,rr,He=J.getRefType(Oe);if(He!=="range")fr=x.ensureNumber,rr=Ne(Qe,er);else{var dr=J.getFromId(Gt,Oe);er=dr.fraction2r(er),rr=Ne(Qe,er),fr=dr.cleanPos}Yt[Qe]=fr(rr)},J.cleanPosition=function(Yt,Gt,Ne){var Oe=Ne==="paper"||Ne==="pixel"?x.ensureNumber:J.getFromId(Gt,Ne).cleanPos;return Oe(Yt)},J.redrawComponents=function(Yt,Gt){Gt=Gt||J.listIds(Yt);var Ne=Yt._fullLayout;function Oe(Qe,er,fr,rr){for(var He=S.getComponentMethod(Qe,er),dr={},mr=0;mr2e-6||((Ne-Yt._forceTick0)/Yt._minDtick%1+1.000001)%1>2e-6)&&(Yt._minDtick=0))},J.saveRangeInitial=function(Yt,Gt){for(var Ne=J.list(Yt,"",!0),Oe=!1,Qe=0;Qexr*.3||dr(Oe)||dr(Qe))){var pr=Ne.dtick/2;Yt+=Yt+prfr){var rr=Number(Ne.substr(1));er.exactYears>fr&&rr%12===0?Yt=J.tickIncrement(Yt,"M6","reverse")+y*1.5:er.exactMonths>fr?Yt=J.tickIncrement(Yt,"M1","reverse")+y*15.5:Yt-=E;var He=J.tickIncrement(Yt,Ne);if(He<=Oe)return He}return Yt}J.prepMinorTicks=function(Yt,Gt,Ne){if(!Gt.minor.dtick){delete Yt.dtick;var Oe=Gt.dtick&&C(Gt._tmin),Qe;if(Oe){var er=J.tickIncrement(Gt._tmin,Gt.dtick,!0);Qe=[Gt._tmin,er*.99+Gt._tmin*.01]}else{var fr=x.simpleMap(Gt.range,Gt.r2l);Qe=[fr[0],.8*fr[0]+.2*fr[1]]}if(Yt.range=x.simpleMap(Qe,Gt.l2r),Yt._isMinor=!0,J.prepTicks(Yt,Ne),Oe){var rr=C(Gt.dtick),He=C(Yt.dtick),dr=rr?Gt.dtick:+Gt.dtick.substring(1),mr=He?Yt.dtick:+Yt.dtick.substring(1);rr&&He?wt(dr,mr)?dr===2*_&&mr===2*y&&(Yt.dtick=_):dr===2*_&&mr===3*y?Yt.dtick=_:dr===_&&!(Gt._input.minor||{}).nticks?Yt.dtick=y:Rt(dr/mr,2.5)?Yt.dtick=dr/2:Yt.dtick=dr:String(Gt.dtick).charAt(0)==="M"?He?Yt.dtick="M1":wt(dr,mr)?dr>=12&&mr===2&&(Yt.dtick="M3"):Yt.dtick=Gt.dtick:String(Yt.dtick).charAt(0)==="L"?String(Gt.dtick).charAt(0)==="L"?wt(dr,mr)||(Yt.dtick=Rt(dr/mr,2.5)?Gt.dtick/2:Gt.dtick):Yt.dtick="D1":Yt.dtick==="D2"&&+Gt.dtick>1&&(Yt.dtick=1)}Yt.range=Gt.range}Gt.minor._tick0Init===void 0&&(Yt.tick0=Gt.tick0)};function wt(Yt,Gt){return Math.abs((Yt/Gt+.5)%1-.5)<.001}function Rt(Yt,Gt){return Math.abs(Yt/Gt-1)<.001}J.prepTicks=function(Yt,Gt){var Ne=x.simpleMap(Yt.range,Yt.r2l,void 0,void 0,Gt);if(Yt.tickmode==="auto"||!Yt.dtick){var Oe=Yt.nticks,Qe;Oe||(Yt.type==="category"||Yt.type==="multicategory"?(Qe=Yt.tickfont?x.bigFont(Yt.tickfont.size||12):15,Oe=Yt._length/Qe):(Qe=Yt._id.charAt(0)==="y"?40:80,Oe=x.constrain(Yt._length/Qe,4,9)+1),Yt._name==="radialaxis"&&(Oe*=2)),Yt.minor&&Yt.minor.tickmode!=="array"||Yt.tickmode==="array"&&(Oe*=100),Yt._roughDTick=Math.abs(Ne[1]-Ne[0])/Oe,J.autoTicks(Yt,Yt._roughDTick),Yt._minDtick>0&&Yt.dtick0?(er=Oe-1,fr=Oe):(er=Oe,fr=Oe);var rr=Yt[er].value,He=Yt[fr].value,dr=Math.abs(He-rr),mr=Ne||dr,xr=0;mr>=h?dr>=h&&dr<=l?xr=dr:xr=m:Ne===u&&mr>=o?dr>=o&&dr<=b?xr=dr:xr=u:mr>=A?dr>=A&&dr<=d?xr=dr:xr=w:Ne===_&&mr>=_?xr=_:mr>=y?xr=y:Ne===E&&mr>=E?xr=E:Ne===T&&mr>=T&&(xr=T);var pr;xr>=dr&&(xr=dr,pr=!0);var Gr=Qe+xr;if(Gt.rangebreaks&&xr>0){for(var Pr=84,Dr=0,cn=0;cn_&&(xr=dr)}(xr>0||Oe===0)&&(Yt[Oe].periodX=Qe+xr/2)}}J.calcTicks=function(Gt,Ne){for(var Oe=Gt.type,Qe=Gt.calendar,er=Gt.ticklabelstep,fr=Gt.ticklabelmode==="period",rr=x.simpleMap(Gt.range,Gt.r2l,void 0,void 0,Ne),He=rr[1]=(cn?0:1);rn--){var Cn=!rn;rn?(Gt._dtickInit=Gt.dtick,Gt._tick0Init=Gt.tick0):(Gt.minor._dtickInit=Gt.minor.dtick,Gt.minor._tick0Init=Gt.minor.tick0);var En=rn?Gt:x.extendFlat({},Gt,Gt.minor);if(Cn?J.prepMinorTicks(En,Gt,Ne):J.prepTicks(En,Ne),En.tickmode==="array"){rn?(Pr=[],pr=Ut(Gt,!Cn)):(Dr=[],Gr=Ut(Gt,!Cn));continue}if(En.tickmode==="sync"){Pr=[],pr=Ht(Gt);continue}var Tr=Z(rr),Cr=Tr[0],Wr=Tr[1],Ur=C(En.dtick),an=Oe==="log"&&!(Ur||En.dtick.charAt(0)==="L"),pn=J.tickFirst(En,Ne);if(rn){if(Gt._tmin=pn,pn=Wr:_n<=Wr;_n=J.tickIncrement(_n,ci,He,Qe)){if(rn&&kn++,En.rangebreaks&&!He){if(_n=mr)break}if(Pr.length>xr||_n===gn)break;gn=_n;var di={value:_n};rn?(an&&_n!==(_n|0)&&(di.simpleLabel=!0),er>1&&kn%er&&(di.skipLabel=!0),Pr.push(di)):(di.minor=!0,Dr.push(di))}}if(cn){var li=Gt.minor.ticks==="inside"&&Gt.ticks==="outside"||Gt.minor.ticks==="outside"&&Gt.ticks==="inside";if(!li){for(var ri=Pr.map(function(hn){return hn.value}),wr=[],nn=0;nn-1;An--){if(Pr[An].drop){Pr.splice(An,1);continue}Pr[An].value=Ve(Pr[An].value,Gt);var Di=Gt.c2p(Pr[An].value);(Bn?gi>Di-Jn:gimr||Ormr&&(Ar.periodX=mr),OrQe&&prm)Gt/=m,Oe=Qe(10),Yt.dtick="M"+12*he(Gt,Oe,kt);else if(er>w)Gt/=w,Yt.dtick="M"+he(Gt,1,Vt);else if(er>y){if(Yt.dtick=he(Gt,y,Yt._hasDayOfWeekBreaks?[1,2,7,14]:re),!Ne){var fr=J.getTickFormat(Yt),rr=Yt.ticklabelmode==="period";rr&&(Yt._rawTick0=Yt.tick0),/%[uVW]/.test(fr)?Yt.tick0=x.dateTick0(Yt.calendar,2):Yt.tick0=x.dateTick0(Yt.calendar,1),rr&&(Yt._dowTick0=Yt.tick0)}}else er>T?Yt.dtick=he(Gt,T,Vt):er>s?Yt.dtick=he(Gt,s,It):er>L?Yt.dtick=he(Gt,L,It):(Oe=Qe(10),Yt.dtick=he(Gt,Oe,kt))}else if(Yt.type==="log"){Yt.tick0=0;var He=x.simpleMap(Yt.range,Yt.r2l);if(Yt._isMinor&&(Gt*=1.5),Gt>.7)Yt.dtick=Math.ceil(Gt);else if(Math.abs(He[1]-He[0])<1){var dr=1.5*Math.abs((He[1]-He[0])/Gt);Gt=Math.abs(Math.pow(10,He[1])-Math.pow(10,He[0]))/dr,Oe=Qe(10),Yt.dtick="L"+he(Gt,Oe,kt)}else Yt.dtick=Gt>.3?"D2":"D1"}else Yt.type==="category"||Yt.type==="multicategory"?(Yt.tick0=0,Yt.dtick=Math.ceil(Math.max(Gt,1))):ke(Yt)?(Yt.tick0=0,Oe=1,Yt.dtick=he(Gt,Oe,le)):(Yt.tick0=0,Oe=Qe(10),Yt.dtick=he(Gt,Oe,kt));if(Yt.dtick===0&&(Yt.dtick=1),!C(Yt.dtick)&&typeof Yt.dtick!="string"){var mr=Yt.dtick;throw Yt.dtick=1,"ax.dtick error: "+String(mr)}};function de(Yt){var Gt=Yt.dtick;if(Yt._tickexponent=0,!C(Gt)&&typeof Gt!="string"&&(Gt=1),(Yt.type==="category"||Yt.type==="multicategory")&&(Yt._tickround=null),Yt.type==="date"){var Ne=Yt.r2l(Yt.tick0),Oe=Yt.l2r(Ne).replace(/(^-|i)/g,""),Qe=Oe.length;if(String(Gt).charAt(0)==="M")Qe>10||Oe.substr(5)!=="01-01"?Yt._tickround="d":Yt._tickround=+Gt.substr(1)%12===0?"y":"m";else if(Gt>=y&&Qe<=10||Gt>=y*15)Yt._tickround="d";else if(Gt>=s&&Qe<=16||Gt>=T)Yt._tickround="M";else if(Gt>=L&&Qe<=19||Gt>=s)Yt._tickround="S";else{var er=Yt.l2r(Ne+Gt).replace(/^-/,"").length;Yt._tickround=Math.max(Qe,er)-20,Yt._tickround<0&&(Yt._tickround=4)}}else if(C(Gt)||Gt.charAt(0)==="L"){var fr=Yt.range.map(Yt.r2d||Number);C(Gt)||(Gt=Number(Gt.substr(1))),Yt._tickround=2-Math.floor(Math.log(Gt)/Math.LN10+.01);var rr=Math.max(Math.abs(fr[0]),Math.abs(fr[1])),He=Math.floor(Math.log(rr)/Math.LN10+.01),dr=Yt.minexponent===void 0?3:Yt.minexponent;Math.abs(He)>dr&&(yt(Yt.exponentformat)&&!Et(He)?Yt._tickexponent=3*Math.round((He-1)/3):Yt._tickexponent=He)}else Yt._tickround=null}J.tickIncrement=function(Yt,Gt,Ne,Oe){var Qe=Ne?-1:1;if(C(Gt))return x.increment(Yt,Qe*Gt);var er=Gt.charAt(0),fr=Qe*Number(Gt.substr(1));if(er==="M")return x.incrementMonth(Yt,fr,Oe);if(er==="L")return Math.log(Math.pow(10,Yt)+fr)/Math.LN10;if(er==="D"){var rr=Gt==="D2"?$t:Kt,He=Yt+Qe*.01,dr=x.roundUp(x.mod(He,1),rr,Ne);return Math.floor(He)+Math.log(g.round(Math.pow(10,dr),1))/Math.LN10}throw"unrecognized dtick "+String(Gt)},J.tickFirst=function(Yt,Gt){var Ne=Yt.r2l||Number,Oe=x.simpleMap(Yt.range,Ne,void 0,void 0,Gt),Qe=Oe[1]=0&&rn<=Yt._length?cn:null};if(er&&x.isArrayOrTypedArray(Yt.ticktext)){var xr=x.simpleMap(Yt.range,Yt.r2l),pr=(Math.abs(xr[1]-xr[0])-(Yt._lBreaks||0))/1e4;for(dr=0;dr"+rr;else{var dr=Je(Yt),mr=Yt._trueSide||Yt.side;(!dr&&mr==="top"||dr&&mr==="bottom")&&(fr+="
    ")}Gt.text=fr}function ne(Yt,Gt,Ne,Oe,Qe){var er=Yt.dtick,fr=Gt.x,rr=Yt.tickformat,He=typeof er=="string"&&er.charAt(0);if(Qe==="never"&&(Qe=""),Oe&&He!=="L"&&(er="L3",He="L"),rr||He==="L")Gt.text=Mt(Math.pow(10,fr),Yt,Qe,Oe);else if(C(er)||He==="D"&&x.mod(fr+.01,1)<.1){var dr=Math.round(fr),mr=Math.abs(dr),xr=Yt.exponentformat;xr==="power"||yt(xr)&&Et(dr)?(dr===0?Gt.text=1:dr===1?Gt.text="10":Gt.text="10"+(dr>1?"":M)+mr+"",Gt.fontSize*=1.25):(xr==="e"||xr==="E")&&mr>2?Gt.text="1"+xr+(dr>0?"+":M)+mr:(Gt.text=Mt(Math.pow(10,fr),Yt,"","fakehover"),er==="D1"&&Yt._id.charAt(0)==="y"&&(Gt.dy-=Gt.fontSize/6))}else if(He==="D")Gt.text=String(Math.round(Math.pow(10,x.mod(fr,1)))),Gt.fontSize*=.75;else throw"unrecognized dtick "+String(er);if(Yt.dtick==="D1"){var pr=String(Gt.text).charAt(0);(pr==="0"||pr==="1")&&(Yt._id.charAt(0)==="y"?Gt.dx-=Gt.fontSize/4:(Gt.dy+=Gt.fontSize/2,Gt.dx+=(Yt.range[1]>Yt.range[0]?1:-1)*Gt.fontSize*(fr<0?.5:.25)))}}function zt(Yt,Gt){var Ne=Yt._categories[Math.round(Gt.x)];Ne===void 0&&(Ne=""),Gt.text=String(Ne)}function Xt(Yt,Gt,Ne){var Oe=Math.round(Gt.x),Qe=Yt._categories[Oe]||[],er=Qe[1]===void 0?"":String(Qe[1]),fr=Qe[0]===void 0?"":String(Qe[0]);Ne?Gt.text=fr+" - "+er:(Gt.text=er,Gt.text2=fr)}function Jt(Yt,Gt,Ne,Oe,Qe){Qe==="never"?Qe="":Yt.showexponent==="all"&&Math.abs(Gt.x/Yt.dtick)<1e-6&&(Qe="hide"),Gt.text=Mt(Gt.x,Yt,Qe,Oe)}function Wt(Yt,Gt,Ne,Oe,Qe){if(Yt.thetaunit==="radians"&&!Ne){var er=Gt.x/180;if(er===0)Gt.text="0";else{var fr=Ft(er);if(fr[1]>=100)Gt.text=Mt(x.deg2rad(Gt.x),Yt,Qe,Oe);else{var rr=Gt.x<0;fr[1]===1?fr[0]===1?Gt.text="π":Gt.text=fr[0]+"π":Gt.text=["",fr[0],"","⁄","",fr[1],"","π"].join(""),rr&&(Gt.text=M+Gt.text)}}}else Gt.text=Mt(Gt.x,Yt,Qe,Oe)}function Ft(Yt){function Gt(rr,He){return Math.abs(rr-He)<=1e-6}function Ne(rr,He){return Gt(He,0)?rr:Ne(He,rr%He)}function Oe(rr){for(var He=1;!Gt(Math.round(rr*He)/He,rr);)He*=10;return He}var Qe=Oe(Yt),er=Yt*Qe,fr=Math.abs(Ne(er,Qe));return[Math.round(er/fr),Math.round(Qe/fr)]}var xt=["f","p","n","μ","m","","k","M","G","T"];function yt(Yt){return Yt==="SI"||Yt==="B"}function Et(Yt){return Yt>14||Yt<-15}function Mt(Yt,Gt,Ne,Oe){var Qe=Yt<0,er=Gt._tickround,fr=Ne||Gt.exponentformat||"B",rr=Gt._tickexponent,He=J.getTickFormat(Gt),dr=Gt.separatethousands;if(Oe){var mr={exponentformat:fr,minexponent:Gt.minexponent,dtick:Gt.showexponent==="none"?Gt.dtick:C(Yt)&&Math.abs(Yt)||1,range:Gt.showexponent==="none"?Gt.range.map(Gt.r2d):[0,Yt||1]};de(mr),er=(Number(mr._tickround)||0)+4,rr=mr._tickexponent,Gt.hoverformat&&(He=Gt.hoverformat)}if(He)return Gt._numFormat(He)(Yt).replace(/-/g,M);var xr=Math.pow(10,-er)/2;if(fr==="none"&&(rr=0),Yt=Math.abs(Yt),Yt"+Pr+"":fr==="B"&&rr===9?Yt+="B":yt(fr)&&(Yt+=xt[rr/3+5])}return Qe?M+Yt:Yt}J.getTickFormat=function(Yt){var Gt;function Ne(He){return typeof He!="string"?He:Number(He.replace("M",""))*w}function Oe(He,dr){var mr=["L","D"];if(typeof He==typeof dr){if(typeof He=="number")return He-dr;var xr=mr.indexOf(He.charAt(0)),pr=mr.indexOf(dr.charAt(0));return xr===pr?Number(He.replace(/(L|D)/g,""))-Number(dr.replace(/(L|D)/g,"")):xr-pr}else return typeof He=="number"?1:-1}function Qe(He,dr,mr){var xr=mr||function(Pr){return Pr},pr=dr[0],Gr=dr[1];return(!pr&&typeof pr!="number"||xr(pr)<=xr(He))&&(!Gr&&typeof Gr!="number"||xr(Gr)>=xr(He))}function er(He,dr){var mr=dr[0]===null,xr=dr[1]===null,pr=Oe(He,dr[0])>=0,Gr=Oe(He,dr[1])<=0;return(mr||pr)&&(xr||Gr)}var fr,rr;if(Yt.tickformatstops&&Yt.tickformatstops.length>0)switch(Yt.type){case"date":case"linear":{for(Gt=0;Gt=0&&Qe.unshift(Qe.splice(mr,1).shift())}});var rr={false:{left:0,right:0}};return x.syncOrAsync(Qe.map(function(He){return function(){if(He){var dr=J.getFromId(Yt,He);Ne||(Ne={}),Ne.axShifts=rr,Ne.overlayingShiftedAx=fr;var mr=J.drawOne(Yt,dr,Ne);return dr._shiftPusher&&hr(dr,dr._fullDepth||0,rr,!0),dr._r=dr.range.slice(),dr._rl=x.simpleMap(dr._r,dr.r2l),mr}}}))},J.drawOne=function(Yt,Gt,Ne){Ne=Ne||{};var Oe=Ne.axShifts||{},Qe=Ne.overlayingShiftedAx||[],er,fr,rr;Gt.setScale();var He=Yt._fullLayout,dr=Gt._id,mr=dr.charAt(0),xr=J.counterLetter(dr),pr=He._plots[Gt._mainSubplot];if(!pr)return;if(Gt._shiftPusher=Gt.autoshift||Qe.indexOf(Gt._id)!==-1||Qe.indexOf(Gt.overlaying)!==-1,Gt._shiftPusher&Gt.anchor==="free"){var Gr=Gt.linewidth/2||0;Gt.ticks==="inside"&&(Gr+=Gt.ticklen),hr(Gt,Gr,Oe,!0),hr(Gt,Gt.shift||0,Oe,!1)}(Ne.skipTitle!==!0||Gt._shift===void 0)&&(Gt._shift=vr(Gt,Oe));var Pr=pr[mr+"axislayer"],Dr=Gt._mainLinePosition,cn=Dr+=Gt._shift,rn=Gt._mainMirrorPosition,Cn=Gt._vals=J.calcTicks(Gt),En=[Gt.mirror,cn,rn].join("_");for(er=0;er0?Pn.bottom-wn:0,Ln))));var ai=0,pi=0;if(Gt._shiftPusher&&(ai=Math.max(Ln,Pn.height>0?Hr==="l"?wn-Pn.left:Pn.right-wn:0),Gt.title.text!==He._dfltTitle[mr]&&(pi=(Gt._titleStandoff||0)+(Gt._titleScoot||0),Hr==="l"&&(pi+=Be(Gt))),Gt._fullDepth=Math.max(ai,pi)),Gt.automargin){Un={x:0,y:0,r:0,l:0,t:0,b:0};var Ci=[0,1],pa=typeof Gt._shift=="number"?Gt._shift:0;if(mr==="x"){if(Hr==="b"?Un[Hr]=Gt._depth:(Un[Hr]=Gt._depth=Math.max(Pn.width>0?wn-Pn.top:0,Ln),Ci.reverse()),Pn.width>0){var ea=Pn.right-(Gt._offset+Gt._length);ea>0&&(Un.xr=1,Un.r=ea);var Eo=Gt._offset-Pn.left;Eo>0&&(Un.xl=0,Un.l=Eo)}}else if(Hr==="l"?(Gt._depth=Math.max(Pn.height>0?wn-Pn.left:0,Ln),Un[Hr]=Gt._depth-pa):(Gt._depth=Math.max(Pn.height>0?Pn.right-wn:0,Ln),Un[Hr]=Gt._depth+pa,Ci.reverse()),Pn.height>0){var xo=Pn.bottom-(Gt._offset+Gt._length);xo>0&&(Un.yb=0,Un.b=xo);var Qa=Gt._offset-Pn.top;Qa>0&&(Un.yt=1,Un.t=Qa)}Un[xr]=Gt.anchor==="free"?Gt.position:Gt._anchorAxis.domain[Ci[0]],Gt.title.text!==He._dfltTitle[mr]&&(Un[Hr]+=Be(Gt)+(Gt.title.standoff||0)),Gt.mirror&&Gt.anchor!=="free"&&(On={x:0,y:0,r:0,l:0,t:0,b:0},On[Qr]=Gt.linewidth,Gt.mirror&&Gt.mirror!==!0&&(On[Qr]+=Ln),Gt.mirror===!0||Gt.mirror==="ticks"?On[xr]=Gt._anchorAxis.domain[Ci[1]]:(Gt.mirror==="all"||Gt.mirror==="allticks")&&(On[xr]=[Gt._counterDomainMin,Gt._counterDomainMax][Ci[1]]))}Zr&&(mi=S.getComponentMethod("rangeslider","autoMarginOpts")(Yt,Gt)),typeof Gt.automargin=="string"&&(Nt(Un,Gt.automargin),Nt(On,Gt.automargin)),i.autoMargin(Yt,$e(Gt),Un),i.autoMargin(Yt,ge(Gt),On),i.autoMargin(Yt,se(Gt),mi)}),x.syncOrAsync(sn)}};function Nt(Yt,Gt){if(Yt){var Ne=Object.keys(O).reduce(function(Oe,Qe){return Gt.indexOf(Qe)!==-1&&O[Qe].forEach(function(er){Oe[er]=1}),Oe},{});Object.keys(Yt).forEach(function(Oe){Ne[Oe]||(Oe.length===1?Yt[Oe]=0:delete Yt[Oe])})}}function jt(Yt,Gt){var Ne=[],Oe,Qe=function(er,fr){var rr=er.xbnd[fr];rr!==null&&Ne.push(x.extendFlat({},er,{x:rr}))};if(Gt.length){for(Oe=0;Oe60?-.5*ci:Yt.side==="top"!==mr?-ci:0};else if(Ur==="y"){if(pn=!mr&&Wr==="left"||mr&&Wr==="right",Tr=pn?1:-1,mr&&(Tr*=-1),rn=pr,Cn=Gr*Tr,En=0,!mr&&Math.abs(an)===90&&(an===-90&&Wr==="left"||an===90&&Wr==="right"?En=j:En=.5),mr){var gn=C(an)?+an:0;if(gn!==0){var _n=x.deg2rad(gn);Cr=Math.abs(Math.sin(_n))*j*Tr,En=0}}cn.xFn=function(kn){return kn.dx+Gt-(rn+kn.fontSize*En)*Tr+Cr*kn.fontSize},cn.yFn=function(kn){return kn.dy+Cn+kn.fontSize*Y},cn.anchorFn=function(kn,ni){return C(ni)&&Math.abs(ni)===90?"middle":pn?"end":"start"},cn.heightFn=function(kn,ni,ci){return Yt.side==="right"&&(ni*=-1),ni<-30?-ci:ni<30?-.5*ci:0}}return cn};function ce(Yt){return[Yt.text,Yt.x,Yt.axInfo,Yt.font,Yt.fontSize,Yt.fontColor].join("_")}J.drawTicks=function(Yt,Gt,Ne){Ne=Ne||{};var Oe=Gt._id+"tick",Qe=[].concat(Gt.minor&&Gt.minor.ticks?Ne.vals.filter(function(fr){return fr.minor&&!fr.noTick}):[]).concat(Gt.ticks?Ne.vals.filter(function(fr){return!fr.minor&&!fr.noTick}):[]),er=Ne.layer.selectAll("path."+Oe).data(Qe,ce);er.exit().remove(),er.enter().append("path").classed(Oe,1).classed("ticks",1).classed("crisp",Ne.crisp!==!1).each(function(fr){return e.stroke(g.select(this),fr.minor?Gt.minor.tickcolor:Gt.tickcolor)}).style("stroke-width",function(fr){return a.crispRound(Yt,fr.minor?Gt.minor.tickwidth:Gt.tickwidth,1)+"px"}).attr("d",Ne.path).style("display",null),ur(Gt,[k]),er.attr("transform",Ne.transFn)},J.drawGrid=function(Yt,Gt,Ne){if(Ne=Ne||{},Gt.tickmode!=="sync"){var Oe=Gt._id+"grid",Qe=Gt.minor&&Gt.minor.showgrid,er=Qe?Ne.vals.filter(function(rn){return rn.minor}):[],fr=Gt.showgrid?Ne.vals.filter(function(rn){return!rn.minor}):[],rr=Ne.counterAxis;if(rr&&J.shouldShowZeroLine(Yt,Gt,rr))for(var He=Gt.tickmode==="array",dr=0;dr=0;Pr--){var Dr=Pr?pr:Gr;if(Dr){var cn=Dr.selectAll("path."+Oe).data(Pr?fr:er,ce);cn.exit().remove(),cn.enter().append("path").classed(Oe,1).classed("crisp",Ne.crisp!==!1),cn.attr("transform",Ne.transFn).attr("d",Ne.path).each(function(rn){return e.stroke(g.select(this),rn.minor?Gt.minor.gridcolor:Gt.gridcolor||"#ddd")}).style("stroke-dasharray",function(rn){return a.dashStyle(rn.minor?Gt.minor.griddash:Gt.griddash,rn.minor?Gt.minor.gridwidth:Gt.gridwidth)}).style("stroke-width",function(rn){return(rn.minor?xr:Gt._gw)+"px"}).style("display",null),typeof Ne.path=="function"&&cn.attr("d",Ne.path)}}ur(Gt,[N,I])}},J.drawZeroLine=function(Yt,Gt,Ne){Ne=Ne||Ne;var Oe=Gt._id+"zl",Qe=J.shouldShowZeroLine(Yt,Gt,Ne.counterAxis),er=Ne.layer.selectAll("path."+Oe).data(Qe?[{x:0,id:Gt._id}]:[]);er.exit().remove(),er.enter().append("path").classed(Oe,1).classed("zl",1).classed("crisp",Ne.crisp!==!1).each(function(){Ne.layer.selectAll("path").sort(function(fr,rr){return V(fr.id,rr.id)})}),er.attr("transform",Ne.transFn).attr("d",Ne.path).call(e.stroke,Gt.zerolinecolor||e.defaultLine).style("stroke-width",a.crispRound(Yt,Gt.zerolinewidth,Gt._gw||1)+"px").style("display",null),ur(Gt,[D])},J.drawLabels=function(Yt,Gt,Ne){Ne=Ne||{};var Oe=Yt._fullLayout,Qe=Gt._id,er=Ne.cls||Qe+"tick",fr=Ne.vals.filter(function(wr){return wr.text}),rr=Ne.labelFns,He=Ne.secondary?0:Gt.tickangle,dr=(Gt._prevTickAngles||{})[er],mr=Ne.layer.selectAll("g."+er).data(Gt.showticklabels?fr:[],ce),xr=[];mr.enter().append("g").classed(er,1).append("text").attr("text-anchor","middle").each(function(wr){var nn=g.select(this),$r=Yt._promises.length;nn.call(p.positionText,rr.xFn(wr),rr.yFn(wr)).call(a.font,wr.font,wr.fontSize,wr.fontColor).text(wr.text).call(p.convertToTspans,Yt),Yt._promises[$r]?xr.push(Yt._promises.pop().then(function(){pr(nn,He)})):pr(nn,He)}),ur(Gt,[B]),mr.exit().remove(),Ne.repositionOnUpdate&&mr.each(function(wr){g.select(this).select("text").call(p.positionText,rr.xFn(wr),rr.yFn(wr))});function pr(wr,nn){wr.each(function($r){var dn=g.select(this),Vn=dn.select(".text-math-group"),Tn=rr.anchorFn($r,nn),An=Ne.transFn.call(dn.node(),$r)+(C(nn)&&+nn!=0?" rotate("+nn+","+rr.xFn($r)+","+(rr.yFn($r)-$r.fontSize/2)+")":""),Bn=p.lineCount(dn),Jn=et*$r.fontSize,gi=rr.heightFn($r,C(nn)?+nn:0,(Bn-1)*Jn);if(gi&&(An+=v(0,gi)),Vn.empty()){var Di=dn.select("text");Di.attr({transform:An,"text-anchor":Tn}),Di.style("opacity",1),Gt._adjustTickLabelsOverflow&&Gt._adjustTickLabelsOverflow()}else{var Sr=a.bBox(Vn.node()).width,kr=Sr*{end:-.5,start:.5}[Tn];Vn.attr("transform",An+v(kr,0))}})}Gt._adjustTickLabelsOverflow=function(){var wr=Gt.ticklabeloverflow;if(!(!wr||wr==="allow")){var nn=wr.indexOf("hide")!==-1,$r=Gt._id.charAt(0)==="x",dn=0,Vn=$r?Yt._fullLayout.width:Yt._fullLayout.height;if(wr.indexOf("domain")!==-1){var Tn=x.simpleMap(Gt.range,Gt.r2l);dn=Gt.l2p(Tn[0])+Gt._offset,Vn=Gt.l2p(Tn[1])+Gt._offset}var An=Math.min(dn,Vn),Bn=Math.max(dn,Vn),Jn=Gt.side,gi=1/0,Di=-1/0;mr.each(function(Or){var xn=g.select(this),In=xn.select(".text-math-group");if(In.empty()){var hn=a.bBox(xn.node()),sn=0;$r?(hn.right>Bn||hn.leftBn||hn.top+(Gt.tickangle?0:Or.fontSize/4)Gt["_visibleLabelMin_"+Tn._id]?Or.style("display","none"):Bn.K==="tick"&&!An&&Or.style("display",null)})})})})},pr(mr,dr+1?dr:He);function Gr(){return xr.length&&Promise.all(xr)}var Pr=null;function Dr(){if(pr(mr,He),fr.length&&Gt.autotickangles&&(Gt.type!=="log"||String(Gt.dtick).charAt(0)!=="D")){Pr=Gt.autotickangles[0];var wr=0,nn=[],$r,dn=1;if(mr.each(function(Ln){wr=Math.max(wr,Ln.fontSize);var Pn=Gt.l2p(Ln.x),Un=or(this),On=a.bBox(Un.node());dn=Math.max(dn,p.lineCount(Un)),nn.push({top:0,bottom:10,height:10,left:Pn-On.width/2,right:Pn+On.width/2+2,width:On.width+2})}),(Gt.tickson==="boundaries"||Gt.showdividers)&&!Ne.secondary){var Vn=2;for(Gt.ticks&&(Vn+=Gt.tickwidth/2),$r=0;$rdi*ci&&(_n=ci,an[Ur]=pn[Ur]=kn[Ur])}var li=Math.abs(_n-gn);li-Tr>0?(li-=Tr,Tr*=1+Tr/li):Tr=0,Gt._id.charAt(0)!=="y"&&(Tr=-Tr),an[Wr]=Cn.p2r(Cn.r2p(pn[Wr])+Cr*Tr),Cn.autorange==="min"||Cn.autorange==="max reversed"?(an[0]=null,Cn._rangeInitial0=void 0,Cn._rangeInitial1=void 0):(Cn.autorange==="max"||Cn.autorange==="min reversed")&&(an[1]=null,Cn._rangeInitial0=void 0,Cn._rangeInitial1=void 0),Oe._insideTickLabelsUpdaterange[Cn._name+".range"]=an}var ri=x.syncOrAsync(cn);return ri&&ri.then&&Yt._promises.push(ri),ri};function Te(Yt,Gt,Ne){var Oe=Gt._id+"divider",Qe=Ne.vals,er=Ne.layer.selectAll("path."+Oe).data(Qe,ce);er.exit().remove(),er.enter().insert("path",":first-child").classed(Oe,1).classed("crisp",1).call(e.stroke,Gt.dividercolor).style("stroke-width",a.crispRound(Yt,Gt.dividerwidth,1)+"px"),er.attr("transform",Ne.transFn).attr("d",Ne.path)}J.getPxPosition=function(Yt,Gt){var Ne=Yt._fullLayout._size,Oe=Gt._id.charAt(0),Qe=Gt.side,er;if(Gt.anchor!=="free"?er=Gt._anchorAxis:Oe==="x"?er={_offset:Ne.t+(1-(Gt.position||0))*Ne.h,_length:0}:Oe==="y"&&(er={_offset:Ne.l+(Gt.position||0)*Ne.w+Gt._shift,_length:0}),Qe==="top"||Qe==="left")return er._offset;if(Qe==="bottom"||Qe==="right")return er._offset+er._length};function Be(Yt){var Gt=Yt.title.font.size,Ne=(Yt.title.text.match(p.BR_TAG_ALL)||[]).length;return Yt.title.hasOwnProperty("standoff")?Ne?Gt*(j+Ne*et):Gt*j:Ne?Gt*(Ne+1)*et:Gt}function ir(Yt,Gt){var Ne=Yt._fullLayout,Oe=Gt._id,Qe=Oe.charAt(0),er=Gt.title.font.size,fr;if(Gt.title.hasOwnProperty("standoff"))fr=Gt._depth+Gt.title.standoff+Be(Gt);else{var rr=Je(Gt);if(Gt.type==="multicategory")fr=Gt._depth;else{var He=1.5*er;rr&&(He=.5*er,Gt.ticks==="outside"&&(He+=Gt.ticklen)),fr=10+He+(Gt.linewidth?Gt.linewidth-1:0)}rr||(Qe==="x"?fr+=Gt.side==="top"?er*(Gt.showticklabels?1:0):er*(Gt.showticklabels?1.5:.5):fr+=Gt.side==="right"?er*(Gt.showticklabels?1:.5):er*(Gt.showticklabels?.5:0))}var dr=J.getPxPosition(Yt,Gt),mr,xr,pr;Qe==="x"?(xr=Gt._offset+Gt._length/2,pr=Gt.side==="top"?dr-fr:dr+fr):(pr=Gt._offset+Gt._length/2,xr=Gt.side==="right"?dr+fr:dr-fr,mr={rotate:"-90",offset:0});var Gr;if(Gt.type!=="multicategory"){var Pr=Gt._selections[Gt._id+"tick"];if(Gr={selection:Pr,side:Gt.side},Pr&&Pr.node()&&Pr.node().parentNode){var Dr=a.getTranslate(Pr.node().parentNode);Gr.offsetLeft=Dr.x,Gr.offsetTop=Dr.y}Gt.title.hasOwnProperty("standoff")&&(Gr.pad=0)}return Gt._titleStandoff=fr,r.draw(Yt,Oe+"title",{propContainer:Gt,propName:Gt._name+".title.text",placeholder:Ne._dfltTitle[Qe],avoid:Gr,transform:mr,attributes:{x:xr,y:pr,"text-anchor":"middle"}})}J.shouldShowZeroLine=function(Yt,Gt,Ne){var Oe=x.simpleMap(Gt.range,Gt.r2l);return Oe[0]*Oe[1]<=0&&Gt.zeroline&&(Gt.type==="linear"||Gt.type==="-")&&!(Gt.rangebreaks&&Gt.maskBreaks(0)===z)&&(pe(Gt,0)||!Xe(Yt,Gt,Ne,Oe)||Ke(Yt,Gt))},J.clipEnds=function(Yt,Gt){return Gt.filter(function(Ne){return pe(Yt,Ne.x)})};function pe(Yt,Gt){var Ne=Yt.l2p(Gt);return Ne>1&&Ne1)for(Qe=1;Qe=Qe.min&&Yto*2}function n(l){return Math.max(1,(l-1)/1e3)}function f(l,m){for(var h=l.length,b=n(h),u=0,o=0,d={},w=0;wu*2}function c(l){return S(l[0])&&S(l[1])}},28336:function(G,U,t){var g=t(38248),C=t(24040),i=t(3400),S=t(31780),x=t(51272),v=t(94724),p=t(26332),r=t(25404),e=t(95936),a=t(42568),n=t(22416),f=t(42136),c=t(96312),l=t(78344),m=t(33816).WEEKDAY_PATTERN,h=t(33816).HOUR_PATTERN;G.exports=function(w,A,_,y,E){var T=y.letter,s=y.font||{},L=y.splomStash||{},M=_("visible",!y.visibleDflt),z=A._template||{},D=A.type||z.type||"-",N;if(D==="date"){var I=C.getComponentMethod("calendars","handleDefaults");I(w,A,"calendar",y.calendar),y.noTicklabelmode||(N=_("ticklabelmode"))}var k="";(!y.noTicklabelposition||D==="multicategory")&&(k=i.coerce(w,A,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:N==="period"?["outside","inside"]:T==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),y.noTicklabeloverflow||_("ticklabeloverflow",k.indexOf("inside")!==-1?"hide past domain":D==="category"||D==="multicategory"?"allow":"hide past div"),l(A,E),c(w,A,_,y),n(w,A,_,y),D!=="category"&&!y.noHover&&_("hoverformat");var B=_("color"),O=B!==v.color.dflt?B:s.color,H=L.label||E._dfltTitle[T];if(a(w,A,_,D,y),!M)return A;_("title.text",H),i.coerceFont(_,"title.font",{family:s.family,size:i.bigFont(s.size),color:O}),p(w,A,_,D);var Y=y.hasMinor;if(Y&&(S.newContainer(A,"minor"),p(w,A,_,D,{isMinor:!0})),e(w,A,_,D,y),r(w,A,_,y),Y){var j=y.isMinor;y.isMinor=!0,r(w,A,_,y),y.isMinor=j}f(w,A,_,{dfltColor:B,bgColor:y.bgColor,showGrid:y.showGrid,hasMinor:Y,attributes:v}),Y&&!A.minor.ticks&&!A.minor.showgrid&&delete A.minor,(A.showline||A.ticks)&&_("mirror");var et=D==="multicategory";if(!y.noTickson&&(D==="category"||et)&&(A.ticks||A.showgrid)){var it;et&&(it="boundaries");var ut=_("tickson",it);ut==="boundaries"&&delete A.ticklabelposition}if(et){var J=_("showdividers");J&&(_("dividercolor"),_("dividerwidth"))}if(D==="date")if(x(w,A,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:b}),!A.rangebreaks.length)delete A.rangebreaks;else{for(var X=0;X=2){var T="",s,L;if(E.length===2){for(s=0;s<2;s++)if(L=o(E[s]),L){T=m;break}}var M=_("pattern",T);if(M===m)for(s=0;s<2;s++)L=o(E[s]),L&&(w.bounds[s]=E[s]=L-1);if(M)for(s=0;s<2;s++)switch(L=E[s],M){case m:if(!g(L)){w.enabled=!1;return}if(L=+L,L!==Math.floor(L)||L<0||L>=7){w.enabled=!1;return}w.bounds[s]=E[s]=L;break;case h:if(!g(L)){w.enabled=!1;return}if(L=+L,L<0||L>24){w.enabled=!1;return}w.bounds[s]=E[s]=L;break}if(A.autorange===!1){var z=A.range;if(z[0]z[1]){w.enabled=!1;return}}else if(E[0]>z[0]&&E[1]p?1:-1:+(S.substr(1)||1)-+(x.substr(1)||1)},U.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function i(S,x){if(x&&x.length){for(var v=0;v0||g(r),a;e&&(a="array");var n=v("categoryorder",a),f;n==="array"&&(f=v("categoryarray")),!e&&n==="array"&&(n=x.categoryorder="trace"),n==="trace"?x._initialCategories=[]:n==="array"?x._initialCategories=f.slice():(f=C(x,p).sort(),n==="category ascending"?x._initialCategories=f:n==="category descending"&&(x._initialCategories=f.reverse()))}}},98728:function(G,U,t){var g=t(38248),C=t(3400),i=t(39032),S=i.ONEDAY,x=i.ONEWEEK;U.dtick=function(v,p){var r=p==="log",e=p==="date",a=p==="category",n=e?S:1;if(!v)return n;if(g(v))return v=Number(v),v<=0?n:a?Math.max(1,Math.round(v)):e?Math.max(.1,v):v;if(typeof v!="string"||!(e||r))return n;var f=v.charAt(0),c=v.substr(1);return c=g(c)?Number(c):0,c<=0||!(e&&f==="M"&&c===Math.round(c)||r&&f==="L"||r&&f==="D"&&(c===1||c===2))?n:v},U.tick0=function(v,p,r,e){if(p==="date")return C.cleanDate(v,C.dateTick0(r,e%x===0?1:0));if(!(e==="D1"||e==="D2"))return g(v)?Number(v):0}},33816:function(G,U,t){var g=t(53756).counter;G.exports={idRegex:{x:g("x","( domain)?"),y:g("y","( domain)?")},attrRegex:g("[xy]axis"),xAxisMatch:g("xaxis"),yAxisMatch:g("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},71888:function(G,U,t){var g=t(3400),C=t(19280),i=t(79811).id2name,S=t(94724),x=t(21160),v=t(78344),p=t(39032).ALMOST_EQUAL,r=t(84284).FROM_BL;U.handleDefaults=function(h,b,u){var o=u.axIds,d=u.axHasImage,w=b._axisConstraintGroups=[],A=b._axisMatchGroups=[],_,y,E,T,s,L,M,z;for(_=0;_w?u.substr(w):o.substr(d))+A}function l(h,b){for(var u=b._size,o=u.h/u.w,d={},w=Object.keys(h),A=0;Ap*z&&!k)){for(w=0;wX&&ntut&&(ut=nt);var gt=(ut-it)/(2*J);s/=gt,it=y.l2r(it),ut=y.l2r(ut),y.range=y._input.range=Y=0){dr._fullLayout._deactivateShape(dr);return}var mr=dr._fullLayout.clickmode;if(X(dr),rr===2&&!Ht&&Gt(),Lt)mr.indexOf("select")>-1&&E(He,dr,re,Kt,ct.id,be),mr.indexOf("event")>-1&&n.click(dr,He,ct.id);else if(rr===1&&Ht){var xr=bt?kt:Ut,pr=bt==="s"||At==="w"?0:1,Gr=xr._name+".range["+pr+"]",Pr=B(xr,pr),Dr="left",cn="middle";if(xr.fixedrange)return;bt?(cn=bt==="n"?"top":"bottom",xr.side==="right"&&(Dr="right")):At==="e"&&(Dr="right"),dr._context.showAxisRangeEntryBoxes&&g.select(me).call(r.makeEditable,{gd:dr,immediate:!0,background:dr._fullLayout.paper_bgcolor,text:String(Pr),fill:xr.tickfont?xr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:cn}).on("edit",function(rn){var Cn=xr.d2r(rn);Cn!==void 0&&v.call("_guiRelayout",dr,Gr,Cn)})}}l.init(be);var ce,Te,Be,ir,pe,Xe,Ke,or,$e,ge;function se(rr,He,dr){var mr=me.getBoundingClientRect();ce=He-mr.left,Te=dr-mr.top,nt._fullLayout._calcInverseTransform(nt);var xr=C.apply3DTransform(nt._fullLayout._invTransform)(ce,Te);ce=xr[0],Te=xr[1],Be={l:ce,r:ce,w:0,t:Te,b:Te,h:0},ir=nt._hmpixcount?nt._hmlumcount/nt._hmpixcount:S(nt._fullLayout.plot_bgcolor).getLuminance(),pe="M0,0H"+he+"V"+de+"H0V0",Xe=!1,Ke="xy",ge=!1,or=et(mt,ir,$t,le,pe),$e=it(mt,$t,le)}function Ae(rr,He){if(nt._transitioningWithDuration)return!1;var dr=Math.max(0,Math.min(he,Mt*rr+ce)),mr=Math.max(0,Math.min(de,Nt*He+Te)),xr=Math.abs(dr-ce),pr=Math.abs(mr-Te);Be.l=Math.min(ce,dr),Be.r=Math.max(ce,dr),Be.t=Math.min(Te,mr),Be.b=Math.max(Te,mr);function Gr(){Ke="",Be.r=Be.l,Be.t=Be.b,$e.attr("d","M0,0Z")}if(xe.isSubplotConstrained)xr>M||pr>M?(Ke="xy",xr/he>pr/de?(pr=xr*de/he,Te>mr?Be.t=Te-pr:Be.b=Te+pr):(xr=pr*he/de,ce>dr?Be.l=ce-xr:Be.r=ce+xr),$e.attr("d",ot(Be))):Gr();else if(Se.isSubplotConstrained)if(xr>M||pr>M){Ke="xy";var Pr=Math.min(Be.l/he,(de-Be.b)/de),Dr=Math.max(Be.r/he,(de-Be.t)/de);Be.l=Pr*he,Be.r=Dr*he,Be.b=(1-Pr)*de,Be.t=(1-Dr)*de,$e.attr("d",ot(Be))}else Gr();else!zt||pr0){var rn;if(Se.isSubplotConstrained||!ne&&zt.length===1){for(rn=0;rn1&&(Gr.maxallowed!==void 0&&Jt===(Gr.range[0]1&&(Pr.maxallowed!==void 0&&Wt===(Pr.range[0]=0?Math.min(nt,.9):1/(1/Math.max(nt,-.3)+3.222))}function j(nt,ct,gt){return nt?nt==="nsew"?gt?"":ct==="pan"?"move":"crosshair":nt.toLowerCase()+"-resize":"pointer"}function et(nt,ct,gt,Tt,wt){return nt.append("path").attr("class","zoombox").style({fill:ct>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",p(gt,Tt)).attr("d",wt+"Z")}function it(nt,ct,gt){return nt.append("path").attr("class","zoombox-corners").style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("transform",p(ct,gt)).attr("d","M0,0Z")}function ut(nt,ct,gt,Tt,wt,Rt){nt.attr("d",Tt+"M"+gt.l+","+gt.t+"v"+gt.h+"h"+gt.w+"v-"+gt.h+"h-"+gt.w+"Z"),J(nt,ct,wt,Rt)}function J(nt,ct,gt,Tt){gt||(nt.transition().style("fill",Tt>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ct.transition().style("opacity",1).duration(200))}function X(nt){g.select(nt).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function tt(nt){z&&nt.data&&nt._context.showTips&&(C.notifier(C._(nt,"Double-click to zoom back out"),"long"),z=!1)}function V(nt,ct){return"M"+(nt.l-.5)+","+(ct-M-.5)+"h-3v"+(2*M+1)+"h3ZM"+(nt.r+.5)+","+(ct-M-.5)+"h3v"+(2*M+1)+"h-3Z"}function Q(nt,ct){return"M"+(ct-M-.5)+","+(nt.t-.5)+"v-3h"+(2*M+1)+"v3ZM"+(ct-M-.5)+","+(nt.b+.5)+"v3h"+(2*M+1)+"v-3Z"}function ot(nt){var ct=Math.floor(Math.min(nt.b-nt.t,nt.r-nt.l,M)/2);return"M"+(nt.l-3.5)+","+(nt.t-.5+ct)+"h3v"+-ct+"h"+ct+"v-3h-"+(ct+3)+"ZM"+(nt.r+3.5)+","+(nt.t-.5+ct)+"h-3v"+-ct+"h"+-ct+"v-3h"+(ct+3)+"ZM"+(nt.r+3.5)+","+(nt.b+.5-ct)+"h-3v"+ct+"h"+-ct+"v3h"+(ct+3)+"ZM"+(nt.l-3.5)+","+(nt.b+.5-ct)+"h3v"+ct+"h"+ct+"v3h-"+(ct+3)+"Z"}function $(nt,ct,gt,Tt,wt){for(var Rt=!1,bt={},At={},mt,Lt,Ht,Ut,kt=(wt||{}).xaHash,Vt=(wt||{}).yaHash,It=0;It_[1]-.000244140625&&(x.domain=l),C.noneOrAll(S.domain,x.domain,l),x.tickmode==="sync"&&(x.tickmode="auto")}return v("layer"),x}},42568:function(G,U,t){var g=t(85024);G.exports=function(i,S,x,v,p){p||(p={});var r=p.tickSuffixDflt,e=g(i),a=x("tickprefix");a&&x("showtickprefix",e);var n=x("ticksuffix",r);n&&x("showticksuffix",e)}},96312:function(G,U,t){var g=t(76808);G.exports=function(i,S,x,v){var p=S._template||{},r=S.type||p.type||"-";x("minallowed"),x("maxallowed");var e=x("range");if(!e){var a;!v.noInsiderange&&r!=="log"&&(a=x("insiderange"),a&&(a[0]===null||a[1]===null)&&(S.insiderange=!1,a=void 0),a&&(e=x("range",a)))}var n=S.getAutorangeDflt(e,v),f=x("autorange",n),c;e&&(e[0]===null&&e[1]===null||(e[0]===null||e[1]===null)&&(f==="reversed"||f===!0)||e[0]!==null&&(f==="min"||f==="max reversed")||e[1]!==null&&(f==="max"||f==="min reversed"))&&(e=void 0,delete S.range,S.autorange=!0,c=!0),c||(n=S.getAutorangeDflt(e,v),f=x("autorange",n)),f&&(g(x,f,e),(r==="linear"||r==="-")&&x("rangemode")),S.cleanRange()}},21160:function(G,U,t){var g=t(84284).FROM_BL;G.exports=function(i,S,x){x===void 0&&(x=g[i.constraintoward||"center"]);var v=[i.r2l(i.range[0]),i.r2l(i.range[1])],p=v[0]+(v[1]-v[0])*x;i.range=i._input.range=[i.l2r(p+(v[0]-p)*S),i.l2r(p+(v[1]-p)*S)],i.setScale()}},78344:function(G,U,t){var g=t(33428),C=t(94336).E9,i=t(3400),S=i.numberFormat,x=t(38248),v=i.cleanNumber,p=i.ms2DateTime,r=i.dateTime2ms,e=i.ensureNumber,a=i.isArrayOrTypedArray,n=t(39032),f=n.FP_SAFE,c=n.BADNUM,l=n.LOG_CLIP,m=n.ONEWEEK,h=n.ONEDAY,b=n.ONEHOUR,u=n.ONEMIN,o=n.ONESEC,d=t(79811),w=t(33816),A=w.HOUR_PATTERN,_=w.WEEKDAY_PATTERN;function y(T){return Math.pow(10,T)}function E(T){return T!=null}G.exports=function(s,L){L=L||{};var M=s._id||"x",z=M.charAt(0);function D(V,Q){if(V>0)return Math.log(V)/Math.LN10;if(V<=0&&Q&&s.range&&s.range.length===2){var ot=s.range[0],$=s.range[1];return .5*(ot+$-2*l*Math.abs(ot-$))}else return c}function N(V,Q,ot,$){if(($||{}).msUTC&&x(V))return+V;var Z=r(V,ot||s.calendar);if(Z===c)if(x(V)){V=+V;var st=Math.floor(i.mod(V+.05,1)*10),nt=Math.round(V-st/10);Z=r(new Date(nt))+st/10}else return c;return Z}function I(V,Q,ot){return p(V,Q,ot||s.calendar)}function k(V){return s._categories[Math.round(V)]}function B(V){if(E(V)){if(s._categoriesMap===void 0&&(s._categoriesMap={}),s._categoriesMap[V]!==void 0)return s._categoriesMap[V];s._categories.push(typeof V=="number"?String(V):V);var Q=s._categories.length-1;return s._categoriesMap[V]=Q,Q}return c}function O(V,Q){for(var ot=new Array(Q),$=0;$s.range[1]&&(ot=!ot);for(var $=ot?-1:1,Z=$*V,st=0,nt=0;ntgt)st=nt+1;else{st=Z<(ct+gt)/2?nt:nt+1;break}}var Tt=s._B[st]||0;return isFinite(Tt)?et(V,s._m2,Tt):0},J=function(V){var Q=s._rangebreaks.length;if(!Q)return it(V,s._m,s._b);for(var ot=0,$=0;$s._rangebreaks[$].pmax&&(ot=$+1);return it(V,s._m2,s._B[ot])}}s.c2l=s.type==="log"?D:e,s.l2c=s.type==="log"?y:e,s.l2p=ut,s.p2l=J,s.c2p=s.type==="log"?function(V,Q){return ut(D(V,Q))}:ut,s.p2c=s.type==="log"?function(V){return y(J(V))}:J,["linear","-"].indexOf(s.type)!==-1?(s.d2r=s.r2d=s.d2c=s.r2c=s.d2l=s.r2l=v,s.c2d=s.c2r=s.l2d=s.l2r=e,s.d2p=s.r2p=function(V){return s.l2p(v(V))},s.p2d=s.p2r=J,s.cleanPos=e):s.type==="log"?(s.d2r=s.d2l=function(V,Q){return D(v(V),Q)},s.r2d=s.r2c=function(V){return y(v(V))},s.d2c=s.r2l=v,s.c2d=s.l2r=e,s.c2r=D,s.l2d=y,s.d2p=function(V,Q){return s.l2p(s.d2r(V,Q))},s.p2d=function(V){return y(J(V))},s.r2p=function(V){return s.l2p(v(V))},s.p2r=J,s.cleanPos=e):s.type==="date"?(s.d2r=s.r2d=i.identity,s.d2c=s.r2c=s.d2l=s.r2l=N,s.c2d=s.c2r=s.l2d=s.l2r=I,s.d2p=s.r2p=function(V,Q,ot){return s.l2p(N(V,0,ot))},s.p2d=s.p2r=function(V,Q,ot){return I(J(V),Q,ot)},s.cleanPos=function(V){return i.cleanDate(V,c,s.calendar)}):s.type==="category"?(s.d2c=s.d2l=B,s.r2d=s.c2d=s.l2d=k,s.d2r=s.d2l_noadd=Y,s.r2c=function(V){var Q=j(V);return Q!==void 0?Q:s.fraction2r(.5)},s.l2r=s.c2r=e,s.r2l=j,s.d2p=function(V){return s.l2p(s.r2c(V))},s.p2d=function(V){return k(J(V))},s.r2p=s.d2p,s.p2r=J,s.cleanPos=function(V){return typeof V=="string"&&V!==""?V:e(V)}):s.type==="multicategory"&&(s.r2d=s.c2d=s.l2d=k,s.d2r=s.d2l_noadd=Y,s.r2c=function(V){var Q=Y(V);return Q!==void 0?Q:s.fraction2r(.5)},s.r2c_just_indices=H,s.l2r=s.c2r=e,s.r2l=Y,s.d2p=function(V){return s.l2p(s.r2c(V))},s.p2d=function(V){return k(J(V))},s.r2p=s.d2p,s.p2r=J,s.cleanPos=function(V){return Array.isArray(V)||typeof V=="string"&&V!==""?V:e(V)},s.setupMultiCategory=function(V){var Q=s._traceIndices,ot,$,Z=s._matchGroup;if(Z&&s._categories.length===0){for(var st in Z)if(st!==M){var nt=L[d.id2name(st)];Q=Q.concat(nt._traceIndices)}}var ct=[[0,{}],[0,{}]],gt=[];for(ot=0;otnt[1]&&($[st?0:1]=ot),$[0]===$[1]){var ct=s.l2r(Q),gt=s.l2r(ot);if(Q!==void 0){var Tt=ct+1;ot!==void 0&&(Tt=Math.min(Tt,gt)),$[st?1:0]=Tt}if(ot!==void 0){var wt=gt+1;Q!==void 0&&(wt=Math.max(wt,ct)),$[st?0:1]=wt}}}},s.cleanRange=function(V,Q){s._cleanRange(V,Q),s.limitRange(V)},s._cleanRange=function(V,Q){Q||(Q={}),V||(V="range");var ot=i.nestedProperty(s,V).get(),$,Z;if(s.type==="date"?Z=i.dfltRange(s.calendar):z==="y"?Z=w.DFLTRANGEY:s._name==="realaxis"?Z=[0,1]:Z=Q.dfltRange||w.DFLTRANGEX,Z=Z.slice(),(s.rangemode==="tozero"||s.rangemode==="nonnegative")&&(Z[0]=0),!ot||ot.length!==2){i.nestedProperty(s,V).set(Z);return}var st=ot[0]===null,nt=ot[1]===null;for(s.type==="date"&&!s.autorange&&(ot[0]=i.cleanDate(ot[0],c,s.calendar),ot[1]=i.cleanDate(ot[1],c,s.calendar)),$=0;$<2;$++)if(s.type==="date"){if(!i.isDateTime(ot[$],s.calendar)){s[V]=Z;break}if(s.r2l(ot[0])===s.r2l(ot[1])){var ct=i.constrain(s.r2l(ot[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);ot[0]=s.l2r(ct-1e3),ot[1]=s.l2r(ct+1e3);break}}else{if(!x(ot[$]))if(!(st||nt)&&x(ot[1-$]))ot[$]=ot[1-$]*($?10:.1);else{s[V]=Z;break}if(ot[$]<-f?ot[$]=-f:ot[$]>f&&(ot[$]=f),ot[0]===ot[1]){var gt=Math.max(1,Math.abs(ot[0]*1e-6));ot[0]-=gt,ot[1]+=gt}}},s.setScale=function(V){var Q=L._size;if(s.overlaying){var ot=d.getFromId({_fullLayout:L},s.overlaying);s.domain=ot.domain}var $=V&&s._r?"_r":"range",Z=s.calendar;s.cleanRange($);var st=s.r2l(s[$][0],Z),nt=s.r2l(s[$][1],Z),ct=z==="y";if(ct?(s._offset=Q.t+(1-s.domain[1])*Q.h,s._length=Q.h*(s.domain[1]-s.domain[0]),s._m=s._length/(st-nt),s._b=-s._m*nt):(s._offset=Q.l+s.domain[0]*Q.w,s._length=Q.w*(s.domain[1]-s.domain[0]),s._m=s._length/(nt-st),s._b=-s._m*st),s._rangebreaks=[],s._lBreaks=0,s._m2=0,s._B=[],s.rangebreaks){var gt,Tt;if(s._rangebreaks=s.locateBreaks(Math.min(st,nt),Math.max(st,nt)),s._rangebreaks.length){for(gt=0;gtnt&&(wt=!wt),wt&&s._rangebreaks.reverse();var Rt=wt?-1:1;for(s._m2=Rt*s._length/(Math.abs(nt-st)-s._lBreaks),s._B.push(-s._m2*(ct?nt:st)),gt=0;gtZ&&(Z+=7,st<$&&(st+=7));break;case A:nt=new Date(V);var wt=nt.getUTCHours(),Rt=nt.getUTCMinutes(),bt=nt.getUTCSeconds(),At=nt.getUTCMilliseconds();st=wt+(Rt/60+bt/3600+At/36e5),$>Z&&(Z+=24,st<$&&(st+=24));break;case"":st=V;break}if(st>=$&&st=$&&V=Kt.min&&(ktKt.max&&(Kt.max=Vt),It=!1)}It&&nt.push({min:kt,max:Vt})}};for(ot=0;ot rect").call(S.setTranslate,0,0).call(S.setScale,1,1),A.plot.call(S.setTranslate,_._offset,y._offset).call(S.setScale,1,1);var E=A.plot.selectAll(".scatterlayer .trace");E.selectAll(".point").call(S.setPointGroupScale,1,1),E.selectAll(".textpoint").call(S.setTextPointsScale,1,1),E.call(S.hideOutsideRangePoints,A)}function c(A,_){var y=A.plotinfo,E=y.xaxis,T=y.yaxis,s=E._length,L=T._length,M=!!A.xr1,z=!!A.yr1,D=[];if(M){var N=i.simpleMap(A.xr0,E.r2l),I=i.simpleMap(A.xr1,E.r2l),k=N[1]-N[0],B=I[1]-I[0];D[0]=(N[0]*(1-_)+_*I[0]-N[0])/(N[1]-N[0])*s,D[2]=s*(1-_+_*B/k),E.range[0]=E.l2r(N[0]*(1-_)+_*I[0]),E.range[1]=E.l2r(N[1]*(1-_)+_*I[1])}else D[0]=0,D[2]=s;if(z){var O=i.simpleMap(A.yr0,T.r2l),H=i.simpleMap(A.yr1,T.r2l),Y=O[1]-O[0],j=H[1]-H[0];D[1]=(O[1]*(1-_)+_*H[1]-O[1])/(O[0]-O[1])*L,D[3]=L*(1-_+_*j/Y),T.range[0]=E.l2r(O[0]*(1-_)+_*H[0]),T.range[1]=T.l2r(O[1]*(1-_)+_*H[1])}else D[1]=0,D[3]=L;x.drawOne(p,E,{skipTitle:!0}),x.drawOne(p,T,{skipTitle:!0}),x.redrawComponents(p,[E._id,T._id]);var et=M?s/D[2]:1,it=z?L/D[3]:1,ut=M?D[0]:0,J=z?D[1]:0,X=M?D[0]/D[2]*s:0,tt=z?D[1]/D[3]*L:0,V=E._offset-X,Q=T._offset-tt;y.clipRect.call(S.setTranslate,ut,J).call(S.setScale,1/et,1/it),y.plot.call(S.setTranslate,V,Q).call(S.setScale,et,it),S.setPointGroupScale(y.zoomScalePts,1/et,1/it),S.setTextPointsScale(y.zoomScaleTxt,1/et,1/it)}var l;a&&(l=a());function m(){for(var A={},_=0;_e.duration?(m(),o=window.cancelAnimationFrame(w)):o=window.requestAnimationFrame(w)}return b=Date.now(),o=window.requestAnimationFrame(w),Promise.resolve()}},14944:function(G,U,t){var g=t(24040).traceIs,C=t(52976);G.exports=function(r,e,a,n){a("autotypenumbers",n.autotypenumbersDflt);var f=a("type",(n.splomStash||{}).type);f==="-"&&(i(e,n.data),e.type==="-"?e.type="linear":r.type=e.type)};function i(p,r){if(p.type==="-"){var e=p._id,a=e.charAt(0),n;e.indexOf("scene")!==-1&&(e=a);var f=S(r,e,a);if(f){if(f.type==="histogram"&&a==={v:"y",h:"x"}[f.orientation||"v"]){p.type="linear";return}var c=a+"calendar",l=f[c],m={noMultiCategory:!g(f,"cartesian")||g(f,"noMultiCategory")};if(f.type==="box"&&f._hasPreCompStats&&a==={h:"x",v:"y"}[f.orientation||"v"]&&(m.noMultiCategory=!0),m.autotypenumbers=p.autotypenumbers,v(f,a)){var h=x(f),b=[];for(n=0;n0&&(n["_"+e+"axes"]||{})[r])return n;if((n[e+"axis"]||e)===r){if(v(n,e))return n;if((n[e]||[]).length||n[e+"0"])return n}}}function x(p){return{v:"x",h:"y"}[p.orientation||"v"]}function v(p,r){var e=x(p),a=g(p,"box-violin"),n=g(p._fullInput||{},"candlestick");return a&&!n&&r===e&&p[e]===void 0&&p[e+"0"]===void 0}},62460:function(G,U,t){var g=t(24040),C=t(3400);U.manageCommandObserver=function(r,e,a,n){var f={},c=!0;e&&e._commandObserver&&(f=e._commandObserver),f.cache||(f.cache={}),f.lookupTable={};var l=U.hasSimpleAPICommandBindings(r,a,f.lookupTable);if(e&&e._commandObserver){if(l)return f;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,f}if(l){i(r,l,f.cache),f.check=function(){if(c){var u=i(r,l,f.cache);return u.changed&&n&&f.lookupTable[u.value]!==void 0&&(f.disable(),Promise.resolve(n({value:u.value,type:l.type,prop:l.prop,traces:l.traces,index:f.lookupTable[u.value]})).then(f.enable,f.enable)),u.changed}};for(var m=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h0?".":"")+f;C.isPlainObject(c)?p(c,e,l,n+1):e(l,f,c)}})}},86968:function(G,U,t){var g=t(92880).extendFlat;U.u=function(C,i){C=C||{},i=i||{};var S={valType:"info_array",editType:C.editType,items:[{valType:"number",min:0,max:1,editType:C.editType},{valType:"number",min:0,max:1,editType:C.editType}],dflt:[0,1]};C.name&&C.name+"",C.trace,i.description&&""+i.description;var x={x:g({},S,{}),y:g({},S,{}),editType:C.editType};return C.noGridCell||(x.row={valType:"integer",min:0,dflt:0,editType:C.editType},x.column={valType:"integer",min:0,dflt:0,editType:C.editType}),x},U.Q=function(C,i,S,x){var v=x&&x.x||[0,1],p=x&&x.y||[0,1],r=i.grid;if(r){var e=S("domain.column");e!==void 0&&(e0&&B._module.calcGeoJSON(k,z)}if(!D){var O=this.updateProjection(M,z);if(O)return;(!this.viewInitial||this.scope!==N.scope)&&this.saveViewInitial(N)}this.scope=N.scope,this.updateBaseLayers(z,N),this.updateDims(z,N),this.updateFx(z,N),f.generalUpdatePerTraceModule(this.graphDiv,this,M,N);var H=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=H.selectAll(".point"),this.dataPoints.text=H.selectAll("text"),this.dataPaths.line=H.selectAll(".js-line");var Y=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=Y.selectAll("path"),this._render()},E.updateProjection=function(M,z){var D=this.graphDiv,N=z[this.id],I=z._size,k=N.domain,B=N.projection,O=N.lonaxis,H=N.lataxis,Y=O._ax,j=H._ax,et=this.projection=T(N),it=[[I.l+I.w*k.x[0],I.t+I.h*(1-k.y[1])],[I.l+I.w*k.x[1],I.t+I.h*(1-k.y[0])]],ut=N.center||{},J=B.rotation||{},X=O.range||[],tt=H.range||[];if(N.fitbounds){Y._length=it[1][0]-it[0][0],j._length=it[1][1]-it[0][1],Y.range=l(D,Y),j.range=l(D,j);var V=(Y.range[0]+Y.range[1])/2,Q=(j.range[0]+j.range[1])/2;if(N._isScoped)ut={lon:V,lat:Q};else if(N._isClipped){ut={lon:V,lat:Q},J={lon:V,lat:Q,roll:J.roll};var ot=B.type,$=d.lonaxisSpan[ot]/2||180,Z=d.lataxisSpan[ot]/2||90;X=[V-$,V+$],tt=[Q-Z,Q+Z]}else ut={lon:V,lat:Q},J={lon:V,lat:J.lat,roll:J.roll}}et.center([ut.lon-J.lon,ut.lat-J.lat]).rotate([-J.lon,-J.lat,J.roll]).parallels(B.parallels);var st=L(X,tt);et.fitExtent(it,st);var nt=this.bounds=et.getBounds(st),ct=this.fitScale=et.scale(),gt=et.translate();if(N.fitbounds){var Tt=et.getBounds(L(Y.range,j.range)),wt=Math.min((nt[1][0]-nt[0][0])/(Tt[1][0]-Tt[0][0]),(nt[1][1]-nt[0][1])/(Tt[1][1]-Tt[0][1]));isFinite(wt)?et.scale(wt*ct):p.warn("Something went wrong during"+this.id+"fitbounds computations.")}else et.scale(B.scale*ct);var Rt=this.midPt=[(nt[0][0]+nt[1][0])/2,(nt[0][1]+nt[1][1])/2];if(et.translate([gt[0]+(Rt[0]-gt[0]),gt[1]+(Rt[1]-gt[1])]).clipExtent(nt),N._isAlbersUsa){var bt=et([ut.lon,ut.lat]),At=et.translate();et.translate([At[0]-(bt[0]-At[0]),At[1]-(bt[1]-At[1])])}},E.updateBaseLayers=function(M,z){var D=this,N=D.topojson,I=D.layers,k=D.basePaths;function B(it){return it==="lonaxis"||it==="lataxis"}function O(it){return!!d.lineLayers[it]}function H(it){return!!d.fillLayers[it]}var Y=this.hasChoropleth?d.layersForChoropleth:d.layers,j=Y.filter(function(it){return O(it)||H(it)?z["show"+it]:B(it)?z[it].showgrid:!0}),et=D.framework.selectAll(".layer").data(j,String);et.exit().each(function(it){delete I[it],delete k[it],g.select(this).remove()}),et.enter().append("g").attr("class",function(it){return"layer "+it}).each(function(it){var ut=I[it]=g.select(this);it==="bg"?D.bgRect=ut.append("rect").style("pointer-events","all"):B(it)?k[it]=ut.append("path").style("fill","none"):it==="backplot"?ut.append("g").classed("choroplethlayer",!0):it==="frontplot"?ut.append("g").classed("scatterlayer",!0):O(it)?k[it]=ut.append("path").style("fill","none").style("stroke-miterlimit",2):H(it)&&(k[it]=ut.append("path").style("stroke","none"))}),et.order(),et.each(function(it){var ut=k[it],J=d.layerNameToAdjective[it];it==="frame"?ut.datum(d.sphereSVG):O(it)||H(it)?ut.datum(_(N,N.objects[it])):B(it)&&ut.datum(s(it,z,M)).call(e.stroke,z[it].gridcolor).call(a.dashLine,z[it].griddash,z[it].gridwidth),O(it)?ut.call(e.stroke,z[J+"color"]).call(a.dashLine,"",z[J+"width"]):H(it)&&ut.call(e.fill,z[J+"color"])})},E.updateDims=function(M,z){var D=this.bounds,N=(z.framewidth||0)/2,I=D[0][0]-N,k=D[0][1]-N,B=D[1][0]-I+N,O=D[1][1]-k+N;a.setRect(this.clipRect,I,k,B,O),this.bgRect.call(a.setRect,I,k,B,O).call(e.fill,z.bgcolor),this.xaxis._offset=I,this.xaxis._length=B,this.yaxis._offset=k,this.yaxis._length=O},E.updateFx=function(M,z){var D=this,N=D.graphDiv,I=D.bgRect,k=M.dragmode,B=M.clickmode;if(D.isStatic)return;function O(){var et=D.viewInitial,it={};for(var ut in et)it[D.id+"."+ut]=et[ut];v.call("_guiRelayout",N,it),N.emit("plotly_doubleclick",null)}function H(et){return D.projection.invert([et[0]+D.xaxis._offset,et[1]+D.yaxis._offset])}var Y=function(et,it){if(it.isRect){var ut=et.range={};ut[D.id]=[H([it.xmin,it.ymin]),H([it.xmax,it.ymax])]}else{var J=et.lassoPoints={};J[D.id]=it.map(H)}},j={element:D.bgRect.node(),gd:N,plotinfo:{id:D.id,xaxis:D.xaxis,yaxis:D.yaxis,fillRangeItems:Y},xaxes:[D.xaxis],yaxes:[D.yaxis],subplot:D.id,clickFn:function(et){et===2&&b(N)}};k==="pan"?(I.node().onmousedown=null,I.call(o(D,z)),I.on("dblclick.zoom",O),N._context._scrollZoom.geo||I.on("wheel.zoom",null)):(k==="select"||k==="lasso")&&(I.on(".zoom",null),j.prepFn=function(et,it,ut){h(et,it,ut,j,k)},m.init(j)),I.on("mousemove",function(){var et=D.projection.invert(p.getPositionFromD3Event());if(!et)return m.unhover(N,g.event);D.xaxis.p2c=function(){return et[0]},D.yaxis.p2c=function(){return et[1]},n.hover(N,g.event,D.id)}),I.on("mouseout",function(){N._dragging||m.unhover(N,g.event)}),I.on("click",function(){k!=="select"&&k!=="lasso"&&(B.indexOf("select")>-1&&u(g.event,N,[D.xaxis],[D.yaxis],D.id,j),B.indexOf("event")>-1&&n.click(N,g.event))})},E.makeFramework=function(){var M=this,z=M.graphDiv,D=z._fullLayout,N="clip"+D._uid+M.id;M.clipDef=D._clips.append("clipPath").attr("id",N),M.clipRect=M.clipDef.append("rect"),M.framework=g.select(M.container).append("g").attr("class","geo "+M.id).call(a.setClipUrl,N,z),M.project=function(I){var k=M.projection(I);return k?[k[0]-M.xaxis._offset,k[1]-M.yaxis._offset]:[null,null]},M.xaxis={_id:"x",c2p:function(I){return M.project(I)[0]}},M.yaxis={_id:"y",c2p:function(I){return M.project(I)[1]}},M.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(M.mockAxis,D)},E.saveViewInitial=function(M){var z=M.center||{},D=M.projection,N=D.rotation||{};this.viewInitial={fitbounds:M.fitbounds,"projection.scale":D.scale};var I;M._isScoped?I={"center.lon":z.lon,"center.lat":z.lat}:M._isClipped?I={"projection.rotation.lon":N.lon,"projection.rotation.lat":N.lat}:I={"center.lon":z.lon,"center.lat":z.lat,"projection.rotation.lon":N.lon},p.extendFlat(this.viewInitial,I)},E.render=function(M){this._hasMarkerAngles&&M?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},E._render=function(){var M=this.projection,z=M.getPath(),D;function N(k){var B=M(k.lonlat);return B?r(B[0],B[1]):null}function I(k){return M.isLonLatOverEdges(k.lonlat)?"none":null}for(D in this.basePaths)this.basePaths[D].attr("d",z);for(D in this.dataPaths)this.dataPaths[D].attr("d",function(k){return z(k.geojson)});for(D in this.dataPoints)this.dataPoints[D].attr("display",I).attr("transform",N)};function T(M){var z=M.projection,D=z.type,N=d.projNames[D];N="geo"+p.titleCase(N);for(var I=C[N]||x[N],k=I(),B=M._isSatellite?Math.acos(1/z.distance)*180/Math.PI:M._isClipped?d.lonaxisSpan[D]/2:null,O=["center","rotate","parallels","clipExtent"],H=function(et){return et?k:[]},Y=0;YJ}else return!1},k.getPath=function(){return i().projection(k)},k.getBounds=function(et){return k.getPath().bounds(et)},k.precision(d.precision),M._isSatellite&&k.tilt(z.tilt).distance(z.distance),B&&k.clipAngle(B-d.clipPad),k}function s(M,z,D){var N=1e-6,I=2.5,k=z[M],B=d.scopeDefaults[z.scope],O,H,Y;M==="lonaxis"?(O=B.lonaxisRange,H=B.lataxisRange,Y=function(Q,ot){return[Q,ot]}):M==="lataxis"&&(O=B.lataxisRange,H=B.lonaxisRange,Y=function(Q,ot){return[ot,Q]});var j={type:"linear",range:[O[0],O[1]-N],tick0:k.tick0,dtick:k.dtick};c.setConvert(j,D);var et=c.calcTicks(j);!z.isScoped&&M==="lonaxis"&&et.pop();for(var it=et.length,ut=new Array(it),J=0;J0&&I<0&&(I+=360);var O=(I-N)/4;return{type:"Polygon",coordinates:[[[N,k],[N,B],[N+O,B],[N+2*O,B],[N+3*O,B],[I,B],[I,k],[I-O,k],[I-2*O,k],[I-3*O,k],[N,k]]]}}},10816:function(G,U,t){var g=t(84888).KY,C=t(3400).counterRegex,i=t(43520),S="geo",x=C(S),v={};v[S]={valType:"subplotid",dflt:S,editType:"calc"};function p(a){for(var n=a._fullLayout,f=a.calcdata,c=n._subplots[S],l=0;l0&&H<0&&(H+=360);var Y=(O+H)/2,j;if(!u){var et=o?h.projRotate:[Y,0,0];j=a("projection.rotation.lon",et[0]),a("projection.rotation.lat",et[1]),a("projection.rotation.roll",et[2]),E=a("showcoastlines",!o&&y),E&&(a("coastlinecolor"),a("coastlinewidth")),E=a("showocean",y?void 0:!1),E&&a("oceancolor")}var it,ut;if(u?(it=-96.6,ut=38.7):(it=o?Y:j,ut=(B[0]+B[1])/2),a("center.lon",it),a("center.lat",ut),d&&(a("projection.tilt"),a("projection.distance")),w){var J=h.projParallels||[0,60];a("projection.parallels",J)}a("projection.scale"),E=a("showland",y?void 0:!1),E&&a("landcolor"),E=a("showlakes",y?void 0:!1),E&&a("lakecolor"),E=a("showrivers",y?void 0:!1),E&&(a("rivercolor"),a("riverwidth")),E=a("showcountries",o&&m!=="usa"&&y),E&&(a("countrycolor"),a("countrywidth")),(m==="usa"||m==="north america"&&l===50)&&(a("showsubunits",y),a("subunitcolor"),a("subunitwidth")),o||(E=a("showframe",y),E&&(a("framecolor"),a("framewidth"))),a("bgcolor");var X=a("fitbounds");X&&(delete e.projection.scale,o?(delete e.center.lon,delete e.center.lat):A?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}},79248:function(G,U,t){var g=t(33428),C=t(3400),i=t(24040),S=Math.PI/180,x=180/Math.PI,v={cursor:"pointer"},p={cursor:"auto"};function r(s,L){var M=s.projection,z;return L._isScoped?z=n:L._isClipped?z=c:z=f,z(s,M)}G.exports=r;function e(s,L){return g.behavior.zoom().translate(L.translate()).scale(L.scale())}function a(s,L,M){var z=s.id,D=s.graphDiv,N=D.layout,I=N[z],k=D._fullLayout,B=k[z],O={},H={};function Y(j,et){O[z+"."+j]=C.nestedProperty(I,j).get(),i.call("_storeDirectGUIEdit",N,k._preGUI,O);var it=C.nestedProperty(B,j);it.get()!==et&&(it.set(et),C.nestedProperty(I,j).set(et),H[z+"."+j]=et)}M(Y),Y("projection.scale",L.scale()/s.fitScale),Y("fitbounds",!1),D.emit("plotly_relayout",H)}function n(s,L){var M=e(s,L);function z(){g.select(this).style(v)}function D(){L.scale(g.event.scale).translate(g.event.translate),s.render(!0);var k=L.invert(s.midPt);s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.center.lon":k[0],"geo.center.lat":k[1]})}function N(k){var B=L.invert(s.midPt);k("center.lon",B[0]),k("center.lat",B[1])}function I(){g.select(this).style(p),a(s,L,N)}return M.on("zoomstart",z).on("zoom",D).on("zoomend",I),M}function f(s,L){var M=e(s,L),z=2,D,N,I,k,B,O,H,Y,j;function et(V){return L.invert(V)}function it(V){var Q=et(V);if(!Q)return!0;var ot=L(Q);return Math.abs(ot[0]-V[0])>z||Math.abs(ot[1]-V[1])>z}function ut(){g.select(this).style(v),D=g.mouse(this),N=L.rotate(),I=L.translate(),k=N,B=et(D)}function J(){if(O=g.mouse(this),it(D)){M.scale(L.scale()),M.translate(L.translate());return}L.scale(g.event.scale),L.translate([I[0],g.event.translate[1]]),B?et(O)&&(Y=et(O),H=[k[0]+(Y[0]-B[0]),N[1],N[2]],L.rotate(H),k=H):(D=O,B=et(D)),j=!0,s.render(!0);var V=L.rotate(),Q=L.invert(s.midPt);s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.center.lon":Q[0],"geo.center.lat":Q[1],"geo.projection.rotation.lon":-V[0]})}function X(){g.select(this).style(p),j&&a(s,L,tt)}function tt(V){var Q=L.rotate(),ot=L.invert(s.midPt);V("projection.rotation.lon",-Q[0]),V("center.lon",ot[0]),V("center.lat",ot[1])}return M.on("zoomstart",ut).on("zoom",J).on("zoomend",X),M}function c(s,L){L.rotate(),L.scale();var M=e(s,L),z=T(M,"zoomstart","zoom","zoomend"),D=0,N=M.on,I;M.on("zoomstart",function(){g.select(this).style(v);var Y=g.mouse(this),j=L.rotate(),et=j,it=L.translate(),ut=m(j);I=l(L,Y),N.call(M,"zoom",function(){var J=g.mouse(this);if(L.scale(g.event.scale),!I)Y=J,I=l(L,Y);else if(l(L,J)){L.rotate(j).translate(it);var X=l(L,J),tt=b(I,X),V=A(h(ut,tt)),Q=u(V,I,et);(!isFinite(Q[0])||!isFinite(Q[1])||!isFinite(Q[2]))&&(Q=et),L.rotate(Q),et=Q}B(z.of(this,arguments))}),k(z.of(this,arguments))}).on("zoomend",function(){g.select(this).style(p),N.call(M,"zoom",null),O(z.of(this,arguments)),a(s,L,H)}).on("zoom.redraw",function(){s.render(!0);var Y=L.rotate();s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.projection.rotation.lon":-Y[0],"geo.projection.rotation.lat":-Y[1]})});function k(Y){D++||Y({type:"zoomstart"})}function B(Y){Y({type:"zoom"})}function O(Y){--D||Y({type:"zoomend"})}function H(Y){var j=L.rotate();Y("projection.rotation.lon",-j[0]),Y("projection.rotation.lat",-j[1])}return g.rebind(M,z,"on")}function l(s,L){var M=s.invert(L);return M&&isFinite(M[0])&&isFinite(M[1])&&_(M)}function m(s){var L=.5*s[0]*S,M=.5*s[1]*S,z=.5*s[2]*S,D=Math.sin(L),N=Math.cos(L),I=Math.sin(M),k=Math.cos(M),B=Math.sin(z),O=Math.cos(z);return[N*k*O+D*I*B,D*k*O-N*I*B,N*I*O+D*k*B,N*k*B-D*I*O]}function h(s,L){var M=s[0],z=s[1],D=s[2],N=s[3],I=L[0],k=L[1],B=L[2],O=L[3];return[M*I-z*k-D*B-N*O,M*k+z*I+D*O-N*B,M*B-z*O+D*I+N*k,M*O+z*B-D*k+N*I]}function b(s,L){if(!(!s||!L)){var M=E(s,L),z=Math.sqrt(y(M,M)),D=.5*Math.acos(Math.max(-1,Math.min(1,y(s,L)))),N=Math.sin(D)/z;return z&&[Math.cos(D),M[2]*N,-M[1]*N,M[0]*N]}}function u(s,L,M){var z=w(L,2,s[0]);z=w(z,1,s[1]),z=w(z,0,s[2]-M[2]);var D=L[0],N=L[1],I=L[2],k=z[0],B=z[1],O=z[2],H=Math.atan2(N,D)*x,Y=Math.sqrt(D*D+N*N),j,et;Math.abs(B)>Y?(et=(B>0?90:-90)-H,j=0):(et=Math.asin(B/Y)*x-H,j=Math.sqrt(Y*Y-B*B));var it=180-et-2*H,ut=(Math.atan2(O,k)-Math.atan2(I,j))*x,J=(Math.atan2(O,k)-Math.atan2(I,-j))*x,X=o(M[0],M[1],et,ut),tt=o(M[0],M[1],it,J);return X<=tt?[et,ut,M[2]]:[it,J,M[2]]}function o(s,L,M,z){var D=d(M-s),N=d(z-L);return Math.sqrt(D*D+N*N)}function d(s){return(s%360+540)%360-180}function w(s,L,M){var z=M*S,D=s.slice(),N=L===0?1:0,I=L===2?1:2,k=Math.cos(z),B=Math.sin(z);return D[N]=s[N]*k-s[I]*B,D[I]=s[I]*k+s[N]*B,D}function A(s){return[Math.atan2(2*(s[0]*s[1]+s[2]*s[3]),1-2*(s[1]*s[1]+s[2]*s[2]))*x,Math.asin(Math.max(-1,Math.min(1,2*(s[0]*s[2]-s[3]*s[1]))))*x,Math.atan2(2*(s[0]*s[3]+s[1]*s[2]),1-2*(s[2]*s[2]+s[3]*s[3]))*x]}function _(s){var L=s[0]*S,M=s[1]*S,z=Math.cos(M);return[z*Math.cos(L),z*Math.sin(L),Math.sin(M)]}function y(s,L){for(var M=0,z=0,D=s.length;zMath.abs(E)?(n.boxEnd[1]=n.boxStart[1]+Math.abs(y)*D*(E>=0?1:-1),n.boxEnd[1]u[3]&&(n.boxEnd[1]=u[3],n.boxEnd[0]=n.boxStart[0]+(u[3]-n.boxStart[1])/Math.abs(D))):(n.boxEnd[0]=n.boxStart[0]+Math.abs(E)/D*(y>=0?1:-1),n.boxEnd[0]u[2]&&(n.boxEnd[0]=u[2],n.boxEnd[1]=n.boxStart[1]+(u[2]-n.boxStart[0])*Math.abs(D)))}else M&&(n.boxEnd[0]=n.boxStart[0]),z&&(n.boxEnd[1]=n.boxStart[1])}else n.boxEnabled?(y=n.boxStart[0]!==n.boxEnd[0],E=n.boxStart[1]!==n.boxEnd[1],y||E?(y&&(T(0,n.boxStart[0],n.boxEnd[0]),r.xaxis.autorange=!1),E&&(T(1,n.boxStart[1],n.boxEnd[1]),r.yaxis.autorange=!1),r.relayoutCallback()):r.glplot.setDirty(),n.boxEnabled=!1,n.boxInited=!1):n.boxInited&&(n.boxInited=!1);break;case"pan":n.boxEnabled=!1,n.boxInited=!1,m?(n.panning||(n.dragStart[0]=h,n.dragStart[1]=b),Math.abs(n.dragStart[0]-h)1;function m(h){if(!l){var b=g.validate(n[h],v[h]);if(b)return n[h]}}S(n,f,c,{type:r,attributes:v,handleDefaults:e,fullLayout:f,font:f.font,fullData:c,getDfltFromLayout:m,autotypenumbersDflt:f.autotypenumbers,paper_bgcolor:f.paper_bgcolor,calendar:f.calendar})};function e(a,n,f,c){for(var l=f("bgcolor"),m=C.combine(l,c.paper_bgcolor),h=["up","center","eye"],b=0;b.999)&&(A="turntable")}else A="turntable";f("dragmode",A),f("hovermode",c.getDfltFromLayout("hovermode"))}},346:function(G,U,t){var g=t(86140),C=t(86968).u,i=t(92880).extendFlat,S=t(3400).counterRegex;function x(v,p,r){return{x:{valType:"number",dflt:v,editType:"camera"},y:{valType:"number",dflt:p,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}G.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(x(0,0,1),{}),center:i(x(0,0,0),{}),eye:i(x(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:C({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:g,yaxis:g,zaxis:g,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(G,U,t){var g=t(43080),C=["xaxis","yaxis","zaxis"];function i(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var S=i.prototype;S.merge=function(v){for(var p=0;p<3;++p){var r=v[C[p]];if(!r.visible){this.enabled[p]=!1,this.drawSides[p]=!1;continue}this.enabled[p]=r.showspikes,this.colors[p]=g(r.spikecolor),this.drawSides[p]=r.spikesides,this.lineWidth[p]=r.spikethickness}};function x(v){var p=new i;return p.merge(v),p}G.exports=x},87152:function(G,U,t){G.exports=x;var g=t(54460),C=t(3400),i=["xaxis","yaxis","zaxis"];function S(v){for(var p=new Array(3),r=0;r<3;++r){for(var e=v[r],a=new Array(e.length),n=0;n/g," "));a[n]=m,f.tickmode=c}}p.ticks=a;for(var n=0;n<3;++n){.5*(v.glplot.bounds[0][n]+v.glplot.bounds[1][n]);for(var h=0;h<2;++h)p.bounds[h][n]=v.glplot.bounds[h][n]}v.contourLevels=S(a)}},94424:function(G){function U(g,C){var i=[0,0,0,0],S,x;for(S=0;S<4;++S)for(x=0;x<4;++x)i[x]+=g[4*S+x]*C[S];return i}function t(g,C){var i=U(g.projection,U(g.view,U(g.model,[C[0],C[1],C[2],1])));return i}G.exports=t},98432:function(G,U,t){var g=t(67792).gl_plot3d,C=g.createCamera,i=g.createScene,S=t(5408),x=t(89184),v=t(24040),p=t(3400),r=p.preserveDrawingBuffer(),e=t(54460),a=t(93024),n=t(43080),f=t(16576),c=t(94424),l=t(44728),m=t(9020),h=t(87152),b=t(19280).applyAutorangeOptions,u,o,d=!1;function w(D,N){var I=document.createElement("div"),k=D.container;this.graphDiv=D.graphDiv;var B=document.createElementNS("http://www.w3.org/2000/svg","svg");B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",B.style["z-index"]=20,B.style["pointer-events"]="none",I.appendChild(B),this.svgContainer=B,I.id=D.id,I.style.position="absolute",I.style.top=I.style.left="0px",I.style.width=I.style.height="100%",k.appendChild(I),this.fullLayout=N,this.id=D.id||"scene",this.fullSceneLayout=N[this.id],this.plotArgs=[[],{},{}],this.axesOptions=l(N,N[this.id]),this.spikeOptions=m(N[this.id]),this.container=I,this.staticMode=!!D.staticPlot,this.pixelRatio=this.pixelRatio||D.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=v.getComponentMethod("annotations3d","convert"),this.drawAnnotations=v.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var A=w.prototype;A.prepareOptions=function(){var D=this,N={canvas:D.canvas,gl:D.gl,glOptions:{preserveDrawingBuffer:r,premultipliedAlpha:!0,antialias:!0},container:D.container,axes:D.axesOptions,spikes:D.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:D.camera,pixelRatio:D.pixelRatio};if(D.staticMode){if(!o&&(u=document.createElement("canvas"),o=S({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!o))throw new Error("error creating static canvas/context for image server");N.gl=o,N.canvas=u}return N};var _=!0;A.tryCreatePlot=function(){var D=this,N=D.prepareOptions(),I=!0;try{D.glplot=i(N)}catch{if(D.staticMode||!_||r)I=!1;else{p.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{r=N.glOptions.preserveDrawingBuffer=!0,D.glplot=i(N)}catch{r=N.glOptions.preserveDrawingBuffer=!1,I=!1}}}return _=!1,I},A.initializeGLCamera=function(){var D=this,N=D.fullSceneLayout.camera,I=N.projection.type==="orthographic";D.camera=C(D.container,{center:[N.center.x,N.center.y,N.center.z],eye:[N.eye.x,N.eye.y,N.eye.z],up:[N.up.x,N.up.y,N.up.z],_ortho:I,zoomMin:.01,zoomMax:100,mode:"orbit"})},A.initializeGLPlot=function(){var D=this;D.initializeGLCamera();var N=D.tryCreatePlot();if(!N)return f(D);D.traces={},D.make4thDimension();var I=D.graphDiv,k=I.layout,B=function(){var H={};return D.isCameraChanged(k)&&(H[D.id+".camera"]=D.getCamera()),D.isAspectChanged(k)&&(H[D.id+".aspectratio"]=D.glplot.getAspectratio(),k[D.id].aspectmode!=="manual"&&(D.fullSceneLayout.aspectmode=k[D.id].aspectmode=H[D.id+".aspectmode"]="manual")),H},O=function(H){if(H.fullSceneLayout.dragmode!==!1){var Y=B();H.saveLayout(k),H.graphDiv.emit("plotly_relayout",Y)}};return D.glplot.canvas&&(D.glplot.canvas.addEventListener("mouseup",function(){O(D)}),D.glplot.canvas.addEventListener("touchstart",function(){d=!0}),D.glplot.canvas.addEventListener("wheel",function(H){if(I._context._scrollZoom.gl3d){if(D.camera._ortho){var Y=H.deltaX>H.deltaY?1.1:.9090909090909091,j=D.glplot.getAspectratio();D.glplot.setAspectratio({x:Y*j.x,y:Y*j.y,z:Y*j.z})}O(D)}},x?{passive:!1}:!1),D.glplot.canvas.addEventListener("mousemove",function(){if(D.fullSceneLayout.dragmode!==!1&&D.camera.mouseListener.buttons!==0){var H=B();D.graphDiv.emit("plotly_relayouting",H)}}),D.staticMode||D.glplot.canvas.addEventListener("webglcontextlost",function(H){I&&I.emit&&I.emit("plotly_webglcontextlost",{event:H,layer:D.id})},!1)),D.glplot.oncontextloss=function(){D.recoverContext()},D.glplot.onrender=function(){D.render()},!0},A.render=function(){var D=this,N=D.graphDiv,I,k=D.svgContainer,B=D.container.getBoundingClientRect();N._fullLayout._calcInverseTransform(N);var O=N._fullLayout._invScaleX,H=N._fullLayout._invScaleY,Y=B.width*O,j=B.height*H;k.setAttributeNS(null,"viewBox","0 0 "+Y+" "+j),k.setAttributeNS(null,"width",Y),k.setAttributeNS(null,"height",j),h(D),D.glplot.axes.update(D.axesOptions);for(var et=Object.keys(D.traces),it=null,ut=D.glplot.selection,J=0;J")):I.type==="isosurface"||I.type==="volume"?(ot.valueLabel=e.hoverLabelText(D._mockAxis,D._mockAxis.d2l(ut.traceCoordinate[3]),I.valuehoverformat),ct.push("value: "+ot.valueLabel),ut.textLabel&&ct.push(ut.textLabel),nt=ct.join("
    ")):nt=ut.textLabel;var gt={x:ut.traceCoordinate[0],y:ut.traceCoordinate[1],z:ut.traceCoordinate[2],data:V._input,fullData:V,curveNumber:V.index,pointNumber:Q};a.appendArrayPointValue(gt,V,Q),I._module.eventData&&(gt=V._module.eventData(gt,ut,V,{},Q));var Tt={points:[gt]};if(D.fullSceneLayout.hovermode){var wt=[];a.loneHover({trace:V,x:(.5+.5*tt[0]/tt[3])*Y,y:(.5-.5*tt[1]/tt[3])*j,xLabel:ot.xLabel,yLabel:ot.yLabel,zLabel:ot.zLabel,text:nt,name:it.name,color:a.castHoverOption(V,Q,"bgcolor")||it.color,borderColor:a.castHoverOption(V,Q,"bordercolor"),fontFamily:a.castHoverOption(V,Q,"font.family"),fontSize:a.castHoverOption(V,Q,"font.size"),fontColor:a.castHoverOption(V,Q,"font.color"),nameLength:a.castHoverOption(V,Q,"namelength"),textAlign:a.castHoverOption(V,Q,"align"),hovertemplate:p.castOption(V,Q,"hovertemplate"),hovertemplateLabels:p.extendFlat({},gt,ot),eventData:[gt]},{container:k,gd:N,inOut_bbox:wt}),gt.bbox=wt[0]}ut.distance<5&&(ut.buttons||d)?N.emit("plotly_click",Tt):N.emit("plotly_hover",Tt),this.oldEventData=Tt}else a.loneUnhover(k),this.oldEventData&&N.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;D.drawAnnotations(D)},A.recoverContext=function(){var D=this;D.glplot.dispose();var N=function(){if(D.glplot.gl.isContextLost()){requestAnimationFrame(N);return}if(!D.initializeGLPlot()){p.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}D.plot.apply(D,D.plotArgs)};requestAnimationFrame(N)};var y=["xaxis","yaxis","zaxis"];function E(D,N,I){for(var k=D.fullSceneLayout,B=0;B<3;B++){var O=y[B],H=O.charAt(0),Y=k[O],j=N[H],et=N[H+"calendar"],it=N["_"+H+"length"];if(!p.isArrayOrTypedArray(j))I[0][B]=Math.min(I[0][B],0),I[1][B]=Math.max(I[1][B],it-1);else for(var ut,J=0;J<(it||j.length);J++)if(p.isArrayOrTypedArray(j[J]))for(var X=0;XV[1][H])V[0][H]=-1,V[1][H]=1;else{var Rt=V[1][H]-V[0][H];V[0][H]-=Rt/32,V[1][H]+=Rt/32}if(ot=[V[0][H],V[1][H]],ot=b(ot,j),V[0][H]=ot[0],V[1][H]=ot[1],j.isReversed()){var bt=V[0][H];V[0][H]=V[1][H],V[1][H]=bt}}else ot=j.range,V[0][H]=j.r2l(ot[0]),V[1][H]=j.r2l(ot[1]);V[0][H]===V[1][H]&&(V[0][H]-=1,V[1][H]+=1),j.range=[V[0][H],V[1][H]],j.limitRange(),k.glplot.setBounds(H,{min:j.range[0]*X[H],max:j.range[1]*X[H]})}var At,mt=it.aspectmode;if(mt==="cube")At=[1,1,1];else if(mt==="manual"){var Lt=it.aspectratio;At=[Lt.x,Lt.y,Lt.z]}else if(mt==="auto"||mt==="data"){var Ht=[1,1,1];for(H=0;H<3;++H){j=it[y[H]],et=j.type;var Ut=Q[et];Ht[H]=Math.pow(Ut.acc,1/Ut.count)/X[H]}mt==="data"||Math.max.apply(null,Ht)/Math.min.apply(null,Ht)<=4?At=Ht:At=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");it.aspectratio.x=ut.aspectratio.x=At[0],it.aspectratio.y=ut.aspectratio.y=At[1],it.aspectratio.z=ut.aspectratio.z=At[2],k.glplot.setAspectratio(it.aspectratio),k.viewInitial.aspectratio||(k.viewInitial.aspectratio={x:it.aspectratio.x,y:it.aspectratio.y,z:it.aspectratio.z}),k.viewInitial.aspectmode||(k.viewInitial.aspectmode=it.aspectmode);var kt=it.domain||null,Vt=N._size||null;if(kt&&Vt){var It=k.container.style;It.position="absolute",It.left=Vt.l+kt.x[0]*Vt.w+"px",It.top=Vt.t+(1-kt.y[1])*Vt.h+"px",It.width=Vt.w*(kt.x[1]-kt.x[0])+"px",It.height=Vt.h*(kt.y[1]-kt.y[0])+"px"}k.glplot.redraw()}},A.destroy=function(){var D=this;D.glplot&&(D.camera.mouseListener.enabled=!1,D.container.removeEventListener("wheel",D.camera.wheelListener),D.camera=null,D.glplot.dispose(),D.container.parentNode.removeChild(D.container),D.glplot=null)};function s(D){return[[D.eye.x,D.eye.y,D.eye.z],[D.center.x,D.center.y,D.center.z],[D.up.x,D.up.y,D.up.z]]}function L(D){return{up:{x:D.up[0],y:D.up[1],z:D.up[2]},center:{x:D.center[0],y:D.center[1],z:D.center[2]},eye:{x:D.eye[0],y:D.eye[1],z:D.eye[2]},projection:{type:D._ortho===!0?"orthographic":"perspective"}}}A.getCamera=function(){var D=this;return D.camera.view.recalcMatrix(D.camera.view.lastT()),L(D.camera)},A.setViewport=function(D){var N=this,I=D.camera;N.camera.lookAt.apply(this,s(I)),N.glplot.setAspectratio(D.aspectratio);var k=I.projection.type==="orthographic",B=N.camera._ortho;k!==B&&(N.glplot.redraw(),N.glplot.clearRGBA(),N.glplot.dispose(),N.initializeGLPlot())},A.isCameraChanged=function(D){var N=this,I=N.getCamera(),k=p.nestedProperty(D,N.id+".camera"),B=k.get();function O(et,it,ut,J){var X=["up","center","eye"],tt=["x","y","z"];return it[X[ut]]&&et[X[ut]][tt[J]]===it[X[ut]][tt[J]]}var H=!1;if(B===void 0)H=!0;else{for(var Y=0;Y<3;Y++)for(var j=0;j<3;j++)if(!O(I,B,Y,j)){H=!0;break}(!B.projection||I.projection&&I.projection.type!==B.projection.type)&&(H=!0)}return H},A.isAspectChanged=function(D){var N=this,I=N.glplot.getAspectratio(),k=p.nestedProperty(D,N.id+".aspectratio"),B=k.get();return B===void 0||B.x!==I.x||B.y!==I.y||B.z!==I.z},A.saveLayout=function(D){var N=this,I=N.fullLayout,k,B,O,H,Y,j,et=N.isCameraChanged(D),it=N.isAspectChanged(D),ut=et||it;if(ut){var J={};if(et&&(k=N.getCamera(),B=p.nestedProperty(D,N.id+".camera"),O=B.get(),J[N.id+".camera"]=O),it&&(H=N.glplot.getAspectratio(),Y=p.nestedProperty(D,N.id+".aspectratio"),j=Y.get(),J[N.id+".aspectratio"]=j),v.call("_storeDirectGUIEdit",D,I._preGUI,J),et){B.set(k);var X=p.nestedProperty(I,N.id+".camera");X.set(k)}if(it){Y.set(H);var tt=p.nestedProperty(I,N.id+".aspectratio");tt.set(H),N.glplot.redraw()}}return ut},A.updateFx=function(D,N){var I=this,k=I.camera;if(k)if(D==="orbit")k.mode="orbit",k.keyBindingMode="rotate";else if(D==="turntable"){k.up=[0,0,1],k.mode="turntable",k.keyBindingMode="rotate";var B=I.graphDiv,O=B._fullLayout,H=I.fullSceneLayout.camera,Y=H.up.x,j=H.up.y,et=H.up.z;if(et/Math.sqrt(Y*Y+j*j+et*et)<.999){var it=I.id+".camera.up",ut={x:0,y:0,z:1},J={};J[it]=ut;var X=B.layout;v.call("_storeDirectGUIEdit",X,O._preGUI,J),H.up=ut,p.nestedProperty(X,it).set(ut)}}else k.keyBindingMode=D;I.fullSceneLayout.hovermode=N};function M(D,N,I){for(var k=0,B=I-1;k0)for(var Y=255/H,j=0;j<3;++j)D[O+j]=Math.min(Y*D[O+j],255)}}A.toImage=function(D){var N=this;D||(D="png"),N.staticMode&&N.container.appendChild(u),N.glplot.redraw();var I=N.glplot.gl,k=I.drawingBufferWidth,B=I.drawingBufferHeight;I.bindFramebuffer(I.FRAMEBUFFER,null);var O=new Uint8Array(k*B*4);I.readPixels(0,0,k,B,I.RGBA,I.UNSIGNED_BYTE,O),M(O,k,B),z(O,k,B);var H=document.createElement("canvas");H.width=k,H.height=B;var Y=H.getContext("2d",{willReadFrequently:!0}),j=Y.createImageData(k,B);j.data.set(O),Y.putImageData(j,0,0);var et;switch(D){case"jpeg":et=H.toDataURL("image/jpeg");break;case"webp":et=H.toDataURL("image/webp");break;default:et=H.toDataURL("image/png")}return N.staticMode&&N.container.removeChild(u),et},A.setConvert=function(){for(var D=this,N=0;N<3;N++){var I=D.fullSceneLayout[y[N]];e.setConvert(I,D.fullLayout),I.setScale=p.noop}},A.make4thDimension=function(){var D=this,N=D.graphDiv,I=N._fullLayout;D._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(D._mockAxis,I)},G.exports=w},52094:function(G){G.exports=function(t,g,C,i){i=i||t.length;for(var S=new Array(i),x=0;xOpenStreetMap contributors',S=['© Carto',i].join(" "),x=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),v=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),p={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:x,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:x,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:v,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},r=g(p);G.exports={requiredVersion:C,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:p,styleValuesNonMapbox:r,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+C+"."].join(` +`+M(Y.dayMonthYear,I,O,H);return M(k,I,O,H)};var N=3*p;U.incrementMonth=function(I,k,B){B=b(B)&&B;var O=S(I,p);if(I=Math.round(I-O),B)try{var H=Math.round(I/p)+n,Y=f.getComponentMethod("calendars","getCal")(B),j=Y.fromJD(H);return k%12?Y.add(j,k,"m"):Y.add(j,k/12,"y"),(j.toJD()-n)*p+O}catch{i.error("invalid ms "+I+" in calendar "+B)}var et=new Date(I+N);return et.setUTCMonth(et.getUTCMonth()+k)+O-N},U.findExactDates=function(I,k){for(var B=0,O=0,H=0,Y=0,j,et,it=b(k)&&f.getComponentMethod("calendars","getCal")(k),ut=0;ut0&&D[N+1][0]<0)return N;return null}switch(y==="RUS"||y==="FJI"?T=function(D){var N;if(z(D)===null)N=D;else for(N=new Array(D.length),M=0;MN?I[k++]=[D[M][0]+360,D[M][1]]:M===N?(I[k++]=D[M],I[k++]=[D[M][0],-90]):I[k++]=D[M];var B=a.tester(I);B.pts.pop(),E.push(B)}:T=function(D){E.push(a.tester(D))},A.type){case"MultiPolygon":for(s=0;s<_.length;s++)for(L=0;L<_[s].length;L++)T(_[s][L]);break;case"Polygon":for(s=0;s<_.length;s++)T(_[s]);break}return E}function v(w){var A=w.geojson,_=window.PlotlyGeoAssets||{},y=typeof A=="string"?_[A]:A;return r(y)?y:(p.error("Oops ... something went wrong when fetching "+A),!1)}function b(w){var A=w[0].trace,_=v(A);if(!_)return!1;var y={},E=[],T;for(T=0;TE&&(E=L,_=s)}else _=A;return S.default(_).geometry.coordinates}function o(w){var A=window.PlotlyGeoAssets||{},_=[];function y(M){return new Promise(function(z,D){g.json(M,function(N,I){if(N){delete A[M];var k=N.status===404?'GeoJSON at URL "'+M+'" does not exist.':"Unexpected error while fetching from "+M;return D(new Error(k))}return A[M]=I,z(I)})})}function E(M){return new Promise(function(z,D){var N=0,I=setInterval(function(){if(A[M]&&A[M]!=="pending")return clearInterval(I),z(A[M]);if(N>100)return clearInterval(I),D("Unexpected error while fetching from "+M);N++},50)})}for(var T=0;T0&&(x.push(h),h=[])}return h.length>0&&x.push(h),x},U.makeLine=function(C){return C.length===1?{type:"LineString",coordinates:C[0]}:{type:"MultiLineString",coordinates:C}},U.makePolygon=function(C){if(C.length===1)return{type:"Polygon",coordinates:C};for(var i=new Array(C.length),S=0;S1||A<0||A>1?null:{x:p+m*A,y:r+u*A}}U.segmentDistance=function(r,e,a,n,f,c,l,m){if(C(r,e,a,n,f,c,l,m))return 0;var v=a-r,b=n-e,u=l-f,o=m-c,d=v*v+b*b,w=u*u+o*o,A=Math.min(i(v,b,d,f-r,c-e),i(v,b,d,l-r,m-e),i(u,o,w,r-f,e-c),i(u,o,w,a-f,n-c));return Math.sqrt(A)};function i(p,r,e,a,n){var f=a*p+n*r;if(f<0)return a*a+n*n;if(f>e){var c=a-p,l=n-r;return c*c+l*l}else{var m=a*r-n*p;return m*m/e}}var S,x,h;U.getTextLocation=function(r,e,a,n){if((r!==x||n!==h)&&(S={},x=r,h=n),S[a])return S[a];var f=r.getPointAtLength(g(a-n/2,e)),c=r.getPointAtLength(g(a+n/2,e)),l=Math.atan((c.y-f.y)/(c.x-f.x)),m=r.getPointAtLength(g(a,e)),v=(m.x*4+f.x+c.x)/6,b=(m.y*4+f.y+c.y)/6,u={x:v,y:b,theta:l};return S[a]=u,u},U.clearLocationCache=function(){x=null},U.getVisibleSegment=function(r,e,a){var n=e.left,f=e.right,c=e.top,l=e.bottom,m=0,v=r.getTotalLength(),b=v,u,o;function d(A){var _=r.getPointAtLength(A);A===0?u=_:A===v&&(o=_);var y=_.xf?_.x-f:0,E=_.yl?_.y-l:0;return Math.sqrt(y*y+E*E)}for(var w=d(m);w;){if(m+=w+a,m>b)return;w=d(m)}for(w=d(b);w;){if(b-=w+a,m>b)return;w=d(b)}return{min:m,max:b,len:b-m,total:v,isClosed:m===0&&b===v&&Math.abs(u.x-o.x)<.1&&Math.abs(u.y-o.y)<.1}},U.findPointOnPath=function(r,e,a,n){n=n||{};for(var f=n.pathLength||r.getTotalLength(),c=n.tolerance||.001,l=n.iterationLimit||30,m=r.getPointAtLength(0)[a]>r.getPointAtLength(f)[a]?-1:1,v=0,b=0,u=f,o,d,w;v0?u=o:b=o,v++}return d}},33040:function(G,U,t){var g=t(38248),C=t(49760),i=t(72160),S=t(8932),x=t(22548).defaultLine,h=t(38116).isArrayOrTypedArray,p=i(x),r=1;function e(l,m){var v=l;return v[3]*=m,v}function a(l){if(g(l))return p;var m=i(l);return m.length?m:p}function n(l){return g(l)?l:r}function f(l,m,v){var b=l.color;b&&b._inputArray&&(b=b._inputArray);var u=h(b),o=h(m),d=S.extractOpts(l),w=[],A,_,y,E,T;if(d.colorscale!==void 0?A=S.makeColorScaleFuncFromTrace(l):A=a,u?_=function(L,M){return L[M]===void 0?p:i(A(L[M]))}:_=a,o?y=function(L,M){return L[M]===void 0?r:n(L[M])}:y=n,u||o)for(var s=0;s1?(C*t+C*g)/C:t+g,S=String(i).length;if(S>16){var x=String(g).length,h=String(t).length;if(S>=h+x){var p=parseFloat(i).toPrecision(12);p.indexOf("e+")===-1&&(i=+p)}}return i}},3400:function(G,U,t){var g=t(33428),C=t(94336).E9,i=t(57624).E9,S=t(38248),x=t(39032),h=x.FP_SAFE,p=-h,r=x.BADNUM,e=G.exports={};e.adjustFormat=function(ot){return!ot||/^\d[.]\df/.test(ot)||/[.]\d%/.test(ot)?ot:ot==="0.f"?"~f":/^\d%/.test(ot)?"~%":/^\ds/.test(ot)?"~s":!/^[~,.0$]/.test(ot)&&/[&fps]/.test(ot)?"~"+ot:ot};var a={};e.warnBadFormat=function(Q){var ot=String(Q);a[ot]||(a[ot]=1,e.warn('encountered bad format: "'+ot+'"'))},e.noFormat=function(Q){return String(Q)},e.numberFormat=function(Q){var ot;try{ot=i(e.adjustFormat(Q))}catch{return e.warnBadFormat(Q),e.noFormat}return ot},e.nestedProperty=t(22296),e.keyedContainer=t(37804),e.relativeAttr=t(23193),e.isPlainObject=t(63620),e.toLogRange=t(36896),e.relinkPrivateKeys=t(51528);var n=t(38116);e.isArrayBuffer=n.isArrayBuffer,e.isTypedArray=n.isTypedArray,e.isArrayOrTypedArray=n.isArrayOrTypedArray,e.isArray1D=n.isArray1D,e.ensureArray=n.ensureArray,e.concat=n.concat,e.maxRowLength=n.maxRowLength,e.minRowLength=n.minRowLength;var f=t(20435);e.mod=f.mod,e.modHalf=f.modHalf;var c=t(63064);e.valObjectMeta=c.valObjectMeta,e.coerce=c.coerce,e.coerce2=c.coerce2,e.coerceFont=c.coerceFont,e.coercePattern=c.coercePattern,e.coerceHoverinfo=c.coerceHoverinfo,e.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,e.validate=c.validate;var l=t(67555);e.dateTime2ms=l.dateTime2ms,e.isDateTime=l.isDateTime,e.ms2DateTime=l.ms2DateTime,e.ms2DateTimeLocal=l.ms2DateTimeLocal,e.cleanDate=l.cleanDate,e.isJSDate=l.isJSDate,e.formatDate=l.formatDate,e.incrementMonth=l.incrementMonth,e.dateTick0=l.dateTick0,e.dfltRange=l.dfltRange,e.findExactDates=l.findExactDates,e.MIN_MS=l.MIN_MS,e.MAX_MS=l.MAX_MS;var m=t(14952);e.findBin=m.findBin,e.sorterAsc=m.sorterAsc,e.sorterDes=m.sorterDes,e.distinctVals=m.distinctVals,e.roundUp=m.roundUp,e.sort=m.sort,e.findIndexOfMin=m.findIndexOfMin,e.sortObjectKeys=t(95376);var v=t(63084);e.aggNums=v.aggNums,e.len=v.len,e.mean=v.mean,e.median=v.median,e.midRange=v.midRange,e.variance=v.variance,e.stdev=v.stdev,e.interp=v.interp;var b=t(52248);e.init2dArray=b.init2dArray,e.transposeRagged=b.transposeRagged,e.dot=b.dot,e.translationMatrix=b.translationMatrix,e.rotationMatrix=b.rotationMatrix,e.rotationXYMatrix=b.rotationXYMatrix,e.apply3DTransform=b.apply3DTransform,e.apply2DTransform=b.apply2DTransform,e.apply2DTransform2=b.apply2DTransform2,e.convertCssMatrix=b.convertCssMatrix,e.inverseTransformMatrix=b.inverseTransformMatrix;var u=t(11864);e.deg2rad=u.deg2rad,e.rad2deg=u.rad2deg,e.angleDelta=u.angleDelta,e.angleDist=u.angleDist,e.isFullCircle=u.isFullCircle,e.isAngleInsideSector=u.isAngleInsideSector,e.isPtInsideSector=u.isPtInsideSector,e.pathArc=u.pathArc,e.pathSector=u.pathSector,e.pathAnnulus=u.pathAnnulus;var o=t(98308);e.isLeftAnchor=o.isLeftAnchor,e.isCenterAnchor=o.isCenterAnchor,e.isRightAnchor=o.isRightAnchor,e.isTopAnchor=o.isTopAnchor,e.isMiddleAnchor=o.isMiddleAnchor,e.isBottomAnchor=o.isBottomAnchor;var d=t(92348);e.segmentsIntersect=d.segmentsIntersect,e.segmentDistance=d.segmentDistance,e.getTextLocation=d.getTextLocation,e.clearLocationCache=d.clearLocationCache,e.getVisibleSegment=d.getVisibleSegment,e.findPointOnPath=d.findPointOnPath;var w=t(92880);e.extendFlat=w.extendFlat,e.extendDeep=w.extendDeep,e.extendDeepAll=w.extendDeepAll,e.extendDeepNoArrays=w.extendDeepNoArrays;var A=t(24248);e.log=A.log,e.warn=A.warn,e.error=A.error;var _=t(53756);e.counterRegex=_.counter;var y=t(91200);e.throttle=y.throttle,e.throttleDone=y.done,e.clearThrottle=y.clear;var E=t(52200);e.getGraphDiv=E.getGraphDiv,e.isPlotDiv=E.isPlotDiv,e.removeElement=E.removeElement,e.addStyleRule=E.addStyleRule,e.addRelatedStyleRule=E.addRelatedStyleRule,e.deleteRelatedStyleRule=E.deleteRelatedStyleRule,e.getFullTransformMatrix=E.getFullTransformMatrix,e.getElementTransformMatrix=E.getElementTransformMatrix,e.getElementAndAncestors=E.getElementAndAncestors,e.equalDomRects=E.equalDomRects,e.clearResponsive=t(75352),e.preserveDrawingBuffer=t(34296),e.makeTraceGroups=t(30988),e._=t(98356),e.notifier=t(41792),e.filterUnique=t(68944),e.filterVisible=t(43880),e.pushUnique=t(52416),e.increment=t(1396),e.cleanNumber=t(54037),e.ensureNumber=function(ot){return S(ot)?(ot=Number(ot),ot>h||ot=ot?!1:S(Q)&&Q>=0&&Q%1===0},e.noop=t(16628),e.identity=t(35536),e.repeat=function(Q,ot){for(var $=new Array(ot),Z=0;Z$?Math.max($,Math.min(ot,Q)):Math.max(ot,Math.min($,Q))},e.bBoxIntersect=function(Q,ot,$){return $=$||0,Q.left<=ot.right+$&&ot.left<=Q.right+$&&Q.top<=ot.bottom+$&&ot.top<=Q.bottom+$},e.simpleMap=function(Q,ot,$,Z,st){for(var nt=Q.length,ct=new Array(nt),gt=0;gt=Math.pow(2,$)?st>10?(e.warn("randstr failed uniqueness"),ct):Q(ot,$,Z,(st||0)+1):ct},e.OptionControl=function(Q,ot){Q||(Q={}),ot||(ot="opt");var $={};return $.optionList=[],$._newoption=function(Z){Z[ot]=Q,$[Z.name]=Z,$.optionList.push(Z)},$["_"+ot]=Q,$},e.smooth=function(Q,ot){if(ot=Math.round(ot)||0,ot<2)return Q;var $=Q.length,Z=2*$,st=2*ot-1,nt=new Array(st),ct=new Array($),gt,Tt,wt,Rt;for(gt=0;gt=Z&&(wt-=Z*Math.floor(wt/Z)),wt<0?wt=-1-wt:wt>=$&&(wt=Z-1-wt),Rt+=Q[wt]*nt[Tt];ct[gt]=Rt}return ct},e.syncOrAsync=function(Q,ot,$){var Z,st;function nt(){return e.syncOrAsync(Q,ot,$)}for(;Q.length;)if(st=Q.splice(0,1)[0],Z=st(ot),Z&&Z.then)return Z.then(nt);return $&&$(ot)},e.stripTrailingSlash=function(Q){return Q.substr(-1)==="/"?Q.substr(0,Q.length-1):Q},e.noneOrAll=function(Q,ot,$){if(Q){var Z=!1,st=!0,nt,ct;for(nt=0;nt<$.length;nt++)ct=Q[$[nt]],ct!=null?Z=!0:st=!1;if(Z&&!st)for(nt=0;nt<$.length;nt++)Q[$[nt]]=ot[$[nt]]}},e.mergeArray=function(Q,ot,$,Z){var st=typeof Z=="function";if(e.isArrayOrTypedArray(Q))for(var nt=Math.min(Q.length,ot.length),ct=0;ct0?st:0})},e.fillArray=function(Q,ot,$,Z){if(Z=Z||e.identity,e.isArrayOrTypedArray(Q))for(var st=0;st1?st+ct[1]:"";if(nt&&(ct.length>1||gt.length>4||$))for(;Z.test(gt);)gt=gt.replace(Z,"$1"+nt+"$2");return gt+Tt},e.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var k=/^\w*$/;e.templateString=function(Q,ot){var $={};return Q.replace(e.TEMPLATE_STRING_REGEX,function(Z,st){var nt;return k.test(st)?nt=ot[st]:($[st]=$[st]||e.nestedProperty(ot,st).get,nt=$[st]()),e.isValidTextValue(nt)?nt:""})};var B={max:10,count:0,name:"hovertemplate"};e.hovertemplateString=function(){return it.apply(B,arguments)};var O={max:10,count:0,name:"texttemplate"};e.texttemplateString=function(){return it.apply(O,arguments)};var H=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Y(Q){var ot=Q.match(H);return ot?{key:ot[1],op:ot[2],number:Number(ot[3])}:{key:Q,op:null,number:null}}var j={max:10,count:0,name:"texttemplate",parseMultDiv:!0};e.texttemplateStringForShapes=function(){return it.apply(j,arguments)};var et=/^[:|\|]/;function it(Q,ot,$){var Z=this,st=arguments;ot||(ot={});var nt={};return Q.replace(e.TEMPLATE_STRING_REGEX,function(ct,gt,Tt){var wt=gt==="xother"||gt==="yother",Rt=gt==="_xother"||gt==="_yother",bt=gt==="_xother_"||gt==="_yother_",At=gt==="xother_"||gt==="yother_",mt=wt||Rt||At||bt,Lt=gt;(Rt||bt)&&(Lt=Lt.substring(1)),(At||bt)&&(Lt=Lt.substring(0,Lt.length-1));var Ht=null,Ut=null;if(Z.parseMultDiv){var kt=Y(Lt);Lt=kt.key,Ht=kt.op,Ut=kt.number}var Vt;if(mt){if(Vt=ot[Lt],Vt===void 0)return""}else{var It,re;for(re=3;re=ut&&ct<=J,wt=gt>=ut&><=J;if(Tt&&(Z=10*Z+ct-ut),wt&&(st=10*st+gt-ut),!Tt||!wt){if(Z!==st)return Z-st;if(ct!==gt)return ct-gt}}return st-Z};var X=2e9;e.seedPseudoRandom=function(){X=2e9},e.pseudoRandom=function(){var Q=X;return X=(69069*X+1)%4294967296,Math.abs(X-Q)<429496729?e.pseudoRandom():X/4294967296},e.fillText=function(Q,ot,$){var Z=Array.isArray($)?function(ct){$.push(ct)}:function(ct){$.text=ct},st=e.extractOption(Q,ot,"htx","hovertext");if(e.isValidTextValue(st))return Z(st);var nt=e.extractOption(Q,ot,"tx","text");if(e.isValidTextValue(nt))return Z(nt)},e.isValidTextValue=function(Q){return Q||Q===0},e.formatPercent=function(Q,ot){ot=ot||0;for(var $=(Math.round(100*Q*Math.pow(10,ot))*Math.pow(.1,ot)).toFixed(ot)+"%",Z=0;Z1&&(wt=1):wt=0,e.strTranslate(st-wt*($+ct),nt-wt*(Z+gt))+e.strScale(wt)+(Tt?"rotate("+Tt+(ot?"":" "+$+" "+Z)+")":"")},e.setTransormAndDisplay=function(Q,ot){Q.attr("transform",e.getTextTransform(ot)),Q.style("display",ot.scale?null:"none")},e.ensureUniformFontSize=function(Q,ot){var $=e.extendFlat({},ot);return $.size=Math.max(ot.size,Q._fullLayout.uniformtext.minsize||0),$},e.join2=function(Q,ot,$){var Z=Q.length;return Z>1?Q.slice(0,-1).join(ot)+$+Q[Z-1]:Q.join(ot)},e.bigFont=function(Q){return Math.round(1.2*Q)};var tt=e.getFirefoxVersion(),V=tt!==null&&tt<86;e.getPositionFromD3Event=function(){return V?[g.event.layerX,g.event.layerY]:[g.event.offsetX,g.event.offsetY]}},63620:function(G){G.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},37804:function(G,U,t){var g=t(22296),C=/^\w*$/,i=0,S=1,x=2,h=3,p=4;G.exports=function(e,a,n,f){n=n||"name",f=f||"value";var c,l,m,v={};a&&a.length?(m=g(e,a),l=m.get()):l=e,a=a||"";var b={};if(l)for(c=0;c2)return v[w]=v[w]|x,o.set(d,null);if(u){for(c=w;c1){var x=["LOG:"];for(S=0;S1){var h=[];for(S=0;S"),"long")}},i.warn=function(){var S;if(g.logging>0){var x=["WARN:"];for(S=0;S0){var h=[];for(S=0;S"),"stick")}},i.error=function(){var S;if(g.logging>0){var x=["ERROR:"];for(S=0;S0){var h=[];for(S=0;S"),"stick")}}},30988:function(G,U,t){var g=t(33428);G.exports=function(i,S,x){var h=i.selectAll("g."+x.replace(/\s/g,".")).data(S,function(r){return r[0].trace.uid});h.exit().remove(),h.enter().append("g").attr("class",x),h.order();var p=i.classed("rangeplot")?"nodeRangePlot3":"node3";return h.each(function(r){r[0][p]=g.select(this)}),h}},52248:function(G,U,t){var g=t(36524);U.init2dArray=function(C,i){for(var S=new Array(C),x=0;xC/2?g-Math.round(g/C)*C:g}G.exports={mod:U,modHalf:t}},22296:function(G,U,t){var g=t(38248),C=t(38116).isArrayOrTypedArray;G.exports=function(f,c){if(g(c))c=String(c);else if(typeof c!="string"||c.substr(c.length-4)==="[-1]")throw"bad property string";var l=c.split("."),m,v,b,u;for(u=0;u/g),l=0;lr||w===C||wa||o&&c(u))}function m(u,o){var d=u[0],w=u[1];if(d===C||dr||w===C||wa)return!1;var A=h.length,_=h[0][0],y=h[0][1],E=0,T,s,L,M,z;for(T=1;TMath.max(s,_)||w>Math.max(L,y)))if(wn||Math.abs(g(m,c))>r)return!0;return!1},i.filter=function(x,h){var p=[x[0]],r=0,e=0;function a(f){x.push(f);var c=p.length,l=r;p.splice(e+1);for(var m=l+1;m1){var n=x.pop();a(n)}return{addPt:a,raw:x,filtered:p}}},5048:function(G,U,t){var g=t(16576),C=t(28624);G.exports=function(S,x,h){var p=S._fullLayout,r=!0;return p._glcanvas.each(function(e){if(e.regl){e.regl.preloadCachedCode(h);return}if(!(e.pick&&!p._has("parcoords"))){try{e.regl=C({canvas:this,attributes:{antialias:!e.pick,preserveDrawingBuffer:!0},pixelRatio:S._context.plotGlPixelRatio||t.g.devicePixelRatio,extensions:x||[],cachedCode:h||{}})}catch{r=!1}e.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(a){S&&S.emit&&S.emit("plotly_webglcontextlost",{event:a,layer:e.key})},!1)}}),r||g({container:p._glcontainer.node()}),r}},34296:function(G,U,t){var g=t(38248),C=t(25928);G.exports=function(x){var h;if(x&&x.hasOwnProperty("userAgent")?h=x.userAgent:h=i(),typeof h!="string")return!0;var p=C({ua:{headers:{"user-agent":h}},tablet:!0,featureDetect:!1});if(!p)for(var r=h.split(" "),e=1;e-1;n--){var f=r[n];if(f.substr(0,8)==="Version/"){var c=f.substr(8).split(".")[0];if(g(c)&&(c=+c),c>=13)return!0}}}return p};function i(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}},52416:function(G){G.exports=function(t,g){if(g instanceof RegExp){for(var C=g.toString(),i=0;iC.queueLength&&(x.undoQueue.queue.shift(),x.undoQueue.index--)},S.startSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!0,x.undoQueue.beginSequence=!0},S.stopSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!1,x.undoQueue.beginSequence=!1},S.undo=function(h){var p,r;if(!(h.undoQueue===void 0||isNaN(h.undoQueue.index)||h.undoQueue.index<=0)){for(h.undoQueue.index--,p=h.undoQueue.queue[h.undoQueue.index],h.undoQueue.inSequence=!0,r=0;r=h.undoQueue.queue.length)){for(p=h.undoQueue.queue[h.undoQueue.index],h.undoQueue.inSequence=!0,r=0;r1?(n[l-1]-n[0])/(l-1):1,b,u;for(v>=0?u=f?h:p:u=f?e:r,a+=v*x*(f?-1:1)*(v>=0?1:-1);c90&&C.log("Long binary search..."),c-1};function h(a,n){return an}function e(a,n){return a>=n}U.sorterAsc=function(a,n){return a-n},U.sorterDes=function(a,n){return n-a},U.distinctVals=function(a){var n=a.slice();n.sort(U.sorterAsc);var f;for(f=n.length-1;f>-1&&n[f]===S;f--);for(var c=n[f]-n[0]||1,l=c/(f||1)/1e4,m=[],v,b=0;b<=f;b++){var u=n[b],o=u-v;v===void 0?(m.push(u),v=u):o>l&&(c=Math.min(c,o),m.push(u),v=u)}return{vals:m,minDiff:c}},U.roundUp=function(a,n,f){for(var c=0,l=n.length-1,m,v=0,b=f?0:1,u=f?1:0,o=f?Math.ceil:Math.floor;c0&&(c=1),f&&c)return a.sort(n)}return c?a:a.reverse()},U.findIndexOfMin=function(a,n){n=n||i;for(var f=1/0,c,l=0;lx.length)&&(h=x.length),g(S)||(S=!1),C(x[0])){for(r=new Array(h),p=0;pi.length-1)return i[i.length-1];var x=S%1;return x*i[Math.ceil(S)]+(1-x)*i[Math.floor(S)]}},43080:function(G,U,t){var g=t(72160);function C(i){return i?g(i):[0,0,0,1]}G.exports=C},9188:function(G,U,t){var g=t(2264),C=t(43616),i=t(3400),S=null;function x(){if(S!==null)return S;S=!1;var h=i.isIE()||i.isSafari()||i.isIOS();if(window.navigator.userAgent&&!h){var p=Array.from(g.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")S=p.some(function(f){return r.apply(null,f)});else{var e=C.tester.append("image").attr("style",g.STYLE),a=window.getComputedStyle(e.node()),n=a.imageRendering;S=p.some(function(f){var c=f[1];return n===c||n===c.toLowerCase()}),e.remove()}}return S}G.exports=x},72736:function(G,U,t){var g=t(33428),C=t(3400),i=C.strTranslate,S=t(9616),x=t(84284).LINE_SPACING,h=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;U.convertToTspans=function(B,O,H){var Y=B.text(),j=!B.attr("data-notex")&&O&&O._context.typesetMath&&typeof MathJax<"u"&&Y.match(h),et=g.select(B.node().parentNode);if(et.empty())return;var it=B.attr("class")?B.attr("class").split(" ")[0]:"text";it+="-math",et.selectAll("svg."+it).remove(),et.selectAll("g."+it+"-group").remove(),B.style("display",null).attr({"data-unformatted":Y,"data-math":"N"});function ut(){et.empty()||(it=B.attr("class")+"-math",et.select("svg."+it).remove()),B.text("").style("white-space","pre");var J=D(B.node(),Y);J&&B.style("pointer-events","all"),U.positionText(B),H&&H.call(B)}return j?(O&&O._promises||[]).push(new Promise(function(J){B.style("display","none");var X=parseInt(B.node().style.fontSize,10),tt={fontSize:X};n(j[2],tt,function(V,Q,ot){et.selectAll("svg."+it).remove(),et.selectAll("g."+it+"-group").remove();var $=V&&V.select("svg");if(!$||!$.node()){ut(),J();return}var Z=et.append("g").classed(it+"-group",!0).attr({"pointer-events":"none","data-unformatted":Y,"data-math":"Y"});Z.node().appendChild($.node()),Q&&Q.node()&&$.node().insertBefore(Q.node().cloneNode(!0),$.node().firstChild);var st=ot.width,nt=ot.height;$.attr({class:it,height:nt,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ct=B.node().style.fill||"black",gt=$.select("g");gt.attr({fill:ct,stroke:ct});var Tt=gt.node().getBoundingClientRect(),wt=Tt.width,Rt=Tt.height;(wt>st||Rt>nt)&&($.style("overflow","hidden"),Tt=$.node().getBoundingClientRect(),wt=Tt.width,Rt=Tt.height);var bt=+B.attr("x"),At=+B.attr("y"),mt=X||B.node().getBoundingClientRect().height,Lt=-mt/4;if(it[0]==="y")Z.attr({transform:"rotate("+[-90,bt,At]+")"+i(-wt/2,Lt-Rt/2)});else if(it[0]==="l")At=Lt-Rt/2;else if(it[0]==="a"&&it.indexOf("atitle")!==0)bt=0,At=Lt;else{var Ht=B.attr("text-anchor");bt=bt-wt*(Ht==="middle"?.5:Ht==="end"?1:0),At=At+Lt-Rt/2}$.attr({x:bt,y:At}),H&&H.call(B,Z),J(Z)})})):ut(),B};var p=/(<|<|<)/g,r=/(>|>|>)/g;function e(B){return B.replace(p,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function n(B,O,H){var Y=parseInt((MathJax.version||"").split(".")[0]);if(Y!==2&&Y!==3){C.warn("No MathJax version:",MathJax.version);return}var j,et,it,ut,J=function(){return et=C.extendDeepAll({},MathJax.Hub.config),it=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},X=function(){et=C.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},tt=function(){if(j=MathJax.Hub.config.menuSettings.renderer,j!=="SVG")return MathJax.Hub.setRenderer("SVG")},V=function(){j=MathJax.config.startup.output,j!=="svg"&&(MathJax.config.startup.output="svg")},Q=function(){var ct="math-output-"+C.randstr({},64);ut=g.select("body").append("div").attr({id:ct}).style({visibility:"hidden",position:"absolute","font-size":O.fontSize+"px"}).text(e(B));var gt=ut.node();return Y===2?MathJax.Hub.Typeset(gt):MathJax.typeset([gt])},ot=function(){var ct=ut.select(Y===2?".MathJax_SVG":".MathJax"),gt=!ct.empty()&&ut.select("svg").node();if(!gt)C.log("There was an error in the tex syntax.",B),H();else{var Tt=gt.getBoundingClientRect(),wt;Y===2?wt=g.select("body").select("#MathJax_SVG_glyphs"):wt=ct.select("defs"),H(ct,wt,Tt)}ut.remove()},$=function(){if(j!=="SVG")return MathJax.Hub.setRenderer(j)},Z=function(){j!=="svg"&&(MathJax.config.startup.output=j)},st=function(){return it!==void 0&&(MathJax.Hub.processSectionDelay=it),MathJax.Hub.Config(et)},nt=function(){MathJax.config=et};Y===2?MathJax.Hub.Queue(J,tt,Q,ot,$,st):Y===3&&(X(),V(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){Q(),ot(),Z(),nt()}))}var f={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},c={sub:"0.3em",sup:"-0.6em"},l={sub:"-0.21em",sup:"0.42em"},m="​",v=["http:","https:","mailto:","",void 0,":"],b=U.NEWLINES=/(\r\n?|\n)/g,u=/(<[^<>]*>)/,o=/<(\/?)([^ >]*)(\s+(.*))?>/i,d=//i;U.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,y=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function E(B,O){if(!B)return null;var H=B.match(O),Y=H&&(H[3]||H[4]);return Y&&M(Y)}var T=/(^|;)\s*color:/;U.plainText=function(B,O){O=O||{};for(var H=O.len!==void 0&&O.len!==-1?O.len:1/0,Y=O.allowedTags!==void 0?O.allowedTags:["br"],j="...",et=j.length,it=B.split(u),ut=[],J="",X=0,tt=0;ttet?ut.push(V.substr(0,Z-et)+j):ut.push(V.substr(0,Z));break}J=""}}return ut.join("")};var s={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function M(B){return B.replace(L,function(O,H){var Y;return H.charAt(0)==="#"?Y=z(H.charAt(1)==="x"?parseInt(H.substr(2),16):parseInt(H.substr(1),10)):Y=s[H],Y||O})}U.convertEntities=M;function z(B){if(!(B>1114111)){var O=String.fromCodePoint;if(O)return O(B);var H=String.fromCharCode;return B<=65535?H(B):H((B>>10)+55232,B%1024+56320)}}function D(B,O){O=O.replace(b," ");var H=!1,Y=[],j,et=-1;function it(){et++;var Rt=document.createElementNS(S.svg,"tspan");g.select(Rt).attr({class:"line",dy:et*x+"em"}),B.appendChild(Rt),j=Rt;var bt=Y;if(Y=[{node:Rt}],bt.length>1)for(var At=1;At.",O);return}var bt=Y.pop();Rt!==bt.type&&C.log("Start tag <"+bt.type+"> doesnt match end tag <"+Rt+">. Pretending it did match.",O),j=Y[Y.length-1].node}var tt=d.test(O);tt?it():(j=B,Y=[{node:B}]);for(var V=O.split(u),Q=0;Qh.ts+S){e();return}h.timer=setTimeout(function(){e(),h.timer=null},S)},U.done=function(C){var i=t[C];return!i||!i.timer?Promise.resolve():new Promise(function(S){var x=i.onDone;i.onDone=function(){x&&x(),S(),i.onDone=null}})},U.clear=function(C){if(C)g(t[C]),delete t[C];else for(var i in t)U.clear(i)};function g(C){C&&C.timer!==null&&(clearTimeout(C.timer),C.timer=null)}},36896:function(G,U,t){var g=t(38248);G.exports=function(i,S){if(i>0)return Math.log(i)/Math.LN10;var x=Math.log(Math.min(S[0],S[1]))/Math.LN10;return g(x)||(x=Math.log(Math.max(S[0],S[1]))/Math.LN10-6),x}},59972:function(G,U,t){var g=G.exports={},C=t(79552).locationmodeToLayer,i=t(55712).NO;g.getTopojsonName=function(S){return[S.scope.replace(/ /g,"-"),"_",S.resolution.toString(),"m"].join("")},g.getTopojsonPath=function(S,x){return S+x+".json"},g.getTopojsonFeatures=function(S,x){var h=C[S.locationmode],p=x.objects[h];return i(x,p).features}},11680:function(G){G.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(G){G.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},69820:function(G,U,t){var g=t(24040);G.exports=function(i){for(var S=g.layoutArrayContainers,x=g.layoutArrayRegexes,h=i.split("[")[0],p,r,e=0;e0&&S.log("Clearing previous rejected promises from queue."),d._promises=[]},U.cleanLayout=function(d){var w,A;d||(d={}),d.xaxis1&&(d.xaxis||(d.xaxis=d.xaxis1),delete d.xaxis1),d.yaxis1&&(d.yaxis||(d.yaxis=d.yaxis1),delete d.yaxis1),d.scene1&&(d.scene||(d.scene=d.scene1),delete d.scene1);var _=(x.subplotsRegistry.cartesian||{}).attrRegex,y=(x.subplotsRegistry.polar||{}).attrRegex,E=(x.subplotsRegistry.ternary||{}).attrRegex,T=(x.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(d);for(w=0;w3?(tt.x=1.02,tt.xanchor="left"):tt.x<-2&&(tt.x=-.02,tt.xanchor="right"),tt.y>3?(tt.y=1.02,tt.yanchor="bottom"):tt.y<-2&&(tt.y=-.02,tt.yanchor="top")),f(d),d.dragmode==="rotate"&&(d.dragmode="orbit"),p.clean(d),d.template&&d.template.layout&&U.cleanLayout(d.template.layout),d};function n(d,w){var A=d[w],_=w.charAt(0);A&&A!=="paper"&&(d[w]=r(A,_,!0))}function f(d){d&&((typeof d.title=="string"||typeof d.title=="number")&&(d.title={text:d.title}),w("titlefont","font"),w("titleposition","position"),w("titleside","side"),w("titleoffset","offset"));function w(A,_){var y=d[A],E=d.title&&d.title[_];y&&!E&&(d.title||(d.title={}),d.title[_]=d[A],delete d[A])}}U.cleanData=function(d){for(var w=0;w0)return d.substr(0,w)}U.hasParent=function(d,w){for(var A=u(w);A;){if(A in d)return!0;A=u(A)}return!1};var o=["x","y","z"];U.clearAxisTypes=function(d,w,A){for(var _=0;_1&&i.warn("Full array edits are incompatible with other edits",l);var w=n[""][""];if(p(w))a.set(null);else if(Array.isArray(w))a.set(w);else return i.warn("Unrecognized full array edit value",l,w),!0;return u?!1:(m(o,d),v(e),!0)}var A=Object.keys(n).map(Number).sort(S),_=a.get(),y=_||[],E=c(d,l).get(),T=[],s=-1,L=y.length,M,z,D,N,I,k,B,O;for(M=0;My.length-(B?0:1)){i.warn("index out of range",l,D);continue}if(k!==void 0)I.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",l,D),p(k)?T.push(D):B?(k==="add"&&(k={}),y.splice(D,0,k),E&&E.splice(D,0,{})):i.warn("Unrecognized full object edit value",l,D,k),s===-1&&(s=D);else for(z=0;z=0;M--)y.splice(T[M],1),E&&E.splice(T[M],1);if(y.length?_||a.set(y):a.set(null),u)return!1;if(m(o,d),b!==C){var H;if(s===-1)H=A;else{for(L=Math.max(y.length,L),H=[],M=0;M=s));M++)H.push(D);for(M=s;M=Mt.data.length||me<-Mt.data.length)throw new Error(jt+" must be valid indices for gd.data.");if(Nt.indexOf(me,ie+1)>-1||me>=0&&Nt.indexOf(-Mt.data.length+me)>-1||me<0&&Nt.indexOf(Mt.data.length+me)>-1)throw new Error("each index in "+jt+" must be unique.")}}function H(Mt,Nt,jt){if(!Array.isArray(Mt.data))throw new Error("gd.data must be an array.");if(typeof Nt>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Nt)||(Nt=[Nt]),O(Mt,Nt,"currentIndices"),typeof jt<"u"&&!Array.isArray(jt)&&(jt=[jt]),typeof jt<"u"&&O(Mt,jt,"newIndices"),typeof jt<"u"&&Nt.length!==jt.length)throw new Error("current and new indices must be of equal length.")}function Y(Mt,Nt,jt){var ie,me;if(!Array.isArray(Mt.data))throw new Error("gd.data must be an array.");if(typeof Nt>"u")throw new Error("traces must be defined.");for(Array.isArray(Nt)||(Nt=[Nt]),ie=0;ie"u")throw new Error("indices must be an integer or array of integers");O(Mt,jt,"indices");for(var be in Nt){if(!Array.isArray(Nt[be])||Nt[be].length!==jt.length)throw new Error("attribute "+be+" must be an array of length equal to indices array length");if(me&&(!(be in ie)||!Array.isArray(ie[be])||ie[be].length!==Nt[be].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function et(Mt,Nt,jt,ie){var me=S.isPlainObject(ie),be=[],ve,Le,ce,Te,Be;Array.isArray(jt)||(jt=[jt]),jt=B(jt,Mt.data.length-1);for(var ir in Nt)for(var pe=0;pe=0&&Be=0&&Be"u")return Te=U.redraw(Mt),p.add(Mt,me,ve,be,Le),Te;Array.isArray(jt)||(jt=[jt]);try{H(Mt,ie,jt)}catch(Be){throw Mt.data.splice(Mt.data.length-Nt.length,Nt.length),Be}return p.startSequence(Mt),p.add(Mt,me,ve,be,Le),Te=U.moveTraces(Mt,ie,jt),p.stopSequence(Mt),Te}function V(Mt,Nt){Mt=S.getGraphDiv(Mt);var jt=[],ie=U.addTraces,me=V,be=[Mt,jt,Nt],ve=[Mt,Nt],Le,ce;if(typeof Nt>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Nt)||(Nt=[Nt]),O(Mt,Nt,"indices"),Nt=B(Nt,Mt.data.length-1),Nt.sort(S.sorterDes),Le=0;Le"u")for(jt=[],Te=0;Te-1&&be.indexOf("grouptitlefont")===-1?Le(be,be.replace("titlefont","title.font")):be.indexOf("titleposition")>-1?Le(be,be.replace("titleposition","title.position")):be.indexOf("titleside")>-1?Le(be,be.replace("titleside","title.side")):be.indexOf("titleoffset")>-1&&Le(be,be.replace("titleoffset","title.offset"));function Le(ce,Te){Mt[Te]=Mt[ce],delete Mt[ce]}}function Tt(Mt,Nt,jt){Mt=S.getGraphDiv(Mt),w.clearPromiseQueue(Mt);var ie={};if(typeof Nt=="string")ie[Nt]=jt;else if(S.isPlainObject(Nt))ie=S.extendFlat({},Nt);else return S.warn("Relayout fail.",Nt,jt),Promise.reject();Object.keys(ie).length&&(Mt.changed=!0);var me=Lt(Mt,ie),be=me.flags;be.calc&&(Mt.calcdata=void 0);var ve=[a.previousPromises];be.layoutReplot?ve.push(A.layoutReplot):Object.keys(ie).length&&(wt(Mt,be,me)||a.supplyDefaults(Mt),be.legend&&ve.push(A.doLegend),be.layoutstyle&&ve.push(A.layoutStyles),be.axrange&&Rt(ve,me.rangesAltered),be.ticks&&ve.push(A.doTicksRelayout),be.modebar&&ve.push(A.doModeBar),be.camera&&ve.push(A.doCamera),be.colorbars&&ve.push(A.doColorBars),ve.push(L)),ve.push(a.rehover,a.redrag,a.reselect),p.add(Mt,Tt,[Mt,me.undoit],Tt,[Mt,me.redoit]);var Le=S.syncOrAsync(ve,Mt);return(!Le||!Le.then)&&(Le=Promise.resolve(Mt)),Le.then(function(){return Mt.emit("plotly_relayout",me.eventData),Mt})}function wt(Mt,Nt,jt){var ie=Mt._fullLayout;if(!Nt.axrange)return!1;for(var me in Nt)if(me!=="axrange"&&Nt[me])return!1;var be,ve,Le=function(Xe,Ke){return S.coerce(be,ve,c,Xe,Ke)},ce={};for(var Te in jt.rangesAltered){var Be=n.id2name(Te);if(be=Mt.layout[Be],ve=ie[Be],f(be,ve,Le,ce),ve._matchGroup){for(var ir in ve._matchGroup)if(ir!==Te){var pe=ie[n.id2name(ir)];pe.autorange=ve.autorange,pe.range=ve.range.slice(),pe._input.range=ve.range.slice()}}}return!0}function Rt(Mt,Nt){var jt=Nt?function(ie){var me=[],be=!0;for(var ve in Nt){var Le=n.getFromId(ie,ve);if(me.push(ve),(Le.ticklabelposition||"").indexOf("inside")!==-1&&Le._anchorAxis&&me.push(Le._anchorAxis._id),Le._matchGroup)for(var ce in Le._matchGroup)Nt[ce]||me.push(ce)}return n.draw(ie,me,{skipTitle:be})}:function(ie){return n.draw(ie,"redraw")};Mt.push(u,A.doAutoRangeAndConstraints,jt,A.drawData,A.finalDraw)}var bt=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,At=/^[xyz]axis[0-9]*\.autorange$/,mt=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Lt(Mt,Nt){var jt=Mt.layout,ie=Mt._fullLayout,me=ie._guiEditing,be=Z(ie._preGUI,me),ve=Object.keys(Nt),Le=n.list(Mt),ce=S.extendDeepAll({},Nt),Te={},Be,ir,pe;for(gt(Nt),ve=Object.keys(Nt),ir=0;ir0&&typeof Ve.parts[hr]!="string";)hr--;var vr=Ve.parts[hr],Yt=Ve.parts[hr-1]+"."+vr,Gt=Ve.parts.slice(0,hr).join("."),Ne=x(Mt.layout,Gt).get(),Oe=x(ie,Gt).get(),Qe=Ve.get();if(Je!==void 0){ge[ke]=Je,se[ke]=vr==="reverse"?Je:$(Qe);var er=e.getLayoutValObject(ie,Ve.parts);if(er&&er.impliedEdits&&Je!==null)for(var fr in er.impliedEdits)Ae(S.relativeAttr(ke,fr),er.impliedEdits[fr]);if(["width","height"].indexOf(ke)!==-1)if(Je){Ae("autosize",null);var rr=ke==="height"?"width":"height";Ae(rr,ie[rr])}else ie[ke]=Mt._initialAutoSize[ke];else if(ke==="autosize")Ae("width",Je?null:ie.width),Ae("height",Je?null:ie.height);else if(Yt.match(bt))Pe(Yt),x(ie,Gt+"._inputRange").set(null);else if(Yt.match(At)){Pe(Yt),x(ie,Gt+"._inputRange").set(null);var He=x(ie,Gt).get();He._inputDomain&&(He._input.domain=He._inputDomain.slice())}else Yt.match(mt)&&x(ie,Gt+"._inputDomain").set(null);if(vr==="type"){Ie=Ne;var dr=Oe.type==="linear"&&Je==="log",mr=Oe.type==="log"&&Je==="linear";if(dr||mr){if(!Ie||!Ie.range)Ae(Gt+".autorange",!0);else if(Oe.autorange)dr&&(Ie.range=Ie.range[1]>Ie.range[0]?[1,2]:[2,1]);else{var xr=Ie.range[0],pr=Ie.range[1];dr?(xr<=0&&pr<=0&&Ae(Gt+".autorange",!0),xr<=0?xr=pr/1e6:pr<=0&&(pr=xr/1e6),Ae(Gt+".range[0]",Math.log(xr)/Math.LN10),Ae(Gt+".range[1]",Math.log(pr)/Math.LN10)):(Ae(Gt+".range[0]",Math.pow(10,xr)),Ae(Gt+".range[1]",Math.pow(10,pr)))}Array.isArray(ie._subplots.polar)&&ie._subplots.polar.length&&ie[Ve.parts[0]]&&Ve.parts[1]==="radialaxis"&&delete ie[Ve.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Mt,Oe,Je,Ae),r.getComponentMethod("images","convertCoords")(Mt,Oe,Je,Ae)}else Ae(Gt+".autorange",!0),Ae(Gt+".range",null);x(ie,Gt+"._inputRange").set(null)}else if(vr.match(y)){var Gr=x(ie,ke).get(),Pr=(Je||{}).type;(!Pr||Pr==="-")&&(Pr="linear"),r.getComponentMethod("annotations","convertCoords")(Mt,Gr,Pr,Ae),r.getComponentMethod("images","convertCoords")(Mt,Gr,Pr,Ae)}var Dr=d.containerArrayMatch(ke);if(Dr){Be=Dr.array,ir=Dr.index;var cn=Dr.property,rn=er||{editType:"calc"};ir!==""&&cn===""&&(d.isAddVal(Je)?se[ke]=null:d.isRemoveVal(Je)?se[ke]=(x(jt,Be).get()||[])[ir]:S.warn("unrecognized full object value",Nt)),_.update($e,rn),Te[Be]||(Te[Be]={});var Cn=Te[Be][ir];Cn||(Cn=Te[Be][ir]={}),Cn[cn]=Je,delete Nt[ke]}else vr==="reverse"?(Ne.range?Ne.range.reverse():(Ae(Gt+".autorange",!0),Ne.range=[1,0]),Oe.autorange?$e.calc=!0:$e.plot=!0):(ke==="dragmode"&&(Je===!1&&Qe!==!1||Je!==!1&&Qe===!1)||ie._has("scatter-like")&&ie._has("regl")&&ke==="dragmode"&&(Je==="lasso"||Je==="select")&&!(Qe==="lasso"||Qe==="select")||ie._has("gl2d")?$e.plot=!0:er?_.update($e,er):$e.calc=!0,Ve.set(Je))}}for(Be in Te){var En=d.applyContainerArrayChanges(Mt,be(jt,Be),Te[Be],$e,be);En||($e.plot=!0)}for(var Tr in Ce){Ie=n.getFromId(Mt,Tr);var Cr=Ie&&Ie._constraintGroup;if(Cr){$e.calc=!0;for(var Wr in Cr)Ce[Wr]||(n.getFromId(Mt,Wr)._constraintShrinkable=!0)}}(Ht(Mt)||Nt.height||Nt.width)&&($e.plot=!0);var Ur=ie.shapes;for(ir=0;ir1;)if(ie.pop(),jt=x(Nt,ie.join(".")+".uirevision").get(),jt!==void 0)return jt;return Nt.uirevision}function $t(Mt,Nt){for(var jt=0;jt=me.length?me[0]:me[Te]:me}function Le(Te){return Array.isArray(be)?Te>=be.length?be[0]:be[Te]:be}function ce(Te,Be){var ir=0;return function(){if(Te&&++ir===Be)return Te()}}return new Promise(function(Te,Be){function ir(){if(ie._frameQueue.length!==0){for(;ie._frameQueue.length;){var vr=ie._frameQueue.pop();vr.onInterrupt&&vr.onInterrupt()}Mt.emit("plotly_animationinterrupted",[])}}function pe(vr){if(vr.length!==0){for(var Yt=0;Ytie._timeToNext&&Ke()};vr()}var $e=0;function ge(vr){return Array.isArray(me)?$e>=me.length?vr.transitionOpts=me[$e]:vr.transitionOpts=me[0]:vr.transitionOpts=me,$e++,vr}var se,Ae,Ce=[],Ie=Nt==null,Pe=Array.isArray(Nt),ke=!Ie&&!Pe&&S.isPlainObject(Nt);if(ke)Ce.push({type:"object",data:ge(S.extendFlat({},Nt))});else if(Ie||["string","number"].indexOf(typeof Nt)!==-1)for(se=0;se0&&urur)&&hr.push(Ae);Ce=hr}}Ce.length>0?pe(Ce):(Mt.emit("plotly_animated"),Te())})}function Wt(Mt,Nt,jt){if(Mt=S.getGraphDiv(Mt),Nt==null)return Promise.resolve();if(!S.isPlotDiv(Mt))throw new Error("This element is not a Plotly plot: "+Mt+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var ie,me,be,ve,Le=Mt._transitionData._frames,ce=Mt._transitionData._frameHash;if(!Array.isArray(Nt))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Nt);var Te=Le.length+Nt.length*2,Be=[],ir={};for(ie=Nt.length-1;ie>=0;ie--)if(S.isPlainObject(Nt[ie])){var pe=Nt[ie].name,Xe=(ce[pe]||ir[pe]||{}).name,Ke=Nt[ie].name,or=ce[Xe]||ir[Xe];Xe&&Ke&&typeof Ke=="number"&&or&&EVe.index?-1:ke.index=0;ie--){if(me=Be[ie].frame,typeof me.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!me.name)for(;ce[me.name="frame "+Mt._transitionData._counter++];);if(ce[me.name]){for(be=0;be=0;jt--)ie=Nt[jt],be.push({type:"delete",index:ie}),ve.unshift({type:"insert",index:ie,value:me[ie]});var Le=a.modifyFrames,ce=a.modifyFrames,Te=[Mt,ve],Be=[Mt,be];return p&&p.add(Mt,Le,Te,ce,Be),a.modifyFrames(Mt,be)}function xt(Mt){Mt=S.getGraphDiv(Mt);var Nt=Mt._fullLayout||{},jt=Mt._fullData||[];return a.cleanPlot([],{},jt,Nt),a.purge(Mt),h.purge(Mt),Nt._container&&Nt._container.remove(),delete Mt._context,Mt}function yt(Mt){var Nt=Mt._fullLayout,jt=Mt.getBoundingClientRect();if(!S.equalDomRects(jt,Nt._lastBBox)){var ie=Nt._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Mt));Nt._invScaleX=Math.sqrt(ie[0][0]*ie[0][0]+ie[0][1]*ie[0][1]+ie[0][2]*ie[0][2]),Nt._invScaleY=Math.sqrt(ie[1][0]*ie[1][0]+ie[1][1]*ie[1][1]+ie[1][2]*ie[1][2]),Nt._lastBBox=jt}}function Et(Mt){var Nt=g.select(Mt),jt=Mt._fullLayout;if(jt._calcInverseTransform=yt,jt._calcInverseTransform(Mt),jt._container=Nt.selectAll(".plot-container").data([0]),jt._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),jt._paperdiv=jt._container.selectAll(".svg-container").data([0]),jt._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),jt._glcontainer=jt._paperdiv.selectAll(".gl-container").data([{}]),jt._glcontainer.enter().append("div").classed("gl-container",!0),jt._paperdiv.selectAll(".main-svg").remove(),jt._paperdiv.select(".modebar-container").remove(),jt._paper=jt._paperdiv.insert("svg",":first-child").classed("main-svg",!0),jt._toppaper=jt._paperdiv.append("svg").classed("main-svg",!0),jt._modebardiv=jt._paperdiv.append("div"),delete jt._modeBar,jt._hoverpaper=jt._paperdiv.append("svg").classed("main-svg",!0),!jt._uid){var ie={};g.selectAll("defs").each(function(){this.id&&(ie[this.id.split("-")[1]]=1)}),jt._uid=S.randstr(ie)}jt._paperdiv.selectAll(".main-svg").attr(b.svgAttrs),jt._defs=jt._paper.append("defs").attr("id","defs-"+jt._uid),jt._clips=jt._defs.append("g").classed("clips",!0),jt._topdefs=jt._toppaper.append("defs").attr("id","topdefs-"+jt._uid),jt._topclips=jt._topdefs.append("g").classed("clips",!0),jt._bgLayer=jt._paper.append("g").classed("bglayer",!0),jt._draggers=jt._paper.append("g").classed("draglayer",!0);var me=jt._paper.append("g").classed("layer-below",!0);jt._imageLowerLayer=me.append("g").classed("imagelayer",!0),jt._shapeLowerLayer=me.append("g").classed("shapelayer",!0),jt._cartesianlayer=jt._paper.append("g").classed("cartesianlayer",!0),jt._polarlayer=jt._paper.append("g").classed("polarlayer",!0),jt._smithlayer=jt._paper.append("g").classed("smithlayer",!0),jt._ternarylayer=jt._paper.append("g").classed("ternarylayer",!0),jt._geolayer=jt._paper.append("g").classed("geolayer",!0),jt._funnelarealayer=jt._paper.append("g").classed("funnelarealayer",!0),jt._pielayer=jt._paper.append("g").classed("pielayer",!0),jt._iciclelayer=jt._paper.append("g").classed("iciclelayer",!0),jt._treemaplayer=jt._paper.append("g").classed("treemaplayer",!0),jt._sunburstlayer=jt._paper.append("g").classed("sunburstlayer",!0),jt._indicatorlayer=jt._toppaper.append("g").classed("indicatorlayer",!0),jt._glimages=jt._paper.append("g").classed("glimages",!0);var be=jt._toppaper.append("g").classed("layer-above",!0);jt._imageUpperLayer=be.append("g").classed("imagelayer",!0),jt._shapeUpperLayer=be.append("g").classed("shapelayer",!0),jt._selectionLayer=jt._toppaper.append("g").classed("selectionlayer",!0),jt._infolayer=jt._toppaper.append("g").classed("infolayer",!0),jt._menulayer=jt._toppaper.append("g").classed("menulayer",!0),jt._zoomlayer=jt._toppaper.append("g").classed("zoomlayer",!0),jt._hoverlayer=jt._hoverpaper.append("g").classed("hoverlayer",!0),jt._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Mt.emit("plotly_framework")}U.animate=Jt,U.addFrames=Wt,U.deleteFrames=Ft,U.addTraces=tt,U.deleteTraces=V,U.extendTraces=J,U.moveTraces=Q,U.prependTraces=X,U.newPlot=k,U._doPlot=s,U.purge=xt,U.react=xe,U.redraw=I,U.relayout=Tt,U.restyle=ot,U.setPlotConfig=M,U.update=Ut,U._guiRelayout=kt(Tt),U._guiRestyle=kt(ot),U._guiUpdate=kt(Ut),U._storeDirectGUIEdit=nt},20556:function(G){var U={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},t={};function g(C,i){for(var S in C){var x=C[S];x.valType?i[S]=x.dflt:(i[S]||(i[S]={}),g(x,i[S]))}}g(U,t),G.exports={configAttributes:U,dfltConfig:t}},73060:function(G,U,t){var g=t(24040),C=t(3400),i=t(45464),S=t(64859),x=t(16672),h=t(85656),p=t(20556).configAttributes,r=t(67824),e=C.extendDeepAll,a=C.isPlainObject,n=C.isArrayOrTypedArray,f=C.nestedProperty,c=C.valObjectMeta,l="_isSubplotObj",m="_isLinkedToArray",v="_arrayAttrRegexps",b="_deprecated",u=[l,m,v,b];U.IS_SUBPLOT_OBJ=l,U.IS_LINKED_TO_ARRAY=m,U.DEPRECATED=b,U.UNDERSCORE_ATTRS=u,U.get=function(){var N={};g.allTypes.forEach(function(k){N[k]=A(k)});var I={};return Object.keys(g.transformsRegistry).forEach(function(k){I[k]=y(k)}),{defs:{valObjects:c,metaKeys:u.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:N,layout:_(),transforms:I,frames:E(),animation:T(h),config:T(p)}},U.crawl=function(N,I,k,B){var O=k||0;B=B||"",Object.keys(N).forEach(function(H){var Y=N[H];if(u.indexOf(H)===-1){var j=(B?B+".":"")+H;I(Y,H,N,O,j),!U.isValObject(Y)&&a(Y)&&H!=="impliedEdits"&&U.crawl(Y,I,O+1,j)}})},U.isValObject=function(N){return N&&N.valType!==void 0},U.findArrayAttributes=function(N){var I=[],k=[],B=[],O,H;function Y(X,tt,V,Q){k=k.slice(0,Q).concat([tt]),B=B.slice(0,Q).concat([X&&X._isLinkedToArray]);var ot=X&&(X.valType==="data_array"||X.arrayOk===!0)&&!(k[Q-1]==="colorbar"&&(tt==="ticktext"||tt==="tickvals"));ot&&j(O,0,"")}function j(X,tt,V){var Q=X[k[tt]],ot=V+k[tt];if(tt===k.length-1)n(Q)&&I.push(H+ot);else if(B[tt]){if(Array.isArray(Q))for(var $=0;$=Y.length)return!1;O=(g.transformsRegistry[Y[j].type]||{}).attributes,H=O&&O[I[2]],B=3}else{var et=N._module;if(et||(et=(g.modules[N.type||i.type.dflt]||{})._module),!et)return!1;if(O=et.attributes,H=O&&O[k],!H){var it=et.basePlotModule;it&&it.attributes&&(H=it.attributes[k])}H||(H=i[k])}return d(H,I,B)},U.getLayoutValObject=function(N,I){var k=o(N,I[0]);return d(k,I,1)};function o(N,I){var k,B,O,H,Y=N._basePlotModules;if(Y){var j;for(k=0;k=H.length)return!1;if(N.dimensions===2){if(k++,I.length===k)return N;var Y=I[k];if(!w(Y))return!1;N=H[O][Y]}else N=H[O]}else N=H}}return N}function w(N){return N===Math.round(N)&&N>=0}function A(N){var I,k;I=g.modules[N]._module,k=I.basePlotModule;var B={};B.type=null;var O=e({},i),H=e({},I.attributes);U.crawl(H,function(et,it,ut,J,X){f(O,X).set(void 0),et===void 0&&f(H,X).set(void 0)}),e(B,O),g.traceIs(N,"noOpacity")&&delete B.opacity,g.traceIs(N,"showLegend")||(delete B.showlegend,delete B.legendgroup),g.traceIs(N,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),I.selectPoints||delete B.selectedpoints,e(B,H),k.attributes&&e(B,k.attributes),B.type=N;var Y={meta:I.meta||{},categories:I.categories||{},animatable:!!I.animatable,type:N,attributes:T(B)};if(I.layoutAttributes){var j={};e(j,I.layoutAttributes),Y.layoutAttributes=T(j)}return I.animatable||U.crawl(Y,function(et){U.isValObject(et)&&"anim"in et&&delete et.anim}),Y}function _(){var N={},I,k;e(N,S);for(I in g.subplotsRegistry)if(k=g.subplotsRegistry[I],!!k.layoutAttributes)if(Array.isArray(k.attr))for(var B=0;B=a&&(e._input||{})._templateitemname;f&&(n=a);var c=r+"["+n+"]",l;function m(){l={},f&&(l[c]={},l[c][i]=f)}m();function v(d,w){l[d]=w}function b(d,w){f?g.nestedProperty(l[c],d).set(w):l[c+"."+d]=w}function u(){var d=l;return m(),d}function o(d,w){d&&b(d,w);var A=u();for(var _ in A)g.nestedProperty(p,_).set(A[_])}return{modifyBase:v,modifyItem:b,getUpdateObj:u,applyUpdate:o}}},39172:function(G,U,t){var g=t(33428),C=t(24040),i=t(7316),S=t(3400),x=t(72736),h=t(73696),p=t(76308),r=t(43616),e=t(81668),a=t(45460),n=t(54460),f=t(84284),c=t(71888),l=c.enforce,m=c.clean,v=t(19280).doAutoRange,b="start",u="middle",o="end";U.layoutStyles=function(k){return S.syncOrAsync([i.doAutoMargin,w],k)};function d(k,B,O){for(var H=0;H=k[1]||Y[1]<=k[0])&&j[0]B[0])return!0}return!1}function w(k){var B=k._fullLayout,O=B._size,H=O.p,Y=n.list(k,"",!0),j,et,it,ut,J,X;if(B._paperdiv.style({width:k._context.responsive&&B.autosize&&!k._context._hasZeroWidth&&!k.layout.width?"100%":B.width+"px",height:k._context.responsive&&B.autosize&&!k._context._hasZeroHeight&&!k.layout.height?"100%":B.height+"px"}).selectAll(".main-svg").call(r.setSize,B.width,B.height),k._context.setBackground(k,B.paper_bgcolor),U.drawMainTitle(k),a.manage(k),!B._has("cartesian"))return i.previousPromises(k);function tt(xt,yt,Et){var Mt=xt._lw/2;if(xt._id.charAt(0)==="x"){if(yt){if(Et==="top")return yt._offset-H-Mt}else return O.t+O.h*(1-(xt.position||0))+Mt%1;return yt._offset+yt._length+H+Mt}if(yt){if(Et==="right")return yt._offset+yt._length+H+Mt}else return O.l+O.w*(xt.position||0)+Mt%1;return yt._offset-H-Mt}for(j=0;j0){L(k,j,J,ut),it.attr({x:et,y:j,"text-anchor":H,dy:D(B.yanchor)}).call(x.positionText,et,j);var X=(B.text.match(x.BR_TAG_ALL)||[]).length;if(X){var tt=f.LINE_SPACING*X+f.MID_SHIFT;B.y===0&&(tt=-tt),it.selectAll(".line").each(function(){var V=+this.getAttribute("dy").slice(0,-2)-tt+"em";this.setAttribute("dy",V)})}}}};function E(k,B,O,H,Y){var j=B.yref==="paper"?k._fullLayout._size.h:k._fullLayout.height,et=S.isTopAnchor(B)?H:H-Y,it=O==="b"?j-et:et;return S.isTopAnchor(B)&&O==="t"||S.isBottomAnchor(B)&&O==="b"?!1:it.5?"t":"b",et=k._fullLayout.margin[j],it=0;return B.yref==="paper"?it=O+B.pad.t+B.pad.b:B.yref==="container"&&(it=T(j,H,Y,k._fullLayout.height,O)+B.pad.t+B.pad.b),it>et?it:0}function L(k,B,O,H){var Y="title.automargin",j=k._fullLayout.title,et=j.y>.5?"t":"b",it={x:j.x,y:j.y,t:0,b:0},ut={};j.yref==="paper"&&E(k,j,et,B,H)?it[et]=O:j.yref==="container"&&(ut[et]=O,k._fullLayout._reservedMargin[Y]=ut),i.allowAutoMargin(k,Y),i.autoMargin(k,Y,it)}function M(k,B){var O=k.title,H=k._size,Y=0;switch(B===b?Y=O.pad.l:B===o&&(Y=-O.pad.r),O.xref){case"paper":return H.l+H.w*O.x+Y;case"container":default:return k.width*O.x+Y}}function z(k,B){var O=k.title,H=k._size,Y=0;if(B==="0em"||!B?Y=-O.pad.b:B===f.CAP_SHIFT+"em"&&(Y=O.pad.t),O.y==="auto")return H.t/2;switch(O.yref){case"paper":return H.t+H.h-H.h*O.y+Y;case"container":default:return k.height-k.height*O.y+Y}}function D(k){return k==="top"?f.CAP_SHIFT+.3+"em":k==="bottom"?"-0.3em":f.MID_SHIFT+"em"}function N(k){var B=k.title,O=u;return S.isRightAnchor(B)?O=o:S.isLeftAnchor(B)&&(O=b),O}function I(k){var B=k.title,O="0em";return S.isTopAnchor(B)?O=f.CAP_SHIFT+"em":S.isMiddleAnchor(B)&&(O=f.MID_SHIFT+"em"),O}U.doTraceStyle=function(k){var B=k.calcdata,O=[],H;for(H=0;HI?A.push({code:"unused",traceType:M,templateCount:N,dataCount:I}):I>N&&A.push({code:"reused",traceType:M,templateCount:N,dataCount:I})}}function k(B,O){for(var H in B)if(H.charAt(0)!=="_"){var Y=B[H],j=c(B,H,O);C(Y)?(Array.isArray(B)&&Y._template===!1&&Y.templateitemname&&A.push({code:"missing",path:j,templateitemname:Y.templateitemname}),k(Y,j)):Array.isArray(Y)&&l(Y)&&k(Y,j)}}if(k({data:y,layout:_},""),A.length)return A.map(m)};function l(v){for(var b=0;b1&&A.push(f("object","layout"))),C.supplyDefaults(_);for(var T=_._fullData,s=y.length,L=0;LM.length&&w.push(f("unused",A,s.concat(M.length)));var B=M.length,O=Array.isArray(k);O&&(B=Math.min(B,k.length));var H,Y,j,et,it;if(z.dimensions===2)for(Y=0;YM[Y].length&&w.push(f("unused",A,s.concat(Y,M[Y].length)));var ut=M[Y].length;for(H=0;H<(O?Math.min(ut,k[Y].length):ut);H++)j=O?k[Y][H]:k,et=L[Y][H],it=M[Y][H],g.validate(et,j)?it!==et&&it!==+et&&w.push(f("dynamic",A,s.concat(Y,H),et,it)):w.push(f("value",A,s.concat(Y,H),et))}else w.push(f("array",A,s.concat(Y),L[Y]));else for(Y=0;Y0&&Math.round(m)===m)l=m;else return{vals:n}}for(var v=e.calendar,b=f==="start",u=f==="end",o=r[a+"period0"],d=i(o,v)||0,w=[],A=[],_=[],y=n.length,E=0;ET;)M=S(M,-l,v);for(;M<=T;)M=S(M,l,v);L=S(M,-l,v)}else{for(s=Math.round((T-d)/c),M=d+s*c;M>T;)M-=c;for(;M<=T;)M+=c;L=M-c}w[E]=b?L:u?M:(L+M)/2,A[E]=L,_[E]=M}return{vals:w,starts:A,ends:_}}},26720:function(G){G.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(G,U,t){var g=t(33428),C=t(38248),i=t(3400),S=t(39032).FP_SAFE,x=t(24040),h=t(43616),p=t(79811),r=p.getFromId,e=p.isLinked;G.exports={applyAutorangeOptions:s,getAutoRange:a,makePadFn:f,doAutoRange:v,findExtremes:b,concatExtremes:m};function a(L,M){var z,D,N=[],I=L._fullLayout,k=f(I,M,0),B=f(I,M,1),O=m(L,M),H=O.min,Y=O.max;if(H.length===0||Y.length===0)return i.simpleMap(M.range,M.r2l);var j=H[0].val,et=Y[0].val;for(z=1;z0&&(gt=Q-k(Z)-B(st),gt>ot?Tt/gt>$&&(nt=Z,ct=st,$=Tt/gt):Tt/Q>$&&(nt={val:Z.val,nopad:1},ct={val:st.val,nopad:1},$=Tt/Q));function wt(Lt,Ht){return Math.max(Lt,B(Ht))}if(j===et){var Rt=j-1,bt=j+1;if(tt)if(j===0)N=[0,1];else{var At=(j>0?Y:H).reduce(wt,0),mt=j/(1-Math.min(.5,At/Q));N=j>0?[0,mt]:[mt,0]}else V?N=[Math.max(0,Rt),Math.max(1,bt)]:N=[Rt,bt]}else tt?(nt.val>=0&&(nt={val:0,nopad:1}),ct.val<=0&&(ct={val:0,nopad:1})):V&&(nt.val-$*k(nt)<0&&(nt={val:0,nopad:1}),ct.val<=0&&(ct={val:1,nopad:1})),$=(ct.val-nt.val-n(M,Z.val,st.val))/(Q-k(nt)-B(ct)),N=[nt.val-$*k(nt),ct.val+$*B(ct)];return N=s(N,M),M.limitRange&&M.limitRange(),ut&&N.reverse(),i.simpleMap(N,M.l2r||Number)}function n(L,M,z){var D=0;if(L.rangebreaks)for(var N=L.locateBreaks(M,z),I=0;I0?z.ppadplus:z.ppadminus)||z.ppad||0),Z=ot((L._m>0?z.ppadminus:z.ppadplus)||z.ppad||0),st=ot(z.vpadplus||z.vpad),nt=ot(z.vpadminus||z.vpad);if(!H){if(V=1/0,Q=-1/0,O)for(j=0;j0&&(V=et),et>Q&&et-S&&(V=et),et>Q&&et=Tt;j--)gt(j);return{min:D,max:N,opts:z}}function u(L,M,z,D){d(L,M,z,D,A)}function o(L,M,z,D){d(L,M,z,D,_)}function d(L,M,z,D,N){for(var I=D.tozero,k=D.extrapad,B=!0,O=0;O=z&&(H.extrapad||!k)){B=!1;break}else N(M,H.val)&&H.pad<=z&&(k||!H.extrapad)&&(L.splice(O,1),O--)}if(B){var Y=I&&M===0;L.push({val:M,pad:Y?0:z,extrapad:Y?!1:k})}}function w(L){return C(L)&&Math.abs(L)=M}function y(L,M){var z=M.autorangeoptions;return z&&z.minallowed!==void 0&&T(M,z.minallowed,z.maxallowed)?z.minallowed:z&&z.clipmin!==void 0&&T(M,z.clipmin,z.clipmax)?Math.max(L,M.d2l(z.clipmin)):L}function E(L,M){var z=M.autorangeoptions;return z&&z.maxallowed!==void 0&&T(M,z.minallowed,z.maxallowed)?z.maxallowed:z&&z.clipmax!==void 0&&T(M,z.clipmin,z.clipmax)?Math.min(L,M.d2l(z.clipmax)):L}function T(L,M,z){return M!==void 0&&z!==void 0?(M=L.d2l(M),z=L.d2l(z),M=O&&(I=O,z=O),k<=O&&(k=O,D=O)}}return z=y(z,M),D=E(D,M),[z,D]}},76808:function(G){G.exports=function(t,g,C){var i,S;if(C){var x=g==="reversed"||g==="min reversed"||g==="max reversed";i=C[x?1:0],S=C[x?0:1]}var h=t("autorangeoptions.minallowed",S===null?i:void 0),p=t("autorangeoptions.maxallowed",i===null?S:void 0);h===void 0&&t("autorangeoptions.clipmin"),p===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},54460:function(G,U,t){var g=t(33428),C=t(38248),i=t(7316),S=t(24040),x=t(3400),h=x.strTranslate,p=t(72736),r=t(81668),e=t(76308),a=t(43616),n=t(94724),f=t(98728),c=t(39032),l=c.ONEMAXYEAR,m=c.ONEAVGYEAR,v=c.ONEMINYEAR,b=c.ONEMAXQUARTER,u=c.ONEAVGQUARTER,o=c.ONEMINQUARTER,d=c.ONEMAXMONTH,w=c.ONEAVGMONTH,A=c.ONEMINMONTH,_=c.ONEWEEK,y=c.ONEDAY,E=y/2,T=c.ONEHOUR,s=c.ONEMIN,L=c.ONESEC,M=c.MINUS_SIGN,z=c.BADNUM,D={K:"zeroline"},N={K:"gridline",L:"path"},I={K:"minor-gridline",L:"path"},k={K:"tick",L:"path"},B={K:"tick",L:"text"},O={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},H=t(84284),Y=H.MID_SHIFT,j=H.CAP_SHIFT,et=H.LINE_SPACING,it=H.OPPOSITE_SIDE,ut=3,J=G.exports={};J.setConvert=t(78344);var X=t(52976),tt=t(79811),V=tt.idSort,Q=tt.isLinked;J.id2name=tt.id2name,J.name2id=tt.name2id,J.cleanId=tt.cleanId,J.list=tt.list,J.listIds=tt.listIds,J.getFromId=tt.getFromId,J.getFromTrace=tt.getFromTrace;var ot=t(19280);J.getAutoRange=ot.getAutoRange,J.findExtremes=ot.findExtremes;var $=1e-4;function Z(Yt){var Gt=(Yt[1]-Yt[0])*$;return[Yt[0]-Gt,Yt[1]+Gt]}J.coerceRef=function(Yt,Gt,Ne,Oe,Qe,er){var fr=Oe.charAt(Oe.length-1),rr=Ne._fullLayout._subplots[fr+"axis"],He=Oe+"ref",dr={};return Qe||(Qe=rr[0]||(typeof er=="string"?er:er[0])),er||(er=Qe),rr=rr.concat(rr.map(function(mr){return mr+" domain"})),dr[He]={valType:"enumerated",values:rr.concat(er?typeof er=="string"?[er]:er:[]),dflt:Qe},x.coerce(Yt,Gt,dr,He)},J.getRefType=function(Yt){return Yt===void 0?Yt:Yt==="paper"?"paper":Yt==="pixel"?"pixel":/( domain)$/.test(Yt)?"domain":"range"},J.coercePosition=function(Yt,Gt,Ne,Oe,Qe,er){var fr,rr,He=J.getRefType(Oe);if(He!=="range")fr=x.ensureNumber,rr=Ne(Qe,er);else{var dr=J.getFromId(Gt,Oe);er=dr.fraction2r(er),rr=Ne(Qe,er),fr=dr.cleanPos}Yt[Qe]=fr(rr)},J.cleanPosition=function(Yt,Gt,Ne){var Oe=Ne==="paper"||Ne==="pixel"?x.ensureNumber:J.getFromId(Gt,Ne).cleanPos;return Oe(Yt)},J.redrawComponents=function(Yt,Gt){Gt=Gt||J.listIds(Yt);var Ne=Yt._fullLayout;function Oe(Qe,er,fr,rr){for(var He=S.getComponentMethod(Qe,er),dr={},mr=0;mr2e-6||((Ne-Yt._forceTick0)/Yt._minDtick%1+1.000001)%1>2e-6)&&(Yt._minDtick=0))},J.saveRangeInitial=function(Yt,Gt){for(var Ne=J.list(Yt,"",!0),Oe=!1,Qe=0;Qexr*.3||dr(Oe)||dr(Qe))){var pr=Ne.dtick/2;Yt+=Yt+prfr){var rr=Number(Ne.substr(1));er.exactYears>fr&&rr%12===0?Yt=J.tickIncrement(Yt,"M6","reverse")+y*1.5:er.exactMonths>fr?Yt=J.tickIncrement(Yt,"M1","reverse")+y*15.5:Yt-=E;var He=J.tickIncrement(Yt,Ne);if(He<=Oe)return He}return Yt}J.prepMinorTicks=function(Yt,Gt,Ne){if(!Gt.minor.dtick){delete Yt.dtick;var Oe=Gt.dtick&&C(Gt._tmin),Qe;if(Oe){var er=J.tickIncrement(Gt._tmin,Gt.dtick,!0);Qe=[Gt._tmin,er*.99+Gt._tmin*.01]}else{var fr=x.simpleMap(Gt.range,Gt.r2l);Qe=[fr[0],.8*fr[0]+.2*fr[1]]}if(Yt.range=x.simpleMap(Qe,Gt.l2r),Yt._isMinor=!0,J.prepTicks(Yt,Ne),Oe){var rr=C(Gt.dtick),He=C(Yt.dtick),dr=rr?Gt.dtick:+Gt.dtick.substring(1),mr=He?Yt.dtick:+Yt.dtick.substring(1);rr&&He?wt(dr,mr)?dr===2*_&&mr===2*y&&(Yt.dtick=_):dr===2*_&&mr===3*y?Yt.dtick=_:dr===_&&!(Gt._input.minor||{}).nticks?Yt.dtick=y:Rt(dr/mr,2.5)?Yt.dtick=dr/2:Yt.dtick=dr:String(Gt.dtick).charAt(0)==="M"?He?Yt.dtick="M1":wt(dr,mr)?dr>=12&&mr===2&&(Yt.dtick="M3"):Yt.dtick=Gt.dtick:String(Yt.dtick).charAt(0)==="L"?String(Gt.dtick).charAt(0)==="L"?wt(dr,mr)||(Yt.dtick=Rt(dr/mr,2.5)?Gt.dtick/2:Gt.dtick):Yt.dtick="D1":Yt.dtick==="D2"&&+Gt.dtick>1&&(Yt.dtick=1)}Yt.range=Gt.range}Gt.minor._tick0Init===void 0&&(Yt.tick0=Gt.tick0)};function wt(Yt,Gt){return Math.abs((Yt/Gt+.5)%1-.5)<.001}function Rt(Yt,Gt){return Math.abs(Yt/Gt-1)<.001}J.prepTicks=function(Yt,Gt){var Ne=x.simpleMap(Yt.range,Yt.r2l,void 0,void 0,Gt);if(Yt.tickmode==="auto"||!Yt.dtick){var Oe=Yt.nticks,Qe;Oe||(Yt.type==="category"||Yt.type==="multicategory"?(Qe=Yt.tickfont?x.bigFont(Yt.tickfont.size||12):15,Oe=Yt._length/Qe):(Qe=Yt._id.charAt(0)==="y"?40:80,Oe=x.constrain(Yt._length/Qe,4,9)+1),Yt._name==="radialaxis"&&(Oe*=2)),Yt.minor&&Yt.minor.tickmode!=="array"||Yt.tickmode==="array"&&(Oe*=100),Yt._roughDTick=Math.abs(Ne[1]-Ne[0])/Oe,J.autoTicks(Yt,Yt._roughDTick),Yt._minDtick>0&&Yt.dtick0?(er=Oe-1,fr=Oe):(er=Oe,fr=Oe);var rr=Yt[er].value,He=Yt[fr].value,dr=Math.abs(He-rr),mr=Ne||dr,xr=0;mr>=v?dr>=v&&dr<=l?xr=dr:xr=m:Ne===u&&mr>=o?dr>=o&&dr<=b?xr=dr:xr=u:mr>=A?dr>=A&&dr<=d?xr=dr:xr=w:Ne===_&&mr>=_?xr=_:mr>=y?xr=y:Ne===E&&mr>=E?xr=E:Ne===T&&mr>=T&&(xr=T);var pr;xr>=dr&&(xr=dr,pr=!0);var Gr=Qe+xr;if(Gt.rangebreaks&&xr>0){for(var Pr=84,Dr=0,cn=0;cn_&&(xr=dr)}(xr>0||Oe===0)&&(Yt[Oe].periodX=Qe+xr/2)}}J.calcTicks=function(Gt,Ne){for(var Oe=Gt.type,Qe=Gt.calendar,er=Gt.ticklabelstep,fr=Gt.ticklabelmode==="period",rr=x.simpleMap(Gt.range,Gt.r2l,void 0,void 0,Ne),He=rr[1]=(cn?0:1);rn--){var Cn=!rn;rn?(Gt._dtickInit=Gt.dtick,Gt._tick0Init=Gt.tick0):(Gt.minor._dtickInit=Gt.minor.dtick,Gt.minor._tick0Init=Gt.minor.tick0);var En=rn?Gt:x.extendFlat({},Gt,Gt.minor);if(Cn?J.prepMinorTicks(En,Gt,Ne):J.prepTicks(En,Ne),En.tickmode==="array"){rn?(Pr=[],pr=Ut(Gt,!Cn)):(Dr=[],Gr=Ut(Gt,!Cn));continue}if(En.tickmode==="sync"){Pr=[],pr=Ht(Gt);continue}var Tr=Z(rr),Cr=Tr[0],Wr=Tr[1],Ur=C(En.dtick),an=Oe==="log"&&!(Ur||En.dtick.charAt(0)==="L"),pn=J.tickFirst(En,Ne);if(rn){if(Gt._tmin=pn,pn=Wr:_n<=Wr;_n=J.tickIncrement(_n,ci,He,Qe)){if(rn&&kn++,En.rangebreaks&&!He){if(_n=mr)break}if(Pr.length>xr||_n===gn)break;gn=_n;var di={value:_n};rn?(an&&_n!==(_n|0)&&(di.simpleLabel=!0),er>1&&kn%er&&(di.skipLabel=!0),Pr.push(di)):(di.minor=!0,Dr.push(di))}}if(cn){var li=Gt.minor.ticks==="inside"&&Gt.ticks==="outside"||Gt.minor.ticks==="outside"&&Gt.ticks==="inside";if(!li){for(var ri=Pr.map(function(hn){return hn.value}),wr=[],nn=0;nn-1;An--){if(Pr[An].drop){Pr.splice(An,1);continue}Pr[An].value=Ve(Pr[An].value,Gt);var Di=Gt.c2p(Pr[An].value);(Bn?gi>Di-Jn:gimr||Ormr&&(Ar.periodX=mr),OrQe&&prm)Gt/=m,Oe=Qe(10),Yt.dtick="M"+12*he(Gt,Oe,kt);else if(er>w)Gt/=w,Yt.dtick="M"+he(Gt,1,Vt);else if(er>y){if(Yt.dtick=he(Gt,y,Yt._hasDayOfWeekBreaks?[1,2,7,14]:re),!Ne){var fr=J.getTickFormat(Yt),rr=Yt.ticklabelmode==="period";rr&&(Yt._rawTick0=Yt.tick0),/%[uVW]/.test(fr)?Yt.tick0=x.dateTick0(Yt.calendar,2):Yt.tick0=x.dateTick0(Yt.calendar,1),rr&&(Yt._dowTick0=Yt.tick0)}}else er>T?Yt.dtick=he(Gt,T,Vt):er>s?Yt.dtick=he(Gt,s,It):er>L?Yt.dtick=he(Gt,L,It):(Oe=Qe(10),Yt.dtick=he(Gt,Oe,kt))}else if(Yt.type==="log"){Yt.tick0=0;var He=x.simpleMap(Yt.range,Yt.r2l);if(Yt._isMinor&&(Gt*=1.5),Gt>.7)Yt.dtick=Math.ceil(Gt);else if(Math.abs(He[1]-He[0])<1){var dr=1.5*Math.abs((He[1]-He[0])/Gt);Gt=Math.abs(Math.pow(10,He[1])-Math.pow(10,He[0]))/dr,Oe=Qe(10),Yt.dtick="L"+he(Gt,Oe,kt)}else Yt.dtick=Gt>.3?"D2":"D1"}else Yt.type==="category"||Yt.type==="multicategory"?(Yt.tick0=0,Yt.dtick=Math.ceil(Math.max(Gt,1))):ke(Yt)?(Yt.tick0=0,Oe=1,Yt.dtick=he(Gt,Oe,le)):(Yt.tick0=0,Oe=Qe(10),Yt.dtick=he(Gt,Oe,kt));if(Yt.dtick===0&&(Yt.dtick=1),!C(Yt.dtick)&&typeof Yt.dtick!="string"){var mr=Yt.dtick;throw Yt.dtick=1,"ax.dtick error: "+String(mr)}};function de(Yt){var Gt=Yt.dtick;if(Yt._tickexponent=0,!C(Gt)&&typeof Gt!="string"&&(Gt=1),(Yt.type==="category"||Yt.type==="multicategory")&&(Yt._tickround=null),Yt.type==="date"){var Ne=Yt.r2l(Yt.tick0),Oe=Yt.l2r(Ne).replace(/(^-|i)/g,""),Qe=Oe.length;if(String(Gt).charAt(0)==="M")Qe>10||Oe.substr(5)!=="01-01"?Yt._tickround="d":Yt._tickround=+Gt.substr(1)%12===0?"y":"m";else if(Gt>=y&&Qe<=10||Gt>=y*15)Yt._tickround="d";else if(Gt>=s&&Qe<=16||Gt>=T)Yt._tickround="M";else if(Gt>=L&&Qe<=19||Gt>=s)Yt._tickround="S";else{var er=Yt.l2r(Ne+Gt).replace(/^-/,"").length;Yt._tickround=Math.max(Qe,er)-20,Yt._tickround<0&&(Yt._tickround=4)}}else if(C(Gt)||Gt.charAt(0)==="L"){var fr=Yt.range.map(Yt.r2d||Number);C(Gt)||(Gt=Number(Gt.substr(1))),Yt._tickround=2-Math.floor(Math.log(Gt)/Math.LN10+.01);var rr=Math.max(Math.abs(fr[0]),Math.abs(fr[1])),He=Math.floor(Math.log(rr)/Math.LN10+.01),dr=Yt.minexponent===void 0?3:Yt.minexponent;Math.abs(He)>dr&&(yt(Yt.exponentformat)&&!Et(He)?Yt._tickexponent=3*Math.round((He-1)/3):Yt._tickexponent=He)}else Yt._tickround=null}J.tickIncrement=function(Yt,Gt,Ne,Oe){var Qe=Ne?-1:1;if(C(Gt))return x.increment(Yt,Qe*Gt);var er=Gt.charAt(0),fr=Qe*Number(Gt.substr(1));if(er==="M")return x.incrementMonth(Yt,fr,Oe);if(er==="L")return Math.log(Math.pow(10,Yt)+fr)/Math.LN10;if(er==="D"){var rr=Gt==="D2"?$t:Kt,He=Yt+Qe*.01,dr=x.roundUp(x.mod(He,1),rr,Ne);return Math.floor(He)+Math.log(g.round(Math.pow(10,dr),1))/Math.LN10}throw"unrecognized dtick "+String(Gt)},J.tickFirst=function(Yt,Gt){var Ne=Yt.r2l||Number,Oe=x.simpleMap(Yt.range,Ne,void 0,void 0,Gt),Qe=Oe[1]=0&&rn<=Yt._length?cn:null};if(er&&x.isArrayOrTypedArray(Yt.ticktext)){var xr=x.simpleMap(Yt.range,Yt.r2l),pr=(Math.abs(xr[1]-xr[0])-(Yt._lBreaks||0))/1e4;for(dr=0;dr"+rr;else{var dr=Je(Yt),mr=Yt._trueSide||Yt.side;(!dr&&mr==="top"||dr&&mr==="bottom")&&(fr+="
    ")}Gt.text=fr}function ne(Yt,Gt,Ne,Oe,Qe){var er=Yt.dtick,fr=Gt.x,rr=Yt.tickformat,He=typeof er=="string"&&er.charAt(0);if(Qe==="never"&&(Qe=""),Oe&&He!=="L"&&(er="L3",He="L"),rr||He==="L")Gt.text=Mt(Math.pow(10,fr),Yt,Qe,Oe);else if(C(er)||He==="D"&&x.mod(fr+.01,1)<.1){var dr=Math.round(fr),mr=Math.abs(dr),xr=Yt.exponentformat;xr==="power"||yt(xr)&&Et(dr)?(dr===0?Gt.text=1:dr===1?Gt.text="10":Gt.text="10"+(dr>1?"":M)+mr+"",Gt.fontSize*=1.25):(xr==="e"||xr==="E")&&mr>2?Gt.text="1"+xr+(dr>0?"+":M)+mr:(Gt.text=Mt(Math.pow(10,fr),Yt,"","fakehover"),er==="D1"&&Yt._id.charAt(0)==="y"&&(Gt.dy-=Gt.fontSize/6))}else if(He==="D")Gt.text=String(Math.round(Math.pow(10,x.mod(fr,1)))),Gt.fontSize*=.75;else throw"unrecognized dtick "+String(er);if(Yt.dtick==="D1"){var pr=String(Gt.text).charAt(0);(pr==="0"||pr==="1")&&(Yt._id.charAt(0)==="y"?Gt.dx-=Gt.fontSize/4:(Gt.dy+=Gt.fontSize/2,Gt.dx+=(Yt.range[1]>Yt.range[0]?1:-1)*Gt.fontSize*(fr<0?.5:.25)))}}function zt(Yt,Gt){var Ne=Yt._categories[Math.round(Gt.x)];Ne===void 0&&(Ne=""),Gt.text=String(Ne)}function Xt(Yt,Gt,Ne){var Oe=Math.round(Gt.x),Qe=Yt._categories[Oe]||[],er=Qe[1]===void 0?"":String(Qe[1]),fr=Qe[0]===void 0?"":String(Qe[0]);Ne?Gt.text=fr+" - "+er:(Gt.text=er,Gt.text2=fr)}function Jt(Yt,Gt,Ne,Oe,Qe){Qe==="never"?Qe="":Yt.showexponent==="all"&&Math.abs(Gt.x/Yt.dtick)<1e-6&&(Qe="hide"),Gt.text=Mt(Gt.x,Yt,Qe,Oe)}function Wt(Yt,Gt,Ne,Oe,Qe){if(Yt.thetaunit==="radians"&&!Ne){var er=Gt.x/180;if(er===0)Gt.text="0";else{var fr=Ft(er);if(fr[1]>=100)Gt.text=Mt(x.deg2rad(Gt.x),Yt,Qe,Oe);else{var rr=Gt.x<0;fr[1]===1?fr[0]===1?Gt.text="π":Gt.text=fr[0]+"π":Gt.text=["",fr[0],"","⁄","",fr[1],"","π"].join(""),rr&&(Gt.text=M+Gt.text)}}}else Gt.text=Mt(Gt.x,Yt,Qe,Oe)}function Ft(Yt){function Gt(rr,He){return Math.abs(rr-He)<=1e-6}function Ne(rr,He){return Gt(He,0)?rr:Ne(He,rr%He)}function Oe(rr){for(var He=1;!Gt(Math.round(rr*He)/He,rr);)He*=10;return He}var Qe=Oe(Yt),er=Yt*Qe,fr=Math.abs(Ne(er,Qe));return[Math.round(er/fr),Math.round(Qe/fr)]}var xt=["f","p","n","μ","m","","k","M","G","T"];function yt(Yt){return Yt==="SI"||Yt==="B"}function Et(Yt){return Yt>14||Yt<-15}function Mt(Yt,Gt,Ne,Oe){var Qe=Yt<0,er=Gt._tickround,fr=Ne||Gt.exponentformat||"B",rr=Gt._tickexponent,He=J.getTickFormat(Gt),dr=Gt.separatethousands;if(Oe){var mr={exponentformat:fr,minexponent:Gt.minexponent,dtick:Gt.showexponent==="none"?Gt.dtick:C(Yt)&&Math.abs(Yt)||1,range:Gt.showexponent==="none"?Gt.range.map(Gt.r2d):[0,Yt||1]};de(mr),er=(Number(mr._tickround)||0)+4,rr=mr._tickexponent,Gt.hoverformat&&(He=Gt.hoverformat)}if(He)return Gt._numFormat(He)(Yt).replace(/-/g,M);var xr=Math.pow(10,-er)/2;if(fr==="none"&&(rr=0),Yt=Math.abs(Yt),Yt"+Pr+"":fr==="B"&&rr===9?Yt+="B":yt(fr)&&(Yt+=xt[rr/3+5])}return Qe?M+Yt:Yt}J.getTickFormat=function(Yt){var Gt;function Ne(He){return typeof He!="string"?He:Number(He.replace("M",""))*w}function Oe(He,dr){var mr=["L","D"];if(typeof He==typeof dr){if(typeof He=="number")return He-dr;var xr=mr.indexOf(He.charAt(0)),pr=mr.indexOf(dr.charAt(0));return xr===pr?Number(He.replace(/(L|D)/g,""))-Number(dr.replace(/(L|D)/g,"")):xr-pr}else return typeof He=="number"?1:-1}function Qe(He,dr,mr){var xr=mr||function(Pr){return Pr},pr=dr[0],Gr=dr[1];return(!pr&&typeof pr!="number"||xr(pr)<=xr(He))&&(!Gr&&typeof Gr!="number"||xr(Gr)>=xr(He))}function er(He,dr){var mr=dr[0]===null,xr=dr[1]===null,pr=Oe(He,dr[0])>=0,Gr=Oe(He,dr[1])<=0;return(mr||pr)&&(xr||Gr)}var fr,rr;if(Yt.tickformatstops&&Yt.tickformatstops.length>0)switch(Yt.type){case"date":case"linear":{for(Gt=0;Gt=0&&Qe.unshift(Qe.splice(mr,1).shift())}});var rr={false:{left:0,right:0}};return x.syncOrAsync(Qe.map(function(He){return function(){if(He){var dr=J.getFromId(Yt,He);Ne||(Ne={}),Ne.axShifts=rr,Ne.overlayingShiftedAx=fr;var mr=J.drawOne(Yt,dr,Ne);return dr._shiftPusher&&hr(dr,dr._fullDepth||0,rr,!0),dr._r=dr.range.slice(),dr._rl=x.simpleMap(dr._r,dr.r2l),mr}}}))},J.drawOne=function(Yt,Gt,Ne){Ne=Ne||{};var Oe=Ne.axShifts||{},Qe=Ne.overlayingShiftedAx||[],er,fr,rr;Gt.setScale();var He=Yt._fullLayout,dr=Gt._id,mr=dr.charAt(0),xr=J.counterLetter(dr),pr=He._plots[Gt._mainSubplot];if(!pr)return;if(Gt._shiftPusher=Gt.autoshift||Qe.indexOf(Gt._id)!==-1||Qe.indexOf(Gt.overlaying)!==-1,Gt._shiftPusher&Gt.anchor==="free"){var Gr=Gt.linewidth/2||0;Gt.ticks==="inside"&&(Gr+=Gt.ticklen),hr(Gt,Gr,Oe,!0),hr(Gt,Gt.shift||0,Oe,!1)}(Ne.skipTitle!==!0||Gt._shift===void 0)&&(Gt._shift=vr(Gt,Oe));var Pr=pr[mr+"axislayer"],Dr=Gt._mainLinePosition,cn=Dr+=Gt._shift,rn=Gt._mainMirrorPosition,Cn=Gt._vals=J.calcTicks(Gt),En=[Gt.mirror,cn,rn].join("_");for(er=0;er0?Pn.bottom-wn:0,Ln))));var ai=0,pi=0;if(Gt._shiftPusher&&(ai=Math.max(Ln,Pn.height>0?Hr==="l"?wn-Pn.left:Pn.right-wn:0),Gt.title.text!==He._dfltTitle[mr]&&(pi=(Gt._titleStandoff||0)+(Gt._titleScoot||0),Hr==="l"&&(pi+=Be(Gt))),Gt._fullDepth=Math.max(ai,pi)),Gt.automargin){Un={x:0,y:0,r:0,l:0,t:0,b:0};var Ci=[0,1],pa=typeof Gt._shift=="number"?Gt._shift:0;if(mr==="x"){if(Hr==="b"?Un[Hr]=Gt._depth:(Un[Hr]=Gt._depth=Math.max(Pn.width>0?wn-Pn.top:0,Ln),Ci.reverse()),Pn.width>0){var ea=Pn.right-(Gt._offset+Gt._length);ea>0&&(Un.xr=1,Un.r=ea);var Eo=Gt._offset-Pn.left;Eo>0&&(Un.xl=0,Un.l=Eo)}}else if(Hr==="l"?(Gt._depth=Math.max(Pn.height>0?wn-Pn.left:0,Ln),Un[Hr]=Gt._depth-pa):(Gt._depth=Math.max(Pn.height>0?Pn.right-wn:0,Ln),Un[Hr]=Gt._depth+pa,Ci.reverse()),Pn.height>0){var xo=Pn.bottom-(Gt._offset+Gt._length);xo>0&&(Un.yb=0,Un.b=xo);var Qa=Gt._offset-Pn.top;Qa>0&&(Un.yt=1,Un.t=Qa)}Un[xr]=Gt.anchor==="free"?Gt.position:Gt._anchorAxis.domain[Ci[0]],Gt.title.text!==He._dfltTitle[mr]&&(Un[Hr]+=Be(Gt)+(Gt.title.standoff||0)),Gt.mirror&&Gt.anchor!=="free"&&(On={x:0,y:0,r:0,l:0,t:0,b:0},On[Qr]=Gt.linewidth,Gt.mirror&&Gt.mirror!==!0&&(On[Qr]+=Ln),Gt.mirror===!0||Gt.mirror==="ticks"?On[xr]=Gt._anchorAxis.domain[Ci[1]]:(Gt.mirror==="all"||Gt.mirror==="allticks")&&(On[xr]=[Gt._counterDomainMin,Gt._counterDomainMax][Ci[1]]))}Zr&&(mi=S.getComponentMethod("rangeslider","autoMarginOpts")(Yt,Gt)),typeof Gt.automargin=="string"&&(Nt(Un,Gt.automargin),Nt(On,Gt.automargin)),i.autoMargin(Yt,$e(Gt),Un),i.autoMargin(Yt,ge(Gt),On),i.autoMargin(Yt,se(Gt),mi)}),x.syncOrAsync(sn)}};function Nt(Yt,Gt){if(Yt){var Ne=Object.keys(O).reduce(function(Oe,Qe){return Gt.indexOf(Qe)!==-1&&O[Qe].forEach(function(er){Oe[er]=1}),Oe},{});Object.keys(Yt).forEach(function(Oe){Ne[Oe]||(Oe.length===1?Yt[Oe]=0:delete Yt[Oe])})}}function jt(Yt,Gt){var Ne=[],Oe,Qe=function(er,fr){var rr=er.xbnd[fr];rr!==null&&Ne.push(x.extendFlat({},er,{x:rr}))};if(Gt.length){for(Oe=0;Oe60?-.5*ci:Yt.side==="top"!==mr?-ci:0};else if(Ur==="y"){if(pn=!mr&&Wr==="left"||mr&&Wr==="right",Tr=pn?1:-1,mr&&(Tr*=-1),rn=pr,Cn=Gr*Tr,En=0,!mr&&Math.abs(an)===90&&(an===-90&&Wr==="left"||an===90&&Wr==="right"?En=j:En=.5),mr){var gn=C(an)?+an:0;if(gn!==0){var _n=x.deg2rad(gn);Cr=Math.abs(Math.sin(_n))*j*Tr,En=0}}cn.xFn=function(kn){return kn.dx+Gt-(rn+kn.fontSize*En)*Tr+Cr*kn.fontSize},cn.yFn=function(kn){return kn.dy+Cn+kn.fontSize*Y},cn.anchorFn=function(kn,ni){return C(ni)&&Math.abs(ni)===90?"middle":pn?"end":"start"},cn.heightFn=function(kn,ni,ci){return Yt.side==="right"&&(ni*=-1),ni<-30?-ci:ni<30?-.5*ci:0}}return cn};function ce(Yt){return[Yt.text,Yt.x,Yt.axInfo,Yt.font,Yt.fontSize,Yt.fontColor].join("_")}J.drawTicks=function(Yt,Gt,Ne){Ne=Ne||{};var Oe=Gt._id+"tick",Qe=[].concat(Gt.minor&&Gt.minor.ticks?Ne.vals.filter(function(fr){return fr.minor&&!fr.noTick}):[]).concat(Gt.ticks?Ne.vals.filter(function(fr){return!fr.minor&&!fr.noTick}):[]),er=Ne.layer.selectAll("path."+Oe).data(Qe,ce);er.exit().remove(),er.enter().append("path").classed(Oe,1).classed("ticks",1).classed("crisp",Ne.crisp!==!1).each(function(fr){return e.stroke(g.select(this),fr.minor?Gt.minor.tickcolor:Gt.tickcolor)}).style("stroke-width",function(fr){return a.crispRound(Yt,fr.minor?Gt.minor.tickwidth:Gt.tickwidth,1)+"px"}).attr("d",Ne.path).style("display",null),ur(Gt,[k]),er.attr("transform",Ne.transFn)},J.drawGrid=function(Yt,Gt,Ne){if(Ne=Ne||{},Gt.tickmode!=="sync"){var Oe=Gt._id+"grid",Qe=Gt.minor&&Gt.minor.showgrid,er=Qe?Ne.vals.filter(function(rn){return rn.minor}):[],fr=Gt.showgrid?Ne.vals.filter(function(rn){return!rn.minor}):[],rr=Ne.counterAxis;if(rr&&J.shouldShowZeroLine(Yt,Gt,rr))for(var He=Gt.tickmode==="array",dr=0;dr=0;Pr--){var Dr=Pr?pr:Gr;if(Dr){var cn=Dr.selectAll("path."+Oe).data(Pr?fr:er,ce);cn.exit().remove(),cn.enter().append("path").classed(Oe,1).classed("crisp",Ne.crisp!==!1),cn.attr("transform",Ne.transFn).attr("d",Ne.path).each(function(rn){return e.stroke(g.select(this),rn.minor?Gt.minor.gridcolor:Gt.gridcolor||"#ddd")}).style("stroke-dasharray",function(rn){return a.dashStyle(rn.minor?Gt.minor.griddash:Gt.griddash,rn.minor?Gt.minor.gridwidth:Gt.gridwidth)}).style("stroke-width",function(rn){return(rn.minor?xr:Gt._gw)+"px"}).style("display",null),typeof Ne.path=="function"&&cn.attr("d",Ne.path)}}ur(Gt,[N,I])}},J.drawZeroLine=function(Yt,Gt,Ne){Ne=Ne||Ne;var Oe=Gt._id+"zl",Qe=J.shouldShowZeroLine(Yt,Gt,Ne.counterAxis),er=Ne.layer.selectAll("path."+Oe).data(Qe?[{x:0,id:Gt._id}]:[]);er.exit().remove(),er.enter().append("path").classed(Oe,1).classed("zl",1).classed("crisp",Ne.crisp!==!1).each(function(){Ne.layer.selectAll("path").sort(function(fr,rr){return V(fr.id,rr.id)})}),er.attr("transform",Ne.transFn).attr("d",Ne.path).call(e.stroke,Gt.zerolinecolor||e.defaultLine).style("stroke-width",a.crispRound(Yt,Gt.zerolinewidth,Gt._gw||1)+"px").style("display",null),ur(Gt,[D])},J.drawLabels=function(Yt,Gt,Ne){Ne=Ne||{};var Oe=Yt._fullLayout,Qe=Gt._id,er=Ne.cls||Qe+"tick",fr=Ne.vals.filter(function(wr){return wr.text}),rr=Ne.labelFns,He=Ne.secondary?0:Gt.tickangle,dr=(Gt._prevTickAngles||{})[er],mr=Ne.layer.selectAll("g."+er).data(Gt.showticklabels?fr:[],ce),xr=[];mr.enter().append("g").classed(er,1).append("text").attr("text-anchor","middle").each(function(wr){var nn=g.select(this),$r=Yt._promises.length;nn.call(p.positionText,rr.xFn(wr),rr.yFn(wr)).call(a.font,wr.font,wr.fontSize,wr.fontColor).text(wr.text).call(p.convertToTspans,Yt),Yt._promises[$r]?xr.push(Yt._promises.pop().then(function(){pr(nn,He)})):pr(nn,He)}),ur(Gt,[B]),mr.exit().remove(),Ne.repositionOnUpdate&&mr.each(function(wr){g.select(this).select("text").call(p.positionText,rr.xFn(wr),rr.yFn(wr))});function pr(wr,nn){wr.each(function($r){var dn=g.select(this),Vn=dn.select(".text-math-group"),Tn=rr.anchorFn($r,nn),An=Ne.transFn.call(dn.node(),$r)+(C(nn)&&+nn!=0?" rotate("+nn+","+rr.xFn($r)+","+(rr.yFn($r)-$r.fontSize/2)+")":""),Bn=p.lineCount(dn),Jn=et*$r.fontSize,gi=rr.heightFn($r,C(nn)?+nn:0,(Bn-1)*Jn);if(gi&&(An+=h(0,gi)),Vn.empty()){var Di=dn.select("text");Di.attr({transform:An,"text-anchor":Tn}),Di.style("opacity",1),Gt._adjustTickLabelsOverflow&&Gt._adjustTickLabelsOverflow()}else{var Sr=a.bBox(Vn.node()).width,kr=Sr*{end:-.5,start:.5}[Tn];Vn.attr("transform",An+h(kr,0))}})}Gt._adjustTickLabelsOverflow=function(){var wr=Gt.ticklabeloverflow;if(!(!wr||wr==="allow")){var nn=wr.indexOf("hide")!==-1,$r=Gt._id.charAt(0)==="x",dn=0,Vn=$r?Yt._fullLayout.width:Yt._fullLayout.height;if(wr.indexOf("domain")!==-1){var Tn=x.simpleMap(Gt.range,Gt.r2l);dn=Gt.l2p(Tn[0])+Gt._offset,Vn=Gt.l2p(Tn[1])+Gt._offset}var An=Math.min(dn,Vn),Bn=Math.max(dn,Vn),Jn=Gt.side,gi=1/0,Di=-1/0;mr.each(function(Or){var xn=g.select(this),In=xn.select(".text-math-group");if(In.empty()){var hn=a.bBox(xn.node()),sn=0;$r?(hn.right>Bn||hn.leftBn||hn.top+(Gt.tickangle?0:Or.fontSize/4)Gt["_visibleLabelMin_"+Tn._id]?Or.style("display","none"):Bn.K==="tick"&&!An&&Or.style("display",null)})})})})},pr(mr,dr+1?dr:He);function Gr(){return xr.length&&Promise.all(xr)}var Pr=null;function Dr(){if(pr(mr,He),fr.length&&Gt.autotickangles&&(Gt.type!=="log"||String(Gt.dtick).charAt(0)!=="D")){Pr=Gt.autotickangles[0];var wr=0,nn=[],$r,dn=1;if(mr.each(function(Ln){wr=Math.max(wr,Ln.fontSize);var Pn=Gt.l2p(Ln.x),Un=or(this),On=a.bBox(Un.node());dn=Math.max(dn,p.lineCount(Un)),nn.push({top:0,bottom:10,height:10,left:Pn-On.width/2,right:Pn+On.width/2+2,width:On.width+2})}),(Gt.tickson==="boundaries"||Gt.showdividers)&&!Ne.secondary){var Vn=2;for(Gt.ticks&&(Vn+=Gt.tickwidth/2),$r=0;$rdi*ci&&(_n=ci,an[Ur]=pn[Ur]=kn[Ur])}var li=Math.abs(_n-gn);li-Tr>0?(li-=Tr,Tr*=1+Tr/li):Tr=0,Gt._id.charAt(0)!=="y"&&(Tr=-Tr),an[Wr]=Cn.p2r(Cn.r2p(pn[Wr])+Cr*Tr),Cn.autorange==="min"||Cn.autorange==="max reversed"?(an[0]=null,Cn._rangeInitial0=void 0,Cn._rangeInitial1=void 0):(Cn.autorange==="max"||Cn.autorange==="min reversed")&&(an[1]=null,Cn._rangeInitial0=void 0,Cn._rangeInitial1=void 0),Oe._insideTickLabelsUpdaterange[Cn._name+".range"]=an}var ri=x.syncOrAsync(cn);return ri&&ri.then&&Yt._promises.push(ri),ri};function Te(Yt,Gt,Ne){var Oe=Gt._id+"divider",Qe=Ne.vals,er=Ne.layer.selectAll("path."+Oe).data(Qe,ce);er.exit().remove(),er.enter().insert("path",":first-child").classed(Oe,1).classed("crisp",1).call(e.stroke,Gt.dividercolor).style("stroke-width",a.crispRound(Yt,Gt.dividerwidth,1)+"px"),er.attr("transform",Ne.transFn).attr("d",Ne.path)}J.getPxPosition=function(Yt,Gt){var Ne=Yt._fullLayout._size,Oe=Gt._id.charAt(0),Qe=Gt.side,er;if(Gt.anchor!=="free"?er=Gt._anchorAxis:Oe==="x"?er={_offset:Ne.t+(1-(Gt.position||0))*Ne.h,_length:0}:Oe==="y"&&(er={_offset:Ne.l+(Gt.position||0)*Ne.w+Gt._shift,_length:0}),Qe==="top"||Qe==="left")return er._offset;if(Qe==="bottom"||Qe==="right")return er._offset+er._length};function Be(Yt){var Gt=Yt.title.font.size,Ne=(Yt.title.text.match(p.BR_TAG_ALL)||[]).length;return Yt.title.hasOwnProperty("standoff")?Ne?Gt*(j+Ne*et):Gt*j:Ne?Gt*(Ne+1)*et:Gt}function ir(Yt,Gt){var Ne=Yt._fullLayout,Oe=Gt._id,Qe=Oe.charAt(0),er=Gt.title.font.size,fr;if(Gt.title.hasOwnProperty("standoff"))fr=Gt._depth+Gt.title.standoff+Be(Gt);else{var rr=Je(Gt);if(Gt.type==="multicategory")fr=Gt._depth;else{var He=1.5*er;rr&&(He=.5*er,Gt.ticks==="outside"&&(He+=Gt.ticklen)),fr=10+He+(Gt.linewidth?Gt.linewidth-1:0)}rr||(Qe==="x"?fr+=Gt.side==="top"?er*(Gt.showticklabels?1:0):er*(Gt.showticklabels?1.5:.5):fr+=Gt.side==="right"?er*(Gt.showticklabels?1:.5):er*(Gt.showticklabels?.5:0))}var dr=J.getPxPosition(Yt,Gt),mr,xr,pr;Qe==="x"?(xr=Gt._offset+Gt._length/2,pr=Gt.side==="top"?dr-fr:dr+fr):(pr=Gt._offset+Gt._length/2,xr=Gt.side==="right"?dr+fr:dr-fr,mr={rotate:"-90",offset:0});var Gr;if(Gt.type!=="multicategory"){var Pr=Gt._selections[Gt._id+"tick"];if(Gr={selection:Pr,side:Gt.side},Pr&&Pr.node()&&Pr.node().parentNode){var Dr=a.getTranslate(Pr.node().parentNode);Gr.offsetLeft=Dr.x,Gr.offsetTop=Dr.y}Gt.title.hasOwnProperty("standoff")&&(Gr.pad=0)}return Gt._titleStandoff=fr,r.draw(Yt,Oe+"title",{propContainer:Gt,propName:Gt._name+".title.text",placeholder:Ne._dfltTitle[Qe],avoid:Gr,transform:mr,attributes:{x:xr,y:pr,"text-anchor":"middle"}})}J.shouldShowZeroLine=function(Yt,Gt,Ne){var Oe=x.simpleMap(Gt.range,Gt.r2l);return Oe[0]*Oe[1]<=0&&Gt.zeroline&&(Gt.type==="linear"||Gt.type==="-")&&!(Gt.rangebreaks&&Gt.maskBreaks(0)===z)&&(pe(Gt,0)||!Xe(Yt,Gt,Ne,Oe)||Ke(Yt,Gt))},J.clipEnds=function(Yt,Gt){return Gt.filter(function(Ne){return pe(Yt,Ne.x)})};function pe(Yt,Gt){var Ne=Yt.l2p(Gt);return Ne>1&&Ne1)for(Qe=1;Qe=Qe.min&&Yto*2}function n(l){return Math.max(1,(l-1)/1e3)}function f(l,m){for(var v=l.length,b=n(v),u=0,o=0,d={},w=0;wu*2}function c(l){return S(l[0])&&S(l[1])}},28336:function(G,U,t){var g=t(38248),C=t(24040),i=t(3400),S=t(31780),x=t(51272),h=t(94724),p=t(26332),r=t(25404),e=t(95936),a=t(42568),n=t(22416),f=t(42136),c=t(96312),l=t(78344),m=t(33816).WEEKDAY_PATTERN,v=t(33816).HOUR_PATTERN;G.exports=function(w,A,_,y,E){var T=y.letter,s=y.font||{},L=y.splomStash||{},M=_("visible",!y.visibleDflt),z=A._template||{},D=A.type||z.type||"-",N;if(D==="date"){var I=C.getComponentMethod("calendars","handleDefaults");I(w,A,"calendar",y.calendar),y.noTicklabelmode||(N=_("ticklabelmode"))}var k="";(!y.noTicklabelposition||D==="multicategory")&&(k=i.coerce(w,A,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:N==="period"?["outside","inside"]:T==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),y.noTicklabeloverflow||_("ticklabeloverflow",k.indexOf("inside")!==-1?"hide past domain":D==="category"||D==="multicategory"?"allow":"hide past div"),l(A,E),c(w,A,_,y),n(w,A,_,y),D!=="category"&&!y.noHover&&_("hoverformat");var B=_("color"),O=B!==h.color.dflt?B:s.color,H=L.label||E._dfltTitle[T];if(a(w,A,_,D,y),!M)return A;_("title.text",H),i.coerceFont(_,"title.font",{family:s.family,size:i.bigFont(s.size),color:O}),p(w,A,_,D);var Y=y.hasMinor;if(Y&&(S.newContainer(A,"minor"),p(w,A,_,D,{isMinor:!0})),e(w,A,_,D,y),r(w,A,_,y),Y){var j=y.isMinor;y.isMinor=!0,r(w,A,_,y),y.isMinor=j}f(w,A,_,{dfltColor:B,bgColor:y.bgColor,showGrid:y.showGrid,hasMinor:Y,attributes:h}),Y&&!A.minor.ticks&&!A.minor.showgrid&&delete A.minor,(A.showline||A.ticks)&&_("mirror");var et=D==="multicategory";if(!y.noTickson&&(D==="category"||et)&&(A.ticks||A.showgrid)){var it;et&&(it="boundaries");var ut=_("tickson",it);ut==="boundaries"&&delete A.ticklabelposition}if(et){var J=_("showdividers");J&&(_("dividercolor"),_("dividerwidth"))}if(D==="date")if(x(w,A,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:b}),!A.rangebreaks.length)delete A.rangebreaks;else{for(var X=0;X=2){var T="",s,L;if(E.length===2){for(s=0;s<2;s++)if(L=o(E[s]),L){T=m;break}}var M=_("pattern",T);if(M===m)for(s=0;s<2;s++)L=o(E[s]),L&&(w.bounds[s]=E[s]=L-1);if(M)for(s=0;s<2;s++)switch(L=E[s],M){case m:if(!g(L)){w.enabled=!1;return}if(L=+L,L!==Math.floor(L)||L<0||L>=7){w.enabled=!1;return}w.bounds[s]=E[s]=L;break;case v:if(!g(L)){w.enabled=!1;return}if(L=+L,L<0||L>24){w.enabled=!1;return}w.bounds[s]=E[s]=L;break}if(A.autorange===!1){var z=A.range;if(z[0]z[1]){w.enabled=!1;return}}else if(E[0]>z[0]&&E[1]p?1:-1:+(S.substr(1)||1)-+(x.substr(1)||1)},U.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function i(S,x){if(x&&x.length){for(var h=0;h0||g(r),a;e&&(a="array");var n=h("categoryorder",a),f;n==="array"&&(f=h("categoryarray")),!e&&n==="array"&&(n=x.categoryorder="trace"),n==="trace"?x._initialCategories=[]:n==="array"?x._initialCategories=f.slice():(f=C(x,p).sort(),n==="category ascending"?x._initialCategories=f:n==="category descending"&&(x._initialCategories=f.reverse()))}}},98728:function(G,U,t){var g=t(38248),C=t(3400),i=t(39032),S=i.ONEDAY,x=i.ONEWEEK;U.dtick=function(h,p){var r=p==="log",e=p==="date",a=p==="category",n=e?S:1;if(!h)return n;if(g(h))return h=Number(h),h<=0?n:a?Math.max(1,Math.round(h)):e?Math.max(.1,h):h;if(typeof h!="string"||!(e||r))return n;var f=h.charAt(0),c=h.substr(1);return c=g(c)?Number(c):0,c<=0||!(e&&f==="M"&&c===Math.round(c)||r&&f==="L"||r&&f==="D"&&(c===1||c===2))?n:h},U.tick0=function(h,p,r,e){if(p==="date")return C.cleanDate(h,C.dateTick0(r,e%x===0?1:0));if(!(e==="D1"||e==="D2"))return g(h)?Number(h):0}},33816:function(G,U,t){var g=t(53756).counter;G.exports={idRegex:{x:g("x","( domain)?"),y:g("y","( domain)?")},attrRegex:g("[xy]axis"),xAxisMatch:g("xaxis"),yAxisMatch:g("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},71888:function(G,U,t){var g=t(3400),C=t(19280),i=t(79811).id2name,S=t(94724),x=t(21160),h=t(78344),p=t(39032).ALMOST_EQUAL,r=t(84284).FROM_BL;U.handleDefaults=function(v,b,u){var o=u.axIds,d=u.axHasImage,w=b._axisConstraintGroups=[],A=b._axisMatchGroups=[],_,y,E,T,s,L,M,z;for(_=0;_w?u.substr(w):o.substr(d))+A}function l(v,b){for(var u=b._size,o=u.h/u.w,d={},w=Object.keys(v),A=0;Ap*z&&!k)){for(w=0;wX&&ntut&&(ut=nt);var gt=(ut-it)/(2*J);s/=gt,it=y.l2r(it),ut=y.l2r(ut),y.range=y._input.range=Y=0){dr._fullLayout._deactivateShape(dr);return}var mr=dr._fullLayout.clickmode;if(X(dr),rr===2&&!Ht&&Gt(),Lt)mr.indexOf("select")>-1&&E(He,dr,re,Kt,ct.id,be),mr.indexOf("event")>-1&&n.click(dr,He,ct.id);else if(rr===1&&Ht){var xr=bt?kt:Ut,pr=bt==="s"||At==="w"?0:1,Gr=xr._name+".range["+pr+"]",Pr=B(xr,pr),Dr="left",cn="middle";if(xr.fixedrange)return;bt?(cn=bt==="n"?"top":"bottom",xr.side==="right"&&(Dr="right")):At==="e"&&(Dr="right"),dr._context.showAxisRangeEntryBoxes&&g.select(me).call(r.makeEditable,{gd:dr,immediate:!0,background:dr._fullLayout.paper_bgcolor,text:String(Pr),fill:xr.tickfont?xr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:cn}).on("edit",function(rn){var Cn=xr.d2r(rn);Cn!==void 0&&h.call("_guiRelayout",dr,Gr,Cn)})}}l.init(be);var ce,Te,Be,ir,pe,Xe,Ke,or,$e,ge;function se(rr,He,dr){var mr=me.getBoundingClientRect();ce=He-mr.left,Te=dr-mr.top,nt._fullLayout._calcInverseTransform(nt);var xr=C.apply3DTransform(nt._fullLayout._invTransform)(ce,Te);ce=xr[0],Te=xr[1],Be={l:ce,r:ce,w:0,t:Te,b:Te,h:0},ir=nt._hmpixcount?nt._hmlumcount/nt._hmpixcount:S(nt._fullLayout.plot_bgcolor).getLuminance(),pe="M0,0H"+he+"V"+de+"H0V0",Xe=!1,Ke="xy",ge=!1,or=et(mt,ir,$t,le,pe),$e=it(mt,$t,le)}function Ae(rr,He){if(nt._transitioningWithDuration)return!1;var dr=Math.max(0,Math.min(he,Mt*rr+ce)),mr=Math.max(0,Math.min(de,Nt*He+Te)),xr=Math.abs(dr-ce),pr=Math.abs(mr-Te);Be.l=Math.min(ce,dr),Be.r=Math.max(ce,dr),Be.t=Math.min(Te,mr),Be.b=Math.max(Te,mr);function Gr(){Ke="",Be.r=Be.l,Be.t=Be.b,$e.attr("d","M0,0Z")}if(xe.isSubplotConstrained)xr>M||pr>M?(Ke="xy",xr/he>pr/de?(pr=xr*de/he,Te>mr?Be.t=Te-pr:Be.b=Te+pr):(xr=pr*he/de,ce>dr?Be.l=ce-xr:Be.r=ce+xr),$e.attr("d",ot(Be))):Gr();else if(Se.isSubplotConstrained)if(xr>M||pr>M){Ke="xy";var Pr=Math.min(Be.l/he,(de-Be.b)/de),Dr=Math.max(Be.r/he,(de-Be.t)/de);Be.l=Pr*he,Be.r=Dr*he,Be.b=(1-Pr)*de,Be.t=(1-Dr)*de,$e.attr("d",ot(Be))}else Gr();else!zt||pr0){var rn;if(Se.isSubplotConstrained||!ne&&zt.length===1){for(rn=0;rn1&&(Gr.maxallowed!==void 0&&Jt===(Gr.range[0]1&&(Pr.maxallowed!==void 0&&Wt===(Pr.range[0]=0?Math.min(nt,.9):1/(1/Math.max(nt,-.3)+3.222))}function j(nt,ct,gt){return nt?nt==="nsew"?gt?"":ct==="pan"?"move":"crosshair":nt.toLowerCase()+"-resize":"pointer"}function et(nt,ct,gt,Tt,wt){return nt.append("path").attr("class","zoombox").style({fill:ct>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",p(gt,Tt)).attr("d",wt+"Z")}function it(nt,ct,gt){return nt.append("path").attr("class","zoombox-corners").style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("transform",p(ct,gt)).attr("d","M0,0Z")}function ut(nt,ct,gt,Tt,wt,Rt){nt.attr("d",Tt+"M"+gt.l+","+gt.t+"v"+gt.h+"h"+gt.w+"v-"+gt.h+"h-"+gt.w+"Z"),J(nt,ct,wt,Rt)}function J(nt,ct,gt,Tt){gt||(nt.transition().style("fill",Tt>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ct.transition().style("opacity",1).duration(200))}function X(nt){g.select(nt).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function tt(nt){z&&nt.data&&nt._context.showTips&&(C.notifier(C._(nt,"Double-click to zoom back out"),"long"),z=!1)}function V(nt,ct){return"M"+(nt.l-.5)+","+(ct-M-.5)+"h-3v"+(2*M+1)+"h3ZM"+(nt.r+.5)+","+(ct-M-.5)+"h3v"+(2*M+1)+"h-3Z"}function Q(nt,ct){return"M"+(ct-M-.5)+","+(nt.t-.5)+"v-3h"+(2*M+1)+"v3ZM"+(ct-M-.5)+","+(nt.b+.5)+"v3h"+(2*M+1)+"v-3Z"}function ot(nt){var ct=Math.floor(Math.min(nt.b-nt.t,nt.r-nt.l,M)/2);return"M"+(nt.l-3.5)+","+(nt.t-.5+ct)+"h3v"+-ct+"h"+ct+"v-3h-"+(ct+3)+"ZM"+(nt.r+3.5)+","+(nt.t-.5+ct)+"h-3v"+-ct+"h"+-ct+"v-3h"+(ct+3)+"ZM"+(nt.r+3.5)+","+(nt.b+.5-ct)+"h-3v"+ct+"h"+-ct+"v3h"+(ct+3)+"ZM"+(nt.l-3.5)+","+(nt.b+.5-ct)+"h3v"+ct+"h"+ct+"v3h-"+(ct+3)+"Z"}function $(nt,ct,gt,Tt,wt){for(var Rt=!1,bt={},At={},mt,Lt,Ht,Ut,kt=(wt||{}).xaHash,Vt=(wt||{}).yaHash,It=0;It_[1]-.000244140625&&(x.domain=l),C.noneOrAll(S.domain,x.domain,l),x.tickmode==="sync"&&(x.tickmode="auto")}return h("layer"),x}},42568:function(G,U,t){var g=t(85024);G.exports=function(i,S,x,h,p){p||(p={});var r=p.tickSuffixDflt,e=g(i),a=x("tickprefix");a&&x("showtickprefix",e);var n=x("ticksuffix",r);n&&x("showticksuffix",e)}},96312:function(G,U,t){var g=t(76808);G.exports=function(i,S,x,h){var p=S._template||{},r=S.type||p.type||"-";x("minallowed"),x("maxallowed");var e=x("range");if(!e){var a;!h.noInsiderange&&r!=="log"&&(a=x("insiderange"),a&&(a[0]===null||a[1]===null)&&(S.insiderange=!1,a=void 0),a&&(e=x("range",a)))}var n=S.getAutorangeDflt(e,h),f=x("autorange",n),c;e&&(e[0]===null&&e[1]===null||(e[0]===null||e[1]===null)&&(f==="reversed"||f===!0)||e[0]!==null&&(f==="min"||f==="max reversed")||e[1]!==null&&(f==="max"||f==="min reversed"))&&(e=void 0,delete S.range,S.autorange=!0,c=!0),c||(n=S.getAutorangeDflt(e,h),f=x("autorange",n)),f&&(g(x,f,e),(r==="linear"||r==="-")&&x("rangemode")),S.cleanRange()}},21160:function(G,U,t){var g=t(84284).FROM_BL;G.exports=function(i,S,x){x===void 0&&(x=g[i.constraintoward||"center"]);var h=[i.r2l(i.range[0]),i.r2l(i.range[1])],p=h[0]+(h[1]-h[0])*x;i.range=i._input.range=[i.l2r(p+(h[0]-p)*S),i.l2r(p+(h[1]-p)*S)],i.setScale()}},78344:function(G,U,t){var g=t(33428),C=t(94336).E9,i=t(3400),S=i.numberFormat,x=t(38248),h=i.cleanNumber,p=i.ms2DateTime,r=i.dateTime2ms,e=i.ensureNumber,a=i.isArrayOrTypedArray,n=t(39032),f=n.FP_SAFE,c=n.BADNUM,l=n.LOG_CLIP,m=n.ONEWEEK,v=n.ONEDAY,b=n.ONEHOUR,u=n.ONEMIN,o=n.ONESEC,d=t(79811),w=t(33816),A=w.HOUR_PATTERN,_=w.WEEKDAY_PATTERN;function y(T){return Math.pow(10,T)}function E(T){return T!=null}G.exports=function(s,L){L=L||{};var M=s._id||"x",z=M.charAt(0);function D(V,Q){if(V>0)return Math.log(V)/Math.LN10;if(V<=0&&Q&&s.range&&s.range.length===2){var ot=s.range[0],$=s.range[1];return .5*(ot+$-2*l*Math.abs(ot-$))}else return c}function N(V,Q,ot,$){if(($||{}).msUTC&&x(V))return+V;var Z=r(V,ot||s.calendar);if(Z===c)if(x(V)){V=+V;var st=Math.floor(i.mod(V+.05,1)*10),nt=Math.round(V-st/10);Z=r(new Date(nt))+st/10}else return c;return Z}function I(V,Q,ot){return p(V,Q,ot||s.calendar)}function k(V){return s._categories[Math.round(V)]}function B(V){if(E(V)){if(s._categoriesMap===void 0&&(s._categoriesMap={}),s._categoriesMap[V]!==void 0)return s._categoriesMap[V];s._categories.push(typeof V=="number"?String(V):V);var Q=s._categories.length-1;return s._categoriesMap[V]=Q,Q}return c}function O(V,Q){for(var ot=new Array(Q),$=0;$s.range[1]&&(ot=!ot);for(var $=ot?-1:1,Z=$*V,st=0,nt=0;ntgt)st=nt+1;else{st=Z<(ct+gt)/2?nt:nt+1;break}}var Tt=s._B[st]||0;return isFinite(Tt)?et(V,s._m2,Tt):0},J=function(V){var Q=s._rangebreaks.length;if(!Q)return it(V,s._m,s._b);for(var ot=0,$=0;$s._rangebreaks[$].pmax&&(ot=$+1);return it(V,s._m2,s._B[ot])}}s.c2l=s.type==="log"?D:e,s.l2c=s.type==="log"?y:e,s.l2p=ut,s.p2l=J,s.c2p=s.type==="log"?function(V,Q){return ut(D(V,Q))}:ut,s.p2c=s.type==="log"?function(V){return y(J(V))}:J,["linear","-"].indexOf(s.type)!==-1?(s.d2r=s.r2d=s.d2c=s.r2c=s.d2l=s.r2l=h,s.c2d=s.c2r=s.l2d=s.l2r=e,s.d2p=s.r2p=function(V){return s.l2p(h(V))},s.p2d=s.p2r=J,s.cleanPos=e):s.type==="log"?(s.d2r=s.d2l=function(V,Q){return D(h(V),Q)},s.r2d=s.r2c=function(V){return y(h(V))},s.d2c=s.r2l=h,s.c2d=s.l2r=e,s.c2r=D,s.l2d=y,s.d2p=function(V,Q){return s.l2p(s.d2r(V,Q))},s.p2d=function(V){return y(J(V))},s.r2p=function(V){return s.l2p(h(V))},s.p2r=J,s.cleanPos=e):s.type==="date"?(s.d2r=s.r2d=i.identity,s.d2c=s.r2c=s.d2l=s.r2l=N,s.c2d=s.c2r=s.l2d=s.l2r=I,s.d2p=s.r2p=function(V,Q,ot){return s.l2p(N(V,0,ot))},s.p2d=s.p2r=function(V,Q,ot){return I(J(V),Q,ot)},s.cleanPos=function(V){return i.cleanDate(V,c,s.calendar)}):s.type==="category"?(s.d2c=s.d2l=B,s.r2d=s.c2d=s.l2d=k,s.d2r=s.d2l_noadd=Y,s.r2c=function(V){var Q=j(V);return Q!==void 0?Q:s.fraction2r(.5)},s.l2r=s.c2r=e,s.r2l=j,s.d2p=function(V){return s.l2p(s.r2c(V))},s.p2d=function(V){return k(J(V))},s.r2p=s.d2p,s.p2r=J,s.cleanPos=function(V){return typeof V=="string"&&V!==""?V:e(V)}):s.type==="multicategory"&&(s.r2d=s.c2d=s.l2d=k,s.d2r=s.d2l_noadd=Y,s.r2c=function(V){var Q=Y(V);return Q!==void 0?Q:s.fraction2r(.5)},s.r2c_just_indices=H,s.l2r=s.c2r=e,s.r2l=Y,s.d2p=function(V){return s.l2p(s.r2c(V))},s.p2d=function(V){return k(J(V))},s.r2p=s.d2p,s.p2r=J,s.cleanPos=function(V){return Array.isArray(V)||typeof V=="string"&&V!==""?V:e(V)},s.setupMultiCategory=function(V){var Q=s._traceIndices,ot,$,Z=s._matchGroup;if(Z&&s._categories.length===0){for(var st in Z)if(st!==M){var nt=L[d.id2name(st)];Q=Q.concat(nt._traceIndices)}}var ct=[[0,{}],[0,{}]],gt=[];for(ot=0;otnt[1]&&($[st?0:1]=ot),$[0]===$[1]){var ct=s.l2r(Q),gt=s.l2r(ot);if(Q!==void 0){var Tt=ct+1;ot!==void 0&&(Tt=Math.min(Tt,gt)),$[st?1:0]=Tt}if(ot!==void 0){var wt=gt+1;Q!==void 0&&(wt=Math.max(wt,ct)),$[st?0:1]=wt}}}},s.cleanRange=function(V,Q){s._cleanRange(V,Q),s.limitRange(V)},s._cleanRange=function(V,Q){Q||(Q={}),V||(V="range");var ot=i.nestedProperty(s,V).get(),$,Z;if(s.type==="date"?Z=i.dfltRange(s.calendar):z==="y"?Z=w.DFLTRANGEY:s._name==="realaxis"?Z=[0,1]:Z=Q.dfltRange||w.DFLTRANGEX,Z=Z.slice(),(s.rangemode==="tozero"||s.rangemode==="nonnegative")&&(Z[0]=0),!ot||ot.length!==2){i.nestedProperty(s,V).set(Z);return}var st=ot[0]===null,nt=ot[1]===null;for(s.type==="date"&&!s.autorange&&(ot[0]=i.cleanDate(ot[0],c,s.calendar),ot[1]=i.cleanDate(ot[1],c,s.calendar)),$=0;$<2;$++)if(s.type==="date"){if(!i.isDateTime(ot[$],s.calendar)){s[V]=Z;break}if(s.r2l(ot[0])===s.r2l(ot[1])){var ct=i.constrain(s.r2l(ot[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);ot[0]=s.l2r(ct-1e3),ot[1]=s.l2r(ct+1e3);break}}else{if(!x(ot[$]))if(!(st||nt)&&x(ot[1-$]))ot[$]=ot[1-$]*($?10:.1);else{s[V]=Z;break}if(ot[$]<-f?ot[$]=-f:ot[$]>f&&(ot[$]=f),ot[0]===ot[1]){var gt=Math.max(1,Math.abs(ot[0]*1e-6));ot[0]-=gt,ot[1]+=gt}}},s.setScale=function(V){var Q=L._size;if(s.overlaying){var ot=d.getFromId({_fullLayout:L},s.overlaying);s.domain=ot.domain}var $=V&&s._r?"_r":"range",Z=s.calendar;s.cleanRange($);var st=s.r2l(s[$][0],Z),nt=s.r2l(s[$][1],Z),ct=z==="y";if(ct?(s._offset=Q.t+(1-s.domain[1])*Q.h,s._length=Q.h*(s.domain[1]-s.domain[0]),s._m=s._length/(st-nt),s._b=-s._m*nt):(s._offset=Q.l+s.domain[0]*Q.w,s._length=Q.w*(s.domain[1]-s.domain[0]),s._m=s._length/(nt-st),s._b=-s._m*st),s._rangebreaks=[],s._lBreaks=0,s._m2=0,s._B=[],s.rangebreaks){var gt,Tt;if(s._rangebreaks=s.locateBreaks(Math.min(st,nt),Math.max(st,nt)),s._rangebreaks.length){for(gt=0;gtnt&&(wt=!wt),wt&&s._rangebreaks.reverse();var Rt=wt?-1:1;for(s._m2=Rt*s._length/(Math.abs(nt-st)-s._lBreaks),s._B.push(-s._m2*(ct?nt:st)),gt=0;gtZ&&(Z+=7,st<$&&(st+=7));break;case A:nt=new Date(V);var wt=nt.getUTCHours(),Rt=nt.getUTCMinutes(),bt=nt.getUTCSeconds(),At=nt.getUTCMilliseconds();st=wt+(Rt/60+bt/3600+At/36e5),$>Z&&(Z+=24,st<$&&(st+=24));break;case"":st=V;break}if(st>=$&&st=$&&V=Kt.min&&(ktKt.max&&(Kt.max=Vt),It=!1)}It&&nt.push({min:kt,max:Vt})}};for(ot=0;ot rect").call(S.setTranslate,0,0).call(S.setScale,1,1),A.plot.call(S.setTranslate,_._offset,y._offset).call(S.setScale,1,1);var E=A.plot.selectAll(".scatterlayer .trace");E.selectAll(".point").call(S.setPointGroupScale,1,1),E.selectAll(".textpoint").call(S.setTextPointsScale,1,1),E.call(S.hideOutsideRangePoints,A)}function c(A,_){var y=A.plotinfo,E=y.xaxis,T=y.yaxis,s=E._length,L=T._length,M=!!A.xr1,z=!!A.yr1,D=[];if(M){var N=i.simpleMap(A.xr0,E.r2l),I=i.simpleMap(A.xr1,E.r2l),k=N[1]-N[0],B=I[1]-I[0];D[0]=(N[0]*(1-_)+_*I[0]-N[0])/(N[1]-N[0])*s,D[2]=s*(1-_+_*B/k),E.range[0]=E.l2r(N[0]*(1-_)+_*I[0]),E.range[1]=E.l2r(N[1]*(1-_)+_*I[1])}else D[0]=0,D[2]=s;if(z){var O=i.simpleMap(A.yr0,T.r2l),H=i.simpleMap(A.yr1,T.r2l),Y=O[1]-O[0],j=H[1]-H[0];D[1]=(O[1]*(1-_)+_*H[1]-O[1])/(O[0]-O[1])*L,D[3]=L*(1-_+_*j/Y),T.range[0]=E.l2r(O[0]*(1-_)+_*H[0]),T.range[1]=T.l2r(O[1]*(1-_)+_*H[1])}else D[1]=0,D[3]=L;x.drawOne(p,E,{skipTitle:!0}),x.drawOne(p,T,{skipTitle:!0}),x.redrawComponents(p,[E._id,T._id]);var et=M?s/D[2]:1,it=z?L/D[3]:1,ut=M?D[0]:0,J=z?D[1]:0,X=M?D[0]/D[2]*s:0,tt=z?D[1]/D[3]*L:0,V=E._offset-X,Q=T._offset-tt;y.clipRect.call(S.setTranslate,ut,J).call(S.setScale,1/et,1/it),y.plot.call(S.setTranslate,V,Q).call(S.setScale,et,it),S.setPointGroupScale(y.zoomScalePts,1/et,1/it),S.setTextPointsScale(y.zoomScaleTxt,1/et,1/it)}var l;a&&(l=a());function m(){for(var A={},_=0;_e.duration?(m(),o=window.cancelAnimationFrame(w)):o=window.requestAnimationFrame(w)}return b=Date.now(),o=window.requestAnimationFrame(w),Promise.resolve()}},14944:function(G,U,t){var g=t(24040).traceIs,C=t(52976);G.exports=function(r,e,a,n){a("autotypenumbers",n.autotypenumbersDflt);var f=a("type",(n.splomStash||{}).type);f==="-"&&(i(e,n.data),e.type==="-"?e.type="linear":r.type=e.type)};function i(p,r){if(p.type==="-"){var e=p._id,a=e.charAt(0),n;e.indexOf("scene")!==-1&&(e=a);var f=S(r,e,a);if(f){if(f.type==="histogram"&&a==={v:"y",h:"x"}[f.orientation||"v"]){p.type="linear";return}var c=a+"calendar",l=f[c],m={noMultiCategory:!g(f,"cartesian")||g(f,"noMultiCategory")};if(f.type==="box"&&f._hasPreCompStats&&a==={h:"x",v:"y"}[f.orientation||"v"]&&(m.noMultiCategory=!0),m.autotypenumbers=p.autotypenumbers,h(f,a)){var v=x(f),b=[];for(n=0;n0&&(n["_"+e+"axes"]||{})[r])return n;if((n[e+"axis"]||e)===r){if(h(n,e))return n;if((n[e]||[]).length||n[e+"0"])return n}}}function x(p){return{v:"x",h:"y"}[p.orientation||"v"]}function h(p,r){var e=x(p),a=g(p,"box-violin"),n=g(p._fullInput||{},"candlestick");return a&&!n&&r===e&&p[e]===void 0&&p[e+"0"]===void 0}},62460:function(G,U,t){var g=t(24040),C=t(3400);U.manageCommandObserver=function(r,e,a,n){var f={},c=!0;e&&e._commandObserver&&(f=e._commandObserver),f.cache||(f.cache={}),f.lookupTable={};var l=U.hasSimpleAPICommandBindings(r,a,f.lookupTable);if(e&&e._commandObserver){if(l)return f;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,f}if(l){i(r,l,f.cache),f.check=function(){if(c){var u=i(r,l,f.cache);return u.changed&&n&&f.lookupTable[u.value]!==void 0&&(f.disable(),Promise.resolve(n({value:u.value,type:l.type,prop:l.prop,traces:l.traces,index:f.lookupTable[u.value]})).then(f.enable,f.enable)),u.changed}};for(var m=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],v=0;v0?".":"")+f;C.isPlainObject(c)?p(c,e,l,n+1):e(l,f,c)}})}},86968:function(G,U,t){var g=t(92880).extendFlat;U.u=function(C,i){C=C||{},i=i||{};var S={valType:"info_array",editType:C.editType,items:[{valType:"number",min:0,max:1,editType:C.editType},{valType:"number",min:0,max:1,editType:C.editType}],dflt:[0,1]};C.name&&C.name+"",C.trace,i.description&&""+i.description;var x={x:g({},S,{}),y:g({},S,{}),editType:C.editType};return C.noGridCell||(x.row={valType:"integer",min:0,dflt:0,editType:C.editType},x.column={valType:"integer",min:0,dflt:0,editType:C.editType}),x},U.Q=function(C,i,S,x){var h=x&&x.x||[0,1],p=x&&x.y||[0,1],r=i.grid;if(r){var e=S("domain.column");e!==void 0&&(e0&&B._module.calcGeoJSON(k,z)}if(!D){var O=this.updateProjection(M,z);if(O)return;(!this.viewInitial||this.scope!==N.scope)&&this.saveViewInitial(N)}this.scope=N.scope,this.updateBaseLayers(z,N),this.updateDims(z,N),this.updateFx(z,N),f.generalUpdatePerTraceModule(this.graphDiv,this,M,N);var H=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=H.selectAll(".point"),this.dataPoints.text=H.selectAll("text"),this.dataPaths.line=H.selectAll(".js-line");var Y=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=Y.selectAll("path"),this._render()},E.updateProjection=function(M,z){var D=this.graphDiv,N=z[this.id],I=z._size,k=N.domain,B=N.projection,O=N.lonaxis,H=N.lataxis,Y=O._ax,j=H._ax,et=this.projection=T(N),it=[[I.l+I.w*k.x[0],I.t+I.h*(1-k.y[1])],[I.l+I.w*k.x[1],I.t+I.h*(1-k.y[0])]],ut=N.center||{},J=B.rotation||{},X=O.range||[],tt=H.range||[];if(N.fitbounds){Y._length=it[1][0]-it[0][0],j._length=it[1][1]-it[0][1],Y.range=l(D,Y),j.range=l(D,j);var V=(Y.range[0]+Y.range[1])/2,Q=(j.range[0]+j.range[1])/2;if(N._isScoped)ut={lon:V,lat:Q};else if(N._isClipped){ut={lon:V,lat:Q},J={lon:V,lat:Q,roll:J.roll};var ot=B.type,$=d.lonaxisSpan[ot]/2||180,Z=d.lataxisSpan[ot]/2||90;X=[V-$,V+$],tt=[Q-Z,Q+Z]}else ut={lon:V,lat:Q},J={lon:V,lat:J.lat,roll:J.roll}}et.center([ut.lon-J.lon,ut.lat-J.lat]).rotate([-J.lon,-J.lat,J.roll]).parallels(B.parallels);var st=L(X,tt);et.fitExtent(it,st);var nt=this.bounds=et.getBounds(st),ct=this.fitScale=et.scale(),gt=et.translate();if(N.fitbounds){var Tt=et.getBounds(L(Y.range,j.range)),wt=Math.min((nt[1][0]-nt[0][0])/(Tt[1][0]-Tt[0][0]),(nt[1][1]-nt[0][1])/(Tt[1][1]-Tt[0][1]));isFinite(wt)?et.scale(wt*ct):p.warn("Something went wrong during"+this.id+"fitbounds computations.")}else et.scale(B.scale*ct);var Rt=this.midPt=[(nt[0][0]+nt[1][0])/2,(nt[0][1]+nt[1][1])/2];if(et.translate([gt[0]+(Rt[0]-gt[0]),gt[1]+(Rt[1]-gt[1])]).clipExtent(nt),N._isAlbersUsa){var bt=et([ut.lon,ut.lat]),At=et.translate();et.translate([At[0]-(bt[0]-At[0]),At[1]-(bt[1]-At[1])])}},E.updateBaseLayers=function(M,z){var D=this,N=D.topojson,I=D.layers,k=D.basePaths;function B(it){return it==="lonaxis"||it==="lataxis"}function O(it){return!!d.lineLayers[it]}function H(it){return!!d.fillLayers[it]}var Y=this.hasChoropleth?d.layersForChoropleth:d.layers,j=Y.filter(function(it){return O(it)||H(it)?z["show"+it]:B(it)?z[it].showgrid:!0}),et=D.framework.selectAll(".layer").data(j,String);et.exit().each(function(it){delete I[it],delete k[it],g.select(this).remove()}),et.enter().append("g").attr("class",function(it){return"layer "+it}).each(function(it){var ut=I[it]=g.select(this);it==="bg"?D.bgRect=ut.append("rect").style("pointer-events","all"):B(it)?k[it]=ut.append("path").style("fill","none"):it==="backplot"?ut.append("g").classed("choroplethlayer",!0):it==="frontplot"?ut.append("g").classed("scatterlayer",!0):O(it)?k[it]=ut.append("path").style("fill","none").style("stroke-miterlimit",2):H(it)&&(k[it]=ut.append("path").style("stroke","none"))}),et.order(),et.each(function(it){var ut=k[it],J=d.layerNameToAdjective[it];it==="frame"?ut.datum(d.sphereSVG):O(it)||H(it)?ut.datum(_(N,N.objects[it])):B(it)&&ut.datum(s(it,z,M)).call(e.stroke,z[it].gridcolor).call(a.dashLine,z[it].griddash,z[it].gridwidth),O(it)?ut.call(e.stroke,z[J+"color"]).call(a.dashLine,"",z[J+"width"]):H(it)&&ut.call(e.fill,z[J+"color"])})},E.updateDims=function(M,z){var D=this.bounds,N=(z.framewidth||0)/2,I=D[0][0]-N,k=D[0][1]-N,B=D[1][0]-I+N,O=D[1][1]-k+N;a.setRect(this.clipRect,I,k,B,O),this.bgRect.call(a.setRect,I,k,B,O).call(e.fill,z.bgcolor),this.xaxis._offset=I,this.xaxis._length=B,this.yaxis._offset=k,this.yaxis._length=O},E.updateFx=function(M,z){var D=this,N=D.graphDiv,I=D.bgRect,k=M.dragmode,B=M.clickmode;if(D.isStatic)return;function O(){var et=D.viewInitial,it={};for(var ut in et)it[D.id+"."+ut]=et[ut];h.call("_guiRelayout",N,it),N.emit("plotly_doubleclick",null)}function H(et){return D.projection.invert([et[0]+D.xaxis._offset,et[1]+D.yaxis._offset])}var Y=function(et,it){if(it.isRect){var ut=et.range={};ut[D.id]=[H([it.xmin,it.ymin]),H([it.xmax,it.ymax])]}else{var J=et.lassoPoints={};J[D.id]=it.map(H)}},j={element:D.bgRect.node(),gd:N,plotinfo:{id:D.id,xaxis:D.xaxis,yaxis:D.yaxis,fillRangeItems:Y},xaxes:[D.xaxis],yaxes:[D.yaxis],subplot:D.id,clickFn:function(et){et===2&&b(N)}};k==="pan"?(I.node().onmousedown=null,I.call(o(D,z)),I.on("dblclick.zoom",O),N._context._scrollZoom.geo||I.on("wheel.zoom",null)):(k==="select"||k==="lasso")&&(I.on(".zoom",null),j.prepFn=function(et,it,ut){v(et,it,ut,j,k)},m.init(j)),I.on("mousemove",function(){var et=D.projection.invert(p.getPositionFromD3Event());if(!et)return m.unhover(N,g.event);D.xaxis.p2c=function(){return et[0]},D.yaxis.p2c=function(){return et[1]},n.hover(N,g.event,D.id)}),I.on("mouseout",function(){N._dragging||m.unhover(N,g.event)}),I.on("click",function(){k!=="select"&&k!=="lasso"&&(B.indexOf("select")>-1&&u(g.event,N,[D.xaxis],[D.yaxis],D.id,j),B.indexOf("event")>-1&&n.click(N,g.event))})},E.makeFramework=function(){var M=this,z=M.graphDiv,D=z._fullLayout,N="clip"+D._uid+M.id;M.clipDef=D._clips.append("clipPath").attr("id",N),M.clipRect=M.clipDef.append("rect"),M.framework=g.select(M.container).append("g").attr("class","geo "+M.id).call(a.setClipUrl,N,z),M.project=function(I){var k=M.projection(I);return k?[k[0]-M.xaxis._offset,k[1]-M.yaxis._offset]:[null,null]},M.xaxis={_id:"x",c2p:function(I){return M.project(I)[0]}},M.yaxis={_id:"y",c2p:function(I){return M.project(I)[1]}},M.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(M.mockAxis,D)},E.saveViewInitial=function(M){var z=M.center||{},D=M.projection,N=D.rotation||{};this.viewInitial={fitbounds:M.fitbounds,"projection.scale":D.scale};var I;M._isScoped?I={"center.lon":z.lon,"center.lat":z.lat}:M._isClipped?I={"projection.rotation.lon":N.lon,"projection.rotation.lat":N.lat}:I={"center.lon":z.lon,"center.lat":z.lat,"projection.rotation.lon":N.lon},p.extendFlat(this.viewInitial,I)},E.render=function(M){this._hasMarkerAngles&&M?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},E._render=function(){var M=this.projection,z=M.getPath(),D;function N(k){var B=M(k.lonlat);return B?r(B[0],B[1]):null}function I(k){return M.isLonLatOverEdges(k.lonlat)?"none":null}for(D in this.basePaths)this.basePaths[D].attr("d",z);for(D in this.dataPaths)this.dataPaths[D].attr("d",function(k){return z(k.geojson)});for(D in this.dataPoints)this.dataPoints[D].attr("display",I).attr("transform",N)};function T(M){var z=M.projection,D=z.type,N=d.projNames[D];N="geo"+p.titleCase(N);for(var I=C[N]||x[N],k=I(),B=M._isSatellite?Math.acos(1/z.distance)*180/Math.PI:M._isClipped?d.lonaxisSpan[D]/2:null,O=["center","rotate","parallels","clipExtent"],H=function(et){return et?k:[]},Y=0;YJ}else return!1},k.getPath=function(){return i().projection(k)},k.getBounds=function(et){return k.getPath().bounds(et)},k.precision(d.precision),M._isSatellite&&k.tilt(z.tilt).distance(z.distance),B&&k.clipAngle(B-d.clipPad),k}function s(M,z,D){var N=1e-6,I=2.5,k=z[M],B=d.scopeDefaults[z.scope],O,H,Y;M==="lonaxis"?(O=B.lonaxisRange,H=B.lataxisRange,Y=function(Q,ot){return[Q,ot]}):M==="lataxis"&&(O=B.lataxisRange,H=B.lonaxisRange,Y=function(Q,ot){return[ot,Q]});var j={type:"linear",range:[O[0],O[1]-N],tick0:k.tick0,dtick:k.dtick};c.setConvert(j,D);var et=c.calcTicks(j);!z.isScoped&&M==="lonaxis"&&et.pop();for(var it=et.length,ut=new Array(it),J=0;J0&&I<0&&(I+=360);var O=(I-N)/4;return{type:"Polygon",coordinates:[[[N,k],[N,B],[N+O,B],[N+2*O,B],[N+3*O,B],[I,B],[I,k],[I-O,k],[I-2*O,k],[I-3*O,k],[N,k]]]}}},10816:function(G,U,t){var g=t(84888).KY,C=t(3400).counterRegex,i=t(43520),S="geo",x=C(S),h={};h[S]={valType:"subplotid",dflt:S,editType:"calc"};function p(a){for(var n=a._fullLayout,f=a.calcdata,c=n._subplots[S],l=0;l0&&H<0&&(H+=360);var Y=(O+H)/2,j;if(!u){var et=o?v.projRotate:[Y,0,0];j=a("projection.rotation.lon",et[0]),a("projection.rotation.lat",et[1]),a("projection.rotation.roll",et[2]),E=a("showcoastlines",!o&&y),E&&(a("coastlinecolor"),a("coastlinewidth")),E=a("showocean",y?void 0:!1),E&&a("oceancolor")}var it,ut;if(u?(it=-96.6,ut=38.7):(it=o?Y:j,ut=(B[0]+B[1])/2),a("center.lon",it),a("center.lat",ut),d&&(a("projection.tilt"),a("projection.distance")),w){var J=v.projParallels||[0,60];a("projection.parallels",J)}a("projection.scale"),E=a("showland",y?void 0:!1),E&&a("landcolor"),E=a("showlakes",y?void 0:!1),E&&a("lakecolor"),E=a("showrivers",y?void 0:!1),E&&(a("rivercolor"),a("riverwidth")),E=a("showcountries",o&&m!=="usa"&&y),E&&(a("countrycolor"),a("countrywidth")),(m==="usa"||m==="north america"&&l===50)&&(a("showsubunits",y),a("subunitcolor"),a("subunitwidth")),o||(E=a("showframe",y),E&&(a("framecolor"),a("framewidth"))),a("bgcolor");var X=a("fitbounds");X&&(delete e.projection.scale,o?(delete e.center.lon,delete e.center.lat):A?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}},79248:function(G,U,t){var g=t(33428),C=t(3400),i=t(24040),S=Math.PI/180,x=180/Math.PI,h={cursor:"pointer"},p={cursor:"auto"};function r(s,L){var M=s.projection,z;return L._isScoped?z=n:L._isClipped?z=c:z=f,z(s,M)}G.exports=r;function e(s,L){return g.behavior.zoom().translate(L.translate()).scale(L.scale())}function a(s,L,M){var z=s.id,D=s.graphDiv,N=D.layout,I=N[z],k=D._fullLayout,B=k[z],O={},H={};function Y(j,et){O[z+"."+j]=C.nestedProperty(I,j).get(),i.call("_storeDirectGUIEdit",N,k._preGUI,O);var it=C.nestedProperty(B,j);it.get()!==et&&(it.set(et),C.nestedProperty(I,j).set(et),H[z+"."+j]=et)}M(Y),Y("projection.scale",L.scale()/s.fitScale),Y("fitbounds",!1),D.emit("plotly_relayout",H)}function n(s,L){var M=e(s,L);function z(){g.select(this).style(h)}function D(){L.scale(g.event.scale).translate(g.event.translate),s.render(!0);var k=L.invert(s.midPt);s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.center.lon":k[0],"geo.center.lat":k[1]})}function N(k){var B=L.invert(s.midPt);k("center.lon",B[0]),k("center.lat",B[1])}function I(){g.select(this).style(p),a(s,L,N)}return M.on("zoomstart",z).on("zoom",D).on("zoomend",I),M}function f(s,L){var M=e(s,L),z=2,D,N,I,k,B,O,H,Y,j;function et(V){return L.invert(V)}function it(V){var Q=et(V);if(!Q)return!0;var ot=L(Q);return Math.abs(ot[0]-V[0])>z||Math.abs(ot[1]-V[1])>z}function ut(){g.select(this).style(h),D=g.mouse(this),N=L.rotate(),I=L.translate(),k=N,B=et(D)}function J(){if(O=g.mouse(this),it(D)){M.scale(L.scale()),M.translate(L.translate());return}L.scale(g.event.scale),L.translate([I[0],g.event.translate[1]]),B?et(O)&&(Y=et(O),H=[k[0]+(Y[0]-B[0]),N[1],N[2]],L.rotate(H),k=H):(D=O,B=et(D)),j=!0,s.render(!0);var V=L.rotate(),Q=L.invert(s.midPt);s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.center.lon":Q[0],"geo.center.lat":Q[1],"geo.projection.rotation.lon":-V[0]})}function X(){g.select(this).style(p),j&&a(s,L,tt)}function tt(V){var Q=L.rotate(),ot=L.invert(s.midPt);V("projection.rotation.lon",-Q[0]),V("center.lon",ot[0]),V("center.lat",ot[1])}return M.on("zoomstart",ut).on("zoom",J).on("zoomend",X),M}function c(s,L){L.rotate(),L.scale();var M=e(s,L),z=T(M,"zoomstart","zoom","zoomend"),D=0,N=M.on,I;M.on("zoomstart",function(){g.select(this).style(h);var Y=g.mouse(this),j=L.rotate(),et=j,it=L.translate(),ut=m(j);I=l(L,Y),N.call(M,"zoom",function(){var J=g.mouse(this);if(L.scale(g.event.scale),!I)Y=J,I=l(L,Y);else if(l(L,J)){L.rotate(j).translate(it);var X=l(L,J),tt=b(I,X),V=A(v(ut,tt)),Q=u(V,I,et);(!isFinite(Q[0])||!isFinite(Q[1])||!isFinite(Q[2]))&&(Q=et),L.rotate(Q),et=Q}B(z.of(this,arguments))}),k(z.of(this,arguments))}).on("zoomend",function(){g.select(this).style(p),N.call(M,"zoom",null),O(z.of(this,arguments)),a(s,L,H)}).on("zoom.redraw",function(){s.render(!0);var Y=L.rotate();s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.projection.rotation.lon":-Y[0],"geo.projection.rotation.lat":-Y[1]})});function k(Y){D++||Y({type:"zoomstart"})}function B(Y){Y({type:"zoom"})}function O(Y){--D||Y({type:"zoomend"})}function H(Y){var j=L.rotate();Y("projection.rotation.lon",-j[0]),Y("projection.rotation.lat",-j[1])}return g.rebind(M,z,"on")}function l(s,L){var M=s.invert(L);return M&&isFinite(M[0])&&isFinite(M[1])&&_(M)}function m(s){var L=.5*s[0]*S,M=.5*s[1]*S,z=.5*s[2]*S,D=Math.sin(L),N=Math.cos(L),I=Math.sin(M),k=Math.cos(M),B=Math.sin(z),O=Math.cos(z);return[N*k*O+D*I*B,D*k*O-N*I*B,N*I*O+D*k*B,N*k*B-D*I*O]}function v(s,L){var M=s[0],z=s[1],D=s[2],N=s[3],I=L[0],k=L[1],B=L[2],O=L[3];return[M*I-z*k-D*B-N*O,M*k+z*I+D*O-N*B,M*B-z*O+D*I+N*k,M*O+z*B-D*k+N*I]}function b(s,L){if(!(!s||!L)){var M=E(s,L),z=Math.sqrt(y(M,M)),D=.5*Math.acos(Math.max(-1,Math.min(1,y(s,L)))),N=Math.sin(D)/z;return z&&[Math.cos(D),M[2]*N,-M[1]*N,M[0]*N]}}function u(s,L,M){var z=w(L,2,s[0]);z=w(z,1,s[1]),z=w(z,0,s[2]-M[2]);var D=L[0],N=L[1],I=L[2],k=z[0],B=z[1],O=z[2],H=Math.atan2(N,D)*x,Y=Math.sqrt(D*D+N*N),j,et;Math.abs(B)>Y?(et=(B>0?90:-90)-H,j=0):(et=Math.asin(B/Y)*x-H,j=Math.sqrt(Y*Y-B*B));var it=180-et-2*H,ut=(Math.atan2(O,k)-Math.atan2(I,j))*x,J=(Math.atan2(O,k)-Math.atan2(I,-j))*x,X=o(M[0],M[1],et,ut),tt=o(M[0],M[1],it,J);return X<=tt?[et,ut,M[2]]:[it,J,M[2]]}function o(s,L,M,z){var D=d(M-s),N=d(z-L);return Math.sqrt(D*D+N*N)}function d(s){return(s%360+540)%360-180}function w(s,L,M){var z=M*S,D=s.slice(),N=L===0?1:0,I=L===2?1:2,k=Math.cos(z),B=Math.sin(z);return D[N]=s[N]*k-s[I]*B,D[I]=s[I]*k+s[N]*B,D}function A(s){return[Math.atan2(2*(s[0]*s[1]+s[2]*s[3]),1-2*(s[1]*s[1]+s[2]*s[2]))*x,Math.asin(Math.max(-1,Math.min(1,2*(s[0]*s[2]-s[3]*s[1]))))*x,Math.atan2(2*(s[0]*s[3]+s[1]*s[2]),1-2*(s[2]*s[2]+s[3]*s[3]))*x]}function _(s){var L=s[0]*S,M=s[1]*S,z=Math.cos(M);return[z*Math.cos(L),z*Math.sin(L),Math.sin(M)]}function y(s,L){for(var M=0,z=0,D=s.length;zMath.abs(E)?(n.boxEnd[1]=n.boxStart[1]+Math.abs(y)*D*(E>=0?1:-1),n.boxEnd[1]u[3]&&(n.boxEnd[1]=u[3],n.boxEnd[0]=n.boxStart[0]+(u[3]-n.boxStart[1])/Math.abs(D))):(n.boxEnd[0]=n.boxStart[0]+Math.abs(E)/D*(y>=0?1:-1),n.boxEnd[0]u[2]&&(n.boxEnd[0]=u[2],n.boxEnd[1]=n.boxStart[1]+(u[2]-n.boxStart[0])*Math.abs(D)))}else M&&(n.boxEnd[0]=n.boxStart[0]),z&&(n.boxEnd[1]=n.boxStart[1])}else n.boxEnabled?(y=n.boxStart[0]!==n.boxEnd[0],E=n.boxStart[1]!==n.boxEnd[1],y||E?(y&&(T(0,n.boxStart[0],n.boxEnd[0]),r.xaxis.autorange=!1),E&&(T(1,n.boxStart[1],n.boxEnd[1]),r.yaxis.autorange=!1),r.relayoutCallback()):r.glplot.setDirty(),n.boxEnabled=!1,n.boxInited=!1):n.boxInited&&(n.boxInited=!1);break;case"pan":n.boxEnabled=!1,n.boxInited=!1,m?(n.panning||(n.dragStart[0]=v,n.dragStart[1]=b),Math.abs(n.dragStart[0]-v)1;function m(v){if(!l){var b=g.validate(n[v],h[v]);if(b)return n[v]}}S(n,f,c,{type:r,attributes:h,handleDefaults:e,fullLayout:f,font:f.font,fullData:c,getDfltFromLayout:m,autotypenumbersDflt:f.autotypenumbers,paper_bgcolor:f.paper_bgcolor,calendar:f.calendar})};function e(a,n,f,c){for(var l=f("bgcolor"),m=C.combine(l,c.paper_bgcolor),v=["up","center","eye"],b=0;b.999)&&(A="turntable")}else A="turntable";f("dragmode",A),f("hovermode",c.getDfltFromLayout("hovermode"))}},346:function(G,U,t){var g=t(86140),C=t(86968).u,i=t(92880).extendFlat,S=t(3400).counterRegex;function x(h,p,r){return{x:{valType:"number",dflt:h,editType:"camera"},y:{valType:"number",dflt:p,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}G.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(x(0,0,1),{}),center:i(x(0,0,0),{}),eye:i(x(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:C({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:g,yaxis:g,zaxis:g,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(G,U,t){var g=t(43080),C=["xaxis","yaxis","zaxis"];function i(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var S=i.prototype;S.merge=function(h){for(var p=0;p<3;++p){var r=h[C[p]];if(!r.visible){this.enabled[p]=!1,this.drawSides[p]=!1;continue}this.enabled[p]=r.showspikes,this.colors[p]=g(r.spikecolor),this.drawSides[p]=r.spikesides,this.lineWidth[p]=r.spikethickness}};function x(h){var p=new i;return p.merge(h),p}G.exports=x},87152:function(G,U,t){G.exports=x;var g=t(54460),C=t(3400),i=["xaxis","yaxis","zaxis"];function S(h){for(var p=new Array(3),r=0;r<3;++r){for(var e=h[r],a=new Array(e.length),n=0;n/g," "));a[n]=m,f.tickmode=c}}p.ticks=a;for(var n=0;n<3;++n){.5*(h.glplot.bounds[0][n]+h.glplot.bounds[1][n]);for(var v=0;v<2;++v)p.bounds[v][n]=h.glplot.bounds[v][n]}h.contourLevels=S(a)}},94424:function(G){function U(g,C){var i=[0,0,0,0],S,x;for(S=0;S<4;++S)for(x=0;x<4;++x)i[x]+=g[4*S+x]*C[S];return i}function t(g,C){var i=U(g.projection,U(g.view,U(g.model,[C[0],C[1],C[2],1])));return i}G.exports=t},98432:function(G,U,t){var g=t(67792).gl_plot3d,C=g.createCamera,i=g.createScene,S=t(5408),x=t(89184),h=t(24040),p=t(3400),r=p.preserveDrawingBuffer(),e=t(54460),a=t(93024),n=t(43080),f=t(16576),c=t(94424),l=t(44728),m=t(9020),v=t(87152),b=t(19280).applyAutorangeOptions,u,o,d=!1;function w(D,N){var I=document.createElement("div"),k=D.container;this.graphDiv=D.graphDiv;var B=document.createElementNS("http://www.w3.org/2000/svg","svg");B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",B.style["z-index"]=20,B.style["pointer-events"]="none",I.appendChild(B),this.svgContainer=B,I.id=D.id,I.style.position="absolute",I.style.top=I.style.left="0px",I.style.width=I.style.height="100%",k.appendChild(I),this.fullLayout=N,this.id=D.id||"scene",this.fullSceneLayout=N[this.id],this.plotArgs=[[],{},{}],this.axesOptions=l(N,N[this.id]),this.spikeOptions=m(N[this.id]),this.container=I,this.staticMode=!!D.staticPlot,this.pixelRatio=this.pixelRatio||D.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=h.getComponentMethod("annotations3d","convert"),this.drawAnnotations=h.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var A=w.prototype;A.prepareOptions=function(){var D=this,N={canvas:D.canvas,gl:D.gl,glOptions:{preserveDrawingBuffer:r,premultipliedAlpha:!0,antialias:!0},container:D.container,axes:D.axesOptions,spikes:D.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:D.camera,pixelRatio:D.pixelRatio};if(D.staticMode){if(!o&&(u=document.createElement("canvas"),o=S({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!o))throw new Error("error creating static canvas/context for image server");N.gl=o,N.canvas=u}return N};var _=!0;A.tryCreatePlot=function(){var D=this,N=D.prepareOptions(),I=!0;try{D.glplot=i(N)}catch{if(D.staticMode||!_||r)I=!1;else{p.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{r=N.glOptions.preserveDrawingBuffer=!0,D.glplot=i(N)}catch{r=N.glOptions.preserveDrawingBuffer=!1,I=!1}}}return _=!1,I},A.initializeGLCamera=function(){var D=this,N=D.fullSceneLayout.camera,I=N.projection.type==="orthographic";D.camera=C(D.container,{center:[N.center.x,N.center.y,N.center.z],eye:[N.eye.x,N.eye.y,N.eye.z],up:[N.up.x,N.up.y,N.up.z],_ortho:I,zoomMin:.01,zoomMax:100,mode:"orbit"})},A.initializeGLPlot=function(){var D=this;D.initializeGLCamera();var N=D.tryCreatePlot();if(!N)return f(D);D.traces={},D.make4thDimension();var I=D.graphDiv,k=I.layout,B=function(){var H={};return D.isCameraChanged(k)&&(H[D.id+".camera"]=D.getCamera()),D.isAspectChanged(k)&&(H[D.id+".aspectratio"]=D.glplot.getAspectratio(),k[D.id].aspectmode!=="manual"&&(D.fullSceneLayout.aspectmode=k[D.id].aspectmode=H[D.id+".aspectmode"]="manual")),H},O=function(H){if(H.fullSceneLayout.dragmode!==!1){var Y=B();H.saveLayout(k),H.graphDiv.emit("plotly_relayout",Y)}};return D.glplot.canvas&&(D.glplot.canvas.addEventListener("mouseup",function(){O(D)}),D.glplot.canvas.addEventListener("touchstart",function(){d=!0}),D.glplot.canvas.addEventListener("wheel",function(H){if(I._context._scrollZoom.gl3d){if(D.camera._ortho){var Y=H.deltaX>H.deltaY?1.1:.9090909090909091,j=D.glplot.getAspectratio();D.glplot.setAspectratio({x:Y*j.x,y:Y*j.y,z:Y*j.z})}O(D)}},x?{passive:!1}:!1),D.glplot.canvas.addEventListener("mousemove",function(){if(D.fullSceneLayout.dragmode!==!1&&D.camera.mouseListener.buttons!==0){var H=B();D.graphDiv.emit("plotly_relayouting",H)}}),D.staticMode||D.glplot.canvas.addEventListener("webglcontextlost",function(H){I&&I.emit&&I.emit("plotly_webglcontextlost",{event:H,layer:D.id})},!1)),D.glplot.oncontextloss=function(){D.recoverContext()},D.glplot.onrender=function(){D.render()},!0},A.render=function(){var D=this,N=D.graphDiv,I,k=D.svgContainer,B=D.container.getBoundingClientRect();N._fullLayout._calcInverseTransform(N);var O=N._fullLayout._invScaleX,H=N._fullLayout._invScaleY,Y=B.width*O,j=B.height*H;k.setAttributeNS(null,"viewBox","0 0 "+Y+" "+j),k.setAttributeNS(null,"width",Y),k.setAttributeNS(null,"height",j),v(D),D.glplot.axes.update(D.axesOptions);for(var et=Object.keys(D.traces),it=null,ut=D.glplot.selection,J=0;J")):I.type==="isosurface"||I.type==="volume"?(ot.valueLabel=e.hoverLabelText(D._mockAxis,D._mockAxis.d2l(ut.traceCoordinate[3]),I.valuehoverformat),ct.push("value: "+ot.valueLabel),ut.textLabel&&ct.push(ut.textLabel),nt=ct.join("
    ")):nt=ut.textLabel;var gt={x:ut.traceCoordinate[0],y:ut.traceCoordinate[1],z:ut.traceCoordinate[2],data:V._input,fullData:V,curveNumber:V.index,pointNumber:Q};a.appendArrayPointValue(gt,V,Q),I._module.eventData&&(gt=V._module.eventData(gt,ut,V,{},Q));var Tt={points:[gt]};if(D.fullSceneLayout.hovermode){var wt=[];a.loneHover({trace:V,x:(.5+.5*tt[0]/tt[3])*Y,y:(.5-.5*tt[1]/tt[3])*j,xLabel:ot.xLabel,yLabel:ot.yLabel,zLabel:ot.zLabel,text:nt,name:it.name,color:a.castHoverOption(V,Q,"bgcolor")||it.color,borderColor:a.castHoverOption(V,Q,"bordercolor"),fontFamily:a.castHoverOption(V,Q,"font.family"),fontSize:a.castHoverOption(V,Q,"font.size"),fontColor:a.castHoverOption(V,Q,"font.color"),nameLength:a.castHoverOption(V,Q,"namelength"),textAlign:a.castHoverOption(V,Q,"align"),hovertemplate:p.castOption(V,Q,"hovertemplate"),hovertemplateLabels:p.extendFlat({},gt,ot),eventData:[gt]},{container:k,gd:N,inOut_bbox:wt}),gt.bbox=wt[0]}ut.distance<5&&(ut.buttons||d)?N.emit("plotly_click",Tt):N.emit("plotly_hover",Tt),this.oldEventData=Tt}else a.loneUnhover(k),this.oldEventData&&N.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;D.drawAnnotations(D)},A.recoverContext=function(){var D=this;D.glplot.dispose();var N=function(){if(D.glplot.gl.isContextLost()){requestAnimationFrame(N);return}if(!D.initializeGLPlot()){p.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}D.plot.apply(D,D.plotArgs)};requestAnimationFrame(N)};var y=["xaxis","yaxis","zaxis"];function E(D,N,I){for(var k=D.fullSceneLayout,B=0;B<3;B++){var O=y[B],H=O.charAt(0),Y=k[O],j=N[H],et=N[H+"calendar"],it=N["_"+H+"length"];if(!p.isArrayOrTypedArray(j))I[0][B]=Math.min(I[0][B],0),I[1][B]=Math.max(I[1][B],it-1);else for(var ut,J=0;J<(it||j.length);J++)if(p.isArrayOrTypedArray(j[J]))for(var X=0;XV[1][H])V[0][H]=-1,V[1][H]=1;else{var Rt=V[1][H]-V[0][H];V[0][H]-=Rt/32,V[1][H]+=Rt/32}if(ot=[V[0][H],V[1][H]],ot=b(ot,j),V[0][H]=ot[0],V[1][H]=ot[1],j.isReversed()){var bt=V[0][H];V[0][H]=V[1][H],V[1][H]=bt}}else ot=j.range,V[0][H]=j.r2l(ot[0]),V[1][H]=j.r2l(ot[1]);V[0][H]===V[1][H]&&(V[0][H]-=1,V[1][H]+=1),j.range=[V[0][H],V[1][H]],j.limitRange(),k.glplot.setBounds(H,{min:j.range[0]*X[H],max:j.range[1]*X[H]})}var At,mt=it.aspectmode;if(mt==="cube")At=[1,1,1];else if(mt==="manual"){var Lt=it.aspectratio;At=[Lt.x,Lt.y,Lt.z]}else if(mt==="auto"||mt==="data"){var Ht=[1,1,1];for(H=0;H<3;++H){j=it[y[H]],et=j.type;var Ut=Q[et];Ht[H]=Math.pow(Ut.acc,1/Ut.count)/X[H]}mt==="data"||Math.max.apply(null,Ht)/Math.min.apply(null,Ht)<=4?At=Ht:At=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");it.aspectratio.x=ut.aspectratio.x=At[0],it.aspectratio.y=ut.aspectratio.y=At[1],it.aspectratio.z=ut.aspectratio.z=At[2],k.glplot.setAspectratio(it.aspectratio),k.viewInitial.aspectratio||(k.viewInitial.aspectratio={x:it.aspectratio.x,y:it.aspectratio.y,z:it.aspectratio.z}),k.viewInitial.aspectmode||(k.viewInitial.aspectmode=it.aspectmode);var kt=it.domain||null,Vt=N._size||null;if(kt&&Vt){var It=k.container.style;It.position="absolute",It.left=Vt.l+kt.x[0]*Vt.w+"px",It.top=Vt.t+(1-kt.y[1])*Vt.h+"px",It.width=Vt.w*(kt.x[1]-kt.x[0])+"px",It.height=Vt.h*(kt.y[1]-kt.y[0])+"px"}k.glplot.redraw()}},A.destroy=function(){var D=this;D.glplot&&(D.camera.mouseListener.enabled=!1,D.container.removeEventListener("wheel",D.camera.wheelListener),D.camera=null,D.glplot.dispose(),D.container.parentNode.removeChild(D.container),D.glplot=null)};function s(D){return[[D.eye.x,D.eye.y,D.eye.z],[D.center.x,D.center.y,D.center.z],[D.up.x,D.up.y,D.up.z]]}function L(D){return{up:{x:D.up[0],y:D.up[1],z:D.up[2]},center:{x:D.center[0],y:D.center[1],z:D.center[2]},eye:{x:D.eye[0],y:D.eye[1],z:D.eye[2]},projection:{type:D._ortho===!0?"orthographic":"perspective"}}}A.getCamera=function(){var D=this;return D.camera.view.recalcMatrix(D.camera.view.lastT()),L(D.camera)},A.setViewport=function(D){var N=this,I=D.camera;N.camera.lookAt.apply(this,s(I)),N.glplot.setAspectratio(D.aspectratio);var k=I.projection.type==="orthographic",B=N.camera._ortho;k!==B&&(N.glplot.redraw(),N.glplot.clearRGBA(),N.glplot.dispose(),N.initializeGLPlot())},A.isCameraChanged=function(D){var N=this,I=N.getCamera(),k=p.nestedProperty(D,N.id+".camera"),B=k.get();function O(et,it,ut,J){var X=["up","center","eye"],tt=["x","y","z"];return it[X[ut]]&&et[X[ut]][tt[J]]===it[X[ut]][tt[J]]}var H=!1;if(B===void 0)H=!0;else{for(var Y=0;Y<3;Y++)for(var j=0;j<3;j++)if(!O(I,B,Y,j)){H=!0;break}(!B.projection||I.projection&&I.projection.type!==B.projection.type)&&(H=!0)}return H},A.isAspectChanged=function(D){var N=this,I=N.glplot.getAspectratio(),k=p.nestedProperty(D,N.id+".aspectratio"),B=k.get();return B===void 0||B.x!==I.x||B.y!==I.y||B.z!==I.z},A.saveLayout=function(D){var N=this,I=N.fullLayout,k,B,O,H,Y,j,et=N.isCameraChanged(D),it=N.isAspectChanged(D),ut=et||it;if(ut){var J={};if(et&&(k=N.getCamera(),B=p.nestedProperty(D,N.id+".camera"),O=B.get(),J[N.id+".camera"]=O),it&&(H=N.glplot.getAspectratio(),Y=p.nestedProperty(D,N.id+".aspectratio"),j=Y.get(),J[N.id+".aspectratio"]=j),h.call("_storeDirectGUIEdit",D,I._preGUI,J),et){B.set(k);var X=p.nestedProperty(I,N.id+".camera");X.set(k)}if(it){Y.set(H);var tt=p.nestedProperty(I,N.id+".aspectratio");tt.set(H),N.glplot.redraw()}}return ut},A.updateFx=function(D,N){var I=this,k=I.camera;if(k)if(D==="orbit")k.mode="orbit",k.keyBindingMode="rotate";else if(D==="turntable"){k.up=[0,0,1],k.mode="turntable",k.keyBindingMode="rotate";var B=I.graphDiv,O=B._fullLayout,H=I.fullSceneLayout.camera,Y=H.up.x,j=H.up.y,et=H.up.z;if(et/Math.sqrt(Y*Y+j*j+et*et)<.999){var it=I.id+".camera.up",ut={x:0,y:0,z:1},J={};J[it]=ut;var X=B.layout;h.call("_storeDirectGUIEdit",X,O._preGUI,J),H.up=ut,p.nestedProperty(X,it).set(ut)}}else k.keyBindingMode=D;I.fullSceneLayout.hovermode=N};function M(D,N,I){for(var k=0,B=I-1;k0)for(var Y=255/H,j=0;j<3;++j)D[O+j]=Math.min(Y*D[O+j],255)}}A.toImage=function(D){var N=this;D||(D="png"),N.staticMode&&N.container.appendChild(u),N.glplot.redraw();var I=N.glplot.gl,k=I.drawingBufferWidth,B=I.drawingBufferHeight;I.bindFramebuffer(I.FRAMEBUFFER,null);var O=new Uint8Array(k*B*4);I.readPixels(0,0,k,B,I.RGBA,I.UNSIGNED_BYTE,O),M(O,k,B),z(O,k,B);var H=document.createElement("canvas");H.width=k,H.height=B;var Y=H.getContext("2d",{willReadFrequently:!0}),j=Y.createImageData(k,B);j.data.set(O),Y.putImageData(j,0,0);var et;switch(D){case"jpeg":et=H.toDataURL("image/jpeg");break;case"webp":et=H.toDataURL("image/webp");break;default:et=H.toDataURL("image/png")}return N.staticMode&&N.container.removeChild(u),et},A.setConvert=function(){for(var D=this,N=0;N<3;N++){var I=D.fullSceneLayout[y[N]];e.setConvert(I,D.fullLayout),I.setScale=p.noop}},A.make4thDimension=function(){var D=this,N=D.graphDiv,I=N._fullLayout;D._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(D._mockAxis,I)},G.exports=w},52094:function(G){G.exports=function(t,g,C,i){i=i||t.length;for(var S=new Array(i),x=0;xOpenStreetMap contributors',S=['© Carto',i].join(" "),x=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),h=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),p={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:x,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:x,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:h,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},r=g(p);G.exports={requiredVersion:C,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:p,styleValuesNonMapbox:r,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+C+"."].join(` `),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` `),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",r.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` -`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}},89032:function(G,U,t){var g=t(3400);G.exports=function(i,S){var x=i.split(" "),v=x[0],p=x[1],r=g.isArrayOrTypedArray(S)?g.mean(S):S,e=.5+r/100,a=1.5+r/100,n=["",""],f=[0,0];switch(v){case"top":n[0]="top",f[1]=-a;break;case"bottom":n[0]="bottom",f[1]=a;break}switch(p){case"left":n[1]="right",f[0]=-e;break;case"right":n[1]="left",f[0]=e;break}var c;return n[0]&&n[1]?c=n.join("-"):n[0]?c=n[0]:n[1]?c=n[1]:c="center",{anchor:c,offset:f}}},33688:function(G,U,t){var g=t(3480),C=t(3400),i=C.strTranslate,S=C.strScale,x=t(84888).KY,v=t(9616),p=t(33428),r=t(43616),e=t(72736),a=t(14440),n="mapbox",f=U.constants=t(47552);U.name=n,U.attr="subplot",U.idRoot=n,U.idRegex=U.attrRegex=C.counterRegex(n),U.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},U.layoutAttributes=t(5232),U.supplyLayoutDefaults=t(5976),U.plot=function(h){var b=h._fullLayout,u=h.calcdata,o=b._subplots[n];if(g.version!==f.requiredVersion)throw new Error(f.wrongVersionErrorMsg);var d=c(h,o);g.accessToken=d;for(var w=0;wN/2){var I=L.split("|").join("
    ");z.text(I).attr("data-unformatted",I).call(e.convertToTspans,m),D=r.bBox(z.node())}z.attr("transform",i(-3,-D.height+8)),M.insert("rect",".static-attribution").attr({x:-D.width-6,y:-D.height-3,width:D.width+6,height:D.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;D.width+6>N&&(k=N/(D.width+6));var B=[u.l+u.w*w.x[1],u.t+u.h*(1-w.y[0])];M.attr("transform",i(B[0],B[1])+S(k))}};function c(m,h){var b=m._fullLayout,u=m._context;if(u.mapboxAccessToken==="")return"";for(var o=[],d=[],w=!1,A=!1,_=0;_1&&C.warn(f.multipleTokensErrorMsg),o[0]):(d.length&&C.log(["Listed mapbox access token(s)",d.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function l(m){return typeof m=="string"&&(f.styleValuesMapbox.indexOf(m)!==-1||m.indexOf("mapbox://")===0||m.indexOf("stamen")===0)}U.updateFx=function(m){for(var h=m._fullLayout,b=h._subplots[n],u=0;u0){for(var f=0;f0}function r(a){var n={},f={};switch(a.type){case"circle":g.extendFlat(f,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":g.extendFlat(f,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":g.extendFlat(f,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,l=i(c.textposition,c.iconsize);g.extendFlat(n,{"icon-image":c.icon+"-15","icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":l.anchor,"text-offset":l.offset,"symbol-placement":c.placement}),g.extendFlat(f,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":g.extendFlat(f,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:n,paint:f}}function e(a){var n=a.sourcetype,f=a.source,c={type:n},l;return n==="geojson"?l="data":n==="vector"?l=typeof f=="string"?"url":"tiles":n==="raster"?(l="tiles",c.tileSize=256):n==="image"&&(l="url",c.coordinates=a.coordinates),c[l]=f,a.sourceattribution&&(c.attribution=C(a.sourceattribution)),c}G.exports=function(n,f,c){var l=new x(n,f);return l.update(c),l}},5232:function(G,U,t){var g=t(3400),C=t(76308).defaultLine,i=t(86968).u,S=t(25376),x=t(52904).textposition,v=t(67824).overrideAll,p=t(31780).templatedArray,r=t(47552),e=S({});e.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=G.exports=v({_arrayAttrRegexps:[g.counterRegex("mapbox",".layers",!0)],domain:i({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:r.styleValuesMapbox.concat(r.styleValuesNonMapbox),dflt:r.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:p("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:C},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:C}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:e,textposition:g.extendFlat({},x,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}},5976:function(G,U,t){var g=t(3400),C=t(168),i=t(51272),S=t(5232);G.exports=function(r,e,a){C(r,e,a,{type:"mapbox",attributes:S,handleDefaults:x,partition:"y",accessToken:e._mapboxAccessToken})};function x(p,r,e,a){e("accesstoken",a.accessToken),e("style"),e("center.lon"),e("center.lat"),e("zoom"),e("bearing"),e("pitch");var n=e("bounds.west"),f=e("bounds.east"),c=e("bounds.south"),l=e("bounds.north");(n===void 0||f===void 0||c===void 0||l===void 0)&&delete r.bounds,i(p,r,{name:"layers",handleItemDefaults:v}),r._input=p}function v(p,r){function e(m,h){return g.coerce(p,r,S.layers,m,h)}var a=e("visible");if(a){var n=e("sourcetype"),f=n==="raster"||n==="image";e("source"),e("sourceattribution"),n==="vector"&&e("sourcelayer"),n==="image"&&e("coordinates");var c;f&&(c="raster");var l=e("type",c);f&&l!=="raster"&&(l=r.type="raster",g.log("Source types *raster* and *image* must drawn *raster* layer type.")),e("below"),e("color"),e("opacity"),e("minzoom"),e("maxzoom"),l==="circle"&&e("circle.radius"),l==="line"&&(e("line.width"),e("line.dash")),l==="fill"&&e("fill.outlinecolor"),l==="symbol"&&(e("symbol.icon"),e("symbol.iconsize"),e("symbol.text"),g.coerceFont(e,"symbol.textfont"),e("symbol.textposition"),e("symbol.placement"))}}},14440:function(G,U,t){var g=t(3480),C=t(3400),i=t(27144),S=t(24040),x=t(54460),v=t(86476),p=t(93024),r=t(72760),e=r.drawMode,a=r.selectMode,n=t(22676).prepSelect,f=t(22676).clearOutline,c=t(22676).clearSelectionsCache,l=t(22676).selectOnClick,m=t(47552),h=t(22360);function b(_,y){this.id=y,this.gd=_;var E=_._fullLayout,T=_._context;this.container=E._glcontainer.node(),this.isStatic=T.staticPlot,this.uid=E._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(E),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=b.prototype;u.plot=function(_,y,E){var T=this,s=y[T.id];T.map&&s.accesstoken!==T.accessToken&&(T.map.remove(),T.map=null,T.styleObj=null,T.traceHash={},T.layerList=[]);var L;T.map?L=new Promise(function(M,z){T.updateMap(_,y,M,z)}):L=new Promise(function(M,z){T.createMap(_,y,M,z)}),E.push(L)},u.createMap=function(_,y,E,T){var s=this,L=y[s.id],M=s.styleObj=d(L.style,y);s.accessToken=L.accesstoken;var z=L.bounds,D=z?[[z.west,z.south],[z.east,z.north]]:null,N=s.map=new g.Map({container:s.div,style:M.style,center:A(L.center),zoom:L.zoom,bearing:L.bearing,pitch:L.pitch,maxBounds:D,interactive:!s.isStatic,preserveDrawingBuffer:s.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new g.AttributionControl({compact:!0}));N._canvas.style.left="0px",N._canvas.style.top="0px",s.rejectOnError(T),s.isStatic||s.initFx(_,y);var I=[];I.push(new Promise(function(k){N.once("load",k)})),I=I.concat(i.fetchTraceGeoData(_)),Promise.all(I).then(function(){s.fillBelowLookup(_,y),s.updateData(_),s.updateLayout(y),s.resolveOnRender(E)}).catch(T)},u.updateMap=function(_,y,E,T){var s=this,L=s.map,M=y[this.id];s.rejectOnError(T);var z=[],D=d(M.style,y);JSON.stringify(s.styleObj)!==JSON.stringify(D)&&(s.styleObj=D,L.setStyle(D.style),s.traceHash={},z.push(new Promise(function(N){L.once("styledata",N)}))),z=z.concat(i.fetchTraceGeoData(_)),Promise.all(z).then(function(){s.fillBelowLookup(_,y),s.updateData(_),s.updateLayout(y),s.resolveOnRender(E)}).catch(T)},u.fillBelowLookup=function(_,y){var E=y[this.id],T=E.layers,s,L,M=this.belowLookup={},z=!1;for(s=0;s<_.length;s++){var D=_[s][0].trace,N=D._module;typeof D.below=="string"?L=D.below:N.getBelow&&(L=N.getBelow(D,this)),L===""&&(z=!0),M["trace-"+D.uid]=L||""}for(s=0;s1)for(s=0;s-1&&l(D.originalEvent,T,[E.xaxis],[E.yaxis],E.id,z),N.indexOf("event")>-1&&p.click(T,D.originalEvent)}}},u.updateFx=function(_){var y=this,E=y.map,T=y.gd;if(y.isStatic)return;function s(D){var N=y.map.unproject(D);return[N.lng,N.lat]}var L=_.dragmode,M;M=function(D,N){if(N.isRect){var I=D.range={};I[y.id]=[s([N.xmin,N.ymin]),s([N.xmax,N.ymax])]}else{var k=D.lassoPoints={};k[y.id]=N.map(s)}};var z=y.dragOptions;y.dragOptions=C.extendDeep(z||{},{dragmode:_.dragmode,element:y.div,gd:T,plotinfo:{id:y.id,domain:_[y.id].domain,xaxis:y.xaxis,yaxis:y.yaxis,fillRangeItems:M},xaxes:[y.xaxis],yaxes:[y.yaxis],subplot:y.id}),E.off("click",y.onClickInPanHandler),a(L)||e(L)?(E.dragPan.disable(),E.on("zoomstart",y.clearOutline),y.dragOptions.prepFn=function(D,N,I){n(D,N,I,y.dragOptions,L)},v.init(y.dragOptions)):(E.dragPan.enable(),E.off("zoomstart",y.clearOutline),y.div.onmousedown=null,y.div.ontouchstart=null,y.div.removeEventListener("touchstart",y.div._ontouchstart),y.onClickInPanHandler=y.onClickInPanFn(y.dragOptions),E.on("click",y.onClickInPanHandler))},u.updateFramework=function(_){var y=_[this.id].domain,E=_._size,T=this.div.style;T.width=E.w*(y.x[1]-y.x[0])+"px",T.height=E.h*(y.y[1]-y.y[0])+"px",T.left=E.l+y.x[0]*E.w+"px",T.top=E.t+(1-y.y[1])*E.h+"px",this.xaxis._offset=E.l+y.x[0]*E.w,this.xaxis._length=E.w*(y.x[1]-y.x[0]),this.yaxis._offset=E.t+(1-y.y[1])*E.h,this.yaxis._length=E.h*(y.y[1]-y.y[0])},u.updateLayers=function(_){var y=_[this.id],E=y.layers,T=this.layerList,s;if(E.length!==T.length){for(s=0;s=Q.width-20?(Z["text-anchor"]="start",Z.x=5):(Z["text-anchor"]="end",Z.x=Q._paper.attr("width")-7),ot.attr(Z);var st=ot.select(".js-link-to-tool"),nt=ot.select(".js-link-spacer"),ct=ot.select(".js-sourcelinks");V._context.showSources&&V._context.showSources(V),V._context.showLink&&_(V,st),nt.text(st.text()&&ct.text()?" - ":"")}};function _(V,Q){Q.text("");var ot=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(V._context.linkText+" »");if(V._context.sendData)ot.on("click",function(){d.sendDataToCloud(V)});else{var $=window.location.pathname.split("/"),Z=window.location.search;ot.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+$[2].split(".")[0]+"/"+$[1]+Z})}}d.sendDataToCloud=function(V){var Q=(window.PLOTLYENV||{}).BASE_URL||V._context.plotlyServerURL;if(Q){V.emit("plotly_beforeexport");var ot=g.select(V).append("div").attr("id","hiddenform").style("display","none"),$=ot.append("form").attr({action:Q+"/external",method:"post",target:"_blank"}),Z=$.append("input").attr({type:"text",name:"data"});return Z.node().value=d.graphJson(V,!1,"keepdata"),$.node().submit(),ot.remove(),V.emit("plotly_afterexport"),!1}};var y=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],E=["year","month","dayMonth","dayMonthYear"];d.supplyDefaults=function(V,Q){var ot=Q&&Q.skipUpdateCalc,$=V._fullLayout||{};if($._skipDefaults){delete $._skipDefaults;return}var Z=V._fullLayout={},st=V.layout||{},nt=V._fullData||[],ct=V._fullData=[],gt=V.data||[],Tt=V.calcdata||[],wt=V._context||{},Rt;V._transitionData||d.createTransitionData(V),Z._dfltTitle={plot:o(V,"Click to enter Plot title"),x:o(V,"Click to enter X axis title"),y:o(V,"Click to enter Y axis title"),colorbar:o(V,"Click to enter Colorscale title"),annotation:o(V,"new text")},Z._traceWord=o(V,"trace");var bt=L(V,y);if(Z._mapboxAccessToken=wt.mapboxAccessToken,$._initialAutoSizeIsDone){var At=$.width,mt=$.height;d.supplyLayoutGlobalDefaults(st,Z,bt),st.width||(Z.width=At),st.height||(Z.height=mt),d.sanitizeMargins(Z)}else{d.supplyLayoutGlobalDefaults(st,Z,bt);var Lt=!st.width||!st.height,Ht=Z.autosize,Ut=wt.autosizable,kt=Lt&&(Ht||Ut);kt?d.plotAutoSize(V,st,Z):Lt&&d.sanitizeMargins(Z),!Ht&&Lt&&(st.width=Z.width,st.height=Z.height)}Z._d3locale=M(bt,Z.separators),Z._extraFormat=L(V,E),Z._initialAutoSizeIsDone=!0,Z._dataLength=gt.length,Z._modules=[],Z._visibleModules=[],Z._basePlotModules=[];var Vt=Z._subplots=s(),It=Z._splomAxes={x:{},y:{}},re=Z._splomSubplots={};Z._splomGridDflt={},Z._scatterStackOpts={},Z._firstScatter={},Z._alignmentOpts={},Z._colorAxes={},Z._requestRangeslider={},Z._traceUids=T(nt,gt),Z._globalTransforms=(V._context||{}).globalTransforms,d.supplyDataDefaults(gt,ct,st,Z);var Kt=Object.keys(It.x),$t=Object.keys(It.y);if(Kt.length>1&&$t.length>1){for(v.getComponentMethod("grid","sizeDefaults")(st,Z),Rt=0;Rt15&&$t.length>15&&Z.shapes.length===0&&Z.images.length===0,d.linkSubplots(ct,Z,nt,$),d.cleanPlot(ct,Z,nt,$);var Se=!!($._has&&$._has("gl2d")),ne=!!(Z._has&&Z._has("gl2d")),zt=!!($._has&&$._has("cartesian")),Xt=!!(Z._has&&Z._has("cartesian")),Jt=zt||Se,Wt=Xt||ne;Jt&&!Wt?$._bgLayer.remove():Wt&&!Jt&&(Z._shouldCreateBgLayer=!0),$._zoomlayer&&!V._dragging&&c({_fullLayout:$}),z(ct,Z),u(Z,$),v.getComponentMethod("colorscale","crossTraceDefaults")(ct,Z),Z._preGUI||(Z._preGUI={}),Z._tracePreGUI||(Z._tracePreGUI={});var Ft=Z._tracePreGUI,xt={},yt;for(yt in Ft)xt[yt]="old";for(Rt=0;Rt0){var wt=1-2*st;nt=Math.round(wt*nt),ct=Math.round(wt*ct)}}var Rt=d.layoutAttributes.width.min,bt=d.layoutAttributes.height.min;nt1,mt=!ot.height&&Math.abs($.height-ct)>1;(mt||At)&&(At&&($.width=nt),mt&&($.height=ct)),Q._initialAutoSize||(Q._initialAutoSize={width:nt,height:ct}),d.sanitizeMargins($)},d.supplyLayoutModuleDefaults=function(V,Q,ot,$){var Z=v.componentsRegistry,st=Q._basePlotModules,nt,ct,gt,Tt=v.subplotsRegistry.cartesian;for(nt in Z)gt=Z[nt],gt.includeBasePlot&>.includeBasePlot(V,Q);st.length||st.push(Tt),Q._has("cartesian")&&(v.getComponentMethod("grid","contentDefaults")(V,Q),Tt.finalizeSubplots(V,Q));for(var wt in Q._subplots)Q._subplots[wt].sort(e.subplotSort);for(ct=0;ct1&&(ot.l/=Ht,ot.r/=Ht)}if(bt){var Ut=(ot.t+ot.b)/bt;Ut>1&&(ot.t/=Ut,ot.b/=Ut)}var kt=ot.xl!==void 0?ot.xl:ot.x,Vt=ot.xr!==void 0?ot.xr:ot.x,It=ot.yt!==void 0?ot.yt:ot.y,re=ot.yb!==void 0?ot.yb:ot.y;At[Q]={l:{val:kt,size:ot.l+Lt},r:{val:Vt,size:ot.r+Lt},b:{val:re,size:ot.b+Lt},t:{val:It,size:ot.t+Lt}},mt[Q]=1}if(!$._replotting)return d.doAutoMargin(V)}};function Y(V){if("_redrawFromAutoMarginCount"in V._fullLayout)return!1;var Q=f.list(V,"",!0);for(var ot in Q)if(Q[ot].autoshift||Q[ot].shift)return!0;return!1}d.doAutoMargin=function(V){var Q=V._fullLayout,ot=Q.width,$=Q.height;Q._size||(Q._size={}),B(Q);var Z=Q._size,st=Q.margin,nt={t:0,b:0,l:0,r:0},ct=e.extendFlat({},Z),gt=st.l,Tt=st.r,wt=st.t,Rt=st.b,bt=Q._pushmargin,At=Q._pushmarginIds,mt=Q.minreducedwidth,Lt=Q.minreducedheight;if(st.autoexpand!==!1){for(var Ht in bt)At[Ht]||delete bt[Ht];var Ut=V._fullLayout._reservedMargin;for(var kt in Ut)for(var Vt in Ut[kt]){var It=Ut[kt][Vt];nt[Vt]=Math.max(nt[Vt],It)}bt.base={l:{val:0,size:gt},r:{val:1,size:Tt},t:{val:1,size:wt},b:{val:0,size:Rt}};for(var re in nt){var Kt=0;for(var $t in bt)$t!=="base"&&S(bt[$t][re].size)&&(Kt=bt[$t][re].size>Kt?bt[$t][re].size:Kt);var le=Math.max(0,st[re]-Kt);nt[re]=Math.max(0,nt[re]-le)}for(var he in bt){var de=bt[he].l||{},xe=bt[he].b||{},Se=de.val,ne=de.size,zt=xe.val,Xt=xe.size,Jt=ot-nt.r-nt.l,Wt=$-nt.t-nt.b;for(var Ft in bt){if(S(ne)&&bt[Ft].r){var xt=bt[Ft].r.val,yt=bt[Ft].r.size;if(xt>Se){var Et=(ne*xt+(yt-Jt)*Se)/(xt-Se),Mt=(yt*(1-Se)+(ne-Jt)*(1-xt))/(xt-Se);Et+Mt>gt+Tt&&(gt=Et,Tt=Mt)}}if(S(Xt)&&bt[Ft].t){var Nt=bt[Ft].t.val,jt=bt[Ft].t.size;if(Nt>zt){var ie=(Xt*Nt+(jt-Wt)*zt)/(Nt-zt),me=(jt*(1-zt)+(Xt-Wt)*(1-Nt))/(Nt-zt);ie+me>Rt+wt&&(Rt=ie,wt=me)}}}}}var be=e.constrain(ot-st.l-st.r,O,mt),ve=e.constrain($-st.t-st.b,H,Lt),Le=Math.max(0,ot-be),ce=Math.max(0,$-ve);if(Le){var Te=(gt+Tt)/Le;Te>1&&(gt/=Te,Tt/=Te)}if(ce){var Be=(Rt+wt)/ce;Be>1&&(Rt/=Be,wt/=Be)}if(Z.l=Math.round(gt)+nt.l,Z.r=Math.round(Tt)+nt.r,Z.t=Math.round(wt)+nt.t,Z.b=Math.round(Rt)+nt.b,Z.p=Math.round(st.pad),Z.w=Math.round(ot)-Z.l-Z.r,Z.h=Math.round($)-Z.t-Z.b,!Q._replotting&&(d.didMarginChange(ct,Z)||Y(V))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var ir=3*(1+Object.keys(At).length);if(Q._redrawFromAutoMarginCount1)return!0}return!1},d.graphJson=function(V,Q,ot,$,Z,st){(Z&&Q&&!V._fullData||Z&&!Q&&!V._fullLayout)&&d.supplyDefaults(V);var nt=Z?V._fullData:V.data,ct=Z?V._fullLayout:V.layout,gt=(V._transitionData||{})._frames;function Tt(bt,At){if(typeof bt=="function")return At?"_function_":null;if(e.isPlainObject(bt)){var mt={},Lt;return Object.keys(bt).sort().forEach(function(Vt){if(["_","["].indexOf(Vt.charAt(0))===-1){if(typeof bt[Vt]=="function"){At&&(mt[Vt]="_function");return}if(ot==="keepdata"){if(Vt.substr(Vt.length-3)==="src")return}else if(ot==="keepstream"){if(Lt=bt[Vt+"src"],typeof Lt=="string"&&Lt.indexOf(":")>0&&!e.isPlainObject(bt.stream))return}else if(ot!=="keepall"&&(Lt=bt[Vt+"src"],typeof Lt=="string"&&Lt.indexOf(":")>0))return;mt[Vt]=Tt(bt[Vt],At)}}),mt}var Ht=Array.isArray(bt),Ut=e.isTypedArray(bt);if((Ht||Ut)&&bt.dtype&&bt.shape){var kt=bt.bdata;return Tt({dtype:bt.dtype,shape:bt.shape,bdata:e.isArrayBuffer(kt)?x.encode(kt):kt},At)}return Ht?bt.map(function(Vt){return Tt(Vt,At)}):Ut?e.simpleMap(bt,e.identity):e.isJSDate(bt)?e.ms2DateTimeLocal(+bt):bt}var wt={data:(nt||[]).map(function(bt){var At=Tt(bt);return Q&&delete At.fit,At})};if(!Q&&(wt.layout=Tt(ct),Z)){var Rt=ct._size;wt.layout.computed={margin:{b:Rt.b,l:Rt.l,r:Rt.r,t:Rt.t}}}return gt&&(wt.frames=Tt(gt)),st&&(wt.config=Tt(V._context,!0)),$==="object"?wt:JSON.stringify(wt)},d.modifyFrames=function(V,Q){var ot,$,Z,st=V._transitionData._frames,nt=V._transitionData._frameHash;for(ot=0;ot0&&(V._transitioningWithDuration=!0),V._transitionData._interruptCallbacks.push(function(){$=!0}),ot.redraw&&V._transitionData._interruptCallbacks.push(function(){return v.call("redraw",V)}),V._transitionData._interruptCallbacks.push(function(){V.emit("plotly_transitioninterrupted",[])});var bt=0,At=0;function mt(){return bt++,function(){At++,!$&&At===bt&&ct(Rt)}}ot.runFn(mt),setTimeout(mt())})}function ct(Rt){if(V._transitionData)return st(V._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ot.redraw)return v.call("redraw",V)}).then(function(){V._transitioning=!1,V._transitioningWithDuration=!1,V.emit("plotly_transitioned",[])}).then(Rt)}function gt(){if(V._transitionData)return V._transitioning=!1,Z(V._transitionData._interruptCallbacks)}var Tt=[d.previousPromises,gt,ot.prepareFn,d.rehover,d.reselect,nt],wt=e.syncOrAsync(Tt,V);return(!wt||!wt.then)&&(wt=Promise.resolve()),wt.then(function(){return V})}d.doCalcdata=function(V,Q){var ot=f.list(V),$=V._fullData,Z=V._fullLayout,st,nt,ct,gt,Tt=new Array($.length),wt=(V.calcdata||[]).slice();for(V.calcdata=Tt,Z._numBoxes=0,Z._numViolins=0,Z._violinScaleGroupStats={},V._hmpixcount=0,V._hmlumcount=0,Z._piecolormap={},Z._sunburstcolormap={},Z._treemapcolormap={},Z._iciclecolormap={},Z._funnelareacolormap={},ct=0;ct<$.length;ct++)if(Array.isArray(Q)&&Q.indexOf(ct)===-1){Tt[ct]=wt[ct];continue}for(ct=0;ct<$.length;ct++)st=$[ct],st._arrayAttrs=p.findArrayAttributes(st),st._extremes={};var Rt=Z._subplots.polar||[];for(ct=0;ct=0;gt--)if(re[gt].enabled){st._indexToPoints=re[gt]._indexToPoints;break}nt&&nt.calc&&(It=nt.calc(V,st))}(!Array.isArray(It)||!It[0])&&(It=[{x:n,y:n}]),It[0].t||(It[0].t={}),It[0].trace=st,Tt[kt]=It}}for(X(ot,$,Z),ct=0;ct<$.length;ct++)Ht(ct,!0);for(ct=0;ct<$.length;ct++)Lt(ct);for(mt&&X(ot,$,Z),ct=0;ct<$.length;ct++)Ht(ct,!0);for(ct=0;ct<$.length;ct++)Ht(ct,!1);tt(V);var Ut=J(ot,V);if(Ut.length){for(Z._numBoxes=0,Z._numViolins=0,ct=0;ct0?E:1/0},A=i(d,w),_=g.mod(A+1,d.length);return[d[A],d[_]]}function m(o){return Math.abs(o)>1e-10?o:0}function h(o,d,w){d=d||0,w=w||0;for(var A=o.length,_=new Array(A),y=0;ybt?(At=st,mt=st*bt,Ut=(nt-mt)/V.h/2,Lt=[$[0],$[1]],Ht=[Z[0]+Ut,Z[1]-Ut]):(At=nt/bt,mt=nt,Ut=(st-At)/V.w/2,Lt=[$[0]+Ut,$[1]-Ut],Ht=[Z[0],Z[1]]),X.xLength2=At,X.yLength2=mt,X.xDomain2=Lt,X.yDomain2=Ht;var kt=X.xOffset2=V.l+V.w*Lt[0],Vt=X.yOffset2=V.t+V.h*(1-Ht[1]),It=X.radius=At/Tt,re=X.innerRadius=X.getHole(J)*It,Kt=X.cx=kt-It*gt[0],$t=X.cy=Vt+It*gt[3],le=X.cxx=Kt-kt,he=X.cyy=$t-Vt,de=Q.side,xe;de==="counterclockwise"?(xe=de,de="top"):de==="clockwise"&&(xe=de,de="bottom"),X.radialAxis=X.mockAxis(ut,J,Q,{_id:"x",side:de,_trueSide:xe,domain:[re/V.w,It/V.w]}),X.angularAxis=X.mockAxis(ut,J,ot,{side:"right",domain:[0,Math.PI],autorange:!1}),X.doAutoRange(ut,J),X.updateAngularAxis(ut,J),X.updateRadialAxis(ut,J),X.updateRadialAxisTitle(ut,J),X.xaxis=X.mockCartesianAxis(ut,J,{_id:"x",domain:Lt}),X.yaxis=X.mockCartesianAxis(ut,J,{_id:"y",domain:Ht});var Se=X.pathSubplot();X.clipPaths.forTraces.select("path").attr("d",Se).attr("transform",v(le,he)),tt.frontplot.attr("transform",v(kt,Vt)).call(r.setClipUrl,X._hasClipOnAxisFalse?null:X.clipIds.forTraces,X.gd),tt.bg.attr("d",Se).attr("transform",v(Kt,$t)).call(p.fill,J.bgcolor)},H.mockAxis=function(ut,J,X,tt){var V=S.extendFlat({},X,tt);return f(V,J,ut),V},H.mockCartesianAxis=function(ut,J,X){var tt=this,V=tt.isSmith,Q=X._id,ot=S.extendFlat({type:"linear"},X);n(ot,ut);var $={x:[0,2],y:[1,3]};return ot.setRange=function(){var Z=tt.sectorBBox,st=$[Q],nt=tt.radialAxis._rl,ct=(nt[1]-nt[0])/(1-tt.getHole(J));ot.range=[Z[st[0]]*ct,Z[st[1]]*ct]},ot.isPtWithinRange=Q==="x"&&!V?function(Z){return tt.isPtInside(Z)}:function(){return!0},ot.setRange(),ot.setScale(),ot},H.doAutoRange=function(ut,J){var X=this,tt=X.gd,V=X.radialAxis,Q=X.getRadial(J);c(tt,V);var ot=V.range;if(Q.range=ot.slice(),Q._input.range=ot.slice(),V._rl=[V.r2l(ot[0],null,"gregorian"),V.r2l(ot[1],null,"gregorian")],V.minallowed!==void 0){var $=V.r2l(V.minallowed);V._rl[0]>V._rl[1]?V._rl[1]=Math.max(V._rl[1],$):V._rl[0]=Math.max(V._rl[0],$)}if(V.maxallowed!==void 0){var Z=V.r2l(V.maxallowed);V._rl[0]90&&nt<=270&&(ct.tickangle=180);var wt=Tt?function(It){var re=D(X,L([It.x,0]));return v(re[0]-$,re[1]-Z)}:function(It){return v(ct.l2p(It.x)+ot,0)},Rt=Tt?function(It){return z(X,It.x,-1/0,1/0)}:function(It){return X.pathArc(ct.r2p(It.x)+ot)},bt=Y(st);if(X.radialTickLayout!==bt&&(V["radial-axis"].selectAll(".xtick").remove(),X.radialTickLayout=bt),gt){ct.setScale();var At=0,mt=Tt?(ct.tickvals||[]).filter(function(It){return It>=0}).map(function(It){return a.tickText(ct,It,!0,!1)}):a.calcTicks(ct),Lt=Tt?mt:a.clipEnds(ct,mt),Ht=a.getTickSigns(ct)[2];Tt&&((ct.ticks==="top"&&ct.side==="bottom"||ct.ticks==="bottom"&&ct.side==="top")&&(Ht=-Ht),ct.ticks==="top"&&ct.side==="top"&&(At=-ct.ticklen),ct.ticks==="bottom"&&ct.side==="bottom"&&(At=ct.ticklen)),a.drawTicks(tt,ct,{vals:mt,layer:V["radial-axis"],path:a.makeTickPath(ct,0,Ht),transFn:wt,crisp:!1}),a.drawGrid(tt,ct,{vals:Lt,layer:V["radial-grid"],path:Rt,transFn:S.noop,crisp:!1}),a.drawLabels(tt,ct,{vals:mt,layer:V["radial-axis"],transFn:wt,labelFns:a.makeLabelFns(ct,At)})}var Ut=X.radialAxisAngle=X.vangles?B(et(k(st.angle),X.vangles)):st.angle,kt=v($,Z),Vt=kt+x(-Ut);it(V["radial-axis"],gt&&(st.showticklabels||st.ticks),{transform:Vt}),it(V["radial-grid"],gt&&st.showgrid,{transform:Tt?"":kt}),it(V["radial-line"].select("line"),gt&&st.showline,{x1:Tt?-Q:ot,y1:0,x2:Q,y2:0,transform:Vt}).attr("stroke-width",st.linewidth).call(p.stroke,st.linecolor)},H.updateRadialAxisTitle=function(ut,J,X){if(!this.isSmith){var tt=this,V=tt.gd,Q=tt.radius,ot=tt.cx,$=tt.cy,Z=tt.getRadial(J),st=tt.id+"title",nt=0;if(Z.title){var ct=r.bBox(tt.layers["radial-axis"].node()).height,gt=Z.title.font.size,Tt=Z.side;nt=Tt==="top"?gt:Tt==="counterclockwise"?-(ct+gt*.4):ct+gt*.8}var wt=X!==void 0?X:tt.radialAxisAngle,Rt=k(wt),bt=Math.cos(Rt),At=Math.sin(Rt),mt=ot+Q/2*bt+nt*At,Lt=$-Q/2*At+nt*bt;tt.layers["radial-axis-title"]=b.draw(V,st,{propContainer:Z,propName:tt.id+".radialaxis.title",placeholder:N(V,"Click to enter radial axis title"),attributes:{x:mt,y:Lt,"text-anchor":"middle"},transform:{rotate:-wt}})}},H.updateAngularAxis=function(ut,J){var X=this,tt=X.gd,V=X.layers,Q=X.radius,ot=X.innerRadius,$=X.cx,Z=X.cy,st=X.getAngular(J),nt=X.angularAxis,ct=X.isSmith;ct||(X.fillViewInitialKey("angularaxis.rotation",st.rotation),nt.setGeometry(),nt.setScale());var gt=ct?function(re){var Kt=D(X,L([0,re.x]));return Math.atan2(Kt[0]-$,Kt[1]-Z)-Math.PI/2}:function(re){return nt.t2g(re.x)};nt.type==="linear"&&nt.thetaunit==="radians"&&(nt.tick0=B(nt.tick0),nt.dtick=B(nt.dtick));var Tt=function(re){return v($+Q*Math.cos(re),Z-Q*Math.sin(re))},wt=ct?function(re){var Kt=D(X,L([0,re.x]));return v(Kt[0],Kt[1])}:function(re){return Tt(gt(re))},Rt=ct?function(re){var Kt=D(X,L([0,re.x])),$t=Math.atan2(Kt[0]-$,Kt[1]-Z)-Math.PI/2;return v(Kt[0],Kt[1])+x(-B($t))}:function(re){var Kt=gt(re);return Tt(Kt)+x(-B(Kt))},bt=ct?function(re){return M(X,re.x,0,1/0)}:function(re){var Kt=gt(re),$t=Math.cos(Kt),le=Math.sin(Kt);return"M"+[$+ot*$t,Z-ot*le]+"L"+[$+Q*$t,Z-Q*le]},At=a.makeLabelFns(nt,0),mt=At.labelStandoff,Lt={};Lt.xFn=function(re){var Kt=gt(re);return Math.cos(Kt)*mt},Lt.yFn=function(re){var Kt=gt(re),$t=Math.sin(Kt)>0?.2:1;return-Math.sin(Kt)*(mt+re.fontSize*$t)+Math.abs(Math.cos(Kt))*(re.fontSize*y)},Lt.anchorFn=function(re){var Kt=gt(re),$t=Math.cos(Kt);return Math.abs($t)<.1?"middle":$t>0?"start":"end"},Lt.heightFn=function(re,Kt,$t){var le=gt(re);return-.5*(1+Math.sin(le))*$t};var Ht=Y(st);X.angularTickLayout!==Ht&&(V["angular-axis"].selectAll("."+nt._id+"tick").remove(),X.angularTickLayout=Ht);var Ut=ct?[1/0].concat(nt.tickvals||[]).map(function(re){return a.tickText(nt,re,!0,!1)}):a.calcTicks(nt);ct&&(Ut[0].text="∞",Ut[0].fontSize*=1.75);var kt;if(J.gridshape==="linear"?(kt=Ut.map(gt),S.angleDelta(kt[0],kt[1])<0&&(kt=kt.slice().reverse())):kt=null,X.vangles=kt,nt.type==="category"&&(Ut=Ut.filter(function(re){return S.isAngleInsideSector(gt(re),X.sectorInRad)})),nt.visible){var Vt=nt.ticks==="inside"?-1:1,It=(nt.linewidth||1)/2;a.drawTicks(tt,nt,{vals:Ut,layer:V["angular-axis"],path:"M"+Vt*It+",0h"+Vt*nt.ticklen,transFn:Rt,crisp:!1}),a.drawGrid(tt,nt,{vals:Ut,layer:V["angular-grid"],path:bt,transFn:S.noop,crisp:!1}),a.drawLabels(tt,nt,{vals:Ut,layer:V["angular-axis"],repositionOnUpdate:!0,transFn:wt,labelFns:Lt})}it(V["angular-line"].select("path"),st.showline,{d:X.pathSubplot(),transform:v($,Z)}).attr("stroke-width",st.linewidth).call(p.stroke,st.linecolor)},H.updateFx=function(ut,J){if(!this.gd._context.staticPlot){var X=!this.isSmith;X&&(this.updateAngularDrag(ut),this.updateRadialDrag(ut,J,0),this.updateRadialDrag(ut,J,1)),this.updateHoverAndMainDrag(ut)}},H.updateHoverAndMainDrag=function(ut){var J=this,X=J.isSmith,tt=J.gd,V=J.layers,Q=ut._zoomlayer,ot=E.MINZOOM,$=E.OFFEDGE,Z=J.radius,st=J.innerRadius,nt=J.cx,ct=J.cy,gt=J.cxx,Tt=J.cyy,wt=J.sectorInRad,Rt=J.vangles,bt=J.radialAxis,At=T.clampTiny,mt=T.findXYatLength,Lt=T.findEnclosingVertexAngles,Ht=E.cornerHalfWidth,Ut=E.cornerLen/2,kt,Vt,It=l.makeDragger(V,"path","maindrag",ut.dragmode===!1?"none":"crosshair");g.select(It).attr("d",J.pathSubplot()).attr("transform",v(nt,ct)),It.onmousemove=function(ce){h.hover(tt,ce,J.id),tt._fullLayout._lasthover=It,tt._fullLayout._hoversubplot=J.id},It.onmouseout=function(ce){tt._dragging||m.unhover(tt,ce)};var re={element:It,gd:tt,subplot:J.id,plotinfo:{id:J.id,xaxis:J.xaxis,yaxis:J.yaxis},xaxes:[J.xaxis],yaxes:[J.yaxis]},Kt,$t,le,he,de,xe,Se,ne,zt;function Xt(ce,Te){return Math.sqrt(ce*ce+Te*Te)}function Jt(ce,Te){return Xt(ce-gt,Te-Tt)}function Wt(ce,Te){return Math.atan2(Tt-Te,ce-gt)}function Ft(ce,Te){return[ce*Math.cos(Te),ce*Math.sin(-Te)]}function xt(ce,Te){if(ce===0)return J.pathSector(2*Ht);var Be=Ut/ce,ir=Te-Be,pe=Te+Be,Xe=Math.max(0,Math.min(ce,Z)),Ke=Xe-Ht,or=Xe+Ht;return"M"+Ft(Ke,ir)+"A"+[Ke,Ke]+" 0,0,0 "+Ft(Ke,pe)+"L"+Ft(or,pe)+"A"+[or,or]+" 0,0,1 "+Ft(or,ir)+"Z"}function yt(ce,Te,Be){if(ce===0)return J.pathSector(2*Ht);var ir=Ft(ce,Te),pe=Ft(ce,Be),Xe=At((ir[0]+pe[0])/2),Ke=At((ir[1]+pe[1])/2),or,$e;if(Xe&&Ke){var ge=Ke/Xe,se=-1/ge,Ae=mt(Ht,ge,Xe,Ke);or=mt(Ut,se,Ae[0][0],Ae[0][1]),$e=mt(Ut,se,Ae[1][0],Ae[1][1])}else{var Ce,Ie;Ke?(Ce=Ut,Ie=Ht):(Ce=Ht,Ie=Ut),or=[[Xe-Ce,Ke-Ie],[Xe+Ce,Ke-Ie]],$e=[[Xe-Ce,Ke+Ie],[Xe+Ce,Ke+Ie]]}return"M"+or.join("L")+"L"+$e.reverse().join("L")+"Z"}function Et(){le=null,he=null,de=J.pathSubplot(),xe=!1;var ce=tt._fullLayout[J.id];Se=C(ce.bgcolor).getLuminance(),ne=l.makeZoombox(Q,Se,nt,ct,de),ne.attr("fill-rule","evenodd"),zt=l.makeCorners(Q,nt,ct),d(tt)}function Mt(ce,Te){return Te=Math.max(Math.min(Te,Z),st),ce<$?ce=0:Z-ce<$?ce=Z:Te<$?Te=0:Z-Te<$&&(Te=Z),Math.abs(Te-ce)>ot?(ce-1&&ce===1&&o(Te,tt,[J.xaxis],[J.yaxis],J.id,re),Be.indexOf("event")>-1&&h.click(tt,Te,J.id)}re.prepFn=function(ce,Te,Be){var ir=tt._fullLayout.dragmode,pe=It.getBoundingClientRect();tt._fullLayout._calcInverseTransform(tt);var Xe=tt._fullLayout._invTransform;kt=tt._fullLayout._invScaleX,Vt=tt._fullLayout._invScaleY;var Ke=S.apply3DTransform(Xe)(Te-pe.left,Be-pe.top);if(Kt=Ke[0],$t=Ke[1],Rt){var or=T.findPolygonOffset(Z,wt[0],wt[1],Rt);Kt+=gt+or[0],$t+=Tt+or[1]}switch(ir){case"zoom":re.clickFn=Le,X||(Rt?re.moveFn=me:re.moveFn=jt,re.doneFn=be,Et());break;case"select":case"lasso":u(ce,Te,Be,re,ir);break}},m.init(re)},H.updateRadialDrag=function(ut,J,X){var tt=this,V=tt.gd,Q=tt.layers,ot=tt.radius,$=tt.innerRadius,Z=tt.cx,st=tt.cy,nt=tt.radialAxis,ct=E.radialDragBoxSize,gt=ct/2;if(!nt.visible)return;var Tt=k(tt.radialAxisAngle),wt=nt._rl,Rt=wt[0],bt=wt[1],At=wt[X],mt=.75*(wt[1]-wt[0])/(1-tt.getHole(J))/ot,Lt,Ht,Ut;X?(Lt=Z+(ot+gt)*Math.cos(Tt),Ht=st-(ot+gt)*Math.sin(Tt),Ut="radialdrag"):(Lt=Z+($-gt)*Math.cos(Tt),Ht=st-($-gt)*Math.sin(Tt),Ut="radialdrag-inner");var kt=l.makeRectDragger(Q,Ut,"crosshair",-gt,-gt,ct,ct),Vt={element:kt,gd:V};ut.dragmode===!1&&(Vt.dragmode=!1),it(g.select(kt),nt.visible&&$0!=(X?Kt>Rt:Kt=90||V>90&&Q>=450?Tt=1:$<=0&&st<=0?Tt=0:Tt=Math.max($,st),V<=180&&Q>=180||V>180&&Q>=540?nt=-1:ot>=0&&Z>=0?nt=0:nt=Math.min(ot,Z),V<=270&&Q>=270||V>270&&Q>=630?ct=-1:$>=0&&st>=0?ct=0:ct=Math.min($,st),Q>=360?gt=1:ot<=0&&Z<=0?gt=0:gt=Math.max(ot,Z),[nt,ct,gt,Tt]}function et(ut,J){var X=function(V){return S.angleDist(ut,V)},tt=S.findIndexOfMin(J,X);return J[tt]}function it(ut,J,X){return J?(ut.attr("display",null),ut.attr(X)):ut&&ut.attr("display","none"),ut}},57696:function(G,U,t){var g=t(3400),C=t(78344),i=g.deg2rad,S=g.rad2deg;G.exports=function(a,n,f){switch(C(a,f),a._id){case"x":case"radialaxis":x(a,n);break;case"angularaxis":r(a,n);break}};function x(e,a){var n=a._subplot;e.setGeometry=function(){var f=e._rl[0],c=e._rl[1],l=n.innerRadius,m=(n.radius-l)/(c-f),h=l/m,b=f>c?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var o=e.c2l(u)-f;return(b(o)?o:0)+h},e.g2c=function(u){return e.l2c(u+f-h)},e.g2p=function(u){return u*m},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function v(e,a){return a==="degrees"?i(e):e}function p(e,a){return a==="degrees"?S(e):e}function r(e,a){var n=e.type;if(n==="linear"){var f=e.d2c,c=e.c2d;e.d2c=function(l,m){return v(f(l),m)},e.c2d=function(l,m){return c(p(l,m))}}e.makeCalcdata=function(l,m){var h=l[m],b=l._length,u,o,d=function(E){return e.d2c(E,l.thetaunit)};if(h)for(u=new Array(b),o=0;o0?1:0}function t(x){var v=x[0],p=x[1];if(!isFinite(v)||!isFinite(p))return[1,0];var r=(v+1)*(v+1)+p*p;return[(v*v+p*p-1)/r,2*p/r]}function g(x,v){var p=v[0],r=v[1];return[p*x.radius+x.cx,-r*x.radius+x.cy]}function C(x,v){return v*x.radius}function i(x,v,p,r){var e=g(x,t([p,v])),a=e[0],n=e[1],f=g(x,t([r,v])),c=f[0],l=f[1];if(v===0)return["M"+a+","+n,"L"+c+","+l].join(" ");var m=C(x,1/Math.abs(v));return["M"+a+","+n,"A"+m+","+m+" 0 0,"+(v<0?1:0)+" "+c+","+l].join(" ")}function S(x,v,p,r){var e=C(x,1/(v+1)),a=g(x,t([v,p])),n=a[0],f=a[1],c=g(x,t([v,r])),l=c[0],m=c[1];if(U(p)!==U(r)){var h=g(x,t([v,0])),b=h[0],u=h[1];return["M"+n+","+f,"A"+e+","+e+" 0 0,"+(00){for(var v=[],p=0;p=o&&(y.min=0,E.min=0,T.min=0,l.aaxis&&delete l.aaxis.min,l.baxis&&delete l.baxis.min,l.caxis&&delete l.caxis.min)}function c(l,m,h,b){var u=a[m._name];function o(s,L){return i.coerce(l,m,u,s,L)}o("uirevision",b.uirevision),m.type="linear";var d=o("color"),w=d!==u.color.dflt?d:h.font.color,A=m._name,_=A.charAt(0).toUpperCase(),y="Component "+_,E=o("title.text",y);m._hovertitle=E===y?E:_,i.coerceFont(o,"title.font",{family:h.font.family,size:i.bigFont(h.font.size),color:w}),o("min"),r(l,m,o,"linear"),v(l,m,o,"linear"),x(l,m,o,"linear",{noAutotickangles:!0}),p(l,m,o,{outerTicks:!0});var T=o("showticklabels");T&&(i.coerceFont(o,"tickfont",{family:h.font.family,size:h.font.size,color:w}),o("tickangle"),o("tickformat")),e(l,m,o,{dfltColor:d,bgColor:h.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u}),o("hoverformat"),o("layer")}},24696:function(G,U,t){var g=t(33428),C=t(49760),i=t(24040),S=t(3400),x=S.strTranslate,v=S._,p=t(76308),r=t(43616),e=t(78344),a=t(92880).extendFlat,n=t(7316),f=t(54460),c=t(86476),l=t(93024),m=t(72760),h=m.freeMode,b=m.rectMode,u=t(81668),o=t(22676).prepSelect,d=t(22676).selectOnClick,w=t(22676).clearOutline,A=t(22676).clearSelectionsCache,_=t(33816);function y(B,O){this.id=B.id,this.graphDiv=B.graphDiv,this.init(O),this.makeFramework(O),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}G.exports=y;var E=y.prototype;E.init=function(B){this.container=B._ternarylayer,this.defs=B._defs,this.layoutId=B._uid,this.traceHash={},this.layers={}},E.plot=function(B,O){var H=this,Y=O[H.id],j=O._size;H._hasClipOnAxisFalse=!1;for(var et=0;etT*X?(nt=X,st=nt*T):(st=J,nt=st/T),ct=it*st/J,gt=ut*nt/X,$=O.l+O.w*j-st/2,Z=O.t+O.h*(1-et)-nt/2,H.x0=$,H.y0=Z,H.w=st,H.h=nt,H.sum=tt,H.xaxis={type:"linear",range:[V+2*ot-tt,tt-V-2*Q],domain:[j-ct/2,j+ct/2],_id:"x"},e(H.xaxis,H.graphDiv._fullLayout),H.xaxis.setScale(),H.xaxis.isPtWithinRange=function(Vt){return Vt.a>=H.aaxis.range[0]&&Vt.a<=H.aaxis.range[1]&&Vt.b>=H.baxis.range[1]&&Vt.b<=H.baxis.range[0]&&Vt.c>=H.caxis.range[1]&&Vt.c<=H.caxis.range[0]},H.yaxis={type:"linear",range:[V,tt-Q-ot],domain:[et-gt/2,et+gt/2],_id:"y"},e(H.yaxis,H.graphDiv._fullLayout),H.yaxis.setScale(),H.yaxis.isPtWithinRange=function(){return!0};var Tt=H.yaxis.domain[0],wt=H.aaxis=a({},B.aaxis,{range:[V,tt-Q-ot],side:"left",tickangle:(+B.aaxis.tickangle||0)-30,domain:[Tt,Tt+gt*T],anchor:"free",position:0,_id:"y",_length:st});e(wt,H.graphDiv._fullLayout),wt.setScale();var Rt=H.baxis=a({},B.baxis,{range:[tt-V-ot,Q],side:"bottom",domain:H.xaxis.domain,anchor:"free",position:0,_id:"x",_length:st});e(Rt,H.graphDiv._fullLayout),Rt.setScale();var bt=H.caxis=a({},B.caxis,{range:[tt-V-Q,ot],side:"right",tickangle:(+B.caxis.tickangle||0)+30,domain:[Tt,Tt+gt*T],anchor:"free",position:0,_id:"y",_length:st});e(bt,H.graphDiv._fullLayout),bt.setScale();var At="M"+$+","+(Z+nt)+"h"+st+"l-"+st/2+",-"+nt+"Z";H.clipDef.select("path").attr("d",At),H.layers.plotbg.select("path").attr("d",At);var mt="M0,"+nt+"h"+st+"l-"+st/2+",-"+nt+"Z";H.clipDefRelative.select("path").attr("d",mt);var Lt=x($,Z);H.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Lt),H.clipDefRelative.select("path").attr("transform",null);var Ht=x($-Rt._offset,Z+nt);H.layers.baxis.attr("transform",Ht),H.layers.bgrid.attr("transform",Ht);var Ut=x($+st/2,Z)+"rotate(30)"+x(0,-wt._offset);H.layers.aaxis.attr("transform",Ut),H.layers.agrid.attr("transform",Ut);var kt=x($+st/2,Z)+"rotate(-30)"+x(0,-bt._offset);H.layers.caxis.attr("transform",kt),H.layers.cgrid.attr("transform",kt),H.drawAxes(!0),H.layers.aline.select("path").attr("d",wt.showline?"M"+$+","+(Z+nt)+"l"+st/2+",-"+nt:"M0,0").call(p.stroke,wt.linecolor||"#000").style("stroke-width",(wt.linewidth||0)+"px"),H.layers.bline.select("path").attr("d",Rt.showline?"M"+$+","+(Z+nt)+"h"+st:"M0,0").call(p.stroke,Rt.linecolor||"#000").style("stroke-width",(Rt.linewidth||0)+"px"),H.layers.cline.select("path").attr("d",bt.showline?"M"+($+st/2)+","+Z+"l"+st/2+","+nt:"M0,0").call(p.stroke,bt.linecolor||"#000").style("stroke-width",(bt.linewidth||0)+"px"),H.graphDiv._context.staticPlot||H.initInteractions(),r.setClipUrl(H.layers.frontplot,H._hasClipOnAxisFalse?null:H.clipId,H.graphDiv)},E.drawAxes=function(B){var O=this,H=O.graphDiv,Y=O.id.substr(7)+"title",j=O.layers,et=O.aaxis,it=O.baxis,ut=O.caxis;if(O.drawAx(et),O.drawAx(it),O.drawAx(ut),B){var J=Math.max(et.showticklabels?et.tickfont.size/2:0,(ut.showticklabels?ut.tickfont.size*.75:0)+(ut.ticks==="outside"?ut.ticklen*.87:0)),X=(it.showticklabels?it.tickfont.size:0)+(it.ticks==="outside"?it.ticklen:0)+3;j["a-title"]=u.draw(H,"a"+Y,{propContainer:et,propName:O.id+".aaxis.title",placeholder:v(H,"Click to enter Component A title"),attributes:{x:O.x0+O.w/2,y:O.y0-et.title.font.size/3-J,"text-anchor":"middle"}}),j["b-title"]=u.draw(H,"b"+Y,{propContainer:it,propName:O.id+".baxis.title",placeholder:v(H,"Click to enter Component B title"),attributes:{x:O.x0-X,y:O.y0+O.h+it.title.font.size*.83+X,"text-anchor":"middle"}}),j["c-title"]=u.draw(H,"c"+Y,{propContainer:ut,propName:O.id+".caxis.title",placeholder:v(H,"Click to enter Component C title"),attributes:{x:O.x0+O.w+X,y:O.y0+O.h+ut.title.font.size*.83+X,"text-anchor":"middle"}})}},E.drawAx=function(B){var O=this,H=O.graphDiv,Y=B._name,j=Y.charAt(0),et=B._id,it=O.layers[Y],ut=30,J=j+"tickLayout",X=s(B);O[J]!==X&&(it.selectAll("."+et+"tick").remove(),O[J]=X),B.setScale();var tt=f.calcTicks(B),V=f.clipEnds(B,tt),Q=f.makeTransTickFn(B),ot=f.getTickSigns(B)[2],$=S.deg2rad(ut),Z=ot*(B.linewidth||1)/2,st=ot*B.ticklen,nt=O.w,ct=O.h,gt=j==="b"?"M0,"+Z+"l"+Math.sin($)*st+","+Math.cos($)*st:"M"+Z+",0l"+Math.cos($)*st+","+-Math.sin($)*st,Tt={a:"M0,0l"+ct+",-"+nt/2,b:"M0,0l-"+nt/2+",-"+ct,c:"M0,0l-"+ct+","+nt/2}[j];f.drawTicks(H,B,{vals:B.ticks==="inside"?V:tt,layer:it,path:gt,transFn:Q,crisp:!1}),f.drawGrid(H,B,{vals:V,layer:O.layers[j+"grid"],path:Tt,transFn:Q,crisp:!1}),f.drawLabels(H,B,{vals:tt,layer:it,transFn:Q,labelFns:f.makeLabelFns(B,0,ut)})};function s(B){return B.ticks+String(B.ticklen)+String(B.showticklabels)}var L=_.MINZOOM/2+.87,M="m-0.87,.5h"+L+"v3h-"+(L+5.2)+"l"+(L/2+2.6)+",-"+(L*.87+4.5)+"l2.6,1.5l-"+L/2+","+L*.87+"Z",z="m0.87,.5h-"+L+"v3h"+(L+5.2)+"l-"+(L/2+2.6)+",-"+(L*.87+4.5)+"l-2.6,1.5l"+L/2+","+L*.87+"Z",D="m0,1l"+L/2+","+L*.87+"l2.6,-1.5l-"+(L/2+2.6)+",-"+(L*.87+4.5)+"l-"+(L/2+2.6)+","+(L*.87+4.5)+"l2.6,1.5l"+L/2+",-"+L*.87+"Z",N="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",I=!0;E.clearOutline=function(){A(this.dragOptions),w(this.dragOptions.gd)},E.initInteractions=function(){var B=this,O=B.layers.plotbg.select("path").node(),H=B.graphDiv,Y=H._fullLayout._zoomlayer,j,et;this.dragOptions={element:O,gd:H,plotinfo:{id:B.id,domain:H._fullLayout[B.id].domain,xaxis:B.xaxis,yaxis:B.yaxis},subplot:B.id,prepFn:function(Ht,Ut,kt){B.dragOptions.xaxes=[B.xaxis],B.dragOptions.yaxes=[B.yaxis],j=H._fullLayout._invScaleX,et=H._fullLayout._invScaleY;var Vt=B.dragOptions.dragmode=H._fullLayout.dragmode;h(Vt)?B.dragOptions.minDrag=1:B.dragOptions.minDrag=void 0,Vt==="zoom"?(B.dragOptions.moveFn=Rt,B.dragOptions.clickFn=nt,B.dragOptions.doneFn=bt,ct(Ht,Ut,kt)):Vt==="pan"?(B.dragOptions.moveFn=mt,B.dragOptions.clickFn=nt,B.dragOptions.doneFn=Lt,At(),B.clearOutline(H)):(b(Vt)||h(Vt))&&o(Ht,Ut,kt,B.dragOptions,Vt)}};var it,ut,J,X,tt,V,Q,ot,$,Z;function st(Ht){var Ut={};return Ut[B.id+".aaxis.min"]=Ht.a,Ut[B.id+".baxis.min"]=Ht.b,Ut[B.id+".caxis.min"]=Ht.c,Ut}function nt(Ht,Ut){var kt=H._fullLayout.clickmode;k(H),Ht===2&&(H.emit("plotly_doubleclick",null),i.call("_guiRelayout",H,st({a:0,b:0,c:0}))),kt.indexOf("select")>-1&&Ht===1&&d(Ut,H,[B.xaxis],[B.yaxis],B.id,B.dragOptions),kt.indexOf("event")>-1&&l.click(H,Ut,B.id)}function ct(Ht,Ut,kt){var Vt=O.getBoundingClientRect();it=Ut-Vt.left,ut=kt-Vt.top,H._fullLayout._calcInverseTransform(H);var It=H._fullLayout._invTransform,re=S.apply3DTransform(It)(it,ut);it=re[0],ut=re[1],J={a:B.aaxis.range[0],b:B.baxis.range[1],c:B.caxis.range[1]},tt=J,X=B.aaxis.range[1]-J.a,V=C(B.graphDiv._fullLayout[B.id].bgcolor).getLuminance(),Q="M0,"+B.h+"L"+B.w/2+", 0L"+B.w+","+B.h+"Z",ot=!1,$=Y.append("path").attr("class","zoombox").attr("transform",x(B.x0,B.y0)).style({fill:V>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",Q),Z=Y.append("path").attr("class","zoombox-corners").attr("transform",x(B.x0,B.y0)).style({fill:p.background,stroke:p.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),B.clearOutline(H)}function gt(Ht,Ut){return 1-Ut/B.h}function Tt(Ht,Ut){return 1-(Ht+(B.h-Ut)/Math.sqrt(3))/B.w}function wt(Ht,Ut){return(Ht-(B.h-Ut)/Math.sqrt(3))/B.w}function Rt(Ht,Ut){var kt=it+Ht*j,Vt=ut+Ut*et,It=Math.max(0,Math.min(1,gt(it,ut),gt(kt,Vt))),re=Math.max(0,Math.min(1,Tt(it,ut),Tt(kt,Vt))),Kt=Math.max(0,Math.min(1,wt(it,ut),wt(kt,Vt))),$t=(It/2+Kt)*B.w,le=(1-It/2-re)*B.w,he=($t+le)/2,de=le-$t,xe=(1-It)*B.h,Se=xe-de/T;de<_.MINZOOM?(tt=J,$.attr("d",Q),Z.attr("d","M0,0Z")):(tt={a:J.a+It*X,b:J.b+re*X,c:J.c+Kt*X},$.attr("d",Q+"M"+$t+","+xe+"H"+le+"L"+he+","+Se+"L"+$t+","+xe+"Z"),Z.attr("d","M"+it+","+ut+N+"M"+$t+","+xe+M+"M"+le+","+xe+z+"M"+he+","+Se+D)),ot||($.transition().style("fill",V>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),ot=!0),H.emit("plotly_relayouting",st(tt))}function bt(){k(H),tt!==J&&(i.call("_guiRelayout",H,st(tt)),I&&H.data&&H._context.showTips&&(S.notifier(v(H,"Double-click to zoom back out"),"long"),I=!1))}function At(){J={a:B.aaxis.range[0],b:B.baxis.range[1],c:B.caxis.range[1]},tt=J}function mt(Ht,Ut){var kt=Ht/B.xaxis._m,Vt=Ut/B.yaxis._m;tt={a:J.a-Vt,b:J.b+(kt+Vt)/2,c:J.c-(kt-Vt)/2};var It=[tt.a,tt.b,tt.c].sort(S.sorterAsc),re={a:It.indexOf(tt.a),b:It.indexOf(tt.b),c:It.indexOf(tt.c)};It[0]<0&&(It[1]+It[0]/2<0?(It[2]+=It[0]+It[1],It[0]=It[1]=0):(It[2]+=It[0]/2,It[1]+=It[0]/2,It[0]=0),tt={a:It[re.a],b:It[re.b],c:It[re.c]},Ut=(J.a-tt.a)*B.yaxis._m,Ht=(J.c-tt.c-J.b+tt.b)*B.xaxis._m);var Kt=x(B.x0+Ht,B.y0+Ut);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Kt);var $t=x(-Ht,-Ut);B.clipDefRelative.select("path").attr("transform",$t),B.aaxis.range=[tt.a,B.sum-tt.b-tt.c],B.baxis.range=[B.sum-tt.a-tt.c,tt.b],B.caxis.range=[B.sum-tt.a-tt.b,tt.c],B.drawAxes(!1),B._hasClipOnAxisFalse&&B.plotContainer.select(".scatterlayer").selectAll(".trace").call(r.hideOutsideRangePoints,B),H.emit("plotly_relayouting",st(tt))}function Lt(){i.call("_guiRelayout",H,st(tt))}O.onmousemove=function(Ht){l.hover(H,Ht,B.id),H._fullLayout._lasthover=O,H._fullLayout._hoversubplot=B.id},O.onmouseout=function(Ht){H._dragging||c.unhover(H,Ht)},c.init(this.dragOptions)};function k(B){g.select(B).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}},24040:function(G,U,t){var g=t(24248),C=t(16628),i=t(52416),S=t(63620),x=t(52200).addStyleRule,v=t(92880),p=t(45464),r=t(64859),e=v.extendFlat,a=v.extendDeepAll;U.modules={},U.allCategories={},U.allTypes=[],U.subplotsRegistry={},U.transformsRegistry={},U.componentsRegistry={},U.layoutArrayContainers=[],U.layoutArrayRegexes=[],U.traceLayoutAttributes={},U.localeRegistry={},U.apiMethodRegistry={},U.collectableSubplotTypes=null,U.register=function(A){if(U.collectableSubplotTypes=null,A)A&&!Array.isArray(A)&&(A=[A]);else throw new Error("No argument passed to Plotly.register.");for(var _=0;_-1}G.exports=function(r,e){var a,n=r.data,f=r.layout,c=S([],n),l=S({},f,x(e.tileClass)),m=r._context||{};if(e.width&&(l.width=e.width),e.height&&(l.height=e.height),e.tileClass==="thumbnail"||e.tileClass==="themes__thumb"){l.annotations=[];var h=Object.keys(l);for(a=0;a")!==-1?"":f.html(l).text()});return f.remove(),c}function a(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}G.exports=function(f,c,l){var m=f._fullLayout,h=m._paper,b=m._toppaper,u=m.width,o=m.height,d;h.insert("rect",":first-child").call(i.setRect,0,0,u,o).call(S.fill,m.paper_bgcolor);var w=m._basePlotModules||[];for(d=0;dH+B||!g(O))}for(var j=0;j=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&g(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function l(m,h,b,u,o,d){d=d||{};var w=d.moduleHasSelected!==!1,A=d.moduleHasUnselected!==!1,_=d.moduleHasConstrain!==!1,y=d.moduleHasCliponaxis!==!1,E=d.moduleHasTextangle!==!1,T=d.moduleHasInsideanchor!==!1,s=!!d.hasPathbar,L=Array.isArray(o)||o==="auto",M=L||o==="inside",z=L||o==="outside";if(M||z){var D=a(u,"textfont",b.font),N=C.extendFlat({},D),I=m.textfont&&m.textfont.color,k=!I;if(k&&delete N.color,a(u,"insidetextfont",N),s){var B=C.extendFlat({},D);k&&delete B.color,a(u,"pathbar.textfont",B)}z&&a(u,"outsidetextfont",D),w&&u("selected.textfont.color"),A&&u("unselected.textfont.color"),_&&u("constraintext"),y&&u("cliponaxis"),E&&u("textangle"),u("texttemplate")}M&&T&&u("insidetextanchor")}G.exports={supplyDefaults:n,crossTraceDefaults:f,handleText:l,validateCornerradius:c}},52160:function(G){G.exports=function(t,g,C){return t.x="xVal"in g?g.xVal:g.x,t.y="yVal"in g?g.yVal:g.y,g.xa&&(t.xaxis=g.xa),g.ya&&(t.yaxis=g.ya),C.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}},60444:function(G,U,t){var g=t(38248),C=t(49760),i=t(3400).isArrayOrTypedArray;U.coerceString=function(S,x,v){if(typeof x=="string"){if(x||!S.noBlank)return x}else if((typeof x=="number"||x===!0)&&!S.strict)return String(x);return v!==void 0?v:S.dflt},U.coerceNumber=function(S,x,v){if(g(x)){x=+x;var p=S.min,r=S.max,e=p!==void 0&&xr;if(!e)return x}return v!==void 0?v:S.dflt},U.coerceColor=function(S,x,v){return C(x).isValid()?x:v!==void 0?v:S.dflt},U.coerceEnumerated=function(S,x,v){return S.coerceNumber&&(x=+x),S.values.indexOf(x)!==-1?x:v!==void 0?v:S.dflt},U.getValue=function(S,x){var v;return i(S)?x0?gt+=Tt:y<0&&(gt-=Tt)}return gt}function ut(ct){var gt=y,Tt=ct.b,wt=it(ct);return g.inbox(Tt-gt,wt-gt,w+(wt-gt)/(wt-Tt)-1)}function J(ct){var gt=y,Tt=ct.b,wt=it(ct);return g.inbox(Tt-gt,wt-gt,A+(wt-gt)/(wt-Tt)-1)}var X=n[E+"a"],tt=n[T+"a"];M=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function V(ct){return(s(ct)+L(ct))/2}var Q=g.getDistanceFunction(l,s,L,V);if(g.getClosest(h,Q,n),n.index!==!1&&h[n.index].p!==p){D||(O=function(ct){return Math.min(N(ct),ct.p-u.bargroupwidth/2)},H=function(ct){return Math.max(I(ct),ct.p+u.bargroupwidth/2)});var ot=n.index,$=h[ot],Z=b.base?$.b+$.s:$.s;n[T+"0"]=n[T+"1"]=tt.c2p($[T],!0),n[T+"LabelVal"]=Z;var st=u.extents[u.extents.round($.p)];n[E+"0"]=X.c2p(o?O($):st[0],!0),n[E+"1"]=X.c2p(o?H($):st[1],!0);var nt=$.orig_p!==void 0;return n[E+"LabelVal"]=nt?$.orig_p:$.p,n.labelLabel=v(X,n[E+"LabelVal"],b[E+"hoverformat"]),n.valueLabel=v(tt,n[T+"LabelVal"],b[T+"hoverformat"]),n.baseLabel=v(tt,$.b,b[T+"hoverformat"]),n.spikeDistance=(J($)+et($))/2,n[E+"Spike"]=X.c2p($.p,!0),S($,b,n),n.hovertemplate=b.hovertemplate,n}}function a(n,f){var c=f.mcc||n.marker.color,l=f.mlcc||n.marker.line.color,m=x(n,f);if(i.opacity(c))return c;if(i.opacity(l)&&m)return l}G.exports={hoverPoints:r,hoverOnBars:e,getTraceColor:a}},51132:function(G,U,t){G.exports={attributes:t(20832),layoutAttributes:t(39324),supplyDefaults:t(31508).supplyDefaults,crossTraceDefaults:t(31508).crossTraceDefaults,supplyLayoutDefaults:t(37156),calc:t(71820),crossTraceCalc:t(96376).crossTraceCalc,colorbar:t(5528),arraysToCalcdata:t(84664),plot:t(98184).plot,style:t(60100).style,styleOnSelect:t(60100).styleOnSelect,hoverPoints:t(63400).hoverPoints,eventData:t(52160),selectPoints:t(45784),moduleType:"trace",name:"bar",basePlotModule:t(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(G){G.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(G,U,t){var g=t(24040),C=t(54460),i=t(3400),S=t(39324),x=t(31508).validateCornerradius;G.exports=function(v,p,r){function e(d,w){return i.coerce(v,p,S,d,w)}for(var a=!1,n=!1,f=!1,c={},l=e("barmode"),m=0;m0)-(j<0)}function _(j,et){return j0}function s(j,et,it,ut,J,X){var tt=et.xaxis,V=et.yaxis,Q=j._fullLayout,ot=j._context.staticPlot;J||(J={mode:Q.barmode,norm:Q.barmode,gap:Q.bargap,groupgap:Q.bargroupgap},n("bar",Q));var $=i.makeTraceGroups(ut,it,"trace bars").each(function(Z){var st=g.select(this),nt=Z[0].trace,ct=Z[0].t,gt=nt.type==="waterfall",Tt=nt.type==="funnel",wt=nt.type==="histogram",Rt=nt.type==="bar",bt=Rt||Tt,At=0;gt&&nt.connector.visible&&nt.connector.mode==="between"&&(At=nt.connector.line.width/2);var mt=nt.orientation==="h",Lt=T(J),Ht=i.ensureSingle(st,"g","points"),Ut=w(nt),kt=Ht.selectAll("g.point").data(i.identity,Ut);kt.enter().append("g").classed("point",!0),kt.exit().remove(),kt.each(function(It,re){var Kt=g.select(this),$t=y(It,tt,V,mt),le=$t[0][0],he=$t[0][1],de=$t[1][0],xe=$t[1][1],Se=(mt?he-le:xe-de)===0;Se&&bt&&c.getLineWidth(nt,It)&&(Se=!1),Se||(Se=!C(le)||!C(he)||!C(de)||!C(xe)),It.isBlank=Se,Se&&(mt?he=le:xe=de),At&&!Se&&(mt?(le-=_(le,he)*At,he+=_(le,he)*At):(de-=_(de,xe)*At,xe+=_(de,xe)*At));var ne,zt;if(nt.type==="waterfall"){if(!Se){var Xt=nt[It.dir].marker;ne=Xt.line.width,zt=Xt.color}}else ne=c.getLineWidth(nt,It),zt=It.mc||nt.marker.color;function Jt(se){var Ae=g.round(ne/2%1,2);return J.gap===0&&J.groupgap===0?g.round(Math.round(se)-Ae,2):se}function Wt(se,Ae,Ce){return Ce&&se===Ae?se:Math.abs(se-Ae)>=2?Jt(se):se>Ae?Math.ceil(se):Math.floor(se)}var Ft=x.opacity(zt),xt=Ft<1||ne>.01?Jt:Wt;j._context.staticPlot||(le=xt(le,he,mt),he=xt(he,le,mt),de=xt(de,xe,!mt),xe=xt(xe,de,!mt));var yt=mt?tt.c2p:V.c2p,Et;It.s0>0?Et=It._sMax:It.s0<0?Et=It._sMin:Et=It.s1>0?It._sMax:It._sMin;function Mt(se,Ae){if(!se)return 0;var Ce=Math.abs(mt?xe-de:he-le),Ie=Math.abs(mt?he-le:xe-de),Pe=xt(Math.abs(yt(Et,!0)-yt(0,!0))),ke=It.hasB?Math.min(Ce/2,Ie/2):Math.min(Ce/2,Pe),Ve;if(Ae==="%"){var Je=Math.min(50,se);Ve=Ce*(Je/100)}else Ve=se;return xt(Math.max(Math.min(Ve,ke),0))}var Nt=Rt||wt?Mt(ct.cornerradiusvalue,ct.cornerradiusform):0,jt,ie,me="M"+le+","+de+"V"+xe+"H"+he+"V"+de+"Z",be=0;if(Nt&&It.s){var ve=A(It.s0)===0||A(It.s)===A(It.s0)?It.s1:It.s0;if(be=xt(It.hasB?0:Math.abs(yt(Et,!0)-yt(ve,!0))),be0?Math.sqrt(be*(2*Nt-be)):0,pe=Le>0?Math.max:Math.min;jt="M"+le+","+de+"V"+(xe-Be*ce)+"H"+pe(he-(Nt-be)*Le,le)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+he+","+(xe-Nt*ce-ir)+"V"+(de+Nt*ce+ir)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+pe(he-(Nt-be)*Le,le)+","+(de+Be*ce)+"Z"}else if(It.hasB)jt="M"+(le+Nt*Le)+","+de+"A "+Nt+","+Nt+" 0 0 "+Te+" "+le+","+(de+Nt*ce)+"V"+(xe-Nt*ce)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(le+Nt*Le)+","+xe+"H"+(he-Nt*Le)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+he+","+(xe-Nt*ce)+"V"+(de+Nt*ce)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(he-Nt*Le)+","+de+"Z";else{ie=Math.abs(xe-de)+be;var Xe=ie0?Math.sqrt(be*(2*Nt-be)):0,or=ce>0?Math.max:Math.min;jt="M"+(le+Xe*Le)+","+de+"V"+or(xe-(Nt-be)*ce,de)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(le+Nt*Le-Ke)+","+xe+"H"+(he-Nt*Le+Ke)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(he-Xe*Le)+","+or(xe-(Nt-be)*ce,de)+"V"+de+"Z"}}else jt=me}else jt=me;var $e=E(i.ensureSingle(Kt,"path"),Q,J,X);if($e.style("vector-effect",ot?"none":"non-scaling-stroke").attr("d",isNaN((he-le)*(xe-de))||Se&&j._context.staticPlot?"M0,0Z":jt).call(v.setClipUrl,et.layerClipId,j),!Q.uniformtext.mode&&Lt){var ge=v.makePointStyleFns(nt);v.singlePointStyle(It,$e,nt,ge,j)}L(j,et,Kt,Z,re,le,he,de,xe,Nt,be,J,X),et.layerClipId&&v.hideOutsideRangePoint(It,Kt.select("text"),tt,V,nt.xcalendar,nt.ycalendar)});var Vt=nt.cliponaxis===!1;v.setClipUrl(st,Vt?null:et.layerClipId,j)});p.getComponentMethod("errorbars","plot")(j,$,et,J)}function L(j,et,it,ut,J,X,tt,V,Q,ot,$,Z,st){var nt=et.xaxis,ct=et.yaxis,gt=j._fullLayout,Tt;function wt(ie,me,be){var ve=i.ensureSingle(ie,"text").text(me).attr({class:"bartext bartext-"+Tt,"text-anchor":"middle","data-notex":1}).call(v.font,be).call(S.convertToTspans,j);return ve}var Rt=ut[0].trace,bt=Rt.orientation==="h",At=B(gt,ut,J,nt,ct);Tt=O(Rt,J);var mt=Z.mode==="stack"||Z.mode==="relative",Lt=ut[J],Ht=!mt||Lt._outmost,Ut=Lt.hasB,kt=ot&&ot-$>o;if(!At||Tt==="none"||(Lt.isBlank||X===tt||V===Q)&&(Tt==="auto"||Tt==="inside")){it.select("text").remove();return}var Vt=gt.font,It=f.getBarColor(ut[J],Rt),re=f.getInsideTextFont(Rt,J,Vt,It),Kt=f.getOutsideTextFont(Rt,J,Vt),$t=Rt.insidetextanchor||"end",le=it.datum();bt?nt.type==="log"&&le.s0<=0&&(nt.range[0]0&&Jt>0,xt;kt?Ut?xt=M(xe-2*ot,Se,Xt,Jt,bt)||M(xe,Se-2*ot,Xt,Jt,bt):bt?xt=M(xe-(ot-$),Se,Xt,Jt,bt)||M(xe,Se-2*(ot-$),Xt,Jt,bt):xt=M(xe,Se-(ot-$),Xt,Jt,bt)||M(xe-2*(ot-$),Se,Xt,Jt,bt):xt=M(xe,Se,Xt,Jt,bt),Ft&&xt?Tt="inside":(Tt="outside",ne.remove(),ne=null)}else Tt="inside";if(!ne){Wt=i.ensureUniformFontSize(j,Tt==="outside"?Kt:re),ne=wt(it,At,Wt);var yt=ne.attr("transform");if(ne.attr("transform",""),zt=v.bBox(ne.node()),Xt=zt.width,Jt=zt.height,ne.attr("transform",yt),Xt<=0||Jt<=0){ne.remove();return}}var Et=Rt.textangle,Mt,Nt;Tt==="outside"?(Nt=Rt.constraintext==="both"||Rt.constraintext==="outside",Mt=k(X,tt,V,Q,zt,{isHorizontal:bt,constrained:Nt,angle:Et})):(Nt=Rt.constraintext==="both"||Rt.constraintext==="inside",Mt=N(X,tt,V,Q,zt,{isHorizontal:bt,constrained:Nt,angle:Et,anchor:$t,hasB:Ut,r:ot,overhead:$})),Mt.fontSize=Wt.size,a(Rt.type==="histogram"?"bar":Rt.type,Mt,gt),Lt.transform=Mt;var jt=E(ne,gt,Z,st);i.setTransormAndDisplay(jt,Mt)}function M(j,et,it,ut,J){if(j<0||et<0)return!1;var X=it<=j&&ut<=et,tt=it<=et&&ut<=j,V=J?j>=it*(et/ut):et>=ut*(j/it);return X||tt||V}function z(j){return j==="auto"?0:j}function D(j,et){var it=Math.PI/180*et,ut=Math.abs(Math.sin(it)),J=Math.abs(Math.cos(it));return{x:j.width*J+j.height*ut,y:j.width*ut+j.height*J}}function N(j,et,it,ut,J,X){var tt=!!X.isHorizontal,V=!!X.constrained,Q=X.angle||0,ot=X.anchor,$=ot==="end",Z=ot==="start",st=X.leftToRight||0,nt=(st+1)/2,ct=1-nt,gt=X.hasB,Tt=X.r,wt=X.overhead,Rt=J.width,bt=J.height,At=Math.abs(et-j),mt=Math.abs(ut-it),Lt=At>2*o&&mt>2*o?o:0;At-=2*Lt,mt-=2*Lt;var Ht=z(Q);Q==="auto"&&!(Rt<=At&&bt<=mt)&&(Rt>At||bt>mt)&&(!(Rt>mt||bt>At)||Rto){var It=I(j,et,it,ut,Ut,Tt,wt,tt,gt);kt=It.scale,Vt=It.pad}else kt=1,V&&(kt=Math.min(1,At/Ut.x,mt/Ut.y)),Vt=0;var re=J.left*ct+J.right*nt,Kt=(J.top+J.bottom)/2,$t=(j+o)*ct+(et-o)*nt,le=(it+ut)/2,he=0,de=0;if(Z||$){var xe=(tt?Ut.x:Ut.y)/2;Tt&&($||gt)&&(Lt+=Vt);var Se=tt?_(j,et):_(it,ut);tt?Z?($t=j+Se*Lt,he=-Se*xe):($t=et-Se*Lt,he=Se*xe):Z?(le=it+Se*Lt,de=-Se*xe):(le=ut-Se*Lt,de=Se*xe)}return{textX:re,textY:Kt,targetX:$t,targetY:le,anchorX:he,anchorY:de,scale:kt,rotate:Ht}}function I(j,et,it,ut,J,X,tt,V,Q){var ot=Math.max(0,Math.abs(et-j)-2*o),$=Math.max(0,Math.abs(ut-it)-2*o),Z=X-o,st=tt?Z-Math.sqrt(Z*Z-(Z-tt)*(Z-tt)):Z,nt=Q?Z*2:V?Z-tt:2*st,ct=Q?Z*2:V?2*st:Z-tt,gt,Tt,wt,Rt,bt;return J.y/J.x>=$/(ot-nt)?Rt=$/J.y:J.y/J.x<=($-ct)/ot?Rt=ot/J.x:!Q&&V?(gt=J.x*J.x+J.y*J.y/4,Tt=-2*J.x*(ot-Z)-J.y*($/2-Z),wt=(ot-Z)*(ot-Z)+($/2-Z)*($/2-Z)-Z*Z,Rt=(-Tt+Math.sqrt(Tt*Tt-4*gt*wt))/(2*gt)):Q?(gt=(J.x*J.x+J.y*J.y)/4,Tt=-J.x*(ot/2-Z)-J.y*($/2-Z),wt=(ot/2-Z)*(ot/2-Z)+($/2-Z)*($/2-Z)-Z*Z,Rt=(-Tt+Math.sqrt(Tt*Tt-4*gt*wt))/(2*gt)):(gt=J.x*J.x/4+J.y*J.y,Tt=-J.x*(ot/2-Z)-2*J.y*($-Z),wt=(ot/2-Z)*(ot/2-Z)+($-Z)*($-Z)-Z*Z,Rt=(-Tt+Math.sqrt(Tt*Tt-4*gt*wt))/(2*gt)),Rt=Math.min(1,Rt),V?bt=Math.max(0,Z-Math.sqrt(Math.max(0,Z*Z-(Z-($-J.y*Rt)/2)*(Z-($-J.y*Rt)/2)))-tt):bt=Math.max(0,Z-Math.sqrt(Math.max(0,Z*Z-(Z-(ot-J.x*Rt)/2)*(Z-(ot-J.x*Rt)/2)))-tt),{scale:Rt,pad:bt}}function k(j,et,it,ut,J,X){var tt=!!X.isHorizontal,V=!!X.constrained,Q=X.angle||0,ot=J.width,$=J.height,Z=Math.abs(et-j),st=Math.abs(ut-it),nt;tt?nt=st>2*o?o:0:nt=Z>2*o?o:0;var ct=1;V&&(ct=tt?Math.min(1,st/$):Math.min(1,Z/ot));var gt=z(Q),Tt=D(J,gt),wt=(tt?Tt.x:Tt.y)/2,Rt=(J.left+J.right)/2,bt=(J.top+J.bottom)/2,At=(j+et)/2,mt=(it+ut)/2,Lt=0,Ht=0,Ut=tt?_(et,j):_(it,ut);return tt?(At=et-Ut*nt,Lt=Ut*wt):(mt=ut+Ut*nt,Ht=-Ut*wt),{textX:Rt,textY:bt,targetX:At,targetY:mt,anchorX:Lt,anchorY:Ht,scale:ct,rotate:gt}}function B(j,et,it,ut,J){var X=et[0].trace,tt=X.texttemplate,V;return tt?V=H(j,et,it,ut,J):X.textinfo?V=Y(et,it,ut,J):V=c.getValue(X.text,it),c.coerceString(h,V)}function O(j,et){var it=c.getValue(j.textposition,et);return c.coerceEnumerated(b,it)}function H(j,et,it,ut,J){var X=et[0].trace,tt=i.castOption(X,it,"texttemplate");if(!tt)return"";var V=X.type==="histogram",Q=X.type==="waterfall",ot=X.type==="funnel",$=X.orientation==="h",Z,st,nt,ct;$?(Z="y",st=J,nt="x",ct=ut):(Z="x",st=ut,nt="y",ct=J);function gt(Lt){return r(st,st.c2l(Lt),!0).text}function Tt(Lt){return r(ct,ct.c2l(Lt),!0).text}var wt=et[it],Rt={};Rt.label=wt.p,Rt.labelLabel=Rt[Z+"Label"]=gt(wt.p);var bt=i.castOption(X,wt.i,"text");(bt===0||bt)&&(Rt.text=bt),Rt.value=wt.s,Rt.valueLabel=Rt[nt+"Label"]=Tt(wt.s);var At={};u(At,X,wt.i),(V||At.x===void 0)&&(At.x=$?Rt.value:Rt.label),(V||At.y===void 0)&&(At.y=$?Rt.label:Rt.value),(V||At.xLabel===void 0)&&(At.xLabel=$?Rt.valueLabel:Rt.labelLabel),(V||At.yLabel===void 0)&&(At.yLabel=$?Rt.labelLabel:Rt.valueLabel),Q&&(Rt.delta=+wt.rawS||wt.s,Rt.deltaLabel=Tt(Rt.delta),Rt.final=wt.v,Rt.finalLabel=Tt(Rt.final),Rt.initial=Rt.final-Rt.delta,Rt.initialLabel=Tt(Rt.initial)),ot&&(Rt.value=wt.s,Rt.valueLabel=Tt(Rt.value),Rt.percentInitial=wt.begR,Rt.percentInitialLabel=i.formatPercent(wt.begR),Rt.percentPrevious=wt.difR,Rt.percentPreviousLabel=i.formatPercent(wt.difR),Rt.percentTotal=wt.sumR,Rt.percenTotalLabel=i.formatPercent(wt.sumR));var mt=i.castOption(X,wt.i,"customdata");return mt&&(Rt.customdata=mt),i.texttemplateString(tt,Rt,j._d3locale,At,Rt,X._meta||{})}function Y(j,et,it,ut){var J=j[0].trace,X=J.orientation==="h",tt=J.type==="waterfall",V=J.type==="funnel";function Q(mt){var Lt=X?ut:it;return r(Lt,mt,!0).text}function ot(mt){var Lt=X?it:ut;return r(Lt,+mt,!0).text}var $=J.textinfo,Z=j[et],st=$.split("+"),nt=[],ct,gt=function(mt){return st.indexOf(mt)!==-1};if(gt("label")&&nt.push(Q(j[et].p)),gt("text")&&(ct=i.castOption(J,Z.i,"text"),(ct===0||ct)&&nt.push(ct)),tt){var Tt=+Z.rawS||Z.s,wt=Z.v,Rt=wt-Tt;gt("initial")&&nt.push(ot(Rt)),gt("delta")&&nt.push(ot(Tt)),gt("final")&&nt.push(ot(wt))}if(V){gt("value")&&nt.push(ot(Z.s));var bt=0;gt("percent initial")&&bt++,gt("percent previous")&&bt++,gt("percent total")&&bt++;var At=bt>1;gt("percent initial")&&(ct=i.formatPercent(Z.begR),At&&(ct+=" of initial"),nt.push(ct)),gt("percent previous")&&(ct=i.formatPercent(Z.difR),At&&(ct+=" of previous"),nt.push(ct)),gt("percent total")&&(ct=i.formatPercent(Z.sumR),At&&(ct+=" of total"),nt.push(ct))}return nt.join("
    ")}G.exports={plot:s,toMoveInsideBar:N}},45784:function(G){G.exports=function(g,C){var i=g.cd,S=g.xaxis,x=g.yaxis,v=i[0].trace,p=v.type==="funnel",r=v.orientation==="h",e=[],a;if(C===!1)for(a=0;a1||s.bargap===0&&s.bargroupgap===0&&!L[0].trace.marker.line.width)&&g.select(this).attr("shape-rendering","crispEdges")}),E.selectAll("g.points").each(function(L){var M=g.select(this),z=L[0].trace;c(M,z,y)}),x.getComponentMethod("errorbars","style")(E)}function c(y,E,T){i.pointStyle(y.selectAll("path"),E,T),l(y,E,T)}function l(y,E,T){y.selectAll("text").each(function(s){var L=g.select(this),M=S.ensureUniformFontSize(T,u(L,s,E,T));i.font(L,M)})}function m(y,E,T){var s=E[0].trace;s.selectedpoints?h(T,s,y):(c(T,s,y),x.getComponentMethod("errorbars","style")(T))}function h(y,E,T){i.selectedPointStyle(y.selectAll("path"),E),b(y.selectAll("text"),E,T)}function b(y,E,T){y.each(function(s){var L=g.select(this),M;if(s.selected){M=S.ensureUniformFontSize(T,u(L,s,E,T));var z=E.selected.textfont&&E.selected.textfont.color;z&&(M.color=z),i.font(L,M)}else i.selectedTextStyle(L,E)})}function u(y,E,T,s){var L=s._fullLayout.font,M=T.textfont;if(y.classed("bartext-inside")){var z=_(E,T);M=d(T,E.i,L,z)}else y.classed("bartext-outside")&&(M=w(T,E.i,L));return M}function o(y,E,T){return A(r,y.textfont,E,T)}function d(y,E,T,s){var L=o(y,E,T),M=y._input.textfont===void 0||y._input.textfont.color===void 0||Array.isArray(y.textfont.color)&&y.textfont.color[E]===void 0;return M&&(L={color:C.contrast(s),family:L.family,size:L.size}),A(e,y.insidetextfont,E,L)}function w(y,E,T){var s=o(y,E,T);return A(a,y.outsidetextfont,E,s)}function A(y,E,T,s){E=E||{};var L=n.getValue(E.family,T),M=n.getValue(E.size,T),z=n.getValue(E.color,T);return{family:n.coerceString(y.family,L,s.family),size:n.coerceNumber(y.size,M,s.size),color:n.coerceColor(y.color,z,s.color)}}function _(y,E){return E.type==="waterfall"?E[y.dir].marker.color:y.mcc||y.mc||E.marker.color}G.exports={style:f,styleTextPoints:l,styleOnSelect:m,getInsideTextFont:d,getOutsideTextFont:w,getBarColor:_,resizeText:v}},55592:function(G,U,t){var g=t(76308),C=t(94288).hasColorscale,i=t(27260),S=t(3400).coercePattern;G.exports=function(v,p,r,e,a){var n=r("marker.color",e),f=C(v,"marker");f&&i(v,p,a,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",g.defaultLine),C(v,"marker.line")&&i(v,p,a,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),S(r,"marker.pattern",n,f),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(G,U,t){var g=t(33428),C=t(3400);function i(p,r,e){var a=p._fullLayout,n=a["_"+e+"Text_minsize"];if(n){var f=a.uniformtext.mode==="hide",c;switch(e){case"funnelarea":case"pie":case"sunburst":c="g.slice";break;case"treemap":case"icicle":c="g.slice, g.pathbar";break;default:c="g.points > g.point"}r.selectAll(c).each(function(l){var m=l.transform;if(m){m.scale=f&&m.hide?0:n/m.fontSize;var h=g.select(this).select("text");C.setTransormAndDisplay(h,m)}})}}function S(p,r,e){if(e.uniformtext.mode){var a=v(p),n=e.uniformtext.minsize,f=r.scale*r.fontSize;r.hide=fl.range[1]&&(w+=Math.PI);var A=function(T){return b(d,w,[T.rp0,T.rp1],[T.thetag0,T.thetag1],h)?u+Math.min(1,Math.abs(T.thetag1-T.thetag0)/o)-1+(T.rp1-d)/(T.rp1-T.rp0)-1:1/0};if(g.getClosest(n,A,r),r.index!==!1){var _=r.index,y=n[_];r.x0=r.x1=y.ct[0],r.y0=r.y1=y.ct[1];var E=C.extendFlat({},y,{r:y.s,theta:y.p});return S(y,f,r),x(E,f,c,r),r.hovertemplate=f.hovertemplate,r.color=i(f,y),r.xLabelVal=r.yLabelVal=void 0,y.s<0&&(r.idealAlign="left"),[r]}}},94456:function(G,U,t){G.exports={moduleType:"trace",name:"barpolar",basePlotModule:t(40872),categories:["polar","bar","showLegend"],attributes:t(78100),layoutAttributes:t(9320),supplyDefaults:t(70384),supplyLayoutDefaults:t(89580),calc:t(47056).calc,crossTraceCalc:t(47056).crossTraceCalc,plot:t(42040),colorbar:t(5528),formatLabels:t(22852),style:t(60100).style,styleOnSelect:t(60100).styleOnSelect,hoverPoints:t(68896),selectPoints:t(45784),meta:{}}},9320:function(G){G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(G,U,t){var g=t(3400),C=t(9320);G.exports=function(i,S,x){var v={},p;function r(n,f){return g.coerce(i[p]||{},S[p],C,n,f)}for(var e=0;e0?(l=f,m=c):(l=c,m=f);var h=x.findEnclosingVertexAngles(l,p.vangles)[0],b=x.findEnclosingVertexAngles(m,p.vangles)[1],u=[h,(l+m)/2,b];return x.pathPolygonAnnulus(a,n,l,m,u,r,e)}:function(a,n,f,c){return i.pathAnnulus(a,n,f,c,r,e)}}},63188:function(G,U,t){var g=t(98304),C=t(52904),i=t(20832),S=t(22548),x=t(29736).axisHoverFormat,v=t(21776).Ks,p=t(92880).extendFlat,r=C.marker,e=r.line;G.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:C.xperiod,yperiod:C.yperiod,xperiod0:C.xperiod0,yperiod0:C.yperiod0,xperiodalignment:C.xperiodalignment,yperiodalignment:C.yperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:p({},r.symbol,{arrayOk:!1,editType:"plot"}),opacity:p({},r.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:p({},r.angle,{arrayOk:!1,editType:"calc"}),size:p({},r.size,{arrayOk:!1,editType:"calc"}),color:p({},r.color,{arrayOk:!1,editType:"style"}),line:{color:p({},e.color,{arrayOk:!1,dflt:S.defaultLine,editType:"style"}),width:p({},e.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:g(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:C.selected.marker,editType:"style"},unselected:{marker:C.unselected.marker,editType:"style"},text:p({},C.text,{}),hovertext:p({},C.hovertext,{}),hovertemplate:v({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},62555:function(G,U,t){var g=t(38248),C=t(54460),i=t(1220),S=t(3400),x=t(39032).BADNUM,v=S._;G.exports=function(w,A){var _=w._fullLayout,y=C.getFromId(w,A.xaxis||"x"),E=C.getFromId(w,A.yaxis||"y"),T=[],s=A.type==="violin"?"_numViolins":"_numBoxes",L,M,z,D,N,I,k;A.orientation==="h"?(z=y,D="x",N=E,I="y",k=!!A.yperiodalignment):(z=E,D="y",N=y,I="x",k=!!A.xperiodalignment);var B=p(A,I,N,_[s]),O=B[0],H=B[1],Y=S.distinctVals(O,N),j=Y.vals,et=Y.minDiff/2,it,ut,J,X,tt,V,Q=(A.boxpoints||A.points)==="all"?S.identity:function(Se){return Se.vit.uf};if(A._hasPreCompStats){var ot=A[D],$=function(Se){return z.d2c((A[Se]||[])[L])},Z=1/0,st=-1/0;for(L=0;L=it.q1&&it.q3>=it.med){var ct=$("lowerfence");it.lf=ct!==x&&ct<=it.q1?ct:m(it,J,X);var gt=$("upperfence");it.uf=gt!==x&>>=it.q3?gt:h(it,J,X);var Tt=$("mean");it.mean=Tt!==x?Tt:X?S.mean(J,X):(it.q1+it.q3)/2;var wt=$("sd");it.sd=Tt!==x&&wt>=0?wt:X?S.stdev(J,X,it.mean):it.q3-it.q1,it.lo=b(it),it.uo=u(it);var Rt=$("notchspan");Rt=Rt!==x&&Rt>0?Rt:o(it,X),it.ln=it.med-Rt,it.un=it.med+Rt;var bt=it.lf,At=it.uf;A.boxpoints&&J.length&&(bt=Math.min(bt,J[0]),At=Math.max(At,J[X-1])),A.notched&&(bt=Math.min(bt,it.ln),At=Math.max(At,it.un)),it.min=bt,it.max=At}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+it.q1,"median = "+it.med,"q3 = "+it.q3].join(` -`));var mt;it.med!==x?mt=it.med:it.q1!==x?it.q3!==x?mt=(it.q1+it.q3)/2:mt=it.q1:it.q3!==x?mt=it.q3:mt=0,it.med=mt,it.q1=it.q3=mt,it.lf=it.uf=mt,it.mean=it.sd=mt,it.ln=it.un=mt,it.min=it.max=mt}Z=Math.min(Z,it.min),st=Math.max(st,it.max),it.pts2=ut.filter(Q),T.push(it)}}A._extremes[z._id]=C.findExtremes(z,[Z,st],{padded:!0})}else{var Lt=z.makeCalcdata(A,D),Ht=r(j,et),Ut=j.length,kt=e(Ut);for(L=0;L=0&&Vt0){if(it={},it.pos=it[I]=j[L],ut=it.pts=kt[L].sort(c),J=it[D]=ut.map(l),X=J.length,it.min=J[0],it.max=J[X-1],it.mean=S.mean(J,X),it.sd=S.stdev(J,X,it.mean)*A.sdmultiple,it.med=S.interp(J,.5),X%2&&($t||le)){var he,de;$t?(he=J.slice(0,X/2),de=J.slice(X/2+1)):le&&(he=J.slice(0,X/2+1),de=J.slice(X/2)),it.q1=S.interp(he,.5),it.q3=S.interp(de,.5)}else it.q1=S.interp(J,.25),it.q3=S.interp(J,.75);it.lf=m(it,J,X),it.uf=h(it,J,X),it.lo=b(it),it.uo=u(it);var xe=o(it,X);it.ln=it.med-xe,it.un=it.med+xe,It=Math.min(It,it.ln),re=Math.max(re,it.un),it.pts2=ut.filter(Q),T.push(it)}A.notched&&S.isTypedArray(Lt)&&(Lt=Array.from(Lt)),A._extremes[z._id]=C.findExtremes(z,A.notched?Lt.concat([It,re]):Lt,{padded:!0})}return f(T,A),T.length>0?(T[0].t={num:_[s],dPos:et,posLetter:I,valLetter:D,labels:{med:v(w,"median:"),min:v(w,"min:"),q1:v(w,"q1:"),q3:v(w,"q3:"),max:v(w,"max:"),mean:A.boxmean==="sd"||A.sizemode==="sd"?v(w,"mean ± σ:").replace("σ",A.sdmultiple===1?"σ":A.sdmultiple+"σ"):v(w,"mean:"),lf:v(w,"lower fence:"),uf:v(w,"upper fence:")}},_[s]++,T):[{t:{empty:!0}}]};function p(d,w,A,_){var y=w in d,E=w+"0"in d,T="d"+w in d;if(y||E&&T){var s=A.makeCalcdata(d,w),L=i(d,A,w,s).vals;return[L,s]}var M;E?M=d[w+"0"]:"name"in d&&(A.type==="category"||g(d.name)&&["linear","log"].indexOf(A.type)!==-1||S.isDateTime(d.name)&&A.type==="date")?M=d.name:M=_;for(var z=A.type==="multicategory"?A.r2c_just_indices(M):A.d2c(M,0,d[w+"calendar"]),D=d._length,N=new Array(D),I=0;I1,E=1-f[p+"gap"],T=1-f[p+"groupgap"];for(m=0;m0;if(z==="positive"?(it=D*(M?1:.5),X=J,ut=X=I):z==="negative"?(it=X=I,ut=D*(M?1:.5),tt=J):(it=ut=D,X=tt=J),st){var nt=s.pointpos,ct=s.jitter,gt=s.marker.size/2,Tt=0;nt+ct>=0&&(Tt=J*(nt+ct),Tt>it?(Z=!0,ot=gt,V=Tt):Tt>X&&(ot=gt,V=it)),Tt<=it&&(V=it);var wt=0;nt-ct<=0&&(wt=-J*(nt-ct),wt>ut?(Z=!0,$=gt,Q=wt):wt>tt&&($=gt,Q=ut)),wt<=ut&&(Q=ut)}else V=it,Q=ut;var Rt=new Array(b.length);for(h=0;h0?(z="v",E>0?D=Math.min(s,T):D=Math.min(T)):E>0?(z="h",D=Math.min(s)):D=0;if(!D){c.visible=!1;return}c._length=D;var O=l("orientation",z);c._hasPreCompStats?O==="v"&&E===0?(l("x0",0),l("dx",1)):O==="h"&&y===0&&(l("y0",0),l("dy",1)):O==="v"&&E===0?l("x0"):O==="h"&&y===0&&l("y0");var H=C.getComponentMethod("calendars","handleTraceDefaults");H(f,c,["x","y"],m)}function a(f,c,l,m){var h=m.prefix,b=g.coerce2(f,c,p,"marker.outliercolor"),u=l("marker.line.outliercolor"),o="outliers";c._hasPreCompStats?o="all":(b||u)&&(o="suspectedoutliers");var d=l(h+"points",o);d?(l("jitter",d==="all"?.3:0),l("pointpos",d==="all"?-1.5:0),l("marker.symbol"),l("marker.opacity"),l("marker.size"),l("marker.angle"),l("marker.color",c.line.color),l("marker.line.color"),l("marker.line.width"),d==="suspectedoutliers"&&(l("marker.line.outliercolor",c.marker.color),l("marker.line.outlierwidth")),l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size"),l("text"),l("hovertext")):delete c.marker;var w=l("hoveron");(w==="all"||w.indexOf("points")!==-1)&&l("hovertemplate"),g.coerceSelectionMarkerOpacity(c,l)}function n(f,c){var l,m;function h(o){return g.coerce(m._input,m,p,o)}for(var b=0;bA.lo&&(O.so=!0)}return y});w.enter().append("path").classed("point",!0),w.exit().remove(),w.call(i.translatePoints,l,m)}function e(a,n,f,c){var l=n.val,m=n.pos,h=!!m.rangebreaks,b=c.bPos,u=c.bPosPxOffset||0,o=f.boxmean||(f.meanline||{}).visible,d,w;Array.isArray(c.bdPos)?(d=c.bdPos[0],w=c.bdPos[1]):(d=c.bdPos,w=c.bdPos);var A=a.selectAll("path.mean").data(f.type==="box"&&f.boxmean||f.type==="violin"&&f.box.visible&&f.meanline.visible?C.identity:[]);A.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),A.exit().remove(),A.each(function(_){var y=m.c2l(_.pos+b,!0),E=m.l2p(y-d)+u,T=m.l2p(y+w)+u,s=h?(E+T)/2:m.l2p(y)+u,L=l.c2p(_.mean,!0),M=l.c2p(_.mean-_.sd,!0),z=l.c2p(_.mean+_.sd,!0);f.orientation==="h"?g.select(this).attr("d","M"+L+","+E+"V"+T+(o==="sd"?"m0,0L"+M+","+s+"L"+L+","+E+"L"+z+","+s+"Z":"")):g.select(this).attr("d","M"+E+","+L+"H"+T+(o==="sd"?"m0,0L"+s+","+M+"L"+E+","+L+"L"+s+","+z+"Z":""))})}G.exports={plot:v,plotBoxAndWhiskers:p,plotPoints:r,plotBoxMean:e}},8264:function(G){G.exports=function(t,g){var C=t.cd,i=t.xaxis,S=t.yaxis,x=[],v,p;if(g===!1)for(v=0;v=10)return null;for(var x=1/0,v=-1/0,p=i.length,r=0;r0?Math.floor:Math.ceil,k=D>0?Math.ceil:Math.floor,B=D>0?Math.min:Math.max,O=D>0?Math.max:Math.min,H=I(M+N),Y=k(z-N);f=L(M);var j=[[f]];for(v=H;v*D=0;S--)x[a-S]=t[n][S],v[a-S]=g[n][S];for(p.push({x,y:v,bicubic:r}),S=n,x=[],v=[];S>=0;S--)x[n-S]=t[S][0],v[n-S]=g[S][0];return p.push({x,y:v,bicubic:e}),p}},19216:function(G,U,t){var g=t(54460),C=t(92880).extendFlat;G.exports=function(S,x,v){var p,r,e,a,n,f,c,l,m,h,b,u,o,d,w=S["_"+x],A=S[x+"axis"],_=A._gridlines=[],y=A._minorgridlines=[],E=A._boundarylines=[],T=S["_"+v],s=S[v+"axis"];A.tickmode==="array"&&(A.tickvals=w.slice());var L=S._xctrl,M=S._yctrl,z=L[0].length,D=L.length,N=S._a.length,I=S._b.length;g.prepTicks(A),A.tickmode==="array"&&delete A.tickvals;var k=A.smoothing?3:1;function B(H){var Y,j,et,it,ut,J,X,tt,V,Q,ot,$,Z=[],st=[],nt={};if(x==="b")for(j=S.b2j(H),et=Math.floor(Math.max(0,Math.min(I-2,j))),it=j-et,nt.length=I,nt.crossLength=N,nt.xy=function(ct){return S.evalxy([],ct,j)},nt.dxy=function(ct,gt){return S.dxydi([],ct,et,gt,it)},Y=0;Y0&&(V=S.dxydi([],Y-1,et,0,it),Z.push(ut[0]+V[0]/3),st.push(ut[1]+V[1]/3),Q=S.dxydi([],Y-1,et,1,it),Z.push(tt[0]-Q[0]/3),st.push(tt[1]-Q[1]/3)),Z.push(tt[0]),st.push(tt[1]),ut=tt;else for(Y=S.a2i(H),J=Math.floor(Math.max(0,Math.min(N-2,Y))),X=Y-J,nt.length=N,nt.crossLength=I,nt.xy=function(ct){return S.evalxy([],Y,ct)},nt.dxy=function(ct,gt){return S.dxydj([],J,ct,X,gt)},j=0;j0&&(ot=S.dxydj([],J,j-1,X,0),Z.push(ut[0]+ot[0]/3),st.push(ut[1]+ot[1]/3),$=S.dxydj([],J,j-1,X,1),Z.push(tt[0]-$[0]/3),st.push(tt[1]-$[1]/3)),Z.push(tt[0]),st.push(tt[1]),ut=tt;return nt.axisLetter=x,nt.axis=A,nt.crossAxis=s,nt.value=H,nt.constvar=v,nt.index=l,nt.x=Z,nt.y=st,nt.smoothing=s.smoothing,nt}function O(H){var Y,j,et,it,ut,J=[],X=[],tt={};if(tt.length=w.length,tt.crossLength=T.length,x==="b")for(et=Math.max(0,Math.min(I-2,H)),ut=Math.min(1,Math.max(0,H-et)),tt.xy=function(V){return S.evalxy([],V,H)},tt.dxy=function(V,Q){return S.dxydi([],V,et,Q,ut)},Y=0;Yw.length-1)&&_.push(C(O(r),{color:A.gridcolor,width:A.gridwidth,dash:A.griddash}));for(l=f;lw.length-1)&&!(b<0||b>w.length-1))for(u=w[e],o=w[b],p=0;pw[w.length-1])&&y.push(C(B(h),{color:A.minorgridcolor,width:A.minorgridwidth,dash:A.minorgriddash})));A.startline&&E.push(C(O(0),{color:A.startlinecolor,width:A.startlinewidth})),A.endline&&E.push(C(O(w.length-1),{color:A.endlinecolor,width:A.endlinewidth}))}else{for(a=5e-15,n=[Math.floor((w[w.length-1]-A.tick0)/A.dtick*(1+a)),Math.ceil((w[0]-A.tick0)/A.dtick/(1+a))].sort(function(H,Y){return H-Y}),f=n[0],c=n[1],l=f;l<=c;l++)m=A.tick0+A.dtick*l,_.push(C(B(m),{color:A.gridcolor,width:A.gridwidth,dash:A.griddash}));for(l=f-1;lw[w.length-1])&&y.push(C(B(h),{color:A.minorgridcolor,width:A.minorgridwidth,dash:A.minorgriddash}));A.startline&&E.push(C(B(w[0]),{color:A.startlinecolor,width:A.startlinewidth})),A.endline&&E.push(C(B(w[w.length-1]),{color:A.endlinecolor,width:A.endlinewidth}))}}},14724:function(G,U,t){var g=t(54460),C=t(92880).extendFlat;G.exports=function(S,x){var v,p,r,e,a,n=x._labels=[],f=x._gridlines;for(v=0;vS.length&&(i=i.slice(0,S.length)):i=[],v=0;v90&&(c-=180,r=-r),{angle:c,flip:r,p:t.c2p(i,g,C),offsetMultplier:e}}},164:function(G,U,t){var g=t(33428),C=t(43616),i=t(87072),S=t(53416),x=t(15584),v=t(72736),p=t(3400),r=p.strRotate,e=p.strTranslate,a=t(84284);G.exports=function(o,d,w,A){var _=o._context.staticPlot,y=d.xaxis,E=d.yaxis,T=o._fullLayout,s=T._clips;p.makeTraceGroups(A,w,"trace").each(function(L){var M=g.select(this),z=L[0],D=z.trace,N=D.aaxis,I=D.baxis,k=p.ensureSingle(M,"g","minorlayer"),B=p.ensureSingle(M,"g","majorlayer"),O=p.ensureSingle(M,"g","boundarylayer"),H=p.ensureSingle(M,"g","labellayer");M.style("opacity",D.opacity),f(y,E,B,N,"a",N._gridlines,!0),f(y,E,B,I,"b",I._gridlines,!0),f(y,E,k,N,"a",N._minorgridlines,!0),f(y,E,k,I,"b",I._minorgridlines,!0),f(y,E,O,N,"a-boundary",N._boundarylines,_),f(y,E,O,I,"b-boundary",I._boundarylines,_);var Y=c(o,y,E,D,z,H,N._labels,"a-label"),j=c(o,y,E,D,z,H,I._labels,"b-label");l(o,H,D,z,y,E,Y,j),n(D,z,s,y,E)})};function n(u,o,d,w,A){var _,y,E,T,s=d.select("#"+u._clipPathId);s.size()||(s=d.append("clipPath").classed("carpetclip",!0));var L=p.ensureSingle(s,"path","carpetboundary"),M=o.clipsegments,z=[];for(T=0;T0?"start":"end","data-notex":1}).call(C.font,M.font).text(M.text).call(v.convertToTspans,u),B=C.bBox(this);k.attr("transform",e(D.p[0],D.p[1])+r(D.angle)+e(M.axis.labelpadding*I,B.height*.3)),s=Math.max(s,B.width+M.axis.labelpadding)}),T.exit().remove(),L.maxExtent=s,L}function l(u,o,d,w,A,_,y,E){var T,s,L,M,z=p.aggNums(Math.min,null,d.a),D=p.aggNums(Math.max,null,d.a),N=p.aggNums(Math.min,null,d.b),I=p.aggNums(Math.max,null,d.b);T=.5*(z+D),s=N,L=d.ab2xy(T,s,!0),M=d.dxyda_rough(T,s),y.angle===void 0&&p.extendFlat(y,x(d,A,_,L,d.dxydb_rough(T,s))),b(u,o,d,w,L,M,d.aaxis,A,_,y,"a-title"),T=z,s=.5*(N+I),L=d.ab2xy(T,s,!0),M=d.dxydb_rough(T,s),E.angle===void 0&&p.extendFlat(E,x(d,A,_,L,d.dxyda_rough(T,s))),b(u,o,d,w,L,M,d.baxis,A,_,E,"b-title")}var m=a.LINE_SPACING,h=(1-a.MID_SHIFT)/m+1;function b(u,o,d,w,A,_,y,E,T,s,L){var M=[];y.title.text&&M.push(y.title.text);var z=o.selectAll("text."+L).data(M),D=s.maxExtent;z.enter().append("text").classed(L,!0),z.each(function(){var N=x(d,E,T,A,_);["start","both"].indexOf(y.showticklabels)===-1&&(D=0);var I=y.title.font.size;D+=I+y.title.offset;var k=s.angle+(s.flip<0?180:0),B=(k-N.angle+450)%360,O=B>90&&B<270,H=g.select(this);H.text(y.title.text).call(v.convertToTspans,u),O&&(D=(-v.lineCount(H)+h)*m*I-D),H.attr("transform",e(N.p[0],N.p[1])+r(N.angle)+e(0,D)).attr("text-anchor","middle").call(C.font,y.title.font)}),z.exit().remove()}},81e3:function(G,U,t){var g=t(24588),C=t(14952).findBin,i=t(30180),S=t(29056),x=t(26435),v=t(24464);G.exports=function(r){var e=r._a,a=r._b,n=e.length,f=a.length,c=r.aaxis,l=r.baxis,m=e[0],h=e[n-1],b=a[0],u=a[f-1],o=e[e.length-1]-e[0],d=a[a.length-1]-a[0],w=o*g.RELATIVE_CULL_TOLERANCE,A=d*g.RELATIVE_CULL_TOLERANCE;m-=w,h+=w,b-=A,u+=A,r.isVisible=function(_,y){return _>m&&_b&&yh||yu},r.setScale=function(){var _=r._x,y=r._y,E=i(r._xctrl,r._yctrl,_,y,c.smoothing,l.smoothing);r._xctrl=E[0],r._yctrl=E[1],r.evalxy=S([r._xctrl,r._yctrl],n,f,c.smoothing,l.smoothing),r.dxydi=x([r._xctrl,r._yctrl],c.smoothing,l.smoothing),r.dxydj=v([r._xctrl,r._yctrl],c.smoothing,l.smoothing)},r.i2a=function(_){var y=Math.max(0,Math.floor(_[0]),n-2),E=_[0]-y;return(1-E)*e[y]+E*e[y+1]},r.j2b=function(_){var y=Math.max(0,Math.floor(_[1]),n-2),E=_[1]-y;return(1-E)*a[y]+E*a[y+1]},r.ij2ab=function(_){return[r.i2a(_[0]),r.j2b(_[1])]},r.a2i=function(_){var y=Math.max(0,Math.min(C(_,e),n-2)),E=e[y],T=e[y+1];return Math.max(0,Math.min(n-1,y+(_-E)/(T-E)))},r.b2j=function(_){var y=Math.max(0,Math.min(C(_,a),f-2)),E=a[y],T=a[y+1];return Math.max(0,Math.min(f-1,y+(_-E)/(T-E)))},r.ab2ij=function(_){return[r.a2i(_[0]),r.b2j(_[1])]},r.i2c=function(_,y){return r.evalxy([],_,y)},r.ab2xy=function(_,y,E){if(!E&&(_e[n-1]|ya[f-1]))return[!1,!1];var T=r.a2i(_),s=r.b2j(y),L=r.evalxy([],T,s);if(E){var M=0,z=0,D=[],N,I,k,B;_e[n-1]?(N=n-2,I=1,M=(_-e[n-1])/(e[n-1]-e[n-2])):(N=Math.max(0,Math.min(n-2,Math.floor(T))),I=T-N),ya[f-1]?(k=f-2,B=1,z=(y-a[f-1])/(a[f-1]-a[f-2])):(k=Math.max(0,Math.min(f-2,Math.floor(s))),B=s-k),M&&(r.dxydi(D,N,k,I,B),L[0]+=D[0]*M,L[1]+=D[1]*M),z&&(r.dxydj(D,N,k,I,B),L[0]+=D[0]*z,L[1]+=D[1]*z)}return L},r.c2p=function(_,y,E){return[y.c2p(_[0]),E.c2p(_[1])]},r.p2x=function(_,y,E){return[y.p2c(_[0]),E.p2c(_[1])]},r.dadi=function(_){var y=Math.max(0,Math.min(e.length-2,_));return e[y+1]-e[y]},r.dbdj=function(_){var y=Math.max(0,Math.min(a.length-2,_));return a[y+1]-a[y]},r.dxyda=function(_,y,E,T){var s=r.dxydi(null,_,y,E,T),L=r.dadi(_,E);return[s[0]/L,s[1]/L]},r.dxydb=function(_,y,E,T){var s=r.dxydj(null,_,y,E,T),L=r.dbdj(y,T);return[s[0]/L,s[1]/L]},r.dxyda_rough=function(_,y,E){var T=o*(E||.1),s=r.ab2xy(_+T,y,!0),L=r.ab2xy(_-T,y,!0);return[(s[0]-L[0])*.5/T,(s[1]-L[1])*.5/T]},r.dxydb_rough=function(_,y,E){var T=d*(E||.1),s=r.ab2xy(_,y+T,!0),L=r.ab2xy(_,y-T,!0);return[(s[0]-L[0])*.5/T,(s[1]-L[1])*.5/T]},r.dpdx=function(_){return _._m},r.dpdy=function(_){return _._m}}},51512:function(G,U,t){var g=t(3400);G.exports=function(i,S,x){var v,p,r,e=[],a=[],n=i[0].length,f=i.length;function c(j,et){var it=0,ut,J=0;return j>0&&(ut=i[et][j-1])!==void 0&&(J++,it+=ut),j0&&(ut=i[et-1][j])!==void 0&&(J++,it+=ut),et0&&p0&&vT);return g.log("Smoother converged to",s,"after",M,"iterations"),i}},86411:function(G,U,t){var g=t(3400).isArray1D;G.exports=function(i,S,x){var v=x("x"),p=v&&v.length,r=x("y"),e=r&&r.length;if(!p&&!e)return!1;if(S._cheater=!v,(!p||g(v))&&(!e||g(r))){var a=p?v.length:1/0;e&&(a=Math.min(a,r.length)),S.a&&S.a.length&&(a=Math.min(a,S.a.length)),S.b&&S.b.length&&(a=Math.min(a,S.b.length)),S._length=a}else S._length=null;return!0}},83372:function(G,U,t){var g=t(21776).Ks,C=t(6096),i=t(49084),S=t(45464),x=t(22548).defaultLine,v=t(92880).extendFlat,p=C.marker.line;G.exports=v({locations:{valType:"data_array",editType:"calc"},locationmode:C.locationmode,z:{valType:"data_array",editType:"calc"},geojson:v({},C.geojson,{}),featureidkey:C.featureidkey,text:v({},C.text,{}),hovertext:v({},C.hovertext,{}),marker:{line:{color:v({},p.color,{dflt:x}),width:v({},p.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:C.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:C.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:v({},S.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:g(),showlegend:v({},S.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(G,U,t){var g=t(38248),C=t(39032).BADNUM,i=t(47128),S=t(20148),x=t(4500);function v(p){return p&&typeof p=="string"}G.exports=function(r,e){var a=e._length,n=new Array(a),f;e.geojson?f=function(b){return v(b)||g(b)}:f=v;for(var c=0;c")}}},54272:function(G,U,t){G.exports={attributes:t(83372),supplyDefaults:t(30972),colorbar:t(96288),calc:t(7924),calcGeoJSON:t(88364).calcGeoJSON,plot:t(88364).plot,style:t(7947).style,styleOnSelect:t(7947).styleOnSelect,hoverPoints:t(69224),eventData:t(52428),selectPoints:t(17328),moduleType:"trace",name:"choropleth",basePlotModule:t(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(G,U,t){var g=t(33428),C=t(3400),i=t(27144),S=t(59972).getTopojsonFeatures,x=t(19280).findExtremes,v=t(7947).style;function p(e,a,n){var f=a.layers.backplot.select(".choroplethlayer");C.makeTraceGroups(f,n,"trace choropleth").each(function(c){var l=g.select(this),m=l.selectAll("path.choroplethlocation").data(C.identity);m.enter().append("path").classed("choroplethlocation",!0),m.exit().remove(),v(e,c)})}function r(e,a){for(var n=e[0].trace,f=a[n.geo],c=f._subplot,l=n.locationmode,m=n._length,h=l==="geojson-id"?i.extractTraceFeature(e):S(n,c.topojson),b=[],u=[],o=0;o=0;S--){var x=i[S].id;if(typeof x=="string"&&x.indexOf("water")===0){for(var v=S+1;v=0;r--)v.removeLayer(p[r][1])},x.dispose=function(){var v=this.subplot.map;this._removeLayers(),v.removeSource(this.sourceId)},G.exports=function(p,r){var e=r[0].trace,a=new S(p,e.uid),n=a.sourceId,f=g(r),c=a.below=p.belowLookup["trace-"+e.uid];return p.map.addSource(n,{type:"geojson",data:f.geojson}),a._addLayers(f,c),r[0].trace._glTrace=a,a}},86040:function(G,U,t){var g=t(49084),C=t(29736).axisHoverFormat,i=t(21776).Ks,S=t(52948),x=t(45464),v=t(92880).extendFlat,p={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"},{keys:["norm"]}),uhoverformat:C("u",1),vhoverformat:C("v",1),whoverformat:C("w",1),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),showlegend:v({},x.showlegend,{dflt:!1})};v(p,g("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(e){p[e]=S[e]}),p.hoverinfo=v({},x.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),p.transforms=void 0,G.exports=p},83344:function(G,U,t){var g=t(47128);G.exports=function(i,S){for(var x=S.u,v=S.v,p=S.w,r=Math.min(S.x.length,S.y.length,S.z.length,x.length,v.length,p.length),e=-1/0,a=1/0,n=0;nx.level||x.starts.length&&S===x.level)}break;case"constraint":if(g.prefixBoundary=!1,g.edgepaths.length)return;var v=g.x.length,p=g.y.length,r=-1/0,e=1/0;for(i=0;i":a>r&&(g.prefixBoundary=!0);break;case"<":(ar||g.starts.length&&f===e)&&(g.prefixBoundary=!0);break;case"][":n=Math.min(a[0],a[1]),f=Math.max(a[0],a[1]),nr&&(g.prefixBoundary=!0);break}break}}},55296:function(G,U,t){var g=t(8932),C=t(41076),i=t(46960);function S(x,v,p){var r=v.contours,e=v.line,a=r.size||1,n=r.coloring,f=C(v,{isColorbar:!0});if(n==="heatmap"){var c=g.extractOpts(v);p._fillgradient=c.reversescale?g.flipScale(c.colorscale):c.colorscale,p._zrange=[c.min,c.max]}else n==="fill"&&(p._fillcolor=f);p._line={color:n==="lines"?f:e.color,width:r.showlines!==!1?e.width:0,dash:e.dash},p._levels={start:r.start,end:i(r),size:a}}G.exports={min:"zmin",max:"zmax",calc:S}},93252:function(G){G.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},95536:function(G,U,t){var g=t(38248),C=t(17428),i=t(76308),S=i.addOpacity,x=i.opacity,v=t(69104),p=t(3400).isArrayOrTypedArray,r=v.CONSTRAINT_REDUCTION,e=v.COMPARISON_OPS2;G.exports=function(f,c,l,m,h,b){var u=c.contours,o,d,w,A=l("contours.operation");if(u._operation=r[A],a(l,u),A==="="?o=u.showlines=!0:(o=l("contours.showlines"),w=l("fillcolor",S((f.line||{}).color||h,.5))),o){var _=w&&x(w)?S(c.fillcolor,1):h;d=l("line.color",_),l("line.width",2),l("line.dash")}l("line.smoothing"),C(l,m,d,b)};function a(n,f){var c;e.indexOf(f.operation)===-1?(n("contours.value",[0,1]),p(f.value)?f.value.length>2?f.value=f.value.slice(2):f.length===0?f.value=[0,1]:f.length<2?(c=parseFloat(f.value[0]),f.value=[c,c+1]):f.value=[parseFloat(f.value[0]),parseFloat(f.value[1])]:g(f.value)&&(c=parseFloat(f.value),f.value=[c,c+1])):(n("contours.value",0),g(f.value)||(p(f.value)?f.value=parseFloat(f.value[0]):f.value=0))}},3212:function(G,U,t){var g=t(69104),C=t(38248);G.exports={"[]":S("[]"),"][":S("]["),">":x(">"),"<":x("<"),"=":x("=")};function i(v,p){var r=Array.isArray(p),e;function a(n){return C(n)?+n:null}return g.COMPARISON_OPS2.indexOf(v)!==-1?e=a(r?p[0]:p):g.INTERVAL_OPS.indexOf(v)!==-1?e=r?[a(p[0]),a(p[1])]:[a(p),a(p)]:g.SET_OPS.indexOf(v)!==-1&&(e=r?p.map(a):[a(p)]),e}function S(v){return function(p){p=i(v,p);var r=Math.min(p[0],p[1]),e=Math.max(p[0],p[1]);return{start:r,end:e,size:e-r}}}function x(v){return function(p){return p=i(v,p),{start:p,end:1/0,size:1/0}}}},84952:function(G){G.exports=function(t,g,C,i){var S=i("contours.start"),x=i("contours.end"),v=S===!1||x===!1,p=C("contours.size"),r;v?r=g.autocontour=!0:r=C("autocontour",!1),(r||!p)&&C("ncontours")}},82172:function(G,U,t){var g=t(3400);G.exports=function(i,S){var x,v,p,r=function(n){return n.reverse()},e=function(n){return n};switch(S){case"=":case"<":return i;case">":for(i.length!==1&&g.warn("Contour data invalid for the specified inequality operation."),v=i[0],x=0;x1e3){g.warn("Too many contours, clipping at 1000",x);break}return a}},46960:function(G){G.exports=function(t){return t.end+t.size/1e6}},88748:function(G,U,t){var g=t(3400),C=t(93252);G.exports=function(e,a,n){var f,c,l,m,h;for(a=a||.01,n=n||.01,l=0;l20?(l=C.CHOOSESADDLE[l][(m[0]||m[1])<0?0:1],r.crossings[c]=C.SADDLEREMAINDER[l]):delete r.crossings[c],m=C.NEWDELTA[l],!m){g.log("Found bad marching index:",l,e,r.level);break}h.push(p(r,e,m)),e[0]+=m[0],e[1]+=m[1],c=e.join(","),i(h[h.length-1],h[h.length-2],n,f)&&h.pop();var A=m[0]&&(e[0]<0||e[0]>u-2)||m[1]&&(e[1]<0||e[1]>b-2),_=e[0]===o[0]&&e[1]===o[1]&&m[0]===d[0]&&m[1]===d[1];if(_||a&&A)break;l=r.crossings[c]}w===1e4&&g.log("Infinite loop in contour?");var y=i(h[0],h[h.length-1],n,f),E=0,T=.2*r.smoothing,s=[],L=0,M,z,D,N,I,k,B,O,H,Y,j;for(w=1;w=L;w--)if(M=s[w],M=L&&M+s[z]O&&H--,r.edgepaths[H]=j.concat(h,Y));break}J||(r.edgepaths[O]=h.concat(Y))}for(O=0;O20&&e?r===208||r===1114?n=a[0]===0?1:-1:f=a[1]===0?1:-1:C.BOTTOMSTART.indexOf(r)!==-1?f=1:C.LEFTSTART.indexOf(r)!==-1?n=1:C.TOPSTART.indexOf(r)!==-1?f=-1:n=-1,[n,f]}function p(r,e,a){var n=e[0]+Math.max(a[0],0),f=e[1]+Math.max(a[1],0),c=r.z[f][n],l=r.xaxis,m=r.yaxis;if(a[1]){var h=(r.level-c)/(r.z[f][n+1]-c),b=(h!==1?(1-h)*l.c2l(r.x[n]):0)+(h!==0?h*l.c2l(r.x[n+1]):0);return[l.c2p(l.l2c(b),!0),m.c2p(r.y[f],!0),n+h,f]}else{var u=(r.level-c)/(r.z[f+1][n]-c),o=(u!==1?(1-u)*m.c2l(r.y[f]):0)+(u!==0?u*m.c2l(r.y[f+1]):0);return[l.c2p(r.x[n],!0),m.c2p(m.l2c(o),!0),n,f+u]}}},38200:function(G,U,t){var g=t(76308),C=t(55512);G.exports=function(S,x,v,p,r){r||(r={}),r.isContour=!0;var e=C(S,x,v,p,r);return e&&e.forEach(function(a){var n=a.trace;n.contours.type==="constraint"&&(n.fillcolor&&g.opacity(n.fillcolor)?a.color=g.addOpacity(n.fillcolor,1):n.contours.showlines&&g.opacity(n.line.color)&&(a.color=g.addOpacity(n.line.color,1)))}),e}},66240:function(G,U,t){G.exports={attributes:t(67104),supplyDefaults:t(57004),calc:t(20688),plot:t(23676).plot,style:t(52440),colorbar:t(55296),hoverPoints:t(38200),moduleType:"trace",name:"contour",basePlotModule:t(57952),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},17428:function(G,U,t){var g=t(3400);G.exports=function(i,S,x,v){v||(v={});var p=i("contours.showlabels");if(p){var r=S.font;g.coerceFont(i,"contours.labelfont",{family:r.family,size:r.size,color:x}),i("contours.labelformat")}v.hasHover!==!1&&i("zhoverformat")}},41076:function(G,U,t){var g=t(33428),C=t(8932),i=t(46960);G.exports=function(x){var v=x.contours,p=v.start,r=i(v),e=v.size||1,a=Math.floor((r-p)/e)+1,n=v.coloring==="lines"?0:1,f=C.extractOpts(x);isFinite(e)||(e=1,a=1);var c=f.reversescale?C.flipScale(f.colorscale):f.colorscale,l=c.length,m=new Array(l),h=new Array(l),b,u,o=f.min,d=f.max;if(v.coloring==="heatmap"){for(u=0;u=d)&&(p<=o&&(p=o),r>=d&&(r=d),a=Math.floor((r-p)/e)+1,n=0),u=0;uo&&(m.unshift(o),h.unshift(h[0])),m[m.length-1]i?0:1)+(S[0][1]>i?0:2)+(S[1][1]>i?0:4)+(S[1][0]>i?0:8);if(x===5||x===10){var v=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return i>v?x===5?713:1114:x===5?104:208}return x===15?0:x}},23676:function(G,U,t){var g=t(33428),C=t(3400),i=t(43616),S=t(8932),x=t(72736),v=t(54460),p=t(78344),r=t(41420),e=t(72424),a=t(88748),n=t(61512),f=t(82172),c=t(56008),l=t(93252),m=l.LABELOPTIMIZER;U.plot=function(y,E,T,s){var L=E.xaxis,M=E.yaxis;C.makeTraceGroups(s,T,"contour").each(function(z){var D=g.select(this),N=z[0],I=N.trace,k=N.x,B=N.y,O=I.contours,H=n(O,E,N),Y=C.ensureSingle(D,"g","heatmapcoloring"),j=[];O.coloring==="heatmap"&&(j=[z]),r(y,E,j,Y),e(H),a(H);var et=L.c2p(k[0],!0),it=L.c2p(k[k.length-1],!0),ut=M.c2p(B[0],!0),J=M.c2p(B[B.length-1],!0),X=[[et,J],[it,J],[it,ut],[et,ut]],tt=H;O.type==="constraint"&&(tt=f(H,O._operation)),h(D,X,O),b(D,tt,X,O),o(D,H,y,N,O),w(D,E,y,N,X)})};function h(_,y,E){var T=C.ensureSingle(_,"g","contourbg"),s=T.selectAll("path").data(E.coloring==="fill"?[0]:[]);s.enter().append("path"),s.exit().remove(),s.attr("d","M"+y.join("L")+"Z").style("stroke","none")}function b(_,y,E,T){var s=T.coloring==="fill"||T.type==="constraint"&&T._operation!=="=",L="M"+E.join("L")+"Z";s&&c(y,T);var M=C.ensureSingle(_,"g","contourfill"),z=M.selectAll("path").data(s?y:[]);z.enter().append("path"),z.exit().remove(),z.each(function(D){var N=(D.prefixBoundary?L:"")+u(D,E);N?g.select(this).attr("d",N).style("stroke","none"):g.select(this).remove()})}function u(_,y){var E="",T=0,s=_.edgepaths.map(function(et,it){return it}),L=!0,M,z,D,N,I,k;function B(et){return Math.abs(et[1]-y[0][1])<.01}function O(et){return Math.abs(et[1]-y[2][1])<.01}function H(et){return Math.abs(et[0]-y[0][0])<.01}function Y(et){return Math.abs(et[0]-y[2][0])<.01}for(;s.length;){for(k=i.smoothopen(_.edgepaths[T],_.smoothing),E+=L?k:k.replace(/^M/,"L"),s.splice(s.indexOf(T),1),M=_.edgepaths[T][_.edgepaths[T].length-1],N=-1,D=0;D<4;D++){if(!M){C.log("Missing end?",T,_);break}for(B(M)&&!Y(M)?z=y[1]:H(M)?z=y[0]:O(M)?z=y[3]:Y(M)&&(z=y[2]),I=0;I<_.edgepaths.length;I++){var j=_.edgepaths[I][0];Math.abs(M[0]-z[0])<.01?Math.abs(M[0]-j[0])<.01&&(j[1]-M[1])*(z[1]-j[1])>=0&&(z=j,N=I):Math.abs(M[1]-z[1])<.01?Math.abs(M[1]-j[1])<.01&&(j[0]-M[0])*(z[0]-j[0])>=0&&(z=j,N=I):C.log("endpt to newendpt is not vert. or horz.",M,z,j)}if(M=z,N>=0)break;E+="L"+z}if(N===_.edgepaths.length){C.log("unclosed perimeter path");break}T=N,L=s.indexOf(T)===-1,L&&(T=s[0],E+="Z")}for(T=0;T<_.paths.length;T++)E+=i.smoothclosed(_.paths[T],_.smoothing);return E}function o(_,y,E,T,s){var L=E._context.staticPlot,M=C.ensureSingle(_,"g","contourlines"),z=s.showlines!==!1,D=s.showlabels,N=z&&D,I=U.createLines(M,z||D,y,L),k=U.createLineClip(M,N,E,T.trace.uid),B=_.selectAll("g.contourlabels").data(D?[0]:[]);if(B.exit().remove(),B.enter().append("g").classed("contourlabels",!0),D){var O=[],H=[];C.clearLocationCache();var Y=U.labelFormatter(E,T),j=i.tester.append("text").attr("data-notex",1).call(i.font,s.labelfont),et=y[0].xaxis,it=y[0].yaxis,ut=et._length,J=it._length,X=et.range,tt=it.range,V=C.aggNums(Math.min,null,T.x),Q=C.aggNums(Math.max,null,T.x),ot=C.aggNums(Math.min,null,T.y),$=C.aggNums(Math.max,null,T.y),Z=Math.max(et.c2p(V,!0),0),st=Math.min(et.c2p(Q,!0),ut),nt=Math.max(it.c2p($,!0),0),ct=Math.min(it.c2p(ot,!0),J),gt={};X[0]m.MAXCOST*2)break;B&&(z/=2),M=N-z/2,D=M+z*1.5}if(k<=m.MAXCOST)return I};function d(_,y,E,T){var s=y.width/2,L=y.height/2,M=_.x,z=_.y,D=_.theta,N=Math.cos(D)*s,I=Math.sin(D)*s,k=(M>T.center?T.right-M:M-T.left)/(N+Math.abs(Math.sin(D)*L)),B=(z>T.middle?T.bottom-z:z-T.top)/(Math.abs(I)+Math.cos(D)*L);if(k<1||B<1)return 1/0;var O=m.EDGECOST*(1/(k-1)+1/(B-1));O+=m.ANGLECOST*D*D;for(var H=M-N,Y=z-I,j=M+N,et=z+I,it=0;itp.end&&(p.start=p.end=(p.start+p.end)/2),x._input.contours||(x._input.contours={}),C.extendFlat(x._input.contours,{start:p.start,end:p.end,size:p.size}),x._input.autocontour=!0}else if(p.type!=="constraint"){var n=p.start,f=p.end,c=x._input.contours;if(n>f&&(p.start=c.start=f,f=p.end=c.end=n,n=p.start),!(p.size>0)){var l;n===f?l=1:l=i(n,f,x.ncontours).dtick,c.size=p.size=l}}};function i(S,x,v){var p={type:"linear",range:[S,x]};return g.autoTicks(p,(x-S)/(v||15)),p}},52440:function(G,U,t){var g=t(33428),C=t(43616),i=t(41648),S=t(41076);G.exports=function(v){var p=g.select(v).selectAll("g.contour");p.style("opacity",function(r){return r[0].trace.opacity}),p.each(function(r){var e=g.select(this),a=r[0].trace,n=a.contours,f=a.line,c=n.size||1,l=n.start,m=n.type==="constraint",h=!m&&n.coloring==="lines",b=!m&&n.coloring==="fill",u=h||b?S(a):null;e.selectAll("g.contourlevel").each(function(w){g.select(this).selectAll("path").call(C.lineGroupStyle,f.width,h?u(w.level):f.color,f.dash)});var o=n.labelfont;if(e.selectAll("g.contourlabels text").each(function(w){C.font(g.select(this),{family:o.family,size:o.size,color:o.color||(h?u(w.level):f.color)})}),m)e.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(b){var d;e.selectAll("g.contourfill path").style("fill",function(w){return d===void 0&&(d=w.level),u(w.level+.5*c)}),d===void 0&&(d=l),e.selectAll("g.contourbg path").style("fill",u(d-.5*c))}}),i(v)}},97680:function(G,U,t){var g=t(27260),C=t(17428);G.exports=function(S,x,v,p,r){var e=v("contours.coloring"),a,n="";e==="fill"&&(a=v("contours.showlines")),a!==!1&&(e!=="lines"&&(n=v("line.color","#000")),v("line.width",.5),v("line.dash")),e!=="none"&&(S.showlegend!==!0&&(x.showlegend=!1),x._dfltShowLegend=!1,g(S,x,p,v,{prefix:"",cLetter:"z"})),v("line.smoothing"),C(v,p,n,r)}},37960:function(G,U,t){var g=t(83328),C=t(67104),i=t(49084),S=t(92880).extendFlat,x=C.contours;G.exports=S({carpet:{valType:"string",editType:"calc"},z:g.z,a:g.x,a0:g.x0,da:g.dx,b:g.y,b0:g.y0,db:g.dy,text:g.text,hovertext:g.hovertext,transpose:g.transpose,atype:g.xtype,btype:g.ytype,fillcolor:C.fillcolor,autocontour:C.autocontour,ncontours:C.ncontours,contours:{type:x.type,start:x.start,end:x.end,size:x.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:x.showlines,showlabels:x.showlabels,labelfont:x.labelfont,labelformat:x.labelformat,operation:x.operation,value:x.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:C.line.color,width:C.line.width,dash:C.line.dash,smoothing:C.line.smoothing,editType:"plot"},transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},30572:function(G,U,t){var g=t(47128),C=t(3400),i=t(2872),S=t(26136),x=t(70448),v=t(11240),p=t(35744),r=t(3252),e=t(50948),a=t(54444);G.exports=function(c,l){var m=l._carpetTrace=e(c,l);if(!(!m||!m.visible||m.visible==="legendonly")){if(!l.a||!l.b){var h=c.data[m.index],b=c.data[l.index];b.a||(b.a=h.a),b.b||(b.b=h.b),r(b,l,l._defaultColor,c._fullLayout)}var u=n(c,l);return a(l,l._z),u}};function n(f,c){var l=c._carpetTrace,m=l.aaxis,h=l.baxis,b,u,o,d,w,A,_;m._minDtick=0,h._minDtick=0,C.isArray1D(c.z)&&i(c,m,h,"a","b",["z"]),b=c._a=c._a||c.a,d=c._b=c._b||c.b,b=b?m.makeCalcdata(c,"_a"):[],d=d?h.makeCalcdata(c,"_b"):[],u=c.a0||0,o=c.da||1,w=c.b0||0,A=c.db||1,_=c._z=S(c._z||c.z,c.transpose),c._emptypoints=v(_),x(_,c._emptypoints);var y=C.maxRowLength(_),E=c.xtype==="scaled"?"":b,T=p(c,E,u,o,y,m),s=c.ytype==="scaled"?"":d,L=p(c,s,w,A,_.length,h),M={a:T,b:L,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&g(f,c,{vals:_,containerStr:"",cLetter:"z"}),[M]}},3252:function(G,U,t){var g=t(3400),C=t(51264),i=t(37960),S=t(95536),x=t(84952),v=t(97680);G.exports=function(r,e,a,n){function f(h,b){return g.coerce(r,e,i,h,b)}function c(h){return g.coerce2(r,e,i,h)}if(f("carpet"),r.a&&r.b){var l=C(r,e,f,n,"a","b");if(!l){e.visible=!1;return}f("text");var m=f("contours.type")==="constraint";m?S(r,e,f,n,a,{hasHover:!1}):(x(r,e,f,c),v(r,e,f,n,{hasHover:!1}))}else e._defaultColor=a,e._length=null}},40448:function(G,U,t){G.exports={attributes:t(37960),supplyDefaults:t(3252),colorbar:t(55296),calc:t(30572),plot:t(94440),style:t(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:t(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(G,U,t){var g=t(33428),C=t(87072),i=t(53416),S=t(43616),x=t(3400),v=t(72424),p=t(88748),r=t(23676),e=t(93252),a=t(82172),n=t(61512),f=t(56008),c=t(50948),l=t(77712);G.exports=function(E,T,s,L){var M=T.xaxis,z=T.yaxis;x.makeTraceGroups(L,s,"contour").each(function(D){var N=g.select(this),I=D[0],k=I.trace,B=k._carpetTrace=c(E,k),O=E.calcdata[B.index][0];if(!B.visible||B.visible==="legendonly")return;var H=I.a,Y=I.b,j=k.contours,et=n(j,T,I),it=j.type==="constraint",ut=j._operation,J=it?ut==="="?"lines":"fill":j.coloring;function X(Tt){var wt=B.ab2xy(Tt[0],Tt[1],!0);return[M.c2p(wt[0]),z.c2p(wt[1])]}var tt=[[H[0],Y[Y.length-1]],[H[H.length-1],Y[Y.length-1]],[H[H.length-1],Y[0]],[H[0],Y[0]]];v(et);var V=(H[H.length-1]-H[0])*1e-8,Q=(Y[Y.length-1]-Y[0])*1e-8;p(et,V,Q);var ot=et;j.type==="constraint"&&(ot=a(et,ut)),m(et,X);var $,Z,st,nt,ct=[];for(nt=O.clipsegments.length-1;nt>=0;nt--)$=O.clipsegments[nt],Z=C([],$.x,M.c2p),st=C([],$.y,z.c2p),Z.reverse(),st.reverse(),ct.push(i(Z,st,$.bicubic));var gt="M"+ct.join("L")+"Z";w(N,O.clipsegments,M,z,it,J),A(k,N,M,z,ot,tt,X,B,O,J,gt),h(N,et,E,I,j,T,B),S.setClipUrl(N,B._clipPathId,E)})};function m(y,E){var T,s,L,M,z,D,N,I,k;for(T=0;Tet&&(s.max=et),s.len=s.max-s.min}function u(y,E,T){var s=y.getPointAtLength(E),L=y.getPointAtLength(T),M=L.x-s.x,z=L.y-s.y,D=Math.sqrt(M*M+z*z);return[M/D,z/D]}function o(y){var E=Math.sqrt(y[0]*y[0]+y[1]*y[1]);return[y[0]/E,y[1]/E]}function d(y,E){var T=Math.abs(y[0]*E[0]+y[1]*E[1]),s=Math.sqrt(1-T*T);return s/T}function w(y,E,T,s,L,M){var z,D,N,I,k=x.ensureSingle(y,"g","contourbg"),B=k.selectAll("path").data(M==="fill"&&!L?[0]:[]);B.enter().append("path"),B.exit().remove();var O=[];for(I=0;I=0&&(H=Z,j=et):Math.abs(O[1]-H[1])=0&&(H=Z,j=et):x.log("endpt to newendpt is not vert. or horz.",O,H,Z)}if(j>=0)break;I+=ot(O,H),O=H}if(j===E.edgepaths.length){x.log("unclosed perimeter path");break}N=j,B=k.indexOf(N)===-1,B&&(N=k[0],I+=ot(O,H)+"Z",O=null)}for(N=0;N0?+h[l]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:w})}}var _=S.extractOpts(e),y=_.reversescale?S.flipScale(_.colorscale):_.colorscale,E=y[0][1],T=i.opacity(E)<1?E:i.addOpacity(E,0),s=["interpolate",["linear"],["heatmap-density"],0,T];for(l=1;l=0;p--)x.removeLayer(v[p][1])},S.dispose=function(){var x=this.subplot.map;this._removeLayers(),x.removeSource(this.sourceId)},G.exports=function(v,p){var r=p[0].trace,e=new i(v,r.uid),a=e.sourceId,n=g(p),f=e.below=v.belowLookup["trace-"+r.uid];return v.map.addSource(a,{type:"geojson",data:n.geojson}),e._addLayers(n,f),e}},74248:function(G,U,t){var g=t(3400);G.exports=function(i,S){for(var x=0;x"),n.color=S(c,h),[n]}};function S(x,v){var p=x.marker,r=v.mc||p.color,e=v.mlc||p.line.color,a=v.mlw||p.line.width;if(g(r))return r;if(g(e)&&a)return e}},94704:function(G,U,t){G.exports={attributes:t(20088),layoutAttributes:t(7076),supplyDefaults:t(45432).supplyDefaults,crossTraceDefaults:t(45432).crossTraceDefaults,supplyLayoutDefaults:t(11631),calc:t(23096),crossTraceCalc:t(4804),plot:t(42200),style:t(44544).style,hoverPoints:t(31488),eventData:t(34580),selectPoints:t(45784),moduleType:"trace",name:"funnel",basePlotModule:t(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(G){G.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},11631:function(G,U,t){var g=t(3400),C=t(7076);G.exports=function(i,S,x){var v=!1;function p(a,n){return g.coerce(i,S,C,a,n)}for(var r=0;r path").each(function(h){if(!h.isBlank){var b=m.marker;g.select(this).call(i.fill,h.mc||b.color).call(i.stroke,h.mlc||b.line.color).call(C.dashLine,b.line.dash,h.mlw||b.line.width).style("opacity",m.selectedpoints&&!h.selected?S:1)}}),p(l,m,e),l.selectAll(".regions").each(function(){g.select(this).selectAll("path").style("stroke-width",0).call(i.fill,m.connector.fillcolor)}),l.selectAll(".lines").each(function(){var h=m.connector.line;C.lineGroupStyle(g.select(this).selectAll("path"),h.width,h.color,h.dash)})})}G.exports={style:r}},22332:function(G,U,t){var g=t(74996),C=t(45464),i=t(86968).u,S=t(21776).Ks,x=t(21776).Gw,v=t(92880).extendFlat;G.exports={labels:g.labels,label0:g.label0,dlabel:g.dlabel,values:g.values,marker:{colors:g.marker.colors,line:{color:v({},g.marker.line.color,{dflt:null}),width:v({},g.marker.line.width,{dflt:1}),editType:"calc"},pattern:g.marker.pattern,editType:"calc"},text:g.text,hovertext:g.hovertext,scalegroup:v({},g.scalegroup,{}),textinfo:v({},g.textinfo,{flags:["label","text","value","percent"]}),texttemplate:x({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:v({},C.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),textposition:v({},g.textposition,{values:["inside","none"],dflt:"inside"}),textfont:g.textfont,insidetextfont:g.insidetextfont,title:{text:g.title.text,font:g.title.font,position:v({},g.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},91248:function(G,U,t){var g=t(7316);U.name="funnelarea",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},54e3:function(G,U,t){var g=t(45768);function C(S,x){return g.calc(S,x)}function i(S){g.crossTraceCalc(S,{type:"funnelarea"})}G.exports={calc:C,crossTraceCalc:i}},92688:function(G,U,t){var g=t(3400),C=t(22332),i=t(86968).Q,S=t(31508).handleText,x=t(74174).handleLabelsAndValues,v=t(74174).handleMarkerDefaults;G.exports=function(r,e,a,n){function f(A,_){return g.coerce(r,e,C,A,_)}var c=f("labels"),l=f("values"),m=x(c,l),h=m.len;if(e._hasLabels=m.hasLabels,e._hasValues=m.hasValues,!e._hasLabels&&e._hasValues&&(f("label0"),f("dlabel")),!h){e.visible=!1;return}e._length=h,v(r,e,n,f),f("scalegroup");var b=f("text"),u=f("texttemplate"),o;if(u||(o=f("textinfo",Array.isArray(b)?"text+percent":"percent")),f("hovertext"),f("hovertemplate"),u||o&&o!=="none"){var d=f("textposition");S(r,e,n,f,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else o==="none"&&f("textposition","none");i(e,n,f);var w=f("title.text");w&&(f("title.position"),g.coerceFont(f,"title.font",n.font)),f("aspectratio"),f("baseratio")}},62396:function(G,U,t){G.exports={moduleType:"trace",name:"funnelarea",basePlotModule:t(91248),categories:["pie-like","funnelarea","showLegend"],attributes:t(22332),layoutAttributes:t(61280),supplyDefaults:t(92688),supplyLayoutDefaults:t(35384),calc:t(54e3).calc,crossTraceCalc:t(54e3).crossTraceCalc,plot:t(39472),style:t(62096),styleOne:t(10528),meta:{}}},61280:function(G,U,t){var g=t(85204).hiddenlabels;G.exports={hiddenlabels:g,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(G,U,t){var g=t(3400),C=t(61280);G.exports=function(S,x){function v(p,r){return g.coerce(S,x,C,p,r)}v("hiddenlabels"),v("funnelareacolorway",x.colorway),v("extendfunnelareacolors")}},39472:function(G,U,t){var g=t(33428),C=t(43616),i=t(3400),S=i.strScale,x=i.strTranslate,v=t(72736),p=t(98184),r=p.toMoveInsideBar,e=t(82744),a=e.recordMinTextSize,n=e.clearMinTextSize,f=t(69656),c=t(37820),l=c.attachFxHandlers,m=c.determineInsideTextFont,h=c.layoutAreas,b=c.prerenderTitles,u=c.positionTitleOutside,o=c.formatSliceLabel;G.exports=function(y,E){var T=y._context.staticPlot,s=y._fullLayout;n("funnelarea",s),b(E,y),h(E,s._size),i.makeTraceGroups(s._funnelarealayer,E,"trace").each(function(L){var M=g.select(this),z=L[0],D=z.trace;A(L),M.each(function(){var N=g.select(this).selectAll("g.slice").data(L);N.enter().append("g").classed("slice",!0),N.exit().remove(),N.each(function(k,B){if(k.hidden){g.select(this).selectAll("path,g").remove();return}k.pointNumber=k.i,k.curveNumber=D.index;var O=z.cx,H=z.cy,Y=g.select(this),j=Y.selectAll("path.surface").data([k]);j.enter().append("path").classed("surface",!0).style({"pointer-events":T?"none":"all"}),Y.call(l,y,L);var et="M"+(O+k.TR[0])+","+(H+k.TR[1])+d(k.TR,k.BR)+d(k.BR,k.BL)+d(k.BL,k.TL)+"Z";j.attr("d",et),o(y,k,z);var it=f.castOption(D.textposition,k.pts),ut=Y.selectAll("g.slicetext").data(k.text&&it!=="none"?[0]:[]);ut.enter().append("g").classed("slicetext",!0),ut.exit().remove(),ut.each(function(){var J=i.ensureSingle(g.select(this),"text","",function(st){st.attr("data-notex",1)}),X=i.ensureUniformFontSize(y,m(D,k,s.font));J.text(k.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(C.font,X).call(v.convertToTspans,y);var tt=C.bBox(J.node()),V,Q,ot,$=Math.min(k.BL[1],k.BR[1])+H,Z=Math.max(k.TL[1],k.TR[1])+H;Q=Math.max(k.TL[0],k.BL[0])+O,ot=Math.min(k.TR[0],k.BR[0])+O,V=r(Q,ot,$,Z,tt,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),V.fontSize=X.size,a(D.type,V,s),L[B].transform=V,i.setTransormAndDisplay(J,V)})});var I=g.select(this).selectAll("g.titletext").data(D.title.text?[0]:[]);I.enter().append("g").classed("titletext",!0),I.exit().remove(),I.each(function(){var k=i.ensureSingle(g.select(this),"text","",function(H){H.attr("data-notex",1)}),B=D.title.text;D._meta&&(B=i.templateString(B,D._meta)),k.text(B).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(C.font,D.title.font).call(v.convertToTspans,y);var O=u(z,s._size);k.attr("transform",x(O.x,O.y)+S(Math.min(1,O.scale))+x(O.tx,O.ty))})})})};function d(_,y){var E=y[0]-_[0],T=y[1]-_[1];return"l"+E+","+T}function w(_,y){return[.5*(_[0]+y[0]),.5*(_[1]+y[1])]}function A(_){if(!_.length)return;var y=_[0],E=y.trace,T=E.aspectratio,s=E.baseratio;s>.999&&(s=.999);var L=Math.pow(s,2),M=y.vTotal,z=M*L/(1-L),D=M,N=z/M;function I(){var nt=Math.sqrt(N);return{x:nt,y:-nt}}function k(){var nt=I();return[nt.x,nt.y]}var B,O=[];O.push(k());var H,Y;for(H=_.length-1;H>-1;H--)if(Y=_[H],!Y.hidden){var j=Y.v/D;N+=j,O.push(k())}var et=1/0,it=-1/0;for(H=0;H-1;H--)if(Y=_[H],!Y.hidden){$+=1;var Z=O[$][0],st=O[$][1];Y.TL=[-Z,st],Y.TR=[Z,st],Y.BL=Q,Y.BR=ot,Y.pxmid=w(Y.TR,Y.BR),Q=Y.TL,ot=Y.TR}}},62096:function(G,U,t){var g=t(33428),C=t(10528),i=t(82744).resizeText;G.exports=function(x){var v=x._fullLayout._funnelarealayer.selectAll(".trace");i(x,v,"funnelarea"),v.each(function(p){var r=p[0],e=r.trace,a=g.select(this);a.style({opacity:e.opacity}),a.selectAll("path.surface").each(function(n){g.select(this).call(C,n,e,x)})})}},83328:function(G,U,t){var g=t(52904),C=t(45464),i=t(25376),S=t(29736).axisHoverFormat,x=t(21776).Ks,v=t(21776).Gw,p=t(49084),r=t(92880).extendFlat;G.exports=r({z:{valType:"data_array",editType:"calc"},x:r({},g.x,{impliedEdits:{xtype:"array"}}),x0:r({},g.x0,{impliedEdits:{xtype:"scaled"}}),dx:r({},g.dx,{impliedEdits:{xtype:"scaled"}}),y:r({},g.y,{impliedEdits:{ytype:"array"}}),y0:r({},g.y0,{impliedEdits:{ytype:"scaled"}}),dy:r({},g.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:r({},g.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:r({},g.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:r({},g.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:r({},g.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:r({},g.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:r({},g.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:x(),texttemplate:v({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:i({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:r({},C.showlegend,{dflt:!1})},{transforms:void 0},p("",{cLetter:"z",autoColorDflt:!1}))},19512:function(G,U,t){var g=t(24040),C=t(3400),i=t(54460),S=t(1220),x=t(55480),v=t(47128),p=t(2872),r=t(26136),e=t(70448),a=t(11240),n=t(35744),f=t(39032).BADNUM;G.exports=function(h,b){var u=i.getFromId(h,b.xaxis||"x"),o=i.getFromId(h,b.yaxis||"y"),d=g.traceIs(b,"contour"),w=g.traceIs(b,"histogram"),A=g.traceIs(b,"gl2d"),_=d?"best":b.zsmooth,y,E,T,s,L,M,z,D,N,I,k;if(u._minDtick=0,o._minDtick=0,w)k=x(h,b),s=k.orig_x,y=k.x,E=k.x0,T=k.dx,D=k.orig_y,L=k.y,M=k.y0,z=k.dy,N=k.z;else{var B=b.z;C.isArray1D(B)?(p(b,u,o,"x","y",["z"]),y=b._x,L=b._y,B=b._z):(s=b.x?u.makeCalcdata(b,"x"):[],D=b.y?o.makeCalcdata(b,"y"):[],y=S(b,u,"x",s).vals,L=S(b,o,"y",D).vals,b._x=y,b._y=L),E=b.x0,T=b.dx,M=b.y0,z=b.dy,N=r(B,b,u,o)}(u.rangebreaks||o.rangebreaks)&&(N=l(y,L,N),w||(y=c(y),L=c(L),b._x=y,b._y=L)),!w&&(d||b.connectgaps)&&(b._emptypoints=a(N),e(N,b._emptypoints));function O(tt){_=b._input.zsmooth=b.zsmooth=!1,C.warn('cannot use zsmooth: "fast": '+tt)}function H(tt){if(tt.length>1){var V=(tt[tt.length-1]-tt[0])/(tt.length-1),Q=Math.abs(V/100);for(I=0;IQ)return!1}return!0}b._islinear=!1,u.type==="log"||o.type==="log"?_==="fast"&&O("log axis found"):H(y)?H(L)?b._islinear=!0:_==="fast"&&O("y scale is not linear"):_==="fast"&&O("x scale is not linear");var Y=C.maxRowLength(N),j=b.xtype==="scaled"?"":y,et=n(b,j,E,T,Y,u),it=b.ytype==="scaled"?"":L,ut=n(b,it,M,z,N.length,o);A||(b._extremes[u._id]=i.findExtremes(u,et),b._extremes[o._id]=i.findExtremes(o,ut));var J={x:et,y:ut,z:N,text:b._text||b.text,hovertext:b._hovertext||b.hovertext};if(b.xperiodalignment&&s&&(J.orig_x=s),b.yperiodalignment&&D&&(J.orig_y=D),j&&j.length===et.length-1&&(J.xCenter=j),it&&it.length===ut.length-1&&(J.yCenter=it),w&&(J.xRanges=k.xRanges,J.yRanges=k.yRanges,J.pts=k.pts),d||v(h,b,{vals:N,cLetter:"z"}),d&&b.contours&&b.contours.coloring==="heatmap"){var X={type:b.type==="contour"?"heatmap":"histogram2d",xcalendar:b.xcalendar,ycalendar:b.ycalendar};J.xfill=n(X,j,E,T,Y,u),J.yfill=n(X,it,M,z,N.length,o)}return[J]};function c(m){for(var h=[],b=m.length,u=0;u=0;m--)l=v[m],f=l[0],c=l[1],h=((x[[f-1,c]]||e)[2]+(x[[f+1,c]]||e)[2]+(x[[f,c-1]]||e)[2]+(x[[f,c+1]]||e)[2])/20,h&&(b[l]=[f,c,h],v.splice(m,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(l in b)x[l]=b[l],S.push(b[l])}return S.sort(function(o,d){return d[2]-o[2]})}},55512:function(G,U,t){var g=t(93024),C=t(3400),i=C.isArrayOrTypedArray,S=t(54460),x=t(8932).extractOpts;G.exports=function(p,r,e,a,n){n||(n={});var f=n.isContour,c=p.cd[0],l=c.trace,m=p.xa,h=p.ya,b=c.x,u=c.y,o=c.z,d=c.xCenter,w=c.yCenter,A=c.zmask,_=l.zhoverformat,y=b,E=u,T,s,L,M;if(p.index!==!1){try{L=Math.round(p.index[1]),M=Math.round(p.index[0])}catch{C.error("Error hovering on heatmap, pointNumber must be [row,col], found:",p.index);return}if(L<0||L>=o[0].length||M<0||M>o.length)return}else{if(g.inbox(r-b[0],r-b[b.length-1],0)>0||g.inbox(e-u[0],e-u[u.length-1],0)>0)return;if(f){var z;for(y=[2*b[0]-b[1]],z=1;zC;a++)e=x(p,r,S(e));return e>C&&g.log("interp2d didn't converge quickly",e),p};function x(v,p,r){var e=0,a,n,f,c,l,m,h,b,u,o,d,w,A;for(c=0;cw&&(e=Math.max(e,Math.abs(v[n][f]-d)/(A-w))))}return e}},39096:function(G,U,t){var g=t(3400);G.exports=function(i,S){i("texttemplate");var x=g.extendFlat({},S.font,{color:"auto",size:"auto"});g.coerceFont(i,"textfont",x)}},35744:function(G,U,t){var g=t(24040),C=t(3400).isArrayOrTypedArray;G.exports=function(S,x,v,p,r,e){var a=[],n=g.traceIs(S,"contour"),f=g.traceIs(S,"histogram"),c=g.traceIs(S,"gl2d"),l,m,h,b=C(x)&&x.length>1;if(b&&!f&&e.type!=="category"){var u=x.length;if(u<=r){if(n||c)a=Array.from(x).slice(0,r);else if(r===1)e.type==="log"?a=[.5*x[0],2*x[0]]:a=[x[0]-.5,x[0]+.5];else if(e.type==="log"){for(a=[Math.pow(x[0],1.5)/Math.pow(x[1],.5)],h=1;h0;)Q=s.c2p(O[st]),st--;for(Q0;)Z=L.c2p(H[st]),st--;Z<$&&(ot=$,$=Z,Z=ot,tt=!0),et&&(Y=O,j=H,O=D.xfill,H=D.yfill);var gt="default";if(it?gt=it==="best"?"smooth":"fast":N._islinear&&I===0&&k===0&&m()&&(gt="fast"),gt!=="fast"){var Tt=it==="best"?0:.5;V=Math.max(-Tt*s._length,V),Q=Math.min((1+Tt)*s._length,Q),$=Math.max(-Tt*L._length,$),Z=Math.min((1+Tt)*L._length,Z)}var wt=Math.round(Q-V),Rt=Math.round(Z-$),bt=V>=s._length||Q<=0||$>=L._length||Z<=0;if(bt){var At=z.selectAll("image").data([]);At.exit().remove(),o(z);return}var mt,Lt;gt==="fast"?(mt=J,Lt=ut):(mt=wt,Lt=Rt);var Ht=document.createElement("canvas");Ht.width=mt,Ht.height=Lt;var Ut=Ht.getContext("2d",{willReadFrequently:!0}),kt=n(N,{noNumericCheck:!0,returnArray:!0}),Vt,It;gt==="fast"?(Vt=X?function(an){return J-1-an}:v.identity,It=tt?function(an){return ut-1-an}:v.identity):(Vt=function(an){return v.constrain(Math.round(s.c2p(O[an])-V),0,wt)},It=function(an){return v.constrain(Math.round(L.c2p(H[an])-$),0,Rt)});var re=It(0),Kt=[re,re],$t=X?0:1,le=tt?0:1,he=0,de=0,xe=0,Se=0,ne,zt,Xt,Jt,Wt;function Ft(an,pn){if(an!==void 0){var gn=kt(an);return gn[0]=Math.round(gn[0]),gn[1]=Math.round(gn[1]),gn[2]=Math.round(gn[2]),he+=pn,de+=gn[0]*pn,xe+=gn[1]*pn,Se+=gn[2]*pn,gn}return[0,0,0,0]}function xt(an,pn,gn,_n){var kn=an[gn.bin0];if(kn===void 0)return Ft(void 0,1);var ni=an[gn.bin1],ci=pn[gn.bin0],di=pn[gn.bin1],li=ni-kn||0,ri=ci-kn||0,wr;return ni===void 0?di===void 0?wr=0:ci===void 0?wr=2*(di-kn):wr=(2*di-ci-kn)*2/3:di===void 0?ci===void 0?wr=0:wr=(2*kn-ni-ci)*2/3:ci===void 0?wr=(2*di-ni-kn)*2/3:wr=di+kn-ni-ci,Ft(kn+gn.frac*li+_n.frac*(ri+gn.frac*wr))}if(gt!=="default"){var yt=0,Et;try{Et=new Uint8Array(mt*Lt*4)}catch{Et=new Array(mt*Lt*4)}if(gt==="smooth"){var Mt=Y||O,Nt=j||H,jt=new Array(Mt.length),ie=new Array(Nt.length),me=new Array(wt),be=Y?w:d,ve=j?w:d,Le,ce,Te;for(st=0;stvr||vr>L._length))for(nt=Ve;ntGt||Gt>s._length)){var Ne=r({x:Yt,y:hr},N,_._fullLayout);Ne.x=Yt,Ne.y=hr;var Oe=D.z[st][nt];Oe===void 0?(Ne.z="",Ne.zLabel=""):(Ne.z=Oe,Ne.zLabel=x.tickText(Ae,Oe,"hover").text);var Qe=D.text&&D.text[st]&&D.text[st][nt];(Qe===void 0||Qe===!1)&&(Qe=""),Ne.text=Qe;var er=v.texttemplateString(ge,Ne,_._fullLayout._d3locale,Ne,N._meta||{});if(er){var fr=er.split("
    "),rr=fr.length,He=0;for(ct=0;ct0&&(r=!0);for(var f=0;fv){var p=v-S[C];return S[C]=v,p}}else return S[C]=v,v;return 0},max:function(C,i,S,x){var v=x[i];if(g(v))if(v=Number(v),g(S[C])){if(S[C]E&&ES){var L=T===C?1:6,M=T===C?"M12":"M1";return function(z,D){var N=b.c2d(z,C,u),I=N.indexOf("-",L);I>0&&(N=N.substr(0,I));var k=b.d2c(N,0,u);if(kp?c>S?c>C*1.1?C:c>i*1.1?i:S:c>x?x:c>v?v:p:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function n(c,l,m,h,b,u){if(h&&c>S){var o=f(l,b,u),d=f(m,b,u),w=c===C?0:1;return o[w]!==d[w]}return Math.floor(m/c)-Math.floor(l/c)>.1}function f(c,l,m){var h=l.c2d(c,C,m).split("-");return h[0]===""&&(h.unshift(),h[0]="-"+h[0]),h}},35852:function(G,U,t){var g=t(38248),C=t(3400),i=t(24040),S=t(54460),x=t(84664),v=t(16964),p=t(10648),r=t(2e3),e=t(67712);function a(m,h){var b=[],u=[],o=h.orientation==="h",d=S.getFromId(m,o?h.yaxis:h.xaxis),w=o?"y":"x",A={x:"y",y:"x"}[w],_=h[w+"calendar"],y=h.cumulative,E,T=n(m,h,d,w),s=T[0],L=T[1],M=typeof s.size=="string",z=[],D=M?z:s,N=[],I=[],k=[],B=0,O=h.histnorm,H=h.histfunc,Y=O.indexOf("density")!==-1,j,et,it;y.enabled&&Y&&(O=O.replace(/ ?density$/,""),Y=!1);var ut=H==="max"||H==="min",J=ut?null:0,X=v.count,tt=p[O],V=!1,Q=function(Ut){return d.r2c(Ut,0,_)},ot;for(C.isArrayOrTypedArray(h[A])&&H!=="count"&&(ot=h[A],V=H==="avg",X=v[H]),E=Q(s.start),et=Q(s.end)+(E-S.tickIncrement(E,s.size,!1,_))/1e6;E=0&&it=mt;E--)if(u[E]){Lt=E;break}for(E=mt;E<=Lt;E++)if(g(b[E])&&g(u[E])){var Ht={p:b[E],s:u[E],b:0};y.enabled||(Ht.pts=k[E],nt?Ht.ph0=Ht.ph1=k[E].length?L[k[E][0]]:b[E]:(h._computePh=!0,Ht.ph0=Rt(z[E]),Ht.ph1=Rt(z[E+1],!0))),At.push(Ht)}return At.length===1&&(At[0].width1=S.tickIncrement(At[0].p,s.size,!1,_)-At[0].p),x(At,h),C.isArrayOrTypedArray(h.selectedpoints)&&C.tagSelected(At,h,Tt),At}function n(m,h,b,u,o){var d=u+"bins",w=m._fullLayout,A=h["_"+u+"bingroup"],_=w._histogramBinOpts[A],y=w.barmode==="overlay",E,T,s,L,M,z,D,N=function(wt){return b.r2c(wt,0,L)},I=function(wt){return b.c2r(wt,0,L)},k=b.type==="date"?function(wt){return wt||wt===0?C.cleanDate(wt,null,L):null}:function(wt){return g(wt)?Number(wt):null};function B(wt,Rt,bt){Rt[wt+"Found"]?(Rt[wt]=k(Rt[wt]),Rt[wt]===null&&(Rt[wt]=bt[wt])):(z[wt]=Rt[wt]=bt[wt],C.nestedProperty(T[0],d+"."+wt).set(bt[wt]))}if(h["_"+u+"autoBinFinished"])delete h["_"+u+"autoBinFinished"];else{T=_.traces;var O=[],H=!0,Y=!1,j=!1;for(E=0;E"u"){if(o)return[it,M,!0];it=f(m,h,b,u,d)}D=s.cumulative||{},D.enabled&&D.currentbin!=="include"&&(D.direction==="decreasing"?it.start=I(S.tickIncrement(N(it.start),it.size,!0,L)):it.end=I(S.tickIncrement(N(it.end),it.size,!1,L))),_.size=it.size,_.sizeFound||(z.size=it.size,C.nestedProperty(T[0],d+".size").set(it.size)),B("start",_,it),B("end",_,it)}M=h["_"+u+"pos0"],delete h["_"+u+"pos0"];var J=h._input[d]||{},X=C.extendFlat({},_),tt=_.start,V=b.r2l(J.start),Q=V!==void 0;if((_.startFound||Q)&&V!==b.r2l(tt)){var ot=Q?V:C.aggNums(Math.min,null,M),$={type:b.type==="category"||b.type==="multicategory"?"linear":b.type,r2l:b.r2l,dtick:_.size,tick0:tt,calendar:L,range:[ot,S.tickIncrement(ot,_.size,!1,L)].map(b.l2r)},Z=S.tickFirst($);Z>b.r2l(ot)&&(Z=S.tickIncrement(Z,_.size,!0,L)),X.start=b.l2r(Z),Q||C.nestedProperty(h,d+".start").set(X.start)}var st=_.end,nt=b.r2l(J.end),ct=nt!==void 0;if((_.endFound||ct)&&nt!==b.r2l(st)){var gt=ct?nt:C.aggNums(Math.max,null,M);X.end=b.l2r(gt),ct||C.nestedProperty(h,d+".start").set(X.end)}var Tt="autobin"+u;return h._input[Tt]===!1&&(h._input[d]=C.extendFlat({},h[d]||{}),delete h._input[Tt],delete h[Tt]),[X,M]}function f(m,h,b,u,o){var d=m._fullLayout,w=c(m,h),A=!1,_=1/0,y=[h],E,T,s;for(E=0;E=0;u--)A(u);else if(h==="increasing"){for(u=1;u=0;u--)m[u]+=m[u+1];b==="exclude"&&(m.push(0),m.shift())}}G.exports={calc:a,calcAllAutoBins:n}},73316:function(G){G.exports={eventDataKeys:["binNumber"]}},80536:function(G,U,t){var g=t(3400),C=t(79811),i=t(24040).traceIs,S=t(20011),x=t(31508).validateCornerradius,v=g.nestedProperty,p=t(71888).getAxisGroup,r=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],e=["x","y"];G.exports=function(n,f){var c=f._histogramBinOpts={},l=[],m={},h=[],b,u,o,d,w,A,_;function y(it,ut){return g.coerce(b._input,b,b._module.attributes,it,ut)}function E(it){return it.orientation==="v"?"x":"y"}function T(it,ut){var J=C.getFromTrace({_fullLayout:f},it,ut);return J.type}function s(it,ut,J){var X=it.uid+"__"+J;ut||(ut=X);var tt=T(it,J),V=it[J+"calendar"]||"",Q=c[ut],ot=!0;Q&&(tt===Q.axType&&V===Q.calendar?(ot=!1,Q.traces.push(it),Q.dirs.push(J)):(ut=X,tt!==Q.axType&&g.warn(["Attempted to group the bins of trace",it.index,"set on a","type:"+tt,"axis","with bins on","type:"+Q.axType,"axis."].join(" ")),V!==Q.calendar&&g.warn(["Attempted to group the bins of trace",it.index,"set with a",V,"calendar","with bins",Q.calendar?"on a "+Q.calendar+" calendar":"w/o a set calendar"].join(" ")))),ot&&(c[ut]={traces:[it],dirs:[J],axType:tt,calendar:it[J+"calendar"]||""}),it["_"+J+"bingroup"]=ut}for(w=0;wN&&L.splice(N,L.length-N),D.length>N&&D.splice(N,D.length-N);var I=[],k=[],B=[],O=typeof s.size=="string",H=typeof z.size=="string",Y=[],j=[],et=O?Y:s,it=H?j:z,ut=0,J=[],X=[],tt=c.histnorm,V=c.histfunc,Q=tt.indexOf("density")!==-1,ot=V==="max"||V==="min",$=ot?null:0,Z=i.count,st=S[tt],nt=!1,ct=[],gt=[],Tt="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Tt&&V!=="count"&&(nt=V==="avg",Z=i[V]);var wt=s.size,Rt=u(s.start),bt=u(s.end)+(Rt-C.tickIncrement(Rt,wt,!1,h))/1e6;for(A=Rt;A=0&&y=0&&E-1,flipY:k.tiling.flip.indexOf("y")>-1,orientation:k.tiling.orientation,pad:{inner:k.tiling.pad},maxDepth:k._maxDepth}),j=Y.descendants(),et=1/0,it=-1/0;j.forEach(function(V){var Q=V.depth;Q>=k._maxDepth?(V.x0=V.x1=(V.x0+V.x1)/2,V.y0=V.y1=(V.y0+V.y1)/2):(et=Math.min(et,Q),it=Math.max(it,Q))}),h=h.data(j,r.getPtId),k._maxVisibleLayers=isFinite(it)?it-et+1:0,h.enter().append("g").classed("slice",!0),T(h,n,z,[u,o],A),h.order();var ut=null;if(E&&M){var J=r.getPtId(M);h.each(function(V){ut===null&&r.getPtId(V)===J&&(ut={x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1})})}var X=function(){return ut||{x0:0,x1:u,y0:0,y1:o}},tt=h;return E&&(tt=tt.transition().each("end",function(){var V=g.select(this);r.setSliceCursor(V,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),tt.each(function(V){V._x0=d(V.x0),V._x1=d(V.x1),V._y0=w(V.y0),V._y1=w(V.y1),V._hoverX=d(V.x1-k.tiling.pad),V._hoverY=w(H?V.y1-k.tiling.pad/2:V.y0+k.tiling.pad/2);var Q=g.select(this),ot=C.ensureSingle(Q,"path","surface",function(nt){nt.style("pointer-events",D?"none":"all")});E?ot.transition().attrTween("d",function(nt){var ct=s(nt,n,X(),[u,o],{orientation:k.tiling.orientation,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1});return function(gt){return A(ct(gt))}}):ot.attr("d",A),Q.call(e,m,c,l,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),ot.call(v,V,k,c,{hovered:!1}),V.x0===V.x1||V.y0===V.y1?V._text="":V._text=a(V,m,k,l,N)||"";var $=C.ensureSingle(Q,"g","slicetext"),Z=C.ensureSingle($,"text","",function(nt){nt.attr("data-notex",1)}),st=C.ensureUniformFontSize(c,r.determineTextFont(k,V,N.font));Z.text(V._text||" ").classed("slicetext",!0).attr("text-anchor",O?"end":B?"start":"middle").call(i.font,st).call(S.convertToTspans,c),V.textBB=i.bBox(Z.node()),V.transform=_(V,{fontSize:st.size}),V.transform.fontSize=st.size,E?Z.transition().attrTween("transform",function(nt){var ct=L(nt,n,X(),[u,o]);return function(gt){return y(ct(gt))}}):Z.attr("transform",y(V))}),ut}},29044:function(G,U,t){G.exports={moduleType:"trace",name:"icicle",basePlotModule:t(59564),categories:[],animatable:!0,attributes:t(97376),layoutAttributes:t(90676),supplyDefaults:t(7045),supplyLayoutDefaults:t(4304),calc:t(73876).r,crossTraceCalc:t(73876).q,plot:t(38364),style:t(47192).style,colorbar:t(5528),meta:{}}},90676:function(G){G.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(G,U,t){var g=t(3400),C=t(90676);G.exports=function(S,x){function v(p,r){return g.coerce(S,x,C,p,r)}v("iciclecolorway",x.colorway),v("extendiciclecolors")}},25132:function(G,U,t){var g=t(74148),C=t(83024);G.exports=function(S,x,v){var p=v.flipX,r=v.flipY,e=v.orientation==="h",a=v.maxDepth,n=x[0],f=x[1];a&&(n=(S.height+1)*x[0]/Math.min(S.height+1,a),f=(S.height+1)*x[1]/Math.min(S.height+1,a));var c=g.partition().padding(v.pad.inner).size(e?[x[1],n]:[x[0],f])(S);return(e||p||r)&&C(c,x,{swapXY:e,flipX:p,flipY:r}),c}},38364:function(G,U,t){var g=t(95808),C=t(67880);G.exports=function(S,x,v,p){return g(S,x,v,p,{type:"icicle",drawDescendants:C})}},47192:function(G,U,t){var g=t(33428),C=t(76308),i=t(3400),S=t(82744).resizeText,x=t(60404);function v(r){var e=r._fullLayout._iciclelayer.selectAll(".trace");S(r,e,"icicle"),e.each(function(a){var n=g.select(this),f=a[0],c=f.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(l){g.select(this).call(p,l,c,r)})})}function p(r,e,a,n){var f=e.data.data,c=!e.children,l=f.i,m=i.castOption(a,l,"marker.line.color")||C.defaultLine,h=i.castOption(a,l,"marker.line.width")||0;r.call(x,e,a,n).style("stroke-width",h).call(C.stroke,m).style("opacity",c?a.leaf.opacity:null)}G.exports={style:v,styleOne:p}},95188:function(G,U,t){for(var g=t(45464),C=t(21776).Ks,i=t(92880).extendFlat,S=t(47797).colormodel,x=["rgb","rgba","rgba256","hsl","hsla"],v=[],p=[],r=0;r0||g.inbox(r-e.y0,r-(e.y0+e.h*a.dy),0)>0)){var c=Math.floor((p-e.x0)/a.dx),l=Math.floor(Math.abs(r-e.y0)/a.dy),m;if(a._hasZ?m=e.z[l][c]:a._hasSource&&(m=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,l,1,1).data),!!m){var h=e.hi||a.hoverinfo,b;if(h){var u=h.split("+");u.indexOf("all")!==-1&&(u=["color"]),u.indexOf("color")!==-1&&(b=!0)}var o=S.colormodel[a.colormodel],d=o.colormodel||a.colormodel,w=d.length,A=a._scaler(m),_=o.suffix,y=[];(a.hovertemplate||b)&&(y.push("["+[A[0]+_[0],A[1]+_[1],A[2]+_[2]].join(", ")),w===4&&y.push(", "+A[3]+_[3]),y.push("]"),y=y.join(""),v.extraText=d.toUpperCase()+": "+y);var E;i(a.hovertext)&&i(a.hovertext[l])?E=a.hovertext[l][c]:i(a.text)&&i(a.text[l])&&(E=a.text[l][c]);var T=f.c2p(e.y0+(l+.5)*a.dy),s=e.x0+(c+.5)*a.dx,L=e.y0+(l+.5)*a.dy,M="["+m.slice(0,a.colormodel.length).join(", ")+"]";return[C.extendFlat(v,{index:[l,c],x0:n.c2p(e.x0+c*a.dx),x1:n.c2p(e.x0+(c+1)*a.dx),y0:T,y1:T,color:A,xVal:s,xLabelVal:s,yVal:L,yLabelVal:L,zLabelVal:M,text:E,hovertemplateLabels:{zLabel:M,colorLabel:y,"color[0]Label":A[0]+_[0],"color[1]Label":A[1]+_[1],"color[2]Label":A[2]+_[2],"color[3]Label":A[3]+_[3]}})]}}}},48928:function(G,U,t){G.exports={attributes:t(95188),supplyDefaults:t(13188),calc:t(93336),plot:t(63715),style:t(28576),hoverPoints:t(24892),eventData:t(79972),moduleType:"trace",name:"image",basePlotModule:t(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(G,U,t){var g=t(33428),C=t(3400),i=C.strTranslate,S=t(9616),x=t(47797),v=t(9188),p=t(2264).STYLE;G.exports=function(e,a,n,f){var c=a.xaxis,l=a.yaxis,m=!e._context._exportedPlot&&v();C.makeTraceGroups(f,n,"im").each(function(h){var b=g.select(this),u=h[0],o=u.trace,d=(o.zsmooth==="fast"||o.zsmooth===!1&&m)&&!o._hasZ&&o._hasSource&&c.type==="linear"&&l.type==="linear";o._realImage=d;var w=u.z,A=u.x0,_=u.y0,y=u.w,E=u.h,T=o.dx,s=o.dy,L,M,z,D,N,I;for(I=0;L===void 0&&I0;)M=c.c2p(A+I*T),I--;for(I=0;D===void 0&&I0;)N=l.c2p(_+I*s),I--;if(MJ[0];if(X||tt){var V=L+B/2,Q=D+O/2;it+="transform:"+i(V+"px",Q+"px")+"scale("+(X?-1:1)+","+(tt?-1:1)+")"+i(-V+"px",-Q+"px")+";"}}et.attr("style",it);var ot=new Promise(function($){if(o._hasZ)$();else if(o._hasSource)if(o._canvas&&o._canvas.el.width===y&&o._canvas.el.height===E&&o._canvas.source===o.source)$();else{var Z=document.createElement("canvas");Z.width=y,Z.height=E;var st=Z.getContext("2d",{willReadFrequently:!0});o._image=o._image||new Image;var nt=o._image;nt.onload=function(){st.drawImage(nt,0,0),o._canvas={el:Z,source:o.source},$()},nt.setAttribute("src",o.source)}}).then(function(){var $,Z;if(o._hasZ)Z=j(function(ct,gt){var Tt=w[gt][ct];return C.isTypedArray(Tt)&&(Tt=Array.from(Tt)),Tt}),$=Z.toDataURL("image/png");else if(o._hasSource)if(d)$=o.source;else{var st=o._canvas.el.getContext("2d",{willReadFrequently:!0}),nt=st.getImageData(0,0,y,E).data;Z=j(function(ct,gt){var Tt=4*(gt*y+ct);return[nt[Tt],nt[Tt+1],nt[Tt+2],nt[Tt+3]]}),$=Z.toDataURL("image/png")}et.attr({"xlink:href":$,height:O,width:B,x:L,y:D})});e._promises.push(ot)})}},28576:function(G,U,t){var g=t(33428);G.exports=function(i){g.select(i).selectAll(".im image").style("opacity",function(S){return S[0].trace.opacity})}},89864:function(G,U,t){var g=t(92880).extendFlat,C=t(92880).extendDeep,i=t(67824).overrideAll,S=t(25376),x=t(22548),v=t(86968).u,p=t(94724),r=t(31780).templatedArray,e=t(48164),a=t(29736).descriptionOnlyNumbers,n=S({editType:"plot",colorEditType:"plot"}),f={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:x.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},c={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},l=r("step",C({},f,{range:c}));G.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:v({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:g({},n,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:a("value")},font:g({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:a("value")},increasing:{symbol:{valType:"string",dflt:e.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:e.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:e.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:e.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:g({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:C({},f,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:x.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:i({range:c,visible:g({},p.visible,{dflt:!0}),tickmode:p.minor.tickmode,nticks:p.nticks,tick0:p.tick0,dtick:p.dtick,tickvals:p.tickvals,ticktext:p.ticktext,ticks:g({},p.ticks,{dflt:"outside"}),ticklen:p.ticklen,tickwidth:p.tickwidth,tickcolor:p.tickcolor,ticklabelstep:p.ticklabelstep,showticklabels:p.showticklabels,labelalias:p.labelalias,tickfont:S({}),tickangle:p.tickangle,tickformat:p.tickformat,tickformatstops:p.tickformatstops,tickprefix:p.tickprefix,showtickprefix:p.showtickprefix,ticksuffix:p.ticksuffix,showticksuffix:p.showticksuffix,separatethousands:p.separatethousands,exponentformat:p.exponentformat,minexponent:p.minexponent,showexponent:p.showexponent,editType:"plot"},"plot"),steps:l,threshold:{line:{color:g({},f.line.color,{}),width:g({},f.line.width,{dflt:1}),editType:"plot"},thickness:g({},f.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},92728:function(G,U,t){var g=t(7316);U.name="indicator",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},79136:function(G){function U(t,g){var C=[],i=g.value;typeof g._lastValue!="number"&&(g._lastValue=g.value);var S=g._lastValue,x=S;return g._hasDelta&&typeof g.delta.reference=="number"&&(x=g.delta.reference),C[0]={y:i,lastY:S,delta:i-x,relativeDelta:(i-x)/x},C}G.exports={calc:U}},12096:function(G){G.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},20424:function(G,U,t){var g=t(3400),C=t(89864),i=t(86968).Q,S=t(31780),x=t(51272),v=t(12096),p=t(26332),r=t(25404),e=t(95936),a=t(42568);function n(c,l,m,h){function b(N,I){return g.coerce(c,l,C,N,I)}i(l,h,b),b("mode"),l._hasNumber=l.mode.indexOf("number")!==-1,l._hasDelta=l.mode.indexOf("delta")!==-1,l._hasGauge=l.mode.indexOf("gauge")!==-1;var u=b("value");l._range=[0,typeof u=="number"?1.5*u:1];var o=new Array(2),d;l._hasNumber&&(b("number.valueformat"),b("number.font.color",h.font.color),b("number.font.family",h.font.family),b("number.font.size"),l.number.font.size===void 0&&(l.number.font.size=v.defaultNumberFontSize,o[0]=!0),b("number.prefix"),b("number.suffix"),d=l.number.font.size);var w;l._hasDelta&&(b("delta.font.color",h.font.color),b("delta.font.family",h.font.family),b("delta.font.size"),l.delta.font.size===void 0&&(l.delta.font.size=(l._hasNumber?.5:1)*(d||v.defaultNumberFontSize),o[1]=!0),b("delta.reference",l.value),b("delta.relative"),b("delta.valueformat",l.delta.relative?"2%":""),b("delta.increasing.symbol"),b("delta.increasing.color"),b("delta.decreasing.symbol"),b("delta.decreasing.color"),b("delta.position"),b("delta.prefix"),b("delta.suffix"),w=l.delta.font.size),l._scaleNumbers=(!l._hasNumber||o[0])&&(!l._hasDelta||o[1])||!1,b("title.font.color",h.font.color),b("title.font.family",h.font.family),b("title.font.size",.25*(d||w||v.defaultNumberFontSize)),b("title.text");var A,_,y,E;function T(N,I){return g.coerce(A,_,C.gauge,N,I)}function s(N,I){return g.coerce(y,E,C.gauge.axis,N,I)}if(l._hasGauge){A=c.gauge,A||(A={}),_=S.newContainer(l,"gauge"),T("shape");var L=l._isBullet=l.gauge.shape==="bullet";L||b("title.align","center");var M=l._isAngular=l.gauge.shape==="angular";M||b("align","center"),T("bgcolor",h.paper_bgcolor),T("borderwidth"),T("bordercolor"),T("bar.color"),T("bar.line.color"),T("bar.line.width");var z=v.valueThickness*(l.gauge.shape==="bullet"?.5:1);T("bar.thickness",z),x(A,_,{name:"steps",handleItemDefaults:f}),T("threshold.value"),T("threshold.thickness"),T("threshold.line.width"),T("threshold.line.color"),y={},A&&(y=A.axis||{}),E=S.newContainer(_,"axis"),s("visible"),l._range=s("range",l._range);var D={noAutotickangles:!0,outerTicks:!0};p(y,E,s,"linear"),a(y,E,s,"linear",D),e(y,E,s,"linear",D),r(y,E,s,D)}else b("title.align","center"),b("align","center"),l._isAngular=l._isBullet=!1;l._length=null}function f(c,l){function m(h,b){return g.coerce(c,l,C.gauge.steps,h,b)}m("color"),m("line.color"),m("line.width"),m("range"),m("thickness")}G.exports={supplyDefaults:n}},43480:function(G,U,t){G.exports={moduleType:"trace",name:"indicator",basePlotModule:t(92728),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:t(89864),supplyDefaults:t(20424).supplyDefaults,calc:t(79136).calc,plot:t(97864),meta:{}}},97864:function(G,U,t){var g=t(33428),C=t(67756).qy,i=t(67756).Gz,S=t(3400),x=S.strScale,v=S.strTranslate,p=S.rad2deg,r=t(84284).MID_SHIFT,e=t(43616),a=t(12096),n=t(72736),f=t(54460),c=t(28336),l=t(37668),m=t(94724),h=t(76308),b={left:"start",center:"middle",right:"end"},u={left:0,center:.5,right:1},o=/[yzafpnµmkMGTPEZY]/;function d(D){return D&&D.duration>0}G.exports=function(N,I,k,B){var O=N._fullLayout,H;d(k)&&B&&(H=B()),S.makeTraceGroups(O._indicatorlayer,I,"trace").each(function(Y){var j=Y[0],et=j.trace,it=g.select(this),ut=et._hasGauge,J=et._isAngular,X=et._isBullet,tt=et.domain,V={w:O._size.w*(tt.x[1]-tt.x[0]),h:O._size.h*(tt.y[1]-tt.y[0]),l:O._size.l+O._size.w*tt.x[0],r:O._size.r+O._size.w*(1-tt.x[1]),t:O._size.t+O._size.h*(1-tt.y[1]),b:O._size.b+O._size.h*tt.y[0]},Q=V.l+V.w/2,ot=V.t+V.h/2,$=Math.min(V.w/2,V.h),Z=a.innerRadius*$,st,nt,ct,gt=et.align||"center";if(nt=ot,!ut)st=V.l+u[gt]*V.w,ct=function(kt){return s(kt,V.w,V.h)};else if(J&&(st=Q,nt=ot+$/2,ct=function(kt){return L(kt,.9*Z)}),X){var Tt=a.bulletPadding,wt=1-a.bulletNumberDomainSize+Tt;st=V.l+(wt+(1-wt)*u[gt])*V.w,ct=function(kt){return s(kt,(a.bulletNumberDomainSize-Tt)*V.w,V.h)}}_(N,it,Y,{numbersX:st,numbersY:nt,numbersScaler:ct,transitionOpts:k,onComplete:H});var Rt,bt;ut&&(Rt={range:et.gauge.axis.range,color:et.gauge.bgcolor,line:{color:et.gauge.bordercolor,width:0},thickness:1},bt={range:et.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:et.gauge.bordercolor,width:et.gauge.borderwidth},thickness:1});var At=it.selectAll("g.angular").data(J?Y:[]);At.exit().remove();var mt=it.selectAll("g.angularaxis").data(J?Y:[]);mt.exit().remove(),J&&A(N,it,Y,{radius:$,innerRadius:Z,gauge:At,layer:mt,size:V,gaugeBg:Rt,gaugeOutline:bt,transitionOpts:k,onComplete:H});var Lt=it.selectAll("g.bullet").data(X?Y:[]);Lt.exit().remove();var Ht=it.selectAll("g.bulletaxis").data(X?Y:[]);Ht.exit().remove(),X&&w(N,it,Y,{gauge:Lt,layer:Ht,size:V,gaugeBg:Rt,gaugeOutline:bt,transitionOpts:k,onComplete:H});var Ut=it.selectAll("text.title").data(Y);Ut.exit().remove(),Ut.enter().append("text").classed("title",!0),Ut.attr("text-anchor",function(){return X?b.right:b[et.title.align]}).text(et.title.text).call(e.font,et.title.font).call(n.convertToTspans,N),Ut.attr("transform",function(){var kt=V.l+V.w*u[et.title.align],Vt,It=a.titlePadding,re=e.bBox(Ut.node());if(ut){if(J)if(et.gauge.axis.visible){var Kt=e.bBox(mt.node());Vt=Kt.top-It-re.bottom}else Vt=V.t+V.h/2-$/2-re.bottom-It;X&&(Vt=nt-(re.top+re.bottom)/2,kt=V.l-a.bulletPadding*V.w)}else Vt=et._numbersTop-It-re.bottom;return v(kt,Vt)})})};function w(D,N,I,k){var B=I[0].trace,O=k.gauge,H=k.layer,Y=k.gaugeBg,j=k.gaugeOutline,et=k.size,it=B.domain,ut=k.transitionOpts,J=k.onComplete,X,tt,V,Q,ot;O.enter().append("g").classed("bullet",!0),O.attr("transform",v(et.l,et.t)),H.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),H.selectAll("g.xbulletaxistick,path,text").remove();var $=et.h,Z=B.gauge.bar.thickness*$,st=it.x[0],nt=it.x[0]+(it.x[1]-it.x[0])*(B._hasNumber||B._hasDelta?1-a.bulletNumberDomainSize:1);X=T(D,B.gauge.axis),X._id="xbulletaxis",X.domain=[st,nt],X.setScale(),tt=f.calcTicks(X),V=f.makeTransTickFn(X),Q=f.getTickSigns(X)[2],ot=et.t+et.h,X.visible&&(f.drawTicks(D,X,{vals:X.ticks==="inside"?f.clipEnds(X,tt):tt,layer:H,path:f.makeTickPath(X,ot,Q),transFn:V}),f.drawLabels(D,X,{vals:tt,layer:H,transFn:V,labelFns:f.makeLabelFns(X,ot)}));function ct(mt){mt.attr("width",function(Lt){return Math.max(0,X.c2p(Lt.range[1])-X.c2p(Lt.range[0]))}).attr("x",function(Lt){return X.c2p(Lt.range[0])}).attr("y",function(Lt){return .5*(1-Lt.thickness)*$}).attr("height",function(Lt){return Lt.thickness*$})}var gt=[Y].concat(B.gauge.steps),Tt=O.selectAll("g.bg-bullet").data(gt);Tt.enter().append("g").classed("bg-bullet",!0).append("rect"),Tt.select("rect").call(ct).call(y),Tt.exit().remove();var wt=O.selectAll("g.value-bullet").data([B.gauge.bar]);wt.enter().append("g").classed("value-bullet",!0).append("rect"),wt.select("rect").attr("height",Z).attr("y",($-Z)/2).call(y),d(ut)?wt.select("rect").transition().duration(ut.duration).ease(ut.easing).each("end",function(){J&&J()}).each("interrupt",function(){J&&J()}).attr("width",Math.max(0,X.c2p(Math.min(B.gauge.axis.range[1],I[0].y)))):wt.select("rect").attr("width",typeof I[0].y=="number"?Math.max(0,X.c2p(Math.min(B.gauge.axis.range[1],I[0].y))):0),wt.exit().remove();var Rt=I.filter(function(){return B.gauge.threshold.value||B.gauge.threshold.value===0}),bt=O.selectAll("g.threshold-bullet").data(Rt);bt.enter().append("g").classed("threshold-bullet",!0).append("line"),bt.select("line").attr("x1",X.c2p(B.gauge.threshold.value)).attr("x2",X.c2p(B.gauge.threshold.value)).attr("y1",(1-B.gauge.threshold.thickness)/2*$).attr("y2",(1-(1-B.gauge.threshold.thickness)/2)*$).call(h.stroke,B.gauge.threshold.line.color).style("stroke-width",B.gauge.threshold.line.width),bt.exit().remove();var At=O.selectAll("g.gauge-outline").data([j]);At.enter().append("g").classed("gauge-outline",!0).append("rect"),At.select("rect").call(ct).call(y),At.exit().remove()}function A(D,N,I,k){var B=I[0].trace,O=k.size,H=k.radius,Y=k.innerRadius,j=k.gaugeBg,et=k.gaugeOutline,it=[O.l+O.w/2,O.t+O.h/2+H/2],ut=k.gauge,J=k.layer,X=k.transitionOpts,tt=k.onComplete,V=Math.PI/2;function Q($t){var le=B.gauge.axis.range[0],he=B.gauge.axis.range[1],de=($t-le)/(he-le)*Math.PI-V;return de<-V?-V:de>V?V:de}function ot($t){return g.svg.arc().innerRadius((Y+H)/2-$t/2*(H-Y)).outerRadius((Y+H)/2+$t/2*(H-Y)).startAngle(-V)}function $($t){$t.attr("d",function(le){return ot(le.thickness).startAngle(Q(le.range[0])).endAngle(Q(le.range[1]))()})}var Z,st,nt,ct;ut.enter().append("g").classed("angular",!0),ut.attr("transform",v(it[0],it[1])),J.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),J.selectAll("g.xangularaxistick,path,text").remove(),Z=T(D,B.gauge.axis),Z.type="linear",Z.range=B.gauge.axis.range,Z._id="xangularaxis",Z.ticklabeloverflow="allow",Z.setScale();var gt=function($t){return(Z.range[0]-$t.x)/(Z.range[1]-Z.range[0])*Math.PI+Math.PI},Tt={},wt=f.makeLabelFns(Z,0),Rt=wt.labelStandoff;Tt.xFn=function($t){var le=gt($t);return Math.cos(le)*Rt},Tt.yFn=function($t){var le=gt($t),he=Math.sin(le)>0?.2:1;return-Math.sin(le)*(Rt+$t.fontSize*he)+Math.abs(Math.cos(le))*($t.fontSize*r)},Tt.anchorFn=function($t){var le=gt($t),he=Math.cos(le);return Math.abs(he)<.1?"middle":he>0?"start":"end"},Tt.heightFn=function($t,le,he){var de=gt($t);return-.5*(1+Math.sin(de))*he};var bt=function($t){return v(it[0]+H*Math.cos($t),it[1]-H*Math.sin($t))};nt=function($t){return bt(gt($t))};var At=function($t){var le=gt($t);return bt(le)+"rotate("+-p(le)+")"};if(st=f.calcTicks(Z),ct=f.getTickSigns(Z)[2],Z.visible){ct=Z.ticks==="inside"?-1:1;var mt=(Z.linewidth||1)/2;f.drawTicks(D,Z,{vals:st,layer:J,path:"M"+ct*mt+",0h"+ct*Z.ticklen,transFn:At}),f.drawLabels(D,Z,{vals:st,layer:J,transFn:nt,labelFns:Tt})}var Lt=[j].concat(B.gauge.steps),Ht=ut.selectAll("g.bg-arc").data(Lt);Ht.enter().append("g").classed("bg-arc",!0).append("path"),Ht.select("path").call($).call(y),Ht.exit().remove();var Ut=ot(B.gauge.bar.thickness),kt=ut.selectAll("g.value-arc").data([B.gauge.bar]);kt.enter().append("g").classed("value-arc",!0).append("path");var Vt=kt.select("path");d(X)?(Vt.transition().duration(X.duration).ease(X.easing).each("end",function(){tt&&tt()}).each("interrupt",function(){tt&&tt()}).attrTween("d",E(Ut,Q(I[0].lastY),Q(I[0].y))),B._lastValue=I[0].y):Vt.attr("d",typeof I[0].y=="number"?Ut.endAngle(Q(I[0].y)):"M0,0Z"),Vt.call(y),kt.exit().remove(),Lt=[];var It=B.gauge.threshold.value;(It||It===0)&&Lt.push({range:[It,It],color:B.gauge.threshold.color,line:{color:B.gauge.threshold.line.color,width:B.gauge.threshold.line.width},thickness:B.gauge.threshold.thickness});var re=ut.selectAll("g.threshold-arc").data(Lt);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call($).call(y),re.exit().remove();var Kt=ut.selectAll("g.gauge-outline").data([et]);Kt.enter().append("g").classed("gauge-outline",!0).append("path"),Kt.select("path").call($).call(y),Kt.exit().remove()}function _(D,N,I,k){var B=I[0].trace,O=k.numbersX,H=k.numbersY,Y=B.align||"center",j=b[Y],et=k.transitionOpts,it=k.onComplete,ut=S.ensureSingle(N,"g","numbers"),J,X,tt,V=[];B._hasNumber&&V.push("number"),B._hasDelta&&(V.push("delta"),B.delta.position==="left"&&V.reverse());var Q=ut.selectAll("text").data(V);Q.enter().append("text"),Q.attr("text-anchor",function(){return j}).attr("class",function(bt){return bt}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Q.exit().remove();function ot(bt,At,mt,Lt){if(bt.match("s")&&mt>=0!=Lt>=0&&!At(mt).slice(-1).match(o)&&!At(Lt).slice(-1).match(o)){var Ht=bt.slice().replace("s","f").replace(/\d+/,function(kt){return parseInt(kt)-1}),Ut=T(D,{tickformat:Ht});return function(kt){return Math.abs(kt)<1?f.tickText(Ut,kt).text:At(kt)}}else return At}function $(){var bt=T(D,{tickformat:B.number.valueformat},B._range);bt.setScale(),f.prepTicks(bt);var At=function(kt){return f.tickText(bt,kt).text},mt=B.number.suffix,Lt=B.number.prefix,Ht=ut.select("text.number");function Ut(){var kt=typeof I[0].y=="number"?Lt+At(I[0].y)+mt:"-";Ht.text(kt).call(e.font,B.number.font).call(n.convertToTspans,D)}return d(et)?Ht.transition().duration(et.duration).ease(et.easing).each("end",function(){Ut(),it&&it()}).each("interrupt",function(){Ut(),it&&it()}).attrTween("text",function(){var kt=g.select(this),Vt=i(I[0].lastY,I[0].y);B._lastValue=I[0].y;var It=ot(B.number.valueformat,At,I[0].lastY,I[0].y);return function(re){kt.text(Lt+It(Vt(re))+mt)}}):Ut(),J=M(Lt+At(I[0].y)+mt,B.number.font,j,D),Ht}function Z(){var bt=T(D,{tickformat:B.delta.valueformat},B._range);bt.setScale(),f.prepTicks(bt);var At=function(re){return f.tickText(bt,re).text},mt=B.delta.suffix,Lt=B.delta.prefix,Ht=function(re){var Kt=B.delta.relative?re.relativeDelta:re.delta;return Kt},Ut=function(re,Kt){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?B.delta.increasing.symbol:B.delta.decreasing.symbol)+Lt+Kt(re)+mt},kt=function(re){return re.delta>=0?B.delta.increasing.color:B.delta.decreasing.color};B._deltaLastValue===void 0&&(B._deltaLastValue=Ht(I[0]));var Vt=ut.select("text.delta");Vt.call(e.font,B.delta.font).call(h.fill,kt({delta:B._deltaLastValue}));function It(){Vt.text(Ut(Ht(I[0]),At)).call(h.fill,kt(I[0])).call(n.convertToTspans,D)}return d(et)?Vt.transition().duration(et.duration).ease(et.easing).tween("text",function(){var re=g.select(this),Kt=Ht(I[0]),$t=B._deltaLastValue,le=ot(B.delta.valueformat,At,$t,Kt),he=i($t,Kt);return B._deltaLastValue=Kt,function(de){re.text(Ut(he(de),le)),re.call(h.fill,kt({delta:he(de)}))}}).each("end",function(){It(),it&&it()}).each("interrupt",function(){It(),it&&it()}):It(),X=M(Ut(Ht(I[0]),At),B.delta.font,j,D),Vt}var st=B.mode+B.align,nt;if(B._hasDelta&&(nt=Z(),st+=B.delta.position+B.delta.font.size+B.delta.font.family+B.delta.valueformat,st+=B.delta.increasing.symbol+B.delta.decreasing.symbol,tt=X),B._hasNumber&&($(),st+=B.number.font.size+B.number.font.family+B.number.valueformat+B.number.suffix+B.number.prefix,tt=J),B._hasDelta&&B._hasNumber){var ct=[(J.left+J.right)/2,(J.top+J.bottom)/2],gt=[(X.left+X.right)/2,(X.top+X.bottom)/2],Tt,wt,Rt=.75*B.delta.font.size;B.delta.position==="left"&&(Tt=z(B,"deltaPos",0,-1*(J.width*u[B.align]+X.width*(1-u[B.align])+Rt),st,Math.min),wt=ct[1]-gt[1],tt={width:J.width+X.width+Rt,height:Math.max(J.height,X.height),left:X.left+Tt,right:J.right,top:Math.min(J.top,X.top+wt),bottom:Math.max(J.bottom,X.bottom+wt)}),B.delta.position==="right"&&(Tt=z(B,"deltaPos",0,J.width*(1-u[B.align])+X.width*u[B.align]+Rt,st,Math.max),wt=ct[1]-gt[1],tt={width:J.width+X.width+Rt,height:Math.max(J.height,X.height),left:J.left,right:X.right+Tt,top:Math.min(J.top,X.top+wt),bottom:Math.max(J.bottom,X.bottom+wt)}),B.delta.position==="bottom"&&(Tt=null,wt=X.height,tt={width:Math.max(J.width,X.width),height:J.height+X.height,left:Math.min(J.left,X.left),right:Math.max(J.right,X.right),top:J.bottom-J.height,bottom:J.bottom+X.height}),B.delta.position==="top"&&(Tt=null,wt=J.top,tt={width:Math.max(J.width,X.width),height:J.height+X.height,left:Math.min(J.left,X.left),right:Math.max(J.right,X.right),top:J.bottom-J.height-X.height,bottom:J.bottom}),nt.attr({dx:Tt,dy:wt})}(B._hasNumber||B._hasDelta)&&ut.attr("transform",function(){var bt=k.numbersScaler(tt);st+=bt[2];var At=z(B,"numbersScale",1,bt[0],st,Math.min),mt;B._scaleNumbers||(At=1),B._isAngular?mt=H-At*tt.bottom:mt=H-At*(tt.top+tt.bottom)/2,B._numbersTop=At*tt.top+mt;var Lt=tt[Y];Y==="center"&&(Lt=(tt.left+tt.right)/2);var Ht=O-At*Lt;return Ht=z(B,"numbersTranslate",0,Ht,st,Math.max),v(Ht,mt)+x(At)})}function y(D){D.each(function(N){h.stroke(g.select(this),N.line.color)}).each(function(N){h.fill(g.select(this),N.color)}).style("stroke-width",function(N){return N.line.width})}function E(D,N,I){return function(){var k=C(N,I);return function(B){return D.endAngle(k(B))()}}}function T(D,N,I){var k=D._fullLayout,B=S.extendFlat({type:"linear",ticks:"outside",range:I,showline:!0},N),O={type:"linear",_id:"x"+N._id},H={letter:"x",font:k.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function Y(j,et){return S.coerce(B,O,m,j,et)}return c(B,O,Y,H,k),l(B,O,Y,H),O}function s(D,N,I){var k=Math.min(N/D.width,I/D.height);return[k,D,N+"x"+I]}function L(D,N){var I=Math.sqrt(D.width/2*(D.width/2)+D.height*D.height),k=N/I;return[k,D,N]}function M(D,N,I,k){var B=document.createElementNS("http://www.w3.org/2000/svg","text"),O=g.select(B);return O.text(D).attr("x",0).attr("y",0).attr("text-anchor",I).attr("data-unformatted",D).call(n.convertToTspans,k).call(e.font,N),e.bBox(O.node())}function z(D,N,I,k,B,O){var H="_cache"+N;D[H]&&D[H].key===B||(D[H]={key:B,value:I});var Y=S.aggNums(O,null,[D[H].value,k],2);return D[H].value=Y,Y}},50048:function(G,U,t){var g=t(49084),C=t(29736).axisHoverFormat,i=t(21776).Ks,S=t(52948),x=t(45464),v=t(92880).extendFlat,p=t(67824).overrideAll;function r(n){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function e(n){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var a=G.exports=p(v({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:r(),y:r(),z:r()},caps:{x:e(),y:e(),z:e()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:i(),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),valuehoverformat:C("value",1),showlegend:v({},x.showlegend,{dflt:!1})},g("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:S.opacity,lightposition:S.lightposition,lighting:S.lighting,flatshading:S.flatshading,contour:S.contour,hoverinfo:v({},x.hoverinfo)}),"calc","nested");a.flatshading.dflt=!0,a.lighting.facenormalsepsilon.dflt=0,a.x.editType=a.y.editType=a.z.editType=a.value.editType="calc+clearAxisTypes",a.transforms=void 0},62624:function(G,U,t){var g=t(47128),C=t(3832).processGrid,i=t(3832).filter;G.exports=function(x,v){v._len=Math.min(v.x.length,v.y.length,v.z.length,v.value.length),v._x=i(v.x,v._len),v._y=i(v.y,v._len),v._z=i(v.z,v._len),v._value=i(v.value,v._len);var p=C(v);v._gridFill=p.fill,v._Xs=p.Xs,v._Ys=p.Ys,v._Zs=p.Zs,v._len=p.len;for(var r=1/0,e=-1/0,a=0;a0;m--){var h=Math.min(l[m],l[m-1]),b=Math.max(l[m],l[m-1]);if(b>h&&h-1}function Z(Jt,Wt){return Jt===null?Wt:Jt}function st(Jt,Wt,Ft){et();var xt=[Wt],yt=[Ft];if(V>=1)xt=[Wt],yt=[Ft];else if(V>0){var Et=ot(Wt,Ft);xt=Et.xyzv,yt=Et.abc}for(var Mt=0;Mt-1?Ft[jt]:j(ie,me,be);Le>-1?Nt[jt]=Le:Nt[jt]=ut(ie,me,be,Z(Jt,ve))}J(Nt[0],Nt[1],Nt[2])}}function nt(Jt,Wt,Ft){var xt=function(yt,Et,Mt){st(Jt,[Wt[yt],Wt[Et],Wt[Mt]],[Ft[yt],Ft[Et],Ft[Mt]])};xt(0,1,2),xt(2,3,0)}function ct(Jt,Wt,Ft){var xt=function(yt,Et,Mt){st(Jt,[Wt[yt],Wt[Et],Wt[Mt]],[Ft[yt],Ft[Et],Ft[Mt]])};xt(0,1,2),xt(3,0,1),xt(2,3,0),xt(1,2,3)}function gt(Jt,Wt,Ft,xt){var yt=Jt[3];ytxt&&(yt=xt);for(var Et=(Jt[3]-yt)/(Jt[3]-Wt[3]+1e-9),Mt=[],Nt=0;Nt<4;Nt++)Mt[Nt]=(1-Et)*Jt[Nt]+Et*Wt[Nt];return Mt}function Tt(Jt,Wt,Ft){return Jt>=Wt&&Jt<=Ft}function wt(Jt){var Wt=.001*(k-I);return Jt>=I-Wt&&Jt<=k+Wt}function Rt(Jt){for(var Wt=[],Ft=0;Ft<4;Ft++){var xt=Jt[Ft];Wt.push([c._x[xt],c._y[xt],c._z[xt],c._value[xt]])}return Wt}var bt=3;function At(Jt,Wt,Ft,xt,yt,Et){Et||(Et=1),Ft=[-1,-1,-1];var Mt=!1,Nt=[Tt(Wt[0][3],xt,yt),Tt(Wt[1][3],xt,yt),Tt(Wt[2][3],xt,yt)];if(!Nt[0]&&!Nt[1]&&!Nt[2])return!1;var jt=function(me,be,ve){return wt(be[0][3])&&wt(be[1][3])&&wt(be[2][3])?(st(me,be,ve),!0):EtNt?[D,Et]:[Et,N];he(Wt,jt[0],jt[1])}}var ie=[[Math.min(I,N),Math.max(I,N)],[Math.min(D,k),Math.max(D,k)]];["x","y","z"].forEach(function(me){for(var be=[],ve=0;ve0&&(pe.push(or.id),me==="x"?Xe.push([or.distRatio,0,0]):me==="y"?Xe.push([0,or.distRatio,0]):Xe.push([0,0,or.distRatio]))}else me==="x"?ir=ne(1,T-1):me==="y"?ir=ne(1,s-1):ir=ne(1,L-1);pe.length>0&&(me==="x"?be[Le]=de(Jt,pe,ce,Te,Xe,be[Le]):me==="y"?be[Le]=xe(Jt,pe,ce,Te,Xe,be[Le]):be[Le]=Se(Jt,pe,ce,Te,Xe,be[Le]),Le++),ir.length>0&&(me==="x"?be[Le]=It(Jt,ir,ce,Te,be[Le]):me==="y"?be[Le]=re(Jt,ir,ce,Te,be[Le]):be[Le]=Kt(Jt,ir,ce,Te,be[Le]),Le++)}var $e=c.caps[me];$e.show&&$e.fill&&(Q($e.fill),me==="x"?be[Le]=It(Jt,[0,T-1],ce,Te,be[Le]):me==="y"?be[Le]=re(Jt,[0,s-1],ce,Te,be[Le]):be[Le]=Kt(Jt,[0,L-1],ce,Te,be[Le]),Le++)}}),d===0&&it(),c._meshX=B,c._meshY=O,c._meshZ=H,c._meshIntensity=Y,c._Xs=_,c._Ys=y,c._Zs=E}return Xt(),c}function f(c,l){var m=c.glplot.gl,h=g({gl:m}),b=new r(c,h,l.uid);return h._trace=b,b.update(l),c.glplot.add(h),b}G.exports={findNearestOnAxis:p,generateIsoMeshes:n,createIsosurfaceTrace:f}},70548:function(G,U,t){var g=t(3400),C=t(24040),i=t(50048),S=t(27260);function x(p,r,e,a){function n(f,c){return g.coerce(p,r,i,f,c)}v(p,r,e,a,n)}function v(p,r,e,a,n){var f=n("isomin"),c=n("isomax");c!=null&&f!==void 0&&f!==null&&f>c&&(r.isomin=null,r.isomax=null);var l=n("x"),m=n("y"),h=n("z"),b=n("value");if(!l||!l.length||!m||!m.length||!h||!h.length||!b||!b.length){r.visible=!1;return}var u=C.getComponentMethod("calendars","handleTraceDefaults");u(p,r,["x","y","z"],a),n("valuehoverformat"),["x","y","z"].forEach(function(A){n(A+"hoverformat");var _="caps."+A,y=n(_+".show");y&&n(_+".fill");var E="slices."+A,T=n(E+".show");T&&(n(E+".fill"),n(E+".locations"))});var o=n("spaceframe.show");o&&n("spaceframe.fill");var d=n("surface.show");d&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var w=n("contour.show");w&&(n("contour.color"),n("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(A){n(A)}),S(p,r,a,n,{prefix:"",cLetter:"c"}),r._length=null}G.exports={supplyDefaults:x,supplyIsoDefaults:v}},6296:function(G,U,t){G.exports={attributes:t(50048),supplyDefaults:t(70548).supplyDefaults,calc:t(62624),colorbar:{min:"cmin",max:"cmax"},plot:t(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:t(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(G,U,t){var g=t(49084),C=t(29736).axisHoverFormat,i=t(21776).Ks,S=t(16716),x=t(45464),v=t(92880).extendFlat;G.exports=v({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"}),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},g("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:S.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:v({},S.contours.x.show,{}),color:S.contours.x.color,width:S.contours.x.width,editType:"calc"},lightposition:{x:v({},S.lightposition.x,{dflt:1e5}),y:v({},S.lightposition.y,{dflt:1e5}),z:v({},S.lightposition.z,{dflt:0}),editType:"calc"},lighting:v({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},S.lighting),hoverinfo:v({},x.hoverinfo,{editType:"calc"}),showlegend:v({},x.showlegend,{dflt:!1})})},1876:function(G,U,t){var g=t(47128);G.exports=function(i,S){S.intensity&&g(i,S,{vals:S.intensity,containerStr:"",cLetter:"c"})}},576:function(G,U,t){var g=t(67792).gl_mesh3d,C=t(67792).delaunay_triangulate,i=t(67792).alpha_shape,S=t(67792).convex_hull,x=t(33040).parseColorScale,v=t(3400).isArrayOrTypedArray,p=t(43080),r=t(8932).extractOpts,e=t(52094);function a(u,o,d){this.scene=u,this.uid=d,this.mesh=o,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var n=a.prototype;n.handlePick=function(u){if(u.object===this.mesh){var o=u.index=u.data.index;u.data._cellCenter?u.traceCoordinate=u.data.dataCoordinate:u.traceCoordinate=[this.data.x[o],this.data.y[o],this.data.z[o]];var d=this.data.hovertext||this.data.text;return v(d)&&d[o]!==void 0?u.textLabel=d[o]:d&&(u.textLabel=d),!0}};function f(u){for(var o=[],d=u.length,w=0;w=o-.5)return!1;return!0}n.update=function(u){var o=this.scene,d=o.fullSceneLayout;this.data=u;var w=u.x.length,A=e(c(d.xaxis,u.x,o.dataScale[0],u.xcalendar),c(d.yaxis,u.y,o.dataScale[1],u.ycalendar),c(d.zaxis,u.z,o.dataScale[2],u.zcalendar)),_;if(u.i&&u.j&&u.k){if(u.i.length!==u.j.length||u.j.length!==u.k.length||!h(u.i,w)||!h(u.j,w)||!h(u.k,w))return;_=e(l(u.i),l(u.j),l(u.k))}else u.alphahull===0?_=S(A):u.alphahull>0?_=i(u.alphahull,A):_=m(u.delaunayaxis,A);var y={positions:A,cells:_,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:p(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading};if(u.intensity){var E=r(u);this.color="#fff";var T=u.intensitymode;y[T+"Intensity"]=u.intensity,y[T+"IntensityBounds"]=[E.min,E.max],y.colormap=x(u)}else u.vertexcolor?(this.color=u.vertexcolor[0],y.vertexColors=f(u.vertexcolor)):u.facecolor?(this.color=u.facecolor[0],y.cellColors=f(u.facecolor)):(this.color=u.color,y.meshColor=p(u.color));this.mesh.update(y)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function b(u,o){var d=u.glplot.gl,w=g({gl:d}),A=new a(u,w,o.uid);return w._trace=A,A.update(o),u.glplot.add(w),A}G.exports=b},74212:function(G,U,t){var g=t(24040),C=t(3400),i=t(27260),S=t(52948);G.exports=function(v,p,r,e){function a(m,h){return C.coerce(v,p,S,m,h)}function n(m){var h=m.map(function(b){var u=a(b);return u&&C.isArrayOrTypedArray(u)?u:null});return h.every(function(b){return b&&b.length===h[0].length})&&h}var f=n(["x","y","z"]);if(!f){p.visible=!1;return}if(n(["i","j","k"]),p.i&&(!p.j||!p.k)||p.j&&(!p.k||!p.i)||p.k&&(!p.i||!p.j)){p.visible=!1;return}var c=g.getComponentMethod("calendars","handleTraceDefaults");c(v,p,["x","y","z"],e),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(m){a(m)});var l=a("contour.show");l&&(a("contour.color"),a("contour.width")),"intensity"in v?(a("intensity"),a("intensitymode"),i(v,p,e,a,{prefix:"",cLetter:"c"})):(p.showscale=!1,"facecolor"in v?a("facecolor"):"vertexcolor"in v?a("vertexcolor"):a("color",r)),a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),p._length=null}},7404:function(G,U,t){G.exports={attributes:t(52948),supplyDefaults:t(74212),calc:t(1876),colorbar:{min:"cmin",max:"cmax"},plot:t(576),moduleType:"trace",name:"mesh3d",basePlotModule:t(12536),categories:["gl3d","showLegend"],meta:{}}},20279:function(G,U,t){var g=t(3400).extendFlat,C=t(52904),i=t(29736).axisHoverFormat,S=t(98192).u,x=t(55756),v=t(48164),p=v.INCREASING.COLOR,r=v.DECREASING.COLOR,e=C.line;function a(n){return{line:{color:g({},e.color,{dflt:n}),width:e.width,dash:S,editType:"style"},editType:"style"}}G.exports={xperiod:C.xperiod,xperiod0:C.xperiod0,xperiodalignment:C.xperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:g({},e.width,{}),dash:g({},S,{}),editType:"style"},increasing:a(p),decreasing:a(r),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:g({},x.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},42812:function(G,U,t){var g=t(3400),C=g._,i=t(54460),S=t(1220),x=t(39032).BADNUM;function v(a,n){var f=i.getFromId(a,n.xaxis),c=i.getFromId(a,n.yaxis),l=e(a,f,n),m=n._minDiff;n._minDiff=null;var h=n._origX;n._origX=null;var b=n._xcalc;n._xcalc=null;var u=r(a,n,h,b,c,p);return n._extremes[f._id]=i.findExtremes(f,b,{vpad:m/2}),u.length?(g.extendFlat(u[0].t,{wHover:m/2,tickLen:l}),u):[{t:{empty:!0}}]}function p(a,n,f,c){return{o:a,h:n,l:f,c}}function r(a,n,f,c,l,m){for(var h=l.makeCalcdata(n,"open"),b=l.makeCalcdata(n,"high"),u=l.makeCalcdata(n,"low"),o=l.makeCalcdata(n,"close"),d=g.isArrayOrTypedArray(n.text),w=g.isArrayOrTypedArray(n.hovertext),A=!0,_=null,y=!!n.xperiodalignment,E=[],T=0;T_):A=D>L,_=D;var N=m(L,M,z,D);N.pos=s,N.yc=(L+D)/2,N.i=T,N.dir=A?"increasing":"decreasing",N.x=N.pos,N.y=[z,M],y&&(N.orig_p=f[T]),d&&(N.tx=n.text[T]),w&&(N.htx=n.hovertext[T]),E.push(N)}else E.push({pos:s,empty:!0})}return n._extremes[l._id]=i.findExtremes(l,g.concat(u,b),{padded:!0}),E.length&&(E[0].t={labels:{open:C(a,"open:")+" ",high:C(a,"high:")+" ",low:C(a,"low:")+" ",close:C(a,"close:")+" "}}),E}function e(a,n,f){var c=f._minDiff;if(!c){var l=a._fullData,m=[];c=1/0;var h;for(h=0;h"+o.labels[D]+g.hoverLabelText(b,N,u.yhoverformat)):(k=C.extendFlat({},w),k.y0=k.y1=I,k.yLabelVal=N,k.yLabel=o.labels[D]+g.hoverLabelText(b,N,u.yhoverformat),k.name="",d.push(k),M[N]=k)}return d}function n(f,c,l,m){var h=f.cd,b=f.ya,u=h[0].trace,o=h[0].t,d=e(f,c,l,m);if(!d)return[];var w=d.index,A=h[w],_=d.index=A.i,y=A.dir;function E(N){return o.labels[N]+g.hoverLabelText(b,u[N][_],u.yhoverformat)}var T=A.hi||u.hoverinfo,s=T.split("+"),L=T==="all",M=L||s.indexOf("y")!==-1,z=L||s.indexOf("text")!==-1,D=M?[E("open"),E("high"),E("low"),E("close")+" "+p[y]]:[];return z&&x(A,u,D),d.extraText=D.join("
    "),d.y0=d.y1=b.c2p(A.yc,!0),[d]}G.exports={hoverPoints:r,hoverSplit:a,hoverOnPoints:n}},65456:function(G,U,t){G.exports={moduleType:"trace",name:"ohlc",basePlotModule:t(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:t(20279),supplyDefaults:t(23860),calc:t(42812).calc,plot:t(36664),style:t(14008),hoverPoints:t(18720).hoverPoints,selectPoints:t(97384)}},52744:function(G,U,t){var g=t(24040),C=t(3400);G.exports=function(S,x,v,p){var r=v("x"),e=v("open"),a=v("high"),n=v("low"),f=v("close");v("hoverlabel.split");var c=g.getComponentMethod("calendars","handleTraceDefaults");if(c(S,x,["x"],p),!!(e&&a&&n&&f)){var l=Math.min(e.length,a.length,n.length,f.length);return r&&(l=Math.min(l,C.minRowLength(r))),x._length=l,l}}},36664:function(G,U,t){var g=t(33428),C=t(3400);G.exports=function(S,x,v,p){var r=x.yaxis,e=x.xaxis,a=!!e.rangebreaks;C.makeTraceGroups(p,v,"trace ohlc").each(function(n){var f=g.select(this),c=n[0],l=c.t,m=c.trace;if(m.visible!==!0||l.empty){f.remove();return}var h=l.tickLen,b=f.selectAll("path").data(C.identity);b.enter().append("path"),b.exit().remove(),b.attr("d",function(u){if(u.empty)return"M0,0Z";var o=e.c2p(u.pos-h,!0),d=e.c2p(u.pos+h,!0),w=a?(o+d)/2:e.c2p(u.pos,!0),A=r.c2p(u.o,!0),_=r.c2p(u.h,!0),y=r.c2p(u.l,!0),E=r.c2p(u.c,!0);return"M"+o+","+A+"H"+w+"M"+w+","+_+"V"+y+"M"+d+","+E+"H"+w})})}},97384:function(G){G.exports=function(t,g){var C=t.cd,i=t.xaxis,S=t.yaxis,x=[],v,p=C[0].t.bPos||0;if(g===!1)for(v=0;v=u.length||o[u[d]]!==void 0)return!1;o[u[d]]=!0}return!0}},76671:function(G,U,t){var g=t(3400),C=t(94288).hasColorscale,i=t(27260),S=t(86968).Q,x=t(51272),v=t(72140),p=t(26284),r=t(38116).isTypedArraySpec;function e(n,f,c,l,m){m("line.shape"),m("line.hovertemplate");var h=m("line.color",l.colorway[0]);if(C(n,"line")&&g.isArrayOrTypedArray(h)){if(h.length)return m("line.colorscale"),i(n,f,l,m,{prefix:"line.",cLetter:"c"}),h.length;f.line.color=c}return 1/0}function a(n,f){function c(d,w){return g.coerce(n,f,v.dimensions,d,w)}var l=c("values"),m=c("visible");if(l&&l.length||(m=f.visible=!1),m){c("label"),c("displayindex",f._index);var h=n.categoryarray,b=g.isArrayOrTypedArray(h)&&h.length>0||r(h),u;b&&(u="array");var o=c("categoryorder",u);o==="array"?(c("categoryarray"),c("ticktext")):(delete n.categoryarray,delete n.ticktext),!b&&o==="array"&&(f.categoryorder="trace")}}G.exports=function(f,c,l,m){function h(w,A){return g.coerce(f,c,v,w,A)}var b=x(f,c,{name:"dimensions",handleItemDefaults:a}),u=e(f,c,l,m,h);S(c,m,h),(!Array.isArray(b)||!b.length)&&(c.visible=!1),p(c,b,"values",u),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var o={family:m.font.family,size:Math.round(m.font.size),color:m.font.color};g.coerceFont(h,"labelfont",o);var d={family:m.font.family,size:Math.round(m.font.size/1.2),color:m.font.color};g.coerceFont(h,"tickfont",d)}},22020:function(G,U,t){G.exports={attributes:t(72140),supplyDefaults:t(76671),calc:t(69136),plot:t(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:t(91800),categories:["noOpacity"],meta:{}}},51036:function(G,U,t){var g=t(33428),C=t(67756).Gz,i=t(36424),S=t(93024),x=t(3400),v=x.strTranslate,p=t(43616),r=t(49760),e=t(72736);function a(V,Q,ot,$){var Z=Q._context.staticPlot,st=V.map(it.bind(0,Q,ot)),nt=$.selectAll("g.parcatslayer").data([null]);nt.enter().append("g").attr("class","parcatslayer").style("pointer-events",Z?"none":"all");var ct=nt.selectAll("g.trace.parcats").data(st,n),gt=ct.enter().append("g").attr("class","trace parcats");ct.attr("transform",function(Vt){return v(Vt.x,Vt.y)}),gt.append("g").attr("class","paths");var Tt=ct.select("g.paths"),wt=Tt.selectAll("path.path").data(function(Vt){return Vt.paths},n);wt.attr("fill",function(Vt){return Vt.model.color});var Rt=wt.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Vt){return Vt.model.color}).attr("fill-opacity",0);o(Rt),wt.attr("d",function(Vt){return Vt.svgD}),Rt.empty()||wt.sort(c),wt.exit().remove(),wt.on("mouseover",l).on("mouseout",m).on("click",u),gt.append("g").attr("class","dimensions");var bt=ct.select("g.dimensions"),At=bt.selectAll("g.dimension").data(function(Vt){return Vt.dimensions},n);At.enter().append("g").attr("class","dimension"),At.attr("transform",function(Vt){return v(Vt.x,0)}),At.exit().remove();var mt=At.selectAll("g.category").data(function(Vt){return Vt.categories},n),Lt=mt.enter().append("g").attr("class","category");mt.attr("transform",function(Vt){return v(0,Vt.y)}),Lt.append("rect").attr("class","catrect").attr("pointer-events","none"),mt.select("rect.catrect").attr("fill","none").attr("width",function(Vt){return Vt.width}).attr("height",function(Vt){return Vt.height}),A(Lt);var Ht=mt.selectAll("rect.bandrect").data(function(Vt){return Vt.bands},n);Ht.each(function(){x.raiseToTop(this)}),Ht.attr("fill",function(Vt){return Vt.color});var Ut=Ht.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Vt){return Vt.color}).attr("fill-opacity",0);Ht.attr("fill",function(Vt){return Vt.color}).attr("width",function(Vt){return Vt.width}).attr("height",function(Vt){return Vt.height}).attr("y",function(Vt){return Vt.y}).attr("cursor",function(Vt){return Vt.parcatsViewModel.arrangement==="fixed"?"default":Vt.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),y(Ut),Ht.exit().remove(),Lt.append("text").attr("class","catlabel").attr("pointer-events","none");var kt=Q._fullLayout.paper_bgcolor;mt.select("text.catlabel").attr("text-anchor",function(Vt){return f(Vt)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",e.makeTextShadow(kt)).style("fill","rgb(0, 0, 0)").attr("x",function(Vt){return f(Vt)?Vt.width+5:-5}).attr("y",function(Vt){return Vt.height/2}).text(function(Vt){return Vt.model.categoryLabel}).each(function(Vt){p.font(g.select(this),Vt.parcatsViewModel.categorylabelfont),e.convertToTspans(g.select(this),Q)}),Lt.append("text").attr("class","dimlabel"),mt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Vt){return Vt.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Vt){return Vt.width/2}).attr("y",-5).text(function(Vt,It){return It===0?Vt.parcatsViewModel.model.dimensions[Vt.model.dimensionInd].dimensionLabel:null}).each(function(Vt){p.font(g.select(this),Vt.parcatsViewModel.labelfont)}),mt.selectAll("rect.bandrect").on("mouseover",I).on("mouseout",k),mt.exit().remove(),At.call(g.behavior.drag().origin(function(Vt){return{x:Vt.x,y:0}}).on("dragstart",B).on("drag",O).on("dragend",H)),ct.each(function(Vt){Vt.traceSelection=g.select(this),Vt.pathSelection=g.select(this).selectAll("g.paths").selectAll("path.path"),Vt.dimensionSelection=g.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),ct.exit().remove()}G.exports=function(V,Q,ot,$){a(ot,V,$,Q)};function n(V){return V.key}function f(V){var Q=V.parcatsViewModel.dimensions.length,ot=V.parcatsViewModel.dimensions[Q-1].model.dimensionInd;return V.model.dimensionInd===ot}function c(V,Q){return V.model.rawColor>Q.model.rawColor?1:V.model.rawColor"),Kt=g.mouse(Z)[0];S.loneHover({trace:st,x:mt-ct.left+gt.left,y:Lt-ct.top+gt.top,text:re,color:V.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Ht,idealAlign:Kt1&&Tt.displayInd===gt.dimensions.length-1?(bt=nt.left,At="left"):(bt=nt.left+nt.width,At="right");var mt=ct.model.count,Lt=ct.model.categoryLabel,Ht=mt/ct.parcatsViewModel.model.count,Ut={countLabel:mt,categoryLabel:Lt,probabilityLabel:Ht.toFixed(3)},kt=[];ct.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&kt.push(["Count:",Ut.countLabel].join(" ")),ct.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&kt.push(["P("+Ut.categoryLabel+"):",Ut.probabilityLabel].join(" "));var Vt=kt.join("
    ");return{trace:wt,x:$*(bt-Q.left),y:Z*(Rt-Q.top),text:Vt,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:At,hovertemplate:wt.hovertemplate,hovertemplateLabels:Ut,eventData:[{data:wt._input,fullData:wt,count:mt,category:Lt,probability:Ht}]}}function D(V,Q,ot){var $=[];return g.select(ot.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Z=this;$.push(z(V,Q,Z))}),$}function N(V,Q,ot){V._fullLayout._calcInverseTransform(V);var $=V._fullLayout._invScaleX,Z=V._fullLayout._invScaleY,st=ot.getBoundingClientRect(),nt=g.select(ot).datum(),ct=nt.categoryViewModel,gt=ct.parcatsViewModel,Tt=gt.model.dimensions[ct.model.dimensionInd],wt=gt.trace,Rt=st.y+st.height/2,bt,At;gt.dimensions.length>1&&Tt.displayInd===gt.dimensions.length-1?(bt=st.left,At="left"):(bt=st.left+st.width,At="right");var mt=ct.model.categoryLabel,Lt=nt.parcatsViewModel.model.count,Ht=0;nt.categoryViewModel.bands.forEach(function(de){de.color===nt.color&&(Ht+=de.count)});var Ut=ct.model.count,kt=0;gt.pathSelection.each(function(de){de.model.color===nt.color&&(kt+=de.model.count)});var Vt=Ht/Lt,It=Ht/kt,re=Ht/Ut,Kt={countLabel:Lt,categoryLabel:mt,probabilityLabel:Vt.toFixed(3)},$t=[];ct.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&$t.push(["Count:",Kt.countLabel].join(" ")),ct.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&($t.push("P(color ∩ "+mt+"): "+Kt.probabilityLabel),$t.push("P("+mt+" | color): "+It.toFixed(3)),$t.push("P(color | "+mt+"): "+re.toFixed(3)));var le=$t.join("
    "),he=r.mostReadable(nt.color,["black","white"]);return{trace:wt,x:$*(bt-Q.left),y:Z*(Rt-Q.top),text:le,color:nt.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:he,fontSize:10,idealAlign:At,hovertemplate:wt.hovertemplate,hovertemplateLabels:Kt,eventData:[{data:wt._input,fullData:wt,category:mt,count:Lt,probability:Vt,categorycount:Ut,colorcount:kt,bandcolorcount:Ht}]}}function I(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var Q=g.mouse(this)[1];if(Q<-1)return;var ot=V.parcatsViewModel.graphDiv,$=ot._fullLayout,Z=$._paperdiv.node().getBoundingClientRect(),st=V.parcatsViewModel.hoveron,nt=this;if(st==="color"?(s(nt),M(nt,"plotly_hover",g.event)):(T(nt),L(nt,"plotly_hover",g.event)),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ct;st==="category"?ct=z(ot,Z,nt):st==="color"?ct=N(ot,Z,nt):st==="dimension"&&(ct=D(ot,Z,nt)),ct&&S.loneHover(ct,{container:$._hoverlayer.node(),outerContainer:$._paper.node(),gd:ot})}}}function k(V){var Q=V.parcatsViewModel;if(!Q.dragDimension&&(o(Q.pathSelection),A(Q.dimensionSelection.selectAll("g.category")),y(Q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),S.loneUnhover(Q.graphDiv._fullLayout._hoverlayer.node()),Q.pathSelection.sort(c),Q.hoverinfoItems.indexOf("skip")===-1)){var ot=V.parcatsViewModel.hoveron,$=this;ot==="color"?M($,"plotly_unhover",g.event):L($,"plotly_unhover",g.event)}}function B(V){V.parcatsViewModel.arrangement!=="fixed"&&(V.dragDimensionDisplayInd=V.model.displayInd,V.initialDragDimensionDisplayInds=V.parcatsViewModel.model.dimensions.map(function(Q){return Q.displayInd}),V.dragHasMoved=!1,V.dragCategoryDisplayInd=null,g.select(this).selectAll("g.category").select("rect.catrect").each(function(Q){var ot=g.mouse(this)[0],$=g.mouse(this)[1];-2<=ot&&ot<=Q.width+2&&-2<=$&&$<=Q.height+2&&(V.dragCategoryDisplayInd=Q.model.displayInd,V.initialDragCategoryDisplayInds=V.model.categories.map(function(Z){return Z.displayInd}),Q.model.dragY=Q.y,x.raiseToTop(this.parentNode),g.select(this.parentNode).selectAll("rect.bandrect").each(function(Z){Z.y<$&&$<=Z.y+Z.height&&(V.potentialClickBand=this)}))}),V.parcatsViewModel.dragDimension=V,S.loneUnhover(V.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function O(V){if(V.parcatsViewModel.arrangement!=="fixed"&&(V.dragHasMoved=!0,V.dragDimensionDisplayInd!==null)){var Q=V.dragDimensionDisplayInd,ot=Q-1,$=Q+1,Z=V.parcatsViewModel.dimensions[Q];if(V.dragCategoryDisplayInd!==null){var st=Z.categories[V.dragCategoryDisplayInd];st.model.dragY+=g.event.dy;var nt=st.model.dragY,ct=st.model.displayInd,gt=Z.categories,Tt=gt[ct-1],wt=gt[ct+1];Tt!==void 0&&ntwt.y+wt.height/2&&(st.model.displayInd=wt.model.displayInd,wt.model.displayInd=ct),V.dragCategoryDisplayInd=st.model.displayInd}if(V.dragCategoryDisplayInd===null||V.parcatsViewModel.arrangement==="freeform"){Z.model.dragX=g.event.x;var Rt=V.parcatsViewModel.dimensions[ot],bt=V.parcatsViewModel.dimensions[$];Rt!==void 0&&Z.model.dragXbt.x&&(Z.model.displayInd=bt.model.displayInd,bt.model.displayInd=V.dragDimensionDisplayInd),V.dragDimensionDisplayInd=Z.model.displayInd}X(V.parcatsViewModel),J(V.parcatsViewModel),et(V.parcatsViewModel),j(V.parcatsViewModel)}}function H(V){if(V.parcatsViewModel.arrangement!=="fixed"&&V.dragDimensionDisplayInd!==null){g.select(this).selectAll("text").attr("font-weight","normal");var Q={},ot=Y(V.parcatsViewModel),$=V.parcatsViewModel.model.dimensions.map(function(bt){return bt.displayInd}),Z=V.initialDragDimensionDisplayInds.some(function(bt,At){return bt!==$[At]});Z&&$.forEach(function(bt,At){var mt=V.parcatsViewModel.model.dimensions[At].containerInd;Q["dimensions["+mt+"].displayindex"]=bt});var st=!1;if(V.dragCategoryDisplayInd!==null){var nt=V.model.categories.map(function(bt){return bt.displayInd});if(st=V.initialDragCategoryDisplayInds.some(function(bt,At){return bt!==nt[At]}),st){var ct=V.model.categories.slice().sort(function(bt,At){return bt.displayInd-At.displayInd}),gt=ct.map(function(bt){return bt.categoryValue}),Tt=ct.map(function(bt){return bt.categoryLabel});Q["dimensions["+V.model.containerInd+"].categoryarray"]=[gt],Q["dimensions["+V.model.containerInd+"].ticktext"]=[Tt],Q["dimensions["+V.model.containerInd+"].categoryorder"]="array"}}if(V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!V.dragHasMoved&&V.potentialClickBand&&(V.parcatsViewModel.hoveron==="color"?M(V.potentialClickBand,"plotly_click",g.event.sourceEvent):L(V.potentialClickBand,"plotly_click",g.event.sourceEvent)),V.model.dragX=null,V.dragCategoryDisplayInd!==null){var wt=V.parcatsViewModel.dimensions[V.dragDimensionDisplayInd].categories[V.dragCategoryDisplayInd];wt.model.dragY=null,V.dragCategoryDisplayInd=null}V.dragDimensionDisplayInd=null,V.parcatsViewModel.dragDimension=null,V.dragHasMoved=null,V.potentialClickBand=null,X(V.parcatsViewModel),J(V.parcatsViewModel);var Rt=g.transition().duration(300).ease("cubic-in-out");Rt.each(function(){et(V.parcatsViewModel,!0),j(V.parcatsViewModel,!0)}).each("end",function(){(Z||st)&&i.restyle(V.parcatsViewModel.graphDiv,Q,[ot])})}}function Y(V){for(var Q,ot=V.graphDiv._fullData,$=0;$=0;gt--)Tt+="C"+nt[gt]+","+(Q[gt+1]+$)+" "+st[gt]+","+(Q[gt]+$)+" "+(V[gt]+ot[gt])+","+(Q[gt]+$),Tt+="l-"+ot[gt]+",0 ";return Tt+="Z",Tt}function J(V){var Q=V.dimensions,ot=V.model,$=Q.map(function(ne){return ne.categories.map(function(zt){return zt.y})}),Z=V.model.dimensions.map(function(ne){return ne.categories.map(function(zt){return zt.displayInd})}),st=V.model.dimensions.map(function(ne){return ne.displayInd}),nt=V.dimensions.map(function(ne){return ne.model.dimensionInd}),ct=Q.map(function(ne){return ne.x}),gt=Q.map(function(ne){return ne.width}),Tt=[];for(var wt in ot.paths)ot.paths.hasOwnProperty(wt)&&Tt.push(ot.paths[wt]);function Rt(ne){var zt=ne.categoryInds.map(function(Jt,Wt){return Z[Wt][Jt]}),Xt=nt.map(function(Jt){return zt[Jt]});return Xt}Tt.sort(function(ne,zt){var Xt=Rt(ne),Jt=Rt(zt);return V.sortpaths==="backward"&&(Xt.reverse(),Jt.reverse()),Xt.push(ne.valueInds[0]),Jt.push(zt.valueInds[0]),V.bundlecolors&&(Xt.unshift(ne.rawColor),Jt.unshift(zt.rawColor)),XtJt?1:0});for(var bt=new Array(Tt.length),At=Q[0].model.count,mt=Q[0].categories.map(function(ne){return ne.height}).reduce(function(ne,zt){return ne+zt}),Lt=0;Lt0?Ut=mt*(Ht.count/At):Ut=0;for(var kt=new Array($.length),Vt=0;Vt1?nt=(V.width-2*ot-$)/(Z-1):nt=0,ct=ot,gt=ct+nt*st;var Tt=[],wt=V.model.maxCats,Rt=Q.categories.length,bt=8,At=Q.count,mt=V.height-bt*(wt-1),Lt,Ht,Ut,kt,Vt,It=(wt-Rt)*bt/2,re=Q.categories.map(function(Kt){return{displayInd:Kt.displayInd,categoryInd:Kt.categoryInd}});for(re.sort(function(Kt,$t){return Kt.displayInd-$t.displayInd}),Vt=0;Vt0?Lt=Ht.count/At*mt:Lt=0,Ut={key:Ht.valueInds[0],model:Ht,width:$,height:Lt,y:Ht.dragY!==null?Ht.dragY:It,bands:[],parcatsViewModel:V},It=It+Lt+bt,Tt.push(Ut);return{key:Q.dimensionInd,x:Q.dragX!==null?Q.dragX:gt,y:0,width:$,model:Q,categories:Tt,parcatsViewModel:V,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}},60268:function(G,U,t){var g=t(51036);G.exports=function(i,S,x,v){var p=i._fullLayout,r=p._paper,e=p._size;g(i,r,S,{width:e.w,height:e.h,margin:{t:e.t,r:e.r,b:e.b,l:e.l}},x,v)}},82296:function(G,U,t){var g=t(49084),C=t(94724),i=t(25376),S=t(86968).u,x=t(92880).extendFlat,v=t(31780).templatedArray;G.exports={domain:S({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:i({editType:"plot"}),tickfont:i({editType:"plot"}),rangefont:i({editType:"plot"}),dimensions:v("dimension",{label:{valType:"string",editType:"plot"},tickvals:x({},C.tickvals,{editType:"plot"}),ticktext:x({},C.ticktext,{editType:"plot"}),tickformat:x({},C.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:x({editType:"calc"},g("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(G,U,t){var g=t(30140),C=t(33428),i=t(71688).keyFun,S=t(71688).repeat,x=t(3400).sorterAsc,v=t(3400).strTranslate,p=g.bar.snapRatio;function r(H,Y){return H*(1-p)+Y*p}var e=g.bar.snapClose;function a(H,Y){return H*(1-e)+Y*e}function n(H,Y,j,et){if(f(j,et))return j;var it=H?-1:1,ut=0,J=Y.length-1;if(it<0){var X=ut;ut=J,J=X}for(var tt=Y[ut],V=tt,Q=ut;it*Q=Y[j][0]&&H<=Y[j][1])return!0;return!1}function c(H){H.attr("x",-g.bar.captureWidth/2).attr("width",g.bar.captureWidth)}function l(H){H.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(H){if(!H.brush.filterSpecified)return"0,"+H.height;for(var Y=h(H.brush.filter.getConsolidated(),H.height),j=[0],et,it,ut,J=Y.length?Y[0][0]:null,X=0;XH[1]+j||Y=.9*H[1]+.1*H[0]?"n":Y<=.9*H[0]+.1*H[1]?"s":"ns"}function u(){C.select(document.body).style("cursor",null)}function o(H){H.attr("stroke-dasharray",m)}function d(H,Y){var j=C.select(H).selectAll(".highlight, .highlight-shadow"),et=Y?j.transition().duration(g.bar.snapDuration).each("end",Y):j;o(et)}function w(H,Y){var j=H.brush,et=j.filterSpecified,it=NaN,ut={},J;if(et){var X=H.height,tt=j.filter.getConsolidated(),V=h(tt,X),Q=NaN,ot=NaN,$=NaN;for(J=0;J<=V.length;J++){var Z=V[J];if(Z&&Z[0]<=Y&&Y<=Z[1]){Q=J;break}else if(ot=J?J-1:NaN,Z&&Z[0]>Y){$=J;break}}if(it=Q,isNaN(it)&&(isNaN(ot)||isNaN($)?it=isNaN(ot)?$:ot:it=Y-V[ot][1]=Tt[0]&><=Tt[1]){ut.clickableOrdinalRange=Tt;break}}}return ut}function A(H,Y){C.event.sourceEvent.stopPropagation();var j=Y.height-C.mouse(H)[1]-2*g.verticalPadding,et=Y.unitToPaddedPx.invert(j),it=Y.brush,ut=w(Y,j),J=ut.interval,X=it.svgBrush;if(X.wasDragged=!1,X.grabbingBar=ut.region==="ns",X.grabbingBar){var tt=J.map(Y.unitToPaddedPx);X.grabPoint=j-tt[0]-g.verticalPadding,X.barLength=tt[1]-tt[0]}X.clickableOrdinalRange=ut.clickableOrdinalRange,X.stayingIntervals=Y.multiselect&&it.filterSpecified?it.filter.getConsolidated():[],J&&(X.stayingIntervals=X.stayingIntervals.filter(function(V){return V[0]!==J[0]&&V[1]!==J[1]})),X.startExtent=ut.region?J[ut.region==="s"?1:0]:et,Y.parent.inBrushDrag=!0,X.brushStartCallback()}function _(H,Y){C.event.sourceEvent.stopPropagation();var j=Y.height-C.mouse(H)[1]-2*g.verticalPadding,et=Y.brush.svgBrush;et.wasDragged=!0,et._dragging=!0,et.grabbingBar?et.newExtent=[j-et.grabPoint,j+et.barLength-et.grabPoint].map(Y.unitToPaddedPx.invert):et.newExtent=[et.startExtent,Y.unitToPaddedPx.invert(j)].sort(x),Y.brush.filterSpecified=!0,et.extent=et.stayingIntervals.concat([et.newExtent]),et.brushCallback(Y),d(H.parentNode)}function y(H,Y){var j=Y.brush,et=j.filter,it=j.svgBrush;it._dragging||(E(H,Y),_(H,Y),Y.brush.svgBrush.wasDragged=!1),it._dragging=!1;var ut=C.event;ut.sourceEvent.stopPropagation();var J=it.grabbingBar;if(it.grabbingBar=!1,it.grabLocation=void 0,Y.parent.inBrushDrag=!1,u(),!it.wasDragged){it.wasDragged=void 0,it.clickableOrdinalRange?j.filterSpecified&&Y.multiselect?it.extent.push(it.clickableOrdinalRange):(it.extent=[it.clickableOrdinalRange],j.filterSpecified=!0):J?(it.extent=it.stayingIntervals,it.extent.length===0&&D(j)):D(j),it.brushCallback(Y),d(H.parentNode),it.brushEndCallback(j.filterSpecified?et.getConsolidated():[]);return}var X=function(){et.set(et.getConsolidated())};if(Y.ordinal){var tt=Y.unitTickvals;tt[tt.length-1]it.newExtent[0];it.extent=it.stayingIntervals.concat(V?[it.newExtent]:[]),it.extent.length||D(j),it.brushCallback(Y),V?d(H.parentNode,X):(X(),d(H.parentNode))}else X();it.brushEndCallback(j.filterSpecified?et.getConsolidated():[])}function E(H,Y){var j=Y.height-C.mouse(H)[1]-2*g.verticalPadding,et=w(Y,j),it="crosshair";et.clickableOrdinalRange?it="pointer":et.region&&(it=et.region+"-resize"),C.select(document.body).style("cursor",it)}function T(H){H.on("mousemove",function(Y){C.event.preventDefault(),Y.parent.inBrushDrag||E(this,Y)}).on("mouseleave",function(Y){Y.parent.inBrushDrag||u()}).call(C.behavior.drag().on("dragstart",function(Y){A(this,Y)}).on("drag",function(Y){_(this,Y)}).on("dragend",function(Y){y(this,Y)}))}function s(H,Y){return H[0]-Y[0]}function L(H,Y,j){var et=j._context.staticPlot,it=H.selectAll(".background").data(S);it.enter().append("rect").classed("background",!0).call(c).call(l).style("pointer-events",et?"none":"auto").attr("transform",v(0,g.verticalPadding)),it.call(T).attr("height",function(X){return X.height-g.verticalPadding});var ut=H.selectAll(".highlight-shadow").data(S);ut.enter().append("line").classed("highlight-shadow",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width+g.bar.strokeWidth).attr("stroke",Y).attr("opacity",g.bar.strokeOpacity).attr("stroke-linecap","butt"),ut.attr("y1",function(X){return X.height}).call(o);var J=H.selectAll(".highlight").data(S);J.enter().append("line").classed("highlight",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width-g.bar.strokeWidth).attr("stroke",g.bar.fillColor).attr("opacity",g.bar.fillOpacity).attr("stroke-linecap","butt"),J.attr("y1",function(X){return X.height}).call(o)}function M(H,Y,j){var et=H.selectAll("."+g.cn.axisBrush).data(S,i);et.enter().append("g").classed(g.cn.axisBrush,!0),L(et,Y,j)}function z(H){return H.svgBrush.extent.map(function(Y){return Y.slice()})}function D(H){H.filterSpecified=!1,H.svgBrush.extent=[[-1/0,1/0]]}function N(H){return function(j){var et=j.brush,it=z(et),ut=it.slice();et.filter.set(ut),H()}}function I(H){for(var Y=H.slice(),j=[],et,it=Y.shift();it;){for(et=it.slice();(it=Y.shift())&&it[0]<=et[1];)et[1]=Math.max(et[1],it[1]);j.push(et)}return j.length===1&&j[0][0]>j[0][1]&&(j=[]),j}function k(){var H=[],Y,j;return{set:function(et){H=et.map(function(it){return it.slice().sort(x)}).sort(s),H.length===1&&H[0][0]===-1/0&&H[0][1]===1/0&&(H=[[0,-1]]),Y=I(H),j=H.reduce(function(it,ut){return[Math.min(it[0],ut[0]),Math.max(it[1],ut[1])]},[1/0,-1/0])},get:function(){return H.slice()},getConsolidated:function(){return Y},getBounds:function(){return j}}}function B(H,Y,j,et,it,ut){var J=k();return J.set(j),{filter:J,filterSpecified:Y,svgBrush:{extent:[],brushStartCallback:et,brushCallback:N(it),brushEndCallback:ut}}}function O(H,Y){if(Array.isArray(H[0])?(H=H.map(function(et){return et.sort(x)}),Y.multiselect?H=I(H.sort(s)):H=[H[0]]):H=[H.sort(x)],Y.tickvals){var j=Y.tickvals.slice().sort(x);if(H=H.map(function(et){var it=[n(0,j,et[0],[]),n(1,j,et[1],[])];if(it[1]>it[0])return it}).filter(function(et){return et}),!H.length)return}return H.length>1?H:H[0]}G.exports={makeBrush:B,ensureAxisBrush:M,cleanRanges:O}},61664:function(G,U,t){G.exports={attributes:t(82296),supplyDefaults:t(60664),calc:t(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:t(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(G,U,t){var g=t(33428),C=t(84888)._M,i=t(24196),S=t(9616);U.name="parcoords",U.plot=function(x){var v=C(x.calcdata,"parcoords")[0];v.length&&i(x,v)},U.clean=function(x,v,p,r){var e=r._has&&r._has("parcoords"),a=v._has&&v._has("parcoords");e&&!a&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},U.toSVG=function(x){var v=x._fullLayout._glimages,p=g.select(x).selectAll(".svg-container"),r=p.filter(function(a,n){return n===p.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function e(){var a=this,n=a.toDataURL("image/png"),f=v.append("svg:image");f.attr({xmlns:S.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}r.each(e),window.setTimeout(function(){g.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},95044:function(G,U,t){var g=t(3400).isArrayOrTypedArray,C=t(8932),i=t(71688).wrap;G.exports=function(v,p){var r,e;return C.hasColorscale(p,"line")&&g(p.line.color)?(r=p.line.color,e=C.extractOpts(p.line).colorscale,C.calc(v,p,{vals:r,containerStr:"line",cLetter:"c"})):(r=S(p._length),e=[[0,p.line.color],[1,p.line.color]]),i({lineColor:r,cscale:e})};function S(x){for(var v=new Array(x),p=0;pe&&(g.log("parcoords traces support up to "+e+" dimensions at the moment"),o.splice(e));var d=x(l,m,{name:"dimensions",layout:b,handleItemDefaults:f}),w=n(l,m,h,b,u);S(m,b,u),(!Array.isArray(d)||!d.length)&&(m.visible=!1),a(m,d,"values",w);var A={family:b.font.family,size:Math.round(b.font.size/1.2),color:b.font.color};g.coerceFont(u,"labelfont",A),g.coerceFont(u,"tickfont",A),g.coerceFont(u,"rangefont",A),u("labelangle"),u("labelside"),u("unselected.line.color"),u("unselected.line.opacity")}},95724:function(G,U,t){var g=t(3400).isTypedArray;U.convertTypedArray=function(C){return g(C)?Array.prototype.slice.call(C):C},U.isOrdinal=function(C){return!!C.tickvals},U.isVisible=function(C){return C.visible||!("visible"in C)}},29928:function(G,U,t){var g=t(61664);g.plot=t(24196),G.exports=g},51352:function(G,U,t){var g=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}},89032:function(G,U,t){var g=t(3400);G.exports=function(i,S){var x=i.split(" "),h=x[0],p=x[1],r=g.isArrayOrTypedArray(S)?g.mean(S):S,e=.5+r/100,a=1.5+r/100,n=["",""],f=[0,0];switch(h){case"top":n[0]="top",f[1]=-a;break;case"bottom":n[0]="bottom",f[1]=a;break}switch(p){case"left":n[1]="right",f[0]=-e;break;case"right":n[1]="left",f[0]=e;break}var c;return n[0]&&n[1]?c=n.join("-"):n[0]?c=n[0]:n[1]?c=n[1]:c="center",{anchor:c,offset:f}}},33688:function(G,U,t){var g=t(3480),C=t(3400),i=C.strTranslate,S=C.strScale,x=t(84888).KY,h=t(9616),p=t(33428),r=t(43616),e=t(72736),a=t(14440),n="mapbox",f=U.constants=t(47552);U.name=n,U.attr="subplot",U.idRoot=n,U.idRegex=U.attrRegex=C.counterRegex(n),U.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},U.layoutAttributes=t(5232),U.supplyLayoutDefaults=t(5976),U.plot=function(v){var b=v._fullLayout,u=v.calcdata,o=b._subplots[n];if(g.version!==f.requiredVersion)throw new Error(f.wrongVersionErrorMsg);var d=c(v,o);g.accessToken=d;for(var w=0;wN/2){var I=L.split("|").join("
    ");z.text(I).attr("data-unformatted",I).call(e.convertToTspans,m),D=r.bBox(z.node())}z.attr("transform",i(-3,-D.height+8)),M.insert("rect",".static-attribution").attr({x:-D.width-6,y:-D.height-3,width:D.width+6,height:D.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;D.width+6>N&&(k=N/(D.width+6));var B=[u.l+u.w*w.x[1],u.t+u.h*(1-w.y[0])];M.attr("transform",i(B[0],B[1])+S(k))}};function c(m,v){var b=m._fullLayout,u=m._context;if(u.mapboxAccessToken==="")return"";for(var o=[],d=[],w=!1,A=!1,_=0;_1&&C.warn(f.multipleTokensErrorMsg),o[0]):(d.length&&C.log(["Listed mapbox access token(s)",d.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function l(m){return typeof m=="string"&&(f.styleValuesMapbox.indexOf(m)!==-1||m.indexOf("mapbox://")===0||m.indexOf("stamen")===0)}U.updateFx=function(m){for(var v=m._fullLayout,b=v._subplots[n],u=0;u0){for(var f=0;f0}function r(a){var n={},f={};switch(a.type){case"circle":g.extendFlat(f,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":g.extendFlat(f,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":g.extendFlat(f,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,l=i(c.textposition,c.iconsize);g.extendFlat(n,{"icon-image":c.icon+"-15","icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":l.anchor,"text-offset":l.offset,"symbol-placement":c.placement}),g.extendFlat(f,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":g.extendFlat(f,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:n,paint:f}}function e(a){var n=a.sourcetype,f=a.source,c={type:n},l;return n==="geojson"?l="data":n==="vector"?l=typeof f=="string"?"url":"tiles":n==="raster"?(l="tiles",c.tileSize=256):n==="image"&&(l="url",c.coordinates=a.coordinates),c[l]=f,a.sourceattribution&&(c.attribution=C(a.sourceattribution)),c}G.exports=function(n,f,c){var l=new x(n,f);return l.update(c),l}},5232:function(G,U,t){var g=t(3400),C=t(76308).defaultLine,i=t(86968).u,S=t(25376),x=t(52904).textposition,h=t(67824).overrideAll,p=t(31780).templatedArray,r=t(47552),e=S({});e.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=G.exports=h({_arrayAttrRegexps:[g.counterRegex("mapbox",".layers",!0)],domain:i({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:r.styleValuesMapbox.concat(r.styleValuesNonMapbox),dflt:r.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:p("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:C},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:C}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:e,textposition:g.extendFlat({},x,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}},5976:function(G,U,t){var g=t(3400),C=t(168),i=t(51272),S=t(5232);G.exports=function(r,e,a){C(r,e,a,{type:"mapbox",attributes:S,handleDefaults:x,partition:"y",accessToken:e._mapboxAccessToken})};function x(p,r,e,a){e("accesstoken",a.accessToken),e("style"),e("center.lon"),e("center.lat"),e("zoom"),e("bearing"),e("pitch");var n=e("bounds.west"),f=e("bounds.east"),c=e("bounds.south"),l=e("bounds.north");(n===void 0||f===void 0||c===void 0||l===void 0)&&delete r.bounds,i(p,r,{name:"layers",handleItemDefaults:h}),r._input=p}function h(p,r){function e(m,v){return g.coerce(p,r,S.layers,m,v)}var a=e("visible");if(a){var n=e("sourcetype"),f=n==="raster"||n==="image";e("source"),e("sourceattribution"),n==="vector"&&e("sourcelayer"),n==="image"&&e("coordinates");var c;f&&(c="raster");var l=e("type",c);f&&l!=="raster"&&(l=r.type="raster",g.log("Source types *raster* and *image* must drawn *raster* layer type.")),e("below"),e("color"),e("opacity"),e("minzoom"),e("maxzoom"),l==="circle"&&e("circle.radius"),l==="line"&&(e("line.width"),e("line.dash")),l==="fill"&&e("fill.outlinecolor"),l==="symbol"&&(e("symbol.icon"),e("symbol.iconsize"),e("symbol.text"),g.coerceFont(e,"symbol.textfont"),e("symbol.textposition"),e("symbol.placement"))}}},14440:function(G,U,t){var g=t(3480),C=t(3400),i=t(27144),S=t(24040),x=t(54460),h=t(86476),p=t(93024),r=t(72760),e=r.drawMode,a=r.selectMode,n=t(22676).prepSelect,f=t(22676).clearOutline,c=t(22676).clearSelectionsCache,l=t(22676).selectOnClick,m=t(47552),v=t(22360);function b(_,y){this.id=y,this.gd=_;var E=_._fullLayout,T=_._context;this.container=E._glcontainer.node(),this.isStatic=T.staticPlot,this.uid=E._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(E),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=b.prototype;u.plot=function(_,y,E){var T=this,s=y[T.id];T.map&&s.accesstoken!==T.accessToken&&(T.map.remove(),T.map=null,T.styleObj=null,T.traceHash={},T.layerList=[]);var L;T.map?L=new Promise(function(M,z){T.updateMap(_,y,M,z)}):L=new Promise(function(M,z){T.createMap(_,y,M,z)}),E.push(L)},u.createMap=function(_,y,E,T){var s=this,L=y[s.id],M=s.styleObj=d(L.style,y);s.accessToken=L.accesstoken;var z=L.bounds,D=z?[[z.west,z.south],[z.east,z.north]]:null,N=s.map=new g.Map({container:s.div,style:M.style,center:A(L.center),zoom:L.zoom,bearing:L.bearing,pitch:L.pitch,maxBounds:D,interactive:!s.isStatic,preserveDrawingBuffer:s.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new g.AttributionControl({compact:!0}));N._canvas.style.left="0px",N._canvas.style.top="0px",s.rejectOnError(T),s.isStatic||s.initFx(_,y);var I=[];I.push(new Promise(function(k){N.once("load",k)})),I=I.concat(i.fetchTraceGeoData(_)),Promise.all(I).then(function(){s.fillBelowLookup(_,y),s.updateData(_),s.updateLayout(y),s.resolveOnRender(E)}).catch(T)},u.updateMap=function(_,y,E,T){var s=this,L=s.map,M=y[this.id];s.rejectOnError(T);var z=[],D=d(M.style,y);JSON.stringify(s.styleObj)!==JSON.stringify(D)&&(s.styleObj=D,L.setStyle(D.style),s.traceHash={},z.push(new Promise(function(N){L.once("styledata",N)}))),z=z.concat(i.fetchTraceGeoData(_)),Promise.all(z).then(function(){s.fillBelowLookup(_,y),s.updateData(_),s.updateLayout(y),s.resolveOnRender(E)}).catch(T)},u.fillBelowLookup=function(_,y){var E=y[this.id],T=E.layers,s,L,M=this.belowLookup={},z=!1;for(s=0;s<_.length;s++){var D=_[s][0].trace,N=D._module;typeof D.below=="string"?L=D.below:N.getBelow&&(L=N.getBelow(D,this)),L===""&&(z=!0),M["trace-"+D.uid]=L||""}for(s=0;s1)for(s=0;s-1&&l(D.originalEvent,T,[E.xaxis],[E.yaxis],E.id,z),N.indexOf("event")>-1&&p.click(T,D.originalEvent)}}},u.updateFx=function(_){var y=this,E=y.map,T=y.gd;if(y.isStatic)return;function s(D){var N=y.map.unproject(D);return[N.lng,N.lat]}var L=_.dragmode,M;M=function(D,N){if(N.isRect){var I=D.range={};I[y.id]=[s([N.xmin,N.ymin]),s([N.xmax,N.ymax])]}else{var k=D.lassoPoints={};k[y.id]=N.map(s)}};var z=y.dragOptions;y.dragOptions=C.extendDeep(z||{},{dragmode:_.dragmode,element:y.div,gd:T,plotinfo:{id:y.id,domain:_[y.id].domain,xaxis:y.xaxis,yaxis:y.yaxis,fillRangeItems:M},xaxes:[y.xaxis],yaxes:[y.yaxis],subplot:y.id}),E.off("click",y.onClickInPanHandler),a(L)||e(L)?(E.dragPan.disable(),E.on("zoomstart",y.clearOutline),y.dragOptions.prepFn=function(D,N,I){n(D,N,I,y.dragOptions,L)},h.init(y.dragOptions)):(E.dragPan.enable(),E.off("zoomstart",y.clearOutline),y.div.onmousedown=null,y.div.ontouchstart=null,y.div.removeEventListener("touchstart",y.div._ontouchstart),y.onClickInPanHandler=y.onClickInPanFn(y.dragOptions),E.on("click",y.onClickInPanHandler))},u.updateFramework=function(_){var y=_[this.id].domain,E=_._size,T=this.div.style;T.width=E.w*(y.x[1]-y.x[0])+"px",T.height=E.h*(y.y[1]-y.y[0])+"px",T.left=E.l+y.x[0]*E.w+"px",T.top=E.t+(1-y.y[1])*E.h+"px",this.xaxis._offset=E.l+y.x[0]*E.w,this.xaxis._length=E.w*(y.x[1]-y.x[0]),this.yaxis._offset=E.t+(1-y.y[1])*E.h,this.yaxis._length=E.h*(y.y[1]-y.y[0])},u.updateLayers=function(_){var y=_[this.id],E=y.layers,T=this.layerList,s;if(E.length!==T.length){for(s=0;s=Q.width-20?(Z["text-anchor"]="start",Z.x=5):(Z["text-anchor"]="end",Z.x=Q._paper.attr("width")-7),ot.attr(Z);var st=ot.select(".js-link-to-tool"),nt=ot.select(".js-link-spacer"),ct=ot.select(".js-sourcelinks");V._context.showSources&&V._context.showSources(V),V._context.showLink&&_(V,st),nt.text(st.text()&&ct.text()?" - ":"")}};function _(V,Q){Q.text("");var ot=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(V._context.linkText+" »");if(V._context.sendData)ot.on("click",function(){d.sendDataToCloud(V)});else{var $=window.location.pathname.split("/"),Z=window.location.search;ot.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+$[2].split(".")[0]+"/"+$[1]+Z})}}d.sendDataToCloud=function(V){var Q=(window.PLOTLYENV||{}).BASE_URL||V._context.plotlyServerURL;if(Q){V.emit("plotly_beforeexport");var ot=g.select(V).append("div").attr("id","hiddenform").style("display","none"),$=ot.append("form").attr({action:Q+"/external",method:"post",target:"_blank"}),Z=$.append("input").attr({type:"text",name:"data"});return Z.node().value=d.graphJson(V,!1,"keepdata"),$.node().submit(),ot.remove(),V.emit("plotly_afterexport"),!1}};var y=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],E=["year","month","dayMonth","dayMonthYear"];d.supplyDefaults=function(V,Q){var ot=Q&&Q.skipUpdateCalc,$=V._fullLayout||{};if($._skipDefaults){delete $._skipDefaults;return}var Z=V._fullLayout={},st=V.layout||{},nt=V._fullData||[],ct=V._fullData=[],gt=V.data||[],Tt=V.calcdata||[],wt=V._context||{},Rt;V._transitionData||d.createTransitionData(V),Z._dfltTitle={plot:o(V,"Click to enter Plot title"),x:o(V,"Click to enter X axis title"),y:o(V,"Click to enter Y axis title"),colorbar:o(V,"Click to enter Colorscale title"),annotation:o(V,"new text")},Z._traceWord=o(V,"trace");var bt=L(V,y);if(Z._mapboxAccessToken=wt.mapboxAccessToken,$._initialAutoSizeIsDone){var At=$.width,mt=$.height;d.supplyLayoutGlobalDefaults(st,Z,bt),st.width||(Z.width=At),st.height||(Z.height=mt),d.sanitizeMargins(Z)}else{d.supplyLayoutGlobalDefaults(st,Z,bt);var Lt=!st.width||!st.height,Ht=Z.autosize,Ut=wt.autosizable,kt=Lt&&(Ht||Ut);kt?d.plotAutoSize(V,st,Z):Lt&&d.sanitizeMargins(Z),!Ht&&Lt&&(st.width=Z.width,st.height=Z.height)}Z._d3locale=M(bt,Z.separators),Z._extraFormat=L(V,E),Z._initialAutoSizeIsDone=!0,Z._dataLength=gt.length,Z._modules=[],Z._visibleModules=[],Z._basePlotModules=[];var Vt=Z._subplots=s(),It=Z._splomAxes={x:{},y:{}},re=Z._splomSubplots={};Z._splomGridDflt={},Z._scatterStackOpts={},Z._firstScatter={},Z._alignmentOpts={},Z._colorAxes={},Z._requestRangeslider={},Z._traceUids=T(nt,gt),Z._globalTransforms=(V._context||{}).globalTransforms,d.supplyDataDefaults(gt,ct,st,Z);var Kt=Object.keys(It.x),$t=Object.keys(It.y);if(Kt.length>1&&$t.length>1){for(h.getComponentMethod("grid","sizeDefaults")(st,Z),Rt=0;Rt15&&$t.length>15&&Z.shapes.length===0&&Z.images.length===0,d.linkSubplots(ct,Z,nt,$),d.cleanPlot(ct,Z,nt,$);var Se=!!($._has&&$._has("gl2d")),ne=!!(Z._has&&Z._has("gl2d")),zt=!!($._has&&$._has("cartesian")),Xt=!!(Z._has&&Z._has("cartesian")),Jt=zt||Se,Wt=Xt||ne;Jt&&!Wt?$._bgLayer.remove():Wt&&!Jt&&(Z._shouldCreateBgLayer=!0),$._zoomlayer&&!V._dragging&&c({_fullLayout:$}),z(ct,Z),u(Z,$),h.getComponentMethod("colorscale","crossTraceDefaults")(ct,Z),Z._preGUI||(Z._preGUI={}),Z._tracePreGUI||(Z._tracePreGUI={});var Ft=Z._tracePreGUI,xt={},yt;for(yt in Ft)xt[yt]="old";for(Rt=0;Rt0){var wt=1-2*st;nt=Math.round(wt*nt),ct=Math.round(wt*ct)}}var Rt=d.layoutAttributes.width.min,bt=d.layoutAttributes.height.min;nt1,mt=!ot.height&&Math.abs($.height-ct)>1;(mt||At)&&(At&&($.width=nt),mt&&($.height=ct)),Q._initialAutoSize||(Q._initialAutoSize={width:nt,height:ct}),d.sanitizeMargins($)},d.supplyLayoutModuleDefaults=function(V,Q,ot,$){var Z=h.componentsRegistry,st=Q._basePlotModules,nt,ct,gt,Tt=h.subplotsRegistry.cartesian;for(nt in Z)gt=Z[nt],gt.includeBasePlot&>.includeBasePlot(V,Q);st.length||st.push(Tt),Q._has("cartesian")&&(h.getComponentMethod("grid","contentDefaults")(V,Q),Tt.finalizeSubplots(V,Q));for(var wt in Q._subplots)Q._subplots[wt].sort(e.subplotSort);for(ct=0;ct1&&(ot.l/=Ht,ot.r/=Ht)}if(bt){var Ut=(ot.t+ot.b)/bt;Ut>1&&(ot.t/=Ut,ot.b/=Ut)}var kt=ot.xl!==void 0?ot.xl:ot.x,Vt=ot.xr!==void 0?ot.xr:ot.x,It=ot.yt!==void 0?ot.yt:ot.y,re=ot.yb!==void 0?ot.yb:ot.y;At[Q]={l:{val:kt,size:ot.l+Lt},r:{val:Vt,size:ot.r+Lt},b:{val:re,size:ot.b+Lt},t:{val:It,size:ot.t+Lt}},mt[Q]=1}if(!$._replotting)return d.doAutoMargin(V)}};function Y(V){if("_redrawFromAutoMarginCount"in V._fullLayout)return!1;var Q=f.list(V,"",!0);for(var ot in Q)if(Q[ot].autoshift||Q[ot].shift)return!0;return!1}d.doAutoMargin=function(V){var Q=V._fullLayout,ot=Q.width,$=Q.height;Q._size||(Q._size={}),B(Q);var Z=Q._size,st=Q.margin,nt={t:0,b:0,l:0,r:0},ct=e.extendFlat({},Z),gt=st.l,Tt=st.r,wt=st.t,Rt=st.b,bt=Q._pushmargin,At=Q._pushmarginIds,mt=Q.minreducedwidth,Lt=Q.minreducedheight;if(st.autoexpand!==!1){for(var Ht in bt)At[Ht]||delete bt[Ht];var Ut=V._fullLayout._reservedMargin;for(var kt in Ut)for(var Vt in Ut[kt]){var It=Ut[kt][Vt];nt[Vt]=Math.max(nt[Vt],It)}bt.base={l:{val:0,size:gt},r:{val:1,size:Tt},t:{val:1,size:wt},b:{val:0,size:Rt}};for(var re in nt){var Kt=0;for(var $t in bt)$t!=="base"&&S(bt[$t][re].size)&&(Kt=bt[$t][re].size>Kt?bt[$t][re].size:Kt);var le=Math.max(0,st[re]-Kt);nt[re]=Math.max(0,nt[re]-le)}for(var he in bt){var de=bt[he].l||{},xe=bt[he].b||{},Se=de.val,ne=de.size,zt=xe.val,Xt=xe.size,Jt=ot-nt.r-nt.l,Wt=$-nt.t-nt.b;for(var Ft in bt){if(S(ne)&&bt[Ft].r){var xt=bt[Ft].r.val,yt=bt[Ft].r.size;if(xt>Se){var Et=(ne*xt+(yt-Jt)*Se)/(xt-Se),Mt=(yt*(1-Se)+(ne-Jt)*(1-xt))/(xt-Se);Et+Mt>gt+Tt&&(gt=Et,Tt=Mt)}}if(S(Xt)&&bt[Ft].t){var Nt=bt[Ft].t.val,jt=bt[Ft].t.size;if(Nt>zt){var ie=(Xt*Nt+(jt-Wt)*zt)/(Nt-zt),me=(jt*(1-zt)+(Xt-Wt)*(1-Nt))/(Nt-zt);ie+me>Rt+wt&&(Rt=ie,wt=me)}}}}}var be=e.constrain(ot-st.l-st.r,O,mt),ve=e.constrain($-st.t-st.b,H,Lt),Le=Math.max(0,ot-be),ce=Math.max(0,$-ve);if(Le){var Te=(gt+Tt)/Le;Te>1&&(gt/=Te,Tt/=Te)}if(ce){var Be=(Rt+wt)/ce;Be>1&&(Rt/=Be,wt/=Be)}if(Z.l=Math.round(gt)+nt.l,Z.r=Math.round(Tt)+nt.r,Z.t=Math.round(wt)+nt.t,Z.b=Math.round(Rt)+nt.b,Z.p=Math.round(st.pad),Z.w=Math.round(ot)-Z.l-Z.r,Z.h=Math.round($)-Z.t-Z.b,!Q._replotting&&(d.didMarginChange(ct,Z)||Y(V))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var ir=3*(1+Object.keys(At).length);if(Q._redrawFromAutoMarginCount1)return!0}return!1},d.graphJson=function(V,Q,ot,$,Z,st){(Z&&Q&&!V._fullData||Z&&!Q&&!V._fullLayout)&&d.supplyDefaults(V);var nt=Z?V._fullData:V.data,ct=Z?V._fullLayout:V.layout,gt=(V._transitionData||{})._frames;function Tt(bt,At){if(typeof bt=="function")return At?"_function_":null;if(e.isPlainObject(bt)){var mt={},Lt;return Object.keys(bt).sort().forEach(function(Vt){if(["_","["].indexOf(Vt.charAt(0))===-1){if(typeof bt[Vt]=="function"){At&&(mt[Vt]="_function");return}if(ot==="keepdata"){if(Vt.substr(Vt.length-3)==="src")return}else if(ot==="keepstream"){if(Lt=bt[Vt+"src"],typeof Lt=="string"&&Lt.indexOf(":")>0&&!e.isPlainObject(bt.stream))return}else if(ot!=="keepall"&&(Lt=bt[Vt+"src"],typeof Lt=="string"&&Lt.indexOf(":")>0))return;mt[Vt]=Tt(bt[Vt],At)}}),mt}var Ht=Array.isArray(bt),Ut=e.isTypedArray(bt);if((Ht||Ut)&&bt.dtype&&bt.shape){var kt=bt.bdata;return Tt({dtype:bt.dtype,shape:bt.shape,bdata:e.isArrayBuffer(kt)?x.encode(kt):kt},At)}return Ht?bt.map(function(Vt){return Tt(Vt,At)}):Ut?e.simpleMap(bt,e.identity):e.isJSDate(bt)?e.ms2DateTimeLocal(+bt):bt}var wt={data:(nt||[]).map(function(bt){var At=Tt(bt);return Q&&delete At.fit,At})};if(!Q&&(wt.layout=Tt(ct),Z)){var Rt=ct._size;wt.layout.computed={margin:{b:Rt.b,l:Rt.l,r:Rt.r,t:Rt.t}}}return gt&&(wt.frames=Tt(gt)),st&&(wt.config=Tt(V._context,!0)),$==="object"?wt:JSON.stringify(wt)},d.modifyFrames=function(V,Q){var ot,$,Z,st=V._transitionData._frames,nt=V._transitionData._frameHash;for(ot=0;ot0&&(V._transitioningWithDuration=!0),V._transitionData._interruptCallbacks.push(function(){$=!0}),ot.redraw&&V._transitionData._interruptCallbacks.push(function(){return h.call("redraw",V)}),V._transitionData._interruptCallbacks.push(function(){V.emit("plotly_transitioninterrupted",[])});var bt=0,At=0;function mt(){return bt++,function(){At++,!$&&At===bt&&ct(Rt)}}ot.runFn(mt),setTimeout(mt())})}function ct(Rt){if(V._transitionData)return st(V._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ot.redraw)return h.call("redraw",V)}).then(function(){V._transitioning=!1,V._transitioningWithDuration=!1,V.emit("plotly_transitioned",[])}).then(Rt)}function gt(){if(V._transitionData)return V._transitioning=!1,Z(V._transitionData._interruptCallbacks)}var Tt=[d.previousPromises,gt,ot.prepareFn,d.rehover,d.reselect,nt],wt=e.syncOrAsync(Tt,V);return(!wt||!wt.then)&&(wt=Promise.resolve()),wt.then(function(){return V})}d.doCalcdata=function(V,Q){var ot=f.list(V),$=V._fullData,Z=V._fullLayout,st,nt,ct,gt,Tt=new Array($.length),wt=(V.calcdata||[]).slice();for(V.calcdata=Tt,Z._numBoxes=0,Z._numViolins=0,Z._violinScaleGroupStats={},V._hmpixcount=0,V._hmlumcount=0,Z._piecolormap={},Z._sunburstcolormap={},Z._treemapcolormap={},Z._iciclecolormap={},Z._funnelareacolormap={},ct=0;ct<$.length;ct++)if(Array.isArray(Q)&&Q.indexOf(ct)===-1){Tt[ct]=wt[ct];continue}for(ct=0;ct<$.length;ct++)st=$[ct],st._arrayAttrs=p.findArrayAttributes(st),st._extremes={};var Rt=Z._subplots.polar||[];for(ct=0;ct=0;gt--)if(re[gt].enabled){st._indexToPoints=re[gt]._indexToPoints;break}nt&&nt.calc&&(It=nt.calc(V,st))}(!Array.isArray(It)||!It[0])&&(It=[{x:n,y:n}]),It[0].t||(It[0].t={}),It[0].trace=st,Tt[kt]=It}}for(X(ot,$,Z),ct=0;ct<$.length;ct++)Ht(ct,!0);for(ct=0;ct<$.length;ct++)Lt(ct);for(mt&&X(ot,$,Z),ct=0;ct<$.length;ct++)Ht(ct,!0);for(ct=0;ct<$.length;ct++)Ht(ct,!1);tt(V);var Ut=J(ot,V);if(Ut.length){for(Z._numBoxes=0,Z._numViolins=0,ct=0;ct0?E:1/0},A=i(d,w),_=g.mod(A+1,d.length);return[d[A],d[_]]}function m(o){return Math.abs(o)>1e-10?o:0}function v(o,d,w){d=d||0,w=w||0;for(var A=o.length,_=new Array(A),y=0;ybt?(At=st,mt=st*bt,Ut=(nt-mt)/V.h/2,Lt=[$[0],$[1]],Ht=[Z[0]+Ut,Z[1]-Ut]):(At=nt/bt,mt=nt,Ut=(st-At)/V.w/2,Lt=[$[0]+Ut,$[1]-Ut],Ht=[Z[0],Z[1]]),X.xLength2=At,X.yLength2=mt,X.xDomain2=Lt,X.yDomain2=Ht;var kt=X.xOffset2=V.l+V.w*Lt[0],Vt=X.yOffset2=V.t+V.h*(1-Ht[1]),It=X.radius=At/Tt,re=X.innerRadius=X.getHole(J)*It,Kt=X.cx=kt-It*gt[0],$t=X.cy=Vt+It*gt[3],le=X.cxx=Kt-kt,he=X.cyy=$t-Vt,de=Q.side,xe;de==="counterclockwise"?(xe=de,de="top"):de==="clockwise"&&(xe=de,de="bottom"),X.radialAxis=X.mockAxis(ut,J,Q,{_id:"x",side:de,_trueSide:xe,domain:[re/V.w,It/V.w]}),X.angularAxis=X.mockAxis(ut,J,ot,{side:"right",domain:[0,Math.PI],autorange:!1}),X.doAutoRange(ut,J),X.updateAngularAxis(ut,J),X.updateRadialAxis(ut,J),X.updateRadialAxisTitle(ut,J),X.xaxis=X.mockCartesianAxis(ut,J,{_id:"x",domain:Lt}),X.yaxis=X.mockCartesianAxis(ut,J,{_id:"y",domain:Ht});var Se=X.pathSubplot();X.clipPaths.forTraces.select("path").attr("d",Se).attr("transform",h(le,he)),tt.frontplot.attr("transform",h(kt,Vt)).call(r.setClipUrl,X._hasClipOnAxisFalse?null:X.clipIds.forTraces,X.gd),tt.bg.attr("d",Se).attr("transform",h(Kt,$t)).call(p.fill,J.bgcolor)},H.mockAxis=function(ut,J,X,tt){var V=S.extendFlat({},X,tt);return f(V,J,ut),V},H.mockCartesianAxis=function(ut,J,X){var tt=this,V=tt.isSmith,Q=X._id,ot=S.extendFlat({type:"linear"},X);n(ot,ut);var $={x:[0,2],y:[1,3]};return ot.setRange=function(){var Z=tt.sectorBBox,st=$[Q],nt=tt.radialAxis._rl,ct=(nt[1]-nt[0])/(1-tt.getHole(J));ot.range=[Z[st[0]]*ct,Z[st[1]]*ct]},ot.isPtWithinRange=Q==="x"&&!V?function(Z){return tt.isPtInside(Z)}:function(){return!0},ot.setRange(),ot.setScale(),ot},H.doAutoRange=function(ut,J){var X=this,tt=X.gd,V=X.radialAxis,Q=X.getRadial(J);c(tt,V);var ot=V.range;if(Q.range=ot.slice(),Q._input.range=ot.slice(),V._rl=[V.r2l(ot[0],null,"gregorian"),V.r2l(ot[1],null,"gregorian")],V.minallowed!==void 0){var $=V.r2l(V.minallowed);V._rl[0]>V._rl[1]?V._rl[1]=Math.max(V._rl[1],$):V._rl[0]=Math.max(V._rl[0],$)}if(V.maxallowed!==void 0){var Z=V.r2l(V.maxallowed);V._rl[0]90&&nt<=270&&(ct.tickangle=180);var wt=Tt?function(It){var re=D(X,L([It.x,0]));return h(re[0]-$,re[1]-Z)}:function(It){return h(ct.l2p(It.x)+ot,0)},Rt=Tt?function(It){return z(X,It.x,-1/0,1/0)}:function(It){return X.pathArc(ct.r2p(It.x)+ot)},bt=Y(st);if(X.radialTickLayout!==bt&&(V["radial-axis"].selectAll(".xtick").remove(),X.radialTickLayout=bt),gt){ct.setScale();var At=0,mt=Tt?(ct.tickvals||[]).filter(function(It){return It>=0}).map(function(It){return a.tickText(ct,It,!0,!1)}):a.calcTicks(ct),Lt=Tt?mt:a.clipEnds(ct,mt),Ht=a.getTickSigns(ct)[2];Tt&&((ct.ticks==="top"&&ct.side==="bottom"||ct.ticks==="bottom"&&ct.side==="top")&&(Ht=-Ht),ct.ticks==="top"&&ct.side==="top"&&(At=-ct.ticklen),ct.ticks==="bottom"&&ct.side==="bottom"&&(At=ct.ticklen)),a.drawTicks(tt,ct,{vals:mt,layer:V["radial-axis"],path:a.makeTickPath(ct,0,Ht),transFn:wt,crisp:!1}),a.drawGrid(tt,ct,{vals:Lt,layer:V["radial-grid"],path:Rt,transFn:S.noop,crisp:!1}),a.drawLabels(tt,ct,{vals:mt,layer:V["radial-axis"],transFn:wt,labelFns:a.makeLabelFns(ct,At)})}var Ut=X.radialAxisAngle=X.vangles?B(et(k(st.angle),X.vangles)):st.angle,kt=h($,Z),Vt=kt+x(-Ut);it(V["radial-axis"],gt&&(st.showticklabels||st.ticks),{transform:Vt}),it(V["radial-grid"],gt&&st.showgrid,{transform:Tt?"":kt}),it(V["radial-line"].select("line"),gt&&st.showline,{x1:Tt?-Q:ot,y1:0,x2:Q,y2:0,transform:Vt}).attr("stroke-width",st.linewidth).call(p.stroke,st.linecolor)},H.updateRadialAxisTitle=function(ut,J,X){if(!this.isSmith){var tt=this,V=tt.gd,Q=tt.radius,ot=tt.cx,$=tt.cy,Z=tt.getRadial(J),st=tt.id+"title",nt=0;if(Z.title){var ct=r.bBox(tt.layers["radial-axis"].node()).height,gt=Z.title.font.size,Tt=Z.side;nt=Tt==="top"?gt:Tt==="counterclockwise"?-(ct+gt*.4):ct+gt*.8}var wt=X!==void 0?X:tt.radialAxisAngle,Rt=k(wt),bt=Math.cos(Rt),At=Math.sin(Rt),mt=ot+Q/2*bt+nt*At,Lt=$-Q/2*At+nt*bt;tt.layers["radial-axis-title"]=b.draw(V,st,{propContainer:Z,propName:tt.id+".radialaxis.title",placeholder:N(V,"Click to enter radial axis title"),attributes:{x:mt,y:Lt,"text-anchor":"middle"},transform:{rotate:-wt}})}},H.updateAngularAxis=function(ut,J){var X=this,tt=X.gd,V=X.layers,Q=X.radius,ot=X.innerRadius,$=X.cx,Z=X.cy,st=X.getAngular(J),nt=X.angularAxis,ct=X.isSmith;ct||(X.fillViewInitialKey("angularaxis.rotation",st.rotation),nt.setGeometry(),nt.setScale());var gt=ct?function(re){var Kt=D(X,L([0,re.x]));return Math.atan2(Kt[0]-$,Kt[1]-Z)-Math.PI/2}:function(re){return nt.t2g(re.x)};nt.type==="linear"&&nt.thetaunit==="radians"&&(nt.tick0=B(nt.tick0),nt.dtick=B(nt.dtick));var Tt=function(re){return h($+Q*Math.cos(re),Z-Q*Math.sin(re))},wt=ct?function(re){var Kt=D(X,L([0,re.x]));return h(Kt[0],Kt[1])}:function(re){return Tt(gt(re))},Rt=ct?function(re){var Kt=D(X,L([0,re.x])),$t=Math.atan2(Kt[0]-$,Kt[1]-Z)-Math.PI/2;return h(Kt[0],Kt[1])+x(-B($t))}:function(re){var Kt=gt(re);return Tt(Kt)+x(-B(Kt))},bt=ct?function(re){return M(X,re.x,0,1/0)}:function(re){var Kt=gt(re),$t=Math.cos(Kt),le=Math.sin(Kt);return"M"+[$+ot*$t,Z-ot*le]+"L"+[$+Q*$t,Z-Q*le]},At=a.makeLabelFns(nt,0),mt=At.labelStandoff,Lt={};Lt.xFn=function(re){var Kt=gt(re);return Math.cos(Kt)*mt},Lt.yFn=function(re){var Kt=gt(re),$t=Math.sin(Kt)>0?.2:1;return-Math.sin(Kt)*(mt+re.fontSize*$t)+Math.abs(Math.cos(Kt))*(re.fontSize*y)},Lt.anchorFn=function(re){var Kt=gt(re),$t=Math.cos(Kt);return Math.abs($t)<.1?"middle":$t>0?"start":"end"},Lt.heightFn=function(re,Kt,$t){var le=gt(re);return-.5*(1+Math.sin(le))*$t};var Ht=Y(st);X.angularTickLayout!==Ht&&(V["angular-axis"].selectAll("."+nt._id+"tick").remove(),X.angularTickLayout=Ht);var Ut=ct?[1/0].concat(nt.tickvals||[]).map(function(re){return a.tickText(nt,re,!0,!1)}):a.calcTicks(nt);ct&&(Ut[0].text="∞",Ut[0].fontSize*=1.75);var kt;if(J.gridshape==="linear"?(kt=Ut.map(gt),S.angleDelta(kt[0],kt[1])<0&&(kt=kt.slice().reverse())):kt=null,X.vangles=kt,nt.type==="category"&&(Ut=Ut.filter(function(re){return S.isAngleInsideSector(gt(re),X.sectorInRad)})),nt.visible){var Vt=nt.ticks==="inside"?-1:1,It=(nt.linewidth||1)/2;a.drawTicks(tt,nt,{vals:Ut,layer:V["angular-axis"],path:"M"+Vt*It+",0h"+Vt*nt.ticklen,transFn:Rt,crisp:!1}),a.drawGrid(tt,nt,{vals:Ut,layer:V["angular-grid"],path:bt,transFn:S.noop,crisp:!1}),a.drawLabels(tt,nt,{vals:Ut,layer:V["angular-axis"],repositionOnUpdate:!0,transFn:wt,labelFns:Lt})}it(V["angular-line"].select("path"),st.showline,{d:X.pathSubplot(),transform:h($,Z)}).attr("stroke-width",st.linewidth).call(p.stroke,st.linecolor)},H.updateFx=function(ut,J){if(!this.gd._context.staticPlot){var X=!this.isSmith;X&&(this.updateAngularDrag(ut),this.updateRadialDrag(ut,J,0),this.updateRadialDrag(ut,J,1)),this.updateHoverAndMainDrag(ut)}},H.updateHoverAndMainDrag=function(ut){var J=this,X=J.isSmith,tt=J.gd,V=J.layers,Q=ut._zoomlayer,ot=E.MINZOOM,$=E.OFFEDGE,Z=J.radius,st=J.innerRadius,nt=J.cx,ct=J.cy,gt=J.cxx,Tt=J.cyy,wt=J.sectorInRad,Rt=J.vangles,bt=J.radialAxis,At=T.clampTiny,mt=T.findXYatLength,Lt=T.findEnclosingVertexAngles,Ht=E.cornerHalfWidth,Ut=E.cornerLen/2,kt,Vt,It=l.makeDragger(V,"path","maindrag",ut.dragmode===!1?"none":"crosshair");g.select(It).attr("d",J.pathSubplot()).attr("transform",h(nt,ct)),It.onmousemove=function(ce){v.hover(tt,ce,J.id),tt._fullLayout._lasthover=It,tt._fullLayout._hoversubplot=J.id},It.onmouseout=function(ce){tt._dragging||m.unhover(tt,ce)};var re={element:It,gd:tt,subplot:J.id,plotinfo:{id:J.id,xaxis:J.xaxis,yaxis:J.yaxis},xaxes:[J.xaxis],yaxes:[J.yaxis]},Kt,$t,le,he,de,xe,Se,ne,zt;function Xt(ce,Te){return Math.sqrt(ce*ce+Te*Te)}function Jt(ce,Te){return Xt(ce-gt,Te-Tt)}function Wt(ce,Te){return Math.atan2(Tt-Te,ce-gt)}function Ft(ce,Te){return[ce*Math.cos(Te),ce*Math.sin(-Te)]}function xt(ce,Te){if(ce===0)return J.pathSector(2*Ht);var Be=Ut/ce,ir=Te-Be,pe=Te+Be,Xe=Math.max(0,Math.min(ce,Z)),Ke=Xe-Ht,or=Xe+Ht;return"M"+Ft(Ke,ir)+"A"+[Ke,Ke]+" 0,0,0 "+Ft(Ke,pe)+"L"+Ft(or,pe)+"A"+[or,or]+" 0,0,1 "+Ft(or,ir)+"Z"}function yt(ce,Te,Be){if(ce===0)return J.pathSector(2*Ht);var ir=Ft(ce,Te),pe=Ft(ce,Be),Xe=At((ir[0]+pe[0])/2),Ke=At((ir[1]+pe[1])/2),or,$e;if(Xe&&Ke){var ge=Ke/Xe,se=-1/ge,Ae=mt(Ht,ge,Xe,Ke);or=mt(Ut,se,Ae[0][0],Ae[0][1]),$e=mt(Ut,se,Ae[1][0],Ae[1][1])}else{var Ce,Ie;Ke?(Ce=Ut,Ie=Ht):(Ce=Ht,Ie=Ut),or=[[Xe-Ce,Ke-Ie],[Xe+Ce,Ke-Ie]],$e=[[Xe-Ce,Ke+Ie],[Xe+Ce,Ke+Ie]]}return"M"+or.join("L")+"L"+$e.reverse().join("L")+"Z"}function Et(){le=null,he=null,de=J.pathSubplot(),xe=!1;var ce=tt._fullLayout[J.id];Se=C(ce.bgcolor).getLuminance(),ne=l.makeZoombox(Q,Se,nt,ct,de),ne.attr("fill-rule","evenodd"),zt=l.makeCorners(Q,nt,ct),d(tt)}function Mt(ce,Te){return Te=Math.max(Math.min(Te,Z),st),ce<$?ce=0:Z-ce<$?ce=Z:Te<$?Te=0:Z-Te<$&&(Te=Z),Math.abs(Te-ce)>ot?(ce-1&&ce===1&&o(Te,tt,[J.xaxis],[J.yaxis],J.id,re),Be.indexOf("event")>-1&&v.click(tt,Te,J.id)}re.prepFn=function(ce,Te,Be){var ir=tt._fullLayout.dragmode,pe=It.getBoundingClientRect();tt._fullLayout._calcInverseTransform(tt);var Xe=tt._fullLayout._invTransform;kt=tt._fullLayout._invScaleX,Vt=tt._fullLayout._invScaleY;var Ke=S.apply3DTransform(Xe)(Te-pe.left,Be-pe.top);if(Kt=Ke[0],$t=Ke[1],Rt){var or=T.findPolygonOffset(Z,wt[0],wt[1],Rt);Kt+=gt+or[0],$t+=Tt+or[1]}switch(ir){case"zoom":re.clickFn=Le,X||(Rt?re.moveFn=me:re.moveFn=jt,re.doneFn=be,Et());break;case"select":case"lasso":u(ce,Te,Be,re,ir);break}},m.init(re)},H.updateRadialDrag=function(ut,J,X){var tt=this,V=tt.gd,Q=tt.layers,ot=tt.radius,$=tt.innerRadius,Z=tt.cx,st=tt.cy,nt=tt.radialAxis,ct=E.radialDragBoxSize,gt=ct/2;if(!nt.visible)return;var Tt=k(tt.radialAxisAngle),wt=nt._rl,Rt=wt[0],bt=wt[1],At=wt[X],mt=.75*(wt[1]-wt[0])/(1-tt.getHole(J))/ot,Lt,Ht,Ut;X?(Lt=Z+(ot+gt)*Math.cos(Tt),Ht=st-(ot+gt)*Math.sin(Tt),Ut="radialdrag"):(Lt=Z+($-gt)*Math.cos(Tt),Ht=st-($-gt)*Math.sin(Tt),Ut="radialdrag-inner");var kt=l.makeRectDragger(Q,Ut,"crosshair",-gt,-gt,ct,ct),Vt={element:kt,gd:V};ut.dragmode===!1&&(Vt.dragmode=!1),it(g.select(kt),nt.visible&&$0!=(X?Kt>Rt:Kt=90||V>90&&Q>=450?Tt=1:$<=0&&st<=0?Tt=0:Tt=Math.max($,st),V<=180&&Q>=180||V>180&&Q>=540?nt=-1:ot>=0&&Z>=0?nt=0:nt=Math.min(ot,Z),V<=270&&Q>=270||V>270&&Q>=630?ct=-1:$>=0&&st>=0?ct=0:ct=Math.min($,st),Q>=360?gt=1:ot<=0&&Z<=0?gt=0:gt=Math.max(ot,Z),[nt,ct,gt,Tt]}function et(ut,J){var X=function(V){return S.angleDist(ut,V)},tt=S.findIndexOfMin(J,X);return J[tt]}function it(ut,J,X){return J?(ut.attr("display",null),ut.attr(X)):ut&&ut.attr("display","none"),ut}},57696:function(G,U,t){var g=t(3400),C=t(78344),i=g.deg2rad,S=g.rad2deg;G.exports=function(a,n,f){switch(C(a,f),a._id){case"x":case"radialaxis":x(a,n);break;case"angularaxis":r(a,n);break}};function x(e,a){var n=a._subplot;e.setGeometry=function(){var f=e._rl[0],c=e._rl[1],l=n.innerRadius,m=(n.radius-l)/(c-f),v=l/m,b=f>c?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var o=e.c2l(u)-f;return(b(o)?o:0)+v},e.g2c=function(u){return e.l2c(u+f-v)},e.g2p=function(u){return u*m},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function h(e,a){return a==="degrees"?i(e):e}function p(e,a){return a==="degrees"?S(e):e}function r(e,a){var n=e.type;if(n==="linear"){var f=e.d2c,c=e.c2d;e.d2c=function(l,m){return h(f(l),m)},e.c2d=function(l,m){return c(p(l,m))}}e.makeCalcdata=function(l,m){var v=l[m],b=l._length,u,o,d=function(E){return e.d2c(E,l.thetaunit)};if(v)for(u=new Array(b),o=0;o0?1:0}function t(x){var h=x[0],p=x[1];if(!isFinite(h)||!isFinite(p))return[1,0];var r=(h+1)*(h+1)+p*p;return[(h*h+p*p-1)/r,2*p/r]}function g(x,h){var p=h[0],r=h[1];return[p*x.radius+x.cx,-r*x.radius+x.cy]}function C(x,h){return h*x.radius}function i(x,h,p,r){var e=g(x,t([p,h])),a=e[0],n=e[1],f=g(x,t([r,h])),c=f[0],l=f[1];if(h===0)return["M"+a+","+n,"L"+c+","+l].join(" ");var m=C(x,1/Math.abs(h));return["M"+a+","+n,"A"+m+","+m+" 0 0,"+(h<0?1:0)+" "+c+","+l].join(" ")}function S(x,h,p,r){var e=C(x,1/(h+1)),a=g(x,t([h,p])),n=a[0],f=a[1],c=g(x,t([h,r])),l=c[0],m=c[1];if(U(p)!==U(r)){var v=g(x,t([h,0])),b=v[0],u=v[1];return["M"+n+","+f,"A"+e+","+e+" 0 0,"+(00){for(var h=[],p=0;p=o&&(y.min=0,E.min=0,T.min=0,l.aaxis&&delete l.aaxis.min,l.baxis&&delete l.baxis.min,l.caxis&&delete l.caxis.min)}function c(l,m,v,b){var u=a[m._name];function o(s,L){return i.coerce(l,m,u,s,L)}o("uirevision",b.uirevision),m.type="linear";var d=o("color"),w=d!==u.color.dflt?d:v.font.color,A=m._name,_=A.charAt(0).toUpperCase(),y="Component "+_,E=o("title.text",y);m._hovertitle=E===y?E:_,i.coerceFont(o,"title.font",{family:v.font.family,size:i.bigFont(v.font.size),color:w}),o("min"),r(l,m,o,"linear"),h(l,m,o,"linear"),x(l,m,o,"linear",{noAutotickangles:!0}),p(l,m,o,{outerTicks:!0});var T=o("showticklabels");T&&(i.coerceFont(o,"tickfont",{family:v.font.family,size:v.font.size,color:w}),o("tickangle"),o("tickformat")),e(l,m,o,{dfltColor:d,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u}),o("hoverformat"),o("layer")}},24696:function(G,U,t){var g=t(33428),C=t(49760),i=t(24040),S=t(3400),x=S.strTranslate,h=S._,p=t(76308),r=t(43616),e=t(78344),a=t(92880).extendFlat,n=t(7316),f=t(54460),c=t(86476),l=t(93024),m=t(72760),v=m.freeMode,b=m.rectMode,u=t(81668),o=t(22676).prepSelect,d=t(22676).selectOnClick,w=t(22676).clearOutline,A=t(22676).clearSelectionsCache,_=t(33816);function y(B,O){this.id=B.id,this.graphDiv=B.graphDiv,this.init(O),this.makeFramework(O),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}G.exports=y;var E=y.prototype;E.init=function(B){this.container=B._ternarylayer,this.defs=B._defs,this.layoutId=B._uid,this.traceHash={},this.layers={}},E.plot=function(B,O){var H=this,Y=O[H.id],j=O._size;H._hasClipOnAxisFalse=!1;for(var et=0;etT*X?(nt=X,st=nt*T):(st=J,nt=st/T),ct=it*st/J,gt=ut*nt/X,$=O.l+O.w*j-st/2,Z=O.t+O.h*(1-et)-nt/2,H.x0=$,H.y0=Z,H.w=st,H.h=nt,H.sum=tt,H.xaxis={type:"linear",range:[V+2*ot-tt,tt-V-2*Q],domain:[j-ct/2,j+ct/2],_id:"x"},e(H.xaxis,H.graphDiv._fullLayout),H.xaxis.setScale(),H.xaxis.isPtWithinRange=function(Vt){return Vt.a>=H.aaxis.range[0]&&Vt.a<=H.aaxis.range[1]&&Vt.b>=H.baxis.range[1]&&Vt.b<=H.baxis.range[0]&&Vt.c>=H.caxis.range[1]&&Vt.c<=H.caxis.range[0]},H.yaxis={type:"linear",range:[V,tt-Q-ot],domain:[et-gt/2,et+gt/2],_id:"y"},e(H.yaxis,H.graphDiv._fullLayout),H.yaxis.setScale(),H.yaxis.isPtWithinRange=function(){return!0};var Tt=H.yaxis.domain[0],wt=H.aaxis=a({},B.aaxis,{range:[V,tt-Q-ot],side:"left",tickangle:(+B.aaxis.tickangle||0)-30,domain:[Tt,Tt+gt*T],anchor:"free",position:0,_id:"y",_length:st});e(wt,H.graphDiv._fullLayout),wt.setScale();var Rt=H.baxis=a({},B.baxis,{range:[tt-V-ot,Q],side:"bottom",domain:H.xaxis.domain,anchor:"free",position:0,_id:"x",_length:st});e(Rt,H.graphDiv._fullLayout),Rt.setScale();var bt=H.caxis=a({},B.caxis,{range:[tt-V-Q,ot],side:"right",tickangle:(+B.caxis.tickangle||0)+30,domain:[Tt,Tt+gt*T],anchor:"free",position:0,_id:"y",_length:st});e(bt,H.graphDiv._fullLayout),bt.setScale();var At="M"+$+","+(Z+nt)+"h"+st+"l-"+st/2+",-"+nt+"Z";H.clipDef.select("path").attr("d",At),H.layers.plotbg.select("path").attr("d",At);var mt="M0,"+nt+"h"+st+"l-"+st/2+",-"+nt+"Z";H.clipDefRelative.select("path").attr("d",mt);var Lt=x($,Z);H.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Lt),H.clipDefRelative.select("path").attr("transform",null);var Ht=x($-Rt._offset,Z+nt);H.layers.baxis.attr("transform",Ht),H.layers.bgrid.attr("transform",Ht);var Ut=x($+st/2,Z)+"rotate(30)"+x(0,-wt._offset);H.layers.aaxis.attr("transform",Ut),H.layers.agrid.attr("transform",Ut);var kt=x($+st/2,Z)+"rotate(-30)"+x(0,-bt._offset);H.layers.caxis.attr("transform",kt),H.layers.cgrid.attr("transform",kt),H.drawAxes(!0),H.layers.aline.select("path").attr("d",wt.showline?"M"+$+","+(Z+nt)+"l"+st/2+",-"+nt:"M0,0").call(p.stroke,wt.linecolor||"#000").style("stroke-width",(wt.linewidth||0)+"px"),H.layers.bline.select("path").attr("d",Rt.showline?"M"+$+","+(Z+nt)+"h"+st:"M0,0").call(p.stroke,Rt.linecolor||"#000").style("stroke-width",(Rt.linewidth||0)+"px"),H.layers.cline.select("path").attr("d",bt.showline?"M"+($+st/2)+","+Z+"l"+st/2+","+nt:"M0,0").call(p.stroke,bt.linecolor||"#000").style("stroke-width",(bt.linewidth||0)+"px"),H.graphDiv._context.staticPlot||H.initInteractions(),r.setClipUrl(H.layers.frontplot,H._hasClipOnAxisFalse?null:H.clipId,H.graphDiv)},E.drawAxes=function(B){var O=this,H=O.graphDiv,Y=O.id.substr(7)+"title",j=O.layers,et=O.aaxis,it=O.baxis,ut=O.caxis;if(O.drawAx(et),O.drawAx(it),O.drawAx(ut),B){var J=Math.max(et.showticklabels?et.tickfont.size/2:0,(ut.showticklabels?ut.tickfont.size*.75:0)+(ut.ticks==="outside"?ut.ticklen*.87:0)),X=(it.showticklabels?it.tickfont.size:0)+(it.ticks==="outside"?it.ticklen:0)+3;j["a-title"]=u.draw(H,"a"+Y,{propContainer:et,propName:O.id+".aaxis.title",placeholder:h(H,"Click to enter Component A title"),attributes:{x:O.x0+O.w/2,y:O.y0-et.title.font.size/3-J,"text-anchor":"middle"}}),j["b-title"]=u.draw(H,"b"+Y,{propContainer:it,propName:O.id+".baxis.title",placeholder:h(H,"Click to enter Component B title"),attributes:{x:O.x0-X,y:O.y0+O.h+it.title.font.size*.83+X,"text-anchor":"middle"}}),j["c-title"]=u.draw(H,"c"+Y,{propContainer:ut,propName:O.id+".caxis.title",placeholder:h(H,"Click to enter Component C title"),attributes:{x:O.x0+O.w+X,y:O.y0+O.h+ut.title.font.size*.83+X,"text-anchor":"middle"}})}},E.drawAx=function(B){var O=this,H=O.graphDiv,Y=B._name,j=Y.charAt(0),et=B._id,it=O.layers[Y],ut=30,J=j+"tickLayout",X=s(B);O[J]!==X&&(it.selectAll("."+et+"tick").remove(),O[J]=X),B.setScale();var tt=f.calcTicks(B),V=f.clipEnds(B,tt),Q=f.makeTransTickFn(B),ot=f.getTickSigns(B)[2],$=S.deg2rad(ut),Z=ot*(B.linewidth||1)/2,st=ot*B.ticklen,nt=O.w,ct=O.h,gt=j==="b"?"M0,"+Z+"l"+Math.sin($)*st+","+Math.cos($)*st:"M"+Z+",0l"+Math.cos($)*st+","+-Math.sin($)*st,Tt={a:"M0,0l"+ct+",-"+nt/2,b:"M0,0l-"+nt/2+",-"+ct,c:"M0,0l-"+ct+","+nt/2}[j];f.drawTicks(H,B,{vals:B.ticks==="inside"?V:tt,layer:it,path:gt,transFn:Q,crisp:!1}),f.drawGrid(H,B,{vals:V,layer:O.layers[j+"grid"],path:Tt,transFn:Q,crisp:!1}),f.drawLabels(H,B,{vals:tt,layer:it,transFn:Q,labelFns:f.makeLabelFns(B,0,ut)})};function s(B){return B.ticks+String(B.ticklen)+String(B.showticklabels)}var L=_.MINZOOM/2+.87,M="m-0.87,.5h"+L+"v3h-"+(L+5.2)+"l"+(L/2+2.6)+",-"+(L*.87+4.5)+"l2.6,1.5l-"+L/2+","+L*.87+"Z",z="m0.87,.5h-"+L+"v3h"+(L+5.2)+"l-"+(L/2+2.6)+",-"+(L*.87+4.5)+"l-2.6,1.5l"+L/2+","+L*.87+"Z",D="m0,1l"+L/2+","+L*.87+"l2.6,-1.5l-"+(L/2+2.6)+",-"+(L*.87+4.5)+"l-"+(L/2+2.6)+","+(L*.87+4.5)+"l2.6,1.5l"+L/2+",-"+L*.87+"Z",N="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",I=!0;E.clearOutline=function(){A(this.dragOptions),w(this.dragOptions.gd)},E.initInteractions=function(){var B=this,O=B.layers.plotbg.select("path").node(),H=B.graphDiv,Y=H._fullLayout._zoomlayer,j,et;this.dragOptions={element:O,gd:H,plotinfo:{id:B.id,domain:H._fullLayout[B.id].domain,xaxis:B.xaxis,yaxis:B.yaxis},subplot:B.id,prepFn:function(Ht,Ut,kt){B.dragOptions.xaxes=[B.xaxis],B.dragOptions.yaxes=[B.yaxis],j=H._fullLayout._invScaleX,et=H._fullLayout._invScaleY;var Vt=B.dragOptions.dragmode=H._fullLayout.dragmode;v(Vt)?B.dragOptions.minDrag=1:B.dragOptions.minDrag=void 0,Vt==="zoom"?(B.dragOptions.moveFn=Rt,B.dragOptions.clickFn=nt,B.dragOptions.doneFn=bt,ct(Ht,Ut,kt)):Vt==="pan"?(B.dragOptions.moveFn=mt,B.dragOptions.clickFn=nt,B.dragOptions.doneFn=Lt,At(),B.clearOutline(H)):(b(Vt)||v(Vt))&&o(Ht,Ut,kt,B.dragOptions,Vt)}};var it,ut,J,X,tt,V,Q,ot,$,Z;function st(Ht){var Ut={};return Ut[B.id+".aaxis.min"]=Ht.a,Ut[B.id+".baxis.min"]=Ht.b,Ut[B.id+".caxis.min"]=Ht.c,Ut}function nt(Ht,Ut){var kt=H._fullLayout.clickmode;k(H),Ht===2&&(H.emit("plotly_doubleclick",null),i.call("_guiRelayout",H,st({a:0,b:0,c:0}))),kt.indexOf("select")>-1&&Ht===1&&d(Ut,H,[B.xaxis],[B.yaxis],B.id,B.dragOptions),kt.indexOf("event")>-1&&l.click(H,Ut,B.id)}function ct(Ht,Ut,kt){var Vt=O.getBoundingClientRect();it=Ut-Vt.left,ut=kt-Vt.top,H._fullLayout._calcInverseTransform(H);var It=H._fullLayout._invTransform,re=S.apply3DTransform(It)(it,ut);it=re[0],ut=re[1],J={a:B.aaxis.range[0],b:B.baxis.range[1],c:B.caxis.range[1]},tt=J,X=B.aaxis.range[1]-J.a,V=C(B.graphDiv._fullLayout[B.id].bgcolor).getLuminance(),Q="M0,"+B.h+"L"+B.w/2+", 0L"+B.w+","+B.h+"Z",ot=!1,$=Y.append("path").attr("class","zoombox").attr("transform",x(B.x0,B.y0)).style({fill:V>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",Q),Z=Y.append("path").attr("class","zoombox-corners").attr("transform",x(B.x0,B.y0)).style({fill:p.background,stroke:p.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),B.clearOutline(H)}function gt(Ht,Ut){return 1-Ut/B.h}function Tt(Ht,Ut){return 1-(Ht+(B.h-Ut)/Math.sqrt(3))/B.w}function wt(Ht,Ut){return(Ht-(B.h-Ut)/Math.sqrt(3))/B.w}function Rt(Ht,Ut){var kt=it+Ht*j,Vt=ut+Ut*et,It=Math.max(0,Math.min(1,gt(it,ut),gt(kt,Vt))),re=Math.max(0,Math.min(1,Tt(it,ut),Tt(kt,Vt))),Kt=Math.max(0,Math.min(1,wt(it,ut),wt(kt,Vt))),$t=(It/2+Kt)*B.w,le=(1-It/2-re)*B.w,he=($t+le)/2,de=le-$t,xe=(1-It)*B.h,Se=xe-de/T;de<_.MINZOOM?(tt=J,$.attr("d",Q),Z.attr("d","M0,0Z")):(tt={a:J.a+It*X,b:J.b+re*X,c:J.c+Kt*X},$.attr("d",Q+"M"+$t+","+xe+"H"+le+"L"+he+","+Se+"L"+$t+","+xe+"Z"),Z.attr("d","M"+it+","+ut+N+"M"+$t+","+xe+M+"M"+le+","+xe+z+"M"+he+","+Se+D)),ot||($.transition().style("fill",V>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),ot=!0),H.emit("plotly_relayouting",st(tt))}function bt(){k(H),tt!==J&&(i.call("_guiRelayout",H,st(tt)),I&&H.data&&H._context.showTips&&(S.notifier(h(H,"Double-click to zoom back out"),"long"),I=!1))}function At(){J={a:B.aaxis.range[0],b:B.baxis.range[1],c:B.caxis.range[1]},tt=J}function mt(Ht,Ut){var kt=Ht/B.xaxis._m,Vt=Ut/B.yaxis._m;tt={a:J.a-Vt,b:J.b+(kt+Vt)/2,c:J.c-(kt-Vt)/2};var It=[tt.a,tt.b,tt.c].sort(S.sorterAsc),re={a:It.indexOf(tt.a),b:It.indexOf(tt.b),c:It.indexOf(tt.c)};It[0]<0&&(It[1]+It[0]/2<0?(It[2]+=It[0]+It[1],It[0]=It[1]=0):(It[2]+=It[0]/2,It[1]+=It[0]/2,It[0]=0),tt={a:It[re.a],b:It[re.b],c:It[re.c]},Ut=(J.a-tt.a)*B.yaxis._m,Ht=(J.c-tt.c-J.b+tt.b)*B.xaxis._m);var Kt=x(B.x0+Ht,B.y0+Ut);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Kt);var $t=x(-Ht,-Ut);B.clipDefRelative.select("path").attr("transform",$t),B.aaxis.range=[tt.a,B.sum-tt.b-tt.c],B.baxis.range=[B.sum-tt.a-tt.c,tt.b],B.caxis.range=[B.sum-tt.a-tt.b,tt.c],B.drawAxes(!1),B._hasClipOnAxisFalse&&B.plotContainer.select(".scatterlayer").selectAll(".trace").call(r.hideOutsideRangePoints,B),H.emit("plotly_relayouting",st(tt))}function Lt(){i.call("_guiRelayout",H,st(tt))}O.onmousemove=function(Ht){l.hover(H,Ht,B.id),H._fullLayout._lasthover=O,H._fullLayout._hoversubplot=B.id},O.onmouseout=function(Ht){H._dragging||c.unhover(H,Ht)},c.init(this.dragOptions)};function k(B){g.select(B).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}},24040:function(G,U,t){var g=t(24248),C=t(16628),i=t(52416),S=t(63620),x=t(52200).addStyleRule,h=t(92880),p=t(45464),r=t(64859),e=h.extendFlat,a=h.extendDeepAll;U.modules={},U.allCategories={},U.allTypes=[],U.subplotsRegistry={},U.transformsRegistry={},U.componentsRegistry={},U.layoutArrayContainers=[],U.layoutArrayRegexes=[],U.traceLayoutAttributes={},U.localeRegistry={},U.apiMethodRegistry={},U.collectableSubplotTypes=null,U.register=function(A){if(U.collectableSubplotTypes=null,A)A&&!Array.isArray(A)&&(A=[A]);else throw new Error("No argument passed to Plotly.register.");for(var _=0;_-1}G.exports=function(r,e){var a,n=r.data,f=r.layout,c=S([],n),l=S({},f,x(e.tileClass)),m=r._context||{};if(e.width&&(l.width=e.width),e.height&&(l.height=e.height),e.tileClass==="thumbnail"||e.tileClass==="themes__thumb"){l.annotations=[];var v=Object.keys(l);for(a=0;a")!==-1?"":f.html(l).text()});return f.remove(),c}function a(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}G.exports=function(f,c,l){var m=f._fullLayout,v=m._paper,b=m._toppaper,u=m.width,o=m.height,d;v.insert("rect",":first-child").call(i.setRect,0,0,u,o).call(S.fill,m.paper_bgcolor);var w=m._basePlotModules||[];for(d=0;dH+B||!g(O))}for(var j=0;j=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&g(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function l(m,v,b,u,o,d){d=d||{};var w=d.moduleHasSelected!==!1,A=d.moduleHasUnselected!==!1,_=d.moduleHasConstrain!==!1,y=d.moduleHasCliponaxis!==!1,E=d.moduleHasTextangle!==!1,T=d.moduleHasInsideanchor!==!1,s=!!d.hasPathbar,L=Array.isArray(o)||o==="auto",M=L||o==="inside",z=L||o==="outside";if(M||z){var D=a(u,"textfont",b.font),N=C.extendFlat({},D),I=m.textfont&&m.textfont.color,k=!I;if(k&&delete N.color,a(u,"insidetextfont",N),s){var B=C.extendFlat({},D);k&&delete B.color,a(u,"pathbar.textfont",B)}z&&a(u,"outsidetextfont",D),w&&u("selected.textfont.color"),A&&u("unselected.textfont.color"),_&&u("constraintext"),y&&u("cliponaxis"),E&&u("textangle"),u("texttemplate")}M&&T&&u("insidetextanchor")}G.exports={supplyDefaults:n,crossTraceDefaults:f,handleText:l,validateCornerradius:c}},52160:function(G){G.exports=function(t,g,C){return t.x="xVal"in g?g.xVal:g.x,t.y="yVal"in g?g.yVal:g.y,g.xa&&(t.xaxis=g.xa),g.ya&&(t.yaxis=g.ya),C.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}},60444:function(G,U,t){var g=t(38248),C=t(49760),i=t(3400).isArrayOrTypedArray;U.coerceString=function(S,x,h){if(typeof x=="string"){if(x||!S.noBlank)return x}else if((typeof x=="number"||x===!0)&&!S.strict)return String(x);return h!==void 0?h:S.dflt},U.coerceNumber=function(S,x,h){if(g(x)){x=+x;var p=S.min,r=S.max,e=p!==void 0&&xr;if(!e)return x}return h!==void 0?h:S.dflt},U.coerceColor=function(S,x,h){return C(x).isValid()?x:h!==void 0?h:S.dflt},U.coerceEnumerated=function(S,x,h){return S.coerceNumber&&(x=+x),S.values.indexOf(x)!==-1?x:h!==void 0?h:S.dflt},U.getValue=function(S,x){var h;return i(S)?x0?gt+=Tt:y<0&&(gt-=Tt)}return gt}function ut(ct){var gt=y,Tt=ct.b,wt=it(ct);return g.inbox(Tt-gt,wt-gt,w+(wt-gt)/(wt-Tt)-1)}function J(ct){var gt=y,Tt=ct.b,wt=it(ct);return g.inbox(Tt-gt,wt-gt,A+(wt-gt)/(wt-Tt)-1)}var X=n[E+"a"],tt=n[T+"a"];M=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function V(ct){return(s(ct)+L(ct))/2}var Q=g.getDistanceFunction(l,s,L,V);if(g.getClosest(v,Q,n),n.index!==!1&&v[n.index].p!==p){D||(O=function(ct){return Math.min(N(ct),ct.p-u.bargroupwidth/2)},H=function(ct){return Math.max(I(ct),ct.p+u.bargroupwidth/2)});var ot=n.index,$=v[ot],Z=b.base?$.b+$.s:$.s;n[T+"0"]=n[T+"1"]=tt.c2p($[T],!0),n[T+"LabelVal"]=Z;var st=u.extents[u.extents.round($.p)];n[E+"0"]=X.c2p(o?O($):st[0],!0),n[E+"1"]=X.c2p(o?H($):st[1],!0);var nt=$.orig_p!==void 0;return n[E+"LabelVal"]=nt?$.orig_p:$.p,n.labelLabel=h(X,n[E+"LabelVal"],b[E+"hoverformat"]),n.valueLabel=h(tt,n[T+"LabelVal"],b[T+"hoverformat"]),n.baseLabel=h(tt,$.b,b[T+"hoverformat"]),n.spikeDistance=(J($)+et($))/2,n[E+"Spike"]=X.c2p($.p,!0),S($,b,n),n.hovertemplate=b.hovertemplate,n}}function a(n,f){var c=f.mcc||n.marker.color,l=f.mlcc||n.marker.line.color,m=x(n,f);if(i.opacity(c))return c;if(i.opacity(l)&&m)return l}G.exports={hoverPoints:r,hoverOnBars:e,getTraceColor:a}},51132:function(G,U,t){G.exports={attributes:t(20832),layoutAttributes:t(39324),supplyDefaults:t(31508).supplyDefaults,crossTraceDefaults:t(31508).crossTraceDefaults,supplyLayoutDefaults:t(37156),calc:t(71820),crossTraceCalc:t(96376).crossTraceCalc,colorbar:t(5528),arraysToCalcdata:t(84664),plot:t(98184).plot,style:t(60100).style,styleOnSelect:t(60100).styleOnSelect,hoverPoints:t(63400).hoverPoints,eventData:t(52160),selectPoints:t(45784),moduleType:"trace",name:"bar",basePlotModule:t(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(G){G.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(G,U,t){var g=t(24040),C=t(54460),i=t(3400),S=t(39324),x=t(31508).validateCornerradius;G.exports=function(h,p,r){function e(d,w){return i.coerce(h,p,S,d,w)}for(var a=!1,n=!1,f=!1,c={},l=e("barmode"),m=0;m0)-(j<0)}function _(j,et){return j0}function s(j,et,it,ut,J,X){var tt=et.xaxis,V=et.yaxis,Q=j._fullLayout,ot=j._context.staticPlot;J||(J={mode:Q.barmode,norm:Q.barmode,gap:Q.bargap,groupgap:Q.bargroupgap},n("bar",Q));var $=i.makeTraceGroups(ut,it,"trace bars").each(function(Z){var st=g.select(this),nt=Z[0].trace,ct=Z[0].t,gt=nt.type==="waterfall",Tt=nt.type==="funnel",wt=nt.type==="histogram",Rt=nt.type==="bar",bt=Rt||Tt,At=0;gt&&nt.connector.visible&&nt.connector.mode==="between"&&(At=nt.connector.line.width/2);var mt=nt.orientation==="h",Lt=T(J),Ht=i.ensureSingle(st,"g","points"),Ut=w(nt),kt=Ht.selectAll("g.point").data(i.identity,Ut);kt.enter().append("g").classed("point",!0),kt.exit().remove(),kt.each(function(It,re){var Kt=g.select(this),$t=y(It,tt,V,mt),le=$t[0][0],he=$t[0][1],de=$t[1][0],xe=$t[1][1],Se=(mt?he-le:xe-de)===0;Se&&bt&&c.getLineWidth(nt,It)&&(Se=!1),Se||(Se=!C(le)||!C(he)||!C(de)||!C(xe)),It.isBlank=Se,Se&&(mt?he=le:xe=de),At&&!Se&&(mt?(le-=_(le,he)*At,he+=_(le,he)*At):(de-=_(de,xe)*At,xe+=_(de,xe)*At));var ne,zt;if(nt.type==="waterfall"){if(!Se){var Xt=nt[It.dir].marker;ne=Xt.line.width,zt=Xt.color}}else ne=c.getLineWidth(nt,It),zt=It.mc||nt.marker.color;function Jt(se){var Ae=g.round(ne/2%1,2);return J.gap===0&&J.groupgap===0?g.round(Math.round(se)-Ae,2):se}function Wt(se,Ae,Ce){return Ce&&se===Ae?se:Math.abs(se-Ae)>=2?Jt(se):se>Ae?Math.ceil(se):Math.floor(se)}var Ft=x.opacity(zt),xt=Ft<1||ne>.01?Jt:Wt;j._context.staticPlot||(le=xt(le,he,mt),he=xt(he,le,mt),de=xt(de,xe,!mt),xe=xt(xe,de,!mt));var yt=mt?tt.c2p:V.c2p,Et;It.s0>0?Et=It._sMax:It.s0<0?Et=It._sMin:Et=It.s1>0?It._sMax:It._sMin;function Mt(se,Ae){if(!se)return 0;var Ce=Math.abs(mt?xe-de:he-le),Ie=Math.abs(mt?he-le:xe-de),Pe=xt(Math.abs(yt(Et,!0)-yt(0,!0))),ke=It.hasB?Math.min(Ce/2,Ie/2):Math.min(Ce/2,Pe),Ve;if(Ae==="%"){var Je=Math.min(50,se);Ve=Ce*(Je/100)}else Ve=se;return xt(Math.max(Math.min(Ve,ke),0))}var Nt=Rt||wt?Mt(ct.cornerradiusvalue,ct.cornerradiusform):0,jt,ie,me="M"+le+","+de+"V"+xe+"H"+he+"V"+de+"Z",be=0;if(Nt&&It.s){var ve=A(It.s0)===0||A(It.s)===A(It.s0)?It.s1:It.s0;if(be=xt(It.hasB?0:Math.abs(yt(Et,!0)-yt(ve,!0))),be0?Math.sqrt(be*(2*Nt-be)):0,pe=Le>0?Math.max:Math.min;jt="M"+le+","+de+"V"+(xe-Be*ce)+"H"+pe(he-(Nt-be)*Le,le)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+he+","+(xe-Nt*ce-ir)+"V"+(de+Nt*ce+ir)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+pe(he-(Nt-be)*Le,le)+","+(de+Be*ce)+"Z"}else if(It.hasB)jt="M"+(le+Nt*Le)+","+de+"A "+Nt+","+Nt+" 0 0 "+Te+" "+le+","+(de+Nt*ce)+"V"+(xe-Nt*ce)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(le+Nt*Le)+","+xe+"H"+(he-Nt*Le)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+he+","+(xe-Nt*ce)+"V"+(de+Nt*ce)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(he-Nt*Le)+","+de+"Z";else{ie=Math.abs(xe-de)+be;var Xe=ie0?Math.sqrt(be*(2*Nt-be)):0,or=ce>0?Math.max:Math.min;jt="M"+(le+Xe*Le)+","+de+"V"+or(xe-(Nt-be)*ce,de)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(le+Nt*Le-Ke)+","+xe+"H"+(he-Nt*Le+Ke)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(he-Xe*Le)+","+or(xe-(Nt-be)*ce,de)+"V"+de+"Z"}}else jt=me}else jt=me;var $e=E(i.ensureSingle(Kt,"path"),Q,J,X);if($e.style("vector-effect",ot?"none":"non-scaling-stroke").attr("d",isNaN((he-le)*(xe-de))||Se&&j._context.staticPlot?"M0,0Z":jt).call(h.setClipUrl,et.layerClipId,j),!Q.uniformtext.mode&&Lt){var ge=h.makePointStyleFns(nt);h.singlePointStyle(It,$e,nt,ge,j)}L(j,et,Kt,Z,re,le,he,de,xe,Nt,be,J,X),et.layerClipId&&h.hideOutsideRangePoint(It,Kt.select("text"),tt,V,nt.xcalendar,nt.ycalendar)});var Vt=nt.cliponaxis===!1;h.setClipUrl(st,Vt?null:et.layerClipId,j)});p.getComponentMethod("errorbars","plot")(j,$,et,J)}function L(j,et,it,ut,J,X,tt,V,Q,ot,$,Z,st){var nt=et.xaxis,ct=et.yaxis,gt=j._fullLayout,Tt;function wt(ie,me,be){var ve=i.ensureSingle(ie,"text").text(me).attr({class:"bartext bartext-"+Tt,"text-anchor":"middle","data-notex":1}).call(h.font,be).call(S.convertToTspans,j);return ve}var Rt=ut[0].trace,bt=Rt.orientation==="h",At=B(gt,ut,J,nt,ct);Tt=O(Rt,J);var mt=Z.mode==="stack"||Z.mode==="relative",Lt=ut[J],Ht=!mt||Lt._outmost,Ut=Lt.hasB,kt=ot&&ot-$>o;if(!At||Tt==="none"||(Lt.isBlank||X===tt||V===Q)&&(Tt==="auto"||Tt==="inside")){it.select("text").remove();return}var Vt=gt.font,It=f.getBarColor(ut[J],Rt),re=f.getInsideTextFont(Rt,J,Vt,It),Kt=f.getOutsideTextFont(Rt,J,Vt),$t=Rt.insidetextanchor||"end",le=it.datum();bt?nt.type==="log"&&le.s0<=0&&(nt.range[0]0&&Jt>0,xt;kt?Ut?xt=M(xe-2*ot,Se,Xt,Jt,bt)||M(xe,Se-2*ot,Xt,Jt,bt):bt?xt=M(xe-(ot-$),Se,Xt,Jt,bt)||M(xe,Se-2*(ot-$),Xt,Jt,bt):xt=M(xe,Se-(ot-$),Xt,Jt,bt)||M(xe-2*(ot-$),Se,Xt,Jt,bt):xt=M(xe,Se,Xt,Jt,bt),Ft&&xt?Tt="inside":(Tt="outside",ne.remove(),ne=null)}else Tt="inside";if(!ne){Wt=i.ensureUniformFontSize(j,Tt==="outside"?Kt:re),ne=wt(it,At,Wt);var yt=ne.attr("transform");if(ne.attr("transform",""),zt=h.bBox(ne.node()),Xt=zt.width,Jt=zt.height,ne.attr("transform",yt),Xt<=0||Jt<=0){ne.remove();return}}var Et=Rt.textangle,Mt,Nt;Tt==="outside"?(Nt=Rt.constraintext==="both"||Rt.constraintext==="outside",Mt=k(X,tt,V,Q,zt,{isHorizontal:bt,constrained:Nt,angle:Et})):(Nt=Rt.constraintext==="both"||Rt.constraintext==="inside",Mt=N(X,tt,V,Q,zt,{isHorizontal:bt,constrained:Nt,angle:Et,anchor:$t,hasB:Ut,r:ot,overhead:$})),Mt.fontSize=Wt.size,a(Rt.type==="histogram"?"bar":Rt.type,Mt,gt),Lt.transform=Mt;var jt=E(ne,gt,Z,st);i.setTransormAndDisplay(jt,Mt)}function M(j,et,it,ut,J){if(j<0||et<0)return!1;var X=it<=j&&ut<=et,tt=it<=et&&ut<=j,V=J?j>=it*(et/ut):et>=ut*(j/it);return X||tt||V}function z(j){return j==="auto"?0:j}function D(j,et){var it=Math.PI/180*et,ut=Math.abs(Math.sin(it)),J=Math.abs(Math.cos(it));return{x:j.width*J+j.height*ut,y:j.width*ut+j.height*J}}function N(j,et,it,ut,J,X){var tt=!!X.isHorizontal,V=!!X.constrained,Q=X.angle||0,ot=X.anchor,$=ot==="end",Z=ot==="start",st=X.leftToRight||0,nt=(st+1)/2,ct=1-nt,gt=X.hasB,Tt=X.r,wt=X.overhead,Rt=J.width,bt=J.height,At=Math.abs(et-j),mt=Math.abs(ut-it),Lt=At>2*o&&mt>2*o?o:0;At-=2*Lt,mt-=2*Lt;var Ht=z(Q);Q==="auto"&&!(Rt<=At&&bt<=mt)&&(Rt>At||bt>mt)&&(!(Rt>mt||bt>At)||Rto){var It=I(j,et,it,ut,Ut,Tt,wt,tt,gt);kt=It.scale,Vt=It.pad}else kt=1,V&&(kt=Math.min(1,At/Ut.x,mt/Ut.y)),Vt=0;var re=J.left*ct+J.right*nt,Kt=(J.top+J.bottom)/2,$t=(j+o)*ct+(et-o)*nt,le=(it+ut)/2,he=0,de=0;if(Z||$){var xe=(tt?Ut.x:Ut.y)/2;Tt&&($||gt)&&(Lt+=Vt);var Se=tt?_(j,et):_(it,ut);tt?Z?($t=j+Se*Lt,he=-Se*xe):($t=et-Se*Lt,he=Se*xe):Z?(le=it+Se*Lt,de=-Se*xe):(le=ut-Se*Lt,de=Se*xe)}return{textX:re,textY:Kt,targetX:$t,targetY:le,anchorX:he,anchorY:de,scale:kt,rotate:Ht}}function I(j,et,it,ut,J,X,tt,V,Q){var ot=Math.max(0,Math.abs(et-j)-2*o),$=Math.max(0,Math.abs(ut-it)-2*o),Z=X-o,st=tt?Z-Math.sqrt(Z*Z-(Z-tt)*(Z-tt)):Z,nt=Q?Z*2:V?Z-tt:2*st,ct=Q?Z*2:V?2*st:Z-tt,gt,Tt,wt,Rt,bt;return J.y/J.x>=$/(ot-nt)?Rt=$/J.y:J.y/J.x<=($-ct)/ot?Rt=ot/J.x:!Q&&V?(gt=J.x*J.x+J.y*J.y/4,Tt=-2*J.x*(ot-Z)-J.y*($/2-Z),wt=(ot-Z)*(ot-Z)+($/2-Z)*($/2-Z)-Z*Z,Rt=(-Tt+Math.sqrt(Tt*Tt-4*gt*wt))/(2*gt)):Q?(gt=(J.x*J.x+J.y*J.y)/4,Tt=-J.x*(ot/2-Z)-J.y*($/2-Z),wt=(ot/2-Z)*(ot/2-Z)+($/2-Z)*($/2-Z)-Z*Z,Rt=(-Tt+Math.sqrt(Tt*Tt-4*gt*wt))/(2*gt)):(gt=J.x*J.x/4+J.y*J.y,Tt=-J.x*(ot/2-Z)-2*J.y*($-Z),wt=(ot/2-Z)*(ot/2-Z)+($-Z)*($-Z)-Z*Z,Rt=(-Tt+Math.sqrt(Tt*Tt-4*gt*wt))/(2*gt)),Rt=Math.min(1,Rt),V?bt=Math.max(0,Z-Math.sqrt(Math.max(0,Z*Z-(Z-($-J.y*Rt)/2)*(Z-($-J.y*Rt)/2)))-tt):bt=Math.max(0,Z-Math.sqrt(Math.max(0,Z*Z-(Z-(ot-J.x*Rt)/2)*(Z-(ot-J.x*Rt)/2)))-tt),{scale:Rt,pad:bt}}function k(j,et,it,ut,J,X){var tt=!!X.isHorizontal,V=!!X.constrained,Q=X.angle||0,ot=J.width,$=J.height,Z=Math.abs(et-j),st=Math.abs(ut-it),nt;tt?nt=st>2*o?o:0:nt=Z>2*o?o:0;var ct=1;V&&(ct=tt?Math.min(1,st/$):Math.min(1,Z/ot));var gt=z(Q),Tt=D(J,gt),wt=(tt?Tt.x:Tt.y)/2,Rt=(J.left+J.right)/2,bt=(J.top+J.bottom)/2,At=(j+et)/2,mt=(it+ut)/2,Lt=0,Ht=0,Ut=tt?_(et,j):_(it,ut);return tt?(At=et-Ut*nt,Lt=Ut*wt):(mt=ut+Ut*nt,Ht=-Ut*wt),{textX:Rt,textY:bt,targetX:At,targetY:mt,anchorX:Lt,anchorY:Ht,scale:ct,rotate:gt}}function B(j,et,it,ut,J){var X=et[0].trace,tt=X.texttemplate,V;return tt?V=H(j,et,it,ut,J):X.textinfo?V=Y(et,it,ut,J):V=c.getValue(X.text,it),c.coerceString(v,V)}function O(j,et){var it=c.getValue(j.textposition,et);return c.coerceEnumerated(b,it)}function H(j,et,it,ut,J){var X=et[0].trace,tt=i.castOption(X,it,"texttemplate");if(!tt)return"";var V=X.type==="histogram",Q=X.type==="waterfall",ot=X.type==="funnel",$=X.orientation==="h",Z,st,nt,ct;$?(Z="y",st=J,nt="x",ct=ut):(Z="x",st=ut,nt="y",ct=J);function gt(Lt){return r(st,st.c2l(Lt),!0).text}function Tt(Lt){return r(ct,ct.c2l(Lt),!0).text}var wt=et[it],Rt={};Rt.label=wt.p,Rt.labelLabel=Rt[Z+"Label"]=gt(wt.p);var bt=i.castOption(X,wt.i,"text");(bt===0||bt)&&(Rt.text=bt),Rt.value=wt.s,Rt.valueLabel=Rt[nt+"Label"]=Tt(wt.s);var At={};u(At,X,wt.i),(V||At.x===void 0)&&(At.x=$?Rt.value:Rt.label),(V||At.y===void 0)&&(At.y=$?Rt.label:Rt.value),(V||At.xLabel===void 0)&&(At.xLabel=$?Rt.valueLabel:Rt.labelLabel),(V||At.yLabel===void 0)&&(At.yLabel=$?Rt.labelLabel:Rt.valueLabel),Q&&(Rt.delta=+wt.rawS||wt.s,Rt.deltaLabel=Tt(Rt.delta),Rt.final=wt.v,Rt.finalLabel=Tt(Rt.final),Rt.initial=Rt.final-Rt.delta,Rt.initialLabel=Tt(Rt.initial)),ot&&(Rt.value=wt.s,Rt.valueLabel=Tt(Rt.value),Rt.percentInitial=wt.begR,Rt.percentInitialLabel=i.formatPercent(wt.begR),Rt.percentPrevious=wt.difR,Rt.percentPreviousLabel=i.formatPercent(wt.difR),Rt.percentTotal=wt.sumR,Rt.percenTotalLabel=i.formatPercent(wt.sumR));var mt=i.castOption(X,wt.i,"customdata");return mt&&(Rt.customdata=mt),i.texttemplateString(tt,Rt,j._d3locale,At,Rt,X._meta||{})}function Y(j,et,it,ut){var J=j[0].trace,X=J.orientation==="h",tt=J.type==="waterfall",V=J.type==="funnel";function Q(mt){var Lt=X?ut:it;return r(Lt,mt,!0).text}function ot(mt){var Lt=X?it:ut;return r(Lt,+mt,!0).text}var $=J.textinfo,Z=j[et],st=$.split("+"),nt=[],ct,gt=function(mt){return st.indexOf(mt)!==-1};if(gt("label")&&nt.push(Q(j[et].p)),gt("text")&&(ct=i.castOption(J,Z.i,"text"),(ct===0||ct)&&nt.push(ct)),tt){var Tt=+Z.rawS||Z.s,wt=Z.v,Rt=wt-Tt;gt("initial")&&nt.push(ot(Rt)),gt("delta")&&nt.push(ot(Tt)),gt("final")&&nt.push(ot(wt))}if(V){gt("value")&&nt.push(ot(Z.s));var bt=0;gt("percent initial")&&bt++,gt("percent previous")&&bt++,gt("percent total")&&bt++;var At=bt>1;gt("percent initial")&&(ct=i.formatPercent(Z.begR),At&&(ct+=" of initial"),nt.push(ct)),gt("percent previous")&&(ct=i.formatPercent(Z.difR),At&&(ct+=" of previous"),nt.push(ct)),gt("percent total")&&(ct=i.formatPercent(Z.sumR),At&&(ct+=" of total"),nt.push(ct))}return nt.join("
    ")}G.exports={plot:s,toMoveInsideBar:N}},45784:function(G){G.exports=function(g,C){var i=g.cd,S=g.xaxis,x=g.yaxis,h=i[0].trace,p=h.type==="funnel",r=h.orientation==="h",e=[],a;if(C===!1)for(a=0;a1||s.bargap===0&&s.bargroupgap===0&&!L[0].trace.marker.line.width)&&g.select(this).attr("shape-rendering","crispEdges")}),E.selectAll("g.points").each(function(L){var M=g.select(this),z=L[0].trace;c(M,z,y)}),x.getComponentMethod("errorbars","style")(E)}function c(y,E,T){i.pointStyle(y.selectAll("path"),E,T),l(y,E,T)}function l(y,E,T){y.selectAll("text").each(function(s){var L=g.select(this),M=S.ensureUniformFontSize(T,u(L,s,E,T));i.font(L,M)})}function m(y,E,T){var s=E[0].trace;s.selectedpoints?v(T,s,y):(c(T,s,y),x.getComponentMethod("errorbars","style")(T))}function v(y,E,T){i.selectedPointStyle(y.selectAll("path"),E),b(y.selectAll("text"),E,T)}function b(y,E,T){y.each(function(s){var L=g.select(this),M;if(s.selected){M=S.ensureUniformFontSize(T,u(L,s,E,T));var z=E.selected.textfont&&E.selected.textfont.color;z&&(M.color=z),i.font(L,M)}else i.selectedTextStyle(L,E)})}function u(y,E,T,s){var L=s._fullLayout.font,M=T.textfont;if(y.classed("bartext-inside")){var z=_(E,T);M=d(T,E.i,L,z)}else y.classed("bartext-outside")&&(M=w(T,E.i,L));return M}function o(y,E,T){return A(r,y.textfont,E,T)}function d(y,E,T,s){var L=o(y,E,T),M=y._input.textfont===void 0||y._input.textfont.color===void 0||Array.isArray(y.textfont.color)&&y.textfont.color[E]===void 0;return M&&(L={color:C.contrast(s),family:L.family,size:L.size}),A(e,y.insidetextfont,E,L)}function w(y,E,T){var s=o(y,E,T);return A(a,y.outsidetextfont,E,s)}function A(y,E,T,s){E=E||{};var L=n.getValue(E.family,T),M=n.getValue(E.size,T),z=n.getValue(E.color,T);return{family:n.coerceString(y.family,L,s.family),size:n.coerceNumber(y.size,M,s.size),color:n.coerceColor(y.color,z,s.color)}}function _(y,E){return E.type==="waterfall"?E[y.dir].marker.color:y.mcc||y.mc||E.marker.color}G.exports={style:f,styleTextPoints:l,styleOnSelect:m,getInsideTextFont:d,getOutsideTextFont:w,getBarColor:_,resizeText:h}},55592:function(G,U,t){var g=t(76308),C=t(94288).hasColorscale,i=t(27260),S=t(3400).coercePattern;G.exports=function(h,p,r,e,a){var n=r("marker.color",e),f=C(h,"marker");f&&i(h,p,a,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",g.defaultLine),C(h,"marker.line")&&i(h,p,a,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),S(r,"marker.pattern",n,f),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(G,U,t){var g=t(33428),C=t(3400);function i(p,r,e){var a=p._fullLayout,n=a["_"+e+"Text_minsize"];if(n){var f=a.uniformtext.mode==="hide",c;switch(e){case"funnelarea":case"pie":case"sunburst":c="g.slice";break;case"treemap":case"icicle":c="g.slice, g.pathbar";break;default:c="g.points > g.point"}r.selectAll(c).each(function(l){var m=l.transform;if(m){m.scale=f&&m.hide?0:n/m.fontSize;var v=g.select(this).select("text");C.setTransormAndDisplay(v,m)}})}}function S(p,r,e){if(e.uniformtext.mode){var a=h(p),n=e.uniformtext.minsize,f=r.scale*r.fontSize;r.hide=fl.range[1]&&(w+=Math.PI);var A=function(T){return b(d,w,[T.rp0,T.rp1],[T.thetag0,T.thetag1],v)?u+Math.min(1,Math.abs(T.thetag1-T.thetag0)/o)-1+(T.rp1-d)/(T.rp1-T.rp0)-1:1/0};if(g.getClosest(n,A,r),r.index!==!1){var _=r.index,y=n[_];r.x0=r.x1=y.ct[0],r.y0=r.y1=y.ct[1];var E=C.extendFlat({},y,{r:y.s,theta:y.p});return S(y,f,r),x(E,f,c,r),r.hovertemplate=f.hovertemplate,r.color=i(f,y),r.xLabelVal=r.yLabelVal=void 0,y.s<0&&(r.idealAlign="left"),[r]}}},94456:function(G,U,t){G.exports={moduleType:"trace",name:"barpolar",basePlotModule:t(40872),categories:["polar","bar","showLegend"],attributes:t(78100),layoutAttributes:t(9320),supplyDefaults:t(70384),supplyLayoutDefaults:t(89580),calc:t(47056).calc,crossTraceCalc:t(47056).crossTraceCalc,plot:t(42040),colorbar:t(5528),formatLabels:t(22852),style:t(60100).style,styleOnSelect:t(60100).styleOnSelect,hoverPoints:t(68896),selectPoints:t(45784),meta:{}}},9320:function(G){G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(G,U,t){var g=t(3400),C=t(9320);G.exports=function(i,S,x){var h={},p;function r(n,f){return g.coerce(i[p]||{},S[p],C,n,f)}for(var e=0;e0?(l=f,m=c):(l=c,m=f);var v=x.findEnclosingVertexAngles(l,p.vangles)[0],b=x.findEnclosingVertexAngles(m,p.vangles)[1],u=[v,(l+m)/2,b];return x.pathPolygonAnnulus(a,n,l,m,u,r,e)}:function(a,n,f,c){return i.pathAnnulus(a,n,f,c,r,e)}}},63188:function(G,U,t){var g=t(98304),C=t(52904),i=t(20832),S=t(22548),x=t(29736).axisHoverFormat,h=t(21776).Ks,p=t(92880).extendFlat,r=C.marker,e=r.line;G.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:C.xperiod,yperiod:C.yperiod,xperiod0:C.xperiod0,yperiod0:C.yperiod0,xperiodalignment:C.xperiodalignment,yperiodalignment:C.yperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:p({},r.symbol,{arrayOk:!1,editType:"plot"}),opacity:p({},r.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:p({},r.angle,{arrayOk:!1,editType:"calc"}),size:p({},r.size,{arrayOk:!1,editType:"calc"}),color:p({},r.color,{arrayOk:!1,editType:"style"}),line:{color:p({},e.color,{arrayOk:!1,dflt:S.defaultLine,editType:"style"}),width:p({},e.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:g(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:C.selected.marker,editType:"style"},unselected:{marker:C.unselected.marker,editType:"style"},text:p({},C.text,{}),hovertext:p({},C.hovertext,{}),hovertemplate:h({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},62555:function(G,U,t){var g=t(38248),C=t(54460),i=t(1220),S=t(3400),x=t(39032).BADNUM,h=S._;G.exports=function(w,A){var _=w._fullLayout,y=C.getFromId(w,A.xaxis||"x"),E=C.getFromId(w,A.yaxis||"y"),T=[],s=A.type==="violin"?"_numViolins":"_numBoxes",L,M,z,D,N,I,k;A.orientation==="h"?(z=y,D="x",N=E,I="y",k=!!A.yperiodalignment):(z=E,D="y",N=y,I="x",k=!!A.xperiodalignment);var B=p(A,I,N,_[s]),O=B[0],H=B[1],Y=S.distinctVals(O,N),j=Y.vals,et=Y.minDiff/2,it,ut,J,X,tt,V,Q=(A.boxpoints||A.points)==="all"?S.identity:function(Se){return Se.vit.uf};if(A._hasPreCompStats){var ot=A[D],$=function(Se){return z.d2c((A[Se]||[])[L])},Z=1/0,st=-1/0;for(L=0;L=it.q1&&it.q3>=it.med){var ct=$("lowerfence");it.lf=ct!==x&&ct<=it.q1?ct:m(it,J,X);var gt=$("upperfence");it.uf=gt!==x&>>=it.q3?gt:v(it,J,X);var Tt=$("mean");it.mean=Tt!==x?Tt:X?S.mean(J,X):(it.q1+it.q3)/2;var wt=$("sd");it.sd=Tt!==x&&wt>=0?wt:X?S.stdev(J,X,it.mean):it.q3-it.q1,it.lo=b(it),it.uo=u(it);var Rt=$("notchspan");Rt=Rt!==x&&Rt>0?Rt:o(it,X),it.ln=it.med-Rt,it.un=it.med+Rt;var bt=it.lf,At=it.uf;A.boxpoints&&J.length&&(bt=Math.min(bt,J[0]),At=Math.max(At,J[X-1])),A.notched&&(bt=Math.min(bt,it.ln),At=Math.max(At,it.un)),it.min=bt,it.max=At}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+it.q1,"median = "+it.med,"q3 = "+it.q3].join(` +`));var mt;it.med!==x?mt=it.med:it.q1!==x?it.q3!==x?mt=(it.q1+it.q3)/2:mt=it.q1:it.q3!==x?mt=it.q3:mt=0,it.med=mt,it.q1=it.q3=mt,it.lf=it.uf=mt,it.mean=it.sd=mt,it.ln=it.un=mt,it.min=it.max=mt}Z=Math.min(Z,it.min),st=Math.max(st,it.max),it.pts2=ut.filter(Q),T.push(it)}}A._extremes[z._id]=C.findExtremes(z,[Z,st],{padded:!0})}else{var Lt=z.makeCalcdata(A,D),Ht=r(j,et),Ut=j.length,kt=e(Ut);for(L=0;L=0&&Vt0){if(it={},it.pos=it[I]=j[L],ut=it.pts=kt[L].sort(c),J=it[D]=ut.map(l),X=J.length,it.min=J[0],it.max=J[X-1],it.mean=S.mean(J,X),it.sd=S.stdev(J,X,it.mean)*A.sdmultiple,it.med=S.interp(J,.5),X%2&&($t||le)){var he,de;$t?(he=J.slice(0,X/2),de=J.slice(X/2+1)):le&&(he=J.slice(0,X/2+1),de=J.slice(X/2)),it.q1=S.interp(he,.5),it.q3=S.interp(de,.5)}else it.q1=S.interp(J,.25),it.q3=S.interp(J,.75);it.lf=m(it,J,X),it.uf=v(it,J,X),it.lo=b(it),it.uo=u(it);var xe=o(it,X);it.ln=it.med-xe,it.un=it.med+xe,It=Math.min(It,it.ln),re=Math.max(re,it.un),it.pts2=ut.filter(Q),T.push(it)}A.notched&&S.isTypedArray(Lt)&&(Lt=Array.from(Lt)),A._extremes[z._id]=C.findExtremes(z,A.notched?Lt.concat([It,re]):Lt,{padded:!0})}return f(T,A),T.length>0?(T[0].t={num:_[s],dPos:et,posLetter:I,valLetter:D,labels:{med:h(w,"median:"),min:h(w,"min:"),q1:h(w,"q1:"),q3:h(w,"q3:"),max:h(w,"max:"),mean:A.boxmean==="sd"||A.sizemode==="sd"?h(w,"mean ± σ:").replace("σ",A.sdmultiple===1?"σ":A.sdmultiple+"σ"):h(w,"mean:"),lf:h(w,"lower fence:"),uf:h(w,"upper fence:")}},_[s]++,T):[{t:{empty:!0}}]};function p(d,w,A,_){var y=w in d,E=w+"0"in d,T="d"+w in d;if(y||E&&T){var s=A.makeCalcdata(d,w),L=i(d,A,w,s).vals;return[L,s]}var M;E?M=d[w+"0"]:"name"in d&&(A.type==="category"||g(d.name)&&["linear","log"].indexOf(A.type)!==-1||S.isDateTime(d.name)&&A.type==="date")?M=d.name:M=_;for(var z=A.type==="multicategory"?A.r2c_just_indices(M):A.d2c(M,0,d[w+"calendar"]),D=d._length,N=new Array(D),I=0;I1,E=1-f[p+"gap"],T=1-f[p+"groupgap"];for(m=0;m0;if(z==="positive"?(it=D*(M?1:.5),X=J,ut=X=I):z==="negative"?(it=X=I,ut=D*(M?1:.5),tt=J):(it=ut=D,X=tt=J),st){var nt=s.pointpos,ct=s.jitter,gt=s.marker.size/2,Tt=0;nt+ct>=0&&(Tt=J*(nt+ct),Tt>it?(Z=!0,ot=gt,V=Tt):Tt>X&&(ot=gt,V=it)),Tt<=it&&(V=it);var wt=0;nt-ct<=0&&(wt=-J*(nt-ct),wt>ut?(Z=!0,$=gt,Q=wt):wt>tt&&($=gt,Q=ut)),wt<=ut&&(Q=ut)}else V=it,Q=ut;var Rt=new Array(b.length);for(v=0;v0?(z="v",E>0?D=Math.min(s,T):D=Math.min(T)):E>0?(z="h",D=Math.min(s)):D=0;if(!D){c.visible=!1;return}c._length=D;var O=l("orientation",z);c._hasPreCompStats?O==="v"&&E===0?(l("x0",0),l("dx",1)):O==="h"&&y===0&&(l("y0",0),l("dy",1)):O==="v"&&E===0?l("x0"):O==="h"&&y===0&&l("y0");var H=C.getComponentMethod("calendars","handleTraceDefaults");H(f,c,["x","y"],m)}function a(f,c,l,m){var v=m.prefix,b=g.coerce2(f,c,p,"marker.outliercolor"),u=l("marker.line.outliercolor"),o="outliers";c._hasPreCompStats?o="all":(b||u)&&(o="suspectedoutliers");var d=l(v+"points",o);d?(l("jitter",d==="all"?.3:0),l("pointpos",d==="all"?-1.5:0),l("marker.symbol"),l("marker.opacity"),l("marker.size"),l("marker.angle"),l("marker.color",c.line.color),l("marker.line.color"),l("marker.line.width"),d==="suspectedoutliers"&&(l("marker.line.outliercolor",c.marker.color),l("marker.line.outlierwidth")),l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size"),l("text"),l("hovertext")):delete c.marker;var w=l("hoveron");(w==="all"||w.indexOf("points")!==-1)&&l("hovertemplate"),g.coerceSelectionMarkerOpacity(c,l)}function n(f,c){var l,m;function v(o){return g.coerce(m._input,m,p,o)}for(var b=0;bA.lo&&(O.so=!0)}return y});w.enter().append("path").classed("point",!0),w.exit().remove(),w.call(i.translatePoints,l,m)}function e(a,n,f,c){var l=n.val,m=n.pos,v=!!m.rangebreaks,b=c.bPos,u=c.bPosPxOffset||0,o=f.boxmean||(f.meanline||{}).visible,d,w;Array.isArray(c.bdPos)?(d=c.bdPos[0],w=c.bdPos[1]):(d=c.bdPos,w=c.bdPos);var A=a.selectAll("path.mean").data(f.type==="box"&&f.boxmean||f.type==="violin"&&f.box.visible&&f.meanline.visible?C.identity:[]);A.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),A.exit().remove(),A.each(function(_){var y=m.c2l(_.pos+b,!0),E=m.l2p(y-d)+u,T=m.l2p(y+w)+u,s=v?(E+T)/2:m.l2p(y)+u,L=l.c2p(_.mean,!0),M=l.c2p(_.mean-_.sd,!0),z=l.c2p(_.mean+_.sd,!0);f.orientation==="h"?g.select(this).attr("d","M"+L+","+E+"V"+T+(o==="sd"?"m0,0L"+M+","+s+"L"+L+","+E+"L"+z+","+s+"Z":"")):g.select(this).attr("d","M"+E+","+L+"H"+T+(o==="sd"?"m0,0L"+s+","+M+"L"+E+","+L+"L"+s+","+z+"Z":""))})}G.exports={plot:h,plotBoxAndWhiskers:p,plotPoints:r,plotBoxMean:e}},8264:function(G){G.exports=function(t,g){var C=t.cd,i=t.xaxis,S=t.yaxis,x=[],h,p;if(g===!1)for(h=0;h=10)return null;for(var x=1/0,h=-1/0,p=i.length,r=0;r0?Math.floor:Math.ceil,k=D>0?Math.ceil:Math.floor,B=D>0?Math.min:Math.max,O=D>0?Math.max:Math.min,H=I(M+N),Y=k(z-N);f=L(M);var j=[[f]];for(h=H;h*D=0;S--)x[a-S]=t[n][S],h[a-S]=g[n][S];for(p.push({x,y:h,bicubic:r}),S=n,x=[],h=[];S>=0;S--)x[n-S]=t[S][0],h[n-S]=g[S][0];return p.push({x,y:h,bicubic:e}),p}},19216:function(G,U,t){var g=t(54460),C=t(92880).extendFlat;G.exports=function(S,x,h){var p,r,e,a,n,f,c,l,m,v,b,u,o,d,w=S["_"+x],A=S[x+"axis"],_=A._gridlines=[],y=A._minorgridlines=[],E=A._boundarylines=[],T=S["_"+h],s=S[h+"axis"];A.tickmode==="array"&&(A.tickvals=w.slice());var L=S._xctrl,M=S._yctrl,z=L[0].length,D=L.length,N=S._a.length,I=S._b.length;g.prepTicks(A),A.tickmode==="array"&&delete A.tickvals;var k=A.smoothing?3:1;function B(H){var Y,j,et,it,ut,J,X,tt,V,Q,ot,$,Z=[],st=[],nt={};if(x==="b")for(j=S.b2j(H),et=Math.floor(Math.max(0,Math.min(I-2,j))),it=j-et,nt.length=I,nt.crossLength=N,nt.xy=function(ct){return S.evalxy([],ct,j)},nt.dxy=function(ct,gt){return S.dxydi([],ct,et,gt,it)},Y=0;Y0&&(V=S.dxydi([],Y-1,et,0,it),Z.push(ut[0]+V[0]/3),st.push(ut[1]+V[1]/3),Q=S.dxydi([],Y-1,et,1,it),Z.push(tt[0]-Q[0]/3),st.push(tt[1]-Q[1]/3)),Z.push(tt[0]),st.push(tt[1]),ut=tt;else for(Y=S.a2i(H),J=Math.floor(Math.max(0,Math.min(N-2,Y))),X=Y-J,nt.length=N,nt.crossLength=I,nt.xy=function(ct){return S.evalxy([],Y,ct)},nt.dxy=function(ct,gt){return S.dxydj([],J,ct,X,gt)},j=0;j0&&(ot=S.dxydj([],J,j-1,X,0),Z.push(ut[0]+ot[0]/3),st.push(ut[1]+ot[1]/3),$=S.dxydj([],J,j-1,X,1),Z.push(tt[0]-$[0]/3),st.push(tt[1]-$[1]/3)),Z.push(tt[0]),st.push(tt[1]),ut=tt;return nt.axisLetter=x,nt.axis=A,nt.crossAxis=s,nt.value=H,nt.constvar=h,nt.index=l,nt.x=Z,nt.y=st,nt.smoothing=s.smoothing,nt}function O(H){var Y,j,et,it,ut,J=[],X=[],tt={};if(tt.length=w.length,tt.crossLength=T.length,x==="b")for(et=Math.max(0,Math.min(I-2,H)),ut=Math.min(1,Math.max(0,H-et)),tt.xy=function(V){return S.evalxy([],V,H)},tt.dxy=function(V,Q){return S.dxydi([],V,et,Q,ut)},Y=0;Yw.length-1)&&_.push(C(O(r),{color:A.gridcolor,width:A.gridwidth,dash:A.griddash}));for(l=f;lw.length-1)&&!(b<0||b>w.length-1))for(u=w[e],o=w[b],p=0;pw[w.length-1])&&y.push(C(B(v),{color:A.minorgridcolor,width:A.minorgridwidth,dash:A.minorgriddash})));A.startline&&E.push(C(O(0),{color:A.startlinecolor,width:A.startlinewidth})),A.endline&&E.push(C(O(w.length-1),{color:A.endlinecolor,width:A.endlinewidth}))}else{for(a=5e-15,n=[Math.floor((w[w.length-1]-A.tick0)/A.dtick*(1+a)),Math.ceil((w[0]-A.tick0)/A.dtick/(1+a))].sort(function(H,Y){return H-Y}),f=n[0],c=n[1],l=f;l<=c;l++)m=A.tick0+A.dtick*l,_.push(C(B(m),{color:A.gridcolor,width:A.gridwidth,dash:A.griddash}));for(l=f-1;lw[w.length-1])&&y.push(C(B(v),{color:A.minorgridcolor,width:A.minorgridwidth,dash:A.minorgriddash}));A.startline&&E.push(C(B(w[0]),{color:A.startlinecolor,width:A.startlinewidth})),A.endline&&E.push(C(B(w[w.length-1]),{color:A.endlinecolor,width:A.endlinewidth}))}}},14724:function(G,U,t){var g=t(54460),C=t(92880).extendFlat;G.exports=function(S,x){var h,p,r,e,a,n=x._labels=[],f=x._gridlines;for(h=0;hS.length&&(i=i.slice(0,S.length)):i=[],h=0;h90&&(c-=180,r=-r),{angle:c,flip:r,p:t.c2p(i,g,C),offsetMultplier:e}}},164:function(G,U,t){var g=t(33428),C=t(43616),i=t(87072),S=t(53416),x=t(15584),h=t(72736),p=t(3400),r=p.strRotate,e=p.strTranslate,a=t(84284);G.exports=function(o,d,w,A){var _=o._context.staticPlot,y=d.xaxis,E=d.yaxis,T=o._fullLayout,s=T._clips;p.makeTraceGroups(A,w,"trace").each(function(L){var M=g.select(this),z=L[0],D=z.trace,N=D.aaxis,I=D.baxis,k=p.ensureSingle(M,"g","minorlayer"),B=p.ensureSingle(M,"g","majorlayer"),O=p.ensureSingle(M,"g","boundarylayer"),H=p.ensureSingle(M,"g","labellayer");M.style("opacity",D.opacity),f(y,E,B,N,"a",N._gridlines,!0),f(y,E,B,I,"b",I._gridlines,!0),f(y,E,k,N,"a",N._minorgridlines,!0),f(y,E,k,I,"b",I._minorgridlines,!0),f(y,E,O,N,"a-boundary",N._boundarylines,_),f(y,E,O,I,"b-boundary",I._boundarylines,_);var Y=c(o,y,E,D,z,H,N._labels,"a-label"),j=c(o,y,E,D,z,H,I._labels,"b-label");l(o,H,D,z,y,E,Y,j),n(D,z,s,y,E)})};function n(u,o,d,w,A){var _,y,E,T,s=d.select("#"+u._clipPathId);s.size()||(s=d.append("clipPath").classed("carpetclip",!0));var L=p.ensureSingle(s,"path","carpetboundary"),M=o.clipsegments,z=[];for(T=0;T0?"start":"end","data-notex":1}).call(C.font,M.font).text(M.text).call(h.convertToTspans,u),B=C.bBox(this);k.attr("transform",e(D.p[0],D.p[1])+r(D.angle)+e(M.axis.labelpadding*I,B.height*.3)),s=Math.max(s,B.width+M.axis.labelpadding)}),T.exit().remove(),L.maxExtent=s,L}function l(u,o,d,w,A,_,y,E){var T,s,L,M,z=p.aggNums(Math.min,null,d.a),D=p.aggNums(Math.max,null,d.a),N=p.aggNums(Math.min,null,d.b),I=p.aggNums(Math.max,null,d.b);T=.5*(z+D),s=N,L=d.ab2xy(T,s,!0),M=d.dxyda_rough(T,s),y.angle===void 0&&p.extendFlat(y,x(d,A,_,L,d.dxydb_rough(T,s))),b(u,o,d,w,L,M,d.aaxis,A,_,y,"a-title"),T=z,s=.5*(N+I),L=d.ab2xy(T,s,!0),M=d.dxydb_rough(T,s),E.angle===void 0&&p.extendFlat(E,x(d,A,_,L,d.dxyda_rough(T,s))),b(u,o,d,w,L,M,d.baxis,A,_,E,"b-title")}var m=a.LINE_SPACING,v=(1-a.MID_SHIFT)/m+1;function b(u,o,d,w,A,_,y,E,T,s,L){var M=[];y.title.text&&M.push(y.title.text);var z=o.selectAll("text."+L).data(M),D=s.maxExtent;z.enter().append("text").classed(L,!0),z.each(function(){var N=x(d,E,T,A,_);["start","both"].indexOf(y.showticklabels)===-1&&(D=0);var I=y.title.font.size;D+=I+y.title.offset;var k=s.angle+(s.flip<0?180:0),B=(k-N.angle+450)%360,O=B>90&&B<270,H=g.select(this);H.text(y.title.text).call(h.convertToTspans,u),O&&(D=(-h.lineCount(H)+v)*m*I-D),H.attr("transform",e(N.p[0],N.p[1])+r(N.angle)+e(0,D)).attr("text-anchor","middle").call(C.font,y.title.font)}),z.exit().remove()}},81e3:function(G,U,t){var g=t(24588),C=t(14952).findBin,i=t(30180),S=t(29056),x=t(26435),h=t(24464);G.exports=function(r){var e=r._a,a=r._b,n=e.length,f=a.length,c=r.aaxis,l=r.baxis,m=e[0],v=e[n-1],b=a[0],u=a[f-1],o=e[e.length-1]-e[0],d=a[a.length-1]-a[0],w=o*g.RELATIVE_CULL_TOLERANCE,A=d*g.RELATIVE_CULL_TOLERANCE;m-=w,v+=w,b-=A,u+=A,r.isVisible=function(_,y){return _>m&&_b&&yv||yu},r.setScale=function(){var _=r._x,y=r._y,E=i(r._xctrl,r._yctrl,_,y,c.smoothing,l.smoothing);r._xctrl=E[0],r._yctrl=E[1],r.evalxy=S([r._xctrl,r._yctrl],n,f,c.smoothing,l.smoothing),r.dxydi=x([r._xctrl,r._yctrl],c.smoothing,l.smoothing),r.dxydj=h([r._xctrl,r._yctrl],c.smoothing,l.smoothing)},r.i2a=function(_){var y=Math.max(0,Math.floor(_[0]),n-2),E=_[0]-y;return(1-E)*e[y]+E*e[y+1]},r.j2b=function(_){var y=Math.max(0,Math.floor(_[1]),n-2),E=_[1]-y;return(1-E)*a[y]+E*a[y+1]},r.ij2ab=function(_){return[r.i2a(_[0]),r.j2b(_[1])]},r.a2i=function(_){var y=Math.max(0,Math.min(C(_,e),n-2)),E=e[y],T=e[y+1];return Math.max(0,Math.min(n-1,y+(_-E)/(T-E)))},r.b2j=function(_){var y=Math.max(0,Math.min(C(_,a),f-2)),E=a[y],T=a[y+1];return Math.max(0,Math.min(f-1,y+(_-E)/(T-E)))},r.ab2ij=function(_){return[r.a2i(_[0]),r.b2j(_[1])]},r.i2c=function(_,y){return r.evalxy([],_,y)},r.ab2xy=function(_,y,E){if(!E&&(_e[n-1]|ya[f-1]))return[!1,!1];var T=r.a2i(_),s=r.b2j(y),L=r.evalxy([],T,s);if(E){var M=0,z=0,D=[],N,I,k,B;_e[n-1]?(N=n-2,I=1,M=(_-e[n-1])/(e[n-1]-e[n-2])):(N=Math.max(0,Math.min(n-2,Math.floor(T))),I=T-N),ya[f-1]?(k=f-2,B=1,z=(y-a[f-1])/(a[f-1]-a[f-2])):(k=Math.max(0,Math.min(f-2,Math.floor(s))),B=s-k),M&&(r.dxydi(D,N,k,I,B),L[0]+=D[0]*M,L[1]+=D[1]*M),z&&(r.dxydj(D,N,k,I,B),L[0]+=D[0]*z,L[1]+=D[1]*z)}return L},r.c2p=function(_,y,E){return[y.c2p(_[0]),E.c2p(_[1])]},r.p2x=function(_,y,E){return[y.p2c(_[0]),E.p2c(_[1])]},r.dadi=function(_){var y=Math.max(0,Math.min(e.length-2,_));return e[y+1]-e[y]},r.dbdj=function(_){var y=Math.max(0,Math.min(a.length-2,_));return a[y+1]-a[y]},r.dxyda=function(_,y,E,T){var s=r.dxydi(null,_,y,E,T),L=r.dadi(_,E);return[s[0]/L,s[1]/L]},r.dxydb=function(_,y,E,T){var s=r.dxydj(null,_,y,E,T),L=r.dbdj(y,T);return[s[0]/L,s[1]/L]},r.dxyda_rough=function(_,y,E){var T=o*(E||.1),s=r.ab2xy(_+T,y,!0),L=r.ab2xy(_-T,y,!0);return[(s[0]-L[0])*.5/T,(s[1]-L[1])*.5/T]},r.dxydb_rough=function(_,y,E){var T=d*(E||.1),s=r.ab2xy(_,y+T,!0),L=r.ab2xy(_,y-T,!0);return[(s[0]-L[0])*.5/T,(s[1]-L[1])*.5/T]},r.dpdx=function(_){return _._m},r.dpdy=function(_){return _._m}}},51512:function(G,U,t){var g=t(3400);G.exports=function(i,S,x){var h,p,r,e=[],a=[],n=i[0].length,f=i.length;function c(j,et){var it=0,ut,J=0;return j>0&&(ut=i[et][j-1])!==void 0&&(J++,it+=ut),j0&&(ut=i[et-1][j])!==void 0&&(J++,it+=ut),et0&&p0&&hT);return g.log("Smoother converged to",s,"after",M,"iterations"),i}},86411:function(G,U,t){var g=t(3400).isArray1D;G.exports=function(i,S,x){var h=x("x"),p=h&&h.length,r=x("y"),e=r&&r.length;if(!p&&!e)return!1;if(S._cheater=!h,(!p||g(h))&&(!e||g(r))){var a=p?h.length:1/0;e&&(a=Math.min(a,r.length)),S.a&&S.a.length&&(a=Math.min(a,S.a.length)),S.b&&S.b.length&&(a=Math.min(a,S.b.length)),S._length=a}else S._length=null;return!0}},83372:function(G,U,t){var g=t(21776).Ks,C=t(6096),i=t(49084),S=t(45464),x=t(22548).defaultLine,h=t(92880).extendFlat,p=C.marker.line;G.exports=h({locations:{valType:"data_array",editType:"calc"},locationmode:C.locationmode,z:{valType:"data_array",editType:"calc"},geojson:h({},C.geojson,{}),featureidkey:C.featureidkey,text:h({},C.text,{}),hovertext:h({},C.hovertext,{}),marker:{line:{color:h({},p.color,{dflt:x}),width:h({},p.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:C.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:C.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:h({},S.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:g(),showlegend:h({},S.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(G,U,t){var g=t(38248),C=t(39032).BADNUM,i=t(47128),S=t(20148),x=t(4500);function h(p){return p&&typeof p=="string"}G.exports=function(r,e){var a=e._length,n=new Array(a),f;e.geojson?f=function(b){return h(b)||g(b)}:f=h;for(var c=0;c")}}},54272:function(G,U,t){G.exports={attributes:t(83372),supplyDefaults:t(30972),colorbar:t(96288),calc:t(7924),calcGeoJSON:t(88364).calcGeoJSON,plot:t(88364).plot,style:t(7947).style,styleOnSelect:t(7947).styleOnSelect,hoverPoints:t(69224),eventData:t(52428),selectPoints:t(17328),moduleType:"trace",name:"choropleth",basePlotModule:t(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(G,U,t){var g=t(33428),C=t(3400),i=t(27144),S=t(59972).getTopojsonFeatures,x=t(19280).findExtremes,h=t(7947).style;function p(e,a,n){var f=a.layers.backplot.select(".choroplethlayer");C.makeTraceGroups(f,n,"trace choropleth").each(function(c){var l=g.select(this),m=l.selectAll("path.choroplethlocation").data(C.identity);m.enter().append("path").classed("choroplethlocation",!0),m.exit().remove(),h(e,c)})}function r(e,a){for(var n=e[0].trace,f=a[n.geo],c=f._subplot,l=n.locationmode,m=n._length,v=l==="geojson-id"?i.extractTraceFeature(e):S(n,c.topojson),b=[],u=[],o=0;o=0;S--){var x=i[S].id;if(typeof x=="string"&&x.indexOf("water")===0){for(var h=S+1;h=0;r--)h.removeLayer(p[r][1])},x.dispose=function(){var h=this.subplot.map;this._removeLayers(),h.removeSource(this.sourceId)},G.exports=function(p,r){var e=r[0].trace,a=new S(p,e.uid),n=a.sourceId,f=g(r),c=a.below=p.belowLookup["trace-"+e.uid];return p.map.addSource(n,{type:"geojson",data:f.geojson}),a._addLayers(f,c),r[0].trace._glTrace=a,a}},86040:function(G,U,t){var g=t(49084),C=t(29736).axisHoverFormat,i=t(21776).Ks,S=t(52948),x=t(45464),h=t(92880).extendFlat,p={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"},{keys:["norm"]}),uhoverformat:C("u",1),vhoverformat:C("v",1),whoverformat:C("w",1),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),showlegend:h({},x.showlegend,{dflt:!1})};h(p,g("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(e){p[e]=S[e]}),p.hoverinfo=h({},x.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),p.transforms=void 0,G.exports=p},83344:function(G,U,t){var g=t(47128);G.exports=function(i,S){for(var x=S.u,h=S.v,p=S.w,r=Math.min(S.x.length,S.y.length,S.z.length,x.length,h.length,p.length),e=-1/0,a=1/0,n=0;nx.level||x.starts.length&&S===x.level)}break;case"constraint":if(g.prefixBoundary=!1,g.edgepaths.length)return;var h=g.x.length,p=g.y.length,r=-1/0,e=1/0;for(i=0;i":a>r&&(g.prefixBoundary=!0);break;case"<":(ar||g.starts.length&&f===e)&&(g.prefixBoundary=!0);break;case"][":n=Math.min(a[0],a[1]),f=Math.max(a[0],a[1]),nr&&(g.prefixBoundary=!0);break}break}}},55296:function(G,U,t){var g=t(8932),C=t(41076),i=t(46960);function S(x,h,p){var r=h.contours,e=h.line,a=r.size||1,n=r.coloring,f=C(h,{isColorbar:!0});if(n==="heatmap"){var c=g.extractOpts(h);p._fillgradient=c.reversescale?g.flipScale(c.colorscale):c.colorscale,p._zrange=[c.min,c.max]}else n==="fill"&&(p._fillcolor=f);p._line={color:n==="lines"?f:e.color,width:r.showlines!==!1?e.width:0,dash:e.dash},p._levels={start:r.start,end:i(r),size:a}}G.exports={min:"zmin",max:"zmax",calc:S}},93252:function(G){G.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},95536:function(G,U,t){var g=t(38248),C=t(17428),i=t(76308),S=i.addOpacity,x=i.opacity,h=t(69104),p=t(3400).isArrayOrTypedArray,r=h.CONSTRAINT_REDUCTION,e=h.COMPARISON_OPS2;G.exports=function(f,c,l,m,v,b){var u=c.contours,o,d,w,A=l("contours.operation");if(u._operation=r[A],a(l,u),A==="="?o=u.showlines=!0:(o=l("contours.showlines"),w=l("fillcolor",S((f.line||{}).color||v,.5))),o){var _=w&&x(w)?S(c.fillcolor,1):v;d=l("line.color",_),l("line.width",2),l("line.dash")}l("line.smoothing"),C(l,m,d,b)};function a(n,f){var c;e.indexOf(f.operation)===-1?(n("contours.value",[0,1]),p(f.value)?f.value.length>2?f.value=f.value.slice(2):f.length===0?f.value=[0,1]:f.length<2?(c=parseFloat(f.value[0]),f.value=[c,c+1]):f.value=[parseFloat(f.value[0]),parseFloat(f.value[1])]:g(f.value)&&(c=parseFloat(f.value),f.value=[c,c+1])):(n("contours.value",0),g(f.value)||(p(f.value)?f.value=parseFloat(f.value[0]):f.value=0))}},3212:function(G,U,t){var g=t(69104),C=t(38248);G.exports={"[]":S("[]"),"][":S("]["),">":x(">"),"<":x("<"),"=":x("=")};function i(h,p){var r=Array.isArray(p),e;function a(n){return C(n)?+n:null}return g.COMPARISON_OPS2.indexOf(h)!==-1?e=a(r?p[0]:p):g.INTERVAL_OPS.indexOf(h)!==-1?e=r?[a(p[0]),a(p[1])]:[a(p),a(p)]:g.SET_OPS.indexOf(h)!==-1&&(e=r?p.map(a):[a(p)]),e}function S(h){return function(p){p=i(h,p);var r=Math.min(p[0],p[1]),e=Math.max(p[0],p[1]);return{start:r,end:e,size:e-r}}}function x(h){return function(p){return p=i(h,p),{start:p,end:1/0,size:1/0}}}},84952:function(G){G.exports=function(t,g,C,i){var S=i("contours.start"),x=i("contours.end"),h=S===!1||x===!1,p=C("contours.size"),r;h?r=g.autocontour=!0:r=C("autocontour",!1),(r||!p)&&C("ncontours")}},82172:function(G,U,t){var g=t(3400);G.exports=function(i,S){var x,h,p,r=function(n){return n.reverse()},e=function(n){return n};switch(S){case"=":case"<":return i;case">":for(i.length!==1&&g.warn("Contour data invalid for the specified inequality operation."),h=i[0],x=0;x1e3){g.warn("Too many contours, clipping at 1000",x);break}return a}},46960:function(G){G.exports=function(t){return t.end+t.size/1e6}},88748:function(G,U,t){var g=t(3400),C=t(93252);G.exports=function(e,a,n){var f,c,l,m,v;for(a=a||.01,n=n||.01,l=0;l20?(l=C.CHOOSESADDLE[l][(m[0]||m[1])<0?0:1],r.crossings[c]=C.SADDLEREMAINDER[l]):delete r.crossings[c],m=C.NEWDELTA[l],!m){g.log("Found bad marching index:",l,e,r.level);break}v.push(p(r,e,m)),e[0]+=m[0],e[1]+=m[1],c=e.join(","),i(v[v.length-1],v[v.length-2],n,f)&&v.pop();var A=m[0]&&(e[0]<0||e[0]>u-2)||m[1]&&(e[1]<0||e[1]>b-2),_=e[0]===o[0]&&e[1]===o[1]&&m[0]===d[0]&&m[1]===d[1];if(_||a&&A)break;l=r.crossings[c]}w===1e4&&g.log("Infinite loop in contour?");var y=i(v[0],v[v.length-1],n,f),E=0,T=.2*r.smoothing,s=[],L=0,M,z,D,N,I,k,B,O,H,Y,j;for(w=1;w=L;w--)if(M=s[w],M=L&&M+s[z]O&&H--,r.edgepaths[H]=j.concat(v,Y));break}J||(r.edgepaths[O]=v.concat(Y))}for(O=0;O20&&e?r===208||r===1114?n=a[0]===0?1:-1:f=a[1]===0?1:-1:C.BOTTOMSTART.indexOf(r)!==-1?f=1:C.LEFTSTART.indexOf(r)!==-1?n=1:C.TOPSTART.indexOf(r)!==-1?f=-1:n=-1,[n,f]}function p(r,e,a){var n=e[0]+Math.max(a[0],0),f=e[1]+Math.max(a[1],0),c=r.z[f][n],l=r.xaxis,m=r.yaxis;if(a[1]){var v=(r.level-c)/(r.z[f][n+1]-c),b=(v!==1?(1-v)*l.c2l(r.x[n]):0)+(v!==0?v*l.c2l(r.x[n+1]):0);return[l.c2p(l.l2c(b),!0),m.c2p(r.y[f],!0),n+v,f]}else{var u=(r.level-c)/(r.z[f+1][n]-c),o=(u!==1?(1-u)*m.c2l(r.y[f]):0)+(u!==0?u*m.c2l(r.y[f+1]):0);return[l.c2p(r.x[n],!0),m.c2p(m.l2c(o),!0),n,f+u]}}},38200:function(G,U,t){var g=t(76308),C=t(55512);G.exports=function(S,x,h,p,r){r||(r={}),r.isContour=!0;var e=C(S,x,h,p,r);return e&&e.forEach(function(a){var n=a.trace;n.contours.type==="constraint"&&(n.fillcolor&&g.opacity(n.fillcolor)?a.color=g.addOpacity(n.fillcolor,1):n.contours.showlines&&g.opacity(n.line.color)&&(a.color=g.addOpacity(n.line.color,1)))}),e}},66240:function(G,U,t){G.exports={attributes:t(67104),supplyDefaults:t(57004),calc:t(20688),plot:t(23676).plot,style:t(52440),colorbar:t(55296),hoverPoints:t(38200),moduleType:"trace",name:"contour",basePlotModule:t(57952),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},17428:function(G,U,t){var g=t(3400);G.exports=function(i,S,x,h){h||(h={});var p=i("contours.showlabels");if(p){var r=S.font;g.coerceFont(i,"contours.labelfont",{family:r.family,size:r.size,color:x}),i("contours.labelformat")}h.hasHover!==!1&&i("zhoverformat")}},41076:function(G,U,t){var g=t(33428),C=t(8932),i=t(46960);G.exports=function(x){var h=x.contours,p=h.start,r=i(h),e=h.size||1,a=Math.floor((r-p)/e)+1,n=h.coloring==="lines"?0:1,f=C.extractOpts(x);isFinite(e)||(e=1,a=1);var c=f.reversescale?C.flipScale(f.colorscale):f.colorscale,l=c.length,m=new Array(l),v=new Array(l),b,u,o=f.min,d=f.max;if(h.coloring==="heatmap"){for(u=0;u=d)&&(p<=o&&(p=o),r>=d&&(r=d),a=Math.floor((r-p)/e)+1,n=0),u=0;uo&&(m.unshift(o),v.unshift(v[0])),m[m.length-1]i?0:1)+(S[0][1]>i?0:2)+(S[1][1]>i?0:4)+(S[1][0]>i?0:8);if(x===5||x===10){var h=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return i>h?x===5?713:1114:x===5?104:208}return x===15?0:x}},23676:function(G,U,t){var g=t(33428),C=t(3400),i=t(43616),S=t(8932),x=t(72736),h=t(54460),p=t(78344),r=t(41420),e=t(72424),a=t(88748),n=t(61512),f=t(82172),c=t(56008),l=t(93252),m=l.LABELOPTIMIZER;U.plot=function(y,E,T,s){var L=E.xaxis,M=E.yaxis;C.makeTraceGroups(s,T,"contour").each(function(z){var D=g.select(this),N=z[0],I=N.trace,k=N.x,B=N.y,O=I.contours,H=n(O,E,N),Y=C.ensureSingle(D,"g","heatmapcoloring"),j=[];O.coloring==="heatmap"&&(j=[z]),r(y,E,j,Y),e(H),a(H);var et=L.c2p(k[0],!0),it=L.c2p(k[k.length-1],!0),ut=M.c2p(B[0],!0),J=M.c2p(B[B.length-1],!0),X=[[et,J],[it,J],[it,ut],[et,ut]],tt=H;O.type==="constraint"&&(tt=f(H,O._operation)),v(D,X,O),b(D,tt,X,O),o(D,H,y,N,O),w(D,E,y,N,X)})};function v(_,y,E){var T=C.ensureSingle(_,"g","contourbg"),s=T.selectAll("path").data(E.coloring==="fill"?[0]:[]);s.enter().append("path"),s.exit().remove(),s.attr("d","M"+y.join("L")+"Z").style("stroke","none")}function b(_,y,E,T){var s=T.coloring==="fill"||T.type==="constraint"&&T._operation!=="=",L="M"+E.join("L")+"Z";s&&c(y,T);var M=C.ensureSingle(_,"g","contourfill"),z=M.selectAll("path").data(s?y:[]);z.enter().append("path"),z.exit().remove(),z.each(function(D){var N=(D.prefixBoundary?L:"")+u(D,E);N?g.select(this).attr("d",N).style("stroke","none"):g.select(this).remove()})}function u(_,y){var E="",T=0,s=_.edgepaths.map(function(et,it){return it}),L=!0,M,z,D,N,I,k;function B(et){return Math.abs(et[1]-y[0][1])<.01}function O(et){return Math.abs(et[1]-y[2][1])<.01}function H(et){return Math.abs(et[0]-y[0][0])<.01}function Y(et){return Math.abs(et[0]-y[2][0])<.01}for(;s.length;){for(k=i.smoothopen(_.edgepaths[T],_.smoothing),E+=L?k:k.replace(/^M/,"L"),s.splice(s.indexOf(T),1),M=_.edgepaths[T][_.edgepaths[T].length-1],N=-1,D=0;D<4;D++){if(!M){C.log("Missing end?",T,_);break}for(B(M)&&!Y(M)?z=y[1]:H(M)?z=y[0]:O(M)?z=y[3]:Y(M)&&(z=y[2]),I=0;I<_.edgepaths.length;I++){var j=_.edgepaths[I][0];Math.abs(M[0]-z[0])<.01?Math.abs(M[0]-j[0])<.01&&(j[1]-M[1])*(z[1]-j[1])>=0&&(z=j,N=I):Math.abs(M[1]-z[1])<.01?Math.abs(M[1]-j[1])<.01&&(j[0]-M[0])*(z[0]-j[0])>=0&&(z=j,N=I):C.log("endpt to newendpt is not vert. or horz.",M,z,j)}if(M=z,N>=0)break;E+="L"+z}if(N===_.edgepaths.length){C.log("unclosed perimeter path");break}T=N,L=s.indexOf(T)===-1,L&&(T=s[0],E+="Z")}for(T=0;T<_.paths.length;T++)E+=i.smoothclosed(_.paths[T],_.smoothing);return E}function o(_,y,E,T,s){var L=E._context.staticPlot,M=C.ensureSingle(_,"g","contourlines"),z=s.showlines!==!1,D=s.showlabels,N=z&&D,I=U.createLines(M,z||D,y,L),k=U.createLineClip(M,N,E,T.trace.uid),B=_.selectAll("g.contourlabels").data(D?[0]:[]);if(B.exit().remove(),B.enter().append("g").classed("contourlabels",!0),D){var O=[],H=[];C.clearLocationCache();var Y=U.labelFormatter(E,T),j=i.tester.append("text").attr("data-notex",1).call(i.font,s.labelfont),et=y[0].xaxis,it=y[0].yaxis,ut=et._length,J=it._length,X=et.range,tt=it.range,V=C.aggNums(Math.min,null,T.x),Q=C.aggNums(Math.max,null,T.x),ot=C.aggNums(Math.min,null,T.y),$=C.aggNums(Math.max,null,T.y),Z=Math.max(et.c2p(V,!0),0),st=Math.min(et.c2p(Q,!0),ut),nt=Math.max(it.c2p($,!0),0),ct=Math.min(it.c2p(ot,!0),J),gt={};X[0]m.MAXCOST*2)break;B&&(z/=2),M=N-z/2,D=M+z*1.5}if(k<=m.MAXCOST)return I};function d(_,y,E,T){var s=y.width/2,L=y.height/2,M=_.x,z=_.y,D=_.theta,N=Math.cos(D)*s,I=Math.sin(D)*s,k=(M>T.center?T.right-M:M-T.left)/(N+Math.abs(Math.sin(D)*L)),B=(z>T.middle?T.bottom-z:z-T.top)/(Math.abs(I)+Math.cos(D)*L);if(k<1||B<1)return 1/0;var O=m.EDGECOST*(1/(k-1)+1/(B-1));O+=m.ANGLECOST*D*D;for(var H=M-N,Y=z-I,j=M+N,et=z+I,it=0;itp.end&&(p.start=p.end=(p.start+p.end)/2),x._input.contours||(x._input.contours={}),C.extendFlat(x._input.contours,{start:p.start,end:p.end,size:p.size}),x._input.autocontour=!0}else if(p.type!=="constraint"){var n=p.start,f=p.end,c=x._input.contours;if(n>f&&(p.start=c.start=f,f=p.end=c.end=n,n=p.start),!(p.size>0)){var l;n===f?l=1:l=i(n,f,x.ncontours).dtick,c.size=p.size=l}}};function i(S,x,h){var p={type:"linear",range:[S,x]};return g.autoTicks(p,(x-S)/(h||15)),p}},52440:function(G,U,t){var g=t(33428),C=t(43616),i=t(41648),S=t(41076);G.exports=function(h){var p=g.select(h).selectAll("g.contour");p.style("opacity",function(r){return r[0].trace.opacity}),p.each(function(r){var e=g.select(this),a=r[0].trace,n=a.contours,f=a.line,c=n.size||1,l=n.start,m=n.type==="constraint",v=!m&&n.coloring==="lines",b=!m&&n.coloring==="fill",u=v||b?S(a):null;e.selectAll("g.contourlevel").each(function(w){g.select(this).selectAll("path").call(C.lineGroupStyle,f.width,v?u(w.level):f.color,f.dash)});var o=n.labelfont;if(e.selectAll("g.contourlabels text").each(function(w){C.font(g.select(this),{family:o.family,size:o.size,color:o.color||(v?u(w.level):f.color)})}),m)e.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(b){var d;e.selectAll("g.contourfill path").style("fill",function(w){return d===void 0&&(d=w.level),u(w.level+.5*c)}),d===void 0&&(d=l),e.selectAll("g.contourbg path").style("fill",u(d-.5*c))}}),i(h)}},97680:function(G,U,t){var g=t(27260),C=t(17428);G.exports=function(S,x,h,p,r){var e=h("contours.coloring"),a,n="";e==="fill"&&(a=h("contours.showlines")),a!==!1&&(e!=="lines"&&(n=h("line.color","#000")),h("line.width",.5),h("line.dash")),e!=="none"&&(S.showlegend!==!0&&(x.showlegend=!1),x._dfltShowLegend=!1,g(S,x,p,h,{prefix:"",cLetter:"z"})),h("line.smoothing"),C(h,p,n,r)}},37960:function(G,U,t){var g=t(83328),C=t(67104),i=t(49084),S=t(92880).extendFlat,x=C.contours;G.exports=S({carpet:{valType:"string",editType:"calc"},z:g.z,a:g.x,a0:g.x0,da:g.dx,b:g.y,b0:g.y0,db:g.dy,text:g.text,hovertext:g.hovertext,transpose:g.transpose,atype:g.xtype,btype:g.ytype,fillcolor:C.fillcolor,autocontour:C.autocontour,ncontours:C.ncontours,contours:{type:x.type,start:x.start,end:x.end,size:x.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:x.showlines,showlabels:x.showlabels,labelfont:x.labelfont,labelformat:x.labelformat,operation:x.operation,value:x.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:C.line.color,width:C.line.width,dash:C.line.dash,smoothing:C.line.smoothing,editType:"plot"},transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},30572:function(G,U,t){var g=t(47128),C=t(3400),i=t(2872),S=t(26136),x=t(70448),h=t(11240),p=t(35744),r=t(3252),e=t(50948),a=t(54444);G.exports=function(c,l){var m=l._carpetTrace=e(c,l);if(!(!m||!m.visible||m.visible==="legendonly")){if(!l.a||!l.b){var v=c.data[m.index],b=c.data[l.index];b.a||(b.a=v.a),b.b||(b.b=v.b),r(b,l,l._defaultColor,c._fullLayout)}var u=n(c,l);return a(l,l._z),u}};function n(f,c){var l=c._carpetTrace,m=l.aaxis,v=l.baxis,b,u,o,d,w,A,_;m._minDtick=0,v._minDtick=0,C.isArray1D(c.z)&&i(c,m,v,"a","b",["z"]),b=c._a=c._a||c.a,d=c._b=c._b||c.b,b=b?m.makeCalcdata(c,"_a"):[],d=d?v.makeCalcdata(c,"_b"):[],u=c.a0||0,o=c.da||1,w=c.b0||0,A=c.db||1,_=c._z=S(c._z||c.z,c.transpose),c._emptypoints=h(_),x(_,c._emptypoints);var y=C.maxRowLength(_),E=c.xtype==="scaled"?"":b,T=p(c,E,u,o,y,m),s=c.ytype==="scaled"?"":d,L=p(c,s,w,A,_.length,v),M={a:T,b:L,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&g(f,c,{vals:_,containerStr:"",cLetter:"z"}),[M]}},3252:function(G,U,t){var g=t(3400),C=t(51264),i=t(37960),S=t(95536),x=t(84952),h=t(97680);G.exports=function(r,e,a,n){function f(v,b){return g.coerce(r,e,i,v,b)}function c(v){return g.coerce2(r,e,i,v)}if(f("carpet"),r.a&&r.b){var l=C(r,e,f,n,"a","b");if(!l){e.visible=!1;return}f("text");var m=f("contours.type")==="constraint";m?S(r,e,f,n,a,{hasHover:!1}):(x(r,e,f,c),h(r,e,f,n,{hasHover:!1}))}else e._defaultColor=a,e._length=null}},40448:function(G,U,t){G.exports={attributes:t(37960),supplyDefaults:t(3252),colorbar:t(55296),calc:t(30572),plot:t(94440),style:t(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:t(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(G,U,t){var g=t(33428),C=t(87072),i=t(53416),S=t(43616),x=t(3400),h=t(72424),p=t(88748),r=t(23676),e=t(93252),a=t(82172),n=t(61512),f=t(56008),c=t(50948),l=t(77712);G.exports=function(E,T,s,L){var M=T.xaxis,z=T.yaxis;x.makeTraceGroups(L,s,"contour").each(function(D){var N=g.select(this),I=D[0],k=I.trace,B=k._carpetTrace=c(E,k),O=E.calcdata[B.index][0];if(!B.visible||B.visible==="legendonly")return;var H=I.a,Y=I.b,j=k.contours,et=n(j,T,I),it=j.type==="constraint",ut=j._operation,J=it?ut==="="?"lines":"fill":j.coloring;function X(Tt){var wt=B.ab2xy(Tt[0],Tt[1],!0);return[M.c2p(wt[0]),z.c2p(wt[1])]}var tt=[[H[0],Y[Y.length-1]],[H[H.length-1],Y[Y.length-1]],[H[H.length-1],Y[0]],[H[0],Y[0]]];h(et);var V=(H[H.length-1]-H[0])*1e-8,Q=(Y[Y.length-1]-Y[0])*1e-8;p(et,V,Q);var ot=et;j.type==="constraint"&&(ot=a(et,ut)),m(et,X);var $,Z,st,nt,ct=[];for(nt=O.clipsegments.length-1;nt>=0;nt--)$=O.clipsegments[nt],Z=C([],$.x,M.c2p),st=C([],$.y,z.c2p),Z.reverse(),st.reverse(),ct.push(i(Z,st,$.bicubic));var gt="M"+ct.join("L")+"Z";w(N,O.clipsegments,M,z,it,J),A(k,N,M,z,ot,tt,X,B,O,J,gt),v(N,et,E,I,j,T,B),S.setClipUrl(N,B._clipPathId,E)})};function m(y,E){var T,s,L,M,z,D,N,I,k;for(T=0;Tet&&(s.max=et),s.len=s.max-s.min}function u(y,E,T){var s=y.getPointAtLength(E),L=y.getPointAtLength(T),M=L.x-s.x,z=L.y-s.y,D=Math.sqrt(M*M+z*z);return[M/D,z/D]}function o(y){var E=Math.sqrt(y[0]*y[0]+y[1]*y[1]);return[y[0]/E,y[1]/E]}function d(y,E){var T=Math.abs(y[0]*E[0]+y[1]*E[1]),s=Math.sqrt(1-T*T);return s/T}function w(y,E,T,s,L,M){var z,D,N,I,k=x.ensureSingle(y,"g","contourbg"),B=k.selectAll("path").data(M==="fill"&&!L?[0]:[]);B.enter().append("path"),B.exit().remove();var O=[];for(I=0;I=0&&(H=Z,j=et):Math.abs(O[1]-H[1])=0&&(H=Z,j=et):x.log("endpt to newendpt is not vert. or horz.",O,H,Z)}if(j>=0)break;I+=ot(O,H),O=H}if(j===E.edgepaths.length){x.log("unclosed perimeter path");break}N=j,B=k.indexOf(N)===-1,B&&(N=k[0],I+=ot(O,H)+"Z",O=null)}for(N=0;N0?+v[l]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:w})}}var _=S.extractOpts(e),y=_.reversescale?S.flipScale(_.colorscale):_.colorscale,E=y[0][1],T=i.opacity(E)<1?E:i.addOpacity(E,0),s=["interpolate",["linear"],["heatmap-density"],0,T];for(l=1;l=0;p--)x.removeLayer(h[p][1])},S.dispose=function(){var x=this.subplot.map;this._removeLayers(),x.removeSource(this.sourceId)},G.exports=function(h,p){var r=p[0].trace,e=new i(h,r.uid),a=e.sourceId,n=g(p),f=e.below=h.belowLookup["trace-"+r.uid];return h.map.addSource(a,{type:"geojson",data:n.geojson}),e._addLayers(n,f),e}},74248:function(G,U,t){var g=t(3400);G.exports=function(i,S){for(var x=0;x"),n.color=S(c,v),[n]}};function S(x,h){var p=x.marker,r=h.mc||p.color,e=h.mlc||p.line.color,a=h.mlw||p.line.width;if(g(r))return r;if(g(e)&&a)return e}},94704:function(G,U,t){G.exports={attributes:t(20088),layoutAttributes:t(7076),supplyDefaults:t(45432).supplyDefaults,crossTraceDefaults:t(45432).crossTraceDefaults,supplyLayoutDefaults:t(11631),calc:t(23096),crossTraceCalc:t(4804),plot:t(42200),style:t(44544).style,hoverPoints:t(31488),eventData:t(34580),selectPoints:t(45784),moduleType:"trace",name:"funnel",basePlotModule:t(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(G){G.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},11631:function(G,U,t){var g=t(3400),C=t(7076);G.exports=function(i,S,x){var h=!1;function p(a,n){return g.coerce(i,S,C,a,n)}for(var r=0;r path").each(function(v){if(!v.isBlank){var b=m.marker;g.select(this).call(i.fill,v.mc||b.color).call(i.stroke,v.mlc||b.line.color).call(C.dashLine,b.line.dash,v.mlw||b.line.width).style("opacity",m.selectedpoints&&!v.selected?S:1)}}),p(l,m,e),l.selectAll(".regions").each(function(){g.select(this).selectAll("path").style("stroke-width",0).call(i.fill,m.connector.fillcolor)}),l.selectAll(".lines").each(function(){var v=m.connector.line;C.lineGroupStyle(g.select(this).selectAll("path"),v.width,v.color,v.dash)})})}G.exports={style:r}},22332:function(G,U,t){var g=t(74996),C=t(45464),i=t(86968).u,S=t(21776).Ks,x=t(21776).Gw,h=t(92880).extendFlat;G.exports={labels:g.labels,label0:g.label0,dlabel:g.dlabel,values:g.values,marker:{colors:g.marker.colors,line:{color:h({},g.marker.line.color,{dflt:null}),width:h({},g.marker.line.width,{dflt:1}),editType:"calc"},pattern:g.marker.pattern,editType:"calc"},text:g.text,hovertext:g.hovertext,scalegroup:h({},g.scalegroup,{}),textinfo:h({},g.textinfo,{flags:["label","text","value","percent"]}),texttemplate:x({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:h({},C.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),textposition:h({},g.textposition,{values:["inside","none"],dflt:"inside"}),textfont:g.textfont,insidetextfont:g.insidetextfont,title:{text:g.title.text,font:g.title.font,position:h({},g.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},91248:function(G,U,t){var g=t(7316);U.name="funnelarea",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},54e3:function(G,U,t){var g=t(45768);function C(S,x){return g.calc(S,x)}function i(S){g.crossTraceCalc(S,{type:"funnelarea"})}G.exports={calc:C,crossTraceCalc:i}},92688:function(G,U,t){var g=t(3400),C=t(22332),i=t(86968).Q,S=t(31508).handleText,x=t(74174).handleLabelsAndValues,h=t(74174).handleMarkerDefaults;G.exports=function(r,e,a,n){function f(A,_){return g.coerce(r,e,C,A,_)}var c=f("labels"),l=f("values"),m=x(c,l),v=m.len;if(e._hasLabels=m.hasLabels,e._hasValues=m.hasValues,!e._hasLabels&&e._hasValues&&(f("label0"),f("dlabel")),!v){e.visible=!1;return}e._length=v,h(r,e,n,f),f("scalegroup");var b=f("text"),u=f("texttemplate"),o;if(u||(o=f("textinfo",Array.isArray(b)?"text+percent":"percent")),f("hovertext"),f("hovertemplate"),u||o&&o!=="none"){var d=f("textposition");S(r,e,n,f,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else o==="none"&&f("textposition","none");i(e,n,f);var w=f("title.text");w&&(f("title.position"),g.coerceFont(f,"title.font",n.font)),f("aspectratio"),f("baseratio")}},62396:function(G,U,t){G.exports={moduleType:"trace",name:"funnelarea",basePlotModule:t(91248),categories:["pie-like","funnelarea","showLegend"],attributes:t(22332),layoutAttributes:t(61280),supplyDefaults:t(92688),supplyLayoutDefaults:t(35384),calc:t(54e3).calc,crossTraceCalc:t(54e3).crossTraceCalc,plot:t(39472),style:t(62096),styleOne:t(10528),meta:{}}},61280:function(G,U,t){var g=t(85204).hiddenlabels;G.exports={hiddenlabels:g,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(G,U,t){var g=t(3400),C=t(61280);G.exports=function(S,x){function h(p,r){return g.coerce(S,x,C,p,r)}h("hiddenlabels"),h("funnelareacolorway",x.colorway),h("extendfunnelareacolors")}},39472:function(G,U,t){var g=t(33428),C=t(43616),i=t(3400),S=i.strScale,x=i.strTranslate,h=t(72736),p=t(98184),r=p.toMoveInsideBar,e=t(82744),a=e.recordMinTextSize,n=e.clearMinTextSize,f=t(69656),c=t(37820),l=c.attachFxHandlers,m=c.determineInsideTextFont,v=c.layoutAreas,b=c.prerenderTitles,u=c.positionTitleOutside,o=c.formatSliceLabel;G.exports=function(y,E){var T=y._context.staticPlot,s=y._fullLayout;n("funnelarea",s),b(E,y),v(E,s._size),i.makeTraceGroups(s._funnelarealayer,E,"trace").each(function(L){var M=g.select(this),z=L[0],D=z.trace;A(L),M.each(function(){var N=g.select(this).selectAll("g.slice").data(L);N.enter().append("g").classed("slice",!0),N.exit().remove(),N.each(function(k,B){if(k.hidden){g.select(this).selectAll("path,g").remove();return}k.pointNumber=k.i,k.curveNumber=D.index;var O=z.cx,H=z.cy,Y=g.select(this),j=Y.selectAll("path.surface").data([k]);j.enter().append("path").classed("surface",!0).style({"pointer-events":T?"none":"all"}),Y.call(l,y,L);var et="M"+(O+k.TR[0])+","+(H+k.TR[1])+d(k.TR,k.BR)+d(k.BR,k.BL)+d(k.BL,k.TL)+"Z";j.attr("d",et),o(y,k,z);var it=f.castOption(D.textposition,k.pts),ut=Y.selectAll("g.slicetext").data(k.text&&it!=="none"?[0]:[]);ut.enter().append("g").classed("slicetext",!0),ut.exit().remove(),ut.each(function(){var J=i.ensureSingle(g.select(this),"text","",function(st){st.attr("data-notex",1)}),X=i.ensureUniformFontSize(y,m(D,k,s.font));J.text(k.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(C.font,X).call(h.convertToTspans,y);var tt=C.bBox(J.node()),V,Q,ot,$=Math.min(k.BL[1],k.BR[1])+H,Z=Math.max(k.TL[1],k.TR[1])+H;Q=Math.max(k.TL[0],k.BL[0])+O,ot=Math.min(k.TR[0],k.BR[0])+O,V=r(Q,ot,$,Z,tt,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),V.fontSize=X.size,a(D.type,V,s),L[B].transform=V,i.setTransormAndDisplay(J,V)})});var I=g.select(this).selectAll("g.titletext").data(D.title.text?[0]:[]);I.enter().append("g").classed("titletext",!0),I.exit().remove(),I.each(function(){var k=i.ensureSingle(g.select(this),"text","",function(H){H.attr("data-notex",1)}),B=D.title.text;D._meta&&(B=i.templateString(B,D._meta)),k.text(B).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(C.font,D.title.font).call(h.convertToTspans,y);var O=u(z,s._size);k.attr("transform",x(O.x,O.y)+S(Math.min(1,O.scale))+x(O.tx,O.ty))})})})};function d(_,y){var E=y[0]-_[0],T=y[1]-_[1];return"l"+E+","+T}function w(_,y){return[.5*(_[0]+y[0]),.5*(_[1]+y[1])]}function A(_){if(!_.length)return;var y=_[0],E=y.trace,T=E.aspectratio,s=E.baseratio;s>.999&&(s=.999);var L=Math.pow(s,2),M=y.vTotal,z=M*L/(1-L),D=M,N=z/M;function I(){var nt=Math.sqrt(N);return{x:nt,y:-nt}}function k(){var nt=I();return[nt.x,nt.y]}var B,O=[];O.push(k());var H,Y;for(H=_.length-1;H>-1;H--)if(Y=_[H],!Y.hidden){var j=Y.v/D;N+=j,O.push(k())}var et=1/0,it=-1/0;for(H=0;H-1;H--)if(Y=_[H],!Y.hidden){$+=1;var Z=O[$][0],st=O[$][1];Y.TL=[-Z,st],Y.TR=[Z,st],Y.BL=Q,Y.BR=ot,Y.pxmid=w(Y.TR,Y.BR),Q=Y.TL,ot=Y.TR}}},62096:function(G,U,t){var g=t(33428),C=t(10528),i=t(82744).resizeText;G.exports=function(x){var h=x._fullLayout._funnelarealayer.selectAll(".trace");i(x,h,"funnelarea"),h.each(function(p){var r=p[0],e=r.trace,a=g.select(this);a.style({opacity:e.opacity}),a.selectAll("path.surface").each(function(n){g.select(this).call(C,n,e,x)})})}},83328:function(G,U,t){var g=t(52904),C=t(45464),i=t(25376),S=t(29736).axisHoverFormat,x=t(21776).Ks,h=t(21776).Gw,p=t(49084),r=t(92880).extendFlat;G.exports=r({z:{valType:"data_array",editType:"calc"},x:r({},g.x,{impliedEdits:{xtype:"array"}}),x0:r({},g.x0,{impliedEdits:{xtype:"scaled"}}),dx:r({},g.dx,{impliedEdits:{xtype:"scaled"}}),y:r({},g.y,{impliedEdits:{ytype:"array"}}),y0:r({},g.y0,{impliedEdits:{ytype:"scaled"}}),dy:r({},g.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:r({},g.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:r({},g.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:r({},g.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:r({},g.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:r({},g.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:r({},g.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:x(),texttemplate:h({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:i({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:r({},C.showlegend,{dflt:!1})},{transforms:void 0},p("",{cLetter:"z",autoColorDflt:!1}))},19512:function(G,U,t){var g=t(24040),C=t(3400),i=t(54460),S=t(1220),x=t(55480),h=t(47128),p=t(2872),r=t(26136),e=t(70448),a=t(11240),n=t(35744),f=t(39032).BADNUM;G.exports=function(v,b){var u=i.getFromId(v,b.xaxis||"x"),o=i.getFromId(v,b.yaxis||"y"),d=g.traceIs(b,"contour"),w=g.traceIs(b,"histogram"),A=g.traceIs(b,"gl2d"),_=d?"best":b.zsmooth,y,E,T,s,L,M,z,D,N,I,k;if(u._minDtick=0,o._minDtick=0,w)k=x(v,b),s=k.orig_x,y=k.x,E=k.x0,T=k.dx,D=k.orig_y,L=k.y,M=k.y0,z=k.dy,N=k.z;else{var B=b.z;C.isArray1D(B)?(p(b,u,o,"x","y",["z"]),y=b._x,L=b._y,B=b._z):(s=b.x?u.makeCalcdata(b,"x"):[],D=b.y?o.makeCalcdata(b,"y"):[],y=S(b,u,"x",s).vals,L=S(b,o,"y",D).vals,b._x=y,b._y=L),E=b.x0,T=b.dx,M=b.y0,z=b.dy,N=r(B,b,u,o)}(u.rangebreaks||o.rangebreaks)&&(N=l(y,L,N),w||(y=c(y),L=c(L),b._x=y,b._y=L)),!w&&(d||b.connectgaps)&&(b._emptypoints=a(N),e(N,b._emptypoints));function O(tt){_=b._input.zsmooth=b.zsmooth=!1,C.warn('cannot use zsmooth: "fast": '+tt)}function H(tt){if(tt.length>1){var V=(tt[tt.length-1]-tt[0])/(tt.length-1),Q=Math.abs(V/100);for(I=0;IQ)return!1}return!0}b._islinear=!1,u.type==="log"||o.type==="log"?_==="fast"&&O("log axis found"):H(y)?H(L)?b._islinear=!0:_==="fast"&&O("y scale is not linear"):_==="fast"&&O("x scale is not linear");var Y=C.maxRowLength(N),j=b.xtype==="scaled"?"":y,et=n(b,j,E,T,Y,u),it=b.ytype==="scaled"?"":L,ut=n(b,it,M,z,N.length,o);A||(b._extremes[u._id]=i.findExtremes(u,et),b._extremes[o._id]=i.findExtremes(o,ut));var J={x:et,y:ut,z:N,text:b._text||b.text,hovertext:b._hovertext||b.hovertext};if(b.xperiodalignment&&s&&(J.orig_x=s),b.yperiodalignment&&D&&(J.orig_y=D),j&&j.length===et.length-1&&(J.xCenter=j),it&&it.length===ut.length-1&&(J.yCenter=it),w&&(J.xRanges=k.xRanges,J.yRanges=k.yRanges,J.pts=k.pts),d||h(v,b,{vals:N,cLetter:"z"}),d&&b.contours&&b.contours.coloring==="heatmap"){var X={type:b.type==="contour"?"heatmap":"histogram2d",xcalendar:b.xcalendar,ycalendar:b.ycalendar};J.xfill=n(X,j,E,T,Y,u),J.yfill=n(X,it,M,z,N.length,o)}return[J]};function c(m){for(var v=[],b=m.length,u=0;u=0;m--)l=h[m],f=l[0],c=l[1],v=((x[[f-1,c]]||e)[2]+(x[[f+1,c]]||e)[2]+(x[[f,c-1]]||e)[2]+(x[[f,c+1]]||e)[2])/20,v&&(b[l]=[f,c,v],h.splice(m,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(l in b)x[l]=b[l],S.push(b[l])}return S.sort(function(o,d){return d[2]-o[2]})}},55512:function(G,U,t){var g=t(93024),C=t(3400),i=C.isArrayOrTypedArray,S=t(54460),x=t(8932).extractOpts;G.exports=function(p,r,e,a,n){n||(n={});var f=n.isContour,c=p.cd[0],l=c.trace,m=p.xa,v=p.ya,b=c.x,u=c.y,o=c.z,d=c.xCenter,w=c.yCenter,A=c.zmask,_=l.zhoverformat,y=b,E=u,T,s,L,M;if(p.index!==!1){try{L=Math.round(p.index[1]),M=Math.round(p.index[0])}catch{C.error("Error hovering on heatmap, pointNumber must be [row,col], found:",p.index);return}if(L<0||L>=o[0].length||M<0||M>o.length)return}else{if(g.inbox(r-b[0],r-b[b.length-1],0)>0||g.inbox(e-u[0],e-u[u.length-1],0)>0)return;if(f){var z;for(y=[2*b[0]-b[1]],z=1;zC;a++)e=x(p,r,S(e));return e>C&&g.log("interp2d didn't converge quickly",e),p};function x(h,p,r){var e=0,a,n,f,c,l,m,v,b,u,o,d,w,A;for(c=0;cw&&(e=Math.max(e,Math.abs(h[n][f]-d)/(A-w))))}return e}},39096:function(G,U,t){var g=t(3400);G.exports=function(i,S){i("texttemplate");var x=g.extendFlat({},S.font,{color:"auto",size:"auto"});g.coerceFont(i,"textfont",x)}},35744:function(G,U,t){var g=t(24040),C=t(3400).isArrayOrTypedArray;G.exports=function(S,x,h,p,r,e){var a=[],n=g.traceIs(S,"contour"),f=g.traceIs(S,"histogram"),c=g.traceIs(S,"gl2d"),l,m,v,b=C(x)&&x.length>1;if(b&&!f&&e.type!=="category"){var u=x.length;if(u<=r){if(n||c)a=Array.from(x).slice(0,r);else if(r===1)e.type==="log"?a=[.5*x[0],2*x[0]]:a=[x[0]-.5,x[0]+.5];else if(e.type==="log"){for(a=[Math.pow(x[0],1.5)/Math.pow(x[1],.5)],v=1;v0;)Q=s.c2p(O[st]),st--;for(Q0;)Z=L.c2p(H[st]),st--;Z<$&&(ot=$,$=Z,Z=ot,tt=!0),et&&(Y=O,j=H,O=D.xfill,H=D.yfill);var gt="default";if(it?gt=it==="best"?"smooth":"fast":N._islinear&&I===0&&k===0&&m()&&(gt="fast"),gt!=="fast"){var Tt=it==="best"?0:.5;V=Math.max(-Tt*s._length,V),Q=Math.min((1+Tt)*s._length,Q),$=Math.max(-Tt*L._length,$),Z=Math.min((1+Tt)*L._length,Z)}var wt=Math.round(Q-V),Rt=Math.round(Z-$),bt=V>=s._length||Q<=0||$>=L._length||Z<=0;if(bt){var At=z.selectAll("image").data([]);At.exit().remove(),o(z);return}var mt,Lt;gt==="fast"?(mt=J,Lt=ut):(mt=wt,Lt=Rt);var Ht=document.createElement("canvas");Ht.width=mt,Ht.height=Lt;var Ut=Ht.getContext("2d",{willReadFrequently:!0}),kt=n(N,{noNumericCheck:!0,returnArray:!0}),Vt,It;gt==="fast"?(Vt=X?function(an){return J-1-an}:h.identity,It=tt?function(an){return ut-1-an}:h.identity):(Vt=function(an){return h.constrain(Math.round(s.c2p(O[an])-V),0,wt)},It=function(an){return h.constrain(Math.round(L.c2p(H[an])-$),0,Rt)});var re=It(0),Kt=[re,re],$t=X?0:1,le=tt?0:1,he=0,de=0,xe=0,Se=0,ne,zt,Xt,Jt,Wt;function Ft(an,pn){if(an!==void 0){var gn=kt(an);return gn[0]=Math.round(gn[0]),gn[1]=Math.round(gn[1]),gn[2]=Math.round(gn[2]),he+=pn,de+=gn[0]*pn,xe+=gn[1]*pn,Se+=gn[2]*pn,gn}return[0,0,0,0]}function xt(an,pn,gn,_n){var kn=an[gn.bin0];if(kn===void 0)return Ft(void 0,1);var ni=an[gn.bin1],ci=pn[gn.bin0],di=pn[gn.bin1],li=ni-kn||0,ri=ci-kn||0,wr;return ni===void 0?di===void 0?wr=0:ci===void 0?wr=2*(di-kn):wr=(2*di-ci-kn)*2/3:di===void 0?ci===void 0?wr=0:wr=(2*kn-ni-ci)*2/3:ci===void 0?wr=(2*di-ni-kn)*2/3:wr=di+kn-ni-ci,Ft(kn+gn.frac*li+_n.frac*(ri+gn.frac*wr))}if(gt!=="default"){var yt=0,Et;try{Et=new Uint8Array(mt*Lt*4)}catch{Et=new Array(mt*Lt*4)}if(gt==="smooth"){var Mt=Y||O,Nt=j||H,jt=new Array(Mt.length),ie=new Array(Nt.length),me=new Array(wt),be=Y?w:d,ve=j?w:d,Le,ce,Te;for(st=0;stvr||vr>L._length))for(nt=Ve;ntGt||Gt>s._length)){var Ne=r({x:Yt,y:hr},N,_._fullLayout);Ne.x=Yt,Ne.y=hr;var Oe=D.z[st][nt];Oe===void 0?(Ne.z="",Ne.zLabel=""):(Ne.z=Oe,Ne.zLabel=x.tickText(Ae,Oe,"hover").text);var Qe=D.text&&D.text[st]&&D.text[st][nt];(Qe===void 0||Qe===!1)&&(Qe=""),Ne.text=Qe;var er=h.texttemplateString(ge,Ne,_._fullLayout._d3locale,Ne,N._meta||{});if(er){var fr=er.split("
    "),rr=fr.length,He=0;for(ct=0;ct0&&(r=!0);for(var f=0;fh){var p=h-S[C];return S[C]=h,p}}else return S[C]=h,h;return 0},max:function(C,i,S,x){var h=x[i];if(g(h))if(h=Number(h),g(S[C])){if(S[C]E&&ES){var L=T===C?1:6,M=T===C?"M12":"M1";return function(z,D){var N=b.c2d(z,C,u),I=N.indexOf("-",L);I>0&&(N=N.substr(0,I));var k=b.d2c(N,0,u);if(kp?c>S?c>C*1.1?C:c>i*1.1?i:S:c>x?x:c>h?h:p:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function n(c,l,m,v,b,u){if(v&&c>S){var o=f(l,b,u),d=f(m,b,u),w=c===C?0:1;return o[w]!==d[w]}return Math.floor(m/c)-Math.floor(l/c)>.1}function f(c,l,m){var v=l.c2d(c,C,m).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}},35852:function(G,U,t){var g=t(38248),C=t(3400),i=t(24040),S=t(54460),x=t(84664),h=t(16964),p=t(10648),r=t(2e3),e=t(67712);function a(m,v){var b=[],u=[],o=v.orientation==="h",d=S.getFromId(m,o?v.yaxis:v.xaxis),w=o?"y":"x",A={x:"y",y:"x"}[w],_=v[w+"calendar"],y=v.cumulative,E,T=n(m,v,d,w),s=T[0],L=T[1],M=typeof s.size=="string",z=[],D=M?z:s,N=[],I=[],k=[],B=0,O=v.histnorm,H=v.histfunc,Y=O.indexOf("density")!==-1,j,et,it;y.enabled&&Y&&(O=O.replace(/ ?density$/,""),Y=!1);var ut=H==="max"||H==="min",J=ut?null:0,X=h.count,tt=p[O],V=!1,Q=function(Ut){return d.r2c(Ut,0,_)},ot;for(C.isArrayOrTypedArray(v[A])&&H!=="count"&&(ot=v[A],V=H==="avg",X=h[H]),E=Q(s.start),et=Q(s.end)+(E-S.tickIncrement(E,s.size,!1,_))/1e6;E=0&&it=mt;E--)if(u[E]){Lt=E;break}for(E=mt;E<=Lt;E++)if(g(b[E])&&g(u[E])){var Ht={p:b[E],s:u[E],b:0};y.enabled||(Ht.pts=k[E],nt?Ht.ph0=Ht.ph1=k[E].length?L[k[E][0]]:b[E]:(v._computePh=!0,Ht.ph0=Rt(z[E]),Ht.ph1=Rt(z[E+1],!0))),At.push(Ht)}return At.length===1&&(At[0].width1=S.tickIncrement(At[0].p,s.size,!1,_)-At[0].p),x(At,v),C.isArrayOrTypedArray(v.selectedpoints)&&C.tagSelected(At,v,Tt),At}function n(m,v,b,u,o){var d=u+"bins",w=m._fullLayout,A=v["_"+u+"bingroup"],_=w._histogramBinOpts[A],y=w.barmode==="overlay",E,T,s,L,M,z,D,N=function(wt){return b.r2c(wt,0,L)},I=function(wt){return b.c2r(wt,0,L)},k=b.type==="date"?function(wt){return wt||wt===0?C.cleanDate(wt,null,L):null}:function(wt){return g(wt)?Number(wt):null};function B(wt,Rt,bt){Rt[wt+"Found"]?(Rt[wt]=k(Rt[wt]),Rt[wt]===null&&(Rt[wt]=bt[wt])):(z[wt]=Rt[wt]=bt[wt],C.nestedProperty(T[0],d+"."+wt).set(bt[wt]))}if(v["_"+u+"autoBinFinished"])delete v["_"+u+"autoBinFinished"];else{T=_.traces;var O=[],H=!0,Y=!1,j=!1;for(E=0;E"u"){if(o)return[it,M,!0];it=f(m,v,b,u,d)}D=s.cumulative||{},D.enabled&&D.currentbin!=="include"&&(D.direction==="decreasing"?it.start=I(S.tickIncrement(N(it.start),it.size,!0,L)):it.end=I(S.tickIncrement(N(it.end),it.size,!1,L))),_.size=it.size,_.sizeFound||(z.size=it.size,C.nestedProperty(T[0],d+".size").set(it.size)),B("start",_,it),B("end",_,it)}M=v["_"+u+"pos0"],delete v["_"+u+"pos0"];var J=v._input[d]||{},X=C.extendFlat({},_),tt=_.start,V=b.r2l(J.start),Q=V!==void 0;if((_.startFound||Q)&&V!==b.r2l(tt)){var ot=Q?V:C.aggNums(Math.min,null,M),$={type:b.type==="category"||b.type==="multicategory"?"linear":b.type,r2l:b.r2l,dtick:_.size,tick0:tt,calendar:L,range:[ot,S.tickIncrement(ot,_.size,!1,L)].map(b.l2r)},Z=S.tickFirst($);Z>b.r2l(ot)&&(Z=S.tickIncrement(Z,_.size,!0,L)),X.start=b.l2r(Z),Q||C.nestedProperty(v,d+".start").set(X.start)}var st=_.end,nt=b.r2l(J.end),ct=nt!==void 0;if((_.endFound||ct)&&nt!==b.r2l(st)){var gt=ct?nt:C.aggNums(Math.max,null,M);X.end=b.l2r(gt),ct||C.nestedProperty(v,d+".start").set(X.end)}var Tt="autobin"+u;return v._input[Tt]===!1&&(v._input[d]=C.extendFlat({},v[d]||{}),delete v._input[Tt],delete v[Tt]),[X,M]}function f(m,v,b,u,o){var d=m._fullLayout,w=c(m,v),A=!1,_=1/0,y=[v],E,T,s;for(E=0;E=0;u--)A(u);else if(v==="increasing"){for(u=1;u=0;u--)m[u]+=m[u+1];b==="exclude"&&(m.push(0),m.shift())}}G.exports={calc:a,calcAllAutoBins:n}},73316:function(G){G.exports={eventDataKeys:["binNumber"]}},80536:function(G,U,t){var g=t(3400),C=t(79811),i=t(24040).traceIs,S=t(20011),x=t(31508).validateCornerradius,h=g.nestedProperty,p=t(71888).getAxisGroup,r=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],e=["x","y"];G.exports=function(n,f){var c=f._histogramBinOpts={},l=[],m={},v=[],b,u,o,d,w,A,_;function y(it,ut){return g.coerce(b._input,b,b._module.attributes,it,ut)}function E(it){return it.orientation==="v"?"x":"y"}function T(it,ut){var J=C.getFromTrace({_fullLayout:f},it,ut);return J.type}function s(it,ut,J){var X=it.uid+"__"+J;ut||(ut=X);var tt=T(it,J),V=it[J+"calendar"]||"",Q=c[ut],ot=!0;Q&&(tt===Q.axType&&V===Q.calendar?(ot=!1,Q.traces.push(it),Q.dirs.push(J)):(ut=X,tt!==Q.axType&&g.warn(["Attempted to group the bins of trace",it.index,"set on a","type:"+tt,"axis","with bins on","type:"+Q.axType,"axis."].join(" ")),V!==Q.calendar&&g.warn(["Attempted to group the bins of trace",it.index,"set with a",V,"calendar","with bins",Q.calendar?"on a "+Q.calendar+" calendar":"w/o a set calendar"].join(" ")))),ot&&(c[ut]={traces:[it],dirs:[J],axType:tt,calendar:it[J+"calendar"]||""}),it["_"+J+"bingroup"]=ut}for(w=0;wN&&L.splice(N,L.length-N),D.length>N&&D.splice(N,D.length-N);var I=[],k=[],B=[],O=typeof s.size=="string",H=typeof z.size=="string",Y=[],j=[],et=O?Y:s,it=H?j:z,ut=0,J=[],X=[],tt=c.histnorm,V=c.histfunc,Q=tt.indexOf("density")!==-1,ot=V==="max"||V==="min",$=ot?null:0,Z=i.count,st=S[tt],nt=!1,ct=[],gt=[],Tt="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Tt&&V!=="count"&&(nt=V==="avg",Z=i[V]);var wt=s.size,Rt=u(s.start),bt=u(s.end)+(Rt-C.tickIncrement(Rt,wt,!1,v))/1e6;for(A=Rt;A=0&&y=0&&E-1,flipY:k.tiling.flip.indexOf("y")>-1,orientation:k.tiling.orientation,pad:{inner:k.tiling.pad},maxDepth:k._maxDepth}),j=Y.descendants(),et=1/0,it=-1/0;j.forEach(function(V){var Q=V.depth;Q>=k._maxDepth?(V.x0=V.x1=(V.x0+V.x1)/2,V.y0=V.y1=(V.y0+V.y1)/2):(et=Math.min(et,Q),it=Math.max(it,Q))}),v=v.data(j,r.getPtId),k._maxVisibleLayers=isFinite(it)?it-et+1:0,v.enter().append("g").classed("slice",!0),T(v,n,z,[u,o],A),v.order();var ut=null;if(E&&M){var J=r.getPtId(M);v.each(function(V){ut===null&&r.getPtId(V)===J&&(ut={x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1})})}var X=function(){return ut||{x0:0,x1:u,y0:0,y1:o}},tt=v;return E&&(tt=tt.transition().each("end",function(){var V=g.select(this);r.setSliceCursor(V,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),tt.each(function(V){V._x0=d(V.x0),V._x1=d(V.x1),V._y0=w(V.y0),V._y1=w(V.y1),V._hoverX=d(V.x1-k.tiling.pad),V._hoverY=w(H?V.y1-k.tiling.pad/2:V.y0+k.tiling.pad/2);var Q=g.select(this),ot=C.ensureSingle(Q,"path","surface",function(nt){nt.style("pointer-events",D?"none":"all")});E?ot.transition().attrTween("d",function(nt){var ct=s(nt,n,X(),[u,o],{orientation:k.tiling.orientation,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1});return function(gt){return A(ct(gt))}}):ot.attr("d",A),Q.call(e,m,c,l,{styleOne:h,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),ot.call(h,V,k,c,{hovered:!1}),V.x0===V.x1||V.y0===V.y1?V._text="":V._text=a(V,m,k,l,N)||"";var $=C.ensureSingle(Q,"g","slicetext"),Z=C.ensureSingle($,"text","",function(nt){nt.attr("data-notex",1)}),st=C.ensureUniformFontSize(c,r.determineTextFont(k,V,N.font));Z.text(V._text||" ").classed("slicetext",!0).attr("text-anchor",O?"end":B?"start":"middle").call(i.font,st).call(S.convertToTspans,c),V.textBB=i.bBox(Z.node()),V.transform=_(V,{fontSize:st.size}),V.transform.fontSize=st.size,E?Z.transition().attrTween("transform",function(nt){var ct=L(nt,n,X(),[u,o]);return function(gt){return y(ct(gt))}}):Z.attr("transform",y(V))}),ut}},29044:function(G,U,t){G.exports={moduleType:"trace",name:"icicle",basePlotModule:t(59564),categories:[],animatable:!0,attributes:t(97376),layoutAttributes:t(90676),supplyDefaults:t(7045),supplyLayoutDefaults:t(4304),calc:t(73876).r,crossTraceCalc:t(73876).q,plot:t(38364),style:t(47192).style,colorbar:t(5528),meta:{}}},90676:function(G){G.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(G,U,t){var g=t(3400),C=t(90676);G.exports=function(S,x){function h(p,r){return g.coerce(S,x,C,p,r)}h("iciclecolorway",x.colorway),h("extendiciclecolors")}},25132:function(G,U,t){var g=t(74148),C=t(83024);G.exports=function(S,x,h){var p=h.flipX,r=h.flipY,e=h.orientation==="h",a=h.maxDepth,n=x[0],f=x[1];a&&(n=(S.height+1)*x[0]/Math.min(S.height+1,a),f=(S.height+1)*x[1]/Math.min(S.height+1,a));var c=g.partition().padding(h.pad.inner).size(e?[x[1],n]:[x[0],f])(S);return(e||p||r)&&C(c,x,{swapXY:e,flipX:p,flipY:r}),c}},38364:function(G,U,t){var g=t(95808),C=t(67880);G.exports=function(S,x,h,p){return g(S,x,h,p,{type:"icicle",drawDescendants:C})}},47192:function(G,U,t){var g=t(33428),C=t(76308),i=t(3400),S=t(82744).resizeText,x=t(60404);function h(r){var e=r._fullLayout._iciclelayer.selectAll(".trace");S(r,e,"icicle"),e.each(function(a){var n=g.select(this),f=a[0],c=f.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(l){g.select(this).call(p,l,c,r)})})}function p(r,e,a,n){var f=e.data.data,c=!e.children,l=f.i,m=i.castOption(a,l,"marker.line.color")||C.defaultLine,v=i.castOption(a,l,"marker.line.width")||0;r.call(x,e,a,n).style("stroke-width",v).call(C.stroke,m).style("opacity",c?a.leaf.opacity:null)}G.exports={style:h,styleOne:p}},95188:function(G,U,t){for(var g=t(45464),C=t(21776).Ks,i=t(92880).extendFlat,S=t(47797).colormodel,x=["rgb","rgba","rgba256","hsl","hsla"],h=[],p=[],r=0;r0||g.inbox(r-e.y0,r-(e.y0+e.h*a.dy),0)>0)){var c=Math.floor((p-e.x0)/a.dx),l=Math.floor(Math.abs(r-e.y0)/a.dy),m;if(a._hasZ?m=e.z[l][c]:a._hasSource&&(m=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,l,1,1).data),!!m){var v=e.hi||a.hoverinfo,b;if(v){var u=v.split("+");u.indexOf("all")!==-1&&(u=["color"]),u.indexOf("color")!==-1&&(b=!0)}var o=S.colormodel[a.colormodel],d=o.colormodel||a.colormodel,w=d.length,A=a._scaler(m),_=o.suffix,y=[];(a.hovertemplate||b)&&(y.push("["+[A[0]+_[0],A[1]+_[1],A[2]+_[2]].join(", ")),w===4&&y.push(", "+A[3]+_[3]),y.push("]"),y=y.join(""),h.extraText=d.toUpperCase()+": "+y);var E;i(a.hovertext)&&i(a.hovertext[l])?E=a.hovertext[l][c]:i(a.text)&&i(a.text[l])&&(E=a.text[l][c]);var T=f.c2p(e.y0+(l+.5)*a.dy),s=e.x0+(c+.5)*a.dx,L=e.y0+(l+.5)*a.dy,M="["+m.slice(0,a.colormodel.length).join(", ")+"]";return[C.extendFlat(h,{index:[l,c],x0:n.c2p(e.x0+c*a.dx),x1:n.c2p(e.x0+(c+1)*a.dx),y0:T,y1:T,color:A,xVal:s,xLabelVal:s,yVal:L,yLabelVal:L,zLabelVal:M,text:E,hovertemplateLabels:{zLabel:M,colorLabel:y,"color[0]Label":A[0]+_[0],"color[1]Label":A[1]+_[1],"color[2]Label":A[2]+_[2],"color[3]Label":A[3]+_[3]}})]}}}},48928:function(G,U,t){G.exports={attributes:t(95188),supplyDefaults:t(13188),calc:t(93336),plot:t(63715),style:t(28576),hoverPoints:t(24892),eventData:t(79972),moduleType:"trace",name:"image",basePlotModule:t(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(G,U,t){var g=t(33428),C=t(3400),i=C.strTranslate,S=t(9616),x=t(47797),h=t(9188),p=t(2264).STYLE;G.exports=function(e,a,n,f){var c=a.xaxis,l=a.yaxis,m=!e._context._exportedPlot&&h();C.makeTraceGroups(f,n,"im").each(function(v){var b=g.select(this),u=v[0],o=u.trace,d=(o.zsmooth==="fast"||o.zsmooth===!1&&m)&&!o._hasZ&&o._hasSource&&c.type==="linear"&&l.type==="linear";o._realImage=d;var w=u.z,A=u.x0,_=u.y0,y=u.w,E=u.h,T=o.dx,s=o.dy,L,M,z,D,N,I;for(I=0;L===void 0&&I0;)M=c.c2p(A+I*T),I--;for(I=0;D===void 0&&I0;)N=l.c2p(_+I*s),I--;if(MJ[0];if(X||tt){var V=L+B/2,Q=D+O/2;it+="transform:"+i(V+"px",Q+"px")+"scale("+(X?-1:1)+","+(tt?-1:1)+")"+i(-V+"px",-Q+"px")+";"}}et.attr("style",it);var ot=new Promise(function($){if(o._hasZ)$();else if(o._hasSource)if(o._canvas&&o._canvas.el.width===y&&o._canvas.el.height===E&&o._canvas.source===o.source)$();else{var Z=document.createElement("canvas");Z.width=y,Z.height=E;var st=Z.getContext("2d",{willReadFrequently:!0});o._image=o._image||new Image;var nt=o._image;nt.onload=function(){st.drawImage(nt,0,0),o._canvas={el:Z,source:o.source},$()},nt.setAttribute("src",o.source)}}).then(function(){var $,Z;if(o._hasZ)Z=j(function(ct,gt){var Tt=w[gt][ct];return C.isTypedArray(Tt)&&(Tt=Array.from(Tt)),Tt}),$=Z.toDataURL("image/png");else if(o._hasSource)if(d)$=o.source;else{var st=o._canvas.el.getContext("2d",{willReadFrequently:!0}),nt=st.getImageData(0,0,y,E).data;Z=j(function(ct,gt){var Tt=4*(gt*y+ct);return[nt[Tt],nt[Tt+1],nt[Tt+2],nt[Tt+3]]}),$=Z.toDataURL("image/png")}et.attr({"xlink:href":$,height:O,width:B,x:L,y:D})});e._promises.push(ot)})}},28576:function(G,U,t){var g=t(33428);G.exports=function(i){g.select(i).selectAll(".im image").style("opacity",function(S){return S[0].trace.opacity})}},89864:function(G,U,t){var g=t(92880).extendFlat,C=t(92880).extendDeep,i=t(67824).overrideAll,S=t(25376),x=t(22548),h=t(86968).u,p=t(94724),r=t(31780).templatedArray,e=t(48164),a=t(29736).descriptionOnlyNumbers,n=S({editType:"plot",colorEditType:"plot"}),f={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:x.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},c={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},l=r("step",C({},f,{range:c}));G.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:h({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:g({},n,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:a("value")},font:g({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:a("value")},increasing:{symbol:{valType:"string",dflt:e.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:e.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:e.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:e.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:g({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:C({},f,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:x.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:i({range:c,visible:g({},p.visible,{dflt:!0}),tickmode:p.minor.tickmode,nticks:p.nticks,tick0:p.tick0,dtick:p.dtick,tickvals:p.tickvals,ticktext:p.ticktext,ticks:g({},p.ticks,{dflt:"outside"}),ticklen:p.ticklen,tickwidth:p.tickwidth,tickcolor:p.tickcolor,ticklabelstep:p.ticklabelstep,showticklabels:p.showticklabels,labelalias:p.labelalias,tickfont:S({}),tickangle:p.tickangle,tickformat:p.tickformat,tickformatstops:p.tickformatstops,tickprefix:p.tickprefix,showtickprefix:p.showtickprefix,ticksuffix:p.ticksuffix,showticksuffix:p.showticksuffix,separatethousands:p.separatethousands,exponentformat:p.exponentformat,minexponent:p.minexponent,showexponent:p.showexponent,editType:"plot"},"plot"),steps:l,threshold:{line:{color:g({},f.line.color,{}),width:g({},f.line.width,{dflt:1}),editType:"plot"},thickness:g({},f.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},92728:function(G,U,t){var g=t(7316);U.name="indicator",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},79136:function(G){function U(t,g){var C=[],i=g.value;typeof g._lastValue!="number"&&(g._lastValue=g.value);var S=g._lastValue,x=S;return g._hasDelta&&typeof g.delta.reference=="number"&&(x=g.delta.reference),C[0]={y:i,lastY:S,delta:i-x,relativeDelta:(i-x)/x},C}G.exports={calc:U}},12096:function(G){G.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},20424:function(G,U,t){var g=t(3400),C=t(89864),i=t(86968).Q,S=t(31780),x=t(51272),h=t(12096),p=t(26332),r=t(25404),e=t(95936),a=t(42568);function n(c,l,m,v){function b(N,I){return g.coerce(c,l,C,N,I)}i(l,v,b),b("mode"),l._hasNumber=l.mode.indexOf("number")!==-1,l._hasDelta=l.mode.indexOf("delta")!==-1,l._hasGauge=l.mode.indexOf("gauge")!==-1;var u=b("value");l._range=[0,typeof u=="number"?1.5*u:1];var o=new Array(2),d;l._hasNumber&&(b("number.valueformat"),b("number.font.color",v.font.color),b("number.font.family",v.font.family),b("number.font.size"),l.number.font.size===void 0&&(l.number.font.size=h.defaultNumberFontSize,o[0]=!0),b("number.prefix"),b("number.suffix"),d=l.number.font.size);var w;l._hasDelta&&(b("delta.font.color",v.font.color),b("delta.font.family",v.font.family),b("delta.font.size"),l.delta.font.size===void 0&&(l.delta.font.size=(l._hasNumber?.5:1)*(d||h.defaultNumberFontSize),o[1]=!0),b("delta.reference",l.value),b("delta.relative"),b("delta.valueformat",l.delta.relative?"2%":""),b("delta.increasing.symbol"),b("delta.increasing.color"),b("delta.decreasing.symbol"),b("delta.decreasing.color"),b("delta.position"),b("delta.prefix"),b("delta.suffix"),w=l.delta.font.size),l._scaleNumbers=(!l._hasNumber||o[0])&&(!l._hasDelta||o[1])||!1,b("title.font.color",v.font.color),b("title.font.family",v.font.family),b("title.font.size",.25*(d||w||h.defaultNumberFontSize)),b("title.text");var A,_,y,E;function T(N,I){return g.coerce(A,_,C.gauge,N,I)}function s(N,I){return g.coerce(y,E,C.gauge.axis,N,I)}if(l._hasGauge){A=c.gauge,A||(A={}),_=S.newContainer(l,"gauge"),T("shape");var L=l._isBullet=l.gauge.shape==="bullet";L||b("title.align","center");var M=l._isAngular=l.gauge.shape==="angular";M||b("align","center"),T("bgcolor",v.paper_bgcolor),T("borderwidth"),T("bordercolor"),T("bar.color"),T("bar.line.color"),T("bar.line.width");var z=h.valueThickness*(l.gauge.shape==="bullet"?.5:1);T("bar.thickness",z),x(A,_,{name:"steps",handleItemDefaults:f}),T("threshold.value"),T("threshold.thickness"),T("threshold.line.width"),T("threshold.line.color"),y={},A&&(y=A.axis||{}),E=S.newContainer(_,"axis"),s("visible"),l._range=s("range",l._range);var D={noAutotickangles:!0,outerTicks:!0};p(y,E,s,"linear"),a(y,E,s,"linear",D),e(y,E,s,"linear",D),r(y,E,s,D)}else b("title.align","center"),b("align","center"),l._isAngular=l._isBullet=!1;l._length=null}function f(c,l){function m(v,b){return g.coerce(c,l,C.gauge.steps,v,b)}m("color"),m("line.color"),m("line.width"),m("range"),m("thickness")}G.exports={supplyDefaults:n}},43480:function(G,U,t){G.exports={moduleType:"trace",name:"indicator",basePlotModule:t(92728),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:t(89864),supplyDefaults:t(20424).supplyDefaults,calc:t(79136).calc,plot:t(97864),meta:{}}},97864:function(G,U,t){var g=t(33428),C=t(67756).qy,i=t(67756).Gz,S=t(3400),x=S.strScale,h=S.strTranslate,p=S.rad2deg,r=t(84284).MID_SHIFT,e=t(43616),a=t(12096),n=t(72736),f=t(54460),c=t(28336),l=t(37668),m=t(94724),v=t(76308),b={left:"start",center:"middle",right:"end"},u={left:0,center:.5,right:1},o=/[yzafpnµmkMGTPEZY]/;function d(D){return D&&D.duration>0}G.exports=function(N,I,k,B){var O=N._fullLayout,H;d(k)&&B&&(H=B()),S.makeTraceGroups(O._indicatorlayer,I,"trace").each(function(Y){var j=Y[0],et=j.trace,it=g.select(this),ut=et._hasGauge,J=et._isAngular,X=et._isBullet,tt=et.domain,V={w:O._size.w*(tt.x[1]-tt.x[0]),h:O._size.h*(tt.y[1]-tt.y[0]),l:O._size.l+O._size.w*tt.x[0],r:O._size.r+O._size.w*(1-tt.x[1]),t:O._size.t+O._size.h*(1-tt.y[1]),b:O._size.b+O._size.h*tt.y[0]},Q=V.l+V.w/2,ot=V.t+V.h/2,$=Math.min(V.w/2,V.h),Z=a.innerRadius*$,st,nt,ct,gt=et.align||"center";if(nt=ot,!ut)st=V.l+u[gt]*V.w,ct=function(kt){return s(kt,V.w,V.h)};else if(J&&(st=Q,nt=ot+$/2,ct=function(kt){return L(kt,.9*Z)}),X){var Tt=a.bulletPadding,wt=1-a.bulletNumberDomainSize+Tt;st=V.l+(wt+(1-wt)*u[gt])*V.w,ct=function(kt){return s(kt,(a.bulletNumberDomainSize-Tt)*V.w,V.h)}}_(N,it,Y,{numbersX:st,numbersY:nt,numbersScaler:ct,transitionOpts:k,onComplete:H});var Rt,bt;ut&&(Rt={range:et.gauge.axis.range,color:et.gauge.bgcolor,line:{color:et.gauge.bordercolor,width:0},thickness:1},bt={range:et.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:et.gauge.bordercolor,width:et.gauge.borderwidth},thickness:1});var At=it.selectAll("g.angular").data(J?Y:[]);At.exit().remove();var mt=it.selectAll("g.angularaxis").data(J?Y:[]);mt.exit().remove(),J&&A(N,it,Y,{radius:$,innerRadius:Z,gauge:At,layer:mt,size:V,gaugeBg:Rt,gaugeOutline:bt,transitionOpts:k,onComplete:H});var Lt=it.selectAll("g.bullet").data(X?Y:[]);Lt.exit().remove();var Ht=it.selectAll("g.bulletaxis").data(X?Y:[]);Ht.exit().remove(),X&&w(N,it,Y,{gauge:Lt,layer:Ht,size:V,gaugeBg:Rt,gaugeOutline:bt,transitionOpts:k,onComplete:H});var Ut=it.selectAll("text.title").data(Y);Ut.exit().remove(),Ut.enter().append("text").classed("title",!0),Ut.attr("text-anchor",function(){return X?b.right:b[et.title.align]}).text(et.title.text).call(e.font,et.title.font).call(n.convertToTspans,N),Ut.attr("transform",function(){var kt=V.l+V.w*u[et.title.align],Vt,It=a.titlePadding,re=e.bBox(Ut.node());if(ut){if(J)if(et.gauge.axis.visible){var Kt=e.bBox(mt.node());Vt=Kt.top-It-re.bottom}else Vt=V.t+V.h/2-$/2-re.bottom-It;X&&(Vt=nt-(re.top+re.bottom)/2,kt=V.l-a.bulletPadding*V.w)}else Vt=et._numbersTop-It-re.bottom;return h(kt,Vt)})})};function w(D,N,I,k){var B=I[0].trace,O=k.gauge,H=k.layer,Y=k.gaugeBg,j=k.gaugeOutline,et=k.size,it=B.domain,ut=k.transitionOpts,J=k.onComplete,X,tt,V,Q,ot;O.enter().append("g").classed("bullet",!0),O.attr("transform",h(et.l,et.t)),H.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),H.selectAll("g.xbulletaxistick,path,text").remove();var $=et.h,Z=B.gauge.bar.thickness*$,st=it.x[0],nt=it.x[0]+(it.x[1]-it.x[0])*(B._hasNumber||B._hasDelta?1-a.bulletNumberDomainSize:1);X=T(D,B.gauge.axis),X._id="xbulletaxis",X.domain=[st,nt],X.setScale(),tt=f.calcTicks(X),V=f.makeTransTickFn(X),Q=f.getTickSigns(X)[2],ot=et.t+et.h,X.visible&&(f.drawTicks(D,X,{vals:X.ticks==="inside"?f.clipEnds(X,tt):tt,layer:H,path:f.makeTickPath(X,ot,Q),transFn:V}),f.drawLabels(D,X,{vals:tt,layer:H,transFn:V,labelFns:f.makeLabelFns(X,ot)}));function ct(mt){mt.attr("width",function(Lt){return Math.max(0,X.c2p(Lt.range[1])-X.c2p(Lt.range[0]))}).attr("x",function(Lt){return X.c2p(Lt.range[0])}).attr("y",function(Lt){return .5*(1-Lt.thickness)*$}).attr("height",function(Lt){return Lt.thickness*$})}var gt=[Y].concat(B.gauge.steps),Tt=O.selectAll("g.bg-bullet").data(gt);Tt.enter().append("g").classed("bg-bullet",!0).append("rect"),Tt.select("rect").call(ct).call(y),Tt.exit().remove();var wt=O.selectAll("g.value-bullet").data([B.gauge.bar]);wt.enter().append("g").classed("value-bullet",!0).append("rect"),wt.select("rect").attr("height",Z).attr("y",($-Z)/2).call(y),d(ut)?wt.select("rect").transition().duration(ut.duration).ease(ut.easing).each("end",function(){J&&J()}).each("interrupt",function(){J&&J()}).attr("width",Math.max(0,X.c2p(Math.min(B.gauge.axis.range[1],I[0].y)))):wt.select("rect").attr("width",typeof I[0].y=="number"?Math.max(0,X.c2p(Math.min(B.gauge.axis.range[1],I[0].y))):0),wt.exit().remove();var Rt=I.filter(function(){return B.gauge.threshold.value||B.gauge.threshold.value===0}),bt=O.selectAll("g.threshold-bullet").data(Rt);bt.enter().append("g").classed("threshold-bullet",!0).append("line"),bt.select("line").attr("x1",X.c2p(B.gauge.threshold.value)).attr("x2",X.c2p(B.gauge.threshold.value)).attr("y1",(1-B.gauge.threshold.thickness)/2*$).attr("y2",(1-(1-B.gauge.threshold.thickness)/2)*$).call(v.stroke,B.gauge.threshold.line.color).style("stroke-width",B.gauge.threshold.line.width),bt.exit().remove();var At=O.selectAll("g.gauge-outline").data([j]);At.enter().append("g").classed("gauge-outline",!0).append("rect"),At.select("rect").call(ct).call(y),At.exit().remove()}function A(D,N,I,k){var B=I[0].trace,O=k.size,H=k.radius,Y=k.innerRadius,j=k.gaugeBg,et=k.gaugeOutline,it=[O.l+O.w/2,O.t+O.h/2+H/2],ut=k.gauge,J=k.layer,X=k.transitionOpts,tt=k.onComplete,V=Math.PI/2;function Q($t){var le=B.gauge.axis.range[0],he=B.gauge.axis.range[1],de=($t-le)/(he-le)*Math.PI-V;return de<-V?-V:de>V?V:de}function ot($t){return g.svg.arc().innerRadius((Y+H)/2-$t/2*(H-Y)).outerRadius((Y+H)/2+$t/2*(H-Y)).startAngle(-V)}function $($t){$t.attr("d",function(le){return ot(le.thickness).startAngle(Q(le.range[0])).endAngle(Q(le.range[1]))()})}var Z,st,nt,ct;ut.enter().append("g").classed("angular",!0),ut.attr("transform",h(it[0],it[1])),J.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),J.selectAll("g.xangularaxistick,path,text").remove(),Z=T(D,B.gauge.axis),Z.type="linear",Z.range=B.gauge.axis.range,Z._id="xangularaxis",Z.ticklabeloverflow="allow",Z.setScale();var gt=function($t){return(Z.range[0]-$t.x)/(Z.range[1]-Z.range[0])*Math.PI+Math.PI},Tt={},wt=f.makeLabelFns(Z,0),Rt=wt.labelStandoff;Tt.xFn=function($t){var le=gt($t);return Math.cos(le)*Rt},Tt.yFn=function($t){var le=gt($t),he=Math.sin(le)>0?.2:1;return-Math.sin(le)*(Rt+$t.fontSize*he)+Math.abs(Math.cos(le))*($t.fontSize*r)},Tt.anchorFn=function($t){var le=gt($t),he=Math.cos(le);return Math.abs(he)<.1?"middle":he>0?"start":"end"},Tt.heightFn=function($t,le,he){var de=gt($t);return-.5*(1+Math.sin(de))*he};var bt=function($t){return h(it[0]+H*Math.cos($t),it[1]-H*Math.sin($t))};nt=function($t){return bt(gt($t))};var At=function($t){var le=gt($t);return bt(le)+"rotate("+-p(le)+")"};if(st=f.calcTicks(Z),ct=f.getTickSigns(Z)[2],Z.visible){ct=Z.ticks==="inside"?-1:1;var mt=(Z.linewidth||1)/2;f.drawTicks(D,Z,{vals:st,layer:J,path:"M"+ct*mt+",0h"+ct*Z.ticklen,transFn:At}),f.drawLabels(D,Z,{vals:st,layer:J,transFn:nt,labelFns:Tt})}var Lt=[j].concat(B.gauge.steps),Ht=ut.selectAll("g.bg-arc").data(Lt);Ht.enter().append("g").classed("bg-arc",!0).append("path"),Ht.select("path").call($).call(y),Ht.exit().remove();var Ut=ot(B.gauge.bar.thickness),kt=ut.selectAll("g.value-arc").data([B.gauge.bar]);kt.enter().append("g").classed("value-arc",!0).append("path");var Vt=kt.select("path");d(X)?(Vt.transition().duration(X.duration).ease(X.easing).each("end",function(){tt&&tt()}).each("interrupt",function(){tt&&tt()}).attrTween("d",E(Ut,Q(I[0].lastY),Q(I[0].y))),B._lastValue=I[0].y):Vt.attr("d",typeof I[0].y=="number"?Ut.endAngle(Q(I[0].y)):"M0,0Z"),Vt.call(y),kt.exit().remove(),Lt=[];var It=B.gauge.threshold.value;(It||It===0)&&Lt.push({range:[It,It],color:B.gauge.threshold.color,line:{color:B.gauge.threshold.line.color,width:B.gauge.threshold.line.width},thickness:B.gauge.threshold.thickness});var re=ut.selectAll("g.threshold-arc").data(Lt);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call($).call(y),re.exit().remove();var Kt=ut.selectAll("g.gauge-outline").data([et]);Kt.enter().append("g").classed("gauge-outline",!0).append("path"),Kt.select("path").call($).call(y),Kt.exit().remove()}function _(D,N,I,k){var B=I[0].trace,O=k.numbersX,H=k.numbersY,Y=B.align||"center",j=b[Y],et=k.transitionOpts,it=k.onComplete,ut=S.ensureSingle(N,"g","numbers"),J,X,tt,V=[];B._hasNumber&&V.push("number"),B._hasDelta&&(V.push("delta"),B.delta.position==="left"&&V.reverse());var Q=ut.selectAll("text").data(V);Q.enter().append("text"),Q.attr("text-anchor",function(){return j}).attr("class",function(bt){return bt}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Q.exit().remove();function ot(bt,At,mt,Lt){if(bt.match("s")&&mt>=0!=Lt>=0&&!At(mt).slice(-1).match(o)&&!At(Lt).slice(-1).match(o)){var Ht=bt.slice().replace("s","f").replace(/\d+/,function(kt){return parseInt(kt)-1}),Ut=T(D,{tickformat:Ht});return function(kt){return Math.abs(kt)<1?f.tickText(Ut,kt).text:At(kt)}}else return At}function $(){var bt=T(D,{tickformat:B.number.valueformat},B._range);bt.setScale(),f.prepTicks(bt);var At=function(kt){return f.tickText(bt,kt).text},mt=B.number.suffix,Lt=B.number.prefix,Ht=ut.select("text.number");function Ut(){var kt=typeof I[0].y=="number"?Lt+At(I[0].y)+mt:"-";Ht.text(kt).call(e.font,B.number.font).call(n.convertToTspans,D)}return d(et)?Ht.transition().duration(et.duration).ease(et.easing).each("end",function(){Ut(),it&&it()}).each("interrupt",function(){Ut(),it&&it()}).attrTween("text",function(){var kt=g.select(this),Vt=i(I[0].lastY,I[0].y);B._lastValue=I[0].y;var It=ot(B.number.valueformat,At,I[0].lastY,I[0].y);return function(re){kt.text(Lt+It(Vt(re))+mt)}}):Ut(),J=M(Lt+At(I[0].y)+mt,B.number.font,j,D),Ht}function Z(){var bt=T(D,{tickformat:B.delta.valueformat},B._range);bt.setScale(),f.prepTicks(bt);var At=function(re){return f.tickText(bt,re).text},mt=B.delta.suffix,Lt=B.delta.prefix,Ht=function(re){var Kt=B.delta.relative?re.relativeDelta:re.delta;return Kt},Ut=function(re,Kt){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?B.delta.increasing.symbol:B.delta.decreasing.symbol)+Lt+Kt(re)+mt},kt=function(re){return re.delta>=0?B.delta.increasing.color:B.delta.decreasing.color};B._deltaLastValue===void 0&&(B._deltaLastValue=Ht(I[0]));var Vt=ut.select("text.delta");Vt.call(e.font,B.delta.font).call(v.fill,kt({delta:B._deltaLastValue}));function It(){Vt.text(Ut(Ht(I[0]),At)).call(v.fill,kt(I[0])).call(n.convertToTspans,D)}return d(et)?Vt.transition().duration(et.duration).ease(et.easing).tween("text",function(){var re=g.select(this),Kt=Ht(I[0]),$t=B._deltaLastValue,le=ot(B.delta.valueformat,At,$t,Kt),he=i($t,Kt);return B._deltaLastValue=Kt,function(de){re.text(Ut(he(de),le)),re.call(v.fill,kt({delta:he(de)}))}}).each("end",function(){It(),it&&it()}).each("interrupt",function(){It(),it&&it()}):It(),X=M(Ut(Ht(I[0]),At),B.delta.font,j,D),Vt}var st=B.mode+B.align,nt;if(B._hasDelta&&(nt=Z(),st+=B.delta.position+B.delta.font.size+B.delta.font.family+B.delta.valueformat,st+=B.delta.increasing.symbol+B.delta.decreasing.symbol,tt=X),B._hasNumber&&($(),st+=B.number.font.size+B.number.font.family+B.number.valueformat+B.number.suffix+B.number.prefix,tt=J),B._hasDelta&&B._hasNumber){var ct=[(J.left+J.right)/2,(J.top+J.bottom)/2],gt=[(X.left+X.right)/2,(X.top+X.bottom)/2],Tt,wt,Rt=.75*B.delta.font.size;B.delta.position==="left"&&(Tt=z(B,"deltaPos",0,-1*(J.width*u[B.align]+X.width*(1-u[B.align])+Rt),st,Math.min),wt=ct[1]-gt[1],tt={width:J.width+X.width+Rt,height:Math.max(J.height,X.height),left:X.left+Tt,right:J.right,top:Math.min(J.top,X.top+wt),bottom:Math.max(J.bottom,X.bottom+wt)}),B.delta.position==="right"&&(Tt=z(B,"deltaPos",0,J.width*(1-u[B.align])+X.width*u[B.align]+Rt,st,Math.max),wt=ct[1]-gt[1],tt={width:J.width+X.width+Rt,height:Math.max(J.height,X.height),left:J.left,right:X.right+Tt,top:Math.min(J.top,X.top+wt),bottom:Math.max(J.bottom,X.bottom+wt)}),B.delta.position==="bottom"&&(Tt=null,wt=X.height,tt={width:Math.max(J.width,X.width),height:J.height+X.height,left:Math.min(J.left,X.left),right:Math.max(J.right,X.right),top:J.bottom-J.height,bottom:J.bottom+X.height}),B.delta.position==="top"&&(Tt=null,wt=J.top,tt={width:Math.max(J.width,X.width),height:J.height+X.height,left:Math.min(J.left,X.left),right:Math.max(J.right,X.right),top:J.bottom-J.height-X.height,bottom:J.bottom}),nt.attr({dx:Tt,dy:wt})}(B._hasNumber||B._hasDelta)&&ut.attr("transform",function(){var bt=k.numbersScaler(tt);st+=bt[2];var At=z(B,"numbersScale",1,bt[0],st,Math.min),mt;B._scaleNumbers||(At=1),B._isAngular?mt=H-At*tt.bottom:mt=H-At*(tt.top+tt.bottom)/2,B._numbersTop=At*tt.top+mt;var Lt=tt[Y];Y==="center"&&(Lt=(tt.left+tt.right)/2);var Ht=O-At*Lt;return Ht=z(B,"numbersTranslate",0,Ht,st,Math.max),h(Ht,mt)+x(At)})}function y(D){D.each(function(N){v.stroke(g.select(this),N.line.color)}).each(function(N){v.fill(g.select(this),N.color)}).style("stroke-width",function(N){return N.line.width})}function E(D,N,I){return function(){var k=C(N,I);return function(B){return D.endAngle(k(B))()}}}function T(D,N,I){var k=D._fullLayout,B=S.extendFlat({type:"linear",ticks:"outside",range:I,showline:!0},N),O={type:"linear",_id:"x"+N._id},H={letter:"x",font:k.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function Y(j,et){return S.coerce(B,O,m,j,et)}return c(B,O,Y,H,k),l(B,O,Y,H),O}function s(D,N,I){var k=Math.min(N/D.width,I/D.height);return[k,D,N+"x"+I]}function L(D,N){var I=Math.sqrt(D.width/2*(D.width/2)+D.height*D.height),k=N/I;return[k,D,N]}function M(D,N,I,k){var B=document.createElementNS("http://www.w3.org/2000/svg","text"),O=g.select(B);return O.text(D).attr("x",0).attr("y",0).attr("text-anchor",I).attr("data-unformatted",D).call(n.convertToTspans,k).call(e.font,N),e.bBox(O.node())}function z(D,N,I,k,B,O){var H="_cache"+N;D[H]&&D[H].key===B||(D[H]={key:B,value:I});var Y=S.aggNums(O,null,[D[H].value,k],2);return D[H].value=Y,Y}},50048:function(G,U,t){var g=t(49084),C=t(29736).axisHoverFormat,i=t(21776).Ks,S=t(52948),x=t(45464),h=t(92880).extendFlat,p=t(67824).overrideAll;function r(n){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function e(n){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var a=G.exports=p(h({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:r(),y:r(),z:r()},caps:{x:e(),y:e(),z:e()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:i(),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),valuehoverformat:C("value",1),showlegend:h({},x.showlegend,{dflt:!1})},g("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:S.opacity,lightposition:S.lightposition,lighting:S.lighting,flatshading:S.flatshading,contour:S.contour,hoverinfo:h({},x.hoverinfo)}),"calc","nested");a.flatshading.dflt=!0,a.lighting.facenormalsepsilon.dflt=0,a.x.editType=a.y.editType=a.z.editType=a.value.editType="calc+clearAxisTypes",a.transforms=void 0},62624:function(G,U,t){var g=t(47128),C=t(3832).processGrid,i=t(3832).filter;G.exports=function(x,h){h._len=Math.min(h.x.length,h.y.length,h.z.length,h.value.length),h._x=i(h.x,h._len),h._y=i(h.y,h._len),h._z=i(h.z,h._len),h._value=i(h.value,h._len);var p=C(h);h._gridFill=p.fill,h._Xs=p.Xs,h._Ys=p.Ys,h._Zs=p.Zs,h._len=p.len;for(var r=1/0,e=-1/0,a=0;a0;m--){var v=Math.min(l[m],l[m-1]),b=Math.max(l[m],l[m-1]);if(b>v&&v-1}function Z(Jt,Wt){return Jt===null?Wt:Jt}function st(Jt,Wt,Ft){et();var xt=[Wt],yt=[Ft];if(V>=1)xt=[Wt],yt=[Ft];else if(V>0){var Et=ot(Wt,Ft);xt=Et.xyzv,yt=Et.abc}for(var Mt=0;Mt-1?Ft[jt]:j(ie,me,be);Le>-1?Nt[jt]=Le:Nt[jt]=ut(ie,me,be,Z(Jt,ve))}J(Nt[0],Nt[1],Nt[2])}}function nt(Jt,Wt,Ft){var xt=function(yt,Et,Mt){st(Jt,[Wt[yt],Wt[Et],Wt[Mt]],[Ft[yt],Ft[Et],Ft[Mt]])};xt(0,1,2),xt(2,3,0)}function ct(Jt,Wt,Ft){var xt=function(yt,Et,Mt){st(Jt,[Wt[yt],Wt[Et],Wt[Mt]],[Ft[yt],Ft[Et],Ft[Mt]])};xt(0,1,2),xt(3,0,1),xt(2,3,0),xt(1,2,3)}function gt(Jt,Wt,Ft,xt){var yt=Jt[3];ytxt&&(yt=xt);for(var Et=(Jt[3]-yt)/(Jt[3]-Wt[3]+1e-9),Mt=[],Nt=0;Nt<4;Nt++)Mt[Nt]=(1-Et)*Jt[Nt]+Et*Wt[Nt];return Mt}function Tt(Jt,Wt,Ft){return Jt>=Wt&&Jt<=Ft}function wt(Jt){var Wt=.001*(k-I);return Jt>=I-Wt&&Jt<=k+Wt}function Rt(Jt){for(var Wt=[],Ft=0;Ft<4;Ft++){var xt=Jt[Ft];Wt.push([c._x[xt],c._y[xt],c._z[xt],c._value[xt]])}return Wt}var bt=3;function At(Jt,Wt,Ft,xt,yt,Et){Et||(Et=1),Ft=[-1,-1,-1];var Mt=!1,Nt=[Tt(Wt[0][3],xt,yt),Tt(Wt[1][3],xt,yt),Tt(Wt[2][3],xt,yt)];if(!Nt[0]&&!Nt[1]&&!Nt[2])return!1;var jt=function(me,be,ve){return wt(be[0][3])&&wt(be[1][3])&&wt(be[2][3])?(st(me,be,ve),!0):EtNt?[D,Et]:[Et,N];he(Wt,jt[0],jt[1])}}var ie=[[Math.min(I,N),Math.max(I,N)],[Math.min(D,k),Math.max(D,k)]];["x","y","z"].forEach(function(me){for(var be=[],ve=0;ve0&&(pe.push(or.id),me==="x"?Xe.push([or.distRatio,0,0]):me==="y"?Xe.push([0,or.distRatio,0]):Xe.push([0,0,or.distRatio]))}else me==="x"?ir=ne(1,T-1):me==="y"?ir=ne(1,s-1):ir=ne(1,L-1);pe.length>0&&(me==="x"?be[Le]=de(Jt,pe,ce,Te,Xe,be[Le]):me==="y"?be[Le]=xe(Jt,pe,ce,Te,Xe,be[Le]):be[Le]=Se(Jt,pe,ce,Te,Xe,be[Le]),Le++),ir.length>0&&(me==="x"?be[Le]=It(Jt,ir,ce,Te,be[Le]):me==="y"?be[Le]=re(Jt,ir,ce,Te,be[Le]):be[Le]=Kt(Jt,ir,ce,Te,be[Le]),Le++)}var $e=c.caps[me];$e.show&&$e.fill&&(Q($e.fill),me==="x"?be[Le]=It(Jt,[0,T-1],ce,Te,be[Le]):me==="y"?be[Le]=re(Jt,[0,s-1],ce,Te,be[Le]):be[Le]=Kt(Jt,[0,L-1],ce,Te,be[Le]),Le++)}}),d===0&&it(),c._meshX=B,c._meshY=O,c._meshZ=H,c._meshIntensity=Y,c._Xs=_,c._Ys=y,c._Zs=E}return Xt(),c}function f(c,l){var m=c.glplot.gl,v=g({gl:m}),b=new r(c,v,l.uid);return v._trace=b,b.update(l),c.glplot.add(v),b}G.exports={findNearestOnAxis:p,generateIsoMeshes:n,createIsosurfaceTrace:f}},70548:function(G,U,t){var g=t(3400),C=t(24040),i=t(50048),S=t(27260);function x(p,r,e,a){function n(f,c){return g.coerce(p,r,i,f,c)}h(p,r,e,a,n)}function h(p,r,e,a,n){var f=n("isomin"),c=n("isomax");c!=null&&f!==void 0&&f!==null&&f>c&&(r.isomin=null,r.isomax=null);var l=n("x"),m=n("y"),v=n("z"),b=n("value");if(!l||!l.length||!m||!m.length||!v||!v.length||!b||!b.length){r.visible=!1;return}var u=C.getComponentMethod("calendars","handleTraceDefaults");u(p,r,["x","y","z"],a),n("valuehoverformat"),["x","y","z"].forEach(function(A){n(A+"hoverformat");var _="caps."+A,y=n(_+".show");y&&n(_+".fill");var E="slices."+A,T=n(E+".show");T&&(n(E+".fill"),n(E+".locations"))});var o=n("spaceframe.show");o&&n("spaceframe.fill");var d=n("surface.show");d&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var w=n("contour.show");w&&(n("contour.color"),n("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(A){n(A)}),S(p,r,a,n,{prefix:"",cLetter:"c"}),r._length=null}G.exports={supplyDefaults:x,supplyIsoDefaults:h}},6296:function(G,U,t){G.exports={attributes:t(50048),supplyDefaults:t(70548).supplyDefaults,calc:t(62624),colorbar:{min:"cmin",max:"cmax"},plot:t(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:t(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(G,U,t){var g=t(49084),C=t(29736).axisHoverFormat,i=t(21776).Ks,S=t(16716),x=t(45464),h=t(92880).extendFlat;G.exports=h({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"}),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},g("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:S.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:h({},S.contours.x.show,{}),color:S.contours.x.color,width:S.contours.x.width,editType:"calc"},lightposition:{x:h({},S.lightposition.x,{dflt:1e5}),y:h({},S.lightposition.y,{dflt:1e5}),z:h({},S.lightposition.z,{dflt:0}),editType:"calc"},lighting:h({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},S.lighting),hoverinfo:h({},x.hoverinfo,{editType:"calc"}),showlegend:h({},x.showlegend,{dflt:!1})})},1876:function(G,U,t){var g=t(47128);G.exports=function(i,S){S.intensity&&g(i,S,{vals:S.intensity,containerStr:"",cLetter:"c"})}},576:function(G,U,t){var g=t(67792).gl_mesh3d,C=t(67792).delaunay_triangulate,i=t(67792).alpha_shape,S=t(67792).convex_hull,x=t(33040).parseColorScale,h=t(3400).isArrayOrTypedArray,p=t(43080),r=t(8932).extractOpts,e=t(52094);function a(u,o,d){this.scene=u,this.uid=d,this.mesh=o,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var n=a.prototype;n.handlePick=function(u){if(u.object===this.mesh){var o=u.index=u.data.index;u.data._cellCenter?u.traceCoordinate=u.data.dataCoordinate:u.traceCoordinate=[this.data.x[o],this.data.y[o],this.data.z[o]];var d=this.data.hovertext||this.data.text;return h(d)&&d[o]!==void 0?u.textLabel=d[o]:d&&(u.textLabel=d),!0}};function f(u){for(var o=[],d=u.length,w=0;w=o-.5)return!1;return!0}n.update=function(u){var o=this.scene,d=o.fullSceneLayout;this.data=u;var w=u.x.length,A=e(c(d.xaxis,u.x,o.dataScale[0],u.xcalendar),c(d.yaxis,u.y,o.dataScale[1],u.ycalendar),c(d.zaxis,u.z,o.dataScale[2],u.zcalendar)),_;if(u.i&&u.j&&u.k){if(u.i.length!==u.j.length||u.j.length!==u.k.length||!v(u.i,w)||!v(u.j,w)||!v(u.k,w))return;_=e(l(u.i),l(u.j),l(u.k))}else u.alphahull===0?_=S(A):u.alphahull>0?_=i(u.alphahull,A):_=m(u.delaunayaxis,A);var y={positions:A,cells:_,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:p(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading};if(u.intensity){var E=r(u);this.color="#fff";var T=u.intensitymode;y[T+"Intensity"]=u.intensity,y[T+"IntensityBounds"]=[E.min,E.max],y.colormap=x(u)}else u.vertexcolor?(this.color=u.vertexcolor[0],y.vertexColors=f(u.vertexcolor)):u.facecolor?(this.color=u.facecolor[0],y.cellColors=f(u.facecolor)):(this.color=u.color,y.meshColor=p(u.color));this.mesh.update(y)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function b(u,o){var d=u.glplot.gl,w=g({gl:d}),A=new a(u,w,o.uid);return w._trace=A,A.update(o),u.glplot.add(w),A}G.exports=b},74212:function(G,U,t){var g=t(24040),C=t(3400),i=t(27260),S=t(52948);G.exports=function(h,p,r,e){function a(m,v){return C.coerce(h,p,S,m,v)}function n(m){var v=m.map(function(b){var u=a(b);return u&&C.isArrayOrTypedArray(u)?u:null});return v.every(function(b){return b&&b.length===v[0].length})&&v}var f=n(["x","y","z"]);if(!f){p.visible=!1;return}if(n(["i","j","k"]),p.i&&(!p.j||!p.k)||p.j&&(!p.k||!p.i)||p.k&&(!p.i||!p.j)){p.visible=!1;return}var c=g.getComponentMethod("calendars","handleTraceDefaults");c(h,p,["x","y","z"],e),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(m){a(m)});var l=a("contour.show");l&&(a("contour.color"),a("contour.width")),"intensity"in h?(a("intensity"),a("intensitymode"),i(h,p,e,a,{prefix:"",cLetter:"c"})):(p.showscale=!1,"facecolor"in h?a("facecolor"):"vertexcolor"in h?a("vertexcolor"):a("color",r)),a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),p._length=null}},7404:function(G,U,t){G.exports={attributes:t(52948),supplyDefaults:t(74212),calc:t(1876),colorbar:{min:"cmin",max:"cmax"},plot:t(576),moduleType:"trace",name:"mesh3d",basePlotModule:t(12536),categories:["gl3d","showLegend"],meta:{}}},20279:function(G,U,t){var g=t(3400).extendFlat,C=t(52904),i=t(29736).axisHoverFormat,S=t(98192).u,x=t(55756),h=t(48164),p=h.INCREASING.COLOR,r=h.DECREASING.COLOR,e=C.line;function a(n){return{line:{color:g({},e.color,{dflt:n}),width:e.width,dash:S,editType:"style"},editType:"style"}}G.exports={xperiod:C.xperiod,xperiod0:C.xperiod0,xperiodalignment:C.xperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:g({},e.width,{}),dash:g({},S,{}),editType:"style"},increasing:a(p),decreasing:a(r),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:g({},x.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},42812:function(G,U,t){var g=t(3400),C=g._,i=t(54460),S=t(1220),x=t(39032).BADNUM;function h(a,n){var f=i.getFromId(a,n.xaxis),c=i.getFromId(a,n.yaxis),l=e(a,f,n),m=n._minDiff;n._minDiff=null;var v=n._origX;n._origX=null;var b=n._xcalc;n._xcalc=null;var u=r(a,n,v,b,c,p);return n._extremes[f._id]=i.findExtremes(f,b,{vpad:m/2}),u.length?(g.extendFlat(u[0].t,{wHover:m/2,tickLen:l}),u):[{t:{empty:!0}}]}function p(a,n,f,c){return{o:a,h:n,l:f,c}}function r(a,n,f,c,l,m){for(var v=l.makeCalcdata(n,"open"),b=l.makeCalcdata(n,"high"),u=l.makeCalcdata(n,"low"),o=l.makeCalcdata(n,"close"),d=g.isArrayOrTypedArray(n.text),w=g.isArrayOrTypedArray(n.hovertext),A=!0,_=null,y=!!n.xperiodalignment,E=[],T=0;T_):A=D>L,_=D;var N=m(L,M,z,D);N.pos=s,N.yc=(L+D)/2,N.i=T,N.dir=A?"increasing":"decreasing",N.x=N.pos,N.y=[z,M],y&&(N.orig_p=f[T]),d&&(N.tx=n.text[T]),w&&(N.htx=n.hovertext[T]),E.push(N)}else E.push({pos:s,empty:!0})}return n._extremes[l._id]=i.findExtremes(l,g.concat(u,b),{padded:!0}),E.length&&(E[0].t={labels:{open:C(a,"open:")+" ",high:C(a,"high:")+" ",low:C(a,"low:")+" ",close:C(a,"close:")+" "}}),E}function e(a,n,f){var c=f._minDiff;if(!c){var l=a._fullData,m=[];c=1/0;var v;for(v=0;v"+o.labels[D]+g.hoverLabelText(b,N,u.yhoverformat)):(k=C.extendFlat({},w),k.y0=k.y1=I,k.yLabelVal=N,k.yLabel=o.labels[D]+g.hoverLabelText(b,N,u.yhoverformat),k.name="",d.push(k),M[N]=k)}return d}function n(f,c,l,m){var v=f.cd,b=f.ya,u=v[0].trace,o=v[0].t,d=e(f,c,l,m);if(!d)return[];var w=d.index,A=v[w],_=d.index=A.i,y=A.dir;function E(N){return o.labels[N]+g.hoverLabelText(b,u[N][_],u.yhoverformat)}var T=A.hi||u.hoverinfo,s=T.split("+"),L=T==="all",M=L||s.indexOf("y")!==-1,z=L||s.indexOf("text")!==-1,D=M?[E("open"),E("high"),E("low"),E("close")+" "+p[y]]:[];return z&&x(A,u,D),d.extraText=D.join("
    "),d.y0=d.y1=b.c2p(A.yc,!0),[d]}G.exports={hoverPoints:r,hoverSplit:a,hoverOnPoints:n}},65456:function(G,U,t){G.exports={moduleType:"trace",name:"ohlc",basePlotModule:t(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:t(20279),supplyDefaults:t(23860),calc:t(42812).calc,plot:t(36664),style:t(14008),hoverPoints:t(18720).hoverPoints,selectPoints:t(97384)}},52744:function(G,U,t){var g=t(24040),C=t(3400);G.exports=function(S,x,h,p){var r=h("x"),e=h("open"),a=h("high"),n=h("low"),f=h("close");h("hoverlabel.split");var c=g.getComponentMethod("calendars","handleTraceDefaults");if(c(S,x,["x"],p),!!(e&&a&&n&&f)){var l=Math.min(e.length,a.length,n.length,f.length);return r&&(l=Math.min(l,C.minRowLength(r))),x._length=l,l}}},36664:function(G,U,t){var g=t(33428),C=t(3400);G.exports=function(S,x,h,p){var r=x.yaxis,e=x.xaxis,a=!!e.rangebreaks;C.makeTraceGroups(p,h,"trace ohlc").each(function(n){var f=g.select(this),c=n[0],l=c.t,m=c.trace;if(m.visible!==!0||l.empty){f.remove();return}var v=l.tickLen,b=f.selectAll("path").data(C.identity);b.enter().append("path"),b.exit().remove(),b.attr("d",function(u){if(u.empty)return"M0,0Z";var o=e.c2p(u.pos-v,!0),d=e.c2p(u.pos+v,!0),w=a?(o+d)/2:e.c2p(u.pos,!0),A=r.c2p(u.o,!0),_=r.c2p(u.h,!0),y=r.c2p(u.l,!0),E=r.c2p(u.c,!0);return"M"+o+","+A+"H"+w+"M"+w+","+_+"V"+y+"M"+d+","+E+"H"+w})})}},97384:function(G){G.exports=function(t,g){var C=t.cd,i=t.xaxis,S=t.yaxis,x=[],h,p=C[0].t.bPos||0;if(g===!1)for(h=0;h=u.length||o[u[d]]!==void 0)return!1;o[u[d]]=!0}return!0}},76671:function(G,U,t){var g=t(3400),C=t(94288).hasColorscale,i=t(27260),S=t(86968).Q,x=t(51272),h=t(72140),p=t(26284),r=t(38116).isTypedArraySpec;function e(n,f,c,l,m){m("line.shape"),m("line.hovertemplate");var v=m("line.color",l.colorway[0]);if(C(n,"line")&&g.isArrayOrTypedArray(v)){if(v.length)return m("line.colorscale"),i(n,f,l,m,{prefix:"line.",cLetter:"c"}),v.length;f.line.color=c}return 1/0}function a(n,f){function c(d,w){return g.coerce(n,f,h.dimensions,d,w)}var l=c("values"),m=c("visible");if(l&&l.length||(m=f.visible=!1),m){c("label"),c("displayindex",f._index);var v=n.categoryarray,b=g.isArrayOrTypedArray(v)&&v.length>0||r(v),u;b&&(u="array");var o=c("categoryorder",u);o==="array"?(c("categoryarray"),c("ticktext")):(delete n.categoryarray,delete n.ticktext),!b&&o==="array"&&(f.categoryorder="trace")}}G.exports=function(f,c,l,m){function v(w,A){return g.coerce(f,c,h,w,A)}var b=x(f,c,{name:"dimensions",handleItemDefaults:a}),u=e(f,c,l,m,v);S(c,m,v),(!Array.isArray(b)||!b.length)&&(c.visible=!1),p(c,b,"values",u),v("hoveron"),v("hovertemplate"),v("arrangement"),v("bundlecolors"),v("sortpaths"),v("counts");var o={family:m.font.family,size:Math.round(m.font.size),color:m.font.color};g.coerceFont(v,"labelfont",o);var d={family:m.font.family,size:Math.round(m.font.size/1.2),color:m.font.color};g.coerceFont(v,"tickfont",d)}},22020:function(G,U,t){G.exports={attributes:t(72140),supplyDefaults:t(76671),calc:t(69136),plot:t(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:t(91800),categories:["noOpacity"],meta:{}}},51036:function(G,U,t){var g=t(33428),C=t(67756).Gz,i=t(36424),S=t(93024),x=t(3400),h=x.strTranslate,p=t(43616),r=t(49760),e=t(72736);function a(V,Q,ot,$){var Z=Q._context.staticPlot,st=V.map(it.bind(0,Q,ot)),nt=$.selectAll("g.parcatslayer").data([null]);nt.enter().append("g").attr("class","parcatslayer").style("pointer-events",Z?"none":"all");var ct=nt.selectAll("g.trace.parcats").data(st,n),gt=ct.enter().append("g").attr("class","trace parcats");ct.attr("transform",function(Vt){return h(Vt.x,Vt.y)}),gt.append("g").attr("class","paths");var Tt=ct.select("g.paths"),wt=Tt.selectAll("path.path").data(function(Vt){return Vt.paths},n);wt.attr("fill",function(Vt){return Vt.model.color});var Rt=wt.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Vt){return Vt.model.color}).attr("fill-opacity",0);o(Rt),wt.attr("d",function(Vt){return Vt.svgD}),Rt.empty()||wt.sort(c),wt.exit().remove(),wt.on("mouseover",l).on("mouseout",m).on("click",u),gt.append("g").attr("class","dimensions");var bt=ct.select("g.dimensions"),At=bt.selectAll("g.dimension").data(function(Vt){return Vt.dimensions},n);At.enter().append("g").attr("class","dimension"),At.attr("transform",function(Vt){return h(Vt.x,0)}),At.exit().remove();var mt=At.selectAll("g.category").data(function(Vt){return Vt.categories},n),Lt=mt.enter().append("g").attr("class","category");mt.attr("transform",function(Vt){return h(0,Vt.y)}),Lt.append("rect").attr("class","catrect").attr("pointer-events","none"),mt.select("rect.catrect").attr("fill","none").attr("width",function(Vt){return Vt.width}).attr("height",function(Vt){return Vt.height}),A(Lt);var Ht=mt.selectAll("rect.bandrect").data(function(Vt){return Vt.bands},n);Ht.each(function(){x.raiseToTop(this)}),Ht.attr("fill",function(Vt){return Vt.color});var Ut=Ht.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Vt){return Vt.color}).attr("fill-opacity",0);Ht.attr("fill",function(Vt){return Vt.color}).attr("width",function(Vt){return Vt.width}).attr("height",function(Vt){return Vt.height}).attr("y",function(Vt){return Vt.y}).attr("cursor",function(Vt){return Vt.parcatsViewModel.arrangement==="fixed"?"default":Vt.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),y(Ut),Ht.exit().remove(),Lt.append("text").attr("class","catlabel").attr("pointer-events","none");var kt=Q._fullLayout.paper_bgcolor;mt.select("text.catlabel").attr("text-anchor",function(Vt){return f(Vt)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",e.makeTextShadow(kt)).style("fill","rgb(0, 0, 0)").attr("x",function(Vt){return f(Vt)?Vt.width+5:-5}).attr("y",function(Vt){return Vt.height/2}).text(function(Vt){return Vt.model.categoryLabel}).each(function(Vt){p.font(g.select(this),Vt.parcatsViewModel.categorylabelfont),e.convertToTspans(g.select(this),Q)}),Lt.append("text").attr("class","dimlabel"),mt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Vt){return Vt.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Vt){return Vt.width/2}).attr("y",-5).text(function(Vt,It){return It===0?Vt.parcatsViewModel.model.dimensions[Vt.model.dimensionInd].dimensionLabel:null}).each(function(Vt){p.font(g.select(this),Vt.parcatsViewModel.labelfont)}),mt.selectAll("rect.bandrect").on("mouseover",I).on("mouseout",k),mt.exit().remove(),At.call(g.behavior.drag().origin(function(Vt){return{x:Vt.x,y:0}}).on("dragstart",B).on("drag",O).on("dragend",H)),ct.each(function(Vt){Vt.traceSelection=g.select(this),Vt.pathSelection=g.select(this).selectAll("g.paths").selectAll("path.path"),Vt.dimensionSelection=g.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),ct.exit().remove()}G.exports=function(V,Q,ot,$){a(ot,V,$,Q)};function n(V){return V.key}function f(V){var Q=V.parcatsViewModel.dimensions.length,ot=V.parcatsViewModel.dimensions[Q-1].model.dimensionInd;return V.model.dimensionInd===ot}function c(V,Q){return V.model.rawColor>Q.model.rawColor?1:V.model.rawColor"),Kt=g.mouse(Z)[0];S.loneHover({trace:st,x:mt-ct.left+gt.left,y:Lt-ct.top+gt.top,text:re,color:V.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Ht,idealAlign:Kt1&&Tt.displayInd===gt.dimensions.length-1?(bt=nt.left,At="left"):(bt=nt.left+nt.width,At="right");var mt=ct.model.count,Lt=ct.model.categoryLabel,Ht=mt/ct.parcatsViewModel.model.count,Ut={countLabel:mt,categoryLabel:Lt,probabilityLabel:Ht.toFixed(3)},kt=[];ct.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&kt.push(["Count:",Ut.countLabel].join(" ")),ct.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&kt.push(["P("+Ut.categoryLabel+"):",Ut.probabilityLabel].join(" "));var Vt=kt.join("
    ");return{trace:wt,x:$*(bt-Q.left),y:Z*(Rt-Q.top),text:Vt,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:At,hovertemplate:wt.hovertemplate,hovertemplateLabels:Ut,eventData:[{data:wt._input,fullData:wt,count:mt,category:Lt,probability:Ht}]}}function D(V,Q,ot){var $=[];return g.select(ot.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Z=this;$.push(z(V,Q,Z))}),$}function N(V,Q,ot){V._fullLayout._calcInverseTransform(V);var $=V._fullLayout._invScaleX,Z=V._fullLayout._invScaleY,st=ot.getBoundingClientRect(),nt=g.select(ot).datum(),ct=nt.categoryViewModel,gt=ct.parcatsViewModel,Tt=gt.model.dimensions[ct.model.dimensionInd],wt=gt.trace,Rt=st.y+st.height/2,bt,At;gt.dimensions.length>1&&Tt.displayInd===gt.dimensions.length-1?(bt=st.left,At="left"):(bt=st.left+st.width,At="right");var mt=ct.model.categoryLabel,Lt=nt.parcatsViewModel.model.count,Ht=0;nt.categoryViewModel.bands.forEach(function(de){de.color===nt.color&&(Ht+=de.count)});var Ut=ct.model.count,kt=0;gt.pathSelection.each(function(de){de.model.color===nt.color&&(kt+=de.model.count)});var Vt=Ht/Lt,It=Ht/kt,re=Ht/Ut,Kt={countLabel:Lt,categoryLabel:mt,probabilityLabel:Vt.toFixed(3)},$t=[];ct.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&$t.push(["Count:",Kt.countLabel].join(" ")),ct.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&($t.push("P(color ∩ "+mt+"): "+Kt.probabilityLabel),$t.push("P("+mt+" | color): "+It.toFixed(3)),$t.push("P(color | "+mt+"): "+re.toFixed(3)));var le=$t.join("
    "),he=r.mostReadable(nt.color,["black","white"]);return{trace:wt,x:$*(bt-Q.left),y:Z*(Rt-Q.top),text:le,color:nt.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:he,fontSize:10,idealAlign:At,hovertemplate:wt.hovertemplate,hovertemplateLabels:Kt,eventData:[{data:wt._input,fullData:wt,category:mt,count:Lt,probability:Vt,categorycount:Ut,colorcount:kt,bandcolorcount:Ht}]}}function I(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var Q=g.mouse(this)[1];if(Q<-1)return;var ot=V.parcatsViewModel.graphDiv,$=ot._fullLayout,Z=$._paperdiv.node().getBoundingClientRect(),st=V.parcatsViewModel.hoveron,nt=this;if(st==="color"?(s(nt),M(nt,"plotly_hover",g.event)):(T(nt),L(nt,"plotly_hover",g.event)),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ct;st==="category"?ct=z(ot,Z,nt):st==="color"?ct=N(ot,Z,nt):st==="dimension"&&(ct=D(ot,Z,nt)),ct&&S.loneHover(ct,{container:$._hoverlayer.node(),outerContainer:$._paper.node(),gd:ot})}}}function k(V){var Q=V.parcatsViewModel;if(!Q.dragDimension&&(o(Q.pathSelection),A(Q.dimensionSelection.selectAll("g.category")),y(Q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),S.loneUnhover(Q.graphDiv._fullLayout._hoverlayer.node()),Q.pathSelection.sort(c),Q.hoverinfoItems.indexOf("skip")===-1)){var ot=V.parcatsViewModel.hoveron,$=this;ot==="color"?M($,"plotly_unhover",g.event):L($,"plotly_unhover",g.event)}}function B(V){V.parcatsViewModel.arrangement!=="fixed"&&(V.dragDimensionDisplayInd=V.model.displayInd,V.initialDragDimensionDisplayInds=V.parcatsViewModel.model.dimensions.map(function(Q){return Q.displayInd}),V.dragHasMoved=!1,V.dragCategoryDisplayInd=null,g.select(this).selectAll("g.category").select("rect.catrect").each(function(Q){var ot=g.mouse(this)[0],$=g.mouse(this)[1];-2<=ot&&ot<=Q.width+2&&-2<=$&&$<=Q.height+2&&(V.dragCategoryDisplayInd=Q.model.displayInd,V.initialDragCategoryDisplayInds=V.model.categories.map(function(Z){return Z.displayInd}),Q.model.dragY=Q.y,x.raiseToTop(this.parentNode),g.select(this.parentNode).selectAll("rect.bandrect").each(function(Z){Z.y<$&&$<=Z.y+Z.height&&(V.potentialClickBand=this)}))}),V.parcatsViewModel.dragDimension=V,S.loneUnhover(V.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function O(V){if(V.parcatsViewModel.arrangement!=="fixed"&&(V.dragHasMoved=!0,V.dragDimensionDisplayInd!==null)){var Q=V.dragDimensionDisplayInd,ot=Q-1,$=Q+1,Z=V.parcatsViewModel.dimensions[Q];if(V.dragCategoryDisplayInd!==null){var st=Z.categories[V.dragCategoryDisplayInd];st.model.dragY+=g.event.dy;var nt=st.model.dragY,ct=st.model.displayInd,gt=Z.categories,Tt=gt[ct-1],wt=gt[ct+1];Tt!==void 0&&ntwt.y+wt.height/2&&(st.model.displayInd=wt.model.displayInd,wt.model.displayInd=ct),V.dragCategoryDisplayInd=st.model.displayInd}if(V.dragCategoryDisplayInd===null||V.parcatsViewModel.arrangement==="freeform"){Z.model.dragX=g.event.x;var Rt=V.parcatsViewModel.dimensions[ot],bt=V.parcatsViewModel.dimensions[$];Rt!==void 0&&Z.model.dragXbt.x&&(Z.model.displayInd=bt.model.displayInd,bt.model.displayInd=V.dragDimensionDisplayInd),V.dragDimensionDisplayInd=Z.model.displayInd}X(V.parcatsViewModel),J(V.parcatsViewModel),et(V.parcatsViewModel),j(V.parcatsViewModel)}}function H(V){if(V.parcatsViewModel.arrangement!=="fixed"&&V.dragDimensionDisplayInd!==null){g.select(this).selectAll("text").attr("font-weight","normal");var Q={},ot=Y(V.parcatsViewModel),$=V.parcatsViewModel.model.dimensions.map(function(bt){return bt.displayInd}),Z=V.initialDragDimensionDisplayInds.some(function(bt,At){return bt!==$[At]});Z&&$.forEach(function(bt,At){var mt=V.parcatsViewModel.model.dimensions[At].containerInd;Q["dimensions["+mt+"].displayindex"]=bt});var st=!1;if(V.dragCategoryDisplayInd!==null){var nt=V.model.categories.map(function(bt){return bt.displayInd});if(st=V.initialDragCategoryDisplayInds.some(function(bt,At){return bt!==nt[At]}),st){var ct=V.model.categories.slice().sort(function(bt,At){return bt.displayInd-At.displayInd}),gt=ct.map(function(bt){return bt.categoryValue}),Tt=ct.map(function(bt){return bt.categoryLabel});Q["dimensions["+V.model.containerInd+"].categoryarray"]=[gt],Q["dimensions["+V.model.containerInd+"].ticktext"]=[Tt],Q["dimensions["+V.model.containerInd+"].categoryorder"]="array"}}if(V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!V.dragHasMoved&&V.potentialClickBand&&(V.parcatsViewModel.hoveron==="color"?M(V.potentialClickBand,"plotly_click",g.event.sourceEvent):L(V.potentialClickBand,"plotly_click",g.event.sourceEvent)),V.model.dragX=null,V.dragCategoryDisplayInd!==null){var wt=V.parcatsViewModel.dimensions[V.dragDimensionDisplayInd].categories[V.dragCategoryDisplayInd];wt.model.dragY=null,V.dragCategoryDisplayInd=null}V.dragDimensionDisplayInd=null,V.parcatsViewModel.dragDimension=null,V.dragHasMoved=null,V.potentialClickBand=null,X(V.parcatsViewModel),J(V.parcatsViewModel);var Rt=g.transition().duration(300).ease("cubic-in-out");Rt.each(function(){et(V.parcatsViewModel,!0),j(V.parcatsViewModel,!0)}).each("end",function(){(Z||st)&&i.restyle(V.parcatsViewModel.graphDiv,Q,[ot])})}}function Y(V){for(var Q,ot=V.graphDiv._fullData,$=0;$=0;gt--)Tt+="C"+nt[gt]+","+(Q[gt+1]+$)+" "+st[gt]+","+(Q[gt]+$)+" "+(V[gt]+ot[gt])+","+(Q[gt]+$),Tt+="l-"+ot[gt]+",0 ";return Tt+="Z",Tt}function J(V){var Q=V.dimensions,ot=V.model,$=Q.map(function(ne){return ne.categories.map(function(zt){return zt.y})}),Z=V.model.dimensions.map(function(ne){return ne.categories.map(function(zt){return zt.displayInd})}),st=V.model.dimensions.map(function(ne){return ne.displayInd}),nt=V.dimensions.map(function(ne){return ne.model.dimensionInd}),ct=Q.map(function(ne){return ne.x}),gt=Q.map(function(ne){return ne.width}),Tt=[];for(var wt in ot.paths)ot.paths.hasOwnProperty(wt)&&Tt.push(ot.paths[wt]);function Rt(ne){var zt=ne.categoryInds.map(function(Jt,Wt){return Z[Wt][Jt]}),Xt=nt.map(function(Jt){return zt[Jt]});return Xt}Tt.sort(function(ne,zt){var Xt=Rt(ne),Jt=Rt(zt);return V.sortpaths==="backward"&&(Xt.reverse(),Jt.reverse()),Xt.push(ne.valueInds[0]),Jt.push(zt.valueInds[0]),V.bundlecolors&&(Xt.unshift(ne.rawColor),Jt.unshift(zt.rawColor)),XtJt?1:0});for(var bt=new Array(Tt.length),At=Q[0].model.count,mt=Q[0].categories.map(function(ne){return ne.height}).reduce(function(ne,zt){return ne+zt}),Lt=0;Lt0?Ut=mt*(Ht.count/At):Ut=0;for(var kt=new Array($.length),Vt=0;Vt1?nt=(V.width-2*ot-$)/(Z-1):nt=0,ct=ot,gt=ct+nt*st;var Tt=[],wt=V.model.maxCats,Rt=Q.categories.length,bt=8,At=Q.count,mt=V.height-bt*(wt-1),Lt,Ht,Ut,kt,Vt,It=(wt-Rt)*bt/2,re=Q.categories.map(function(Kt){return{displayInd:Kt.displayInd,categoryInd:Kt.categoryInd}});for(re.sort(function(Kt,$t){return Kt.displayInd-$t.displayInd}),Vt=0;Vt0?Lt=Ht.count/At*mt:Lt=0,Ut={key:Ht.valueInds[0],model:Ht,width:$,height:Lt,y:Ht.dragY!==null?Ht.dragY:It,bands:[],parcatsViewModel:V},It=It+Lt+bt,Tt.push(Ut);return{key:Q.dimensionInd,x:Q.dragX!==null?Q.dragX:gt,y:0,width:$,model:Q,categories:Tt,parcatsViewModel:V,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}},60268:function(G,U,t){var g=t(51036);G.exports=function(i,S,x,h){var p=i._fullLayout,r=p._paper,e=p._size;g(i,r,S,{width:e.w,height:e.h,margin:{t:e.t,r:e.r,b:e.b,l:e.l}},x,h)}},82296:function(G,U,t){var g=t(49084),C=t(94724),i=t(25376),S=t(86968).u,x=t(92880).extendFlat,h=t(31780).templatedArray;G.exports={domain:S({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:i({editType:"plot"}),tickfont:i({editType:"plot"}),rangefont:i({editType:"plot"}),dimensions:h("dimension",{label:{valType:"string",editType:"plot"},tickvals:x({},C.tickvals,{editType:"plot"}),ticktext:x({},C.ticktext,{editType:"plot"}),tickformat:x({},C.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:x({editType:"calc"},g("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(G,U,t){var g=t(30140),C=t(33428),i=t(71688).keyFun,S=t(71688).repeat,x=t(3400).sorterAsc,h=t(3400).strTranslate,p=g.bar.snapRatio;function r(H,Y){return H*(1-p)+Y*p}var e=g.bar.snapClose;function a(H,Y){return H*(1-e)+Y*e}function n(H,Y,j,et){if(f(j,et))return j;var it=H?-1:1,ut=0,J=Y.length-1;if(it<0){var X=ut;ut=J,J=X}for(var tt=Y[ut],V=tt,Q=ut;it*Q=Y[j][0]&&H<=Y[j][1])return!0;return!1}function c(H){H.attr("x",-g.bar.captureWidth/2).attr("width",g.bar.captureWidth)}function l(H){H.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(H){if(!H.brush.filterSpecified)return"0,"+H.height;for(var Y=v(H.brush.filter.getConsolidated(),H.height),j=[0],et,it,ut,J=Y.length?Y[0][0]:null,X=0;XH[1]+j||Y=.9*H[1]+.1*H[0]?"n":Y<=.9*H[0]+.1*H[1]?"s":"ns"}function u(){C.select(document.body).style("cursor",null)}function o(H){H.attr("stroke-dasharray",m)}function d(H,Y){var j=C.select(H).selectAll(".highlight, .highlight-shadow"),et=Y?j.transition().duration(g.bar.snapDuration).each("end",Y):j;o(et)}function w(H,Y){var j=H.brush,et=j.filterSpecified,it=NaN,ut={},J;if(et){var X=H.height,tt=j.filter.getConsolidated(),V=v(tt,X),Q=NaN,ot=NaN,$=NaN;for(J=0;J<=V.length;J++){var Z=V[J];if(Z&&Z[0]<=Y&&Y<=Z[1]){Q=J;break}else if(ot=J?J-1:NaN,Z&&Z[0]>Y){$=J;break}}if(it=Q,isNaN(it)&&(isNaN(ot)||isNaN($)?it=isNaN(ot)?$:ot:it=Y-V[ot][1]=Tt[0]&><=Tt[1]){ut.clickableOrdinalRange=Tt;break}}}return ut}function A(H,Y){C.event.sourceEvent.stopPropagation();var j=Y.height-C.mouse(H)[1]-2*g.verticalPadding,et=Y.unitToPaddedPx.invert(j),it=Y.brush,ut=w(Y,j),J=ut.interval,X=it.svgBrush;if(X.wasDragged=!1,X.grabbingBar=ut.region==="ns",X.grabbingBar){var tt=J.map(Y.unitToPaddedPx);X.grabPoint=j-tt[0]-g.verticalPadding,X.barLength=tt[1]-tt[0]}X.clickableOrdinalRange=ut.clickableOrdinalRange,X.stayingIntervals=Y.multiselect&&it.filterSpecified?it.filter.getConsolidated():[],J&&(X.stayingIntervals=X.stayingIntervals.filter(function(V){return V[0]!==J[0]&&V[1]!==J[1]})),X.startExtent=ut.region?J[ut.region==="s"?1:0]:et,Y.parent.inBrushDrag=!0,X.brushStartCallback()}function _(H,Y){C.event.sourceEvent.stopPropagation();var j=Y.height-C.mouse(H)[1]-2*g.verticalPadding,et=Y.brush.svgBrush;et.wasDragged=!0,et._dragging=!0,et.grabbingBar?et.newExtent=[j-et.grabPoint,j+et.barLength-et.grabPoint].map(Y.unitToPaddedPx.invert):et.newExtent=[et.startExtent,Y.unitToPaddedPx.invert(j)].sort(x),Y.brush.filterSpecified=!0,et.extent=et.stayingIntervals.concat([et.newExtent]),et.brushCallback(Y),d(H.parentNode)}function y(H,Y){var j=Y.brush,et=j.filter,it=j.svgBrush;it._dragging||(E(H,Y),_(H,Y),Y.brush.svgBrush.wasDragged=!1),it._dragging=!1;var ut=C.event;ut.sourceEvent.stopPropagation();var J=it.grabbingBar;if(it.grabbingBar=!1,it.grabLocation=void 0,Y.parent.inBrushDrag=!1,u(),!it.wasDragged){it.wasDragged=void 0,it.clickableOrdinalRange?j.filterSpecified&&Y.multiselect?it.extent.push(it.clickableOrdinalRange):(it.extent=[it.clickableOrdinalRange],j.filterSpecified=!0):J?(it.extent=it.stayingIntervals,it.extent.length===0&&D(j)):D(j),it.brushCallback(Y),d(H.parentNode),it.brushEndCallback(j.filterSpecified?et.getConsolidated():[]);return}var X=function(){et.set(et.getConsolidated())};if(Y.ordinal){var tt=Y.unitTickvals;tt[tt.length-1]it.newExtent[0];it.extent=it.stayingIntervals.concat(V?[it.newExtent]:[]),it.extent.length||D(j),it.brushCallback(Y),V?d(H.parentNode,X):(X(),d(H.parentNode))}else X();it.brushEndCallback(j.filterSpecified?et.getConsolidated():[])}function E(H,Y){var j=Y.height-C.mouse(H)[1]-2*g.verticalPadding,et=w(Y,j),it="crosshair";et.clickableOrdinalRange?it="pointer":et.region&&(it=et.region+"-resize"),C.select(document.body).style("cursor",it)}function T(H){H.on("mousemove",function(Y){C.event.preventDefault(),Y.parent.inBrushDrag||E(this,Y)}).on("mouseleave",function(Y){Y.parent.inBrushDrag||u()}).call(C.behavior.drag().on("dragstart",function(Y){A(this,Y)}).on("drag",function(Y){_(this,Y)}).on("dragend",function(Y){y(this,Y)}))}function s(H,Y){return H[0]-Y[0]}function L(H,Y,j){var et=j._context.staticPlot,it=H.selectAll(".background").data(S);it.enter().append("rect").classed("background",!0).call(c).call(l).style("pointer-events",et?"none":"auto").attr("transform",h(0,g.verticalPadding)),it.call(T).attr("height",function(X){return X.height-g.verticalPadding});var ut=H.selectAll(".highlight-shadow").data(S);ut.enter().append("line").classed("highlight-shadow",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width+g.bar.strokeWidth).attr("stroke",Y).attr("opacity",g.bar.strokeOpacity).attr("stroke-linecap","butt"),ut.attr("y1",function(X){return X.height}).call(o);var J=H.selectAll(".highlight").data(S);J.enter().append("line").classed("highlight",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width-g.bar.strokeWidth).attr("stroke",g.bar.fillColor).attr("opacity",g.bar.fillOpacity).attr("stroke-linecap","butt"),J.attr("y1",function(X){return X.height}).call(o)}function M(H,Y,j){var et=H.selectAll("."+g.cn.axisBrush).data(S,i);et.enter().append("g").classed(g.cn.axisBrush,!0),L(et,Y,j)}function z(H){return H.svgBrush.extent.map(function(Y){return Y.slice()})}function D(H){H.filterSpecified=!1,H.svgBrush.extent=[[-1/0,1/0]]}function N(H){return function(j){var et=j.brush,it=z(et),ut=it.slice();et.filter.set(ut),H()}}function I(H){for(var Y=H.slice(),j=[],et,it=Y.shift();it;){for(et=it.slice();(it=Y.shift())&&it[0]<=et[1];)et[1]=Math.max(et[1],it[1]);j.push(et)}return j.length===1&&j[0][0]>j[0][1]&&(j=[]),j}function k(){var H=[],Y,j;return{set:function(et){H=et.map(function(it){return it.slice().sort(x)}).sort(s),H.length===1&&H[0][0]===-1/0&&H[0][1]===1/0&&(H=[[0,-1]]),Y=I(H),j=H.reduce(function(it,ut){return[Math.min(it[0],ut[0]),Math.max(it[1],ut[1])]},[1/0,-1/0])},get:function(){return H.slice()},getConsolidated:function(){return Y},getBounds:function(){return j}}}function B(H,Y,j,et,it,ut){var J=k();return J.set(j),{filter:J,filterSpecified:Y,svgBrush:{extent:[],brushStartCallback:et,brushCallback:N(it),brushEndCallback:ut}}}function O(H,Y){if(Array.isArray(H[0])?(H=H.map(function(et){return et.sort(x)}),Y.multiselect?H=I(H.sort(s)):H=[H[0]]):H=[H.sort(x)],Y.tickvals){var j=Y.tickvals.slice().sort(x);if(H=H.map(function(et){var it=[n(0,j,et[0],[]),n(1,j,et[1],[])];if(it[1]>it[0])return it}).filter(function(et){return et}),!H.length)return}return H.length>1?H:H[0]}G.exports={makeBrush:B,ensureAxisBrush:M,cleanRanges:O}},61664:function(G,U,t){G.exports={attributes:t(82296),supplyDefaults:t(60664),calc:t(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:t(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(G,U,t){var g=t(33428),C=t(84888)._M,i=t(24196),S=t(9616);U.name="parcoords",U.plot=function(x){var h=C(x.calcdata,"parcoords")[0];h.length&&i(x,h)},U.clean=function(x,h,p,r){var e=r._has&&r._has("parcoords"),a=h._has&&h._has("parcoords");e&&!a&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},U.toSVG=function(x){var h=x._fullLayout._glimages,p=g.select(x).selectAll(".svg-container"),r=p.filter(function(a,n){return n===p.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function e(){var a=this,n=a.toDataURL("image/png"),f=h.append("svg:image");f.attr({xmlns:S.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}r.each(e),window.setTimeout(function(){g.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},95044:function(G,U,t){var g=t(3400).isArrayOrTypedArray,C=t(8932),i=t(71688).wrap;G.exports=function(h,p){var r,e;return C.hasColorscale(p,"line")&&g(p.line.color)?(r=p.line.color,e=C.extractOpts(p.line).colorscale,C.calc(h,p,{vals:r,containerStr:"line",cLetter:"c"})):(r=S(p._length),e=[[0,p.line.color],[1,p.line.color]]),i({lineColor:r,cscale:e})};function S(x){for(var h=new Array(x),p=0;pe&&(g.log("parcoords traces support up to "+e+" dimensions at the moment"),o.splice(e));var d=x(l,m,{name:"dimensions",layout:b,handleItemDefaults:f}),w=n(l,m,v,b,u);S(m,b,u),(!Array.isArray(d)||!d.length)&&(m.visible=!1),a(m,d,"values",w);var A={family:b.font.family,size:Math.round(b.font.size/1.2),color:b.font.color};g.coerceFont(u,"labelfont",A),g.coerceFont(u,"tickfont",A),g.coerceFont(u,"rangefont",A),u("labelangle"),u("labelside"),u("unselected.line.color"),u("unselected.line.opacity")}},95724:function(G,U,t){var g=t(3400).isTypedArray;U.convertTypedArray=function(C){return g(C)?Array.prototype.slice.call(C):C},U.isOrdinal=function(C){return!!C.tickvals},U.isVisible=function(C){return C.visible||!("visible"in C)}},29928:function(G,U,t){var g=t(61664);g.plot=t(24196),G.exports=g},51352:function(G,U,t){var g=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` `),C=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),i=t(30140).maxDimensionCount,S=t(3400),x=1e-6,v=2048,p=new Uint8Array(4),r=new Uint8Array(4),e={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function a(y){y.read({x:0,y:0,width:1,height:1,data:p})}function n(y,E,T,s,L){var M=y._gl;M.enable(M.SCISSOR_TEST),M.scissor(E,T,s,L),y.clear({color:[0,0,0,0],depth:1})}function f(y,E,T,s,L,M){var z=M.key;function D(N){var I=Math.min(s,L-N*s);N===0&&(window.cancelAnimationFrame(T.currentRafs[z]),delete T.currentRafs[z],n(y,M.scissorX,M.scissorY,M.scissorWidth,M.viewBoxSize[1])),!T.clearOnly&&(M.count=2*I,M.offset=2*N*s,E(M),N*s+I>>8*E)%256/255}function h(y,E,T){for(var s=new Array(y*(i+4)),L=0,M=0;Mwt&&(wt=ot[nt].dim1.canvasX,gt=nt);st===0&&n(L,0,0,I.canvasWidth,I.canvasHeight);var Rt=J(T);for(nt=0;ntnt._length&&(Lt=Lt.slice(0,nt._length));var Ht=nt.tickvals,Ut;function kt($t,le){return{val:$t,text:Ut[le]}}function Vt($t,le){return $t.val-le.val}if(i(Ht)&&Ht.length){C.isTypedArray(Ht)&&(Ht=Array.from(Ht)),Ut=nt.ticktext,!i(Ut)||!Ut.length?Ut=Ht.map(S(nt.tickformat)):Ut.length>Ht.length?Ut=Ut.slice(0,Ht.length):Ht.length>Ut.length&&(Ht=Ht.slice(0,Ut.length));for(var It=1;It=le||Se>=he)return;var ne=Kt.lineLayer.readPixel(xe,he-1-Se),zt=ne[3]!==0,Xt=zt?ne[2]+256*(ne[1]+256*ne[0]):null,Jt={x:xe,y:Se,clientX:$t.clientX,clientY:$t.clientY,dataIndex:Kt.model.key,curveNumber:Xt};Xt!==gt&&(zt?X.hover(Jt):X.unhover&&X.unhover(Jt),gt=Xt)}}),ct.style("opacity",function(Kt){return Kt.pick?0:1}),Q.style("background","rgba(255, 255, 255, 0)");var wt=Q.selectAll("."+b.cn.parcoords).data(nt,c);wt.exit().remove(),wt.enter().append("g").classed(b.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),wt.attr("transform",function(Kt){return r(Kt.model.translateX,Kt.model.translateY)});var Rt=wt.selectAll("."+b.cn.parcoordsControlView).data(l,c);Rt.enter().append("g").classed(b.cn.parcoordsControlView,!0),Rt.attr("transform",function(Kt){return r(Kt.model.pad.l,Kt.model.pad.t)});var bt=Rt.selectAll("."+b.cn.yAxis).data(function(Kt){return Kt.dimensions},c);bt.enter().append("g").classed(b.cn.yAxis,!0),Rt.each(function(Kt){O(bt,Kt,$)}),ct.each(function(Kt){if(Kt.viewModel){!Kt.lineLayer||X?Kt.lineLayer=o(this,Kt):Kt.lineLayer.update(Kt),(Kt.key||Kt.key===0)&&(Kt.viewModel[Kt.key]=Kt.lineLayer);var $t=!Kt.context||X;Kt.lineLayer.render(Kt.viewModel.panels,$t)}}),bt.attr("transform",function(Kt){return r(Kt.xScale(Kt.xIndex),0)}),bt.call(g.behavior.drag().origin(function(Kt){return Kt}).on("drag",function(Kt){var $t=Kt.parent;st.linePickActive(!1),Kt.x=Math.max(-b.overdrag,Math.min(Kt.model.width+b.overdrag,g.event.x)),Kt.canvasX=Kt.x*Kt.model.canvasPixelRatio,bt.sort(function(le,he){return le.x-he.x}).each(function(le,he){le.xIndex=he,le.x=Kt===le?le.x:le.xScale(le.xIndex),le.canvasX=le.x*le.model.canvasPixelRatio}),O(bt,$t,$),bt.filter(function(le){return Math.abs(Kt.xIndex-le.xIndex)!==0}).attr("transform",function(le){return r(le.xScale(le.xIndex),0)}),g.select(this).attr("transform",r(Kt.x,0)),bt.each(function(le,he,de){de===Kt.parent.key&&($t.dimensions[he]=le)}),$t.contextLayer&&$t.contextLayer.render($t.panels,!1,!z($t)),$t.focusLayer.render&&$t.focusLayer.render($t.panels)}).on("dragend",function(Kt){var $t=Kt.parent;Kt.x=Kt.xScale(Kt.xIndex),Kt.canvasX=Kt.x*Kt.model.canvasPixelRatio,O(bt,$t,$),g.select(this).attr("transform",function(le){return r(le.x,0)}),$t.contextLayer&&$t.contextLayer.render($t.panels,!1,!z($t)),$t.focusLayer&&$t.focusLayer.render($t.panels),$t.pickLayer&&$t.pickLayer.render($t.panels,!0),st.linePickActive(!0),X&&X.axesMoved&&X.axesMoved($t.key,$t.dimensions.map(function(le){return le.crossfilterDimensionIndex}))})),bt.exit().remove();var At=bt.selectAll("."+b.cn.axisOverlays).data(l,c);At.enter().append("g").classed(b.cn.axisOverlays,!0),At.selectAll("."+b.cn.axis).remove();var mt=At.selectAll("."+b.cn.axis).data(l,c);mt.enter().append("g").classed(b.cn.axis,!0),mt.each(function(Kt){var $t=Kt.model.height/Kt.model.tickDistance,le=Kt.domainScale,he=le.domain();g.select(this).call(g.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks($t,Kt.tickFormat).tickValues(Kt.ordinal?he:null).tickFormat(function(de){return h.isOrdinal(Kt)?de:Y(Kt.model.dimensions[Kt.visibleIndex],de)}).scale(le)),a.font(mt.selectAll("text"),Kt.model.tickFont)}),mt.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),mt.selectAll("text").style("text-shadow",e.makeTextShadow(Z)).style("cursor","default");var Lt=At.selectAll("."+b.cn.axisHeading).data(l,c);Lt.enter().append("g").classed(b.cn.axisHeading,!0);var Ht=Lt.selectAll("."+b.cn.axisTitle).data(l,c);Ht.enter().append("text").classed(b.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",tt?"none":"auto"),Ht.text(function(Kt){return Kt.label}).each(function(Kt){var $t=g.select(this);a.font($t,Kt.model.labelFont),e.convertToTspans($t,it)}).attr("transform",function(Kt){var $t=B(Kt.model.labelAngle,Kt.model.labelSide),le=b.axisTitleOffset;return($t.dir>0?"":r(0,2*le+Kt.model.height))+p($t.degrees)+r(-le*$t.dx,-le*$t.dy)}).attr("text-anchor",function(Kt){var $t=B(Kt.model.labelAngle,Kt.model.labelSide),le=Math.abs($t.dx),he=Math.abs($t.dy);return 2*le>he?$t.dir*$t.dx<0?"start":"end":"middle"});var Ut=At.selectAll("."+b.cn.axisExtent).data(l,c);Ut.enter().append("g").classed(b.cn.axisExtent,!0);var kt=Ut.selectAll("."+b.cn.axisExtentTop).data(l,c);kt.enter().append("g").classed(b.cn.axisExtentTop,!0),kt.attr("transform",r(0,-b.axisExtentOffset));var Vt=kt.selectAll("."+b.cn.axisExtentTopText).data(l,c);Vt.enter().append("text").classed(b.cn.axisExtentTopText,!0).call(I),Vt.text(function(Kt){return j(Kt,!0)}).each(function(Kt){a.font(g.select(this),Kt.model.rangeFont)});var It=Ut.selectAll("."+b.cn.axisExtentBottom).data(l,c);It.enter().append("g").classed(b.cn.axisExtentBottom,!0),It.attr("transform",function(Kt){return r(0,Kt.model.height+b.axisExtentOffset)});var re=It.selectAll("."+b.cn.axisExtentBottomText).data(l,c);re.enter().append("text").classed(b.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(I),re.text(function(Kt){return j(Kt,!1)}).each(function(Kt){a.font(g.select(this),Kt.model.rangeFont)}),u.ensureAxisBrush(At,Z,it)}},24196:function(G,U,t){var g=t(36336),C=t(5048),i=t(95724).isVisible,S={};function x(r,e,a){var n=e.indexOf(a),f=r.indexOf(n);return f===-1&&(f+=e.length),f}function v(r,e){return function(n,f){return x(r,e,n)-x(r,e,f)}}var p=G.exports=function(e,a){var n=e._fullLayout,f=C(e,[],S);if(f){var c={},l={},m={},h={},b=n._size;a.forEach(function(A,_){var y=A[0].trace;m[_]=y.index;var E=h[_]=y._fullInput.index;c[_]=e.data[E].dimensions,l[_]=e.data[E].dimensions.slice()});var u=function(A,_,y){var E=l[A][_],T=y.map(function(N){return N.slice()}),s="dimensions["+_+"].constraintrange",L=n._tracePreGUI[e._fullData[m[A]]._fullInput.uid];if(L[s]===void 0){var M=E.constraintrange;L[s]=M||null}var z=e._fullData[m[A]].dimensions[_];T.length?(T.length===1&&(T=T[0]),E.constraintrange=T,z.constraintrange=T.slice(),T=[T]):(delete E.constraintrange,delete z.constraintrange,T=null);var D={};D[s]=T,e.emit("plotly_restyle",[D,[h[A]]])},o=function(A){e.emit("plotly_hover",A)},d=function(A){e.emit("plotly_unhover",A)},w=function(A,_){var y=v(_,l[A].filter(i));c[A].sort(y),l[A].filter(function(E){return!i(E)}).sort(function(E){return l[A].indexOf(E)}).forEach(function(E){c[A].splice(c[A].indexOf(E),1),c[A].splice(l[A].indexOf(E),0,E)}),e.emit("plotly_restyle",[{dimensions:[c[A]]},[h[A]]])};g(e,a,{width:b.w,height:b.h,margin:{t:b.t,r:b.r,b:b.b,l:b.l}},{filterChanged:u,hover:o,unhover:d,axesMoved:w})}};p.reglPrecompiled=S},74996:function(G,U,t){var g=t(45464),C=t(86968).u,i=t(25376),S=t(22548),x=t(21776).Ks,v=t(21776).Gw,p=t(92880).extendFlat,r=t(98192).c,e=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});G.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:p({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:x({},{keys:["label","color","value","percent","text"]}),texttemplate:v({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:p({},e,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:p({},e,{}),outsidetextfont:p({},e,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:p({},e,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:C({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:p({},e,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(G,U,t){var g=t(7316);U.name="pie",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},45768:function(G,U,t){var g=t(38248),C=t(49760),i=t(76308),S={};function x(e,a){var n=[],f=e._fullLayout,c=f.hiddenlabels||[],l=a.labels,m=a.marker.colors||[],h=a.values,b=a._length,u=a._hasValues&&b,o,d;if(a.dlabel)for(l=new Array(b),o=0;o=0});var M=a.type==="funnelarea"?y:a.sort;return M&&n.sort(function(z,D){return D.v-z.v}),n[0]&&(n[0].vTotal=_),n}function v(e){return function(n,f){return!n||(n=C(n),!n.isValid())?!1:(n=i.addOpacity(n,n.getAlpha()),e[f]||(e[f]=n),n)}}function p(e,a){var n=(a||{}).type;n||(n="pie");var f=e._fullLayout,c=e.calcdata,l=f[n+"colorway"],m=f["_"+n+"colormap"];f["extend"+n+"colors"]&&(l=r(l,S));for(var h=0,b=0;b0){m=!0;break}}m||(l=0)}return{hasLabels:f,hasValues:c,len:l}}function r(a,n,f,c,l){var m=c("marker.line.width");m&&c("marker.line.color",l?void 0:f.paper_bgcolor);var h=c("marker.colors");v(c,"marker.pattern",h),a.marker&&!n.marker.pattern.fgcolor&&(n.marker.pattern.fgcolor=a.marker.colors),n.marker.pattern.bgcolor||(n.marker.pattern.bgcolor=f.paper_bgcolor)}function e(a,n,f,c){function l(L,M){return C.coerce(a,n,i,L,M)}var m=l("labels"),h=l("values"),b=p(m,h),u=b.len;if(n._hasLabels=b.hasLabels,n._hasValues=b.hasValues,!n._hasLabels&&n._hasValues&&(l("label0"),l("dlabel")),!u){n.visible=!1;return}n._length=u,r(a,n,c,l,!0),l("scalegroup");var o=l("text"),d=l("texttemplate"),w;if(d||(w=l("textinfo",C.isArrayOrTypedArray(o)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),d||w&&w!=="none"){var A=l("textposition");x(a,n,c,l,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(A)||A==="auto",y=_||A==="outside";y&&l("automargin"),(A==="inside"||A==="auto"||Array.isArray(A))&&l("insidetextorientation")}else w==="none"&&l("textposition","none");S(n,c,l);var E=l("hole"),T=l("title.text");if(T){var s=l("title.position",E?"middle center":"top center");!E&&s==="middle center"&&(n.title.position="top center"),C.coerceFont(l,"title.font",c.font)}l("sort"),l("direction"),l("rotation"),l("pull")}G.exports={handleLabelsAndValues:p,handleMarkerDefaults:r,supplyDefaults:e}},53644:function(G,U,t){var g=t(10624).appendArrayMultiPointValues;G.exports=function(i,S){var x={curveNumber:S.index,pointNumbers:i.pts,data:S._input,fullData:S,label:i.label,color:i.color,value:i.v,percent:i.percent,text:i.text,bbox:i.bbox,v:i.v};return i.pts.length===1&&(x.pointNumber=x.i=i.pts[0]),g(x,S,i.pts),S.type==="funnelarea"&&(delete x.v,delete x.i),x}},21552:function(G,U,t){var g=t(43616),C=t(76308);G.exports=function(S,x,v,p){var r=v.marker.pattern;r&&r.shape?g.pointStyle(S,v,p,x):C.fill(S,x.color)}},69656:function(G,U,t){var g=t(3400);function C(i){return i.indexOf("e")!==-1?i.replace(/[.]?0+e/,"e"):i.indexOf(".")!==-1?i.replace(/[.]?0+$/,""):i}U.formatPiePercent=function(S,x){var v=C((S*100).toPrecision(3));return g.numSeparate(v,x)+"%"},U.formatPieValue=function(S,x){var v=C(S.toPrecision(10));return g.numSeparate(v,x)},U.getFirstFilled=function(S,x){if(g.isArrayOrTypedArray(S))for(var v=0;v0&&(It+=le*kt.pxmid[0],re+=le*kt.pxmid[1])}kt.cxFinal=It,kt.cyFinal=re;function he(Jt,Wt,Ft,xt){var yt=xt*(Wt[0]-Jt[0]),Et=xt*(Wt[1]-Jt[1]);return"a"+xt*nt.r+","+xt*nt.r+" 0 "+kt.largeArc+(Ft?" 1 ":" 0 ")+yt+","+Et}var de=ct.hole;if(kt.v===nt.vTotal){var xe="M"+(It+kt.px0[0])+","+(re+kt.px0[1])+he(kt.px0,kt.pxmid,!0,1)+he(kt.pxmid,kt.px0,!0,1)+"Z";de?$t.attr("d","M"+(It+de*kt.px0[0])+","+(re+de*kt.px0[1])+he(kt.px0,kt.pxmid,!1,de)+he(kt.pxmid,kt.px0,!1,de)+"Z"+xe):$t.attr("d",xe)}else{var Se=he(kt.px0,kt.px1,!0,1);if(de){var ne=1-de;$t.attr("d","M"+(It+de*kt.px1[0])+","+(re+de*kt.px1[1])+he(kt.px1,kt.px0,!1,de)+"l"+ne*kt.px0[0]+","+ne*kt.px0[1]+Se+"Z")}else $t.attr("d","M"+It+","+re+"l"+kt.px0[0]+","+kt.px0[1]+Se+"Z")}ut(X,kt,nt);var zt=l.castOption(ct.textposition,kt.pts),Xt=Kt.selectAll("g.slicetext").data(kt.text&&zt!=="none"?[0]:[]);Xt.enter().append("g").classed("slicetext",!0),Xt.exit().remove(),Xt.each(function(){var Jt=v.ensureSingle(g.select(this),"text","",function(jt){jt.attr("data-notex",1)}),Wt=v.ensureUniformFontSize(X,zt==="outside"?d(ct,kt,Q.font):w(ct,kt,Q.font));Jt.text(kt.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,Wt).call(e.convertToTspans,X);var Ft=x.bBox(Jt.node()),xt;if(zt==="outside")xt=D(Ft,kt);else if(xt=_(Ft,kt,nt),zt==="auto"&&xt.scale<1){var yt=v.ensureUniformFontSize(X,ct.outsidetextfont);Jt.call(x.font,yt),Ft=x.bBox(Jt.node()),xt=D(Ft,kt)}var Et=xt.textPosAngle,Mt=Et===void 0?kt.pxmid:it(nt.r,Et);if(xt.targetX=It+Mt[0]*xt.rCenter+(xt.x||0),xt.targetY=re+Mt[1]*xt.rCenter+(xt.y||0),J(xt,Ft),xt.outside){var Nt=xt.targetY;kt.yLabelMin=Nt-Ft.height/2,kt.yLabelMid=Nt,kt.yLabelMax=Nt+Ft.height/2,kt.labelExtraX=0,kt.labelExtraY=0,wt=!0}xt.fontSize=Wt.size,n(ct.type,xt,Q),Z[Vt].transform=xt,v.setTransormAndDisplay(Jt,xt)})});var Rt=g.select(this).selectAll("g.titletext").data(ct.title.text?[0]:[]);if(Rt.enter().append("g").classed("titletext",!0),Rt.exit().remove(),Rt.each(function(){var kt=v.ensureSingle(g.select(this),"text","",function(re){re.attr("data-notex",1)}),Vt=ct.title.text;ct._meta&&(Vt=v.templateString(Vt,ct._meta)),kt.text(Vt).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,ct.title.font).call(e.convertToTspans,X);var It;ct.title.position==="middle center"?It=N(nt):It=I(nt,ot),kt.attr("transform",r(It.x,It.y)+p(Math.min(1,It.scale))+r(It.tx,It.ty))}),wt&&H(Tt,ct),u(gt,ct),wt&&ct.automargin){var bt=x.bBox(st.node()),At=ct.domain,mt=ot.w*(At.x[1]-At.x[0]),Lt=ot.h*(At.y[1]-At.y[0]),Ht=(.5*mt-nt.r)/ot.w,Ut=(.5*Lt-nt.r)/ot.h;C.autoMargin(X,"pie."+ct.uid+".automargin",{xl:At.x[0]-Ht,xr:At.x[1]+Ht,yb:At.y[0]-Ut,yt:At.y[1]+Ut,l:Math.max(nt.cx-nt.r-bt.left,0),r:Math.max(bt.right-(nt.cx+nt.r),0),b:Math.max(bt.bottom-(nt.cy+nt.r),0),t:Math.max(nt.cy-nt.r-bt.top,0),pad:5})}})});setTimeout(function(){$.selectAll("tspan").each(function(){var Z=g.select(this);Z.attr("dy")&&Z.attr("dy",Z.attr("dy"))})},0)}function u(X,tt){X.each(function(V){var Q=g.select(this);if(!V.labelExtraX&&!V.labelExtraY){Q.select("path.textline").remove();return}var ot=Q.select("g.slicetext text");V.transform.targetX+=V.labelExtraX,V.transform.targetY+=V.labelExtraY,v.setTransormAndDisplay(ot,V.transform);var $=V.cxFinal+V.pxmid[0],Z=V.cyFinal+V.pxmid[1],st="M"+$+","+Z,nt=(V.yLabelMax-V.yLabelMin)*(V.pxmid[0]<0?-1:1)/4;if(V.labelExtraX){var ct=V.labelExtraX*V.pxmid[1]/V.pxmid[0],gt=V.yLabelMid+V.labelExtraY-(V.cyFinal+V.pxmid[1]);Math.abs(ct)>Math.abs(gt)?st+="l"+gt*V.pxmid[0]/V.pxmid[1]+","+gt+"H"+($+V.labelExtraX+nt):st+="l"+V.labelExtraX+","+ct+"v"+(gt-ct)+"h"+nt}else st+="V"+(V.yLabelMid+V.labelExtraY)+"h"+nt;v.ensureSingle(Q,"path","textline").call(S.stroke,tt.outsidetextfont.color).attr({"stroke-width":Math.min(2,tt.outsidetextfont.size/8),d:st,fill:"none"})})}function o(X,tt,V){var Q=V[0],ot=Q.cx,$=Q.cy,Z=Q.trace,st=Z.type==="funnelarea";"_hasHoverLabel"in Z||(Z._hasHoverLabel=!1),"_hasHoverEvent"in Z||(Z._hasHoverEvent=!1),X.on("mouseover",function(nt){var ct=tt._fullLayout,gt=tt._fullData[Z.index];if(!(tt._dragging||ct.hovermode===!1)){var Tt=gt.hoverinfo;if(Array.isArray(Tt)&&(Tt=i.castHoverinfo({hoverinfo:[l.castOption(Tt,nt.pts)],_module:Z._module},ct,0)),Tt==="all"&&(Tt="label+text+value+percent+name"),gt.hovertemplate||Tt!=="none"&&Tt!=="skip"&&Tt){var wt=nt.rInscribed||0,Rt=ot+nt.pxmid[0]*(1-wt),bt=$+nt.pxmid[1]*(1-wt),At=ct.separators,mt=[];if(Tt&&Tt.indexOf("label")!==-1&&mt.push(nt.label),nt.text=l.castOption(gt.hovertext||gt.text,nt.pts),Tt&&Tt.indexOf("text")!==-1){var Lt=nt.text;v.isValidTextValue(Lt)&&mt.push(Lt)}nt.value=nt.v,nt.valueLabel=l.formatPieValue(nt.v,At),Tt&&Tt.indexOf("value")!==-1&&mt.push(nt.valueLabel),nt.percent=nt.v/Q.vTotal,nt.percentLabel=l.formatPiePercent(nt.percent,At),Tt&&Tt.indexOf("percent")!==-1&&mt.push(nt.percentLabel);var Ht=gt.hoverlabel,Ut=Ht.font,kt=[];i.loneHover({trace:Z,x0:Rt-wt*Q.r,x1:Rt+wt*Q.r,y:bt,_x0:st?ot+nt.TL[0]:Rt-wt*Q.r,_x1:st?ot+nt.TR[0]:Rt+wt*Q.r,_y0:st?$+nt.TL[1]:bt-wt*Q.r,_y1:st?$+nt.BL[1]:bt+wt*Q.r,text:mt.join("
    "),name:gt.hovertemplate||Tt.indexOf("name")!==-1?gt.name:void 0,idealAlign:nt.pxmid[0]<0?"left":"right",color:l.castOption(Ht.bgcolor,nt.pts)||nt.color,borderColor:l.castOption(Ht.bordercolor,nt.pts),fontFamily:l.castOption(Ut.family,nt.pts),fontSize:l.castOption(Ut.size,nt.pts),fontColor:l.castOption(Ut.color,nt.pts),nameLength:l.castOption(Ht.namelength,nt.pts),textAlign:l.castOption(Ht.align,nt.pts),hovertemplate:l.castOption(gt.hovertemplate,nt.pts),hovertemplateLabels:nt,eventData:[m(nt,gt)]},{container:ct._hoverlayer.node(),outerContainer:ct._paper.node(),gd:tt,inOut_bbox:kt}),nt.bbox=kt[0],Z._hasHoverLabel=!0}Z._hasHoverEvent=!0,tt.emit("plotly_hover",{points:[m(nt,gt)],event:g.event})}}),X.on("mouseout",function(nt){var ct=tt._fullLayout,gt=tt._fullData[Z.index],Tt=g.select(this).datum();Z._hasHoverEvent&&(nt.originalEvent=g.event,tt.emit("plotly_unhover",{points:[m(Tt,gt)],event:g.event}),Z._hasHoverEvent=!1),Z._hasHoverLabel&&(i.loneUnhover(ct._hoverlayer.node()),Z._hasHoverLabel=!1)}),X.on("click",function(nt){var ct=tt._fullLayout,gt=tt._fullData[Z.index];tt._dragging||ct.hovermode===!1||(tt._hoverdata=[m(nt,gt)],i.click(tt,g.event))})}function d(X,tt,V){var Q=l.castOption(X.outsidetextfont.color,tt.pts)||l.castOption(X.textfont.color,tt.pts)||V.color,ot=l.castOption(X.outsidetextfont.family,tt.pts)||l.castOption(X.textfont.family,tt.pts)||V.family,$=l.castOption(X.outsidetextfont.size,tt.pts)||l.castOption(X.textfont.size,tt.pts)||V.size;return{color:Q,family:ot,size:$}}function w(X,tt,V){var Q=l.castOption(X.insidetextfont.color,tt.pts);!Q&&X._input.textfont&&(Q=l.castOption(X._input.textfont.color,tt.pts));var ot=l.castOption(X.insidetextfont.family,tt.pts)||l.castOption(X.textfont.family,tt.pts)||V.family,$=l.castOption(X.insidetextfont.size,tt.pts)||l.castOption(X.textfont.size,tt.pts)||V.size;return{color:Q||S.contrast(tt.color),family:ot,size:$}}function A(X,tt){for(var V,Q,ot=0;ot=-4;Ht-=2)Lt(Math.PI*Ht,"tan");for(Ht=4;Ht>=-4;Ht-=2)Lt(Math.PI*(Ht+1),"tan")}if(Tt||Rt){for(Ht=4;Ht>=-4;Ht-=2)Lt(Math.PI*(Ht+1.5),"rad");for(Ht=4;Ht>=-4;Ht-=2)Lt(Math.PI*(Ht+.5),"rad")}}if(st||bt||Tt){var Ut=Math.sqrt(X.width*X.width+X.height*X.height);if(mt={scale:ot*Q*2/Ut,rCenter:1-ot,rotate:0},mt.textPosAngle=(tt.startangle+tt.stopangle)/2,mt.scale>=1)return mt;At.push(mt)}(bt||Rt)&&(mt=E(X,Q,Z,nt,ct),mt.textPosAngle=(tt.startangle+tt.stopangle)/2,At.push(mt)),(bt||wt)&&(mt=T(X,Q,Z,nt,ct),mt.textPosAngle=(tt.startangle+tt.stopangle)/2,At.push(mt));for(var kt=0,Vt=0,It=0;It=1)break}return At[kt]}function y(X,tt){var V=X.startangle,Q=X.stopangle;return V>tt&&tt>Q||V0?1:-1)/2,y:$/(1+V*V/(Q*Q)),outside:!0}}function N(X){var tt=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/tt,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function I(X,tt){var V=1,Q=1,ot,$=X.trace,Z={x:X.cx,y:X.cy},st={tx:0,ty:0};st.ty+=$.title.font.size,ot=O($),$.title.position.indexOf("top")!==-1?(Z.y-=(1+ot)*X.r,st.ty-=X.titleBox.height):$.title.position.indexOf("bottom")!==-1&&(Z.y+=(1+ot)*X.r);var nt=k(X.r,X.trace.aspectratio),ct=tt.w*($.domain.x[1]-$.domain.x[0])/2;return $.title.position.indexOf("left")!==-1?(ct=ct+nt,Z.x-=(1+ot)*nt,st.tx+=X.titleBox.width/2):$.title.position.indexOf("center")!==-1?ct*=2:$.title.position.indexOf("right")!==-1&&(ct=ct+nt,Z.x+=(1+ot)*nt,st.tx-=X.titleBox.width/2),V=ct/X.titleBox.width,Q=B(X,tt)/X.titleBox.height,{x:Z.x,y:Z.y,scale:Math.min(V,Q),tx:st.tx,ty:st.ty}}function k(X,tt){return X/(tt===void 0?1:tt)}function B(X,tt){var V=X.trace,Q=tt.h*(V.domain.y[1]-V.domain.y[0]);return Math.min(X.titleBox.height,Q/2)}function O(X){var tt=X.pull;if(!tt)return 0;var V;if(v.isArrayOrTypedArray(tt))for(tt=0,V=0;Vtt&&(tt=X.pull[V]);return tt}function H(X,tt){var V,Q,ot,$,Z,st,nt,ct,gt,Tt,wt,Rt,bt;function At(Ut,kt){return Ut.pxmid[1]-kt.pxmid[1]}function mt(Ut,kt){return kt.pxmid[1]-Ut.pxmid[1]}function Lt(Ut,kt){kt||(kt={});var Vt=kt.labelExtraY+(Q?kt.yLabelMax:kt.yLabelMin),It=Q?Ut.yLabelMin:Ut.yLabelMax,re=Q?Ut.yLabelMax:Ut.yLabelMin,Kt=Ut.cyFinal+Z(Ut.px0[1],Ut.px1[1]),$t=Vt-It,le,he,de,xe,Se,ne;if($t*nt>0&&(Ut.labelExtraY=$t),!!v.isArrayOrTypedArray(tt.pull))for(he=0;he=(l.castOption(tt.pull,de.pts)||0))&&((Ut.pxmid[1]-de.pxmid[1])*nt>0?(xe=de.cyFinal+Z(de.px0[1],de.px1[1]),$t=xe-It-Ut.labelExtraY,$t*nt>0&&(Ut.labelExtraY+=$t)):(re+Ut.labelExtraY-Kt)*nt>0&&(le=3*st*Math.abs(he-Tt.indexOf(Ut)),Se=de.cxFinal+$(de.px0[0],de.px1[0]),ne=Se+le-(Ut.cxFinal+Ut.pxmid[0])-Ut.labelExtraX,ne*st>0&&(Ut.labelExtraX+=ne)))}for(Q=0;Q<2;Q++)for(ot=Q?At:mt,Z=Q?Math.max:Math.min,nt=Q?1:-1,V=0;V<2;V++){for($=V?Math.max:Math.min,st=V?1:-1,ct=X[Q][V],ct.sort(ot),gt=X[1-Q][V],Tt=gt.concat(ct),Rt=[],wt=0;wt1?(ct=V.r,gt=ct/ot.aspectratio):(gt=V.r,ct=gt*ot.aspectratio),ct*=(1+ot.baseratio)/2,nt=ct*gt}Z=Math.min(Z,nt/V.vTotal)}for(Q=0;Qtt.vTotal/2?1:0,ct.halfangle=Math.PI*Math.min(ct.v/tt.vTotal,.5),ct.ring=1-Q.hole,ct.rInscribed=z(ct,tt))}function it(X,tt){return[X*Math.sin(tt),-X*Math.cos(tt)]}function ut(X,tt,V){var Q=X._fullLayout,ot=V.trace,$=ot.texttemplate,Z=ot.textinfo;if(!$&&Z&&Z!=="none"){var st=Z.split("+"),nt=function(kt){return st.indexOf(kt)!==-1},ct=nt("label"),gt=nt("text"),Tt=nt("value"),wt=nt("percent"),Rt=Q.separators,bt;if(bt=ct?[tt.label]:[],gt){var At=l.getFirstFilled(ot.text,tt.pts);h(At)&&bt.push(At)}Tt&&bt.push(l.formatPieValue(tt.v,Rt)),wt&&bt.push(l.formatPiePercent(tt.v/V.vTotal,Rt)),tt.text=bt.join("
    ")}function mt(kt){return{label:kt.label,value:kt.v,valueLabel:l.formatPieValue(kt.v,Q.separators),percent:kt.v/V.vTotal,percentLabel:l.formatPiePercent(kt.v/V.vTotal,Q.separators),color:kt.color,text:kt.text,customdata:v.castOption(ot,kt.i,"customdata")}}if($){var Lt=v.castOption(ot,tt.i,"texttemplate");if(!Lt)tt.text="";else{var Ht=mt(tt),Ut=l.getFirstFilled(ot.text,tt.pts);(h(Ut)||Ut==="")&&(Ht.text=Ut),tt.text=v.texttemplateString(Lt,Ht,X._fullLayout._d3locale,Ht,ot._meta||{})}}}function J(X,tt){var V=X.rotate*Math.PI/180,Q=Math.cos(V),ot=Math.sin(V),$=(tt.left+tt.right)/2,Z=(tt.top+tt.bottom)/2;X.textX=$*Q-Z*ot,X.textY=$*ot+Z*Q,X.noCenter=!0}G.exports={plot:b,formatSliceLabel:ut,transformInsideText:_,determineInsideTextFont:w,positionTitleOutside:I,prerenderTitles:A,layoutAreas:Y,attachFxHandlers:o,computeTransform:J}},22152:function(G,U,t){var g=t(33428),C=t(10528),i=t(82744).resizeText;G.exports=function(x){var v=x._fullLayout._pielayer.selectAll(".trace");i(x,v,"pie"),v.each(function(p){var r=p[0],e=r.trace,a=g.select(this);a.style({opacity:e.opacity}),a.selectAll("path.surface").each(function(n){g.select(this).call(C,n,e,x)})})}},10528:function(G,U,t){var g=t(76308),C=t(69656).castOption,i=t(21552);G.exports=function(x,v,p,r){var e=p.marker.line,a=C(e.color,v.pts)||g.defaultLine,n=C(e.width,v.pts)||0;x.call(i,v,p,r).style("stroke-width",n).call(g.stroke,a)}},35484:function(G,U,t){var g=t(52904);G.exports={x:g.x,y:g.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:g.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},11072:function(G,U,t){var g=t(67792).gl_pointcloud2d,C=t(3400).isArrayOrTypedArray,i=t(43080),S=t(19280).findExtremes,x=t(44928);function v(e,a){this.scene=e,this.uid=a,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=g(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var p=v.prototype;p.handlePick=function(e){var a=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[a*2],this.pickXYData[a*2+1]]:[this.pickXData[a],this.pickYData[a]],textLabel:C(this.textLabels)?this.textLabels[a]:this.textLabels,color:this.color,name:this.name,pointIndex:a,hoverinfo:this.hoverinfo}},p.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=x(e,{})},p.updateFast=function(e){var a=this.xData=this.pickXData=e.x,n=this.yData=this.pickYData=e.y,f=this.pickXYData=e.xy,c=e.xbounds&&e.ybounds,l=e.indices,m,h,b,u=this.bounds,o,d,w;if(f){if(b=f,m=f.length>>>1,c)u[0]=e.xbounds[0],u[2]=e.xbounds[1],u[1]=e.ybounds[0],u[3]=e.ybounds[1];else for(w=0;wu[2]&&(u[2]=o),du[3]&&(u[3]=d);if(l)h=l;else for(h=new Int32Array(m),w=0;wu[2]&&(u[2]=o),du[3]&&(u[3]=d);this.idToIndex=h,this.pointcloudOptions.idToIndex=h,this.pointcloudOptions.positions=b;var A=i(e.marker.color),_=i(e.marker.border.color),y=e.opacity*e.marker.opacity;A[3]*=y,this.pointcloudOptions.color=A;var E=e.marker.blend;if(E===null){var T=100;E=a.length_&&(_=n.source[o]),n.target[o]>_&&(_=n.target[o]);var y=_+1;e.node._count=y;var E,T=e.node.groups,s={};for(o=0;o0&&x(I,y)&&x(k,y)&&!(s.hasOwnProperty(I)&&s.hasOwnProperty(k)&&s[I]===s[k])){s.hasOwnProperty(k)&&(k=s[k]),s.hasOwnProperty(I)&&(I=s[I]),I=+I,k=+k,h[I]=h[k]=!0;var B="";n.label&&n.label[o]&&(B=n.label[o]);var O=null;B&&b.hasOwnProperty(B)&&(O=b[B]),f.push({pointNumber:o,label:B,color:c?n.color[o]:n.color,hovercolor:l?n.hovercolor[o]:n.hovercolor,customdata:m?n.customdata[o]:n.customdata,concentrationscale:O,source:I,target:k,value:+N}),D.source.push(I),D.target.push(k)}}var H=y+T.length,Y=S(a.color),j=S(a.customdata),et=[];for(o=0;oy-1,childrenNodes:[],pointNumber:o,label:it,color:Y?a.color[o]:a.color,customdata:j?a.customdata[o]:a.customdata})}var ut=!1;return r(H,D.source,D.target)&&(ut=!0),{circular:ut,links:f,nodes:et,groups:T,groupLookup:s}}function r(e,a,n){for(var f=C.init2dArray(e,0),c=0;c1})}G.exports=function(a,n){var f=p(n);return i({circular:f.circular,_nodes:f.nodes,_links:f.links,_groups:f.groups,_groupLookup:f.groupLookup})}},11820:function(G){G.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},47140:function(G,U,t){var g=t(3400),C=t(41440),i=t(76308),S=t(49760),x=t(86968).Q,v=t(16132),p=t(31780),r=t(51272);G.exports=function(n,f,c,l){function m(z,D){return g.coerce(n,f,C,z,D)}var h=g.extendDeep(l.hoverlabel,n.hoverlabel),b=n.node,u=p.newContainer(f,"node");function o(z,D){return g.coerce(b,u,C.node,z,D)}o("label"),o("groups"),o("x"),o("y"),o("pad"),o("thickness"),o("line.color"),o("line.width"),o("hoverinfo",n.hoverinfo),v(b,u,o,h),o("hovertemplate"),o("align");var d=l.colorway,w=function(z){return d[z%d.length]};o("color",u.label.map(function(z,D){return i.addOpacity(w(D),.8)})),o("customdata");var A=n.link||{},_=p.newContainer(f,"link");function y(z,D){return g.coerce(A,_,C.link,z,D)}y("label"),y("arrowlen"),y("source"),y("target"),y("value"),y("line.color"),y("line.width"),y("hoverinfo",n.hoverinfo),v(A,_,y,h),y("hovertemplate");var E=S(l.paper_bgcolor).getLuminance()<.333,T=E?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",s=y("color",T);function L(z){var D=S(z);if(!D.isValid())return z;var N=D.getAlpha();return N<=.8?D.setAlpha(N+.2):D=E?D.brighten():D.darken(),D.toRgbString()}y("hovercolor",Array.isArray(s)?s.map(L):L(s)),y("customdata"),r(A,_,{name:"colorscales",handleItemDefaults:e}),x(f,l,m),m("orientation"),m("valueformat"),m("valuesuffix");var M;u.x.length&&u.y.length&&(M="freeform"),m("arrangement",M),g.coerceFont(m,"textfont",g.extendFlat({},l.font)),f._length=null};function e(a,n){function f(c,l){return g.coerce(a,n,C.link.colorscales,c,l)}f("label"),f("cmin"),f("cmax"),f("colorscale")}},45499:function(G,U,t){G.exports={attributes:t(41440),supplyDefaults:t(47140),calc:t(48068),plot:t(59596),moduleType:"trace",name:"sankey",basePlotModule:t(10760),selectPoints:t(81128),categories:["noOpacity"],meta:{}}},59596:function(G,U,t){var g=t(33428),C=t(3400),i=C.numberFormat,S=t(83248),x=t(93024),v=t(76308),p=t(11820).cn,r=C._;function e(d){return d!==""}function a(d,w){return d.filter(function(A){return A.key===w.traceId})}function n(d,w){g.select(d).select("path").style("fill-opacity",w),g.select(d).select("rect").style("fill-opacity",w)}function f(d){g.select(d).select("text.name").style("fill","black")}function c(d){return function(w){return d.node.sourceLinks.indexOf(w.link)!==-1||d.node.targetLinks.indexOf(w.link)!==-1}}function l(d){return function(w){return w.node.sourceLinks.indexOf(d.link)!==-1||w.node.targetLinks.indexOf(d.link)!==-1}}function m(d,w,A){w&&A&&a(A,w).selectAll("."+p.sankeyLink).filter(c(w)).call(b.bind(0,w,A,!1))}function h(d,w,A){w&&A&&a(A,w).selectAll("."+p.sankeyLink).filter(c(w)).call(u.bind(0,w,A,!1))}function b(d,w,A,_){_.style("fill",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverHue}).style("fill-opacity",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverAlpha}),_.each(function(y){var E=y.link.label;E!==""&&a(w,d).selectAll("."+p.sankeyLink).filter(function(T){return T.link.label===E}).style("fill",function(T){if(!T.link.concentrationscale)return T.tinyColorHoverHue}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.tinyColorHoverAlpha})}),A&&a(w,d).selectAll("."+p.sankeyNode).filter(l(d)).call(m)}function u(d,w,A,_){_.style("fill",function(y){return y.tinyColorHue}).style("fill-opacity",function(y){return y.tinyColorAlpha}),_.each(function(y){var E=y.link.label;E!==""&&a(w,d).selectAll("."+p.sankeyLink).filter(function(T){return T.link.label===E}).style("fill",function(T){return T.tinyColorHue}).style("fill-opacity",function(T){return T.tinyColorAlpha})}),A&&a(w,d).selectAll(p.sankeyNode).filter(l(d)).call(h)}function o(d,w){var A=d.hoverlabel||{},_=C.nestedProperty(A,w).get();return Array.isArray(_)?!1:_}G.exports=function(w,A){for(var _=w._fullLayout,y=_._paper,E=_._size,T=0;T"),color:o(J,"bgcolor")||v.addOpacity(ot.color,1),borderColor:o(J,"bordercolor"),fontFamily:o(J,"font.family"),fontSize:o(J,"font.size"),fontColor:o(J,"font.color"),nameLength:o(J,"namelength"),textAlign:o(J,"align"),idealAlign:g.event.x<$[0]?"right":"left",hovertemplate:J.hovertemplate,hovertemplateLabels:Z,eventData:[ot]})}}var st=x.loneHover(X,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:w,anchorIndex:V});st.each(function(){var nt=this;ut.link.concentrationscale||n(nt,.65),f(nt)})},O=function(it,ut,J){w._fullLayout.hovermode!==!1&&(g.select(it).call(u.bind(0,ut,J,!0)),ut.link.trace.link.hoverinfo!=="skip"&&(ut.link.fullData=ut.link.trace,w.emit("plotly_unhover",{event:g.event,points:[ut.link]})),x.loneUnhover(_._hoverlayer.node()))},H=function(it,ut,J){var X=ut.node;X.originalEvent=g.event,w._hoverdata=[X],g.select(it).call(h,ut,J),x.click(w,{target:!0})},Y=function(it,ut,J){w._fullLayout.hovermode!==!1&&(g.select(it).call(m,ut,J),ut.node.trace.node.hoverinfo!=="skip"&&(ut.node.fullData=ut.node.trace,w.emit("plotly_hover",{event:g.event,points:[ut.node]})))},j=function(it,ut){if(w._fullLayout.hovermode!==!1){var J=ut.node.trace.node;if(!(J.hoverinfo==="none"||J.hoverinfo==="skip")){var X=g.select(it).select("."+p.nodeRect),tt=w._fullLayout._paperdiv.node().getBoundingClientRect(),V=X.node().getBoundingClientRect(),Q=V.left-2-tt.left,ot=V.right+2-tt.left,$=V.top+V.height/4-tt.top,Z={valueLabel:i(ut.valueFormat)(ut.node.value)+ut.valueSuffix};ut.node.fullData=ut.node.trace,w._fullLayout._calcInverseTransform(w);var st=w._fullLayout._invScaleX,nt=w._fullLayout._invScaleY,ct=x.loneHover({x0:st*Q,x1:st*ot,y:nt*$,name:i(ut.valueFormat)(ut.node.value)+ut.valueSuffix,text:[ut.node.label,I+ut.node.targetLinks.length,k+ut.node.sourceLinks.length].filter(e).join("
    "),color:o(J,"bgcolor")||ut.tinyColorHue,borderColor:o(J,"bordercolor"),fontFamily:o(J,"font.family"),fontSize:o(J,"font.size"),fontColor:o(J,"font.color"),nameLength:o(J,"namelength"),textAlign:o(J,"align"),idealAlign:"left",hovertemplate:J.hovertemplate,hovertemplateLabels:Z,eventData:[ut.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:w});n(ct,.85),f(ct)}}},et=function(it,ut,J){w._fullLayout.hovermode!==!1&&(g.select(it).call(h,ut,J),ut.node.trace.node.hoverinfo!=="skip"&&(ut.node.fullData=ut.node.trace,w.emit("plotly_unhover",{event:g.event,points:[ut.node]})),x.loneUnhover(_._hoverlayer.node()))};S(w,y,A,{width:E.w,height:E.h,margin:{t:E.t,r:E.r,b:E.b,l:E.l}},{linkEvents:{hover:M,follow:B,unhover:O,select:L},nodeEvents:{hover:Y,follow:j,unhover:et,select:H}})}},83248:function(G,U,t){var g=t(49812),C=t(67756).Gz,i=t(33428),S=t(26800),x=t(48932),v=t(11820),p=t(49760),r=t(76308),e=t(43616),a=t(3400),n=a.strTranslate,f=a.strRotate,c=t(71688),l=c.keyFun,m=c.repeat,h=c.unwrap,b=t(72736),u=t(24040),o=t(84284),d=o.CAP_SHIFT,w=o.LINE_SPACING,A=3;function _(tt,V,Q){var ot=h(V),$=ot.trace,Z=$.domain,st=$.orientation==="h",nt=$.node.pad,ct=$.node.thickness,gt={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[$.node.align],Tt=tt.width*(Z.x[1]-Z.x[0]),wt=tt.height*(Z.y[1]-Z.y[0]),Rt=ot._nodes,bt=ot._links,At=ot.circular,mt;At?mt=x.sankeyCircular().circularLinkGap(0):mt=S.sankey(),mt.iterations(v.sankeyIterations).size(st?[Tt,wt]:[wt,Tt]).nodeWidth(ct).nodePadding(nt).nodeId(function(ne){return ne.pointNumber}).nodeAlign(gt).nodes(Rt).links(bt);var Lt=mt();mt.nodePadding()=Wt||(Jt=Wt-Xt.y0,Jt>1e-6&&(Xt.y0+=Jt,Xt.y1+=Jt)),Wt=Xt.y1+nt})}function he(ne){var zt=ne.map(function(Et,Mt){return{x0:Et.x0,index:Mt}}).sort(function(Et,Mt){return Et.x0-Mt.x0}),Xt=[],Jt=-1,Wt,Ft=-1/0,xt;for(Ht=0;HtFt+ct&&(Jt+=1,Wt=yt.x0),Ft=yt.x0,Xt[Jt]||(Xt[Jt]=[]),Xt[Jt].push(yt),xt=Wt-yt.x0,yt.x0+=xt,yt.x1+=xt}return Xt}if($.node.x.length&&$.node.y.length){for(Ht=0;Ht0?"L"+$.targetX+" "+$.targetY:"")+"Z":Q="M "+($.targetX-V)+" "+($.targetY-ot)+" L"+($.rightInnerExtent-V)+" "+($.targetY-ot)+"A"+($.rightLargeArcRadius+ot)+" "+($.rightSmallArcRadius+ot)+" 0 0 0 "+($.rightFullExtent-ot-V)+" "+($.targetY+$.rightSmallArcRadius)+"L"+($.rightFullExtent-ot-V)+" "+$.verticalRightInnerExtent+"A"+($.rightLargeArcRadius+ot)+" "+($.rightLargeArcRadius+ot)+" 0 0 0 "+($.rightInnerExtent-V)+" "+($.verticalFullExtent+ot)+"L"+$.leftInnerExtent+" "+($.verticalFullExtent+ot)+"A"+($.leftLargeArcRadius+ot)+" "+($.leftLargeArcRadius+ot)+" 0 0 0 "+($.leftFullExtent+ot)+" "+$.verticalLeftInnerExtent+"L"+($.leftFullExtent+ot)+" "+($.sourceY+$.leftSmallArcRadius)+"A"+($.leftLargeArcRadius+ot)+" "+($.leftSmallArcRadius+ot)+" 0 0 0 "+$.leftInnerExtent+" "+($.sourceY-ot)+"L"+$.sourceX+" "+($.sourceY-ot)+"L"+$.sourceX+" "+($.sourceY+ot)+"L"+$.leftInnerExtent+" "+($.sourceY+ot)+"A"+($.leftLargeArcRadius-ot)+" "+($.leftSmallArcRadius-ot)+" 0 0 1 "+($.leftFullExtent-ot)+" "+($.sourceY+$.leftSmallArcRadius)+"L"+($.leftFullExtent-ot)+" "+$.verticalLeftInnerExtent+"A"+($.leftLargeArcRadius-ot)+" "+($.leftLargeArcRadius-ot)+" 0 0 1 "+$.leftInnerExtent+" "+($.verticalFullExtent-ot)+"L"+($.rightInnerExtent-V)+" "+($.verticalFullExtent-ot)+"A"+($.rightLargeArcRadius-ot)+" "+($.rightLargeArcRadius-ot)+" 0 0 1 "+($.rightFullExtent+ot-V)+" "+$.verticalRightInnerExtent+"L"+($.rightFullExtent+ot-V)+" "+($.targetY+$.rightSmallArcRadius)+"A"+($.rightLargeArcRadius-ot)+" "+($.rightSmallArcRadius-ot)+" 0 0 1 "+($.rightInnerExtent-V)+" "+($.targetY+ot)+"L"+($.targetX-V)+" "+($.targetY+ot)+(V>0?"L"+$.targetX+" "+$.targetY:"")+"Z",Q}function T(){var tt=.5;function V(Q){var ot=Q.linkArrowLength;if(Q.link.circular)return E(Q.link,ot);var $=Math.abs((Q.link.target.x0-Q.link.source.x1)/2);ot>$&&(ot=$);var Z=Q.link.source.x1,st=Q.link.target.x0-ot,nt=C(Z,st),ct=nt(tt),gt=nt(1-tt),Tt=Q.link.y0-Q.link.width/2,wt=Q.link.y0+Q.link.width/2,Rt=Q.link.y1-Q.link.width/2,bt=Q.link.y1+Q.link.width/2,At="M"+Z+","+Tt,mt="C"+ct+","+Tt+" "+gt+","+Rt+" "+st+","+Rt,Lt="C"+gt+","+bt+" "+ct+","+wt+" "+Z+","+wt,Ht=ot>0?"L"+(st+ot)+","+(Rt+Q.link.width/2):"";return Ht+="L"+st+","+bt,At+mt+Ht+Lt+"Z"}return V}function s(tt,V){var Q=p(V.color),ot=v.nodePadAcross,$=tt.nodePad/2;V.dx=V.x1-V.x0,V.dy=V.y1-V.y0;var Z=V.dx,st=Math.max(.5,V.dy),nt="node_"+V.pointNumber;return V.group&&(nt=a.randstr()),V.trace=tt.trace,V.curveNumber=tt.trace.index,{index:V.pointNumber,key:nt,partOfGroup:V.partOfGroup||!1,group:V.group,traceId:tt.key,trace:tt.trace,node:V,nodePad:tt.nodePad,nodeLineColor:tt.nodeLineColor,nodeLineWidth:tt.nodeLineWidth,textFont:tt.textFont,size:tt.horizontal?tt.height:tt.width,visibleWidth:Math.ceil(Z),visibleHeight:st,zoneX:-ot,zoneY:-$,zoneWidth:Z+2*ot,zoneHeight:st+2*$,labelY:tt.horizontal?V.dy/2+1:V.dx/2+1,left:V.originalLayer===1,sizeAcross:tt.width,forceLayouts:tt.forceLayouts,horizontal:tt.horizontal,darkBackground:Q.getBrightness()<=128,tinyColorHue:r.tinyRGB(Q),tinyColorAlpha:Q.getAlpha(),valueFormat:tt.valueFormat,valueSuffix:tt.valueSuffix,sankey:tt.sankey,graph:tt.graph,arrangement:tt.arrangement,uniqueNodeLabelPathId:[tt.guid,tt.key,nt].join("_"),interactionState:tt.interactionState,figure:tt}}function L(tt){tt.attr("transform",function(V){return n(V.node.x0.toFixed(3),V.node.y0.toFixed(3))})}function M(tt){tt.call(L)}function z(tt,V){tt.call(M),V.attr("d",T())}function D(tt){tt.attr("width",function(V){return V.node.x1-V.node.x0}).attr("height",function(V){return V.visibleHeight})}function N(tt){return tt.link.width>1||tt.linkLineWidth>0}function I(tt){var V=n(tt.translateX,tt.translateY);return V+(tt.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function k(tt,V,Q){tt.on(".basic",null).on("mouseover.basic",function(ot){!ot.interactionState.dragInProgress&&!ot.partOfGroup&&(Q.hover(this,ot,V),ot.interactionState.hovered=[this,ot])}).on("mousemove.basic",function(ot){!ot.interactionState.dragInProgress&&!ot.partOfGroup&&(Q.follow(this,ot),ot.interactionState.hovered=[this,ot])}).on("mouseout.basic",function(ot){!ot.interactionState.dragInProgress&&!ot.partOfGroup&&(Q.unhover(this,ot,V),ot.interactionState.hovered=!1)}).on("click.basic",function(ot){ot.interactionState.hovered&&(Q.unhover(this,ot,V),ot.interactionState.hovered=!1),!ot.interactionState.dragInProgress&&!ot.partOfGroup&&Q.select(this,ot,V)})}function B(tt,V,Q,ot){var $=i.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(a.ensureSingle(ot._fullLayout._infolayer,"g","dragcover",function(nt){ot._fullLayout._dragCover=nt}),a.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,it(Z.node),Z.interactionState.hovered&&(Q.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var st=Z.traceId+"|"+Z.key;Z.forceLayouts[st]?Z.forceLayouts[st].alpha(1):O(tt,st,Z),H(tt,V,Z,st,ot)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var st=i.event.x,nt=i.event.y;Z.arrangement==="snap"?(Z.node.x0=st-Z.visibleWidth/2,Z.node.x1=st+Z.visibleWidth/2,Z.node.y0=nt-Z.visibleHeight/2,Z.node.y1=nt+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=st-Z.visibleWidth/2,Z.node.x1=st+Z.visibleWidth/2),nt=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,nt)),Z.node.y0=nt-Z.visibleHeight/2,Z.node.y1=nt+Z.visibleHeight/2),it(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(tt.filter(ut(Z)),V))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var st=0;st0)window.requestAnimationFrame(Z);else{var ct=Q.node.originalX;Q.node.x0=ct-Q.visibleWidth/2,Q.node.x1=ct+Q.visibleWidth/2,j(Q,$)}})}function Y(tt,V,Q,ot){return function(){for(var Z=0,st=0;st0&&ot.forceLayouts[V].alpha(0)}}function j(tt,V){for(var Q=[],ot=[],$=0;$I&&L[B].gap;)B--;for(H=L[B].s,k=L.length-1;k>B;k--)L[k].s=H;for(;ID[h]&&h=0;c--){var l=x[c];if(l.type==="scatter"&&l.xaxis===n.xaxis&&l.yaxis===n.yaxis){l.opacity=void 0;break}}}}}},18800:function(G,U,t){var g=t(3400),C=t(24040),i=t(52904),S=t(88200),x=t(43028),v=t(43980),p=t(31147),r=t(43912),e=t(74428),a=t(66828),n=t(11731),f=t(124),c=t(70840),l=t(3400).coercePattern;G.exports=function(h,b,u,o){function d(L,M){return g.coerce(h,b,i,L,M)}var w=v(h,b,o,d);if(w||(b.visible=!1),!!b.visible){p(h,b,o,d),d("xhoverformat"),d("yhoverformat");var A=r(h,b,o,d);o.scattermode==="group"&&b.orientation===void 0&&d("orientation","v");var _=!A&&w=Math.min(it,ut)&&h<=Math.max(it,ut)?0:1/0}var J=Math.max(3,et.mrc||0),X=1-1/J,tt=Math.abs(l.c2p(et.x)-h);return tt=Math.min(it,ut)&&b<=Math.max(it,ut)?0:1/0}var J=Math.max(3,et.mrc||0),X=1-1/J,tt=Math.abs(m.c2p(et.y)-b);return ttQ!=Tt>=Q&&(nt=Z[$-1][0],ct=Z[$][0],Tt-gt&&(st=nt+(ct-nt)*(Q-gt)/(Tt-gt),J=Math.min(J,st),X=Math.max(X,st)));return J=Math.max(J,0),X=Math.min(X,l._length),{x0:J,x1:X,y0:Q,y1:Q}}if(o.indexOf("fills")!==-1&&c._fillElement){var H=B(c._fillElement)&&!B(c._fillExclusionElement);if(H){var Y=O(c._polygons);Y===null&&(Y={x0:u[0],x1:u[0],y0:u[1],y1:u[1]});var j=x.defaultLine;return x.opacity(c.fillcolor)?j=c.fillcolor:x.opacity((c.line||{}).color)&&(j=c.line.color),g.extendFlat(r,{distance:r.maxHoverDistance,x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1,color:j,hovertemplate:!1}),delete r.index,c.text&&!g.isArrayOrTypedArray(c.text)?r.text=String(c.text):r.text=c.name,[r]}}}},65875:function(G,U,t){var g=t(43028);G.exports={hasLines:g.hasLines,hasMarkers:g.hasMarkers,hasText:g.hasText,isBubble:g.isBubble,attributes:t(52904),layoutAttributes:t(55308),supplyDefaults:t(18800),crossTraceDefaults:t(35036),supplyLayoutDefaults:t(59748),calc:t(16356).calc,crossTraceCalc:t(96664),arraysToCalcdata:t(20148),plot:t(96504),colorbar:t(5528),formatLabels:t(76688),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(98723),selectPoints:t(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:t(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308:function(G){G.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},59748:function(G,U,t){var g=t(3400),C=t(55308);G.exports=function(i,S){function x(p,r){return g.coerce(i,S,C,p,r)}var v=S.barmode==="group";S.scattermode==="group"&&x("scattergap",v?S.bargap:.2)}},66828:function(G,U,t){var g=t(3400).isArrayOrTypedArray,C=t(94288).hasColorscale,i=t(27260);G.exports=function(x,v,p,r,e,a){a||(a={});var n=(x.marker||{}).color;if(n&&n._inputArray&&(n=n._inputArray),e("line.color",p),C(x,"line"))i(x,v,r,e,{prefix:"line.",cLetter:"c"});else{var f=(g(n)?!1:n)||p;e("line.color",f)}e("line.width"),a.noDash||e("line.dash"),a.backoff&&e("line.backoff")}},52340:function(G,U,t){var g=t(43616),C=t(39032),i=C.BADNUM,S=C.LOG_CLIP,x=S+.5,v=S-.5,p=t(3400),r=p.segmentsIntersect,e=p.constrain,a=t(88200);G.exports=function(f,c){var l=c.trace||{},m=c.xaxis,h=c.yaxis,b=m.type==="log",u=h.type==="log",o=m._length,d=h._length,w=c.backoff,A=l.marker,_=c.connectGaps,y=c.baseTolerance,E=c.shape,T=E==="linear",s=l.fill&&l.fill!=="none",L=[],M=a.minTolerance,z=f.length,D=new Array(z),N=0,I,k,B,O,H,Y,j,et,it,ut,J,X,tt,V,Q,ot;function $(me){var be=f[me];if(!be)return!1;var ve=c.linearized?m.l2p(be.x):m.c2p(be.x),Le=c.linearized?h.l2p(be.y):h.c2p(be.y);if(ve===i){if(b&&(ve=m.c2p(be.x,!0)),ve===i)return!1;u&&Le===i&&(ve*=Math.abs(m._m*d*(m._m>0?x:v)/(h._m*o*(h._m>0?x:v)))),ve*=1e3}if(Le===i){if(u&&(Le=h.c2p(be.y,!0)),Le===i)return!1;Le*=1e3}return[ve,Le]}function Z(me,be,ve,Le){var ce=ve-me,Te=Le-be,Be=.5-me,ir=.5-be,pe=ce*ce+Te*Te,Xe=ce*Be+Te*ir;if(Xe>0&&Xe1||Math.abs(Be.y-ve[0][1])>1)&&(Be=[Be.x,Be.y],Le&>(Be,me)Rt||me[1]At)return[e(me[0],wt,Rt),e(me[1],bt,At)]}function $t(me,be){if(me[0]===be[0]&&(me[0]===wt||me[0]===Rt)||me[1]===be[1]&&(me[1]===bt||me[1]===At))return!0}function le(me,be){var ve=[],Le=Kt(me),ce=Kt(be);return Le&&ce&&$t(Le,ce)||(Le&&ve.push(Le),ce&&ve.push(ce)),ve}function he(me,be,ve){return function(Le,ce){var Te=Kt(Le),Be=Kt(ce),ir=[];if(Te&&Be&&$t(Te,Be))return ir;Te&&ir.push(Te),Be&&ir.push(Be);var pe=2*p.constrain((Le[me]+ce[me])/2,be,ve)-((Te||Le)[me]+(Be||ce)[me]);if(pe){var Xe;Te&&Be?Xe=pe>0==Te[me]>Be[me]?Te:Be:Xe=Te||Be,Xe[me]+=pe}return ir}}var de;E==="linear"||E==="spline"?de=re:E==="hv"||E==="vh"?de=le:E==="hvh"?de=he(0,wt,Rt):E==="vhv"&&(de=he(1,bt,At));function xe(me,be){var ve=be[0]-me[0],Le=(be[1]-me[1])/ve,ce=(me[1]*be[0]-be[1]*me[0])/ve;return ce>0?[Le>0?wt:Rt,At]:[Le>0?Rt:wt,bt]}function Se(me){var be=me[0],ve=me[1],Le=be===D[N-1][0],ce=ve===D[N-1][1];if(!(Le&&ce))if(N>1){var Te=be===D[N-2][0],Be=ve===D[N-2][1];Le&&(be===wt||be===Rt)&&Te?Be?N--:D[N-1]=me:ce&&(ve===bt||ve===At)&&Be?Te?N--:D[N-1]=me:D[N++]=me}else D[N++]=me}function ne(me){D[N-1][0]!==me[0]&&D[N-1][1]!==me[1]&&Se([Ut,kt]),Se(me),Vt=null,Ut=kt=0}var zt=p.isArrayOrTypedArray(A);function Xt(me){if(me&&w&&(me.i=I,me.d=f,me.trace=l,me.marker=zt?A[me.i]:A,me.backoff=w),st=me[0]/o,nt=me[1]/d,Lt=me[0]Rt?Rt:0,Ht=me[1]At?At:0,Lt||Ht){if(!N)D[N++]=[Lt||me[0],Ht||me[1]];else if(Vt){var be=de(Vt,me);be.length>1&&(ne(be[0]),D[N++]=be[1])}else It=de(D[N-1],me)[0],D[N++]=It;var ve=D[N-1];Lt&&Ht&&(ve[0]!==Lt||ve[1]!==Ht)?(Vt&&(Ut!==Lt&&kt!==Ht?Se(Ut&&kt?xe(Vt,me):[Ut||Lt,kt||Ht]):Ut&&kt&&Se([Ut,kt])),Se([Lt,Ht])):Ut-Lt&&kt-Ht&&Se([Lt||Ut,Ht||kt]),Vt=me,Ut=Lt,kt=Ht}else Vt&&ne(de(Vt,me)[0]),D[N++]=me}for(I=0;Ict(Y,Jt))break;B=Y,tt=it[0]*et[0]+it[1]*et[1],tt>J?(J=tt,O=Y,j=!1):tt=f.length||!Y)break;Xt(Y),k=Y}}Vt&&Se([Ut||Vt[0],kt||Vt[1]]),L.push(D.slice(0,N))}var Wt=E.slice(E.length-1);if(w&&Wt!=="h"&&Wt!=="v"){for(var Ft=!1,xt=-1,yt=[],Et=0;Et=0?r=c:(r=c=f,f++),r0?Math.max(a,p):0}}},5528:function(G){G.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(G,U,t){var g=t(76308),C=t(94288).hasColorscale,i=t(27260),S=t(43028);G.exports=function(v,p,r,e,a,n){var f=S.isBubble(v),c=(v.line||{}).color,l;if(n=n||{},c&&(r=c),a("marker.symbol"),a("marker.opacity",f?.7:1),a("marker.size"),n.noAngle||(a("marker.angle"),n.noAngleRef||a("marker.angleref"),n.noStandOff||a("marker.standoff")),a("marker.color",r),C(v,"marker")&&i(v,p,e,a,{prefix:"marker.",cLetter:"c"}),n.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),n.noLine||(c&&!Array.isArray(c)&&p.marker.color!==c?l=c:f?l=g.background:l=g.defaultLine,a("marker.line.color",l),C(v,"marker.line")&&i(v,p,e,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",f?1:0)),f&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),n.gradient){var m=a("marker.gradient.type");m!=="none"&&a("marker.gradient.color")}}},31147:function(G,U,t){var g=t(3400).dateTick0,C=t(39032),i=C.ONEWEEK;function S(x,v){return x%i===0?g(v,1):g(v,0)}G.exports=function(v,p,r,e,a){if(a||(a={x:!0,y:!0}),a.x){var n=e("xperiod");n&&(e("xperiod0",S(n,p.xcalendar)),e("xperiodalignment"))}if(a.y){var f=e("yperiod");f&&(e("yperiod0",S(f,p.ycalendar)),e("yperiodalignment"))}}},96504:function(G,U,t){var g=t(33428),C=t(24040),i=t(3400),S=i.ensureSingle,x=i.identity,v=t(43616),p=t(43028),r=t(52340),e=t(14328),a=t(92065).tester;G.exports=function(m,h,b,u,o,d){var w,A,_=!o,y=!!o&&o.duration>0,E=e(m,h,b);if(w=u.selectAll("g.trace").data(E,function(s){return s[0].trace.uid}),w.enter().append("g").attr("class",function(s){return"trace scatter trace"+s[0].trace.uid}).style("stroke-miterlimit",2),w.order(),n(m,w,h),y){d&&(A=d());var T=g.transition().duration(o.duration).ease(o.easing).each("end",function(){A&&A()}).each("interrupt",function(){A&&A()});T.each(function(){u.selectAll("g.trace").each(function(s,L){f(m,L,h,s,E,this,o)})})}else w.each(function(s,L){f(m,L,h,s,E,this,o)});_&&w.exit().remove(),u.selectAll("path:not([d])").remove()};function n(l,m,h){m.each(function(b){var u=S(g.select(this),"g","fills");v.setClipUrl(u,h.layerClipId,l);var o=b[0].trace,d=[];o._ownfill&&d.push("_ownFill"),o._nexttrace&&d.push("_nextFill");var w=u.selectAll("g").data(d,x);w.enter().append("g"),w.exit().each(function(A){o[A]=null}).remove(),w.order().each(function(A){o[A]=S(g.select(this),"path","js-fill")})})}function f(l,m,h,b,u,o,d){var w=l._context.staticPlot,A;c(l,m,h,b,u);var _=!!d&&d.duration>0;function y(Se){return _?Se.transition():Se}var E=h.xaxis,T=h.yaxis,s=b[0].trace,L=s.line,M=g.select(o),z=S(M,"g","errorbars"),D=S(M,"g","lines"),N=S(M,"g","points"),I=S(M,"g","text");if(C.getComponentMethod("errorbars","plot")(l,z,h,d),s.visible!==!0)return;y(M).style("opacity",s.opacity);var k,B,O=s.fill.charAt(s.fill.length-1);O!=="x"&&O!=="y"&&(O="");var H,Y;O==="y"?(H=1,Y=T.c2p(0,!0)):O==="x"&&(H=0,Y=E.c2p(0,!0)),b[0][h.isRangePlot?"nodeRangePlot3":"node3"]=M;var j="",et=[],it=s._prevtrace,ut=null,J=null;it&&(j=it._prevRevpath||"",B=it._nextFill,et=it._ownPolygons,ut=it._fillsegments,J=it._fillElement);var X,tt,V="",Q="",ot,$,Z,st,nt,ct,gt=[];s._polygons=[];var Tt=[],wt=[],Rt=i.noop;if(k=s._ownFill,p.hasLines(s)||s.fill!=="none"){B&&B.datum(b),["hv","vh","hvh","vhv"].indexOf(L.shape)!==-1?(ot=v.steps(L.shape),$=v.steps(L.shape.split("").reverse().join(""))):L.shape==="spline"?ot=$=function(Se){var ne=Se[Se.length-1];return Se.length>1&&Se[0][0]===ne[0]&&Se[0][1]===ne[1]?v.smoothclosed(Se.slice(1),L.smoothing):v.smoothopen(Se,L.smoothing)}:ot=$=function(Se){return"M"+Se.join("L")},Z=function(Se){return $(Se.reverse())},wt=r(b,{xaxis:E,yaxis:T,trace:s,connectGaps:s.connectgaps,baseTolerance:Math.max(L.width||1,3)/4,shape:L.shape,backoff:L.backoff,simplify:L.simplify,fill:s.fill}),Tt=new Array(wt.length);var bt=0;for(A=0;A=w[0]&&M.x<=w[1]&&M.y>=A[0]&&M.y<=A[1]}),T=Math.ceil(E.length/y),s=0;u.forEach(function(M,z){var D=M[0].trace;p.hasMarkers(D)&&D.marker.maxdisplayed>0&&z0){var h=r.c2l(l);r._lowerLogErrorBound||(r._lowerLogErrorBound=h),r._lowerErrorBound=Math.min(r._lowerLogErrorBound,h)}}else a[n]=[-f[0]*p,f[1]*p]}return a}function i(x){for(var v=0;v-1?-1:M.indexOf("right")>-1?1:0}function d(M){return M==null?0:M.indexOf("top")>-1?-1:M.indexOf("bottom")>-1?1:0}function w(M){var z=0,D=0,N=[z,D];if(Array.isArray(M))for(var I=0;I=0){var Y=b(O.position,O.delaunayColor,O.delaunayAxis);Y.opacity=M.opacity,this.delaunayMesh?this.delaunayMesh.update(Y):(Y.gl=z,this.delaunayMesh=S(Y),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},h.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function L(M,z){var D=new m(M,z.uid);return D.update(z),D}G.exports=L},83484:function(G,U,t){var g=t(24040),C=t(3400),i=t(43028),S=t(74428),x=t(66828),v=t(124),p=t(91592);G.exports=function(a,n,f,c){function l(A,_){return C.coerce(a,n,p,A,_)}var m=r(a,n,l,c);if(!m){n.visible=!1;return}l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),l("mode"),i.hasMarkers(n)&&S(a,n,f,c,l,{noSelect:!0,noAngle:!0}),i.hasLines(n)&&(l("connectgaps"),x(a,n,f,c,l)),i.hasText(n)&&(l("texttemplate"),v(a,n,c,l,{noSelect:!0}));var h=(n.line||{}).color,b=(n.marker||{}).color;l("surfaceaxis")>=0&&l("surfacecolor",h||b);for(var u=["x","y","z"],o=0;o<3;++o){var d="projection."+u[o];l(d+".show")&&(l(d+".opacity"),l(d+".scale"))}var w=g.getComponentMethod("errorbars","supplyDefaults");w(a,n,h||b||f,{axis:"z"}),w(a,n,h||b||f,{axis:"y",inherit:"z"}),w(a,n,h||b||f,{axis:"x",inherit:"z"})};function r(e,a,n,f){var c=0,l=n("x"),m=n("y"),h=n("z"),b=g.getComponentMethod("calendars","handleTraceDefaults");return b(e,a,["x","y","z"],f),l&&m&&h&&(c=Math.min(l.length,m.length,h.length),a._length=a._xlength=a._ylength=a._zlength=c),c}},3296:function(G,U,t){G.exports={plot:t(41064),attributes:t(91592),markerSymbols:t(87792),supplyDefaults:t(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:t(41484),moduleType:"trace",name:"scatter3d",basePlotModule:t(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(G,U,t){var g=t(98304),C=t(52904),i=t(45464),S=t(21776).Ks,x=t(21776).Gw,v=t(49084),p=t(92880).extendFlat,r=C.marker,e=C.line,a=r.line;G.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:p({},C.mode,{dflt:"markers"}),text:p({},C.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","text"]}),hovertext:p({},C.hovertext,{}),line:{color:e.color,width:e.width,dash:e.dash,backoff:e.backoff,shape:p({},e.shape,{values:["linear","spline"]}),smoothing:e.smoothing,editType:"calc"},connectgaps:C.connectgaps,fill:p({},C.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:g(),marker:p({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:p({width:a.width,editType:"calc"},v("marker.line")),gradient:r.gradient,editType:"calc"},v("marker")),textfont:C.textfont,textposition:C.textposition,selected:C.selected,unselected:C.unselected,hoverinfo:p({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:C.hoveron,hovertemplate:S()}},48228:function(G,U,t){var g=t(38248),C=t(90136),i=t(20148),S=t(4500),x=t(16356).calcMarkerSize,v=t(50948);G.exports=function(r,e){var a=e._carpetTrace=v(r,e);if(!(!a||!a.visible||a.visible==="legendonly")){var n;e.xaxis=a.xaxis,e.yaxis=a.yaxis;var f=e._length,c=new Array(f),l,m,h=!1;for(n=0;n0?y=A.labelprefix.replace(/ = $/,""):y=A._hovertitle,u.push(y+": "+_.toFixed(3)+A.labelsuffix)}if(!m.hovertemplate){var d=l.hi||m.hoverinfo,w=d.split("+");w.indexOf("all")!==-1&&(w=["a","b","text"]),w.indexOf("a")!==-1&&o(h.aaxis,l.a),w.indexOf("b")!==-1&&o(h.baxis,l.b),u.push("y: "+e.yLabel),w.indexOf("text")!==-1&&C(l,m,u),e.extraText=u.join("
    ")}return r}},4184:function(G,U,t){G.exports={attributes:t(90372),supplyDefaults:t(6176),colorbar:t(5528),formatLabels:t(52364),calc:t(48228),plot:t(20036),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(58960),selectPoints:t(91560),eventData:t(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:t(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(G,U,t){var g=t(96504),C=t(54460),i=t(43616);G.exports=function(x,v,p,r){var e,a,n,f=p[0][0].carpet,c=C.getFromId(x,f.xaxis||"x"),l=C.getFromId(x,f.yaxis||"y"),m={xaxis:c,yaxis:l,plot:v.plot};for(e=0;e")}},36952:function(G,U,t){G.exports={attributes:t(6096),supplyDefaults:t(86188),colorbar:t(5528),formatLabels:t(56696),calc:t(25212),calcGeoJSON:t(48691).calcGeoJSON,plot:t(48691).plot,style:t(25064),styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(64292),eventData:t(58544),selectPoints:t(8796),moduleType:"trace",name:"scattergeo",basePlotModule:t(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(G,U,t){var g=t(33428),C=t(3400),i=t(59972).getTopojsonFeatures,S=t(44808),x=t(27144),v=t(19280).findExtremes,p=t(39032).BADNUM,r=t(16356).calcMarkerSize,e=t(43028),a=t(25064);function n(c,l,m){var h=l.layers.frontplot.select(".scatterlayer"),b=C.makeTraceGroups(h,m,"trace scattergeo");function u(o,d){o.lonlat[0]===p&&g.select(d).remove()}b.selectAll("*").remove(),b.each(function(o){var d=g.select(this),w=o[0].trace;if(e.hasLines(w)||w.fill!=="none"){var A=S.calcTraceToLineCoords(o),_=w.fill!=="none"?S.makePolygon(A):S.makeLine(A);d.selectAll("path.js-line").data([{geojson:_,trace:w}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}e.hasMarkers(w)&&d.selectAll("path.point").data(C.identity).enter().append("path").classed("point",!0).each(function(y){u(y,this)}),e.hasText(w)&&d.selectAll("g").data(C.identity).enter().append("g").append("text").each(function(y){u(y,this)}),a(c,o)})}function f(c,l){var m=c[0].trace,h=l[m.geo],b=h._subplot,u=m._length,o,d;if(C.isArrayOrTypedArray(m.locations)){var w=m.locationmode,A=w==="geojson-id"?x.extractTraceFeature(c):i(m,b.topojson);for(o=0;o=l,T=y*2,s={},L,M=w.makeCalcdata(o,"x"),z=A.makeCalcdata(o,"y"),D=x(o,w,"x",M),N=x(o,A,"y",z),I=D.vals,k=N.vals;o._x=I,o._y=k,o.xperiodalignment&&(o._origX=M,o._xStarts=D.starts,o._xEnds=D.ends),o.yperiodalignment&&(o._origY=z,o._yStarts=N.starts,o._yEnds=N.ends);var B=new Array(T),O=new Array(y);for(L=0;L1&&C.extendFlat(_.line,n.linePositions(b,o,d)),_.errorX||_.errorY){var y=n.errorBarPositions(b,o,d,w,A);_.errorX&&C.extendFlat(_.errorX,y.x),_.errorY&&C.extendFlat(_.errorY,y.y)}return _.text&&(C.extendFlat(_.text,{positions:d},n.textPosition(b,o,_.text,_.marker)),C.extendFlat(_.textSel,{positions:d},n.textPosition(b,o,_.text,_.markerSel)),C.extendFlat(_.textUnsel,{positions:d},n.textPosition(b,o,_.text,_.markerUnsel))),_}},67072:function(G){var U=20;G.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:U,SYMBOL_STROKE:U/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},84236:function(G,U,t){var g=t(38248),C=t(20472),i=t(72160),S=t(24040),x=t(3400),v=x.isArrayOrTypedArray,p=t(43616),r=t(79811),e=t(33040).formatColor,a=t(43028),n=t(7152),f=t(80088),c=t(67072),l=t(13448).DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},h=t(10624).appendArrayPointValue;function b(N,I){var k,B={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},O=N._context.plotGlPixelRatio;if(I.visible!==!0)return B;if(a.hasText(I)&&(B.text=u(N,I),B.textSel=w(N,I,I.selected),B.textUnsel=w(N,I,I.unselected)),a.hasMarkers(I)&&(B.marker=o(N,I),B.markerSel=d(N,I,I.selected),B.markerUnsel=d(N,I,I.unselected),!I.unselected&&v(I.marker.opacity))){var H=I.marker.opacity;for(B.markerUnsel.opacity=new Array(H.length),k=0;kc.TOO_MANY_POINTS||a.hasMarkers(I)?"rect":"round";if(it&&I.connectgaps){var J=H[0],X=H[1];for(Y=0;Y1?et[Y]:et[0]:et,tt=v(it)?it.length>1?it[Y]:it[0]:it,V=m[X],Q=m[tt],ot=ut?ut/.8+1:0,$=-Q*ot-Q*.5;H.offset[Y]=[V*ot/J,$/J]}}return H}G.exports={style:b,markerStyle:o,markerSelection:d,linePositions:M,errorBarPositions:z,textPosition:D}},80220:function(G,U,t){var g=t(3400),C=t(24040),i=t(80088),S=t(2876),x=t(88200),v=t(43028),p=t(43980),r=t(31147),e=t(74428),a=t(66828),n=t(70840),f=t(124);G.exports=function(l,m,h,b){function u(T,s){return g.coerce(l,m,S,T,s)}var o=l.marker?i.isOpenSymbol(l.marker.symbol):!1,d=v.isBubble(l),w=p(l,m,b,u);if(!w){m.visible=!1;return}r(l,m,b,u),u("xhoverformat"),u("yhoverformat");var A=w100},U.isDotSymbol=function(C){return typeof C=="string"?g.DOT_RE.test(C):C>200}},41272:function(G,U,t){var g=t(24040),C=t(3400),i=t(44928);function S(v,p,r,e){var a=v.cd,n=a[0].t,f=a[0].trace,c=v.xa,l=v.ya,m=n.x,h=n.y,b=c.c2p(p),u=l.c2p(r),o=v.distance,d;if(n.tree){var w=c.p2c(b-o),A=c.p2c(b+o),_=l.p2c(u-o),y=l.p2c(u+o);e==="x"?d=n.tree.range(Math.min(w,A),Math.min(l._rl[0],l._rl[1]),Math.max(w,A),Math.max(l._rl[0],l._rl[1])):d=n.tree.range(Math.min(w,A),Math.min(_,y),Math.max(w,A),Math.max(_,y))}else d=n.ids;var E,T,s,L,M,z,D,N,I,k=o;if(e==="x"){var B=!!f.xperiodalignment,O=!!f.yperiodalignment;for(M=0;M=Math.min(H,Y)&&b<=Math.max(H,Y)?0:1/0}if(z=Math.min(j,et)&&u<=Math.max(j,et)?0:1/0}I=Math.sqrt(z*z+D*D),T=d[M]}}}else for(M=d.length-1;M>-1;M--)E=d[M],s=m[E],L=h[E],z=c.c2p(s)-b,D=l.c2p(L)-u,N=Math.sqrt(z*z+D*D),No.glText.length){var s=E-o.glText.length;for(A=0;Ast&&(isNaN(Z[nt])||isNaN(Z[nt+1]));)nt-=2;$.positions=Z.slice(st,nt+2)}return $}),o.line2d.update(o.lineOptions)),o.error2d){var z=(o.errorXOptions||[]).concat(o.errorYOptions||[]);o.error2d.update(z)}o.scatter2d&&o.scatter2d.update(o.markerOptions),o.fillOrder=x.repeat(null,E),o.fill2d&&(o.fillOptions=o.fillOptions.map(function($,Z){var st=b[Z];if(!(!$||!st||!st[0]||!st[0].trace)){var nt=st[0],ct=nt.trace,gt=nt.t,Tt=o.lineOptions[Z],wt,Rt,bt=[];ct._ownfill&&bt.push(Z),ct._nexttrace&&bt.push(Z+1),bt.length&&(o.fillOrder[Z]=bt);var At=[],mt=Tt&&Tt.positions||gt.positions,Lt,Ht;if(ct.fill==="tozeroy"){for(Lt=0;LtLt&&isNaN(mt[Ht+1]);)Ht-=2;mt[Lt+1]!==0&&(At=[mt[Lt],0]),At=At.concat(mt.slice(Lt,Ht+2)),mt[Ht+1]!==0&&(At=At.concat([mt[Ht],0]))}else if(ct.fill==="tozerox"){for(Lt=0;LtLt&&isNaN(mt[Ht]);)Ht-=2;mt[Lt]!==0&&(At=[0,mt[Lt+1]]),At=At.concat(mt.slice(Lt,Ht+2)),mt[Ht]!==0&&(At=At.concat([0,mt[Ht+1]]))}else if(ct.fill==="toself"||ct.fill==="tonext"){for(At=[],wt=0,$.splitNull=!0,Rt=0;Rt-1;for(A=0;A=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),A=w*360,_=a-A;function y(I){var k=I.lonlat;if(k[0]===x||o&&b.indexOf(I.i+1)===-1)return 1/0;var B=C.modHalf(k[0],360),O=k[1],H=h.project([B,O]),Y=H.x-l.c2p([_,O]),j=H.y-m.c2p([B,n]),et=Math.max(3,I.mrc||0);return Math.max(Math.sqrt(Y*Y+j*j)-et,1-3/et)}if(g.getClosest(f,y,e),e.index!==!1){var E=f[e.index],T=E.lonlat,s=[C.modHalf(T[0],360)+A,T[1]],L=l.c2p(s),M=m.c2p(s),z=E.mrc||1;e.x0=L-z,e.x1=L+z,e.y0=M-z,e.y1=M+z;var D={};D[c.subplot]={_subplot:h};var N=c._module.formatLabels(E,c,D);return e.lonLabel=N.lonLabel,e.latLabel=N.latLabel,e.color=i(c,E),e.extraText=r(c,E,f[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}function r(e,a,n){if(e.hovertemplate)return;var f=a.hi||e.hoverinfo,c=f.split("+"),l=c.indexOf("all")!==-1,m=c.indexOf("lon")!==-1,h=c.indexOf("lat")!==-1,b=a.lonlat,u=[];function o(d){return d+"°"}return l||m&&h?u.push("("+o(b[1])+", "+o(b[0])+")"):m?u.push(n.lon+o(b[0])):h&&u.push(n.lat+o(b[1])),(l||c.indexOf("text")!==-1)&&S(a,e,u),u.join("
    ")}G.exports={hoverPoints:p,getExtraText:r}},11572:function(G,U,t){G.exports={attributes:t(31512),supplyDefaults:t(15752),colorbar:t(5528),formatLabels:t(11960),calc:t(25212),plot:t(9660),hoverPoints:t(63312).hoverPoints,eventData:t(37920),selectPoints:t(404),styleOnSelect:function(g,C){if(C){var i=C[0].trace;i._glTrace.update(C)}},moduleType:"trace",name:"scattermapbox",basePlotModule:t(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(G,U,t){var g=t(3400),C=t(59392),i=t(47552).traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function x(p,r,e,a){this.type="scattermapbox",this.subplot=p,this.uid=r,this.clusterEnabled=e,this.isHidden=a,this.sourceIds={fill:"source-"+r+"-fill",line:"source-"+r+"-line",circle:"source-"+r+"-circle",symbol:"source-"+r+"-symbol",cluster:"source-"+r+"-circle",clusterCount:"source-"+r+"-circle"},this.layerIds={fill:i+r+"-fill",line:i+r+"-line",circle:i+r+"-circle",symbol:i+r+"-symbol",cluster:i+r+"-cluster",clusterCount:i+r+"-cluster-count"},this.below=null}var v=x.prototype;v.addSource=function(p,r,e){var a={type:"geojson",data:r.geojson};e&&e.enabled&&g.extendFlat(a,{cluster:!0,clusterMaxZoom:e.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[p]);n?n.setData(r.geojson):this.subplot.map.addSource(this.sourceIds[p],a)},v.setSourceData=function(p,r){this.subplot.map.getSource(this.sourceIds[p]).setData(r.geojson)},v.addLayer=function(p,r,e){var a={type:r.type,id:this.layerIds[p],source:this.sourceIds[p],layout:r.layout,paint:r.paint};r.filter&&(a.filter=r.filter);for(var n=this.layerIds[p],f,c=this.subplot.getMapLayers(),l=0;l=0;L--){var M=s[L];n.removeLayer(h.layerIds[M])}T||n.removeSource(h.sourceIds.circle)}function o(T){for(var s=S.nonCluster,L=0;L=0;L--){var M=s[L];n.removeLayer(h.layerIds[M]),T||n.removeSource(h.sourceIds[M])}}function w(T){m?u(T):d(T)}function A(T){l?b(T):o(T)}function _(){for(var T=l?S.cluster:S.nonCluster,s=0;s=0;a--){var n=e[a];r.removeLayer(this.layerIds[n]),r.removeSource(this.sourceIds[n])}},G.exports=function(r,e){var a=e[0].trace,n=a.cluster&&a.cluster.enabled,f=a.visible!==!0,c=new x(r,a.uid,n,f),l=C(r.gd,e),m=c.below=r.belowLookup["trace-"+a.uid],h,b,u;if(n)for(c.addSource("circle",l.circle,a.cluster),h=0;h")}}G.exports={hoverPoints:C,makeHoverPointText:i}},76924:function(G,U,t){G.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:t(8319),supplyDefaults:t(85968).supplyDefaults,colorbar:t(5528),formatLabels:t(22852),calc:t(58320),plot:t(43456),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(8504).hoverPoints,selectPoints:t(91560),meta:{}}},43456:function(G,U,t){var g=t(96504),C=t(39032).BADNUM;G.exports=function(S,x,v){for(var p=x.layers.frontplot.select("g.scatterlayer"),r=x.xaxis,e=x.yaxis,a={xaxis:r,yaxis:e,plot:x.framework,layerClipId:x._hasClipOnAxisFalse?x.clipIds.forTraces:null},n=x.radialAxis,f=x.angularAxis,c=0;c=p&&(_.marker.cluster=o.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=s),_.line&&s.length>1&&v.extendFlat(_.line,x.linePositions(a,u,s)),_.text&&(v.extendFlat(_.text,{positions:s},x.textPosition(a,u,_.text,_.marker)),v.extendFlat(_.textSel,{positions:s},x.textPosition(a,u,_.text,_.markerSel)),v.extendFlat(_.textUnsel,{positions:s},x.textPosition(a,u,_.text,_.markerUnsel))),_.fill&&!m.fill2d&&(m.fill2d=!0),_.marker&&!m.scatter2d&&(m.scatter2d=!0),_.line&&!m.line2d&&(m.line2d=!0),_.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(_.line),m.fillOptions.push(_.fill),m.markerOptions.push(_.marker),m.markerSelectedOptions.push(_.markerSel),m.markerUnselectedOptions.push(_.markerUnsel),m.textOptions.push(_.text),m.textSelectedOptions.push(_.textSel),m.textUnselectedOptions.push(_.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),o.x=L,o.y=M,o.rawx=L,o.rawy=M,o.r=w,o.theta=A,o.positions=s,o._scene=m,o.index=m.count,m.count++}}),i(a,n,f)}},G.exports.reglPrecompiled=r},69496:function(G,U,t){var g=t(21776).Ks,C=t(21776).Gw,i=t(92880).extendFlat,S=t(98304),x=t(52904),v=t(45464),p=x.line;G.exports={mode:x.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:x.text,texttemplate:C({editType:"plot"},{keys:["real","imag","text"]}),hovertext:x.hovertext,line:{color:p.color,width:p.width,dash:p.dash,backoff:p.backoff,shape:i({},p.shape,{values:["linear","spline"]}),smoothing:p.smoothing,editType:"calc"},connectgaps:x.connectgaps,marker:x.marker,cliponaxis:i({},x.cliponaxis,{dflt:!1}),textposition:x.textposition,textfont:x.textfont,fill:i({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),hoverinfo:i({},v.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:x.hoveron,hovertemplate:g(),selected:x.selected,unselected:x.unselected}},47507:function(G,U,t){var g=t(38248),C=t(39032).BADNUM,i=t(90136),S=t(20148),x=t(4500),v=t(16356).calcMarkerSize;G.exports=function(r,e){for(var a=r._fullLayout,n=e.subplot,f=a[n].realaxis,c=a[n].imaginaryaxis,l=f.makeCalcdata(e,"real"),m=c.makeCalcdata(e,"imag"),h=e._length,b=new Array(h),u=0;u")}}G.exports={hoverPoints:C,makeHoverPointText:i}},95443:function(G,U,t){G.exports={moduleType:"trace",name:"scattersmith",basePlotModule:t(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:t(69496),supplyDefaults:t(76716),colorbar:t(5528),formatLabels:t(49504),calc:t(47507),plot:t(34927),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(25292).hoverPoints,selectPoints:t(91560),meta:{}}},34927:function(G,U,t){var g=t(96504),C=t(39032).BADNUM,i=t(36416),S=i.smith;G.exports=function(v,p,r){for(var e=p.layers.frontplot.select("g.scatterlayer"),a=p.xaxis,n=p.yaxis,f={xaxis:a,yaxis:n,plot:p.framework,layerClipId:p._hasClipOnAxisFalse?p.clipIds.forTraces:null},c=0;c"),r.hovertemplate=l.hovertemplate,p}},34864:function(G,U,t){G.exports={attributes:t(5896),supplyDefaults:t(84256),colorbar:t(5528),formatLabels:t(90404),calc:t(34335),plot:t(88776),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(26596),selectPoints:t(91560),eventData:t(97476),moduleType:"trace",name:"scatterternary",basePlotModule:t(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(G,U,t){var g=t(96504);G.exports=function(i,S,x){var v=S.plotContainer;v.select(".scatterlayer").selectAll("*").remove();for(var p=S.xaxis,r=S.yaxis,e={xaxis:p,yaxis:r,plot:v,layerClipId:S._hasClipOnAxisFalse?S.clipIdRelative:null},a=S.layers.frontplot.select("g.scatterlayer"),n=0;na,L;for(s?L=h.sizeAvg||Math.max(h.size,3):L=i(c,m),w=0;wd&&h||o-1,I=S(h)||!!a.selectedpoints||N,k=!0;if(I){var B=a._length;if(a.selectedpoints){f.selectBatch=a.selectedpoints;var O=a.selectedpoints,H={};for(o=0;o1&&(T=r[n-1],L=e[n-1],z=a[n-1]),f=0;fT?"-":"+")+"x"),w=w.replace("y",(s>L?"-":"+")+"y"),w=w.replace("z",(M>z?"-":"+")+"z");var k=function(){n=0,D=[],N=[],I=[]};(!n||n2?h=l.slice(1,m-1):m===2?h=[(l[0]+l[1])/2]:h=l,h}function n(l){var m=l.length;return m===1?[.5,.5]:[l[1]-l[0],l[m-1]-l[m-2]]}function f(l,m){var h=l.fullSceneLayout,b=l.dataScale,u=m._len,o={};function d(ut,J){var X=h[J],tt=b[p[J]];return i.simpleMap(ut,function(V){return X.d2l(V)*tt})}if(o.vectors=v(d(m._u,"xaxis"),d(m._v,"yaxis"),d(m._w,"zaxis"),u),!u)return{positions:[],cells:[]};var w=d(m._Xs,"xaxis"),A=d(m._Ys,"yaxis"),_=d(m._Zs,"zaxis");o.meshgrid=[w,A,_],o.gridFill=m._gridFill;var y=m._slen;if(y)o.startingPositions=v(d(m._startsX,"xaxis"),d(m._startsY,"yaxis"),d(m._startsZ,"zaxis"));else{for(var E=A[0],T=a(w),s=a(_),L=new Array(T.length*s.length),M=0,z=0;z=0},L,M,z;b?(L=Math.min(h.length,o.length),M=function(V){return T(h[V])&&s(V)},z=function(V){return String(h[V])}):(L=Math.min(u.length,o.length),M=function(V){return T(u[V])&&s(V)},z=function(V){return String(u[V])}),w&&(L=Math.min(L,d.length));for(var D=0;D1){for(var H=i.randstr(),Y=0;Y>>8*E)%256/255}function v(y,E,T){for(var s=new Array(y*(i+4)),L=0,M=0;Mwt&&(wt=ot[nt].dim1.canvasX,gt=nt);st===0&&n(L,0,0,I.canvasWidth,I.canvasHeight);var Rt=J(T);for(nt=0;ntnt._length&&(Lt=Lt.slice(0,nt._length));var Ht=nt.tickvals,Ut;function kt($t,le){return{val:$t,text:Ut[le]}}function Vt($t,le){return $t.val-le.val}if(i(Ht)&&Ht.length){C.isTypedArray(Ht)&&(Ht=Array.from(Ht)),Ut=nt.ticktext,!i(Ut)||!Ut.length?Ut=Ht.map(S(nt.tickformat)):Ut.length>Ht.length?Ut=Ut.slice(0,Ht.length):Ht.length>Ut.length&&(Ht=Ht.slice(0,Ut.length));for(var It=1;It=le||Se>=he)return;var ne=Kt.lineLayer.readPixel(xe,he-1-Se),zt=ne[3]!==0,Xt=zt?ne[2]+256*(ne[1]+256*ne[0]):null,Jt={x:xe,y:Se,clientX:$t.clientX,clientY:$t.clientY,dataIndex:Kt.model.key,curveNumber:Xt};Xt!==gt&&(zt?X.hover(Jt):X.unhover&&X.unhover(Jt),gt=Xt)}}),ct.style("opacity",function(Kt){return Kt.pick?0:1}),Q.style("background","rgba(255, 255, 255, 0)");var wt=Q.selectAll("."+b.cn.parcoords).data(nt,c);wt.exit().remove(),wt.enter().append("g").classed(b.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),wt.attr("transform",function(Kt){return r(Kt.model.translateX,Kt.model.translateY)});var Rt=wt.selectAll("."+b.cn.parcoordsControlView).data(l,c);Rt.enter().append("g").classed(b.cn.parcoordsControlView,!0),Rt.attr("transform",function(Kt){return r(Kt.model.pad.l,Kt.model.pad.t)});var bt=Rt.selectAll("."+b.cn.yAxis).data(function(Kt){return Kt.dimensions},c);bt.enter().append("g").classed(b.cn.yAxis,!0),Rt.each(function(Kt){O(bt,Kt,$)}),ct.each(function(Kt){if(Kt.viewModel){!Kt.lineLayer||X?Kt.lineLayer=o(this,Kt):Kt.lineLayer.update(Kt),(Kt.key||Kt.key===0)&&(Kt.viewModel[Kt.key]=Kt.lineLayer);var $t=!Kt.context||X;Kt.lineLayer.render(Kt.viewModel.panels,$t)}}),bt.attr("transform",function(Kt){return r(Kt.xScale(Kt.xIndex),0)}),bt.call(g.behavior.drag().origin(function(Kt){return Kt}).on("drag",function(Kt){var $t=Kt.parent;st.linePickActive(!1),Kt.x=Math.max(-b.overdrag,Math.min(Kt.model.width+b.overdrag,g.event.x)),Kt.canvasX=Kt.x*Kt.model.canvasPixelRatio,bt.sort(function(le,he){return le.x-he.x}).each(function(le,he){le.xIndex=he,le.x=Kt===le?le.x:le.xScale(le.xIndex),le.canvasX=le.x*le.model.canvasPixelRatio}),O(bt,$t,$),bt.filter(function(le){return Math.abs(Kt.xIndex-le.xIndex)!==0}).attr("transform",function(le){return r(le.xScale(le.xIndex),0)}),g.select(this).attr("transform",r(Kt.x,0)),bt.each(function(le,he,de){de===Kt.parent.key&&($t.dimensions[he]=le)}),$t.contextLayer&&$t.contextLayer.render($t.panels,!1,!z($t)),$t.focusLayer.render&&$t.focusLayer.render($t.panels)}).on("dragend",function(Kt){var $t=Kt.parent;Kt.x=Kt.xScale(Kt.xIndex),Kt.canvasX=Kt.x*Kt.model.canvasPixelRatio,O(bt,$t,$),g.select(this).attr("transform",function(le){return r(le.x,0)}),$t.contextLayer&&$t.contextLayer.render($t.panels,!1,!z($t)),$t.focusLayer&&$t.focusLayer.render($t.panels),$t.pickLayer&&$t.pickLayer.render($t.panels,!0),st.linePickActive(!0),X&&X.axesMoved&&X.axesMoved($t.key,$t.dimensions.map(function(le){return le.crossfilterDimensionIndex}))})),bt.exit().remove();var At=bt.selectAll("."+b.cn.axisOverlays).data(l,c);At.enter().append("g").classed(b.cn.axisOverlays,!0),At.selectAll("."+b.cn.axis).remove();var mt=At.selectAll("."+b.cn.axis).data(l,c);mt.enter().append("g").classed(b.cn.axis,!0),mt.each(function(Kt){var $t=Kt.model.height/Kt.model.tickDistance,le=Kt.domainScale,he=le.domain();g.select(this).call(g.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks($t,Kt.tickFormat).tickValues(Kt.ordinal?he:null).tickFormat(function(de){return v.isOrdinal(Kt)?de:Y(Kt.model.dimensions[Kt.visibleIndex],de)}).scale(le)),a.font(mt.selectAll("text"),Kt.model.tickFont)}),mt.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),mt.selectAll("text").style("text-shadow",e.makeTextShadow(Z)).style("cursor","default");var Lt=At.selectAll("."+b.cn.axisHeading).data(l,c);Lt.enter().append("g").classed(b.cn.axisHeading,!0);var Ht=Lt.selectAll("."+b.cn.axisTitle).data(l,c);Ht.enter().append("text").classed(b.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",tt?"none":"auto"),Ht.text(function(Kt){return Kt.label}).each(function(Kt){var $t=g.select(this);a.font($t,Kt.model.labelFont),e.convertToTspans($t,it)}).attr("transform",function(Kt){var $t=B(Kt.model.labelAngle,Kt.model.labelSide),le=b.axisTitleOffset;return($t.dir>0?"":r(0,2*le+Kt.model.height))+p($t.degrees)+r(-le*$t.dx,-le*$t.dy)}).attr("text-anchor",function(Kt){var $t=B(Kt.model.labelAngle,Kt.model.labelSide),le=Math.abs($t.dx),he=Math.abs($t.dy);return 2*le>he?$t.dir*$t.dx<0?"start":"end":"middle"});var Ut=At.selectAll("."+b.cn.axisExtent).data(l,c);Ut.enter().append("g").classed(b.cn.axisExtent,!0);var kt=Ut.selectAll("."+b.cn.axisExtentTop).data(l,c);kt.enter().append("g").classed(b.cn.axisExtentTop,!0),kt.attr("transform",r(0,-b.axisExtentOffset));var Vt=kt.selectAll("."+b.cn.axisExtentTopText).data(l,c);Vt.enter().append("text").classed(b.cn.axisExtentTopText,!0).call(I),Vt.text(function(Kt){return j(Kt,!0)}).each(function(Kt){a.font(g.select(this),Kt.model.rangeFont)});var It=Ut.selectAll("."+b.cn.axisExtentBottom).data(l,c);It.enter().append("g").classed(b.cn.axisExtentBottom,!0),It.attr("transform",function(Kt){return r(0,Kt.model.height+b.axisExtentOffset)});var re=It.selectAll("."+b.cn.axisExtentBottomText).data(l,c);re.enter().append("text").classed(b.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(I),re.text(function(Kt){return j(Kt,!1)}).each(function(Kt){a.font(g.select(this),Kt.model.rangeFont)}),u.ensureAxisBrush(At,Z,it)}},24196:function(G,U,t){var g=t(36336),C=t(5048),i=t(95724).isVisible,S={};function x(r,e,a){var n=e.indexOf(a),f=r.indexOf(n);return f===-1&&(f+=e.length),f}function h(r,e){return function(n,f){return x(r,e,n)-x(r,e,f)}}var p=G.exports=function(e,a){var n=e._fullLayout,f=C(e,[],S);if(f){var c={},l={},m={},v={},b=n._size;a.forEach(function(A,_){var y=A[0].trace;m[_]=y.index;var E=v[_]=y._fullInput.index;c[_]=e.data[E].dimensions,l[_]=e.data[E].dimensions.slice()});var u=function(A,_,y){var E=l[A][_],T=y.map(function(N){return N.slice()}),s="dimensions["+_+"].constraintrange",L=n._tracePreGUI[e._fullData[m[A]]._fullInput.uid];if(L[s]===void 0){var M=E.constraintrange;L[s]=M||null}var z=e._fullData[m[A]].dimensions[_];T.length?(T.length===1&&(T=T[0]),E.constraintrange=T,z.constraintrange=T.slice(),T=[T]):(delete E.constraintrange,delete z.constraintrange,T=null);var D={};D[s]=T,e.emit("plotly_restyle",[D,[v[A]]])},o=function(A){e.emit("plotly_hover",A)},d=function(A){e.emit("plotly_unhover",A)},w=function(A,_){var y=h(_,l[A].filter(i));c[A].sort(y),l[A].filter(function(E){return!i(E)}).sort(function(E){return l[A].indexOf(E)}).forEach(function(E){c[A].splice(c[A].indexOf(E),1),c[A].splice(l[A].indexOf(E),0,E)}),e.emit("plotly_restyle",[{dimensions:[c[A]]},[v[A]]])};g(e,a,{width:b.w,height:b.h,margin:{t:b.t,r:b.r,b:b.b,l:b.l}},{filterChanged:u,hover:o,unhover:d,axesMoved:w})}};p.reglPrecompiled=S},74996:function(G,U,t){var g=t(45464),C=t(86968).u,i=t(25376),S=t(22548),x=t(21776).Ks,h=t(21776).Gw,p=t(92880).extendFlat,r=t(98192).c,e=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});G.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:p({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:x({},{keys:["label","color","value","percent","text"]}),texttemplate:h({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:p({},e,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:p({},e,{}),outsidetextfont:p({},e,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:p({},e,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:C({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:p({},e,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(G,U,t){var g=t(7316);U.name="pie",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},45768:function(G,U,t){var g=t(38248),C=t(49760),i=t(76308),S={};function x(e,a){var n=[],f=e._fullLayout,c=f.hiddenlabels||[],l=a.labels,m=a.marker.colors||[],v=a.values,b=a._length,u=a._hasValues&&b,o,d;if(a.dlabel)for(l=new Array(b),o=0;o=0});var M=a.type==="funnelarea"?y:a.sort;return M&&n.sort(function(z,D){return D.v-z.v}),n[0]&&(n[0].vTotal=_),n}function h(e){return function(n,f){return!n||(n=C(n),!n.isValid())?!1:(n=i.addOpacity(n,n.getAlpha()),e[f]||(e[f]=n),n)}}function p(e,a){var n=(a||{}).type;n||(n="pie");var f=e._fullLayout,c=e.calcdata,l=f[n+"colorway"],m=f["_"+n+"colormap"];f["extend"+n+"colors"]&&(l=r(l,S));for(var v=0,b=0;b0){m=!0;break}}m||(l=0)}return{hasLabels:f,hasValues:c,len:l}}function r(a,n,f,c,l){var m=c("marker.line.width");m&&c("marker.line.color",l?void 0:f.paper_bgcolor);var v=c("marker.colors");h(c,"marker.pattern",v),a.marker&&!n.marker.pattern.fgcolor&&(n.marker.pattern.fgcolor=a.marker.colors),n.marker.pattern.bgcolor||(n.marker.pattern.bgcolor=f.paper_bgcolor)}function e(a,n,f,c){function l(L,M){return C.coerce(a,n,i,L,M)}var m=l("labels"),v=l("values"),b=p(m,v),u=b.len;if(n._hasLabels=b.hasLabels,n._hasValues=b.hasValues,!n._hasLabels&&n._hasValues&&(l("label0"),l("dlabel")),!u){n.visible=!1;return}n._length=u,r(a,n,c,l,!0),l("scalegroup");var o=l("text"),d=l("texttemplate"),w;if(d||(w=l("textinfo",C.isArrayOrTypedArray(o)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),d||w&&w!=="none"){var A=l("textposition");x(a,n,c,l,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(A)||A==="auto",y=_||A==="outside";y&&l("automargin"),(A==="inside"||A==="auto"||Array.isArray(A))&&l("insidetextorientation")}else w==="none"&&l("textposition","none");S(n,c,l);var E=l("hole"),T=l("title.text");if(T){var s=l("title.position",E?"middle center":"top center");!E&&s==="middle center"&&(n.title.position="top center"),C.coerceFont(l,"title.font",c.font)}l("sort"),l("direction"),l("rotation"),l("pull")}G.exports={handleLabelsAndValues:p,handleMarkerDefaults:r,supplyDefaults:e}},53644:function(G,U,t){var g=t(10624).appendArrayMultiPointValues;G.exports=function(i,S){var x={curveNumber:S.index,pointNumbers:i.pts,data:S._input,fullData:S,label:i.label,color:i.color,value:i.v,percent:i.percent,text:i.text,bbox:i.bbox,v:i.v};return i.pts.length===1&&(x.pointNumber=x.i=i.pts[0]),g(x,S,i.pts),S.type==="funnelarea"&&(delete x.v,delete x.i),x}},21552:function(G,U,t){var g=t(43616),C=t(76308);G.exports=function(S,x,h,p){var r=h.marker.pattern;r&&r.shape?g.pointStyle(S,h,p,x):C.fill(S,x.color)}},69656:function(G,U,t){var g=t(3400);function C(i){return i.indexOf("e")!==-1?i.replace(/[.]?0+e/,"e"):i.indexOf(".")!==-1?i.replace(/[.]?0+$/,""):i}U.formatPiePercent=function(S,x){var h=C((S*100).toPrecision(3));return g.numSeparate(h,x)+"%"},U.formatPieValue=function(S,x){var h=C(S.toPrecision(10));return g.numSeparate(h,x)},U.getFirstFilled=function(S,x){if(g.isArrayOrTypedArray(S))for(var h=0;h0&&(It+=le*kt.pxmid[0],re+=le*kt.pxmid[1])}kt.cxFinal=It,kt.cyFinal=re;function he(Jt,Wt,Ft,xt){var yt=xt*(Wt[0]-Jt[0]),Et=xt*(Wt[1]-Jt[1]);return"a"+xt*nt.r+","+xt*nt.r+" 0 "+kt.largeArc+(Ft?" 1 ":" 0 ")+yt+","+Et}var de=ct.hole;if(kt.v===nt.vTotal){var xe="M"+(It+kt.px0[0])+","+(re+kt.px0[1])+he(kt.px0,kt.pxmid,!0,1)+he(kt.pxmid,kt.px0,!0,1)+"Z";de?$t.attr("d","M"+(It+de*kt.px0[0])+","+(re+de*kt.px0[1])+he(kt.px0,kt.pxmid,!1,de)+he(kt.pxmid,kt.px0,!1,de)+"Z"+xe):$t.attr("d",xe)}else{var Se=he(kt.px0,kt.px1,!0,1);if(de){var ne=1-de;$t.attr("d","M"+(It+de*kt.px1[0])+","+(re+de*kt.px1[1])+he(kt.px1,kt.px0,!1,de)+"l"+ne*kt.px0[0]+","+ne*kt.px0[1]+Se+"Z")}else $t.attr("d","M"+It+","+re+"l"+kt.px0[0]+","+kt.px0[1]+Se+"Z")}ut(X,kt,nt);var zt=l.castOption(ct.textposition,kt.pts),Xt=Kt.selectAll("g.slicetext").data(kt.text&&zt!=="none"?[0]:[]);Xt.enter().append("g").classed("slicetext",!0),Xt.exit().remove(),Xt.each(function(){var Jt=h.ensureSingle(g.select(this),"text","",function(jt){jt.attr("data-notex",1)}),Wt=h.ensureUniformFontSize(X,zt==="outside"?d(ct,kt,Q.font):w(ct,kt,Q.font));Jt.text(kt.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,Wt).call(e.convertToTspans,X);var Ft=x.bBox(Jt.node()),xt;if(zt==="outside")xt=D(Ft,kt);else if(xt=_(Ft,kt,nt),zt==="auto"&&xt.scale<1){var yt=h.ensureUniformFontSize(X,ct.outsidetextfont);Jt.call(x.font,yt),Ft=x.bBox(Jt.node()),xt=D(Ft,kt)}var Et=xt.textPosAngle,Mt=Et===void 0?kt.pxmid:it(nt.r,Et);if(xt.targetX=It+Mt[0]*xt.rCenter+(xt.x||0),xt.targetY=re+Mt[1]*xt.rCenter+(xt.y||0),J(xt,Ft),xt.outside){var Nt=xt.targetY;kt.yLabelMin=Nt-Ft.height/2,kt.yLabelMid=Nt,kt.yLabelMax=Nt+Ft.height/2,kt.labelExtraX=0,kt.labelExtraY=0,wt=!0}xt.fontSize=Wt.size,n(ct.type,xt,Q),Z[Vt].transform=xt,h.setTransormAndDisplay(Jt,xt)})});var Rt=g.select(this).selectAll("g.titletext").data(ct.title.text?[0]:[]);if(Rt.enter().append("g").classed("titletext",!0),Rt.exit().remove(),Rt.each(function(){var kt=h.ensureSingle(g.select(this),"text","",function(re){re.attr("data-notex",1)}),Vt=ct.title.text;ct._meta&&(Vt=h.templateString(Vt,ct._meta)),kt.text(Vt).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,ct.title.font).call(e.convertToTspans,X);var It;ct.title.position==="middle center"?It=N(nt):It=I(nt,ot),kt.attr("transform",r(It.x,It.y)+p(Math.min(1,It.scale))+r(It.tx,It.ty))}),wt&&H(Tt,ct),u(gt,ct),wt&&ct.automargin){var bt=x.bBox(st.node()),At=ct.domain,mt=ot.w*(At.x[1]-At.x[0]),Lt=ot.h*(At.y[1]-At.y[0]),Ht=(.5*mt-nt.r)/ot.w,Ut=(.5*Lt-nt.r)/ot.h;C.autoMargin(X,"pie."+ct.uid+".automargin",{xl:At.x[0]-Ht,xr:At.x[1]+Ht,yb:At.y[0]-Ut,yt:At.y[1]+Ut,l:Math.max(nt.cx-nt.r-bt.left,0),r:Math.max(bt.right-(nt.cx+nt.r),0),b:Math.max(bt.bottom-(nt.cy+nt.r),0),t:Math.max(nt.cy-nt.r-bt.top,0),pad:5})}})});setTimeout(function(){$.selectAll("tspan").each(function(){var Z=g.select(this);Z.attr("dy")&&Z.attr("dy",Z.attr("dy"))})},0)}function u(X,tt){X.each(function(V){var Q=g.select(this);if(!V.labelExtraX&&!V.labelExtraY){Q.select("path.textline").remove();return}var ot=Q.select("g.slicetext text");V.transform.targetX+=V.labelExtraX,V.transform.targetY+=V.labelExtraY,h.setTransormAndDisplay(ot,V.transform);var $=V.cxFinal+V.pxmid[0],Z=V.cyFinal+V.pxmid[1],st="M"+$+","+Z,nt=(V.yLabelMax-V.yLabelMin)*(V.pxmid[0]<0?-1:1)/4;if(V.labelExtraX){var ct=V.labelExtraX*V.pxmid[1]/V.pxmid[0],gt=V.yLabelMid+V.labelExtraY-(V.cyFinal+V.pxmid[1]);Math.abs(ct)>Math.abs(gt)?st+="l"+gt*V.pxmid[0]/V.pxmid[1]+","+gt+"H"+($+V.labelExtraX+nt):st+="l"+V.labelExtraX+","+ct+"v"+(gt-ct)+"h"+nt}else st+="V"+(V.yLabelMid+V.labelExtraY)+"h"+nt;h.ensureSingle(Q,"path","textline").call(S.stroke,tt.outsidetextfont.color).attr({"stroke-width":Math.min(2,tt.outsidetextfont.size/8),d:st,fill:"none"})})}function o(X,tt,V){var Q=V[0],ot=Q.cx,$=Q.cy,Z=Q.trace,st=Z.type==="funnelarea";"_hasHoverLabel"in Z||(Z._hasHoverLabel=!1),"_hasHoverEvent"in Z||(Z._hasHoverEvent=!1),X.on("mouseover",function(nt){var ct=tt._fullLayout,gt=tt._fullData[Z.index];if(!(tt._dragging||ct.hovermode===!1)){var Tt=gt.hoverinfo;if(Array.isArray(Tt)&&(Tt=i.castHoverinfo({hoverinfo:[l.castOption(Tt,nt.pts)],_module:Z._module},ct,0)),Tt==="all"&&(Tt="label+text+value+percent+name"),gt.hovertemplate||Tt!=="none"&&Tt!=="skip"&&Tt){var wt=nt.rInscribed||0,Rt=ot+nt.pxmid[0]*(1-wt),bt=$+nt.pxmid[1]*(1-wt),At=ct.separators,mt=[];if(Tt&&Tt.indexOf("label")!==-1&&mt.push(nt.label),nt.text=l.castOption(gt.hovertext||gt.text,nt.pts),Tt&&Tt.indexOf("text")!==-1){var Lt=nt.text;h.isValidTextValue(Lt)&&mt.push(Lt)}nt.value=nt.v,nt.valueLabel=l.formatPieValue(nt.v,At),Tt&&Tt.indexOf("value")!==-1&&mt.push(nt.valueLabel),nt.percent=nt.v/Q.vTotal,nt.percentLabel=l.formatPiePercent(nt.percent,At),Tt&&Tt.indexOf("percent")!==-1&&mt.push(nt.percentLabel);var Ht=gt.hoverlabel,Ut=Ht.font,kt=[];i.loneHover({trace:Z,x0:Rt-wt*Q.r,x1:Rt+wt*Q.r,y:bt,_x0:st?ot+nt.TL[0]:Rt-wt*Q.r,_x1:st?ot+nt.TR[0]:Rt+wt*Q.r,_y0:st?$+nt.TL[1]:bt-wt*Q.r,_y1:st?$+nt.BL[1]:bt+wt*Q.r,text:mt.join("
    "),name:gt.hovertemplate||Tt.indexOf("name")!==-1?gt.name:void 0,idealAlign:nt.pxmid[0]<0?"left":"right",color:l.castOption(Ht.bgcolor,nt.pts)||nt.color,borderColor:l.castOption(Ht.bordercolor,nt.pts),fontFamily:l.castOption(Ut.family,nt.pts),fontSize:l.castOption(Ut.size,nt.pts),fontColor:l.castOption(Ut.color,nt.pts),nameLength:l.castOption(Ht.namelength,nt.pts),textAlign:l.castOption(Ht.align,nt.pts),hovertemplate:l.castOption(gt.hovertemplate,nt.pts),hovertemplateLabels:nt,eventData:[m(nt,gt)]},{container:ct._hoverlayer.node(),outerContainer:ct._paper.node(),gd:tt,inOut_bbox:kt}),nt.bbox=kt[0],Z._hasHoverLabel=!0}Z._hasHoverEvent=!0,tt.emit("plotly_hover",{points:[m(nt,gt)],event:g.event})}}),X.on("mouseout",function(nt){var ct=tt._fullLayout,gt=tt._fullData[Z.index],Tt=g.select(this).datum();Z._hasHoverEvent&&(nt.originalEvent=g.event,tt.emit("plotly_unhover",{points:[m(Tt,gt)],event:g.event}),Z._hasHoverEvent=!1),Z._hasHoverLabel&&(i.loneUnhover(ct._hoverlayer.node()),Z._hasHoverLabel=!1)}),X.on("click",function(nt){var ct=tt._fullLayout,gt=tt._fullData[Z.index];tt._dragging||ct.hovermode===!1||(tt._hoverdata=[m(nt,gt)],i.click(tt,g.event))})}function d(X,tt,V){var Q=l.castOption(X.outsidetextfont.color,tt.pts)||l.castOption(X.textfont.color,tt.pts)||V.color,ot=l.castOption(X.outsidetextfont.family,tt.pts)||l.castOption(X.textfont.family,tt.pts)||V.family,$=l.castOption(X.outsidetextfont.size,tt.pts)||l.castOption(X.textfont.size,tt.pts)||V.size;return{color:Q,family:ot,size:$}}function w(X,tt,V){var Q=l.castOption(X.insidetextfont.color,tt.pts);!Q&&X._input.textfont&&(Q=l.castOption(X._input.textfont.color,tt.pts));var ot=l.castOption(X.insidetextfont.family,tt.pts)||l.castOption(X.textfont.family,tt.pts)||V.family,$=l.castOption(X.insidetextfont.size,tt.pts)||l.castOption(X.textfont.size,tt.pts)||V.size;return{color:Q||S.contrast(tt.color),family:ot,size:$}}function A(X,tt){for(var V,Q,ot=0;ot=-4;Ht-=2)Lt(Math.PI*Ht,"tan");for(Ht=4;Ht>=-4;Ht-=2)Lt(Math.PI*(Ht+1),"tan")}if(Tt||Rt){for(Ht=4;Ht>=-4;Ht-=2)Lt(Math.PI*(Ht+1.5),"rad");for(Ht=4;Ht>=-4;Ht-=2)Lt(Math.PI*(Ht+.5),"rad")}}if(st||bt||Tt){var Ut=Math.sqrt(X.width*X.width+X.height*X.height);if(mt={scale:ot*Q*2/Ut,rCenter:1-ot,rotate:0},mt.textPosAngle=(tt.startangle+tt.stopangle)/2,mt.scale>=1)return mt;At.push(mt)}(bt||Rt)&&(mt=E(X,Q,Z,nt,ct),mt.textPosAngle=(tt.startangle+tt.stopangle)/2,At.push(mt)),(bt||wt)&&(mt=T(X,Q,Z,nt,ct),mt.textPosAngle=(tt.startangle+tt.stopangle)/2,At.push(mt));for(var kt=0,Vt=0,It=0;It=1)break}return At[kt]}function y(X,tt){var V=X.startangle,Q=X.stopangle;return V>tt&&tt>Q||V0?1:-1)/2,y:$/(1+V*V/(Q*Q)),outside:!0}}function N(X){var tt=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/tt,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function I(X,tt){var V=1,Q=1,ot,$=X.trace,Z={x:X.cx,y:X.cy},st={tx:0,ty:0};st.ty+=$.title.font.size,ot=O($),$.title.position.indexOf("top")!==-1?(Z.y-=(1+ot)*X.r,st.ty-=X.titleBox.height):$.title.position.indexOf("bottom")!==-1&&(Z.y+=(1+ot)*X.r);var nt=k(X.r,X.trace.aspectratio),ct=tt.w*($.domain.x[1]-$.domain.x[0])/2;return $.title.position.indexOf("left")!==-1?(ct=ct+nt,Z.x-=(1+ot)*nt,st.tx+=X.titleBox.width/2):$.title.position.indexOf("center")!==-1?ct*=2:$.title.position.indexOf("right")!==-1&&(ct=ct+nt,Z.x+=(1+ot)*nt,st.tx-=X.titleBox.width/2),V=ct/X.titleBox.width,Q=B(X,tt)/X.titleBox.height,{x:Z.x,y:Z.y,scale:Math.min(V,Q),tx:st.tx,ty:st.ty}}function k(X,tt){return X/(tt===void 0?1:tt)}function B(X,tt){var V=X.trace,Q=tt.h*(V.domain.y[1]-V.domain.y[0]);return Math.min(X.titleBox.height,Q/2)}function O(X){var tt=X.pull;if(!tt)return 0;var V;if(h.isArrayOrTypedArray(tt))for(tt=0,V=0;Vtt&&(tt=X.pull[V]);return tt}function H(X,tt){var V,Q,ot,$,Z,st,nt,ct,gt,Tt,wt,Rt,bt;function At(Ut,kt){return Ut.pxmid[1]-kt.pxmid[1]}function mt(Ut,kt){return kt.pxmid[1]-Ut.pxmid[1]}function Lt(Ut,kt){kt||(kt={});var Vt=kt.labelExtraY+(Q?kt.yLabelMax:kt.yLabelMin),It=Q?Ut.yLabelMin:Ut.yLabelMax,re=Q?Ut.yLabelMax:Ut.yLabelMin,Kt=Ut.cyFinal+Z(Ut.px0[1],Ut.px1[1]),$t=Vt-It,le,he,de,xe,Se,ne;if($t*nt>0&&(Ut.labelExtraY=$t),!!h.isArrayOrTypedArray(tt.pull))for(he=0;he=(l.castOption(tt.pull,de.pts)||0))&&((Ut.pxmid[1]-de.pxmid[1])*nt>0?(xe=de.cyFinal+Z(de.px0[1],de.px1[1]),$t=xe-It-Ut.labelExtraY,$t*nt>0&&(Ut.labelExtraY+=$t)):(re+Ut.labelExtraY-Kt)*nt>0&&(le=3*st*Math.abs(he-Tt.indexOf(Ut)),Se=de.cxFinal+$(de.px0[0],de.px1[0]),ne=Se+le-(Ut.cxFinal+Ut.pxmid[0])-Ut.labelExtraX,ne*st>0&&(Ut.labelExtraX+=ne)))}for(Q=0;Q<2;Q++)for(ot=Q?At:mt,Z=Q?Math.max:Math.min,nt=Q?1:-1,V=0;V<2;V++){for($=V?Math.max:Math.min,st=V?1:-1,ct=X[Q][V],ct.sort(ot),gt=X[1-Q][V],Tt=gt.concat(ct),Rt=[],wt=0;wt1?(ct=V.r,gt=ct/ot.aspectratio):(gt=V.r,ct=gt*ot.aspectratio),ct*=(1+ot.baseratio)/2,nt=ct*gt}Z=Math.min(Z,nt/V.vTotal)}for(Q=0;Qtt.vTotal/2?1:0,ct.halfangle=Math.PI*Math.min(ct.v/tt.vTotal,.5),ct.ring=1-Q.hole,ct.rInscribed=z(ct,tt))}function it(X,tt){return[X*Math.sin(tt),-X*Math.cos(tt)]}function ut(X,tt,V){var Q=X._fullLayout,ot=V.trace,$=ot.texttemplate,Z=ot.textinfo;if(!$&&Z&&Z!=="none"){var st=Z.split("+"),nt=function(kt){return st.indexOf(kt)!==-1},ct=nt("label"),gt=nt("text"),Tt=nt("value"),wt=nt("percent"),Rt=Q.separators,bt;if(bt=ct?[tt.label]:[],gt){var At=l.getFirstFilled(ot.text,tt.pts);v(At)&&bt.push(At)}Tt&&bt.push(l.formatPieValue(tt.v,Rt)),wt&&bt.push(l.formatPiePercent(tt.v/V.vTotal,Rt)),tt.text=bt.join("
    ")}function mt(kt){return{label:kt.label,value:kt.v,valueLabel:l.formatPieValue(kt.v,Q.separators),percent:kt.v/V.vTotal,percentLabel:l.formatPiePercent(kt.v/V.vTotal,Q.separators),color:kt.color,text:kt.text,customdata:h.castOption(ot,kt.i,"customdata")}}if($){var Lt=h.castOption(ot,tt.i,"texttemplate");if(!Lt)tt.text="";else{var Ht=mt(tt),Ut=l.getFirstFilled(ot.text,tt.pts);(v(Ut)||Ut==="")&&(Ht.text=Ut),tt.text=h.texttemplateString(Lt,Ht,X._fullLayout._d3locale,Ht,ot._meta||{})}}}function J(X,tt){var V=X.rotate*Math.PI/180,Q=Math.cos(V),ot=Math.sin(V),$=(tt.left+tt.right)/2,Z=(tt.top+tt.bottom)/2;X.textX=$*Q-Z*ot,X.textY=$*ot+Z*Q,X.noCenter=!0}G.exports={plot:b,formatSliceLabel:ut,transformInsideText:_,determineInsideTextFont:w,positionTitleOutside:I,prerenderTitles:A,layoutAreas:Y,attachFxHandlers:o,computeTransform:J}},22152:function(G,U,t){var g=t(33428),C=t(10528),i=t(82744).resizeText;G.exports=function(x){var h=x._fullLayout._pielayer.selectAll(".trace");i(x,h,"pie"),h.each(function(p){var r=p[0],e=r.trace,a=g.select(this);a.style({opacity:e.opacity}),a.selectAll("path.surface").each(function(n){g.select(this).call(C,n,e,x)})})}},10528:function(G,U,t){var g=t(76308),C=t(69656).castOption,i=t(21552);G.exports=function(x,h,p,r){var e=p.marker.line,a=C(e.color,h.pts)||g.defaultLine,n=C(e.width,h.pts)||0;x.call(i,h,p,r).style("stroke-width",n).call(g.stroke,a)}},35484:function(G,U,t){var g=t(52904);G.exports={x:g.x,y:g.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:g.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},11072:function(G,U,t){var g=t(67792).gl_pointcloud2d,C=t(3400).isArrayOrTypedArray,i=t(43080),S=t(19280).findExtremes,x=t(44928);function h(e,a){this.scene=e,this.uid=a,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=g(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var p=h.prototype;p.handlePick=function(e){var a=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[a*2],this.pickXYData[a*2+1]]:[this.pickXData[a],this.pickYData[a]],textLabel:C(this.textLabels)?this.textLabels[a]:this.textLabels,color:this.color,name:this.name,pointIndex:a,hoverinfo:this.hoverinfo}},p.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=x(e,{})},p.updateFast=function(e){var a=this.xData=this.pickXData=e.x,n=this.yData=this.pickYData=e.y,f=this.pickXYData=e.xy,c=e.xbounds&&e.ybounds,l=e.indices,m,v,b,u=this.bounds,o,d,w;if(f){if(b=f,m=f.length>>>1,c)u[0]=e.xbounds[0],u[2]=e.xbounds[1],u[1]=e.ybounds[0],u[3]=e.ybounds[1];else for(w=0;wu[2]&&(u[2]=o),du[3]&&(u[3]=d);if(l)v=l;else for(v=new Int32Array(m),w=0;wu[2]&&(u[2]=o),du[3]&&(u[3]=d);this.idToIndex=v,this.pointcloudOptions.idToIndex=v,this.pointcloudOptions.positions=b;var A=i(e.marker.color),_=i(e.marker.border.color),y=e.opacity*e.marker.opacity;A[3]*=y,this.pointcloudOptions.color=A;var E=e.marker.blend;if(E===null){var T=100;E=a.length_&&(_=n.source[o]),n.target[o]>_&&(_=n.target[o]);var y=_+1;e.node._count=y;var E,T=e.node.groups,s={};for(o=0;o0&&x(I,y)&&x(k,y)&&!(s.hasOwnProperty(I)&&s.hasOwnProperty(k)&&s[I]===s[k])){s.hasOwnProperty(k)&&(k=s[k]),s.hasOwnProperty(I)&&(I=s[I]),I=+I,k=+k,v[I]=v[k]=!0;var B="";n.label&&n.label[o]&&(B=n.label[o]);var O=null;B&&b.hasOwnProperty(B)&&(O=b[B]),f.push({pointNumber:o,label:B,color:c?n.color[o]:n.color,hovercolor:l?n.hovercolor[o]:n.hovercolor,customdata:m?n.customdata[o]:n.customdata,concentrationscale:O,source:I,target:k,value:+N}),D.source.push(I),D.target.push(k)}}var H=y+T.length,Y=S(a.color),j=S(a.customdata),et=[];for(o=0;oy-1,childrenNodes:[],pointNumber:o,label:it,color:Y?a.color[o]:a.color,customdata:j?a.customdata[o]:a.customdata})}var ut=!1;return r(H,D.source,D.target)&&(ut=!0),{circular:ut,links:f,nodes:et,groups:T,groupLookup:s}}function r(e,a,n){for(var f=C.init2dArray(e,0),c=0;c1})}G.exports=function(a,n){var f=p(n);return i({circular:f.circular,_nodes:f.nodes,_links:f.links,_groups:f.groups,_groupLookup:f.groupLookup})}},11820:function(G){G.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},47140:function(G,U,t){var g=t(3400),C=t(41440),i=t(76308),S=t(49760),x=t(86968).Q,h=t(16132),p=t(31780),r=t(51272);G.exports=function(n,f,c,l){function m(z,D){return g.coerce(n,f,C,z,D)}var v=g.extendDeep(l.hoverlabel,n.hoverlabel),b=n.node,u=p.newContainer(f,"node");function o(z,D){return g.coerce(b,u,C.node,z,D)}o("label"),o("groups"),o("x"),o("y"),o("pad"),o("thickness"),o("line.color"),o("line.width"),o("hoverinfo",n.hoverinfo),h(b,u,o,v),o("hovertemplate"),o("align");var d=l.colorway,w=function(z){return d[z%d.length]};o("color",u.label.map(function(z,D){return i.addOpacity(w(D),.8)})),o("customdata");var A=n.link||{},_=p.newContainer(f,"link");function y(z,D){return g.coerce(A,_,C.link,z,D)}y("label"),y("arrowlen"),y("source"),y("target"),y("value"),y("line.color"),y("line.width"),y("hoverinfo",n.hoverinfo),h(A,_,y,v),y("hovertemplate");var E=S(l.paper_bgcolor).getLuminance()<.333,T=E?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",s=y("color",T);function L(z){var D=S(z);if(!D.isValid())return z;var N=D.getAlpha();return N<=.8?D.setAlpha(N+.2):D=E?D.brighten():D.darken(),D.toRgbString()}y("hovercolor",Array.isArray(s)?s.map(L):L(s)),y("customdata"),r(A,_,{name:"colorscales",handleItemDefaults:e}),x(f,l,m),m("orientation"),m("valueformat"),m("valuesuffix");var M;u.x.length&&u.y.length&&(M="freeform"),m("arrangement",M),g.coerceFont(m,"textfont",g.extendFlat({},l.font)),f._length=null};function e(a,n){function f(c,l){return g.coerce(a,n,C.link.colorscales,c,l)}f("label"),f("cmin"),f("cmax"),f("colorscale")}},45499:function(G,U,t){G.exports={attributes:t(41440),supplyDefaults:t(47140),calc:t(48068),plot:t(59596),moduleType:"trace",name:"sankey",basePlotModule:t(10760),selectPoints:t(81128),categories:["noOpacity"],meta:{}}},59596:function(G,U,t){var g=t(33428),C=t(3400),i=C.numberFormat,S=t(83248),x=t(93024),h=t(76308),p=t(11820).cn,r=C._;function e(d){return d!==""}function a(d,w){return d.filter(function(A){return A.key===w.traceId})}function n(d,w){g.select(d).select("path").style("fill-opacity",w),g.select(d).select("rect").style("fill-opacity",w)}function f(d){g.select(d).select("text.name").style("fill","black")}function c(d){return function(w){return d.node.sourceLinks.indexOf(w.link)!==-1||d.node.targetLinks.indexOf(w.link)!==-1}}function l(d){return function(w){return w.node.sourceLinks.indexOf(d.link)!==-1||w.node.targetLinks.indexOf(d.link)!==-1}}function m(d,w,A){w&&A&&a(A,w).selectAll("."+p.sankeyLink).filter(c(w)).call(b.bind(0,w,A,!1))}function v(d,w,A){w&&A&&a(A,w).selectAll("."+p.sankeyLink).filter(c(w)).call(u.bind(0,w,A,!1))}function b(d,w,A,_){_.style("fill",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverHue}).style("fill-opacity",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverAlpha}),_.each(function(y){var E=y.link.label;E!==""&&a(w,d).selectAll("."+p.sankeyLink).filter(function(T){return T.link.label===E}).style("fill",function(T){if(!T.link.concentrationscale)return T.tinyColorHoverHue}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.tinyColorHoverAlpha})}),A&&a(w,d).selectAll("."+p.sankeyNode).filter(l(d)).call(m)}function u(d,w,A,_){_.style("fill",function(y){return y.tinyColorHue}).style("fill-opacity",function(y){return y.tinyColorAlpha}),_.each(function(y){var E=y.link.label;E!==""&&a(w,d).selectAll("."+p.sankeyLink).filter(function(T){return T.link.label===E}).style("fill",function(T){return T.tinyColorHue}).style("fill-opacity",function(T){return T.tinyColorAlpha})}),A&&a(w,d).selectAll(p.sankeyNode).filter(l(d)).call(v)}function o(d,w){var A=d.hoverlabel||{},_=C.nestedProperty(A,w).get();return Array.isArray(_)?!1:_}G.exports=function(w,A){for(var _=w._fullLayout,y=_._paper,E=_._size,T=0;T"),color:o(J,"bgcolor")||h.addOpacity(ot.color,1),borderColor:o(J,"bordercolor"),fontFamily:o(J,"font.family"),fontSize:o(J,"font.size"),fontColor:o(J,"font.color"),nameLength:o(J,"namelength"),textAlign:o(J,"align"),idealAlign:g.event.x<$[0]?"right":"left",hovertemplate:J.hovertemplate,hovertemplateLabels:Z,eventData:[ot]})}}var st=x.loneHover(X,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:w,anchorIndex:V});st.each(function(){var nt=this;ut.link.concentrationscale||n(nt,.65),f(nt)})},O=function(it,ut,J){w._fullLayout.hovermode!==!1&&(g.select(it).call(u.bind(0,ut,J,!0)),ut.link.trace.link.hoverinfo!=="skip"&&(ut.link.fullData=ut.link.trace,w.emit("plotly_unhover",{event:g.event,points:[ut.link]})),x.loneUnhover(_._hoverlayer.node()))},H=function(it,ut,J){var X=ut.node;X.originalEvent=g.event,w._hoverdata=[X],g.select(it).call(v,ut,J),x.click(w,{target:!0})},Y=function(it,ut,J){w._fullLayout.hovermode!==!1&&(g.select(it).call(m,ut,J),ut.node.trace.node.hoverinfo!=="skip"&&(ut.node.fullData=ut.node.trace,w.emit("plotly_hover",{event:g.event,points:[ut.node]})))},j=function(it,ut){if(w._fullLayout.hovermode!==!1){var J=ut.node.trace.node;if(!(J.hoverinfo==="none"||J.hoverinfo==="skip")){var X=g.select(it).select("."+p.nodeRect),tt=w._fullLayout._paperdiv.node().getBoundingClientRect(),V=X.node().getBoundingClientRect(),Q=V.left-2-tt.left,ot=V.right+2-tt.left,$=V.top+V.height/4-tt.top,Z={valueLabel:i(ut.valueFormat)(ut.node.value)+ut.valueSuffix};ut.node.fullData=ut.node.trace,w._fullLayout._calcInverseTransform(w);var st=w._fullLayout._invScaleX,nt=w._fullLayout._invScaleY,ct=x.loneHover({x0:st*Q,x1:st*ot,y:nt*$,name:i(ut.valueFormat)(ut.node.value)+ut.valueSuffix,text:[ut.node.label,I+ut.node.targetLinks.length,k+ut.node.sourceLinks.length].filter(e).join("
    "),color:o(J,"bgcolor")||ut.tinyColorHue,borderColor:o(J,"bordercolor"),fontFamily:o(J,"font.family"),fontSize:o(J,"font.size"),fontColor:o(J,"font.color"),nameLength:o(J,"namelength"),textAlign:o(J,"align"),idealAlign:"left",hovertemplate:J.hovertemplate,hovertemplateLabels:Z,eventData:[ut.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:w});n(ct,.85),f(ct)}}},et=function(it,ut,J){w._fullLayout.hovermode!==!1&&(g.select(it).call(v,ut,J),ut.node.trace.node.hoverinfo!=="skip"&&(ut.node.fullData=ut.node.trace,w.emit("plotly_unhover",{event:g.event,points:[ut.node]})),x.loneUnhover(_._hoverlayer.node()))};S(w,y,A,{width:E.w,height:E.h,margin:{t:E.t,r:E.r,b:E.b,l:E.l}},{linkEvents:{hover:M,follow:B,unhover:O,select:L},nodeEvents:{hover:Y,follow:j,unhover:et,select:H}})}},83248:function(G,U,t){var g=t(49812),C=t(67756).Gz,i=t(33428),S=t(26800),x=t(48932),h=t(11820),p=t(49760),r=t(76308),e=t(43616),a=t(3400),n=a.strTranslate,f=a.strRotate,c=t(71688),l=c.keyFun,m=c.repeat,v=c.unwrap,b=t(72736),u=t(24040),o=t(84284),d=o.CAP_SHIFT,w=o.LINE_SPACING,A=3;function _(tt,V,Q){var ot=v(V),$=ot.trace,Z=$.domain,st=$.orientation==="h",nt=$.node.pad,ct=$.node.thickness,gt={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[$.node.align],Tt=tt.width*(Z.x[1]-Z.x[0]),wt=tt.height*(Z.y[1]-Z.y[0]),Rt=ot._nodes,bt=ot._links,At=ot.circular,mt;At?mt=x.sankeyCircular().circularLinkGap(0):mt=S.sankey(),mt.iterations(h.sankeyIterations).size(st?[Tt,wt]:[wt,Tt]).nodeWidth(ct).nodePadding(nt).nodeId(function(ne){return ne.pointNumber}).nodeAlign(gt).nodes(Rt).links(bt);var Lt=mt();mt.nodePadding()=Wt||(Jt=Wt-Xt.y0,Jt>1e-6&&(Xt.y0+=Jt,Xt.y1+=Jt)),Wt=Xt.y1+nt})}function he(ne){var zt=ne.map(function(Et,Mt){return{x0:Et.x0,index:Mt}}).sort(function(Et,Mt){return Et.x0-Mt.x0}),Xt=[],Jt=-1,Wt,Ft=-1/0,xt;for(Ht=0;HtFt+ct&&(Jt+=1,Wt=yt.x0),Ft=yt.x0,Xt[Jt]||(Xt[Jt]=[]),Xt[Jt].push(yt),xt=Wt-yt.x0,yt.x0+=xt,yt.x1+=xt}return Xt}if($.node.x.length&&$.node.y.length){for(Ht=0;Ht0?"L"+$.targetX+" "+$.targetY:"")+"Z":Q="M "+($.targetX-V)+" "+($.targetY-ot)+" L"+($.rightInnerExtent-V)+" "+($.targetY-ot)+"A"+($.rightLargeArcRadius+ot)+" "+($.rightSmallArcRadius+ot)+" 0 0 0 "+($.rightFullExtent-ot-V)+" "+($.targetY+$.rightSmallArcRadius)+"L"+($.rightFullExtent-ot-V)+" "+$.verticalRightInnerExtent+"A"+($.rightLargeArcRadius+ot)+" "+($.rightLargeArcRadius+ot)+" 0 0 0 "+($.rightInnerExtent-V)+" "+($.verticalFullExtent+ot)+"L"+$.leftInnerExtent+" "+($.verticalFullExtent+ot)+"A"+($.leftLargeArcRadius+ot)+" "+($.leftLargeArcRadius+ot)+" 0 0 0 "+($.leftFullExtent+ot)+" "+$.verticalLeftInnerExtent+"L"+($.leftFullExtent+ot)+" "+($.sourceY+$.leftSmallArcRadius)+"A"+($.leftLargeArcRadius+ot)+" "+($.leftSmallArcRadius+ot)+" 0 0 0 "+$.leftInnerExtent+" "+($.sourceY-ot)+"L"+$.sourceX+" "+($.sourceY-ot)+"L"+$.sourceX+" "+($.sourceY+ot)+"L"+$.leftInnerExtent+" "+($.sourceY+ot)+"A"+($.leftLargeArcRadius-ot)+" "+($.leftSmallArcRadius-ot)+" 0 0 1 "+($.leftFullExtent-ot)+" "+($.sourceY+$.leftSmallArcRadius)+"L"+($.leftFullExtent-ot)+" "+$.verticalLeftInnerExtent+"A"+($.leftLargeArcRadius-ot)+" "+($.leftLargeArcRadius-ot)+" 0 0 1 "+$.leftInnerExtent+" "+($.verticalFullExtent-ot)+"L"+($.rightInnerExtent-V)+" "+($.verticalFullExtent-ot)+"A"+($.rightLargeArcRadius-ot)+" "+($.rightLargeArcRadius-ot)+" 0 0 1 "+($.rightFullExtent+ot-V)+" "+$.verticalRightInnerExtent+"L"+($.rightFullExtent+ot-V)+" "+($.targetY+$.rightSmallArcRadius)+"A"+($.rightLargeArcRadius-ot)+" "+($.rightSmallArcRadius-ot)+" 0 0 1 "+($.rightInnerExtent-V)+" "+($.targetY+ot)+"L"+($.targetX-V)+" "+($.targetY+ot)+(V>0?"L"+$.targetX+" "+$.targetY:"")+"Z",Q}function T(){var tt=.5;function V(Q){var ot=Q.linkArrowLength;if(Q.link.circular)return E(Q.link,ot);var $=Math.abs((Q.link.target.x0-Q.link.source.x1)/2);ot>$&&(ot=$);var Z=Q.link.source.x1,st=Q.link.target.x0-ot,nt=C(Z,st),ct=nt(tt),gt=nt(1-tt),Tt=Q.link.y0-Q.link.width/2,wt=Q.link.y0+Q.link.width/2,Rt=Q.link.y1-Q.link.width/2,bt=Q.link.y1+Q.link.width/2,At="M"+Z+","+Tt,mt="C"+ct+","+Tt+" "+gt+","+Rt+" "+st+","+Rt,Lt="C"+gt+","+bt+" "+ct+","+wt+" "+Z+","+wt,Ht=ot>0?"L"+(st+ot)+","+(Rt+Q.link.width/2):"";return Ht+="L"+st+","+bt,At+mt+Ht+Lt+"Z"}return V}function s(tt,V){var Q=p(V.color),ot=h.nodePadAcross,$=tt.nodePad/2;V.dx=V.x1-V.x0,V.dy=V.y1-V.y0;var Z=V.dx,st=Math.max(.5,V.dy),nt="node_"+V.pointNumber;return V.group&&(nt=a.randstr()),V.trace=tt.trace,V.curveNumber=tt.trace.index,{index:V.pointNumber,key:nt,partOfGroup:V.partOfGroup||!1,group:V.group,traceId:tt.key,trace:tt.trace,node:V,nodePad:tt.nodePad,nodeLineColor:tt.nodeLineColor,nodeLineWidth:tt.nodeLineWidth,textFont:tt.textFont,size:tt.horizontal?tt.height:tt.width,visibleWidth:Math.ceil(Z),visibleHeight:st,zoneX:-ot,zoneY:-$,zoneWidth:Z+2*ot,zoneHeight:st+2*$,labelY:tt.horizontal?V.dy/2+1:V.dx/2+1,left:V.originalLayer===1,sizeAcross:tt.width,forceLayouts:tt.forceLayouts,horizontal:tt.horizontal,darkBackground:Q.getBrightness()<=128,tinyColorHue:r.tinyRGB(Q),tinyColorAlpha:Q.getAlpha(),valueFormat:tt.valueFormat,valueSuffix:tt.valueSuffix,sankey:tt.sankey,graph:tt.graph,arrangement:tt.arrangement,uniqueNodeLabelPathId:[tt.guid,tt.key,nt].join("_"),interactionState:tt.interactionState,figure:tt}}function L(tt){tt.attr("transform",function(V){return n(V.node.x0.toFixed(3),V.node.y0.toFixed(3))})}function M(tt){tt.call(L)}function z(tt,V){tt.call(M),V.attr("d",T())}function D(tt){tt.attr("width",function(V){return V.node.x1-V.node.x0}).attr("height",function(V){return V.visibleHeight})}function N(tt){return tt.link.width>1||tt.linkLineWidth>0}function I(tt){var V=n(tt.translateX,tt.translateY);return V+(tt.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function k(tt,V,Q){tt.on(".basic",null).on("mouseover.basic",function(ot){!ot.interactionState.dragInProgress&&!ot.partOfGroup&&(Q.hover(this,ot,V),ot.interactionState.hovered=[this,ot])}).on("mousemove.basic",function(ot){!ot.interactionState.dragInProgress&&!ot.partOfGroup&&(Q.follow(this,ot),ot.interactionState.hovered=[this,ot])}).on("mouseout.basic",function(ot){!ot.interactionState.dragInProgress&&!ot.partOfGroup&&(Q.unhover(this,ot,V),ot.interactionState.hovered=!1)}).on("click.basic",function(ot){ot.interactionState.hovered&&(Q.unhover(this,ot,V),ot.interactionState.hovered=!1),!ot.interactionState.dragInProgress&&!ot.partOfGroup&&Q.select(this,ot,V)})}function B(tt,V,Q,ot){var $=i.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(a.ensureSingle(ot._fullLayout._infolayer,"g","dragcover",function(nt){ot._fullLayout._dragCover=nt}),a.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,it(Z.node),Z.interactionState.hovered&&(Q.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var st=Z.traceId+"|"+Z.key;Z.forceLayouts[st]?Z.forceLayouts[st].alpha(1):O(tt,st,Z),H(tt,V,Z,st,ot)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var st=i.event.x,nt=i.event.y;Z.arrangement==="snap"?(Z.node.x0=st-Z.visibleWidth/2,Z.node.x1=st+Z.visibleWidth/2,Z.node.y0=nt-Z.visibleHeight/2,Z.node.y1=nt+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=st-Z.visibleWidth/2,Z.node.x1=st+Z.visibleWidth/2),nt=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,nt)),Z.node.y0=nt-Z.visibleHeight/2,Z.node.y1=nt+Z.visibleHeight/2),it(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(tt.filter(ut(Z)),V))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var st=0;st0)window.requestAnimationFrame(Z);else{var ct=Q.node.originalX;Q.node.x0=ct-Q.visibleWidth/2,Q.node.x1=ct+Q.visibleWidth/2,j(Q,$)}})}function Y(tt,V,Q,ot){return function(){for(var Z=0,st=0;st0&&ot.forceLayouts[V].alpha(0)}}function j(tt,V){for(var Q=[],ot=[],$=0;$I&&L[B].gap;)B--;for(H=L[B].s,k=L.length-1;k>B;k--)L[k].s=H;for(;ID[v]&&v=0;c--){var l=x[c];if(l.type==="scatter"&&l.xaxis===n.xaxis&&l.yaxis===n.yaxis){l.opacity=void 0;break}}}}}},18800:function(G,U,t){var g=t(3400),C=t(24040),i=t(52904),S=t(88200),x=t(43028),h=t(43980),p=t(31147),r=t(43912),e=t(74428),a=t(66828),n=t(11731),f=t(124),c=t(70840),l=t(3400).coercePattern;G.exports=function(v,b,u,o){function d(L,M){return g.coerce(v,b,i,L,M)}var w=h(v,b,o,d);if(w||(b.visible=!1),!!b.visible){p(v,b,o,d),d("xhoverformat"),d("yhoverformat");var A=r(v,b,o,d);o.scattermode==="group"&&b.orientation===void 0&&d("orientation","v");var _=!A&&w=Math.min(it,ut)&&v<=Math.max(it,ut)?0:1/0}var J=Math.max(3,et.mrc||0),X=1-1/J,tt=Math.abs(l.c2p(et.x)-v);return tt=Math.min(it,ut)&&b<=Math.max(it,ut)?0:1/0}var J=Math.max(3,et.mrc||0),X=1-1/J,tt=Math.abs(m.c2p(et.y)-b);return ttQ!=Tt>=Q&&(nt=Z[$-1][0],ct=Z[$][0],Tt-gt&&(st=nt+(ct-nt)*(Q-gt)/(Tt-gt),J=Math.min(J,st),X=Math.max(X,st)));return J=Math.max(J,0),X=Math.min(X,l._length),{x0:J,x1:X,y0:Q,y1:Q}}if(o.indexOf("fills")!==-1&&c._fillElement){var H=B(c._fillElement)&&!B(c._fillExclusionElement);if(H){var Y=O(c._polygons);Y===null&&(Y={x0:u[0],x1:u[0],y0:u[1],y1:u[1]});var j=x.defaultLine;return x.opacity(c.fillcolor)?j=c.fillcolor:x.opacity((c.line||{}).color)&&(j=c.line.color),g.extendFlat(r,{distance:r.maxHoverDistance,x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1,color:j,hovertemplate:!1}),delete r.index,c.text&&!g.isArrayOrTypedArray(c.text)?r.text=String(c.text):r.text=c.name,[r]}}}},65875:function(G,U,t){var g=t(43028);G.exports={hasLines:g.hasLines,hasMarkers:g.hasMarkers,hasText:g.hasText,isBubble:g.isBubble,attributes:t(52904),layoutAttributes:t(55308),supplyDefaults:t(18800),crossTraceDefaults:t(35036),supplyLayoutDefaults:t(59748),calc:t(16356).calc,crossTraceCalc:t(96664),arraysToCalcdata:t(20148),plot:t(96504),colorbar:t(5528),formatLabels:t(76688),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(98723),selectPoints:t(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:t(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308:function(G){G.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},59748:function(G,U,t){var g=t(3400),C=t(55308);G.exports=function(i,S){function x(p,r){return g.coerce(i,S,C,p,r)}var h=S.barmode==="group";S.scattermode==="group"&&x("scattergap",h?S.bargap:.2)}},66828:function(G,U,t){var g=t(3400).isArrayOrTypedArray,C=t(94288).hasColorscale,i=t(27260);G.exports=function(x,h,p,r,e,a){a||(a={});var n=(x.marker||{}).color;if(n&&n._inputArray&&(n=n._inputArray),e("line.color",p),C(x,"line"))i(x,h,r,e,{prefix:"line.",cLetter:"c"});else{var f=(g(n)?!1:n)||p;e("line.color",f)}e("line.width"),a.noDash||e("line.dash"),a.backoff&&e("line.backoff")}},52340:function(G,U,t){var g=t(43616),C=t(39032),i=C.BADNUM,S=C.LOG_CLIP,x=S+.5,h=S-.5,p=t(3400),r=p.segmentsIntersect,e=p.constrain,a=t(88200);G.exports=function(f,c){var l=c.trace||{},m=c.xaxis,v=c.yaxis,b=m.type==="log",u=v.type==="log",o=m._length,d=v._length,w=c.backoff,A=l.marker,_=c.connectGaps,y=c.baseTolerance,E=c.shape,T=E==="linear",s=l.fill&&l.fill!=="none",L=[],M=a.minTolerance,z=f.length,D=new Array(z),N=0,I,k,B,O,H,Y,j,et,it,ut,J,X,tt,V,Q,ot;function $(me){var be=f[me];if(!be)return!1;var ve=c.linearized?m.l2p(be.x):m.c2p(be.x),Le=c.linearized?v.l2p(be.y):v.c2p(be.y);if(ve===i){if(b&&(ve=m.c2p(be.x,!0)),ve===i)return!1;u&&Le===i&&(ve*=Math.abs(m._m*d*(m._m>0?x:h)/(v._m*o*(v._m>0?x:h)))),ve*=1e3}if(Le===i){if(u&&(Le=v.c2p(be.y,!0)),Le===i)return!1;Le*=1e3}return[ve,Le]}function Z(me,be,ve,Le){var ce=ve-me,Te=Le-be,Be=.5-me,ir=.5-be,pe=ce*ce+Te*Te,Xe=ce*Be+Te*ir;if(Xe>0&&Xe1||Math.abs(Be.y-ve[0][1])>1)&&(Be=[Be.x,Be.y],Le&>(Be,me)Rt||me[1]At)return[e(me[0],wt,Rt),e(me[1],bt,At)]}function $t(me,be){if(me[0]===be[0]&&(me[0]===wt||me[0]===Rt)||me[1]===be[1]&&(me[1]===bt||me[1]===At))return!0}function le(me,be){var ve=[],Le=Kt(me),ce=Kt(be);return Le&&ce&&$t(Le,ce)||(Le&&ve.push(Le),ce&&ve.push(ce)),ve}function he(me,be,ve){return function(Le,ce){var Te=Kt(Le),Be=Kt(ce),ir=[];if(Te&&Be&&$t(Te,Be))return ir;Te&&ir.push(Te),Be&&ir.push(Be);var pe=2*p.constrain((Le[me]+ce[me])/2,be,ve)-((Te||Le)[me]+(Be||ce)[me]);if(pe){var Xe;Te&&Be?Xe=pe>0==Te[me]>Be[me]?Te:Be:Xe=Te||Be,Xe[me]+=pe}return ir}}var de;E==="linear"||E==="spline"?de=re:E==="hv"||E==="vh"?de=le:E==="hvh"?de=he(0,wt,Rt):E==="vhv"&&(de=he(1,bt,At));function xe(me,be){var ve=be[0]-me[0],Le=(be[1]-me[1])/ve,ce=(me[1]*be[0]-be[1]*me[0])/ve;return ce>0?[Le>0?wt:Rt,At]:[Le>0?Rt:wt,bt]}function Se(me){var be=me[0],ve=me[1],Le=be===D[N-1][0],ce=ve===D[N-1][1];if(!(Le&&ce))if(N>1){var Te=be===D[N-2][0],Be=ve===D[N-2][1];Le&&(be===wt||be===Rt)&&Te?Be?N--:D[N-1]=me:ce&&(ve===bt||ve===At)&&Be?Te?N--:D[N-1]=me:D[N++]=me}else D[N++]=me}function ne(me){D[N-1][0]!==me[0]&&D[N-1][1]!==me[1]&&Se([Ut,kt]),Se(me),Vt=null,Ut=kt=0}var zt=p.isArrayOrTypedArray(A);function Xt(me){if(me&&w&&(me.i=I,me.d=f,me.trace=l,me.marker=zt?A[me.i]:A,me.backoff=w),st=me[0]/o,nt=me[1]/d,Lt=me[0]Rt?Rt:0,Ht=me[1]At?At:0,Lt||Ht){if(!N)D[N++]=[Lt||me[0],Ht||me[1]];else if(Vt){var be=de(Vt,me);be.length>1&&(ne(be[0]),D[N++]=be[1])}else It=de(D[N-1],me)[0],D[N++]=It;var ve=D[N-1];Lt&&Ht&&(ve[0]!==Lt||ve[1]!==Ht)?(Vt&&(Ut!==Lt&&kt!==Ht?Se(Ut&&kt?xe(Vt,me):[Ut||Lt,kt||Ht]):Ut&&kt&&Se([Ut,kt])),Se([Lt,Ht])):Ut-Lt&&kt-Ht&&Se([Lt||Ut,Ht||kt]),Vt=me,Ut=Lt,kt=Ht}else Vt&&ne(de(Vt,me)[0]),D[N++]=me}for(I=0;Ict(Y,Jt))break;B=Y,tt=it[0]*et[0]+it[1]*et[1],tt>J?(J=tt,O=Y,j=!1):tt=f.length||!Y)break;Xt(Y),k=Y}}Vt&&Se([Ut||Vt[0],kt||Vt[1]]),L.push(D.slice(0,N))}var Wt=E.slice(E.length-1);if(w&&Wt!=="h"&&Wt!=="v"){for(var Ft=!1,xt=-1,yt=[],Et=0;Et=0?r=c:(r=c=f,f++),r0?Math.max(a,p):0}}},5528:function(G){G.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(G,U,t){var g=t(76308),C=t(94288).hasColorscale,i=t(27260),S=t(43028);G.exports=function(h,p,r,e,a,n){var f=S.isBubble(h),c=(h.line||{}).color,l;if(n=n||{},c&&(r=c),a("marker.symbol"),a("marker.opacity",f?.7:1),a("marker.size"),n.noAngle||(a("marker.angle"),n.noAngleRef||a("marker.angleref"),n.noStandOff||a("marker.standoff")),a("marker.color",r),C(h,"marker")&&i(h,p,e,a,{prefix:"marker.",cLetter:"c"}),n.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),n.noLine||(c&&!Array.isArray(c)&&p.marker.color!==c?l=c:f?l=g.background:l=g.defaultLine,a("marker.line.color",l),C(h,"marker.line")&&i(h,p,e,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",f?1:0)),f&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),n.gradient){var m=a("marker.gradient.type");m!=="none"&&a("marker.gradient.color")}}},31147:function(G,U,t){var g=t(3400).dateTick0,C=t(39032),i=C.ONEWEEK;function S(x,h){return x%i===0?g(h,1):g(h,0)}G.exports=function(h,p,r,e,a){if(a||(a={x:!0,y:!0}),a.x){var n=e("xperiod");n&&(e("xperiod0",S(n,p.xcalendar)),e("xperiodalignment"))}if(a.y){var f=e("yperiod");f&&(e("yperiod0",S(f,p.ycalendar)),e("yperiodalignment"))}}},96504:function(G,U,t){var g=t(33428),C=t(24040),i=t(3400),S=i.ensureSingle,x=i.identity,h=t(43616),p=t(43028),r=t(52340),e=t(14328),a=t(92065).tester;G.exports=function(m,v,b,u,o,d){var w,A,_=!o,y=!!o&&o.duration>0,E=e(m,v,b);if(w=u.selectAll("g.trace").data(E,function(s){return s[0].trace.uid}),w.enter().append("g").attr("class",function(s){return"trace scatter trace"+s[0].trace.uid}).style("stroke-miterlimit",2),w.order(),n(m,w,v),y){d&&(A=d());var T=g.transition().duration(o.duration).ease(o.easing).each("end",function(){A&&A()}).each("interrupt",function(){A&&A()});T.each(function(){u.selectAll("g.trace").each(function(s,L){f(m,L,v,s,E,this,o)})})}else w.each(function(s,L){f(m,L,v,s,E,this,o)});_&&w.exit().remove(),u.selectAll("path:not([d])").remove()};function n(l,m,v){m.each(function(b){var u=S(g.select(this),"g","fills");h.setClipUrl(u,v.layerClipId,l);var o=b[0].trace,d=[];o._ownfill&&d.push("_ownFill"),o._nexttrace&&d.push("_nextFill");var w=u.selectAll("g").data(d,x);w.enter().append("g"),w.exit().each(function(A){o[A]=null}).remove(),w.order().each(function(A){o[A]=S(g.select(this),"path","js-fill")})})}function f(l,m,v,b,u,o,d){var w=l._context.staticPlot,A;c(l,m,v,b,u);var _=!!d&&d.duration>0;function y(Se){return _?Se.transition():Se}var E=v.xaxis,T=v.yaxis,s=b[0].trace,L=s.line,M=g.select(o),z=S(M,"g","errorbars"),D=S(M,"g","lines"),N=S(M,"g","points"),I=S(M,"g","text");if(C.getComponentMethod("errorbars","plot")(l,z,v,d),s.visible!==!0)return;y(M).style("opacity",s.opacity);var k,B,O=s.fill.charAt(s.fill.length-1);O!=="x"&&O!=="y"&&(O="");var H,Y;O==="y"?(H=1,Y=T.c2p(0,!0)):O==="x"&&(H=0,Y=E.c2p(0,!0)),b[0][v.isRangePlot?"nodeRangePlot3":"node3"]=M;var j="",et=[],it=s._prevtrace,ut=null,J=null;it&&(j=it._prevRevpath||"",B=it._nextFill,et=it._ownPolygons,ut=it._fillsegments,J=it._fillElement);var X,tt,V="",Q="",ot,$,Z,st,nt,ct,gt=[];s._polygons=[];var Tt=[],wt=[],Rt=i.noop;if(k=s._ownFill,p.hasLines(s)||s.fill!=="none"){B&&B.datum(b),["hv","vh","hvh","vhv"].indexOf(L.shape)!==-1?(ot=h.steps(L.shape),$=h.steps(L.shape.split("").reverse().join(""))):L.shape==="spline"?ot=$=function(Se){var ne=Se[Se.length-1];return Se.length>1&&Se[0][0]===ne[0]&&Se[0][1]===ne[1]?h.smoothclosed(Se.slice(1),L.smoothing):h.smoothopen(Se,L.smoothing)}:ot=$=function(Se){return"M"+Se.join("L")},Z=function(Se){return $(Se.reverse())},wt=r(b,{xaxis:E,yaxis:T,trace:s,connectGaps:s.connectgaps,baseTolerance:Math.max(L.width||1,3)/4,shape:L.shape,backoff:L.backoff,simplify:L.simplify,fill:s.fill}),Tt=new Array(wt.length);var bt=0;for(A=0;A=w[0]&&M.x<=w[1]&&M.y>=A[0]&&M.y<=A[1]}),T=Math.ceil(E.length/y),s=0;u.forEach(function(M,z){var D=M[0].trace;p.hasMarkers(D)&&D.marker.maxdisplayed>0&&z0){var v=r.c2l(l);r._lowerLogErrorBound||(r._lowerLogErrorBound=v),r._lowerErrorBound=Math.min(r._lowerLogErrorBound,v)}}else a[n]=[-f[0]*p,f[1]*p]}return a}function i(x){for(var h=0;h-1?-1:M.indexOf("right")>-1?1:0}function d(M){return M==null?0:M.indexOf("top")>-1?-1:M.indexOf("bottom")>-1?1:0}function w(M){var z=0,D=0,N=[z,D];if(Array.isArray(M))for(var I=0;I=0){var Y=b(O.position,O.delaunayColor,O.delaunayAxis);Y.opacity=M.opacity,this.delaunayMesh?this.delaunayMesh.update(Y):(Y.gl=z,this.delaunayMesh=S(Y),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},v.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function L(M,z){var D=new m(M,z.uid);return D.update(z),D}G.exports=L},83484:function(G,U,t){var g=t(24040),C=t(3400),i=t(43028),S=t(74428),x=t(66828),h=t(124),p=t(91592);G.exports=function(a,n,f,c){function l(A,_){return C.coerce(a,n,p,A,_)}var m=r(a,n,l,c);if(!m){n.visible=!1;return}l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),l("mode"),i.hasMarkers(n)&&S(a,n,f,c,l,{noSelect:!0,noAngle:!0}),i.hasLines(n)&&(l("connectgaps"),x(a,n,f,c,l)),i.hasText(n)&&(l("texttemplate"),h(a,n,c,l,{noSelect:!0}));var v=(n.line||{}).color,b=(n.marker||{}).color;l("surfaceaxis")>=0&&l("surfacecolor",v||b);for(var u=["x","y","z"],o=0;o<3;++o){var d="projection."+u[o];l(d+".show")&&(l(d+".opacity"),l(d+".scale"))}var w=g.getComponentMethod("errorbars","supplyDefaults");w(a,n,v||b||f,{axis:"z"}),w(a,n,v||b||f,{axis:"y",inherit:"z"}),w(a,n,v||b||f,{axis:"x",inherit:"z"})};function r(e,a,n,f){var c=0,l=n("x"),m=n("y"),v=n("z"),b=g.getComponentMethod("calendars","handleTraceDefaults");return b(e,a,["x","y","z"],f),l&&m&&v&&(c=Math.min(l.length,m.length,v.length),a._length=a._xlength=a._ylength=a._zlength=c),c}},3296:function(G,U,t){G.exports={plot:t(41064),attributes:t(91592),markerSymbols:t(87792),supplyDefaults:t(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:t(41484),moduleType:"trace",name:"scatter3d",basePlotModule:t(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(G,U,t){var g=t(98304),C=t(52904),i=t(45464),S=t(21776).Ks,x=t(21776).Gw,h=t(49084),p=t(92880).extendFlat,r=C.marker,e=C.line,a=r.line;G.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:p({},C.mode,{dflt:"markers"}),text:p({},C.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","text"]}),hovertext:p({},C.hovertext,{}),line:{color:e.color,width:e.width,dash:e.dash,backoff:e.backoff,shape:p({},e.shape,{values:["linear","spline"]}),smoothing:e.smoothing,editType:"calc"},connectgaps:C.connectgaps,fill:p({},C.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:g(),marker:p({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:p({width:a.width,editType:"calc"},h("marker.line")),gradient:r.gradient,editType:"calc"},h("marker")),textfont:C.textfont,textposition:C.textposition,selected:C.selected,unselected:C.unselected,hoverinfo:p({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:C.hoveron,hovertemplate:S()}},48228:function(G,U,t){var g=t(38248),C=t(90136),i=t(20148),S=t(4500),x=t(16356).calcMarkerSize,h=t(50948);G.exports=function(r,e){var a=e._carpetTrace=h(r,e);if(!(!a||!a.visible||a.visible==="legendonly")){var n;e.xaxis=a.xaxis,e.yaxis=a.yaxis;var f=e._length,c=new Array(f),l,m,v=!1;for(n=0;n0?y=A.labelprefix.replace(/ = $/,""):y=A._hovertitle,u.push(y+": "+_.toFixed(3)+A.labelsuffix)}if(!m.hovertemplate){var d=l.hi||m.hoverinfo,w=d.split("+");w.indexOf("all")!==-1&&(w=["a","b","text"]),w.indexOf("a")!==-1&&o(v.aaxis,l.a),w.indexOf("b")!==-1&&o(v.baxis,l.b),u.push("y: "+e.yLabel),w.indexOf("text")!==-1&&C(l,m,u),e.extraText=u.join("
    ")}return r}},4184:function(G,U,t){G.exports={attributes:t(90372),supplyDefaults:t(6176),colorbar:t(5528),formatLabels:t(52364),calc:t(48228),plot:t(20036),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(58960),selectPoints:t(91560),eventData:t(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:t(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(G,U,t){var g=t(96504),C=t(54460),i=t(43616);G.exports=function(x,h,p,r){var e,a,n,f=p[0][0].carpet,c=C.getFromId(x,f.xaxis||"x"),l=C.getFromId(x,f.yaxis||"y"),m={xaxis:c,yaxis:l,plot:h.plot};for(e=0;e")}},36952:function(G,U,t){G.exports={attributes:t(6096),supplyDefaults:t(86188),colorbar:t(5528),formatLabels:t(56696),calc:t(25212),calcGeoJSON:t(48691).calcGeoJSON,plot:t(48691).plot,style:t(25064),styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(64292),eventData:t(58544),selectPoints:t(8796),moduleType:"trace",name:"scattergeo",basePlotModule:t(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(G,U,t){var g=t(33428),C=t(3400),i=t(59972).getTopojsonFeatures,S=t(44808),x=t(27144),h=t(19280).findExtremes,p=t(39032).BADNUM,r=t(16356).calcMarkerSize,e=t(43028),a=t(25064);function n(c,l,m){var v=l.layers.frontplot.select(".scatterlayer"),b=C.makeTraceGroups(v,m,"trace scattergeo");function u(o,d){o.lonlat[0]===p&&g.select(d).remove()}b.selectAll("*").remove(),b.each(function(o){var d=g.select(this),w=o[0].trace;if(e.hasLines(w)||w.fill!=="none"){var A=S.calcTraceToLineCoords(o),_=w.fill!=="none"?S.makePolygon(A):S.makeLine(A);d.selectAll("path.js-line").data([{geojson:_,trace:w}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}e.hasMarkers(w)&&d.selectAll("path.point").data(C.identity).enter().append("path").classed("point",!0).each(function(y){u(y,this)}),e.hasText(w)&&d.selectAll("g").data(C.identity).enter().append("g").append("text").each(function(y){u(y,this)}),a(c,o)})}function f(c,l){var m=c[0].trace,v=l[m.geo],b=v._subplot,u=m._length,o,d;if(C.isArrayOrTypedArray(m.locations)){var w=m.locationmode,A=w==="geojson-id"?x.extractTraceFeature(c):i(m,b.topojson);for(o=0;o=l,T=y*2,s={},L,M=w.makeCalcdata(o,"x"),z=A.makeCalcdata(o,"y"),D=x(o,w,"x",M),N=x(o,A,"y",z),I=D.vals,k=N.vals;o._x=I,o._y=k,o.xperiodalignment&&(o._origX=M,o._xStarts=D.starts,o._xEnds=D.ends),o.yperiodalignment&&(o._origY=z,o._yStarts=N.starts,o._yEnds=N.ends);var B=new Array(T),O=new Array(y);for(L=0;L1&&C.extendFlat(_.line,n.linePositions(b,o,d)),_.errorX||_.errorY){var y=n.errorBarPositions(b,o,d,w,A);_.errorX&&C.extendFlat(_.errorX,y.x),_.errorY&&C.extendFlat(_.errorY,y.y)}return _.text&&(C.extendFlat(_.text,{positions:d},n.textPosition(b,o,_.text,_.marker)),C.extendFlat(_.textSel,{positions:d},n.textPosition(b,o,_.text,_.markerSel)),C.extendFlat(_.textUnsel,{positions:d},n.textPosition(b,o,_.text,_.markerUnsel))),_}},67072:function(G){var U=20;G.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:U,SYMBOL_STROKE:U/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},84236:function(G,U,t){var g=t(38248),C=t(20472),i=t(72160),S=t(24040),x=t(3400),h=x.isArrayOrTypedArray,p=t(43616),r=t(79811),e=t(33040).formatColor,a=t(43028),n=t(7152),f=t(80088),c=t(67072),l=t(13448).DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t(10624).appendArrayPointValue;function b(N,I){var k,B={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},O=N._context.plotGlPixelRatio;if(I.visible!==!0)return B;if(a.hasText(I)&&(B.text=u(N,I),B.textSel=w(N,I,I.selected),B.textUnsel=w(N,I,I.unselected)),a.hasMarkers(I)&&(B.marker=o(N,I),B.markerSel=d(N,I,I.selected),B.markerUnsel=d(N,I,I.unselected),!I.unselected&&h(I.marker.opacity))){var H=I.marker.opacity;for(B.markerUnsel.opacity=new Array(H.length),k=0;kc.TOO_MANY_POINTS||a.hasMarkers(I)?"rect":"round";if(it&&I.connectgaps){var J=H[0],X=H[1];for(Y=0;Y1?et[Y]:et[0]:et,tt=h(it)?it.length>1?it[Y]:it[0]:it,V=m[X],Q=m[tt],ot=ut?ut/.8+1:0,$=-Q*ot-Q*.5;H.offset[Y]=[V*ot/J,$/J]}}return H}G.exports={style:b,markerStyle:o,markerSelection:d,linePositions:M,errorBarPositions:z,textPosition:D}},80220:function(G,U,t){var g=t(3400),C=t(24040),i=t(80088),S=t(2876),x=t(88200),h=t(43028),p=t(43980),r=t(31147),e=t(74428),a=t(66828),n=t(70840),f=t(124);G.exports=function(l,m,v,b){function u(T,s){return g.coerce(l,m,S,T,s)}var o=l.marker?i.isOpenSymbol(l.marker.symbol):!1,d=h.isBubble(l),w=p(l,m,b,u);if(!w){m.visible=!1;return}r(l,m,b,u),u("xhoverformat"),u("yhoverformat");var A=w100},U.isDotSymbol=function(C){return typeof C=="string"?g.DOT_RE.test(C):C>200}},41272:function(G,U,t){var g=t(24040),C=t(3400),i=t(44928);function S(h,p,r,e){var a=h.cd,n=a[0].t,f=a[0].trace,c=h.xa,l=h.ya,m=n.x,v=n.y,b=c.c2p(p),u=l.c2p(r),o=h.distance,d;if(n.tree){var w=c.p2c(b-o),A=c.p2c(b+o),_=l.p2c(u-o),y=l.p2c(u+o);e==="x"?d=n.tree.range(Math.min(w,A),Math.min(l._rl[0],l._rl[1]),Math.max(w,A),Math.max(l._rl[0],l._rl[1])):d=n.tree.range(Math.min(w,A),Math.min(_,y),Math.max(w,A),Math.max(_,y))}else d=n.ids;var E,T,s,L,M,z,D,N,I,k=o;if(e==="x"){var B=!!f.xperiodalignment,O=!!f.yperiodalignment;for(M=0;M=Math.min(H,Y)&&b<=Math.max(H,Y)?0:1/0}if(z=Math.min(j,et)&&u<=Math.max(j,et)?0:1/0}I=Math.sqrt(z*z+D*D),T=d[M]}}}else for(M=d.length-1;M>-1;M--)E=d[M],s=m[E],L=v[E],z=c.c2p(s)-b,D=l.c2p(L)-u,N=Math.sqrt(z*z+D*D),No.glText.length){var s=E-o.glText.length;for(A=0;Ast&&(isNaN(Z[nt])||isNaN(Z[nt+1]));)nt-=2;$.positions=Z.slice(st,nt+2)}return $}),o.line2d.update(o.lineOptions)),o.error2d){var z=(o.errorXOptions||[]).concat(o.errorYOptions||[]);o.error2d.update(z)}o.scatter2d&&o.scatter2d.update(o.markerOptions),o.fillOrder=x.repeat(null,E),o.fill2d&&(o.fillOptions=o.fillOptions.map(function($,Z){var st=b[Z];if(!(!$||!st||!st[0]||!st[0].trace)){var nt=st[0],ct=nt.trace,gt=nt.t,Tt=o.lineOptions[Z],wt,Rt,bt=[];ct._ownfill&&bt.push(Z),ct._nexttrace&&bt.push(Z+1),bt.length&&(o.fillOrder[Z]=bt);var At=[],mt=Tt&&Tt.positions||gt.positions,Lt,Ht;if(ct.fill==="tozeroy"){for(Lt=0;LtLt&&isNaN(mt[Ht+1]);)Ht-=2;mt[Lt+1]!==0&&(At=[mt[Lt],0]),At=At.concat(mt.slice(Lt,Ht+2)),mt[Ht+1]!==0&&(At=At.concat([mt[Ht],0]))}else if(ct.fill==="tozerox"){for(Lt=0;LtLt&&isNaN(mt[Ht]);)Ht-=2;mt[Lt]!==0&&(At=[0,mt[Lt+1]]),At=At.concat(mt.slice(Lt,Ht+2)),mt[Ht]!==0&&(At=At.concat([0,mt[Ht+1]]))}else if(ct.fill==="toself"||ct.fill==="tonext"){for(At=[],wt=0,$.splitNull=!0,Rt=0;Rt-1;for(A=0;A=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),A=w*360,_=a-A;function y(I){var k=I.lonlat;if(k[0]===x||o&&b.indexOf(I.i+1)===-1)return 1/0;var B=C.modHalf(k[0],360),O=k[1],H=v.project([B,O]),Y=H.x-l.c2p([_,O]),j=H.y-m.c2p([B,n]),et=Math.max(3,I.mrc||0);return Math.max(Math.sqrt(Y*Y+j*j)-et,1-3/et)}if(g.getClosest(f,y,e),e.index!==!1){var E=f[e.index],T=E.lonlat,s=[C.modHalf(T[0],360)+A,T[1]],L=l.c2p(s),M=m.c2p(s),z=E.mrc||1;e.x0=L-z,e.x1=L+z,e.y0=M-z,e.y1=M+z;var D={};D[c.subplot]={_subplot:v};var N=c._module.formatLabels(E,c,D);return e.lonLabel=N.lonLabel,e.latLabel=N.latLabel,e.color=i(c,E),e.extraText=r(c,E,f[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}function r(e,a,n){if(e.hovertemplate)return;var f=a.hi||e.hoverinfo,c=f.split("+"),l=c.indexOf("all")!==-1,m=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,b=a.lonlat,u=[];function o(d){return d+"°"}return l||m&&v?u.push("("+o(b[1])+", "+o(b[0])+")"):m?u.push(n.lon+o(b[0])):v&&u.push(n.lat+o(b[1])),(l||c.indexOf("text")!==-1)&&S(a,e,u),u.join("
    ")}G.exports={hoverPoints:p,getExtraText:r}},11572:function(G,U,t){G.exports={attributes:t(31512),supplyDefaults:t(15752),colorbar:t(5528),formatLabels:t(11960),calc:t(25212),plot:t(9660),hoverPoints:t(63312).hoverPoints,eventData:t(37920),selectPoints:t(404),styleOnSelect:function(g,C){if(C){var i=C[0].trace;i._glTrace.update(C)}},moduleType:"trace",name:"scattermapbox",basePlotModule:t(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(G,U,t){var g=t(3400),C=t(59392),i=t(47552).traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function x(p,r,e,a){this.type="scattermapbox",this.subplot=p,this.uid=r,this.clusterEnabled=e,this.isHidden=a,this.sourceIds={fill:"source-"+r+"-fill",line:"source-"+r+"-line",circle:"source-"+r+"-circle",symbol:"source-"+r+"-symbol",cluster:"source-"+r+"-circle",clusterCount:"source-"+r+"-circle"},this.layerIds={fill:i+r+"-fill",line:i+r+"-line",circle:i+r+"-circle",symbol:i+r+"-symbol",cluster:i+r+"-cluster",clusterCount:i+r+"-cluster-count"},this.below=null}var h=x.prototype;h.addSource=function(p,r,e){var a={type:"geojson",data:r.geojson};e&&e.enabled&&g.extendFlat(a,{cluster:!0,clusterMaxZoom:e.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[p]);n?n.setData(r.geojson):this.subplot.map.addSource(this.sourceIds[p],a)},h.setSourceData=function(p,r){this.subplot.map.getSource(this.sourceIds[p]).setData(r.geojson)},h.addLayer=function(p,r,e){var a={type:r.type,id:this.layerIds[p],source:this.sourceIds[p],layout:r.layout,paint:r.paint};r.filter&&(a.filter=r.filter);for(var n=this.layerIds[p],f,c=this.subplot.getMapLayers(),l=0;l=0;L--){var M=s[L];n.removeLayer(v.layerIds[M])}T||n.removeSource(v.sourceIds.circle)}function o(T){for(var s=S.nonCluster,L=0;L=0;L--){var M=s[L];n.removeLayer(v.layerIds[M]),T||n.removeSource(v.sourceIds[M])}}function w(T){m?u(T):d(T)}function A(T){l?b(T):o(T)}function _(){for(var T=l?S.cluster:S.nonCluster,s=0;s=0;a--){var n=e[a];r.removeLayer(this.layerIds[n]),r.removeSource(this.sourceIds[n])}},G.exports=function(r,e){var a=e[0].trace,n=a.cluster&&a.cluster.enabled,f=a.visible!==!0,c=new x(r,a.uid,n,f),l=C(r.gd,e),m=c.below=r.belowLookup["trace-"+a.uid],v,b,u;if(n)for(c.addSource("circle",l.circle,a.cluster),v=0;v")}}G.exports={hoverPoints:C,makeHoverPointText:i}},76924:function(G,U,t){G.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:t(8319),supplyDefaults:t(85968).supplyDefaults,colorbar:t(5528),formatLabels:t(22852),calc:t(58320),plot:t(43456),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(8504).hoverPoints,selectPoints:t(91560),meta:{}}},43456:function(G,U,t){var g=t(96504),C=t(39032).BADNUM;G.exports=function(S,x,h){for(var p=x.layers.frontplot.select("g.scatterlayer"),r=x.xaxis,e=x.yaxis,a={xaxis:r,yaxis:e,plot:x.framework,layerClipId:x._hasClipOnAxisFalse?x.clipIds.forTraces:null},n=x.radialAxis,f=x.angularAxis,c=0;c=p&&(_.marker.cluster=o.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=s),_.line&&s.length>1&&h.extendFlat(_.line,x.linePositions(a,u,s)),_.text&&(h.extendFlat(_.text,{positions:s},x.textPosition(a,u,_.text,_.marker)),h.extendFlat(_.textSel,{positions:s},x.textPosition(a,u,_.text,_.markerSel)),h.extendFlat(_.textUnsel,{positions:s},x.textPosition(a,u,_.text,_.markerUnsel))),_.fill&&!m.fill2d&&(m.fill2d=!0),_.marker&&!m.scatter2d&&(m.scatter2d=!0),_.line&&!m.line2d&&(m.line2d=!0),_.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(_.line),m.fillOptions.push(_.fill),m.markerOptions.push(_.marker),m.markerSelectedOptions.push(_.markerSel),m.markerUnselectedOptions.push(_.markerUnsel),m.textOptions.push(_.text),m.textSelectedOptions.push(_.textSel),m.textUnselectedOptions.push(_.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),o.x=L,o.y=M,o.rawx=L,o.rawy=M,o.r=w,o.theta=A,o.positions=s,o._scene=m,o.index=m.count,m.count++}}),i(a,n,f)}},G.exports.reglPrecompiled=r},69496:function(G,U,t){var g=t(21776).Ks,C=t(21776).Gw,i=t(92880).extendFlat,S=t(98304),x=t(52904),h=t(45464),p=x.line;G.exports={mode:x.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:x.text,texttemplate:C({editType:"plot"},{keys:["real","imag","text"]}),hovertext:x.hovertext,line:{color:p.color,width:p.width,dash:p.dash,backoff:p.backoff,shape:i({},p.shape,{values:["linear","spline"]}),smoothing:p.smoothing,editType:"calc"},connectgaps:x.connectgaps,marker:x.marker,cliponaxis:i({},x.cliponaxis,{dflt:!1}),textposition:x.textposition,textfont:x.textfont,fill:i({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),hoverinfo:i({},h.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:x.hoveron,hovertemplate:g(),selected:x.selected,unselected:x.unselected}},47507:function(G,U,t){var g=t(38248),C=t(39032).BADNUM,i=t(90136),S=t(20148),x=t(4500),h=t(16356).calcMarkerSize;G.exports=function(r,e){for(var a=r._fullLayout,n=e.subplot,f=a[n].realaxis,c=a[n].imaginaryaxis,l=f.makeCalcdata(e,"real"),m=c.makeCalcdata(e,"imag"),v=e._length,b=new Array(v),u=0;u")}}G.exports={hoverPoints:C,makeHoverPointText:i}},95443:function(G,U,t){G.exports={moduleType:"trace",name:"scattersmith",basePlotModule:t(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:t(69496),supplyDefaults:t(76716),colorbar:t(5528),formatLabels:t(49504),calc:t(47507),plot:t(34927),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(25292).hoverPoints,selectPoints:t(91560),meta:{}}},34927:function(G,U,t){var g=t(96504),C=t(39032).BADNUM,i=t(36416),S=i.smith;G.exports=function(h,p,r){for(var e=p.layers.frontplot.select("g.scatterlayer"),a=p.xaxis,n=p.yaxis,f={xaxis:a,yaxis:n,plot:p.framework,layerClipId:p._hasClipOnAxisFalse?p.clipIds.forTraces:null},c=0;c"),r.hovertemplate=l.hovertemplate,p}},34864:function(G,U,t){G.exports={attributes:t(5896),supplyDefaults:t(84256),colorbar:t(5528),formatLabels:t(90404),calc:t(34335),plot:t(88776),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(26596),selectPoints:t(91560),eventData:t(97476),moduleType:"trace",name:"scatterternary",basePlotModule:t(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(G,U,t){var g=t(96504);G.exports=function(i,S,x){var h=S.plotContainer;h.select(".scatterlayer").selectAll("*").remove();for(var p=S.xaxis,r=S.yaxis,e={xaxis:p,yaxis:r,plot:h,layerClipId:S._hasClipOnAxisFalse?S.clipIdRelative:null},a=S.layers.frontplot.select("g.scatterlayer"),n=0;na,L;for(s?L=v.sizeAvg||Math.max(v.size,3):L=i(c,m),w=0;wd&&v||o-1,I=S(v)||!!a.selectedpoints||N,k=!0;if(I){var B=a._length;if(a.selectedpoints){f.selectBatch=a.selectedpoints;var O=a.selectedpoints,H={};for(o=0;o1&&(T=r[n-1],L=e[n-1],z=a[n-1]),f=0;fT?"-":"+")+"x"),w=w.replace("y",(s>L?"-":"+")+"y"),w=w.replace("z",(M>z?"-":"+")+"z");var k=function(){n=0,D=[],N=[],I=[]};(!n||n2?v=l.slice(1,m-1):m===2?v=[(l[0]+l[1])/2]:v=l,v}function n(l){var m=l.length;return m===1?[.5,.5]:[l[1]-l[0],l[m-1]-l[m-2]]}function f(l,m){var v=l.fullSceneLayout,b=l.dataScale,u=m._len,o={};function d(ut,J){var X=v[J],tt=b[p[J]];return i.simpleMap(ut,function(V){return X.d2l(V)*tt})}if(o.vectors=h(d(m._u,"xaxis"),d(m._v,"yaxis"),d(m._w,"zaxis"),u),!u)return{positions:[],cells:[]};var w=d(m._Xs,"xaxis"),A=d(m._Ys,"yaxis"),_=d(m._Zs,"zaxis");o.meshgrid=[w,A,_],o.gridFill=m._gridFill;var y=m._slen;if(y)o.startingPositions=h(d(m._startsX,"xaxis"),d(m._startsY,"yaxis"),d(m._startsZ,"zaxis"));else{for(var E=A[0],T=a(w),s=a(_),L=new Array(T.length*s.length),M=0,z=0;z=0},L,M,z;b?(L=Math.min(v.length,o.length),M=function(V){return T(v[V])&&s(V)},z=function(V){return String(v[V])}):(L=Math.min(u.length,o.length),M=function(V){return T(u[V])&&s(V)},z=function(V){return String(u[V])}),w&&(L=Math.min(L,d.length));for(var D=0;D1){for(var H=i.randstr(),Y=0;Y=0){x.i=e.i;var f=v.marker;f.pattern?(!f.colors||!f.pattern.shape)&&(f.color=n,x.color=n):(f.color=n,x.color=n),g.pointStyle(S,v,p,x)}else C.fill(S,n)}},45716:function(G,U,t){var g=t(33428),C=t(24040),i=t(10624).appendArrayPointValue,S=t(93024),x=t(3400),v=t(95924),p=t(78176),r=t(69656),e=r.formatPieValue;G.exports=function(f,c,l,m,h){var b=m[0],u=b.trace,o=b.hierarchy,d=u.type==="sunburst",w=u.type==="treemap"||u.type==="icicle";"_hasHoverLabel"in u||(u._hasHoverLabel=!1),"_hasHoverEvent"in u||(u._hasHoverEvent=!1);var A=function(E){var T=l._fullLayout;if(!(l._dragging||T.hovermode===!1)){var s=l._fullData[u.index],L=E.data.data,M=L.i,z=p.isHierarchyRoot(E),D=p.getParent(o,E),N=p.getValue(E),I=function(Z){return x.castOption(s,M,Z)},k=I("hovertemplate"),B=S.castHoverinfo(s,T,M),O=T.separators,H;if(k||B&&B!=="none"&&B!=="skip"){var Y,j;d&&(Y=b.cx+E.pxmid[0]*(1-E.rInscribed),j=b.cy+E.pxmid[1]*(1-E.rInscribed)),w&&(Y=E._hoverX,j=E._hoverY);var et={},it=[],ut=[],J=function(Z){return it.indexOf(Z)!==-1};B&&(it=B==="all"?s._module.attributes.hoverinfo.flags:B.split("+")),et.label=L.label,J("label")&&et.label&&ut.push(et.label),L.hasOwnProperty("v")&&(et.value=L.v,et.valueLabel=e(et.value,O),J("value")&&ut.push(et.valueLabel)),et.currentPath=E.currentPath=p.getPath(E.data),J("current path")&&!z&&ut.push(et.currentPath);var X,tt=[],V=function(){tt.indexOf(X)===-1&&(ut.push(X),tt.push(X))};et.percentParent=E.percentParent=N/p.getValue(D),et.parent=E.parentString=p.getPtLabel(D),J("percent parent")&&(X=p.formatPercent(et.percentParent,O)+" of "+et.parent,V()),et.percentEntry=E.percentEntry=N/p.getValue(c),et.entry=E.entry=p.getPtLabel(c),J("percent entry")&&!z&&!E.onPathbar&&(X=p.formatPercent(et.percentEntry,O)+" of "+et.entry,V()),et.percentRoot=E.percentRoot=N/p.getValue(o),et.root=E.root=p.getPtLabel(o),J("percent root")&&!z&&(X=p.formatPercent(et.percentRoot,O)+" of "+et.root,V()),et.text=I("hovertext")||I("text"),J("text")&&(X=et.text,x.isValidTextValue(X)&&ut.push(X)),H=[a(E,s,h.eventDataKeys)];var Q={trace:s,y:j,_x0:E._x0,_x1:E._x1,_y0:E._y0,_y1:E._y1,text:ut.join("
    "),name:k||J("name")?s.name:void 0,color:I("hoverlabel.bgcolor")||L.color,borderColor:I("hoverlabel.bordercolor"),fontFamily:I("hoverlabel.font.family"),fontSize:I("hoverlabel.font.size"),fontColor:I("hoverlabel.font.color"),nameLength:I("hoverlabel.namelength"),textAlign:I("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:et,eventData:H};d&&(Q.x0=Y-E.rInscribed*E.rpx1,Q.x1=Y+E.rInscribed*E.rpx1,Q.idealAlign=E.pxmid[0]<0?"left":"right"),w&&(Q.x=Y,Q.idealAlign=Y<0?"left":"right");var ot=[];S.loneHover(Q,{container:T._hoverlayer.node(),outerContainer:T._paper.node(),gd:l,inOut_bbox:ot}),H[0].bbox=ot[0],u._hasHoverLabel=!0}if(w){var $=f.select("path.surface");h.styleOne($,E,s,l,{hovered:!0})}u._hasHoverEvent=!0,l.emit("plotly_hover",{points:H||[a(E,s,h.eventDataKeys)],event:g.event})}},_=function(E){var T=l._fullLayout,s=l._fullData[u.index],L=g.select(this).datum();if(u._hasHoverEvent&&(E.originalEvent=g.event,l.emit("plotly_unhover",{points:[a(L,s,h.eventDataKeys)],event:g.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(S.loneUnhover(T._hoverlayer.node()),u._hasHoverLabel=!1),w){var M=f.select("path.surface");h.styleOne(M,L,s,l,{hovered:!1})}},y=function(E){var T=l._fullLayout,s=l._fullData[u.index],L=d&&(p.isHierarchyRoot(E)||p.isLeaf(E)),M=p.getPtId(E),z=p.isEntry(E)?p.findEntryWithChild(o,M):p.findEntryWithLevel(o,M),D=p.getPtId(z),N={points:[a(E,s,h.eventDataKeys)],event:g.event};L||(N.nextLevel=D);var I=v.triggerHandler(l,"plotly_"+u.type+"click",N);if(I!==!1&&T.hovermode&&(l._hoverdata=[a(E,s,h.eventDataKeys)],S.click(l,g.event)),!L&&I!==!1&&!l._dragging&&!l._transitioning){C.call("_storeDirectGUIEdit",s,T._tracePreGUI[s.uid],{level:s.level});var k={data:[{level:D}],traces:[u.index]},B={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(T._hoverlayer.node()),C.call("animate",l,k,B)}};f.on("mouseover",A),f.on("mouseout",_),f.on("click",y)};function a(n,f,c){for(var l=n.data.data,m={curveNumber:f.index,pointNumber:l.i,data:f._input,fullData:f},h=0;h0)},U.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},U.isHeader=function(r,e){return!(U.isLeaf(r)||r.depth===e._maxDepth-1)};function p(r){return r.data.data.pid}U.getParent=function(r,e){return U.findEntryWithLevel(r,p(e))},U.listPath=function(r,e){var a=r.parent;if(!a)return[];var n=e?[a.data[e]]:[a];return U.listPath(a,e).concat(n)},U.getPath=function(r){return U.listPath(r,"label").join("/")+"/"},U.formatValue=S.formatPieValue,U.formatPercent=function(r,e){var a=g.formatPercent(r,0);return a==="0%"&&(a=S.formatPiePercent(r,e)),a}},5621:function(G,U,t){G.exports={moduleType:"trace",name:"sunburst",basePlotModule:t(54904),categories:[],animatable:!0,attributes:t(424),layoutAttributes:t(84920),supplyDefaults:t(25244),supplyLayoutDefaults:t(28732),calc:t(3776).calc,crossTraceCalc:t(3776).crossTraceCalc,plot:t(96488).plot,style:t(85676).style,colorbar:t(5528),meta:{}}},84920:function(G){G.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(G,U,t){var g=t(3400),C=t(84920);G.exports=function(S,x){function v(p,r){return g.coerce(S,x,C,p,r)}v("sunburstcolorway",x.colorway),v("extendsunburstcolors")}},96488:function(G,U,t){var g=t(33428),C=t(74148),i=t(67756).qy,S=t(43616),x=t(3400),v=t(72736),p=t(82744),r=p.recordMinTextSize,e=p.clearMinTextSize,a=t(37820),n=t(69656).getRotationAngle,f=a.computeTransform,c=a.transformInsideText,l=t(85676).styleOne,m=t(60100).resizeText,h=t(45716),b=t(27328),u=t(78176);U.plot=function(y,E,T,s){var L=y._fullLayout,M=L._sunburstlayer,z,D,N=!T,I=!L.uniformtext.mode&&u.hasTransition(T);if(e("sunburst",L),z=M.selectAll("g.trace.sunburst").data(E,function(B){return B[0].trace.uid}),z.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),z.order(),I){s&&(D=s());var k=g.transition().duration(T.duration).ease(T.easing).each("end",function(){D&&D()}).each("interrupt",function(){D&&D()});k.each(function(){M.selectAll("g.trace").each(function(B){o(y,B,this,T)})})}else z.each(function(B){o(y,B,this,T)}),L.uniformtext.mode&&m(y,L._sunburstlayer.selectAll(".trace"),"sunburst");N&&z.exit().remove()};function o(y,E,T,s){var L=y._context.staticPlot,M=y._fullLayout,z=!M.uniformtext.mode&&u.hasTransition(s),D=g.select(T),N=D.selectAll("g.slice"),I=E[0],k=I.trace,B=I.hierarchy,O=u.findEntryWithLevel(B,k.level),H=u.getMaxDepth(k),Y=M._size,j=k.domain,et=Y.w*(j.x[1]-j.x[0]),it=Y.h*(j.y[1]-j.y[0]),ut=.5*Math.min(et,it),J=I.cx=Y.l+Y.w*(j.x[1]+j.x[0])/2,X=I.cy=Y.t+Y.h*(1-j.y[0])-it/2;if(!O)return N.remove();var tt=null,V={};z&&N.each(function(Vt){V[u.getPtId(Vt)]={rpx0:Vt.rpx0,rpx1:Vt.rpx1,x0:Vt.x0,x1:Vt.x1,transform:Vt.transform},!tt&&u.isEntry(Vt)&&(tt=Vt)});var Q=d(O).descendants(),ot=O.height+1,$=0,Z=H;I.hasMultipleRoots&&u.isHierarchyRoot(O)&&(Q=Q.slice(1),ot-=1,$=1,Z+=1),Q=Q.filter(function(Vt){return Vt.y1<=Z});var st=n(k.rotation);st&&Q.forEach(function(Vt){Vt.x0+=st,Vt.x1+=st});var nt=Math.min(ot,H),ct=function(Vt){return(Vt-$)/nt*ut},gt=function(Vt,It){return[Vt*Math.cos(It),-Vt*Math.sin(It)]},Tt=function(Vt){return x.pathAnnulus(Vt.rpx0,Vt.rpx1,Vt.x0,Vt.x1,J,X)},wt=function(Vt){return J+A(Vt)[0]*(Vt.transform.rCenter||0)+(Vt.transform.x||0)},Rt=function(Vt){return X+A(Vt)[1]*(Vt.transform.rCenter||0)+(Vt.transform.y||0)};N=N.data(Q,u.getPtId),N.enter().append("g").classed("slice",!0),z?N.exit().transition().each(function(){var Vt=g.select(this),It=Vt.select("path.surface");It.transition().attrTween("d",function(Kt){var $t=Lt(Kt);return function(le){return Tt($t(le))}});var re=Vt.select("g.slicetext");re.attr("opacity",0)}).remove():N.exit().remove(),N.order();var bt=null;if(z&&tt){var At=u.getPtId(tt);N.each(function(Vt){bt===null&&u.getPtId(Vt)===At&&(bt=Vt.x1)})}var mt=N;z&&(mt=mt.transition().each("end",function(){var Vt=g.select(this);u.setSliceCursor(Vt,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),mt.each(function(Vt){var It=g.select(this),re=x.ensureSingle(It,"path","surface",function(xe){xe.style("pointer-events",L?"none":"all")});Vt.rpx0=ct(Vt.y0),Vt.rpx1=ct(Vt.y1),Vt.xmid=(Vt.x0+Vt.x1)/2,Vt.pxmid=gt(Vt.rpx1,Vt.xmid),Vt.midangle=-(Vt.xmid-Math.PI/2),Vt.startangle=-(Vt.x0-Math.PI/2),Vt.stopangle=-(Vt.x1-Math.PI/2),Vt.halfangle=.5*Math.min(x.angleDelta(Vt.x0,Vt.x1)||Math.PI,Math.PI),Vt.ring=1-Vt.rpx0/Vt.rpx1,Vt.rInscribed=w(Vt),z?re.transition().attrTween("d",function(xe){var Se=Ht(xe);return function(ne){return Tt(Se(ne))}}):re.attr("d",Tt),It.call(h,O,y,E,{eventDataKeys:b.eventDataKeys,transitionTime:b.CLICK_TRANSITION_TIME,transitionEasing:b.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:y._transitioning}),re.call(l,Vt,k,y);var Kt=x.ensureSingle(It,"g","slicetext"),$t=x.ensureSingle(Kt,"text","",function(xe){xe.attr("data-notex",1)}),le=x.ensureUniformFontSize(y,u.determineTextFont(k,Vt,M.font));$t.text(U.formatSliceLabel(Vt,O,k,E,M)).classed("slicetext",!0).attr("text-anchor","middle").call(S.font,le).call(v.convertToTspans,y);var he=S.bBox($t.node());Vt.transform=c(he,Vt,I),Vt.transform.targetX=wt(Vt),Vt.transform.targetY=Rt(Vt);var de=function(xe,Se){var ne=xe.transform;return f(ne,Se),ne.fontSize=le.size,r(k.type,ne,M),x.getTextTransform(ne)};z?$t.transition().attrTween("transform",function(xe){var Se=Ut(xe);return function(ne){return de(Se(ne),he)}}):$t.attr("transform",de(Vt,he))});function Lt(Vt){var It=u.getPtId(Vt),re=V[It],Kt=V[u.getPtId(O)],$t;if(Kt){var le=(Vt.x1>Kt.x1?2*Math.PI:0)+st;$t=Vt.rpx1bt?2*Math.PI:0)+st;re={x0:$t,x1:$t}}else re={rpx0:ut,rpx1:ut},x.extendFlat(re,kt(Vt));else re={rpx0:0,rpx1:0};else re={x0:st,x1:st};return i(re,Kt)}function Ut(Vt){var It=V[u.getPtId(Vt)],re,Kt=Vt.transform;if(It)re=It;else if(re={rpx1:Vt.rpx1,transform:{textPosAngle:Kt.textPosAngle,scale:0,rotate:Kt.rotate,rCenter:Kt.rCenter,x:Kt.x,y:Kt.y}},tt)if(Vt.parent)if(bt){var $t=Vt.x1>bt?2*Math.PI:0;re.x0=re.x1=$t}else x.extendFlat(re,kt(Vt));else re.x0=re.x1=st;else re.x0=re.x1=st;var le=i(re.transform.textPosAngle,Vt.transform.textPosAngle),he=i(re.rpx1,Vt.rpx1),de=i(re.x0,Vt.x0),xe=i(re.x1,Vt.x1),Se=i(re.transform.scale,Kt.scale),ne=i(re.transform.rotate,Kt.rotate),zt=Kt.rCenter===0?3:re.transform.rCenter===0?1/3:1,Xt=i(re.transform.rCenter,Kt.rCenter),Jt=function(Wt){return Xt(Math.pow(Wt,zt))};return function(Wt){var Ft=he(Wt),xt=de(Wt),yt=xe(Wt),Et=Jt(Wt),Mt=gt(Ft,(xt+yt)/2),Nt=le(Wt),jt={pxmid:Mt,rpx1:Ft,transform:{textPosAngle:Nt,rCenter:Et,x:Kt.x,y:Kt.y}};return r(k.type,Kt,M),{transform:{targetX:wt(jt),targetY:Rt(jt),scale:Se(Wt),rotate:ne(Wt),rCenter:Et}}}}function kt(Vt){var It=Vt.parent,re=V[u.getPtId(It)],Kt={};if(re){var $t=It.children,le=$t.indexOf(Vt),he=$t.length,de=i(re.x0,re.x1);Kt.x0=de(le/he),Kt.x1=de(le/he)}else Kt.x0=Kt.x1=0;return Kt}}function d(y){return C.partition().size([2*Math.PI,y.height+1])(y)}U.formatSliceLabel=function(y,E,T,s,L){var M=T.texttemplate,z=T.textinfo;if(!M&&(!z||z==="none"))return"";var D=L.separators,N=s[0],I=y.data.data,k=N.hierarchy,B=u.isHierarchyRoot(y),O=u.getParent(k,y),H=u.getValue(y);if(!M){var Y=z.split("+"),j=function($){return Y.indexOf($)!==-1},et=[],it;if(j("label")&&I.label&&et.push(I.label),I.hasOwnProperty("v")&&j("value")&&et.push(u.formatValue(I.v,D)),!B){j("current path")&&et.push(u.getPath(y.data));var ut=0;j("percent parent")&&ut++,j("percent entry")&&ut++,j("percent root")&&ut++;var J=ut>1;if(ut){var X,tt=function($){it=u.formatPercent(X,D),J&&(it+=" of "+$),et.push(it)};j("percent parent")&&!B&&(X=H/u.getValue(O),tt("parent")),j("percent entry")&&(X=H/u.getValue(E),tt("entry")),j("percent root")&&(X=H/u.getValue(k),tt("root"))}}return j("text")&&(it=x.castOption(T,I.i,"text"),x.isValidTextValue(it)&&et.push(it)),et.join("
    ")}var V=x.castOption(T,I.i,"texttemplate");if(!V)return"";var Q={};I.label&&(Q.label=I.label),I.hasOwnProperty("v")&&(Q.value=I.v,Q.valueLabel=u.formatValue(I.v,D)),Q.currentPath=u.getPath(y.data),B||(Q.percentParent=H/u.getValue(O),Q.percentParentLabel=u.formatPercent(Q.percentParent,D),Q.parent=u.getPtLabel(O)),Q.percentEntry=H/u.getValue(E),Q.percentEntryLabel=u.formatPercent(Q.percentEntry,D),Q.entry=u.getPtLabel(E),Q.percentRoot=H/u.getValue(k),Q.percentRootLabel=u.formatPercent(Q.percentRoot,D),Q.root=u.getPtLabel(k),I.hasOwnProperty("color")&&(Q.color=I.color);var ot=x.castOption(T,I.i,"text");return(x.isValidTextValue(ot)||ot==="")&&(Q.text=ot),Q.customdata=x.castOption(T,I.i,"customdata"),x.texttemplateString(V,Q,L._d3locale,Q,T._meta||{})};function w(y){return y.rpx0===0&&x.isFullCircle([y.x0,y.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(y.halfangle)),y.ring/2))}function A(y){return _(y.rpx1,y.transform.textPosAngle)}function _(y,E){return[y*Math.sin(E),-y*Math.cos(E)]}},85676:function(G,U,t){var g=t(33428),C=t(76308),i=t(3400),S=t(82744).resizeText,x=t(60404);function v(r){var e=r._fullLayout._sunburstlayer.selectAll(".trace");S(r,e,"sunburst"),e.each(function(a){var n=g.select(this),f=a[0],c=f.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(l){g.select(this).call(p,l,c,r)})})}function p(r,e,a,n){var f=e.data.data,c=!e.children,l=f.i,m=i.castOption(a,l,"marker.line.color")||C.defaultLine,h=i.castOption(a,l,"marker.line.width")||0;r.call(x,e,a,n).style("stroke-width",h).call(C.stroke,m).style("opacity",c?a.leaf.opacity:null)}G.exports={style:v,styleOne:p}},16716:function(G,U,t){var g=t(76308),C=t(49084),i=t(29736).axisHoverFormat,S=t(21776).Ks,x=t(45464),v=t(92880).extendFlat,p=t(67824).overrideAll;function r(n){return{valType:"boolean",dflt:!1}}function e(n){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:r(),y:r(),z:r()},color:{valType:"color",dflt:g.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:g.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var a=G.exports=p(v({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},C("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:e(),y:e(),z:e()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:v({},C.zauto,{}),zmin:v({},C.zmin,{}),zmax:v({},C.zmax,{})},hoverinfo:v({},x.hoverinfo),showlegend:v({},x.showlegend,{dflt:!1})}),"calc","nested");a.x.editType=a.y.editType=a.z.editType="calc+clearAxisTypes",a.transforms=void 0},56576:function(G,U,t){var g=t(47128);G.exports=function(i,S){S.surfacecolor?g(i,S,{vals:S.surfacecolor,containerStr:"",cLetter:"c"}):g(i,S,{vals:S.z,containerStr:"",cLetter:"c"})}},79164:function(G,U,t){var g=t(67792).gl_surface3d,C=t(67792).ndarray,i=t(67792).ndarray_linear_interpolate.d2,S=t(70448),x=t(11240),v=t(3400).isArrayOrTypedArray,p=t(33040).parseColorScale,r=t(43080),e=t(8932).extractOpts;function a(s,L,M){this.scene=s,this.uid=M,this.surface=L,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var n=a.prototype;n.getXat=function(s,L,M,z){var D=v(this.data.x)?v(this.data.x[0])?this.data.x[L][s]:this.data.x[s]:s;return M===void 0?D:z.d2l(D,0,M)},n.getYat=function(s,L,M,z){var D=v(this.data.y)?v(this.data.y[0])?this.data.y[L][s]:this.data.y[L]:L;return M===void 0?D:z.d2l(D,0,M)},n.getZat=function(s,L,M,z){var D=this.data.z[L][s];return D===null&&this.data.connectgaps&&this.data._interpolatedZ&&(D=this.data._interpolatedZ[L][s]),M===void 0?D:z.d2l(D,0,M)},n.handlePick=function(s){if(s.object===this.surface){var L=(s.data.index[0]-1)/this.dataScaleX-1,M=(s.data.index[1]-1)/this.dataScaleY-1,z=Math.max(Math.min(Math.round(L),this.data.z[0].length-1),0),D=Math.max(Math.min(Math.round(M),this.data._ylength-1),0);s.index=[z,D],s.traceCoordinate=[this.getXat(z,D),this.getYat(z,D),this.getZat(z,D)],s.dataCoordinate=[this.getXat(z,D,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(z,D,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(z,D,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var N=0;N<3;N++){var I=s.dataCoordinate[N];I!=null&&(s.dataCoordinate[N]*=this.scene.dataScale[N])}var k=this.data.hovertext||this.data.text;return v(k)&&k[D]&&k[D][z]!==void 0?s.textLabel=k[D][z]:k?s.textLabel=k:s.textLabel="",s.data.dataCoordinate=s.dataCoordinate.slice(),this.surface.highlight(s.data),this.scene.glplot.spikes.position=s.dataCoordinate,!0}};function f(s){var L=s[0].rgb,M=s[s.length-1].rgb;return L[0]===M[0]&&L[1]===M[1]&&L[2]===M[2]&&L[3]===M[3]}var c=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function l(s,L){if(s0){M=c[z];break}return M}function b(s,L){if(!(s<1||L<1)){for(var M=m(s),z=m(L),D=1,N=0;Nw;)z--,z/=h(z),z++,z1?D:1};function A(s,L,M){var z=M[8]+M[2]*L[0]+M[5]*L[1];return s[0]=(M[6]+M[0]*L[0]+M[3]*L[1])/z,s[1]=(M[7]+M[1]*L[0]+M[4]*L[1])/z,s}function _(s,L,M){return y(s,L,A,M),s}function y(s,L,M,z){for(var D=[0,0],N=s.shape[0],I=s.shape[1],k=0;k0&&this.contourStart[z]!==null&&this.contourEnd[z]!==null&&this.contourEnd[z]>this.contourStart[z]))for(L[z]=!0,D=this.contourStart[z];Dj&&(this.minValues[O]=j),this.maxValues[O]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},55992:function(G,U,t){var g=t(23536),C=t(92880).extendFlat,i=t(38248),S=t(38116).isTypedArray,x=t(38116).isArrayOrTypedArray;G.exports=function(m,h){var b=r(h.cells.values),u=function(j){return j.slice(h.header.values.length,j.length)},o=r(h.header.values);o.length&&!o[0].length&&(o[0]=[""],o=r(o));var d=o.concat(u(b).map(function(){return e((o[0]||[""]).length)})),w=h.domain,A=Math.floor(m._fullLayout._size.w*(w.x[1]-w.x[0])),_=Math.floor(m._fullLayout._size.h*(w.y[1]-w.y[0])),y=h.header.values.length?d[0].map(function(){return h.header.height}):[g.emptyHeaderHeight],E=b.length?b[0].map(function(){return h.cells.height}):[],T=y.reduce(p,0),s=_-T,L=s+g.uplift,M=f(E,L),z=f(y,T),D=n(z,[]),N=n(M,D),I={},k=h._fullInput.columnorder;x(k)&&(k=Array.from(k)),k=k.concat(u(b.map(function(j,et){return et})));var B=d.map(function(j,et){var it=x(h.columnwidth)?h.columnwidth[Math.min(et,h.columnwidth.length-1)]:h.columnwidth;return i(it)?Number(it):1}),O=B.reduce(p,0);B=B.map(function(j){return j/O*A});var H=Math.max(v(h.header.line.width),v(h.cells.line.width)),Y={key:h.uid+m._context.staticPlot,translateX:w.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-w.y[1]),size:m._fullLayout._size,width:A,maxLineWidth:H,height:_,columnOrder:k,groupHeight:_,rowBlocks:N,headerRowBlocks:D,scrollY:0,cells:C({},h.cells,{values:b}),headerCells:C({},h.header,{values:d}),gdColumns:d.map(function(j){return j[0]}),gdColumnsOriginalOrder:d.map(function(j){return j[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:d.map(function(j,et){var it=I[j];I[j]=(it||0)+1;var ut=j+"__"+I[j];return{key:ut,label:j,specIndex:et,xIndex:k[et],xScale:a,x:void 0,calcdata:void 0,columnWidth:B[et]}})};return Y.columns.forEach(function(j){j.calcdata=Y,j.x=a(j)}),Y};function v(l){if(x(l)){for(var m=0,h=0;h=m||_===l.length-1)&&(h[u]=d,d.key=A++,d.firstRowIndex=w,d.lastRowIndex=_,d=c(),u+=o,w=_+1,o=0);return h}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}},53056:function(G,U,t){var g=t(92880).extendFlat;U.splitToPanels=function(i){var S=[0,0],x=g({},i,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:i.calcdata.headerCells.values[i.specIndex],rowBlocks:i.calcdata.headerRowBlocks,calcdata:g({},i.calcdata,{cells:i.calcdata.headerCells})}),v=g({},i,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks}),p=g({},i,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks});return[v,p,x]},U.splitToCells=function(i){var S=C(i);return(i.values||[]).slice(S[0],S[1]).map(function(x,v){var p=typeof x=="string"&&x.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:v+p,key:S[0]+v,column:i,calcdata:i.calcdata,page:i.page,rowBlocks:i.rowBlocks,value:x}})};function C(i){var S=i.rowBlocks[i.page],x=S?S.rows[0].rowIndex:0,v=S?x+S.rows.length:0;return[x,v]}},53212:function(G,U,t){var g=t(3400),C=t(60520),i=t(86968).Q;function S(x,v){for(var p=x.columnorder||[],r=x.header.values.length,e=p.slice(0,r),a=e.slice().sort(function(c,l){return c-l}),n=e.map(function(c){return a.indexOf(c)}),f=n.length;f/i),mt=!bt||At;gt.mayHaveMarkup=bt&&Rt.match(/[<&>]/);var Lt=M(Rt);gt.latex=Lt;var Ht=Lt?"":N(gt.calcdata.cells.prefix,Tt,wt)||"",Ut=Lt?"":N(gt.calcdata.cells.suffix,Tt,wt)||"",kt=Lt?null:N(gt.calcdata.cells.format,Tt,wt)||null,Vt=Ht+(kt?S(kt)(gt.value):gt.value)+Ut,It;gt.wrappingNeeded=!gt.wrapped&&!mt&&!Lt&&(It=z(Vt)),gt.cellHeightMayIncrease=At||Lt||gt.mayHaveMarkup||(It===void 0?z(Vt):It),gt.needsConvertToTspans=gt.mayHaveMarkup||gt.wrappingNeeded||gt.latex;var re;if(gt.wrappingNeeded){var Kt=g.wrapSplitCharacter===" "?Vt.replace(/gt&&ct.push(Tt),gt+=bt}return ct}function Y(Z,st,nt){var ct=b(st)[0];if(ct!==void 0){var gt=ct.rowBlocks,Tt=ct.calcdata,wt=tt(gt,gt.length),Rt=ct.calcdata.groupHeight-O(ct),bt=Tt.scrollY=Math.max(0,Math.min(wt-Rt,Tt.scrollY)),At=H(gt,bt,Rt);At.length===1&&(At[0]===gt.length-1?At.unshift(At[0]-1):At.push(At[0]+1)),At[0]%2&&At.reverse(),st.each(function(mt,Lt){mt.page=At[Lt],mt.scrollY=bt}),st.attr("transform",function(mt){var Lt=tt(mt.rowBlocks,mt.page)-mt.scrollY;return e(0,Lt)}),Z&&(et(Z,nt,st,At,ct.prevPages,ct,0),et(Z,nt,st,At,ct.prevPages,ct,1),u(nt,Z))}}function j(Z,st,nt,ct){return function(Tt){var wt=Tt.calcdata?Tt.calcdata:Tt,Rt=st.filter(function(Lt){return wt.key===Lt.key}),bt=nt||wt.scrollbarState.dragMultiplier,At=wt.scrollY;wt.scrollY=ct===void 0?wt.scrollY+bt*C.event.dy:ct;var mt=Rt.selectAll("."+g.cn.yColumn).selectAll("."+g.cn.columnBlock).filter(k);return Y(Z,mt,Rt),wt.scrollY===At}}function et(Z,st,nt,ct,gt,Tt,wt){var Rt=ct[wt]!==gt[wt];Rt&&(clearTimeout(Tt.currentRepaint[wt]),Tt.currentRepaint[wt]=setTimeout(function(){var bt=nt.filter(function(At,mt){return mt===wt&&ct[mt]!==gt[mt]});o(Z,st,bt,nt),gt[wt]=ct[wt]}))}function it(Z,st,nt,ct){return function(){var Tt=C.select(st.parentNode);Tt.each(function(wt){var Rt=wt.fragments;Tt.selectAll("tspan.line").each(function(Vt,It){Rt[It].width=this.getComputedTextLength()});var bt=Rt[Rt.length-1].width,At=Rt.slice(0,-1),mt=[],Lt,Ht,Ut=0,kt=wt.column.columnWidth-2*g.cellPad;for(wt.value="";At.length;)Lt=At.shift(),Ht=Lt.width+bt,Ut+Ht>kt&&(wt.value+=mt.join(g.wrapSpacer)+g.lineBreaker,mt=[],Ut=0),mt.push(Lt.text),Ut+=Ht;Ut&&(wt.value+=mt.join(g.wrapSpacer)),wt.wrapped=!0}),Tt.selectAll("tspan.line").remove(),L(Tt.select("."+g.cn.cellText),nt,Z,ct),C.select(st.parentNode.parentNode).call(X)}}function ut(Z,st,nt,ct,gt){return function(){if(!gt.settledY){var wt=C.select(st.parentNode),Rt=ot(gt),bt=gt.key-Rt.firstRowIndex,At=Rt.rows[bt].rowHeight,mt=gt.cellHeightMayIncrease?st.parentNode.getBoundingClientRect().height+2*g.cellPad:At,Lt=Math.max(mt,At),Ht=Lt-Rt.rows[bt].rowHeight;Ht&&(Rt.rows[bt].rowHeight=Lt,Z.selectAll("."+g.cn.columnCell).call(X),Y(null,Z.filter(k),0),u(nt,ct,!0)),wt.attr("transform",function(){var Ut=this,kt=Ut.parentNode,Vt=kt.getBoundingClientRect(),It=C.select(Ut.parentNode).select("."+g.cn.cellRect).node().getBoundingClientRect(),re=Ut.transform.baseVal.consolidate(),Kt=It.top-Vt.top+(re?re.matrix.f:g.cellPad);return e(J(gt,C.select(Ut.parentNode).select("."+g.cn.cellTextHolder).node().getBoundingClientRect().width),Kt)}),gt.settledY=!0}}}function J(Z,st){switch(Z.align){case"left":return g.cellPad;case"right":return Z.column.columnWidth-(st||0)-g.cellPad;case"center":return(Z.column.columnWidth-(st||0))/2;default:return g.cellPad}}function X(Z){Z.attr("transform",function(st){var nt=st.rowBlocks[0].auxiliaryBlocks.reduce(function(wt,Rt){return wt+V(Rt,1/0)},0),ct=ot(st),gt=V(ct,st.key),Tt=gt+nt;return e(0,Tt)}).selectAll("."+g.cn.cellRect).attr("height",function(st){return $(ot(st),st.key).rowHeight})}function tt(Z,st){for(var nt=0,ct=st-1;ct>=0;ct--)nt+=Q(Z[ct]);return nt}function V(Z,st){for(var nt=0,ct=0;ct","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},x.textfont,{}),editType:"calc"},text:x.text,textinfo:v.textinfo,texttemplate:C({editType:"plot"},{keys:p.eventDataKeys.concat(["label","value"])}),hovertext:x.hovertext,hoverinfo:v.hoverinfo,hovertemplate:g({},{keys:p.eventDataKeys}),textfont:x.textfont,insidetextfont:x.insidetextfont,outsidetextfont:r({},x.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:x.sort,root:v.root,domain:S({name:"treemap",trace:!0,editType:"calc"})}},79516:function(G,U,t){var g=t(7316);U.name="treemap",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},97840:function(G,U,t){var g=t(3776);U.r=function(C,i){return g.calc(C,i)},U.q=function(C){return g._runCrossTraceCalc("treemap",C)}},32984:function(G){G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(G,U,t){var g=t(3400),C=t(40516),i=t(76308),S=t(86968).Q,x=t(31508).handleText,v=t(78048).TEXTPAD,p=t(74174).handleMarkerDefaults,r=t(8932),e=r.hasColorscale,a=r.handleDefaults;G.exports=function(f,c,l,m){function h(s,L){return g.coerce(f,c,C,s,L)}var b=h("labels"),u=h("parents");if(!b||!b.length||!u||!u.length){c.visible=!1;return}var o=h("values");o&&o.length?h("branchvalues"):h("count"),h("level"),h("maxdepth");var d=h("tiling.packing");d==="squarify"&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var w=h("text");h("texttemplate"),c.texttemplate||h("textinfo",g.isArrayOrTypedArray(w)?"text+label":"label"),h("hovertext"),h("hovertemplate");var A=h("pathbar.visible"),_="auto";x(f,c,m,h,_,{hasPathbar:A,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var y=c.textposition.indexOf("bottom")!==-1;p(f,c,m,h);var E=c._hasColorscale=e(f,"marker","colors")||(f.marker||{}).coloraxis;E?a(f,c,m,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(c.marker.colors||[]).length);var T=c.textfont.size*2;h("marker.pad.t",y?T/4:T),h("marker.pad.l",T/4),h("marker.pad.r",T/4),h("marker.pad.b",y?T:T/4),h("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:i.contrast(m.paper_bgcolor)}}},A&&(h("pathbar.thickness",c.pathbar.textfont.size+2*v),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),S(c,m,h),c._length=null}},95808:function(G,U,t){var g=t(33428),C=t(78176),i=t(82744),S=i.clearMinTextSize,x=t(60100).resizeText,v=t(52960);G.exports=function(r,e,a,n,f){var c=f.type,l=f.drawDescendants,m=r._fullLayout,h=m["_"+c+"layer"],b,u,o=!a;if(S(c,m),b=h.selectAll("g.trace."+c).data(e,function(w){return w[0].trace.uid}),b.enter().append("g").classed("trace",!0).classed(c,!0),b.order(),!m.uniformtext.mode&&C.hasTransition(a)){n&&(u=n());var d=g.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});d.each(function(){h.selectAll("g.trace").each(function(w){v(r,w,this,a,l)})})}else b.each(function(w){v(r,w,this,a,l)}),m.uniformtext.mode&&x(r,h.selectAll(".trace"),c);o&&b.exit().remove()}},27336:function(G,U,t){var g=t(33428),C=t(3400),i=t(43616),S=t(72736),x=t(13832),v=t(66192).styleOne,p=t(32984),r=t(78176),e=t(45716),a=!0;G.exports=function(f,c,l,m,h){var b=h.barDifY,u=h.width,o=h.height,d=h.viewX,w=h.viewY,A=h.pathSlice,_=h.toMoveInsideSlice,y=h.strTransform,E=h.hasTransition,T=h.handleSlicesExit,s=h.makeUpdateSliceInterpolator,L=h.makeUpdateTextInterpolator,M={},z=f._context.staticPlot,D=f._fullLayout,N=c[0],I=N.trace,k=N.hierarchy,B=u/I._entryDepth,O=r.listPath(l.data,"id"),H=x(k.copy(),[u,o],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();H=H.filter(function(j){var et=O.indexOf(j.data.id);return et===-1?!1:(j.x0=B*et,j.x1=B*(et+1),j.y0=b,j.y1=b+o,j.onPathbar=!0,!0)}),H.reverse(),m=m.data(H,r.getPtId),m.enter().append("g").classed("pathbar",!0),T(m,a,M,[u,o],A),m.order();var Y=m;E&&(Y=Y.transition().each("end",function(){var j=g.select(this);r.setSliceCursor(j,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),Y.each(function(j){j._x0=d(j.x0),j._x1=d(j.x1),j._y0=w(j.y0),j._y1=w(j.y1),j._hoverX=d(j.x1-Math.min(u,o)/2),j._hoverY=w(j.y1-o/2);var et=g.select(this),it=C.ensureSingle(et,"path","surface",function(tt){tt.style("pointer-events",z?"none":"all")});E?it.transition().attrTween("d",function(tt){var V=s(tt,a,M,[u,o]);return function(Q){return A(V(Q))}}):it.attr("d",A),et.call(e,l,f,c,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:f._transitioning}),it.call(v,j,I,f,{hovered:!1}),j._text=(r.getPtLabel(j)||"").split("
    ").join(" ")||"";var ut=C.ensureSingle(et,"g","slicetext"),J=C.ensureSingle(ut,"text","",function(tt){tt.attr("data-notex",1)}),X=C.ensureUniformFontSize(f,r.determineTextFont(I,j,D.font,{onPathbar:!0}));J.text(j._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,X).call(S.convertToTspans,f),j.textBB=i.bBox(J.node()),j.transform=_(j,{fontSize:X.size,onPathbar:!0}),j.transform.fontSize=X.size,E?J.transition().attrTween("transform",function(tt){var V=L(tt,a,M,[u,o]);return function(Q){return y(V(Q))}}):J.attr("transform",y(j))})}},76477:function(G,U,t){var g=t(33428),C=t(3400),i=t(43616),S=t(72736),x=t(13832),v=t(66192).styleOne,p=t(32984),r=t(78176),e=t(45716),a=t(96488).formatSliceLabel,n=!1;G.exports=function(c,l,m,h,b){var u=b.width,o=b.height,d=b.viewX,w=b.viewY,A=b.pathSlice,_=b.toMoveInsideSlice,y=b.strTransform,E=b.hasTransition,T=b.handleSlicesExit,s=b.makeUpdateSliceInterpolator,L=b.makeUpdateTextInterpolator,M=b.prevEntry,z={},D=c._context.staticPlot,N=c._fullLayout,I=l[0],k=I.trace,B=k.textposition.indexOf("left")!==-1,O=k.textposition.indexOf("right")!==-1,H=k.textposition.indexOf("bottom")!==-1,Y=!H&&!k.marker.pad.t||H&&!k.marker.pad.b,j=x(m,[u,o],{packing:k.tiling.packing,squarifyratio:k.tiling.squarifyratio,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1,pad:{inner:k.tiling.pad,top:k.marker.pad.t,left:k.marker.pad.l,right:k.marker.pad.r,bottom:k.marker.pad.b}}),et=j.descendants(),it=1/0,ut=-1/0;et.forEach(function(Q){var ot=Q.depth;ot>=k._maxDepth?(Q.x0=Q.x1=(Q.x0+Q.x1)/2,Q.y0=Q.y1=(Q.y0+Q.y1)/2):(it=Math.min(it,ot),ut=Math.max(ut,ot))}),h=h.data(et,r.getPtId),k._maxVisibleLayers=isFinite(ut)?ut-it+1:0,h.enter().append("g").classed("slice",!0),T(h,n,z,[u,o],A),h.order();var J=null;if(E&&M){var X=r.getPtId(M);h.each(function(Q){J===null&&r.getPtId(Q)===X&&(J={x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1})})}var tt=function(){return J||{x0:0,x1:u,y0:0,y1:o}},V=h;return E&&(V=V.transition().each("end",function(){var Q=g.select(this);r.setSliceCursor(Q,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),V.each(function(Q){var ot=r.isHeader(Q,k);Q._x0=d(Q.x0),Q._x1=d(Q.x1),Q._y0=w(Q.y0),Q._y1=w(Q.y1),Q._hoverX=d(Q.x1-k.marker.pad.r),Q._hoverY=w(H?Q.y1-k.marker.pad.b/2:Q.y0+k.marker.pad.t/2);var $=g.select(this),Z=C.ensureSingle($,"path","surface",function(wt){wt.style("pointer-events",D?"none":"all")});E?Z.transition().attrTween("d",function(wt){var Rt=s(wt,n,tt(),[u,o]);return function(bt){return A(Rt(bt))}}):Z.attr("d",A),$.call(e,m,c,l,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),Z.call(v,Q,k,c,{hovered:!1}),Q.x0===Q.x1||Q.y0===Q.y1?Q._text="":ot?Q._text=Y?"":r.getPtLabel(Q)||"":Q._text=a(Q,m,k,l,N)||"";var st=C.ensureSingle($,"g","slicetext"),nt=C.ensureSingle(st,"text","",function(wt){wt.attr("data-notex",1)}),ct=C.ensureUniformFontSize(c,r.determineTextFont(k,Q,N.font)),gt=Q._text||" ",Tt=ot&>.indexOf("
    ")===-1;nt.text(gt).classed("slicetext",!0).attr("text-anchor",O?"end":B||Tt?"start":"middle").call(i.font,ct).call(S.convertToTspans,c),Q.textBB=i.bBox(nt.node()),Q.transform=_(Q,{fontSize:ct.size,isHeader:ot}),Q.transform.fontSize=ct.size,E?nt.transition().attrTween("transform",function(wt){var Rt=L(wt,n,tt(),[u,o]);return function(bt){return y(Rt(bt))}}):nt.attr("transform",y(Q))}),J}},83024:function(G){G.exports=function U(t,g,C){var i;C.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),C.flipX&&(i=t.x0,t.x0=g[0]-t.x1,t.x1=g[0]-i),C.flipY&&(i=t.y0,t.y0=g[1]-t.y1,t.y1=g[1]-i);var S=t.children;if(S)for(var x=0;x-1?O+j:-(Y+j):0,it={x0:H,x1:H,y0:et,y1:et+Y},ut=function(zt,Xt,Jt){var Wt=w.tiling.pad,Ft=function(Mt){return Mt-Wt<=Xt.x0},xt=function(Mt){return Mt+Wt>=Xt.x1},yt=function(Mt){return Mt-Wt<=Xt.y0},Et=function(Mt){return Mt+Wt>=Xt.y1};return zt.x0===Xt.x0&&zt.x1===Xt.x1&&zt.y0===Xt.y0&&zt.y1===Xt.y1?{x0:zt.x0,x1:zt.x1,y0:zt.y0,y1:zt.y1}:{x0:Ft(zt.x0-Wt)?0:xt(zt.x0-Wt)?Jt[0]:zt.x0,x1:Ft(zt.x1+Wt)?0:xt(zt.x1+Wt)?Jt[0]:zt.x1,y0:yt(zt.y0-Wt)?0:Et(zt.y0-Wt)?Jt[1]:zt.y0,y1:yt(zt.y1+Wt)?0:Et(zt.y1+Wt)?Jt[1]:zt.y1}},J=null,X={},tt={},V=null,Q=function(zt,Xt){return Xt?X[f(zt)]:tt[f(zt)]},ot=function(zt,Xt,Jt,Wt){if(Xt)return X[f(y)]||it;var Ft=tt[w.level]||Jt;return N(zt)?ut(zt,Ft,Wt):{}};d.hasMultipleRoots&&M&&D++,w._maxDepth=D,w._backgroundColor=o.paper_bgcolor,w._entryDepth=E.data.depth,w._atRootLevel=M;var $=-B/2+I.l+I.w*(k.x[1]+k.x[0])/2,Z=-O/2+I.t+I.h*(1-(k.y[1]+k.y[0])/2),st=function(zt){return $+zt},nt=function(zt){return Z+zt},ct=nt(0),gt=st(0),Tt=function(zt){return gt+zt},wt=function(zt){return ct+zt};function Rt(zt,Xt){return zt+","+Xt}var bt=Tt(0),At=function(zt){zt.x=Math.max(bt,zt.x)},mt=w.pathbar.edgeshape,Lt=function(zt){var Xt=Tt(Math.max(Math.min(zt.x0,zt.x0),0)),Jt=Tt(Math.min(Math.max(zt.x1,zt.x1),H)),Wt=wt(zt.y0),Ft=wt(zt.y1),xt=Y/2,yt={},Et={};yt.x=Xt,Et.x=Jt,yt.y=Et.y=(Wt+Ft)/2;var Mt={x:Xt,y:Wt},Nt={x:Jt,y:Wt},jt={x:Jt,y:Ft},ie={x:Xt,y:Ft};return mt===">"?(Mt.x-=xt,Nt.x-=xt,jt.x-=xt,ie.x-=xt):mt==="/"?(jt.x-=xt,ie.x-=xt,yt.x-=xt/2,Et.x-=xt/2):mt==="\\"?(Mt.x-=xt,Nt.x-=xt,yt.x-=xt/2,Et.x-=xt/2):mt==="<"&&(yt.x-=xt,Et.x-=xt),At(Mt),At(ie),At(yt),At(Nt),At(jt),At(Et),"M"+Rt(Mt.x,Mt.y)+"L"+Rt(Nt.x,Nt.y)+"L"+Rt(Et.x,Et.y)+"L"+Rt(jt.x,jt.y)+"L"+Rt(ie.x,ie.y)+"L"+Rt(yt.x,yt.y)+"Z"},Ht=w[_?"tiling":"marker"].pad,Ut=function(zt){return w.textposition.indexOf(zt)!==-1},kt=Ut("top"),Vt=Ut("left"),It=Ut("right"),re=Ut("bottom"),Kt=function(zt){var Xt=st(zt.x0),Jt=st(zt.x1),Wt=nt(zt.y0),Ft=nt(zt.y1),xt=Jt-Xt,yt=Ft-Wt;if(!xt||!yt)return"";var Et=w.marker.cornerradius||0,Mt=Math.min(Et,xt/2,yt/2);Mt&&zt.data&&zt.data.data&&zt.data.data.label&&(kt&&(Mt=Math.min(Mt,Ht.t)),Vt&&(Mt=Math.min(Mt,Ht.l)),It&&(Mt=Math.min(Mt,Ht.r)),re&&(Mt=Math.min(Mt,Ht.b)));var Nt=function(jt,ie){return Mt?"a"+Rt(Mt,Mt)+" 0 0 1 "+Rt(jt,ie):""};return"M"+Rt(Xt,Wt+Mt)+Nt(Mt,-Mt)+"L"+Rt(Jt-Mt,Wt)+Nt(Mt,Mt)+"L"+Rt(Jt,Ft-Mt)+Nt(-Mt,Mt)+"L"+Rt(Xt+Mt,Ft)+Nt(-Mt,-Mt)+"Z"},$t=function(zt,Xt){var Jt=zt.x0,Wt=zt.x1,Ft=zt.y0,xt=zt.y1,yt=zt.textBB,Et=kt||Xt.isHeader&&!re,Mt=Et?"start":re?"end":"middle",Nt=Ut("right"),jt=Ut("left")||Xt.onPathbar,ie=jt?-1:Nt?1:0;if(Xt.isHeader){if(Jt+=(_?Ht:Ht.l)-x,Wt-=(_?Ht:Ht.r)-x,Jt>=Wt){var me=(Jt+Wt)/2;Jt=me,Wt=me}var be;re?(be=xt-(_?Ht:Ht.b),Ft0)for(var T=0;T0){var A=p.xa,_=p.ya,y,E,T,s,L;l.orientation==="h"?(L=r,y="y",T=_,E="x",s=A):(L=e,y="x",T=A,E="y",s=_);var M=c[p.index];if(L>=M.span[0]&&L<=M.span[1]){var z=C.extendFlat({},p),D=s.c2p(L,!0),N=x.getKdeValue(M,l,L),I=x.getPositionOnKdePath(M,l,D),k=T._offset,B=T._length;z[y+"0"]=I[0],z[y+"1"]=I[1],z[E+"0"]=z[E+"1"]=D,z[E+"Label"]=E+": "+i.hoverLabelText(s,L,l[E+"hoverformat"])+", "+c[0].t.labels.kde+" "+N.toFixed(3);for(var O=0,H=0;H")),c.color=v(m,w),[c]};function v(p,r){var e=p[r.dir].marker,a=e.color,n=e.line.color,f=e.line.width;if(C(a))return a;if(C(n)&&f)return n}},95952:function(G,U,t){G.exports={attributes:t(65776),layoutAttributes:t(91352),supplyDefaults:t(24224).supplyDefaults,crossTraceDefaults:t(24224).crossTraceDefaults,supplyLayoutDefaults:t(59464),calc:t(73540),crossTraceCalc:t(50152),plot:t(64488),style:t(12252).style,hoverPoints:t(94196),eventData:t(53256),selectPoints:t(45784),moduleType:"trace",name:"waterfall",basePlotModule:t(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(G){G.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},59464:function(G,U,t){var g=t(3400),C=t(91352);G.exports=function(i,S,x){var v=!1;function p(a,n){return g.coerce(i,S,C,a,n)}for(var r=0;r0&&(o?L+="M"+T[0]+","+s[1]+"V"+s[0]:L+="M"+T[1]+","+s[0]+"H"+T[0]),d!=="between"&&(_.isSum||y path").each(function(h){if(!h.isBlank){var b=m[h.dir].marker;g.select(this).call(i.fill,b.color).call(i.stroke,b.line.color).call(C.dashLine,b.line.dash,b.line.width).style("opacity",m.selectedpoints&&!h.selected?S:1)}}),p(l,m,e),l.selectAll(".lines").each(function(){var h=m.connector.line;C.lineGroupStyle(g.select(this).selectAll("path"),h.width,h.color,h.dash)})})}G.exports={style:r}},84224:function(G,U,t){var g=t(54460),C=t(3400),i=t(73060),S=t(60468).W,x=t(39032).BADNUM;U.moduleType="transform",U.name="aggregate";var v=U.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},p=v.aggregations;U.supplyDefaults=function(c,l){var m={},h;function b(M,z){return C.coerce(c,m,v,M,z)}var u=b("enabled");if(!u)return m;var o=i.findArrayAttributes(l),d={};for(h=0;hw&&(w=E,A=y)}}return w?b(A):x};case"rms":return function(u,o){for(var d=0,w=0,A=0;A":return function(d){return u(d)>o};case">=":return function(d){return u(d)>=o};case"[]":return function(d){var w=u(d);return w>=o[0]&&w<=o[1]};case"()":return function(d){var w=u(d);return w>o[0]&&w=o[0]&&wo[0]&&w<=o[1]};case"][":return function(d){var w=u(d);return w<=o[0]||w>=o[1]};case")(":return function(d){var w=u(d);return wo[1]};case"](":return function(d){var w=u(d);return w<=o[0]||w>o[1]};case")[":return function(d){var w=u(d);return w=o[1]};case"{}":return function(d){return o.indexOf(u(d))!==-1};case"}{":return function(d){return o.indexOf(u(d))===-1}}}},32028:function(G,U,t){var g=t(3400),C=t(73060),i=t(7316),S=t(60468).W;U.moduleType="transform",U.name="groupby",U.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},U.supplyDefaults=function(v,p,r){var e,a={};function n(b,u){return g.coerce(v,a,U.attributes,b,u)}var f=n("enabled");if(!f)return a;n("groups"),n("nameformat",r._dataLength>1?"%{group} (%{trace})":"%{group}");var c=v.styles,l=a.styles=[];if(c)for(e=0;e=0){x.i=e.i;var f=h.marker;f.pattern?(!f.colors||!f.pattern.shape)&&(f.color=n,x.color=n):(f.color=n,x.color=n),g.pointStyle(S,h,p,x)}else C.fill(S,n)}},45716:function(G,U,t){var g=t(33428),C=t(24040),i=t(10624).appendArrayPointValue,S=t(93024),x=t(3400),h=t(95924),p=t(78176),r=t(69656),e=r.formatPieValue;G.exports=function(f,c,l,m,v){var b=m[0],u=b.trace,o=b.hierarchy,d=u.type==="sunburst",w=u.type==="treemap"||u.type==="icicle";"_hasHoverLabel"in u||(u._hasHoverLabel=!1),"_hasHoverEvent"in u||(u._hasHoverEvent=!1);var A=function(E){var T=l._fullLayout;if(!(l._dragging||T.hovermode===!1)){var s=l._fullData[u.index],L=E.data.data,M=L.i,z=p.isHierarchyRoot(E),D=p.getParent(o,E),N=p.getValue(E),I=function(Z){return x.castOption(s,M,Z)},k=I("hovertemplate"),B=S.castHoverinfo(s,T,M),O=T.separators,H;if(k||B&&B!=="none"&&B!=="skip"){var Y,j;d&&(Y=b.cx+E.pxmid[0]*(1-E.rInscribed),j=b.cy+E.pxmid[1]*(1-E.rInscribed)),w&&(Y=E._hoverX,j=E._hoverY);var et={},it=[],ut=[],J=function(Z){return it.indexOf(Z)!==-1};B&&(it=B==="all"?s._module.attributes.hoverinfo.flags:B.split("+")),et.label=L.label,J("label")&&et.label&&ut.push(et.label),L.hasOwnProperty("v")&&(et.value=L.v,et.valueLabel=e(et.value,O),J("value")&&ut.push(et.valueLabel)),et.currentPath=E.currentPath=p.getPath(E.data),J("current path")&&!z&&ut.push(et.currentPath);var X,tt=[],V=function(){tt.indexOf(X)===-1&&(ut.push(X),tt.push(X))};et.percentParent=E.percentParent=N/p.getValue(D),et.parent=E.parentString=p.getPtLabel(D),J("percent parent")&&(X=p.formatPercent(et.percentParent,O)+" of "+et.parent,V()),et.percentEntry=E.percentEntry=N/p.getValue(c),et.entry=E.entry=p.getPtLabel(c),J("percent entry")&&!z&&!E.onPathbar&&(X=p.formatPercent(et.percentEntry,O)+" of "+et.entry,V()),et.percentRoot=E.percentRoot=N/p.getValue(o),et.root=E.root=p.getPtLabel(o),J("percent root")&&!z&&(X=p.formatPercent(et.percentRoot,O)+" of "+et.root,V()),et.text=I("hovertext")||I("text"),J("text")&&(X=et.text,x.isValidTextValue(X)&&ut.push(X)),H=[a(E,s,v.eventDataKeys)];var Q={trace:s,y:j,_x0:E._x0,_x1:E._x1,_y0:E._y0,_y1:E._y1,text:ut.join("
    "),name:k||J("name")?s.name:void 0,color:I("hoverlabel.bgcolor")||L.color,borderColor:I("hoverlabel.bordercolor"),fontFamily:I("hoverlabel.font.family"),fontSize:I("hoverlabel.font.size"),fontColor:I("hoverlabel.font.color"),nameLength:I("hoverlabel.namelength"),textAlign:I("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:et,eventData:H};d&&(Q.x0=Y-E.rInscribed*E.rpx1,Q.x1=Y+E.rInscribed*E.rpx1,Q.idealAlign=E.pxmid[0]<0?"left":"right"),w&&(Q.x=Y,Q.idealAlign=Y<0?"left":"right");var ot=[];S.loneHover(Q,{container:T._hoverlayer.node(),outerContainer:T._paper.node(),gd:l,inOut_bbox:ot}),H[0].bbox=ot[0],u._hasHoverLabel=!0}if(w){var $=f.select("path.surface");v.styleOne($,E,s,l,{hovered:!0})}u._hasHoverEvent=!0,l.emit("plotly_hover",{points:H||[a(E,s,v.eventDataKeys)],event:g.event})}},_=function(E){var T=l._fullLayout,s=l._fullData[u.index],L=g.select(this).datum();if(u._hasHoverEvent&&(E.originalEvent=g.event,l.emit("plotly_unhover",{points:[a(L,s,v.eventDataKeys)],event:g.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(S.loneUnhover(T._hoverlayer.node()),u._hasHoverLabel=!1),w){var M=f.select("path.surface");v.styleOne(M,L,s,l,{hovered:!1})}},y=function(E){var T=l._fullLayout,s=l._fullData[u.index],L=d&&(p.isHierarchyRoot(E)||p.isLeaf(E)),M=p.getPtId(E),z=p.isEntry(E)?p.findEntryWithChild(o,M):p.findEntryWithLevel(o,M),D=p.getPtId(z),N={points:[a(E,s,v.eventDataKeys)],event:g.event};L||(N.nextLevel=D);var I=h.triggerHandler(l,"plotly_"+u.type+"click",N);if(I!==!1&&T.hovermode&&(l._hoverdata=[a(E,s,v.eventDataKeys)],S.click(l,g.event)),!L&&I!==!1&&!l._dragging&&!l._transitioning){C.call("_storeDirectGUIEdit",s,T._tracePreGUI[s.uid],{level:s.level});var k={data:[{level:D}],traces:[u.index]},B={frame:{redraw:!1,duration:v.transitionTime},transition:{duration:v.transitionTime,easing:v.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(T._hoverlayer.node()),C.call("animate",l,k,B)}};f.on("mouseover",A),f.on("mouseout",_),f.on("click",y)};function a(n,f,c){for(var l=n.data.data,m={curveNumber:f.index,pointNumber:l.i,data:f._input,fullData:f},v=0;v0)},U.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},U.isHeader=function(r,e){return!(U.isLeaf(r)||r.depth===e._maxDepth-1)};function p(r){return r.data.data.pid}U.getParent=function(r,e){return U.findEntryWithLevel(r,p(e))},U.listPath=function(r,e){var a=r.parent;if(!a)return[];var n=e?[a.data[e]]:[a];return U.listPath(a,e).concat(n)},U.getPath=function(r){return U.listPath(r,"label").join("/")+"/"},U.formatValue=S.formatPieValue,U.formatPercent=function(r,e){var a=g.formatPercent(r,0);return a==="0%"&&(a=S.formatPiePercent(r,e)),a}},5621:function(G,U,t){G.exports={moduleType:"trace",name:"sunburst",basePlotModule:t(54904),categories:[],animatable:!0,attributes:t(424),layoutAttributes:t(84920),supplyDefaults:t(25244),supplyLayoutDefaults:t(28732),calc:t(3776).calc,crossTraceCalc:t(3776).crossTraceCalc,plot:t(96488).plot,style:t(85676).style,colorbar:t(5528),meta:{}}},84920:function(G){G.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(G,U,t){var g=t(3400),C=t(84920);G.exports=function(S,x){function h(p,r){return g.coerce(S,x,C,p,r)}h("sunburstcolorway",x.colorway),h("extendsunburstcolors")}},96488:function(G,U,t){var g=t(33428),C=t(74148),i=t(67756).qy,S=t(43616),x=t(3400),h=t(72736),p=t(82744),r=p.recordMinTextSize,e=p.clearMinTextSize,a=t(37820),n=t(69656).getRotationAngle,f=a.computeTransform,c=a.transformInsideText,l=t(85676).styleOne,m=t(60100).resizeText,v=t(45716),b=t(27328),u=t(78176);U.plot=function(y,E,T,s){var L=y._fullLayout,M=L._sunburstlayer,z,D,N=!T,I=!L.uniformtext.mode&&u.hasTransition(T);if(e("sunburst",L),z=M.selectAll("g.trace.sunburst").data(E,function(B){return B[0].trace.uid}),z.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),z.order(),I){s&&(D=s());var k=g.transition().duration(T.duration).ease(T.easing).each("end",function(){D&&D()}).each("interrupt",function(){D&&D()});k.each(function(){M.selectAll("g.trace").each(function(B){o(y,B,this,T)})})}else z.each(function(B){o(y,B,this,T)}),L.uniformtext.mode&&m(y,L._sunburstlayer.selectAll(".trace"),"sunburst");N&&z.exit().remove()};function o(y,E,T,s){var L=y._context.staticPlot,M=y._fullLayout,z=!M.uniformtext.mode&&u.hasTransition(s),D=g.select(T),N=D.selectAll("g.slice"),I=E[0],k=I.trace,B=I.hierarchy,O=u.findEntryWithLevel(B,k.level),H=u.getMaxDepth(k),Y=M._size,j=k.domain,et=Y.w*(j.x[1]-j.x[0]),it=Y.h*(j.y[1]-j.y[0]),ut=.5*Math.min(et,it),J=I.cx=Y.l+Y.w*(j.x[1]+j.x[0])/2,X=I.cy=Y.t+Y.h*(1-j.y[0])-it/2;if(!O)return N.remove();var tt=null,V={};z&&N.each(function(Vt){V[u.getPtId(Vt)]={rpx0:Vt.rpx0,rpx1:Vt.rpx1,x0:Vt.x0,x1:Vt.x1,transform:Vt.transform},!tt&&u.isEntry(Vt)&&(tt=Vt)});var Q=d(O).descendants(),ot=O.height+1,$=0,Z=H;I.hasMultipleRoots&&u.isHierarchyRoot(O)&&(Q=Q.slice(1),ot-=1,$=1,Z+=1),Q=Q.filter(function(Vt){return Vt.y1<=Z});var st=n(k.rotation);st&&Q.forEach(function(Vt){Vt.x0+=st,Vt.x1+=st});var nt=Math.min(ot,H),ct=function(Vt){return(Vt-$)/nt*ut},gt=function(Vt,It){return[Vt*Math.cos(It),-Vt*Math.sin(It)]},Tt=function(Vt){return x.pathAnnulus(Vt.rpx0,Vt.rpx1,Vt.x0,Vt.x1,J,X)},wt=function(Vt){return J+A(Vt)[0]*(Vt.transform.rCenter||0)+(Vt.transform.x||0)},Rt=function(Vt){return X+A(Vt)[1]*(Vt.transform.rCenter||0)+(Vt.transform.y||0)};N=N.data(Q,u.getPtId),N.enter().append("g").classed("slice",!0),z?N.exit().transition().each(function(){var Vt=g.select(this),It=Vt.select("path.surface");It.transition().attrTween("d",function(Kt){var $t=Lt(Kt);return function(le){return Tt($t(le))}});var re=Vt.select("g.slicetext");re.attr("opacity",0)}).remove():N.exit().remove(),N.order();var bt=null;if(z&&tt){var At=u.getPtId(tt);N.each(function(Vt){bt===null&&u.getPtId(Vt)===At&&(bt=Vt.x1)})}var mt=N;z&&(mt=mt.transition().each("end",function(){var Vt=g.select(this);u.setSliceCursor(Vt,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),mt.each(function(Vt){var It=g.select(this),re=x.ensureSingle(It,"path","surface",function(xe){xe.style("pointer-events",L?"none":"all")});Vt.rpx0=ct(Vt.y0),Vt.rpx1=ct(Vt.y1),Vt.xmid=(Vt.x0+Vt.x1)/2,Vt.pxmid=gt(Vt.rpx1,Vt.xmid),Vt.midangle=-(Vt.xmid-Math.PI/2),Vt.startangle=-(Vt.x0-Math.PI/2),Vt.stopangle=-(Vt.x1-Math.PI/2),Vt.halfangle=.5*Math.min(x.angleDelta(Vt.x0,Vt.x1)||Math.PI,Math.PI),Vt.ring=1-Vt.rpx0/Vt.rpx1,Vt.rInscribed=w(Vt),z?re.transition().attrTween("d",function(xe){var Se=Ht(xe);return function(ne){return Tt(Se(ne))}}):re.attr("d",Tt),It.call(v,O,y,E,{eventDataKeys:b.eventDataKeys,transitionTime:b.CLICK_TRANSITION_TIME,transitionEasing:b.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:y._transitioning}),re.call(l,Vt,k,y);var Kt=x.ensureSingle(It,"g","slicetext"),$t=x.ensureSingle(Kt,"text","",function(xe){xe.attr("data-notex",1)}),le=x.ensureUniformFontSize(y,u.determineTextFont(k,Vt,M.font));$t.text(U.formatSliceLabel(Vt,O,k,E,M)).classed("slicetext",!0).attr("text-anchor","middle").call(S.font,le).call(h.convertToTspans,y);var he=S.bBox($t.node());Vt.transform=c(he,Vt,I),Vt.transform.targetX=wt(Vt),Vt.transform.targetY=Rt(Vt);var de=function(xe,Se){var ne=xe.transform;return f(ne,Se),ne.fontSize=le.size,r(k.type,ne,M),x.getTextTransform(ne)};z?$t.transition().attrTween("transform",function(xe){var Se=Ut(xe);return function(ne){return de(Se(ne),he)}}):$t.attr("transform",de(Vt,he))});function Lt(Vt){var It=u.getPtId(Vt),re=V[It],Kt=V[u.getPtId(O)],$t;if(Kt){var le=(Vt.x1>Kt.x1?2*Math.PI:0)+st;$t=Vt.rpx1bt?2*Math.PI:0)+st;re={x0:$t,x1:$t}}else re={rpx0:ut,rpx1:ut},x.extendFlat(re,kt(Vt));else re={rpx0:0,rpx1:0};else re={x0:st,x1:st};return i(re,Kt)}function Ut(Vt){var It=V[u.getPtId(Vt)],re,Kt=Vt.transform;if(It)re=It;else if(re={rpx1:Vt.rpx1,transform:{textPosAngle:Kt.textPosAngle,scale:0,rotate:Kt.rotate,rCenter:Kt.rCenter,x:Kt.x,y:Kt.y}},tt)if(Vt.parent)if(bt){var $t=Vt.x1>bt?2*Math.PI:0;re.x0=re.x1=$t}else x.extendFlat(re,kt(Vt));else re.x0=re.x1=st;else re.x0=re.x1=st;var le=i(re.transform.textPosAngle,Vt.transform.textPosAngle),he=i(re.rpx1,Vt.rpx1),de=i(re.x0,Vt.x0),xe=i(re.x1,Vt.x1),Se=i(re.transform.scale,Kt.scale),ne=i(re.transform.rotate,Kt.rotate),zt=Kt.rCenter===0?3:re.transform.rCenter===0?1/3:1,Xt=i(re.transform.rCenter,Kt.rCenter),Jt=function(Wt){return Xt(Math.pow(Wt,zt))};return function(Wt){var Ft=he(Wt),xt=de(Wt),yt=xe(Wt),Et=Jt(Wt),Mt=gt(Ft,(xt+yt)/2),Nt=le(Wt),jt={pxmid:Mt,rpx1:Ft,transform:{textPosAngle:Nt,rCenter:Et,x:Kt.x,y:Kt.y}};return r(k.type,Kt,M),{transform:{targetX:wt(jt),targetY:Rt(jt),scale:Se(Wt),rotate:ne(Wt),rCenter:Et}}}}function kt(Vt){var It=Vt.parent,re=V[u.getPtId(It)],Kt={};if(re){var $t=It.children,le=$t.indexOf(Vt),he=$t.length,de=i(re.x0,re.x1);Kt.x0=de(le/he),Kt.x1=de(le/he)}else Kt.x0=Kt.x1=0;return Kt}}function d(y){return C.partition().size([2*Math.PI,y.height+1])(y)}U.formatSliceLabel=function(y,E,T,s,L){var M=T.texttemplate,z=T.textinfo;if(!M&&(!z||z==="none"))return"";var D=L.separators,N=s[0],I=y.data.data,k=N.hierarchy,B=u.isHierarchyRoot(y),O=u.getParent(k,y),H=u.getValue(y);if(!M){var Y=z.split("+"),j=function($){return Y.indexOf($)!==-1},et=[],it;if(j("label")&&I.label&&et.push(I.label),I.hasOwnProperty("v")&&j("value")&&et.push(u.formatValue(I.v,D)),!B){j("current path")&&et.push(u.getPath(y.data));var ut=0;j("percent parent")&&ut++,j("percent entry")&&ut++,j("percent root")&&ut++;var J=ut>1;if(ut){var X,tt=function($){it=u.formatPercent(X,D),J&&(it+=" of "+$),et.push(it)};j("percent parent")&&!B&&(X=H/u.getValue(O),tt("parent")),j("percent entry")&&(X=H/u.getValue(E),tt("entry")),j("percent root")&&(X=H/u.getValue(k),tt("root"))}}return j("text")&&(it=x.castOption(T,I.i,"text"),x.isValidTextValue(it)&&et.push(it)),et.join("
    ")}var V=x.castOption(T,I.i,"texttemplate");if(!V)return"";var Q={};I.label&&(Q.label=I.label),I.hasOwnProperty("v")&&(Q.value=I.v,Q.valueLabel=u.formatValue(I.v,D)),Q.currentPath=u.getPath(y.data),B||(Q.percentParent=H/u.getValue(O),Q.percentParentLabel=u.formatPercent(Q.percentParent,D),Q.parent=u.getPtLabel(O)),Q.percentEntry=H/u.getValue(E),Q.percentEntryLabel=u.formatPercent(Q.percentEntry,D),Q.entry=u.getPtLabel(E),Q.percentRoot=H/u.getValue(k),Q.percentRootLabel=u.formatPercent(Q.percentRoot,D),Q.root=u.getPtLabel(k),I.hasOwnProperty("color")&&(Q.color=I.color);var ot=x.castOption(T,I.i,"text");return(x.isValidTextValue(ot)||ot==="")&&(Q.text=ot),Q.customdata=x.castOption(T,I.i,"customdata"),x.texttemplateString(V,Q,L._d3locale,Q,T._meta||{})};function w(y){return y.rpx0===0&&x.isFullCircle([y.x0,y.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(y.halfangle)),y.ring/2))}function A(y){return _(y.rpx1,y.transform.textPosAngle)}function _(y,E){return[y*Math.sin(E),-y*Math.cos(E)]}},85676:function(G,U,t){var g=t(33428),C=t(76308),i=t(3400),S=t(82744).resizeText,x=t(60404);function h(r){var e=r._fullLayout._sunburstlayer.selectAll(".trace");S(r,e,"sunburst"),e.each(function(a){var n=g.select(this),f=a[0],c=f.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(l){g.select(this).call(p,l,c,r)})})}function p(r,e,a,n){var f=e.data.data,c=!e.children,l=f.i,m=i.castOption(a,l,"marker.line.color")||C.defaultLine,v=i.castOption(a,l,"marker.line.width")||0;r.call(x,e,a,n).style("stroke-width",v).call(C.stroke,m).style("opacity",c?a.leaf.opacity:null)}G.exports={style:h,styleOne:p}},16716:function(G,U,t){var g=t(76308),C=t(49084),i=t(29736).axisHoverFormat,S=t(21776).Ks,x=t(45464),h=t(92880).extendFlat,p=t(67824).overrideAll;function r(n){return{valType:"boolean",dflt:!1}}function e(n){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:r(),y:r(),z:r()},color:{valType:"color",dflt:g.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:g.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var a=G.exports=p(h({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},C("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:e(),y:e(),z:e()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:h({},C.zauto,{}),zmin:h({},C.zmin,{}),zmax:h({},C.zmax,{})},hoverinfo:h({},x.hoverinfo),showlegend:h({},x.showlegend,{dflt:!1})}),"calc","nested");a.x.editType=a.y.editType=a.z.editType="calc+clearAxisTypes",a.transforms=void 0},56576:function(G,U,t){var g=t(47128);G.exports=function(i,S){S.surfacecolor?g(i,S,{vals:S.surfacecolor,containerStr:"",cLetter:"c"}):g(i,S,{vals:S.z,containerStr:"",cLetter:"c"})}},79164:function(G,U,t){var g=t(67792).gl_surface3d,C=t(67792).ndarray,i=t(67792).ndarray_linear_interpolate.d2,S=t(70448),x=t(11240),h=t(3400).isArrayOrTypedArray,p=t(33040).parseColorScale,r=t(43080),e=t(8932).extractOpts;function a(s,L,M){this.scene=s,this.uid=M,this.surface=L,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var n=a.prototype;n.getXat=function(s,L,M,z){var D=h(this.data.x)?h(this.data.x[0])?this.data.x[L][s]:this.data.x[s]:s;return M===void 0?D:z.d2l(D,0,M)},n.getYat=function(s,L,M,z){var D=h(this.data.y)?h(this.data.y[0])?this.data.y[L][s]:this.data.y[L]:L;return M===void 0?D:z.d2l(D,0,M)},n.getZat=function(s,L,M,z){var D=this.data.z[L][s];return D===null&&this.data.connectgaps&&this.data._interpolatedZ&&(D=this.data._interpolatedZ[L][s]),M===void 0?D:z.d2l(D,0,M)},n.handlePick=function(s){if(s.object===this.surface){var L=(s.data.index[0]-1)/this.dataScaleX-1,M=(s.data.index[1]-1)/this.dataScaleY-1,z=Math.max(Math.min(Math.round(L),this.data.z[0].length-1),0),D=Math.max(Math.min(Math.round(M),this.data._ylength-1),0);s.index=[z,D],s.traceCoordinate=[this.getXat(z,D),this.getYat(z,D),this.getZat(z,D)],s.dataCoordinate=[this.getXat(z,D,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(z,D,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(z,D,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var N=0;N<3;N++){var I=s.dataCoordinate[N];I!=null&&(s.dataCoordinate[N]*=this.scene.dataScale[N])}var k=this.data.hovertext||this.data.text;return h(k)&&k[D]&&k[D][z]!==void 0?s.textLabel=k[D][z]:k?s.textLabel=k:s.textLabel="",s.data.dataCoordinate=s.dataCoordinate.slice(),this.surface.highlight(s.data),this.scene.glplot.spikes.position=s.dataCoordinate,!0}};function f(s){var L=s[0].rgb,M=s[s.length-1].rgb;return L[0]===M[0]&&L[1]===M[1]&&L[2]===M[2]&&L[3]===M[3]}var c=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function l(s,L){if(s0){M=c[z];break}return M}function b(s,L){if(!(s<1||L<1)){for(var M=m(s),z=m(L),D=1,N=0;Nw;)z--,z/=v(z),z++,z1?D:1};function A(s,L,M){var z=M[8]+M[2]*L[0]+M[5]*L[1];return s[0]=(M[6]+M[0]*L[0]+M[3]*L[1])/z,s[1]=(M[7]+M[1]*L[0]+M[4]*L[1])/z,s}function _(s,L,M){return y(s,L,A,M),s}function y(s,L,M,z){for(var D=[0,0],N=s.shape[0],I=s.shape[1],k=0;k0&&this.contourStart[z]!==null&&this.contourEnd[z]!==null&&this.contourEnd[z]>this.contourStart[z]))for(L[z]=!0,D=this.contourStart[z];Dj&&(this.minValues[O]=j),this.maxValues[O]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},55992:function(G,U,t){var g=t(23536),C=t(92880).extendFlat,i=t(38248),S=t(38116).isTypedArray,x=t(38116).isArrayOrTypedArray;G.exports=function(m,v){var b=r(v.cells.values),u=function(j){return j.slice(v.header.values.length,j.length)},o=r(v.header.values);o.length&&!o[0].length&&(o[0]=[""],o=r(o));var d=o.concat(u(b).map(function(){return e((o[0]||[""]).length)})),w=v.domain,A=Math.floor(m._fullLayout._size.w*(w.x[1]-w.x[0])),_=Math.floor(m._fullLayout._size.h*(w.y[1]-w.y[0])),y=v.header.values.length?d[0].map(function(){return v.header.height}):[g.emptyHeaderHeight],E=b.length?b[0].map(function(){return v.cells.height}):[],T=y.reduce(p,0),s=_-T,L=s+g.uplift,M=f(E,L),z=f(y,T),D=n(z,[]),N=n(M,D),I={},k=v._fullInput.columnorder;x(k)&&(k=Array.from(k)),k=k.concat(u(b.map(function(j,et){return et})));var B=d.map(function(j,et){var it=x(v.columnwidth)?v.columnwidth[Math.min(et,v.columnwidth.length-1)]:v.columnwidth;return i(it)?Number(it):1}),O=B.reduce(p,0);B=B.map(function(j){return j/O*A});var H=Math.max(h(v.header.line.width),h(v.cells.line.width)),Y={key:v.uid+m._context.staticPlot,translateX:w.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-w.y[1]),size:m._fullLayout._size,width:A,maxLineWidth:H,height:_,columnOrder:k,groupHeight:_,rowBlocks:N,headerRowBlocks:D,scrollY:0,cells:C({},v.cells,{values:b}),headerCells:C({},v.header,{values:d}),gdColumns:d.map(function(j){return j[0]}),gdColumnsOriginalOrder:d.map(function(j){return j[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:d.map(function(j,et){var it=I[j];I[j]=(it||0)+1;var ut=j+"__"+I[j];return{key:ut,label:j,specIndex:et,xIndex:k[et],xScale:a,x:void 0,calcdata:void 0,columnWidth:B[et]}})};return Y.columns.forEach(function(j){j.calcdata=Y,j.x=a(j)}),Y};function h(l){if(x(l)){for(var m=0,v=0;v=m||_===l.length-1)&&(v[u]=d,d.key=A++,d.firstRowIndex=w,d.lastRowIndex=_,d=c(),u+=o,w=_+1,o=0);return v}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}},53056:function(G,U,t){var g=t(92880).extendFlat;U.splitToPanels=function(i){var S=[0,0],x=g({},i,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:i.calcdata.headerCells.values[i.specIndex],rowBlocks:i.calcdata.headerRowBlocks,calcdata:g({},i.calcdata,{cells:i.calcdata.headerCells})}),h=g({},i,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks}),p=g({},i,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks});return[h,p,x]},U.splitToCells=function(i){var S=C(i);return(i.values||[]).slice(S[0],S[1]).map(function(x,h){var p=typeof x=="string"&&x.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:h+p,key:S[0]+h,column:i,calcdata:i.calcdata,page:i.page,rowBlocks:i.rowBlocks,value:x}})};function C(i){var S=i.rowBlocks[i.page],x=S?S.rows[0].rowIndex:0,h=S?x+S.rows.length:0;return[x,h]}},53212:function(G,U,t){var g=t(3400),C=t(60520),i=t(86968).Q;function S(x,h){for(var p=x.columnorder||[],r=x.header.values.length,e=p.slice(0,r),a=e.slice().sort(function(c,l){return c-l}),n=e.map(function(c){return a.indexOf(c)}),f=n.length;f/i),mt=!bt||At;gt.mayHaveMarkup=bt&&Rt.match(/[<&>]/);var Lt=M(Rt);gt.latex=Lt;var Ht=Lt?"":N(gt.calcdata.cells.prefix,Tt,wt)||"",Ut=Lt?"":N(gt.calcdata.cells.suffix,Tt,wt)||"",kt=Lt?null:N(gt.calcdata.cells.format,Tt,wt)||null,Vt=Ht+(kt?S(kt)(gt.value):gt.value)+Ut,It;gt.wrappingNeeded=!gt.wrapped&&!mt&&!Lt&&(It=z(Vt)),gt.cellHeightMayIncrease=At||Lt||gt.mayHaveMarkup||(It===void 0?z(Vt):It),gt.needsConvertToTspans=gt.mayHaveMarkup||gt.wrappingNeeded||gt.latex;var re;if(gt.wrappingNeeded){var Kt=g.wrapSplitCharacter===" "?Vt.replace(/
    gt&&ct.push(Tt),gt+=bt}return ct}function Y(Z,st,nt){var ct=b(st)[0];if(ct!==void 0){var gt=ct.rowBlocks,Tt=ct.calcdata,wt=tt(gt,gt.length),Rt=ct.calcdata.groupHeight-O(ct),bt=Tt.scrollY=Math.max(0,Math.min(wt-Rt,Tt.scrollY)),At=H(gt,bt,Rt);At.length===1&&(At[0]===gt.length-1?At.unshift(At[0]-1):At.push(At[0]+1)),At[0]%2&&At.reverse(),st.each(function(mt,Lt){mt.page=At[Lt],mt.scrollY=bt}),st.attr("transform",function(mt){var Lt=tt(mt.rowBlocks,mt.page)-mt.scrollY;return e(0,Lt)}),Z&&(et(Z,nt,st,At,ct.prevPages,ct,0),et(Z,nt,st,At,ct.prevPages,ct,1),u(nt,Z))}}function j(Z,st,nt,ct){return function(Tt){var wt=Tt.calcdata?Tt.calcdata:Tt,Rt=st.filter(function(Lt){return wt.key===Lt.key}),bt=nt||wt.scrollbarState.dragMultiplier,At=wt.scrollY;wt.scrollY=ct===void 0?wt.scrollY+bt*C.event.dy:ct;var mt=Rt.selectAll("."+g.cn.yColumn).selectAll("."+g.cn.columnBlock).filter(k);return Y(Z,mt,Rt),wt.scrollY===At}}function et(Z,st,nt,ct,gt,Tt,wt){var Rt=ct[wt]!==gt[wt];Rt&&(clearTimeout(Tt.currentRepaint[wt]),Tt.currentRepaint[wt]=setTimeout(function(){var bt=nt.filter(function(At,mt){return mt===wt&&ct[mt]!==gt[mt]});o(Z,st,bt,nt),gt[wt]=ct[wt]}))}function it(Z,st,nt,ct){return function(){var Tt=C.select(st.parentNode);Tt.each(function(wt){var Rt=wt.fragments;Tt.selectAll("tspan.line").each(function(Vt,It){Rt[It].width=this.getComputedTextLength()});var bt=Rt[Rt.length-1].width,At=Rt.slice(0,-1),mt=[],Lt,Ht,Ut=0,kt=wt.column.columnWidth-2*g.cellPad;for(wt.value="";At.length;)Lt=At.shift(),Ht=Lt.width+bt,Ut+Ht>kt&&(wt.value+=mt.join(g.wrapSpacer)+g.lineBreaker,mt=[],Ut=0),mt.push(Lt.text),Ut+=Ht;Ut&&(wt.value+=mt.join(g.wrapSpacer)),wt.wrapped=!0}),Tt.selectAll("tspan.line").remove(),L(Tt.select("."+g.cn.cellText),nt,Z,ct),C.select(st.parentNode.parentNode).call(X)}}function ut(Z,st,nt,ct,gt){return function(){if(!gt.settledY){var wt=C.select(st.parentNode),Rt=ot(gt),bt=gt.key-Rt.firstRowIndex,At=Rt.rows[bt].rowHeight,mt=gt.cellHeightMayIncrease?st.parentNode.getBoundingClientRect().height+2*g.cellPad:At,Lt=Math.max(mt,At),Ht=Lt-Rt.rows[bt].rowHeight;Ht&&(Rt.rows[bt].rowHeight=Lt,Z.selectAll("."+g.cn.columnCell).call(X),Y(null,Z.filter(k),0),u(nt,ct,!0)),wt.attr("transform",function(){var Ut=this,kt=Ut.parentNode,Vt=kt.getBoundingClientRect(),It=C.select(Ut.parentNode).select("."+g.cn.cellRect).node().getBoundingClientRect(),re=Ut.transform.baseVal.consolidate(),Kt=It.top-Vt.top+(re?re.matrix.f:g.cellPad);return e(J(gt,C.select(Ut.parentNode).select("."+g.cn.cellTextHolder).node().getBoundingClientRect().width),Kt)}),gt.settledY=!0}}}function J(Z,st){switch(Z.align){case"left":return g.cellPad;case"right":return Z.column.columnWidth-(st||0)-g.cellPad;case"center":return(Z.column.columnWidth-(st||0))/2;default:return g.cellPad}}function X(Z){Z.attr("transform",function(st){var nt=st.rowBlocks[0].auxiliaryBlocks.reduce(function(wt,Rt){return wt+V(Rt,1/0)},0),ct=ot(st),gt=V(ct,st.key),Tt=gt+nt;return e(0,Tt)}).selectAll("."+g.cn.cellRect).attr("height",function(st){return $(ot(st),st.key).rowHeight})}function tt(Z,st){for(var nt=0,ct=st-1;ct>=0;ct--)nt+=Q(Z[ct]);return nt}function V(Z,st){for(var nt=0,ct=0;ct","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},x.textfont,{}),editType:"calc"},text:x.text,textinfo:h.textinfo,texttemplate:C({editType:"plot"},{keys:p.eventDataKeys.concat(["label","value"])}),hovertext:x.hovertext,hoverinfo:h.hoverinfo,hovertemplate:g({},{keys:p.eventDataKeys}),textfont:x.textfont,insidetextfont:x.insidetextfont,outsidetextfont:r({},x.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:x.sort,root:h.root,domain:S({name:"treemap",trace:!0,editType:"calc"})}},79516:function(G,U,t){var g=t(7316);U.name="treemap",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},97840:function(G,U,t){var g=t(3776);U.r=function(C,i){return g.calc(C,i)},U.q=function(C){return g._runCrossTraceCalc("treemap",C)}},32984:function(G){G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(G,U,t){var g=t(3400),C=t(40516),i=t(76308),S=t(86968).Q,x=t(31508).handleText,h=t(78048).TEXTPAD,p=t(74174).handleMarkerDefaults,r=t(8932),e=r.hasColorscale,a=r.handleDefaults;G.exports=function(f,c,l,m){function v(s,L){return g.coerce(f,c,C,s,L)}var b=v("labels"),u=v("parents");if(!b||!b.length||!u||!u.length){c.visible=!1;return}var o=v("values");o&&o.length?v("branchvalues"):v("count"),v("level"),v("maxdepth");var d=v("tiling.packing");d==="squarify"&&v("tiling.squarifyratio"),v("tiling.flip"),v("tiling.pad");var w=v("text");v("texttemplate"),c.texttemplate||v("textinfo",g.isArrayOrTypedArray(w)?"text+label":"label"),v("hovertext"),v("hovertemplate");var A=v("pathbar.visible"),_="auto";x(f,c,m,v,_,{hasPathbar:A,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition");var y=c.textposition.indexOf("bottom")!==-1;p(f,c,m,v);var E=c._hasColorscale=e(f,"marker","colors")||(f.marker||{}).coloraxis;E?a(f,c,m,v,{prefix:"marker.",cLetter:"c"}):v("marker.depthfade",!(c.marker.colors||[]).length);var T=c.textfont.size*2;v("marker.pad.t",y?T/4:T),v("marker.pad.l",T/4),v("marker.pad.r",T/4),v("marker.pad.b",y?T:T/4),v("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:i.contrast(m.paper_bgcolor)}}},A&&(v("pathbar.thickness",c.pathbar.textfont.size+2*h),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),S(c,m,v),c._length=null}},95808:function(G,U,t){var g=t(33428),C=t(78176),i=t(82744),S=i.clearMinTextSize,x=t(60100).resizeText,h=t(52960);G.exports=function(r,e,a,n,f){var c=f.type,l=f.drawDescendants,m=r._fullLayout,v=m["_"+c+"layer"],b,u,o=!a;if(S(c,m),b=v.selectAll("g.trace."+c).data(e,function(w){return w[0].trace.uid}),b.enter().append("g").classed("trace",!0).classed(c,!0),b.order(),!m.uniformtext.mode&&C.hasTransition(a)){n&&(u=n());var d=g.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});d.each(function(){v.selectAll("g.trace").each(function(w){h(r,w,this,a,l)})})}else b.each(function(w){h(r,w,this,a,l)}),m.uniformtext.mode&&x(r,v.selectAll(".trace"),c);o&&b.exit().remove()}},27336:function(G,U,t){var g=t(33428),C=t(3400),i=t(43616),S=t(72736),x=t(13832),h=t(66192).styleOne,p=t(32984),r=t(78176),e=t(45716),a=!0;G.exports=function(f,c,l,m,v){var b=v.barDifY,u=v.width,o=v.height,d=v.viewX,w=v.viewY,A=v.pathSlice,_=v.toMoveInsideSlice,y=v.strTransform,E=v.hasTransition,T=v.handleSlicesExit,s=v.makeUpdateSliceInterpolator,L=v.makeUpdateTextInterpolator,M={},z=f._context.staticPlot,D=f._fullLayout,N=c[0],I=N.trace,k=N.hierarchy,B=u/I._entryDepth,O=r.listPath(l.data,"id"),H=x(k.copy(),[u,o],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();H=H.filter(function(j){var et=O.indexOf(j.data.id);return et===-1?!1:(j.x0=B*et,j.x1=B*(et+1),j.y0=b,j.y1=b+o,j.onPathbar=!0,!0)}),H.reverse(),m=m.data(H,r.getPtId),m.enter().append("g").classed("pathbar",!0),T(m,a,M,[u,o],A),m.order();var Y=m;E&&(Y=Y.transition().each("end",function(){var j=g.select(this);r.setSliceCursor(j,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),Y.each(function(j){j._x0=d(j.x0),j._x1=d(j.x1),j._y0=w(j.y0),j._y1=w(j.y1),j._hoverX=d(j.x1-Math.min(u,o)/2),j._hoverY=w(j.y1-o/2);var et=g.select(this),it=C.ensureSingle(et,"path","surface",function(tt){tt.style("pointer-events",z?"none":"all")});E?it.transition().attrTween("d",function(tt){var V=s(tt,a,M,[u,o]);return function(Q){return A(V(Q))}}):it.attr("d",A),et.call(e,l,f,c,{styleOne:h,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:f._transitioning}),it.call(h,j,I,f,{hovered:!1}),j._text=(r.getPtLabel(j)||"").split("
    ").join(" ")||"";var ut=C.ensureSingle(et,"g","slicetext"),J=C.ensureSingle(ut,"text","",function(tt){tt.attr("data-notex",1)}),X=C.ensureUniformFontSize(f,r.determineTextFont(I,j,D.font,{onPathbar:!0}));J.text(j._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,X).call(S.convertToTspans,f),j.textBB=i.bBox(J.node()),j.transform=_(j,{fontSize:X.size,onPathbar:!0}),j.transform.fontSize=X.size,E?J.transition().attrTween("transform",function(tt){var V=L(tt,a,M,[u,o]);return function(Q){return y(V(Q))}}):J.attr("transform",y(j))})}},76477:function(G,U,t){var g=t(33428),C=t(3400),i=t(43616),S=t(72736),x=t(13832),h=t(66192).styleOne,p=t(32984),r=t(78176),e=t(45716),a=t(96488).formatSliceLabel,n=!1;G.exports=function(c,l,m,v,b){var u=b.width,o=b.height,d=b.viewX,w=b.viewY,A=b.pathSlice,_=b.toMoveInsideSlice,y=b.strTransform,E=b.hasTransition,T=b.handleSlicesExit,s=b.makeUpdateSliceInterpolator,L=b.makeUpdateTextInterpolator,M=b.prevEntry,z={},D=c._context.staticPlot,N=c._fullLayout,I=l[0],k=I.trace,B=k.textposition.indexOf("left")!==-1,O=k.textposition.indexOf("right")!==-1,H=k.textposition.indexOf("bottom")!==-1,Y=!H&&!k.marker.pad.t||H&&!k.marker.pad.b,j=x(m,[u,o],{packing:k.tiling.packing,squarifyratio:k.tiling.squarifyratio,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1,pad:{inner:k.tiling.pad,top:k.marker.pad.t,left:k.marker.pad.l,right:k.marker.pad.r,bottom:k.marker.pad.b}}),et=j.descendants(),it=1/0,ut=-1/0;et.forEach(function(Q){var ot=Q.depth;ot>=k._maxDepth?(Q.x0=Q.x1=(Q.x0+Q.x1)/2,Q.y0=Q.y1=(Q.y0+Q.y1)/2):(it=Math.min(it,ot),ut=Math.max(ut,ot))}),v=v.data(et,r.getPtId),k._maxVisibleLayers=isFinite(ut)?ut-it+1:0,v.enter().append("g").classed("slice",!0),T(v,n,z,[u,o],A),v.order();var J=null;if(E&&M){var X=r.getPtId(M);v.each(function(Q){J===null&&r.getPtId(Q)===X&&(J={x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1})})}var tt=function(){return J||{x0:0,x1:u,y0:0,y1:o}},V=v;return E&&(V=V.transition().each("end",function(){var Q=g.select(this);r.setSliceCursor(Q,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),V.each(function(Q){var ot=r.isHeader(Q,k);Q._x0=d(Q.x0),Q._x1=d(Q.x1),Q._y0=w(Q.y0),Q._y1=w(Q.y1),Q._hoverX=d(Q.x1-k.marker.pad.r),Q._hoverY=w(H?Q.y1-k.marker.pad.b/2:Q.y0+k.marker.pad.t/2);var $=g.select(this),Z=C.ensureSingle($,"path","surface",function(wt){wt.style("pointer-events",D?"none":"all")});E?Z.transition().attrTween("d",function(wt){var Rt=s(wt,n,tt(),[u,o]);return function(bt){return A(Rt(bt))}}):Z.attr("d",A),$.call(e,m,c,l,{styleOne:h,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),Z.call(h,Q,k,c,{hovered:!1}),Q.x0===Q.x1||Q.y0===Q.y1?Q._text="":ot?Q._text=Y?"":r.getPtLabel(Q)||"":Q._text=a(Q,m,k,l,N)||"";var st=C.ensureSingle($,"g","slicetext"),nt=C.ensureSingle(st,"text","",function(wt){wt.attr("data-notex",1)}),ct=C.ensureUniformFontSize(c,r.determineTextFont(k,Q,N.font)),gt=Q._text||" ",Tt=ot&>.indexOf("
    ")===-1;nt.text(gt).classed("slicetext",!0).attr("text-anchor",O?"end":B||Tt?"start":"middle").call(i.font,ct).call(S.convertToTspans,c),Q.textBB=i.bBox(nt.node()),Q.transform=_(Q,{fontSize:ct.size,isHeader:ot}),Q.transform.fontSize=ct.size,E?nt.transition().attrTween("transform",function(wt){var Rt=L(wt,n,tt(),[u,o]);return function(bt){return y(Rt(bt))}}):nt.attr("transform",y(Q))}),J}},83024:function(G){G.exports=function U(t,g,C){var i;C.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),C.flipX&&(i=t.x0,t.x0=g[0]-t.x1,t.x1=g[0]-i),C.flipY&&(i=t.y0,t.y0=g[1]-t.y1,t.y1=g[1]-i);var S=t.children;if(S)for(var x=0;x-1?O+j:-(Y+j):0,it={x0:H,x1:H,y0:et,y1:et+Y},ut=function(zt,Xt,Jt){var Wt=w.tiling.pad,Ft=function(Mt){return Mt-Wt<=Xt.x0},xt=function(Mt){return Mt+Wt>=Xt.x1},yt=function(Mt){return Mt-Wt<=Xt.y0},Et=function(Mt){return Mt+Wt>=Xt.y1};return zt.x0===Xt.x0&&zt.x1===Xt.x1&&zt.y0===Xt.y0&&zt.y1===Xt.y1?{x0:zt.x0,x1:zt.x1,y0:zt.y0,y1:zt.y1}:{x0:Ft(zt.x0-Wt)?0:xt(zt.x0-Wt)?Jt[0]:zt.x0,x1:Ft(zt.x1+Wt)?0:xt(zt.x1+Wt)?Jt[0]:zt.x1,y0:yt(zt.y0-Wt)?0:Et(zt.y0-Wt)?Jt[1]:zt.y0,y1:yt(zt.y1+Wt)?0:Et(zt.y1+Wt)?Jt[1]:zt.y1}},J=null,X={},tt={},V=null,Q=function(zt,Xt){return Xt?X[f(zt)]:tt[f(zt)]},ot=function(zt,Xt,Jt,Wt){if(Xt)return X[f(y)]||it;var Ft=tt[w.level]||Jt;return N(zt)?ut(zt,Ft,Wt):{}};d.hasMultipleRoots&&M&&D++,w._maxDepth=D,w._backgroundColor=o.paper_bgcolor,w._entryDepth=E.data.depth,w._atRootLevel=M;var $=-B/2+I.l+I.w*(k.x[1]+k.x[0])/2,Z=-O/2+I.t+I.h*(1-(k.y[1]+k.y[0])/2),st=function(zt){return $+zt},nt=function(zt){return Z+zt},ct=nt(0),gt=st(0),Tt=function(zt){return gt+zt},wt=function(zt){return ct+zt};function Rt(zt,Xt){return zt+","+Xt}var bt=Tt(0),At=function(zt){zt.x=Math.max(bt,zt.x)},mt=w.pathbar.edgeshape,Lt=function(zt){var Xt=Tt(Math.max(Math.min(zt.x0,zt.x0),0)),Jt=Tt(Math.min(Math.max(zt.x1,zt.x1),H)),Wt=wt(zt.y0),Ft=wt(zt.y1),xt=Y/2,yt={},Et={};yt.x=Xt,Et.x=Jt,yt.y=Et.y=(Wt+Ft)/2;var Mt={x:Xt,y:Wt},Nt={x:Jt,y:Wt},jt={x:Jt,y:Ft},ie={x:Xt,y:Ft};return mt===">"?(Mt.x-=xt,Nt.x-=xt,jt.x-=xt,ie.x-=xt):mt==="/"?(jt.x-=xt,ie.x-=xt,yt.x-=xt/2,Et.x-=xt/2):mt==="\\"?(Mt.x-=xt,Nt.x-=xt,yt.x-=xt/2,Et.x-=xt/2):mt==="<"&&(yt.x-=xt,Et.x-=xt),At(Mt),At(ie),At(yt),At(Nt),At(jt),At(Et),"M"+Rt(Mt.x,Mt.y)+"L"+Rt(Nt.x,Nt.y)+"L"+Rt(Et.x,Et.y)+"L"+Rt(jt.x,jt.y)+"L"+Rt(ie.x,ie.y)+"L"+Rt(yt.x,yt.y)+"Z"},Ht=w[_?"tiling":"marker"].pad,Ut=function(zt){return w.textposition.indexOf(zt)!==-1},kt=Ut("top"),Vt=Ut("left"),It=Ut("right"),re=Ut("bottom"),Kt=function(zt){var Xt=st(zt.x0),Jt=st(zt.x1),Wt=nt(zt.y0),Ft=nt(zt.y1),xt=Jt-Xt,yt=Ft-Wt;if(!xt||!yt)return"";var Et=w.marker.cornerradius||0,Mt=Math.min(Et,xt/2,yt/2);Mt&&zt.data&&zt.data.data&&zt.data.data.label&&(kt&&(Mt=Math.min(Mt,Ht.t)),Vt&&(Mt=Math.min(Mt,Ht.l)),It&&(Mt=Math.min(Mt,Ht.r)),re&&(Mt=Math.min(Mt,Ht.b)));var Nt=function(jt,ie){return Mt?"a"+Rt(Mt,Mt)+" 0 0 1 "+Rt(jt,ie):""};return"M"+Rt(Xt,Wt+Mt)+Nt(Mt,-Mt)+"L"+Rt(Jt-Mt,Wt)+Nt(Mt,Mt)+"L"+Rt(Jt,Ft-Mt)+Nt(-Mt,Mt)+"L"+Rt(Xt+Mt,Ft)+Nt(-Mt,-Mt)+"Z"},$t=function(zt,Xt){var Jt=zt.x0,Wt=zt.x1,Ft=zt.y0,xt=zt.y1,yt=zt.textBB,Et=kt||Xt.isHeader&&!re,Mt=Et?"start":re?"end":"middle",Nt=Ut("right"),jt=Ut("left")||Xt.onPathbar,ie=jt?-1:Nt?1:0;if(Xt.isHeader){if(Jt+=(_?Ht:Ht.l)-x,Wt-=(_?Ht:Ht.r)-x,Jt>=Wt){var me=(Jt+Wt)/2;Jt=me,Wt=me}var be;re?(be=xt-(_?Ht:Ht.b),Ft0)for(var T=0;T0){var A=p.xa,_=p.ya,y,E,T,s,L;l.orientation==="h"?(L=r,y="y",T=_,E="x",s=A):(L=e,y="x",T=A,E="y",s=_);var M=c[p.index];if(L>=M.span[0]&&L<=M.span[1]){var z=C.extendFlat({},p),D=s.c2p(L,!0),N=x.getKdeValue(M,l,L),I=x.getPositionOnKdePath(M,l,D),k=T._offset,B=T._length;z[y+"0"]=I[0],z[y+"1"]=I[1],z[E+"0"]=z[E+"1"]=D,z[E+"Label"]=E+": "+i.hoverLabelText(s,L,l[E+"hoverformat"])+", "+c[0].t.labels.kde+" "+N.toFixed(3);for(var O=0,H=0;H")),c.color=h(m,w),[c]};function h(p,r){var e=p[r.dir].marker,a=e.color,n=e.line.color,f=e.line.width;if(C(a))return a;if(C(n)&&f)return n}},95952:function(G,U,t){G.exports={attributes:t(65776),layoutAttributes:t(91352),supplyDefaults:t(24224).supplyDefaults,crossTraceDefaults:t(24224).crossTraceDefaults,supplyLayoutDefaults:t(59464),calc:t(73540),crossTraceCalc:t(50152),plot:t(64488),style:t(12252).style,hoverPoints:t(94196),eventData:t(53256),selectPoints:t(45784),moduleType:"trace",name:"waterfall",basePlotModule:t(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(G){G.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},59464:function(G,U,t){var g=t(3400),C=t(91352);G.exports=function(i,S,x){var h=!1;function p(a,n){return g.coerce(i,S,C,a,n)}for(var r=0;r0&&(o?L+="M"+T[0]+","+s[1]+"V"+s[0]:L+="M"+T[1]+","+s[0]+"H"+T[0]),d!=="between"&&(_.isSum||y path").each(function(v){if(!v.isBlank){var b=m[v.dir].marker;g.select(this).call(i.fill,b.color).call(i.stroke,b.line.color).call(C.dashLine,b.line.dash,b.line.width).style("opacity",m.selectedpoints&&!v.selected?S:1)}}),p(l,m,e),l.selectAll(".lines").each(function(){var v=m.connector.line;C.lineGroupStyle(g.select(this).selectAll("path"),v.width,v.color,v.dash)})})}G.exports={style:r}},84224:function(G,U,t){var g=t(54460),C=t(3400),i=t(73060),S=t(60468).W,x=t(39032).BADNUM;U.moduleType="transform",U.name="aggregate";var h=U.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},p=h.aggregations;U.supplyDefaults=function(c,l){var m={},v;function b(M,z){return C.coerce(c,m,h,M,z)}var u=b("enabled");if(!u)return m;var o=i.findArrayAttributes(l),d={};for(v=0;vw&&(w=E,A=y)}}return w?b(A):x};case"rms":return function(u,o){for(var d=0,w=0,A=0;A":return function(d){return u(d)>o};case">=":return function(d){return u(d)>=o};case"[]":return function(d){var w=u(d);return w>=o[0]&&w<=o[1]};case"()":return function(d){var w=u(d);return w>o[0]&&w=o[0]&&wo[0]&&w<=o[1]};case"][":return function(d){var w=u(d);return w<=o[0]||w>=o[1]};case")(":return function(d){var w=u(d);return wo[1]};case"](":return function(d){var w=u(d);return w<=o[0]||w>o[1]};case")[":return function(d){var w=u(d);return w=o[1]};case"{}":return function(d){return o.indexOf(u(d))!==-1};case"}{":return function(d){return o.indexOf(u(d))===-1}}}},32028:function(G,U,t){var g=t(3400),C=t(73060),i=t(7316),S=t(60468).W;U.moduleType="transform",U.name="groupby",U.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},U.supplyDefaults=function(h,p,r){var e,a={};function n(b,u){return g.coerce(h,a,U.attributes,b,u)}var f=n("enabled");if(!f)return a;n("groups"),n("nameformat",r._dataLength>1?"%{group} (%{trace})":"%{group}");var c=h.styles,l=a.styles=[];if(c)for(e=0;e * @license MIT -*/function e(xt,yt){if(!(xt instanceof yt))throw new TypeError("Cannot call a class as a function")}function a(xt,yt){for(var Et=0;Et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u(xt){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Et){return Et.__proto__||Object.getPrototypeOf(Et)},u(xt)}function o(xt){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(yt){return typeof yt}:function(yt){return yt&&typeof Symbol=="function"&&yt.constructor===Symbol&&yt!==Symbol.prototype?"symbol":typeof yt},o(xt)}var d=r(3910),w=r(3187),A=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;p.lW=T,p.h2=50;var _=2147483647;T.TYPED_ARRAY_SUPPORT=y(),!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function y(){try{var xt=new Uint8Array(1),yt={foo:function(){return 42}};return Object.setPrototypeOf(yt,Uint8Array.prototype),Object.setPrototypeOf(xt,yt),xt.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}}),Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function E(xt){if(xt>_)throw new RangeError('The value "'+xt+'" is invalid for option "size"');var yt=new Uint8Array(xt);return Object.setPrototypeOf(yt,T.prototype),yt}function T(xt,yt,Et){if(typeof xt=="number"){if(typeof yt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return z(xt)}return s(xt,yt,Et)}T.poolSize=8192;function s(xt,yt,Et){if(typeof xt=="string")return D(xt,yt);if(ArrayBuffer.isView(xt))return I(xt);if(xt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(xt));if(zt(xt,ArrayBuffer)||xt&&zt(xt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(zt(xt,SharedArrayBuffer)||xt&&zt(xt.buffer,SharedArrayBuffer)))return k(xt,yt,Et);if(typeof xt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Mt=xt.valueOf&&xt.valueOf();if(Mt!=null&&Mt!==xt)return T.from(Mt,yt,Et);var Nt=B(xt);if(Nt)return Nt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof xt[Symbol.toPrimitive]=="function")return T.from(xt[Symbol.toPrimitive]("string"),yt,Et);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(xt))}T.from=function(xt,yt,Et){return s(xt,yt,Et)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function L(xt){if(typeof xt!="number")throw new TypeError('"size" argument must be of type number');if(xt<0)throw new RangeError('The value "'+xt+'" is invalid for option "size"')}function M(xt,yt,Et){return L(xt),xt<=0?E(xt):yt!==void 0?typeof Et=="string"?E(xt).fill(yt,Et):E(xt).fill(yt):E(xt)}T.alloc=function(xt,yt,Et){return M(xt,yt,Et)};function z(xt){return L(xt),E(xt<0?0:O(xt)|0)}T.allocUnsafe=function(xt){return z(xt)},T.allocUnsafeSlow=function(xt){return z(xt)};function D(xt,yt){if((typeof yt!="string"||yt==="")&&(yt="utf8"),!T.isEncoding(yt))throw new TypeError("Unknown encoding: "+yt);var Et=H(xt,yt)|0,Mt=E(Et),Nt=Mt.write(xt,yt);return Nt!==Et&&(Mt=Mt.slice(0,Nt)),Mt}function N(xt){for(var yt=xt.length<0?0:O(xt.length)|0,Et=E(yt),Mt=0;Mt=_)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_.toString(16)+" bytes");return xt|0}T.isBuffer=function(yt){return yt!=null&&yt._isBuffer===!0&&yt!==T.prototype},T.compare=function(yt,Et){if(zt(yt,Uint8Array)&&(yt=T.from(yt,yt.offset,yt.byteLength)),zt(Et,Uint8Array)&&(Et=T.from(Et,Et.offset,Et.byteLength)),!T.isBuffer(yt)||!T.isBuffer(Et))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(yt===Et)return 0;for(var Mt=yt.length,Nt=Et.length,jt=0,ie=Math.min(Mt,Nt);jtNt.length?(T.isBuffer(ie)||(ie=T.from(ie)),ie.copy(Nt,jt)):Uint8Array.prototype.set.call(Nt,ie,jt);else if(T.isBuffer(ie))ie.copy(Nt,jt);else throw new TypeError('"list" argument must be an Array of Buffers');jt+=ie.length}return Nt};function H(xt,yt){if(T.isBuffer(xt))return xt.length;if(ArrayBuffer.isView(xt)||zt(xt,ArrayBuffer))return xt.byteLength;if(typeof xt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+o(xt));var Et=xt.length,Mt=arguments.length>2&&arguments[2]===!0;if(!Mt&&Et===0)return 0;for(var Nt=!1;;)switch(yt){case"ascii":case"latin1":case"binary":return Et;case"utf8":case"utf-8":return he(xt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et*2;case"hex":return Et>>>1;case"base64":return Se(xt).length;default:if(Nt)return Mt?-1:he(xt).length;yt=(""+yt).toLowerCase(),Nt=!0}}T.byteLength=H;function Y(xt,yt,Et){var Mt=!1;if((yt===void 0||yt<0)&&(yt=0),yt>this.length||((Et===void 0||Et>this.length)&&(Et=this.length),Et<=0)||(Et>>>=0,yt>>>=0,Et<=yt))return"";for(xt||(xt="utf8");;)switch(xt){case"hex":return ct(this,yt,Et);case"utf8":case"utf-8":return ot(this,yt,Et);case"ascii":return st(this,yt,Et);case"latin1":case"binary":return nt(this,yt,Et);case"base64":return Q(this,yt,Et);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,yt,Et);default:if(Mt)throw new TypeError("Unknown encoding: "+xt);xt=(xt+"").toLowerCase(),Mt=!0}}T.prototype._isBuffer=!0;function j(xt,yt,Et){var Mt=xt[yt];xt[yt]=xt[Et],xt[Et]=Mt}T.prototype.swap16=function(){var yt=this.length;if(yt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Et=0;EtEt&&(yt+=" ... "),""},A&&(T.prototype[A]=T.prototype.inspect),T.prototype.compare=function(yt,Et,Mt,Nt,jt){if(zt(yt,Uint8Array)&&(yt=T.from(yt,yt.offset,yt.byteLength)),!T.isBuffer(yt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+o(yt));if(Et===void 0&&(Et=0),Mt===void 0&&(Mt=yt?yt.length:0),Nt===void 0&&(Nt=0),jt===void 0&&(jt=this.length),Et<0||Mt>yt.length||Nt<0||jt>this.length)throw new RangeError("out of range index");if(Nt>=jt&&Et>=Mt)return 0;if(Nt>=jt)return-1;if(Et>=Mt)return 1;if(Et>>>=0,Mt>>>=0,Nt>>>=0,jt>>>=0,this===yt)return 0;for(var ie=jt-Nt,me=Mt-Et,be=Math.min(ie,me),ve=this.slice(Nt,jt),Le=yt.slice(Et,Mt),ce=0;ce2147483647?Et=2147483647:Et<-2147483648&&(Et=-2147483648),Et=+Et,Xt(Et)&&(Et=Nt?0:xt.length-1),Et<0&&(Et=xt.length+Et),Et>=xt.length){if(Nt)return-1;Et=xt.length-1}else if(Et<0)if(Nt)Et=0;else return-1;if(typeof yt=="string"&&(yt=T.from(yt,Mt)),T.isBuffer(yt))return yt.length===0?-1:it(xt,yt,Et,Mt,Nt);if(typeof yt=="number")return yt=yt&255,typeof Uint8Array.prototype.indexOf=="function"?Nt?Uint8Array.prototype.indexOf.call(xt,yt,Et):Uint8Array.prototype.lastIndexOf.call(xt,yt,Et):it(xt,[yt],Et,Mt,Nt);throw new TypeError("val must be string, number or Buffer")}function it(xt,yt,Et,Mt,Nt){var jt=1,ie=xt.length,me=yt.length;if(Mt!==void 0&&(Mt=String(Mt).toLowerCase(),Mt==="ucs2"||Mt==="ucs-2"||Mt==="utf16le"||Mt==="utf-16le")){if(xt.length<2||yt.length<2)return-1;jt=2,ie/=2,me/=2,Et/=2}function be(Be,ir){return jt===1?Be[ir]:Be.readUInt16BE(ir*jt)}var ve;if(Nt){var Le=-1;for(ve=Et;veie&&(Et=ie-me),ve=Et;ve>=0;ve--){for(var ce=!0,Te=0;TeNt&&(Mt=Nt)):Mt=Nt;var jt=yt.length;Mt>jt/2&&(Mt=jt/2);var ie;for(ie=0;ie>>0,isFinite(Mt)?(Mt=Mt>>>0,Nt===void 0&&(Nt="utf8")):(Nt=Mt,Mt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var jt=this.length-Et;if((Mt===void 0||Mt>jt)&&(Mt=jt),yt.length>0&&(Mt<0||Et<0)||Et>this.length)throw new RangeError("Attempt to write outside buffer bounds");Nt||(Nt="utf8");for(var ie=!1;;)switch(Nt){case"hex":return ut(this,yt,Et,Mt);case"utf8":case"utf-8":return J(this,yt,Et,Mt);case"ascii":case"latin1":case"binary":return X(this,yt,Et,Mt);case"base64":return tt(this,yt,Et,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,yt,Et,Mt);default:if(ie)throw new TypeError("Unknown encoding: "+Nt);Nt=(""+Nt).toLowerCase(),ie=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(xt,yt,Et){return yt===0&&Et===xt.length?d.fromByteArray(xt):d.fromByteArray(xt.slice(yt,Et))}function ot(xt,yt,Et){Et=Math.min(xt.length,Et);for(var Mt=[],Nt=yt;Nt239?4:jt>223?3:jt>191?2:1;if(Nt+me<=Et){var be=void 0,ve=void 0,Le=void 0,ce=void 0;switch(me){case 1:jt<128&&(ie=jt);break;case 2:be=xt[Nt+1],(be&192)===128&&(ce=(jt&31)<<6|be&63,ce>127&&(ie=ce));break;case 3:be=xt[Nt+1],ve=xt[Nt+2],(be&192)===128&&(ve&192)===128&&(ce=(jt&15)<<12|(be&63)<<6|ve&63,ce>2047&&(ce<55296||ce>57343)&&(ie=ce));break;case 4:be=xt[Nt+1],ve=xt[Nt+2],Le=xt[Nt+3],(be&192)===128&&(ve&192)===128&&(Le&192)===128&&(ce=(jt&15)<<18|(be&63)<<12|(ve&63)<<6|Le&63,ce>65535&&ce<1114112&&(ie=ce))}}ie===null?(ie=65533,me=1):ie>65535&&(ie-=65536,Mt.push(ie>>>10&1023|55296),ie=56320|ie&1023),Mt.push(ie),Nt+=me}return Z(Mt)}var $=4096;function Z(xt){var yt=xt.length;if(yt<=$)return String.fromCharCode.apply(String,xt);for(var Et="",Mt=0;MtMt)&&(Et=Mt);for(var Nt="",jt=yt;jtMt&&(yt=Mt),Et<0?(Et+=Mt,Et<0&&(Et=0)):Et>Mt&&(Et=Mt),EtEt)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(yt,Et,Mt){yt=yt>>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=this[yt],jt=1,ie=0;++ie>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=this[yt+--Et],jt=1;Et>0&&(jt*=256);)Nt+=this[yt+--Et]*jt;return Nt},T.prototype.readUint8=T.prototype.readUInt8=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,1,this.length),this[yt]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,2,this.length),this[yt]|this[yt+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,2,this.length),this[yt]<<8|this[yt+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),(this[yt]|this[yt+1]<<8|this[yt+2]<<16)+this[yt+3]*16777216},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),this[yt]*16777216+(this[yt+1]<<16|this[yt+2]<<8|this[yt+3])},T.prototype.readBigUInt64LE=Wt(function(yt){yt=yt>>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=Et+this[++yt]*Math.pow(2,8)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,24),jt=this[++yt]+this[++yt]*Math.pow(2,8)+this[++yt]*Math.pow(2,16)+Mt*Math.pow(2,24);return BigInt(Nt)+(BigInt(jt)<>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=Et*Math.pow(2,24)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,8)+this[++yt],jt=this[++yt]*Math.pow(2,24)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,8)+Mt;return(BigInt(Nt)<>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=this[yt],jt=1,ie=0;++ie=jt&&(Nt-=Math.pow(2,8*Et)),Nt},T.prototype.readIntBE=function(yt,Et,Mt){yt=yt>>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=Et,jt=1,ie=this[yt+--Nt];Nt>0&&(jt*=256);)ie+=this[yt+--Nt]*jt;return jt*=128,ie>=jt&&(ie-=Math.pow(2,8*Et)),ie},T.prototype.readInt8=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,1,this.length),this[yt]&128?(255-this[yt]+1)*-1:this[yt]},T.prototype.readInt16LE=function(yt,Et){yt=yt>>>0,Et||Tt(yt,2,this.length);var Mt=this[yt]|this[yt+1]<<8;return Mt&32768?Mt|4294901760:Mt},T.prototype.readInt16BE=function(yt,Et){yt=yt>>>0,Et||Tt(yt,2,this.length);var Mt=this[yt+1]|this[yt]<<8;return Mt&32768?Mt|4294901760:Mt},T.prototype.readInt32LE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),this[yt]|this[yt+1]<<8|this[yt+2]<<16|this[yt+3]<<24},T.prototype.readInt32BE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),this[yt]<<24|this[yt+1]<<16|this[yt+2]<<8|this[yt+3]},T.prototype.readBigInt64LE=Wt(function(yt){yt=yt>>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=this[yt+4]+this[yt+5]*Math.pow(2,8)+this[yt+6]*Math.pow(2,16)+(Mt<<24);return(BigInt(Nt)<>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=(Et<<24)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,8)+this[++yt];return(BigInt(Nt)<>>0,Et||Tt(yt,4,this.length),w.read(this,yt,!0,23,4)},T.prototype.readFloatBE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),w.read(this,yt,!1,23,4)},T.prototype.readDoubleLE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,8,this.length),w.read(this,yt,!0,52,8)},T.prototype.readDoubleBE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,8,this.length),w.read(this,yt,!1,52,8)};function wt(xt,yt,Et,Mt,Nt,jt){if(!T.isBuffer(xt))throw new TypeError('"buffer" argument must be a Buffer instance');if(yt>Nt||ytxt.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(yt,Et,Mt,Nt){if(yt=+yt,Et=Et>>>0,Mt=Mt>>>0,!Nt){var jt=Math.pow(2,8*Mt)-1;wt(this,yt,Et,Mt,jt,0)}var ie=1,me=0;for(this[Et]=yt&255;++me>>0,Mt=Mt>>>0,!Nt){var jt=Math.pow(2,8*Mt)-1;wt(this,yt,Et,Mt,jt,0)}var ie=Mt-1,me=1;for(this[Et+ie]=yt&255;--ie>=0&&(me*=256);)this[Et+ie]=yt/me&255;return Et+Mt},T.prototype.writeUint8=T.prototype.writeUInt8=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,1,255,0),this[Et]=yt&255,Et+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,65535,0),this[Et]=yt&255,this[Et+1]=yt>>>8,Et+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,65535,0),this[Et]=yt>>>8,this[Et+1]=yt&255,Et+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,4294967295,0),this[Et+3]=yt>>>24,this[Et+2]=yt>>>16,this[Et+1]=yt>>>8,this[Et]=yt&255,Et+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,4294967295,0),this[Et]=yt>>>24,this[Et+1]=yt>>>16,this[Et+2]=yt>>>8,this[Et+3]=yt&255,Et+4};function Rt(xt,yt,Et,Mt,Nt){It(yt,Mt,Nt,xt,Et,7);var jt=Number(yt&BigInt(4294967295));xt[Et++]=jt,jt=jt>>8,xt[Et++]=jt,jt=jt>>8,xt[Et++]=jt,jt=jt>>8,xt[Et++]=jt;var ie=Number(yt>>BigInt(32)&BigInt(4294967295));return xt[Et++]=ie,ie=ie>>8,xt[Et++]=ie,ie=ie>>8,xt[Et++]=ie,ie=ie>>8,xt[Et++]=ie,Et}function bt(xt,yt,Et,Mt,Nt){It(yt,Mt,Nt,xt,Et,7);var jt=Number(yt&BigInt(4294967295));xt[Et+7]=jt,jt=jt>>8,xt[Et+6]=jt,jt=jt>>8,xt[Et+5]=jt,jt=jt>>8,xt[Et+4]=jt;var ie=Number(yt>>BigInt(32)&BigInt(4294967295));return xt[Et+3]=ie,ie=ie>>8,xt[Et+2]=ie,ie=ie>>8,xt[Et+1]=ie,ie=ie>>8,xt[Et]=ie,Et+8}T.prototype.writeBigUInt64LE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Rt(this,yt,Et,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return bt(this,yt,Et,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(yt,Et,Mt,Nt){if(yt=+yt,Et=Et>>>0,!Nt){var jt=Math.pow(2,8*Mt-1);wt(this,yt,Et,Mt,jt-1,-jt)}var ie=0,me=1,be=0;for(this[Et]=yt&255;++ie>0)-be&255;return Et+Mt},T.prototype.writeIntBE=function(yt,Et,Mt,Nt){if(yt=+yt,Et=Et>>>0,!Nt){var jt=Math.pow(2,8*Mt-1);wt(this,yt,Et,Mt,jt-1,-jt)}var ie=Mt-1,me=1,be=0;for(this[Et+ie]=yt&255;--ie>=0&&(me*=256);)yt<0&&be===0&&this[Et+ie+1]!==0&&(be=1),this[Et+ie]=(yt/me>>0)-be&255;return Et+Mt},T.prototype.writeInt8=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,1,127,-128),yt<0&&(yt=255+yt+1),this[Et]=yt&255,Et+1},T.prototype.writeInt16LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,32767,-32768),this[Et]=yt&255,this[Et+1]=yt>>>8,Et+2},T.prototype.writeInt16BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,32767,-32768),this[Et]=yt>>>8,this[Et+1]=yt&255,Et+2},T.prototype.writeInt32LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,2147483647,-2147483648),this[Et]=yt&255,this[Et+1]=yt>>>8,this[Et+2]=yt>>>16,this[Et+3]=yt>>>24,Et+4},T.prototype.writeInt32BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,2147483647,-2147483648),yt<0&&(yt=4294967295+yt+1),this[Et]=yt>>>24,this[Et+1]=yt>>>16,this[Et+2]=yt>>>8,this[Et+3]=yt&255,Et+4},T.prototype.writeBigInt64LE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Rt(this,yt,Et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return bt(this,yt,Et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function At(xt,yt,Et,Mt,Nt,jt){if(Et+Mt>xt.length)throw new RangeError("Index out of range");if(Et<0)throw new RangeError("Index out of range")}function mt(xt,yt,Et,Mt,Nt){return yt=+yt,Et=Et>>>0,Nt||At(xt,yt,Et,4),w.write(xt,yt,Et,Mt,23,4),Et+4}T.prototype.writeFloatLE=function(yt,Et,Mt){return mt(this,yt,Et,!0,Mt)},T.prototype.writeFloatBE=function(yt,Et,Mt){return mt(this,yt,Et,!1,Mt)};function Lt(xt,yt,Et,Mt,Nt){return yt=+yt,Et=Et>>>0,Nt||At(xt,yt,Et,8),w.write(xt,yt,Et,Mt,52,8),Et+8}T.prototype.writeDoubleLE=function(yt,Et,Mt){return Lt(this,yt,Et,!0,Mt)},T.prototype.writeDoubleBE=function(yt,Et,Mt){return Lt(this,yt,Et,!1,Mt)},T.prototype.copy=function(yt,Et,Mt,Nt){if(!T.isBuffer(yt))throw new TypeError("argument should be a Buffer");if(Mt||(Mt=0),!Nt&&Nt!==0&&(Nt=this.length),Et>=yt.length&&(Et=yt.length),Et||(Et=0),Nt>0&&Nt=this.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("sourceEnd out of bounds");Nt>this.length&&(Nt=this.length),yt.length-Et>>0,Mt=Mt===void 0?this.length:Mt>>>0,yt||(yt=0);var ie;if(typeof yt=="number")for(ie=Et;ieMath.pow(2,32)?Nt=kt(String(Et)):typeof Et=="bigint"&&(Nt=String(Et),(Et>Math.pow(BigInt(2),BigInt(32))||Et<-Math.pow(BigInt(2),BigInt(32)))&&(Nt=kt(Nt)),Nt+="n"),Mt+=" It must be ".concat(yt,". Received ").concat(Nt),Mt},RangeError);function kt(xt){for(var yt="",Et=xt.length,Mt=xt[0]==="-"?1:0;Et>=Mt+4;Et-=3)yt="_".concat(xt.slice(Et-3,Et)).concat(yt);return"".concat(xt.slice(0,Et)).concat(yt)}function Vt(xt,yt,Et){re(yt,"offset"),(xt[yt]===void 0||xt[yt+Et]===void 0)&&Kt(yt,xt.length-(Et+1))}function It(xt,yt,Et,Mt,Nt,jt){if(xt>Et||xt3?yt===0||yt===BigInt(0)?me=">= 0".concat(ie," and < 2").concat(ie," ** ").concat((jt+1)*8).concat(ie):me=">= -(2".concat(ie," ** ").concat((jt+1)*8-1).concat(ie,") and < 2 ** ")+"".concat((jt+1)*8-1).concat(ie):me=">= ".concat(yt).concat(ie," and <= ").concat(Et).concat(ie),new Ht.ERR_OUT_OF_RANGE("value",me,xt)}Vt(Mt,Nt,jt)}function re(xt,yt){if(typeof xt!="number")throw new Ht.ERR_INVALID_ARG_TYPE(yt,"number",xt)}function Kt(xt,yt,Et){throw Math.floor(xt)!==xt?(re(xt,Et),new Ht.ERR_OUT_OF_RANGE(Et||"offset","an integer",xt)):yt<0?new Ht.ERR_BUFFER_OUT_OF_BOUNDS:new Ht.ERR_OUT_OF_RANGE(Et||"offset",">= ".concat(Et?1:0," and <= ").concat(yt),xt)}var $t=/[^+/0-9A-Za-z-_]/g;function le(xt){if(xt=xt.split("=")[0],xt=xt.trim().replace($t,""),xt.length<2)return"";for(;xt.length%4!==0;)xt=xt+"=";return xt}function he(xt,yt){yt=yt||1/0;for(var Et,Mt=xt.length,Nt=null,jt=[],ie=0;ie55295&&Et<57344){if(!Nt){if(Et>56319){(yt-=3)>-1&&jt.push(239,191,189);continue}else if(ie+1===Mt){(yt-=3)>-1&&jt.push(239,191,189);continue}Nt=Et;continue}if(Et<56320){(yt-=3)>-1&&jt.push(239,191,189),Nt=Et;continue}Et=(Nt-55296<<10|Et-56320)+65536}else Nt&&(yt-=3)>-1&&jt.push(239,191,189);if(Nt=null,Et<128){if((yt-=1)<0)break;jt.push(Et)}else if(Et<2048){if((yt-=2)<0)break;jt.push(Et>>6|192,Et&63|128)}else if(Et<65536){if((yt-=3)<0)break;jt.push(Et>>12|224,Et>>6&63|128,Et&63|128)}else if(Et<1114112){if((yt-=4)<0)break;jt.push(Et>>18|240,Et>>12&63|128,Et>>6&63|128,Et&63|128)}else throw new Error("Invalid code point")}return jt}function de(xt){for(var yt=[],Et=0;Et>8,Nt=Et%256,jt.push(Nt),jt.push(Mt);return jt}function Se(xt){return d.toByteArray(le(xt))}function ne(xt,yt,Et,Mt){var Nt;for(Nt=0;Nt=yt.length||Nt>=xt.length);++Nt)yt[Nt+Et]=xt[Nt];return Nt}function zt(xt,yt){return xt instanceof yt||xt!=null&&xt.constructor!=null&&xt.constructor.name!=null&&xt.constructor.name===yt.name}function Xt(xt){return xt!==xt}var Jt=function(){for(var xt="0123456789abcdef",yt=new Array(256),Et=0;Et<16;++Et)for(var Mt=Et*16,Nt=0;Nt<16;++Nt)yt[Mt+Nt]=xt[Et]+xt[Nt];return yt}();function Wt(xt){return typeof BigInt>"u"?Ft:xt}function Ft(){throw new Error("BigInt not supported")}},2321:function(v){v.exports=a,v.exports.isMobile=a,v.exports.default=a;var p=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,e=/android|ipad|playbook|silk/i;function a(n){n||(n={});var f=n.ua;if(!f&&typeof navigator<"u"&&(f=navigator.userAgent),f&&f.headers&&typeof f.headers["user-agent"]=="string"&&(f=f.headers["user-agent"]),typeof f!="string")return!1;var c=p.test(f)&&!r.test(f)||!!n.tablet&&e.test(f);return!c&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&f.indexOf("Macintosh")!==-1&&f.indexOf("Safari")!==-1&&(c=!0),c}},3910:function(v,p){p.byteLength=m,p.toByteArray=b,p.fromByteArray=d;for(var r=[],e=[],a=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,c=n.length;f0)throw new Error("Invalid string. Length must be a multiple of 4");var _=w.indexOf("=");_===-1&&(_=A);var y=_===A?0:4-_%4;return[_,y]}function m(w){var A=l(w),_=A[0],y=A[1];return(_+y)*3/4-y}function h(w,A,_){return(A+_)*3/4-_}function b(w){var A,_=l(w),y=_[0],E=_[1],T=new a(h(w,y,E)),s=0,L=E>0?y-4:y,M;for(M=0;M>16&255,T[s++]=A>>8&255,T[s++]=A&255;return E===2&&(A=e[w.charCodeAt(M)]<<2|e[w.charCodeAt(M+1)]>>4,T[s++]=A&255),E===1&&(A=e[w.charCodeAt(M)]<<10|e[w.charCodeAt(M+1)]<<4|e[w.charCodeAt(M+2)]>>2,T[s++]=A>>8&255,T[s++]=A&255),T}function u(w){return r[w>>18&63]+r[w>>12&63]+r[w>>6&63]+r[w&63]}function o(w,A,_){for(var y,E=[],T=A;T<_;T+=3)y=(w[T]<<16&16711680)+(w[T+1]<<8&65280)+(w[T+2]&255),E.push(u(y));return E.join("")}function d(w){for(var A,_=w.length,y=_%3,E=[],T=16383,s=0,L=_-y;sL?L:s+T));return y===1?(A=w[_-1],E.push(r[A>>2]+r[A<<4&63]+"==")):y===2&&(A=(w[_-2]<<8)+w[_-1],E.push(r[A>>10]+r[A>>4&63]+r[A<<2&63]+"=")),E.join("")}},3187:function(v,p){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */p.read=function(r,e,a,n,f){var c,l,m=f*8-n-1,h=(1<>1,u=-7,o=a?f-1:0,d=a?-1:1,w=r[e+o];for(o+=d,c=w&(1<<-u)-1,w>>=-u,u+=m;u>0;c=c*256+r[e+o],o+=d,u-=8);for(l=c&(1<<-u)-1,c>>=-u,u+=n;u>0;l=l*256+r[e+o],o+=d,u-=8);if(c===0)c=1-b;else{if(c===h)return l?NaN:(w?-1:1)*(1/0);l=l+Math.pow(2,n),c=c-b}return(w?-1:1)*l*Math.pow(2,c-n)},p.write=function(r,e,a,n,f,c){var l,m,h,b=c*8-f-1,u=(1<>1,d=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:c-1,A=n?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(m=isNaN(e)?1:0,l=u):(l=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-l))<1&&(l--,h*=2),l+o>=1?e+=d/h:e+=d*Math.pow(2,1-o),e*h>=2&&(l++,h/=2),l+o>=u?(m=0,l=u):l+o>=1?(m=(e*h-1)*Math.pow(2,f),l=l+o):(m=e*Math.pow(2,o-1)*Math.pow(2,f),l=0));f>=8;r[a+w]=m&255,w+=A,m/=256,f-=8);for(l=l<0;r[a+w]=l&255,w+=A,l/=256,b-=8);r[a+w-A]|=_*128}},1152:function(v,p,r){v.exports=l;var e=r(3440),a=r(7774),n=r(9298);function f(m,h){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(b){return m[b]}),this._mode=h,this._active=m[h],this._active||(this._mode="turntable",this._active=m.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var c=f.prototype;c.flush=function(m){for(var h=this._controllerList,b=0;b"u"?r(5346):WeakMap,a=r(5827),n=r(2944),f=new e;function c(l){var m=f.get(l),h=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!h||!l.isBuffer(h)){var b=a(l,new Float32Array([-1,-1,-1,4,4,-1]));m=n(l,[{buffer:b,type:l.FLOAT,size:2}]),m._triangleBuffer=b,f.set(l,m)}m.bind(),l.drawArrays(l.TRIANGLES,0,3),m.unbind()}v.exports=c},8008:function(v,p,r){var e=r(4930);v.exports=a;function a(n,f,c){f=typeof f=="number"?f:1,c=c||": ";var l=n.split(/\r?\n/),m=String(l.length+f-1).length;return l.map(function(h,b){var u=b+f,o=String(u).length,d=e(u,m-o);return d+c+h}).join(` -`)}},2153:function(v,p,r){v.exports=n;var e=r(417);function a(f,c){for(var l=new Array(c+1),m=0;m0?o=o.ushln(u):u<0&&(d=d.ushln(-u)),c(o,d)}},234:function(v,p,r){var e=r(3218);v.exports=a;function a(n){return Array.isArray(n)&&n.length===2&&e(n[0])&&e(n[1])}},4275:function(v,p,r){var e=r(1928);v.exports=a;function a(n){return n.cmp(new e(0))}},9958:function(v,p,r){var e=r(4275);v.exports=a;function a(n){var f=n.length,c=n.words,l=0;if(f===1)l=c[0];else if(f===2)l=c[0]+c[1]*67108864;else for(var m=0;m20?52:l+32}},3218:function(v,p,r){r(1928),v.exports=e;function e(a){return a&&typeof a=="object"&&!!a.words}},5514:function(v,p,r){var e=r(1928),a=r(8362);v.exports=n;function n(f){var c=a.exponent(f);return c<52?new e(f):new e(f*Math.pow(2,52-c)).ushln(c-52)}},8524:function(v,p,r){var e=r(5514),a=r(4275);v.exports=n;function n(f,c){var l=a(f),m=a(c);if(l===0)return[e(0),e(1)];if(m===0)return[e(0),e(0)];m<0&&(f=f.neg(),c=c.neg());var h=f.gcd(c);return h.cmpn(1)?[f.div(h),c.div(h)]:[f,c]}},2813:function(v,p,r){var e=r(1928);v.exports=a;function a(n){return new e(n)}},3962:function(v,p,r){var e=r(8524);v.exports=a;function a(n,f){return e(n[0].mul(f[0]),n[1].mul(f[1]))}},4951:function(v,p,r){var e=r(4275);v.exports=a;function a(n){return e(n[0])*e(n[1])}},4354:function(v,p,r){var e=r(8524);v.exports=a;function a(n,f){return e(n[0].mul(f[1]).sub(n[1].mul(f[0])),n[1].mul(f[1]))}},7999:function(v,p,r){var e=r(9958),a=r(1112);v.exports=n;function n(f){var c=f[0],l=f[1];if(c.cmpn(0)===0)return 0;var m=c.abs().divmod(l.abs()),h=m.div,b=e(h),u=m.mod,o=c.negative!==l.negative?-1:1;if(u.cmpn(0)===0)return o*b;if(b){var d=a(b)+4,w=e(u.ushln(d).divRound(l));return o*(b+w*Math.pow(2,-d))}else{var A=l.bitLength()-u.bitLength()+53,w=e(u.ushln(A).divRound(l));return A<1023?o*w*Math.pow(2,-A):(w*=Math.pow(2,-1023),o*w*Math.pow(2,1023-A))}}},5070:function(v){function p(c,l,m,h,b){for(var u=b+1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w>=0?(u=o,b=o-1):h=o+1}return u}function r(c,l,m,h,b){for(var u=b+1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w>0?(u=o,b=o-1):h=o+1}return u}function e(c,l,m,h,b){for(var u=h-1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w<0?(u=o,h=o+1):b=o-1}return u}function a(c,l,m,h,b){for(var u=h-1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w<=0?(u=o,h=o+1):b=o-1}return u}function n(c,l,m,h,b){for(;h<=b;){var u=h+b>>>1,o=c[u],d=m!==void 0?m(o,l):o-l;if(d===0)return u;d<=0?h=u+1:b=u-1}return-1}function f(c,l,m,h,b,u){return typeof m=="function"?u(c,l,m,h===void 0?0:h|0,b===void 0?c.length-1:b|0):u(c,l,void 0,m===void 0?0:m|0,h===void 0?c.length-1:h|0)}v.exports={ge:function(c,l,m,h,b){return f(c,l,m,h,b,p)},gt:function(c,l,m,h,b){return f(c,l,m,h,b,r)},lt:function(c,l,m,h,b){return f(c,l,m,h,b,e)},le:function(c,l,m,h,b){return f(c,l,m,h,b,a)},eq:function(c,l,m,h,b){return f(c,l,m,h,b,n)}}},2288:function(v,p){"use restrict";var r=32;p.INT_BITS=r,p.INT_MAX=2147483647,p.INT_MIN=-1<0)-(n<0)},p.abs=function(n){var f=n>>r-1;return(n^f)-f},p.min=function(n,f){return f^(n^f)&-(n65535)<<4,n>>>=f,c=(n>255)<<3,n>>>=c,f|=c,c=(n>15)<<2,n>>>=c,f|=c,c=(n>3)<<1,n>>>=c,f|=c,f|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function e(n){var f=32;return n&=-n,n&&f--,n&65535&&(f-=16),n&16711935&&(f-=8),n&252645135&&(f-=4),n&858993459&&(f-=2),n&1431655765&&(f-=1),f}p.countTrailingZeros=e,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var f=0;f<256;++f){var c=f,l=f,m=7;for(c>>>=1;c;c>>>=1)l<<=1,l|=c&1,--m;n[f]=l<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},p.interleave2=function(n,f){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,n|f<<1},p.deinterleave2=function(n,f){return n=n>>>f&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,f,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,n|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,f){return n=n>>>f&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var f=n|n-1;return f+1|(~f&-~f)-1>>>e(n)+1}},1928:function(v,p,r){v=r.nmd(v),function(e,a){function n(B,O){if(!B)throw new Error(O||"Assertion failed")}function f(B,O){B.super_=O;var H=function(){};H.prototype=O.prototype,B.prototype=new H,B.prototype.constructor=B}function c(B,O,H){if(c.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((O==="le"||O==="be")&&(H=O,O=10),this._init(B||0,O||10,H||"be"))}typeof e=="object"?e.exports=c:a.BN=c,c.BN=c,c.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=r(6601).Buffer}catch{}c.isBN=function(O){return O instanceof c?!0:O!==null&&typeof O=="object"&&O.constructor.wordSize===c.wordSize&&Array.isArray(O.words)},c.max=function(O,H){return O.cmp(H)>0?O:H},c.min=function(O,H){return O.cmp(H)<0?O:H},c.prototype._init=function(O,H,Y){if(typeof O=="number")return this._initNumber(O,H,Y);if(typeof O=="object")return this._initArray(O,H,Y);H==="hex"&&(H=16),n(H===(H|0)&&H>=2&&H<=36),O=O.toString().replace(/\s+/g,"");var j=0;O[0]==="-"&&(j++,this.negative=1),j=0;j-=3)it=O[j]|O[j-1]<<8|O[j-2]<<16,this.words[et]|=it<>>26-ut&67108863,ut+=24,ut>=26&&(ut-=26,et++);else if(Y==="le")for(j=0,et=0;j>>26-ut&67108863,ut+=24,ut>=26&&(ut-=26,et++);return this.strip()};function m(B,O){var H=B.charCodeAt(O);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function h(B,O,H){var Y=m(B,H);return H-1>=O&&(Y|=m(B,H-1)<<4),Y}c.prototype._parseHex=function(O,H,Y){this.length=Math.ceil((O.length-H)/6),this.words=new Array(this.length);for(var j=0;j=H;j-=2)ut=h(O,H,j)<=18?(et-=18,it+=1,this.words[it]|=ut>>>26):et+=8;else{var J=O.length-H;for(j=J%2===0?H+1:H;j=18?(et-=18,it+=1,this.words[it]|=ut>>>26):et+=8}this.strip()};function b(B,O,H,Y){for(var j=0,et=Math.min(B.length,H),it=O;it=49?j+=ut-49+10:ut>=17?j+=ut-17+10:j+=ut}return j}c.prototype._parseBase=function(O,H,Y){this.words=[0],this.length=1;for(var j=0,et=1;et<=67108863;et*=H)j++;j--,et=et/H|0;for(var it=O.length-Y,ut=it%j,J=Math.min(it,it-ut)+Y,X=0,tt=Y;tt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],o=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(O,H){O=O||10,H=H|0||1;var Y;if(O===16||O==="hex"){Y="";for(var j=0,et=0,it=0;it>>24-j&16777215,et!==0||it!==this.length-1?Y=u[6-J.length]+J+Y:Y=J+Y,j+=2,j>=26&&(j-=26,it--)}for(et!==0&&(Y=et.toString(16)+Y);Y.length%H!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}if(O===(O|0)&&O>=2&&O<=36){var X=o[O],tt=d[O];Y="";var V=this.clone();for(V.negative=0;!V.isZero();){var Q=V.modn(tt).toString(O);V=V.idivn(tt),V.isZero()?Y=Q+Y:Y=u[X-Q.length]+Q+Y}for(this.isZero()&&(Y="0"+Y);Y.length%H!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}n(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=this.words[1]*67108864:this.length===3&&this.words[2]===1?O+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(O,H){return n(typeof l<"u"),this.toArrayLike(l,O,H)},c.prototype.toArray=function(O,H){return this.toArrayLike(Array,O,H)},c.prototype.toArrayLike=function(O,H,Y){var j=this.byteLength(),et=Y||Math.max(1,j);n(j<=et,"byte array longer than desired length"),n(et>0,"Requested array length <= 0"),this.strip();var it=H==="le",ut=new O(et),J,X,tt=this.clone();if(it){for(X=0;!tt.isZero();X++)J=tt.andln(255),tt.iushrn(8),ut[X]=J;for(;X=4096&&(Y+=13,H>>>=13),H>=64&&(Y+=7,H>>>=7),H>=8&&(Y+=4,H>>>=4),H>=2&&(Y+=2,H>>>=2),Y+H},c.prototype._zeroBits=function(O){if(O===0)return 26;var H=O,Y=0;return H&8191||(Y+=13,H>>>=13),H&127||(Y+=7,H>>>=7),H&15||(Y+=4,H>>>=4),H&3||(Y+=2,H>>>=2),H&1||Y++,Y},c.prototype.bitLength=function(){var O=this.words[this.length-1],H=this._countBits(O);return(this.length-1)*26+H};function w(B){for(var O=new Array(B.bitLength()),H=0;H>>j}return O}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,H=0;HO.length?this.clone().ior(O):O.clone().ior(this)},c.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},c.prototype.iuand=function(O){var H;this.length>O.length?H=O:H=this;for(var Y=0;YO.length?this.clone().iand(O):O.clone().iand(this)},c.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},c.prototype.iuxor=function(O){var H,Y;this.length>O.length?(H=this,Y=O):(H=O,Y=this);for(var j=0;jO.length?this.clone().ixor(O):O.clone().ixor(this)},c.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},c.prototype.inotn=function(O){n(typeof O=="number"&&O>=0);var H=Math.ceil(O/26)|0,Y=O%26;this._expand(H),Y>0&&H--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-Y),this.strip()},c.prototype.notn=function(O){return this.clone().inotn(O)},c.prototype.setn=function(O,H){n(typeof O=="number"&&O>=0);var Y=O/26|0,j=O%26;return this._expand(Y+1),H?this.words[Y]=this.words[Y]|1<O.length?(Y=this,j=O):(Y=O,j=this);for(var et=0,it=0;it>>26;for(;et!==0&&it>>26;if(this.length=Y.length,et!==0)this.words[this.length]=et,this.length++;else if(Y!==this)for(;itO.length?this.clone().iadd(O):O.clone().iadd(this)},c.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var H=this.iadd(O);return O.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var Y=this.cmp(O);if(Y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var j,et;Y>0?(j=this,et=O):(j=O,et=this);for(var it=0,ut=0;ut>26,this.words[ut]=H&67108863;for(;it!==0&&ut>26,this.words[ut]=H&67108863;if(it===0&&ut>>26,V=J&67108863,Q=Math.min(X,O.length-1),ot=Math.max(0,X-B.length+1);ot<=Q;ot++){var $=X-ot|0;j=B.words[$]|0,et=O.words[ot]|0,it=j*et+V,tt+=it/67108864|0,V=it&67108863}H.words[X]=V|0,J=tt|0}return J!==0?H.words[X]=J|0:H.length--,H.strip()}var _=function(O,H,Y){var j=O.words,et=H.words,it=Y.words,ut=0,J,X,tt,V=j[0]|0,Q=V&8191,ot=V>>>13,$=j[1]|0,Z=$&8191,st=$>>>13,nt=j[2]|0,ct=nt&8191,gt=nt>>>13,Tt=j[3]|0,wt=Tt&8191,Rt=Tt>>>13,bt=j[4]|0,At=bt&8191,mt=bt>>>13,Lt=j[5]|0,Ht=Lt&8191,Ut=Lt>>>13,kt=j[6]|0,Vt=kt&8191,It=kt>>>13,re=j[7]|0,Kt=re&8191,$t=re>>>13,le=j[8]|0,he=le&8191,de=le>>>13,xe=j[9]|0,Se=xe&8191,ne=xe>>>13,zt=et[0]|0,Xt=zt&8191,Jt=zt>>>13,Wt=et[1]|0,Ft=Wt&8191,xt=Wt>>>13,yt=et[2]|0,Et=yt&8191,Mt=yt>>>13,Nt=et[3]|0,jt=Nt&8191,ie=Nt>>>13,me=et[4]|0,be=me&8191,ve=me>>>13,Le=et[5]|0,ce=Le&8191,Te=Le>>>13,Be=et[6]|0,ir=Be&8191,pe=Be>>>13,Xe=et[7]|0,Ke=Xe&8191,or=Xe>>>13,$e=et[8]|0,ge=$e&8191,se=$e>>>13,Ae=et[9]|0,Ce=Ae&8191,Ie=Ae>>>13;Y.negative=O.negative^H.negative,Y.length=19,J=Math.imul(Q,Xt),X=Math.imul(Q,Jt),X=X+Math.imul(ot,Xt)|0,tt=Math.imul(ot,Jt);var Pe=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,J=Math.imul(Z,Xt),X=Math.imul(Z,Jt),X=X+Math.imul(st,Xt)|0,tt=Math.imul(st,Jt),J=J+Math.imul(Q,Ft)|0,X=X+Math.imul(Q,xt)|0,X=X+Math.imul(ot,Ft)|0,tt=tt+Math.imul(ot,xt)|0;var ke=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(ke>>>26)|0,ke&=67108863,J=Math.imul(ct,Xt),X=Math.imul(ct,Jt),X=X+Math.imul(gt,Xt)|0,tt=Math.imul(gt,Jt),J=J+Math.imul(Z,Ft)|0,X=X+Math.imul(Z,xt)|0,X=X+Math.imul(st,Ft)|0,tt=tt+Math.imul(st,xt)|0,J=J+Math.imul(Q,Et)|0,X=X+Math.imul(Q,Mt)|0,X=X+Math.imul(ot,Et)|0,tt=tt+Math.imul(ot,Mt)|0;var Ve=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,J=Math.imul(wt,Xt),X=Math.imul(wt,Jt),X=X+Math.imul(Rt,Xt)|0,tt=Math.imul(Rt,Jt),J=J+Math.imul(ct,Ft)|0,X=X+Math.imul(ct,xt)|0,X=X+Math.imul(gt,Ft)|0,tt=tt+Math.imul(gt,xt)|0,J=J+Math.imul(Z,Et)|0,X=X+Math.imul(Z,Mt)|0,X=X+Math.imul(st,Et)|0,tt=tt+Math.imul(st,Mt)|0,J=J+Math.imul(Q,jt)|0,X=X+Math.imul(Q,ie)|0,X=X+Math.imul(ot,jt)|0,tt=tt+Math.imul(ot,ie)|0;var Je=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Je>>>26)|0,Je&=67108863,J=Math.imul(At,Xt),X=Math.imul(At,Jt),X=X+Math.imul(mt,Xt)|0,tt=Math.imul(mt,Jt),J=J+Math.imul(wt,Ft)|0,X=X+Math.imul(wt,xt)|0,X=X+Math.imul(Rt,Ft)|0,tt=tt+Math.imul(Rt,xt)|0,J=J+Math.imul(ct,Et)|0,X=X+Math.imul(ct,Mt)|0,X=X+Math.imul(gt,Et)|0,tt=tt+Math.imul(gt,Mt)|0,J=J+Math.imul(Z,jt)|0,X=X+Math.imul(Z,ie)|0,X=X+Math.imul(st,jt)|0,tt=tt+Math.imul(st,ie)|0,J=J+Math.imul(Q,be)|0,X=X+Math.imul(Q,ve)|0,X=X+Math.imul(ot,be)|0,tt=tt+Math.imul(ot,ve)|0;var ur=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(ur>>>26)|0,ur&=67108863,J=Math.imul(Ht,Xt),X=Math.imul(Ht,Jt),X=X+Math.imul(Ut,Xt)|0,tt=Math.imul(Ut,Jt),J=J+Math.imul(At,Ft)|0,X=X+Math.imul(At,xt)|0,X=X+Math.imul(mt,Ft)|0,tt=tt+Math.imul(mt,xt)|0,J=J+Math.imul(wt,Et)|0,X=X+Math.imul(wt,Mt)|0,X=X+Math.imul(Rt,Et)|0,tt=tt+Math.imul(Rt,Mt)|0,J=J+Math.imul(ct,jt)|0,X=X+Math.imul(ct,ie)|0,X=X+Math.imul(gt,jt)|0,tt=tt+Math.imul(gt,ie)|0,J=J+Math.imul(Z,be)|0,X=X+Math.imul(Z,ve)|0,X=X+Math.imul(st,be)|0,tt=tt+Math.imul(st,ve)|0,J=J+Math.imul(Q,ce)|0,X=X+Math.imul(Q,Te)|0,X=X+Math.imul(ot,ce)|0,tt=tt+Math.imul(ot,Te)|0;var hr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(hr>>>26)|0,hr&=67108863,J=Math.imul(Vt,Xt),X=Math.imul(Vt,Jt),X=X+Math.imul(It,Xt)|0,tt=Math.imul(It,Jt),J=J+Math.imul(Ht,Ft)|0,X=X+Math.imul(Ht,xt)|0,X=X+Math.imul(Ut,Ft)|0,tt=tt+Math.imul(Ut,xt)|0,J=J+Math.imul(At,Et)|0,X=X+Math.imul(At,Mt)|0,X=X+Math.imul(mt,Et)|0,tt=tt+Math.imul(mt,Mt)|0,J=J+Math.imul(wt,jt)|0,X=X+Math.imul(wt,ie)|0,X=X+Math.imul(Rt,jt)|0,tt=tt+Math.imul(Rt,ie)|0,J=J+Math.imul(ct,be)|0,X=X+Math.imul(ct,ve)|0,X=X+Math.imul(gt,be)|0,tt=tt+Math.imul(gt,ve)|0,J=J+Math.imul(Z,ce)|0,X=X+Math.imul(Z,Te)|0,X=X+Math.imul(st,ce)|0,tt=tt+Math.imul(st,Te)|0,J=J+Math.imul(Q,ir)|0,X=X+Math.imul(Q,pe)|0,X=X+Math.imul(ot,ir)|0,tt=tt+Math.imul(ot,pe)|0;var vr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(vr>>>26)|0,vr&=67108863,J=Math.imul(Kt,Xt),X=Math.imul(Kt,Jt),X=X+Math.imul($t,Xt)|0,tt=Math.imul($t,Jt),J=J+Math.imul(Vt,Ft)|0,X=X+Math.imul(Vt,xt)|0,X=X+Math.imul(It,Ft)|0,tt=tt+Math.imul(It,xt)|0,J=J+Math.imul(Ht,Et)|0,X=X+Math.imul(Ht,Mt)|0,X=X+Math.imul(Ut,Et)|0,tt=tt+Math.imul(Ut,Mt)|0,J=J+Math.imul(At,jt)|0,X=X+Math.imul(At,ie)|0,X=X+Math.imul(mt,jt)|0,tt=tt+Math.imul(mt,ie)|0,J=J+Math.imul(wt,be)|0,X=X+Math.imul(wt,ve)|0,X=X+Math.imul(Rt,be)|0,tt=tt+Math.imul(Rt,ve)|0,J=J+Math.imul(ct,ce)|0,X=X+Math.imul(ct,Te)|0,X=X+Math.imul(gt,ce)|0,tt=tt+Math.imul(gt,Te)|0,J=J+Math.imul(Z,ir)|0,X=X+Math.imul(Z,pe)|0,X=X+Math.imul(st,ir)|0,tt=tt+Math.imul(st,pe)|0,J=J+Math.imul(Q,Ke)|0,X=X+Math.imul(Q,or)|0,X=X+Math.imul(ot,Ke)|0,tt=tt+Math.imul(ot,or)|0;var Yt=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,J=Math.imul(he,Xt),X=Math.imul(he,Jt),X=X+Math.imul(de,Xt)|0,tt=Math.imul(de,Jt),J=J+Math.imul(Kt,Ft)|0,X=X+Math.imul(Kt,xt)|0,X=X+Math.imul($t,Ft)|0,tt=tt+Math.imul($t,xt)|0,J=J+Math.imul(Vt,Et)|0,X=X+Math.imul(Vt,Mt)|0,X=X+Math.imul(It,Et)|0,tt=tt+Math.imul(It,Mt)|0,J=J+Math.imul(Ht,jt)|0,X=X+Math.imul(Ht,ie)|0,X=X+Math.imul(Ut,jt)|0,tt=tt+Math.imul(Ut,ie)|0,J=J+Math.imul(At,be)|0,X=X+Math.imul(At,ve)|0,X=X+Math.imul(mt,be)|0,tt=tt+Math.imul(mt,ve)|0,J=J+Math.imul(wt,ce)|0,X=X+Math.imul(wt,Te)|0,X=X+Math.imul(Rt,ce)|0,tt=tt+Math.imul(Rt,Te)|0,J=J+Math.imul(ct,ir)|0,X=X+Math.imul(ct,pe)|0,X=X+Math.imul(gt,ir)|0,tt=tt+Math.imul(gt,pe)|0,J=J+Math.imul(Z,Ke)|0,X=X+Math.imul(Z,or)|0,X=X+Math.imul(st,Ke)|0,tt=tt+Math.imul(st,or)|0,J=J+Math.imul(Q,ge)|0,X=X+Math.imul(Q,se)|0,X=X+Math.imul(ot,ge)|0,tt=tt+Math.imul(ot,se)|0;var Gt=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,J=Math.imul(Se,Xt),X=Math.imul(Se,Jt),X=X+Math.imul(ne,Xt)|0,tt=Math.imul(ne,Jt),J=J+Math.imul(he,Ft)|0,X=X+Math.imul(he,xt)|0,X=X+Math.imul(de,Ft)|0,tt=tt+Math.imul(de,xt)|0,J=J+Math.imul(Kt,Et)|0,X=X+Math.imul(Kt,Mt)|0,X=X+Math.imul($t,Et)|0,tt=tt+Math.imul($t,Mt)|0,J=J+Math.imul(Vt,jt)|0,X=X+Math.imul(Vt,ie)|0,X=X+Math.imul(It,jt)|0,tt=tt+Math.imul(It,ie)|0,J=J+Math.imul(Ht,be)|0,X=X+Math.imul(Ht,ve)|0,X=X+Math.imul(Ut,be)|0,tt=tt+Math.imul(Ut,ve)|0,J=J+Math.imul(At,ce)|0,X=X+Math.imul(At,Te)|0,X=X+Math.imul(mt,ce)|0,tt=tt+Math.imul(mt,Te)|0,J=J+Math.imul(wt,ir)|0,X=X+Math.imul(wt,pe)|0,X=X+Math.imul(Rt,ir)|0,tt=tt+Math.imul(Rt,pe)|0,J=J+Math.imul(ct,Ke)|0,X=X+Math.imul(ct,or)|0,X=X+Math.imul(gt,Ke)|0,tt=tt+Math.imul(gt,or)|0,J=J+Math.imul(Z,ge)|0,X=X+Math.imul(Z,se)|0,X=X+Math.imul(st,ge)|0,tt=tt+Math.imul(st,se)|0,J=J+Math.imul(Q,Ce)|0,X=X+Math.imul(Q,Ie)|0,X=X+Math.imul(ot,Ce)|0,tt=tt+Math.imul(ot,Ie)|0;var Ne=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,J=Math.imul(Se,Ft),X=Math.imul(Se,xt),X=X+Math.imul(ne,Ft)|0,tt=Math.imul(ne,xt),J=J+Math.imul(he,Et)|0,X=X+Math.imul(he,Mt)|0,X=X+Math.imul(de,Et)|0,tt=tt+Math.imul(de,Mt)|0,J=J+Math.imul(Kt,jt)|0,X=X+Math.imul(Kt,ie)|0,X=X+Math.imul($t,jt)|0,tt=tt+Math.imul($t,ie)|0,J=J+Math.imul(Vt,be)|0,X=X+Math.imul(Vt,ve)|0,X=X+Math.imul(It,be)|0,tt=tt+Math.imul(It,ve)|0,J=J+Math.imul(Ht,ce)|0,X=X+Math.imul(Ht,Te)|0,X=X+Math.imul(Ut,ce)|0,tt=tt+Math.imul(Ut,Te)|0,J=J+Math.imul(At,ir)|0,X=X+Math.imul(At,pe)|0,X=X+Math.imul(mt,ir)|0,tt=tt+Math.imul(mt,pe)|0,J=J+Math.imul(wt,Ke)|0,X=X+Math.imul(wt,or)|0,X=X+Math.imul(Rt,Ke)|0,tt=tt+Math.imul(Rt,or)|0,J=J+Math.imul(ct,ge)|0,X=X+Math.imul(ct,se)|0,X=X+Math.imul(gt,ge)|0,tt=tt+Math.imul(gt,se)|0,J=J+Math.imul(Z,Ce)|0,X=X+Math.imul(Z,Ie)|0,X=X+Math.imul(st,Ce)|0,tt=tt+Math.imul(st,Ie)|0;var Oe=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,J=Math.imul(Se,Et),X=Math.imul(Se,Mt),X=X+Math.imul(ne,Et)|0,tt=Math.imul(ne,Mt),J=J+Math.imul(he,jt)|0,X=X+Math.imul(he,ie)|0,X=X+Math.imul(de,jt)|0,tt=tt+Math.imul(de,ie)|0,J=J+Math.imul(Kt,be)|0,X=X+Math.imul(Kt,ve)|0,X=X+Math.imul($t,be)|0,tt=tt+Math.imul($t,ve)|0,J=J+Math.imul(Vt,ce)|0,X=X+Math.imul(Vt,Te)|0,X=X+Math.imul(It,ce)|0,tt=tt+Math.imul(It,Te)|0,J=J+Math.imul(Ht,ir)|0,X=X+Math.imul(Ht,pe)|0,X=X+Math.imul(Ut,ir)|0,tt=tt+Math.imul(Ut,pe)|0,J=J+Math.imul(At,Ke)|0,X=X+Math.imul(At,or)|0,X=X+Math.imul(mt,Ke)|0,tt=tt+Math.imul(mt,or)|0,J=J+Math.imul(wt,ge)|0,X=X+Math.imul(wt,se)|0,X=X+Math.imul(Rt,ge)|0,tt=tt+Math.imul(Rt,se)|0,J=J+Math.imul(ct,Ce)|0,X=X+Math.imul(ct,Ie)|0,X=X+Math.imul(gt,Ce)|0,tt=tt+Math.imul(gt,Ie)|0;var Qe=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,J=Math.imul(Se,jt),X=Math.imul(Se,ie),X=X+Math.imul(ne,jt)|0,tt=Math.imul(ne,ie),J=J+Math.imul(he,be)|0,X=X+Math.imul(he,ve)|0,X=X+Math.imul(de,be)|0,tt=tt+Math.imul(de,ve)|0,J=J+Math.imul(Kt,ce)|0,X=X+Math.imul(Kt,Te)|0,X=X+Math.imul($t,ce)|0,tt=tt+Math.imul($t,Te)|0,J=J+Math.imul(Vt,ir)|0,X=X+Math.imul(Vt,pe)|0,X=X+Math.imul(It,ir)|0,tt=tt+Math.imul(It,pe)|0,J=J+Math.imul(Ht,Ke)|0,X=X+Math.imul(Ht,or)|0,X=X+Math.imul(Ut,Ke)|0,tt=tt+Math.imul(Ut,or)|0,J=J+Math.imul(At,ge)|0,X=X+Math.imul(At,se)|0,X=X+Math.imul(mt,ge)|0,tt=tt+Math.imul(mt,se)|0,J=J+Math.imul(wt,Ce)|0,X=X+Math.imul(wt,Ie)|0,X=X+Math.imul(Rt,Ce)|0,tt=tt+Math.imul(Rt,Ie)|0;var er=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(er>>>26)|0,er&=67108863,J=Math.imul(Se,be),X=Math.imul(Se,ve),X=X+Math.imul(ne,be)|0,tt=Math.imul(ne,ve),J=J+Math.imul(he,ce)|0,X=X+Math.imul(he,Te)|0,X=X+Math.imul(de,ce)|0,tt=tt+Math.imul(de,Te)|0,J=J+Math.imul(Kt,ir)|0,X=X+Math.imul(Kt,pe)|0,X=X+Math.imul($t,ir)|0,tt=tt+Math.imul($t,pe)|0,J=J+Math.imul(Vt,Ke)|0,X=X+Math.imul(Vt,or)|0,X=X+Math.imul(It,Ke)|0,tt=tt+Math.imul(It,or)|0,J=J+Math.imul(Ht,ge)|0,X=X+Math.imul(Ht,se)|0,X=X+Math.imul(Ut,ge)|0,tt=tt+Math.imul(Ut,se)|0,J=J+Math.imul(At,Ce)|0,X=X+Math.imul(At,Ie)|0,X=X+Math.imul(mt,Ce)|0,tt=tt+Math.imul(mt,Ie)|0;var fr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(fr>>>26)|0,fr&=67108863,J=Math.imul(Se,ce),X=Math.imul(Se,Te),X=X+Math.imul(ne,ce)|0,tt=Math.imul(ne,Te),J=J+Math.imul(he,ir)|0,X=X+Math.imul(he,pe)|0,X=X+Math.imul(de,ir)|0,tt=tt+Math.imul(de,pe)|0,J=J+Math.imul(Kt,Ke)|0,X=X+Math.imul(Kt,or)|0,X=X+Math.imul($t,Ke)|0,tt=tt+Math.imul($t,or)|0,J=J+Math.imul(Vt,ge)|0,X=X+Math.imul(Vt,se)|0,X=X+Math.imul(It,ge)|0,tt=tt+Math.imul(It,se)|0,J=J+Math.imul(Ht,Ce)|0,X=X+Math.imul(Ht,Ie)|0,X=X+Math.imul(Ut,Ce)|0,tt=tt+Math.imul(Ut,Ie)|0;var rr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(rr>>>26)|0,rr&=67108863,J=Math.imul(Se,ir),X=Math.imul(Se,pe),X=X+Math.imul(ne,ir)|0,tt=Math.imul(ne,pe),J=J+Math.imul(he,Ke)|0,X=X+Math.imul(he,or)|0,X=X+Math.imul(de,Ke)|0,tt=tt+Math.imul(de,or)|0,J=J+Math.imul(Kt,ge)|0,X=X+Math.imul(Kt,se)|0,X=X+Math.imul($t,ge)|0,tt=tt+Math.imul($t,se)|0,J=J+Math.imul(Vt,Ce)|0,X=X+Math.imul(Vt,Ie)|0,X=X+Math.imul(It,Ce)|0,tt=tt+Math.imul(It,Ie)|0;var He=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(He>>>26)|0,He&=67108863,J=Math.imul(Se,Ke),X=Math.imul(Se,or),X=X+Math.imul(ne,Ke)|0,tt=Math.imul(ne,or),J=J+Math.imul(he,ge)|0,X=X+Math.imul(he,se)|0,X=X+Math.imul(de,ge)|0,tt=tt+Math.imul(de,se)|0,J=J+Math.imul(Kt,Ce)|0,X=X+Math.imul(Kt,Ie)|0,X=X+Math.imul($t,Ce)|0,tt=tt+Math.imul($t,Ie)|0;var dr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(dr>>>26)|0,dr&=67108863,J=Math.imul(Se,ge),X=Math.imul(Se,se),X=X+Math.imul(ne,ge)|0,tt=Math.imul(ne,se),J=J+Math.imul(he,Ce)|0,X=X+Math.imul(he,Ie)|0,X=X+Math.imul(de,Ce)|0,tt=tt+Math.imul(de,Ie)|0;var mr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(mr>>>26)|0,mr&=67108863,J=Math.imul(Se,Ce),X=Math.imul(Se,Ie),X=X+Math.imul(ne,Ce)|0,tt=Math.imul(ne,Ie);var xr=(ut+J|0)+((X&8191)<<13)|0;return ut=(tt+(X>>>13)|0)+(xr>>>26)|0,xr&=67108863,it[0]=Pe,it[1]=ke,it[2]=Ve,it[3]=Je,it[4]=ur,it[5]=hr,it[6]=vr,it[7]=Yt,it[8]=Gt,it[9]=Ne,it[10]=Oe,it[11]=Qe,it[12]=er,it[13]=fr,it[14]=rr,it[15]=He,it[16]=dr,it[17]=mr,it[18]=xr,ut!==0&&(it[19]=ut,Y.length++),Y};Math.imul||(_=A);function y(B,O,H){H.negative=O.negative^B.negative,H.length=B.length+O.length;for(var Y=0,j=0,et=0;et>>26)|0,j+=it>>>26,it&=67108863}H.words[et]=ut,Y=it,it=j}return Y!==0?H.words[et]=Y:H.length--,H.strip()}function E(B,O,H){var Y=new T;return Y.mulp(B,O,H)}c.prototype.mulTo=function(O,H){var Y,j=this.length+O.length;return this.length===10&&O.length===10?Y=_(this,O,H):j<63?Y=A(this,O,H):j<1024?Y=y(this,O,H):Y=E(this,O,H),Y};function T(B,O){this.x=B,this.y=O}T.prototype.makeRBT=function(O){for(var H=new Array(O),Y=c.prototype._countBits(O)-1,j=0;j>=1;return j},T.prototype.permute=function(O,H,Y,j,et,it){for(var ut=0;ut>>1)et++;return 1<>>13,Y[2*it+1]=et&8191,et=et>>>13;for(it=2*H;it>=26,H+=j/67108864|0,H+=et>>>26,this.words[Y]=et&67108863}return H!==0&&(this.words[Y]=H,this.length++),this},c.prototype.muln=function(O){return this.clone().imuln(O)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(O){var H=w(O);if(H.length===0)return new c(1);for(var Y=this,j=0;j=0);var H=O%26,Y=(O-H)/26,j=67108863>>>26-H<<26-H,et;if(H!==0){var it=0;for(et=0;et>>26-H}it&&(this.words[et]=it,this.length++)}if(Y!==0){for(et=this.length-1;et>=0;et--)this.words[et+Y]=this.words[et];for(et=0;et=0);var j;H?j=(H-H%26)/26:j=0;var et=O%26,it=Math.min((O-et)/26,this.length),ut=67108863^67108863>>>et<it)for(this.length-=it,X=0;X=0&&(tt!==0||X>=j);X--){var V=this.words[X]|0;this.words[X]=tt<<26-et|V>>>et,tt=V&ut}return J&&tt!==0&&(J.words[J.length++]=tt),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(O,H,Y){return n(this.negative===0),this.iushrn(O,H,Y)},c.prototype.shln=function(O){return this.clone().ishln(O)},c.prototype.ushln=function(O){return this.clone().iushln(O)},c.prototype.shrn=function(O){return this.clone().ishrn(O)},c.prototype.ushrn=function(O){return this.clone().iushrn(O)},c.prototype.testn=function(O){n(typeof O=="number"&&O>=0);var H=O%26,Y=(O-H)/26,j=1<=0);var H=O%26,Y=(O-H)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=Y)return this;if(H!==0&&Y++,this.length=Math.min(Y,this.length),H!==0){var j=67108863^67108863>>>H<=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},c.prototype.isubn=function(O){if(n(typeof O=="number"),n(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H>26)-(J/67108864|0),this.words[et+Y]=it&67108863}for(;et>26,this.words[et+Y]=it&67108863;if(ut===0)return this.strip();for(n(ut===-1),ut=0,et=0;et>26,this.words[et]=it&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(O,H){var Y=this.length-O.length,j=this.clone(),et=O,it=et.words[et.length-1]|0,ut=this._countBits(it);Y=26-ut,Y!==0&&(et=et.ushln(Y),j.iushln(Y),it=et.words[et.length-1]|0);var J=j.length-et.length,X;if(H!=="mod"){X=new c(null),X.length=J+1,X.words=new Array(X.length);for(var tt=0;tt=0;Q--){var ot=(j.words[et.length+Q]|0)*67108864+(j.words[et.length+Q-1]|0);for(ot=Math.min(ot/it|0,67108863),j._ishlnsubmul(et,ot,Q);j.negative!==0;)ot--,j.negative=0,j._ishlnsubmul(et,1,Q),j.isZero()||(j.negative^=1);X&&(X.words[Q]=ot)}return X&&X.strip(),j.strip(),H!=="div"&&Y!==0&&j.iushrn(Y),{div:X||null,mod:j}},c.prototype.divmod=function(O,H,Y){if(n(!O.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var j,et,it;return this.negative!==0&&O.negative===0?(it=this.neg().divmod(O,H),H!=="mod"&&(j=it.div.neg()),H!=="div"&&(et=it.mod.neg(),Y&&et.negative!==0&&et.iadd(O)),{div:j,mod:et}):this.negative===0&&O.negative!==0?(it=this.divmod(O.neg(),H),H!=="mod"&&(j=it.div.neg()),{div:j,mod:it.mod}):this.negative&O.negative?(it=this.neg().divmod(O.neg(),H),H!=="div"&&(et=it.mod.neg(),Y&&et.negative!==0&&et.isub(O)),{div:it.div,mod:et}):O.length>this.length||this.cmp(O)<0?{div:new c(0),mod:this}:O.length===1?H==="div"?{div:this.divn(O.words[0]),mod:null}:H==="mod"?{div:null,mod:new c(this.modn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new c(this.modn(O.words[0]))}:this._wordDiv(O,H)},c.prototype.div=function(O){return this.divmod(O,"div",!1).div},c.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},c.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},c.prototype.divRound=function(O){var H=this.divmod(O);if(H.mod.isZero())return H.div;var Y=H.div.negative!==0?H.mod.isub(O):H.mod,j=O.ushrn(1),et=O.andln(1),it=Y.cmp(j);return it<0||et===1&&it===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},c.prototype.modn=function(O){n(O<=67108863);for(var H=(1<<26)%O,Y=0,j=this.length-1;j>=0;j--)Y=(H*Y+(this.words[j]|0))%O;return Y},c.prototype.idivn=function(O){n(O<=67108863);for(var H=0,Y=this.length-1;Y>=0;Y--){var j=(this.words[Y]|0)+H*67108864;this.words[Y]=j/O|0,H=j%O}return this.strip()},c.prototype.divn=function(O){return this.clone().idivn(O)},c.prototype.egcd=function(O){n(O.negative===0),n(!O.isZero());var H=this,Y=O.clone();H.negative!==0?H=H.umod(O):H=H.clone();for(var j=new c(1),et=new c(0),it=new c(0),ut=new c(1),J=0;H.isEven()&&Y.isEven();)H.iushrn(1),Y.iushrn(1),++J;for(var X=Y.clone(),tt=H.clone();!H.isZero();){for(var V=0,Q=1;!(H.words[0]&Q)&&V<26;++V,Q<<=1);if(V>0)for(H.iushrn(V);V-- >0;)(j.isOdd()||et.isOdd())&&(j.iadd(X),et.isub(tt)),j.iushrn(1),et.iushrn(1);for(var ot=0,$=1;!(Y.words[0]&$)&&ot<26;++ot,$<<=1);if(ot>0)for(Y.iushrn(ot);ot-- >0;)(it.isOdd()||ut.isOdd())&&(it.iadd(X),ut.isub(tt)),it.iushrn(1),ut.iushrn(1);H.cmp(Y)>=0?(H.isub(Y),j.isub(it),et.isub(ut)):(Y.isub(H),it.isub(j),ut.isub(et))}return{a:it,b:ut,gcd:Y.iushln(J)}},c.prototype._invmp=function(O){n(O.negative===0),n(!O.isZero());var H=this,Y=O.clone();H.negative!==0?H=H.umod(O):H=H.clone();for(var j=new c(1),et=new c(0),it=Y.clone();H.cmpn(1)>0&&Y.cmpn(1)>0;){for(var ut=0,J=1;!(H.words[0]&J)&&ut<26;++ut,J<<=1);if(ut>0)for(H.iushrn(ut);ut-- >0;)j.isOdd()&&j.iadd(it),j.iushrn(1);for(var X=0,tt=1;!(Y.words[0]&tt)&&X<26;++X,tt<<=1);if(X>0)for(Y.iushrn(X);X-- >0;)et.isOdd()&&et.iadd(it),et.iushrn(1);H.cmp(Y)>=0?(H.isub(Y),j.isub(et)):(Y.isub(H),et.isub(j))}var V;return H.cmpn(1)===0?V=j:V=et,V.cmpn(0)<0&&V.iadd(O),V},c.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var H=this.clone(),Y=O.clone();H.negative=0,Y.negative=0;for(var j=0;H.isEven()&&Y.isEven();j++)H.iushrn(1),Y.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;Y.isEven();)Y.iushrn(1);var et=H.cmp(Y);if(et<0){var it=H;H=Y,Y=it}else if(et===0||Y.cmpn(1)===0)break;H.isub(Y)}while(!0);return Y.iushln(j)},c.prototype.invm=function(O){return this.egcd(O).a.umod(O)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(O){return this.words[0]&O},c.prototype.bincn=function(O){n(typeof O=="number");var H=O%26,Y=(O-H)/26,j=1<>>26,ut&=67108863,this.words[it]=ut}return et!==0&&(this.words[it]=et,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(O){var H=O<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var Y;if(this.length>1)Y=1;else{H&&(O=-O),n(O<=67108863,"Number is too big");var j=this.words[0]|0;Y=j===O?0:jO.length)return 1;if(this.length=0;Y--){var j=this.words[Y]|0,et=O.words[Y]|0;if(j!==et){jet&&(H=1);break}}return H},c.prototype.gtn=function(O){return this.cmpn(O)===1},c.prototype.gt=function(O){return this.cmp(O)===1},c.prototype.gten=function(O){return this.cmpn(O)>=0},c.prototype.gte=function(O){return this.cmp(O)>=0},c.prototype.ltn=function(O){return this.cmpn(O)===-1},c.prototype.lt=function(O){return this.cmp(O)===-1},c.prototype.lten=function(O){return this.cmpn(O)<=0},c.prototype.lte=function(O){return this.cmp(O)<=0},c.prototype.eqn=function(O){return this.cmpn(O)===0},c.prototype.eq=function(O){return this.cmp(O)===0},c.red=function(O){return new I(O)},c.prototype.toRed=function(O){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(O){return this.red=O,this},c.prototype.forceRed=function(O){return n(!this.red,"Already a number in reduction context"),this._forceRed(O)},c.prototype.redAdd=function(O){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},c.prototype.redIAdd=function(O){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},c.prototype.redSub=function(O){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},c.prototype.redISub=function(O){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},c.prototype.redShl=function(O){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},c.prototype.redMul=function(O){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},c.prototype.redIMul=function(O){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(O){return n(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var s={k256:null,p224:null,p192:null,p25519:null};function L(B,O){this.name=B,this.p=new c(O,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var O=new c(null);return O.words=new Array(Math.ceil(this.n/13)),O},L.prototype.ireduce=function(O){var H=O,Y;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),Y=H.bitLength();while(Y>this.n);var j=Y0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},L.prototype.split=function(O,H){O.iushrn(this.n,0,H)},L.prototype.imulK=function(O){return O.imul(this.k)};function M(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(M,L),M.prototype.split=function(O,H){for(var Y=4194303,j=Math.min(O.length,9),et=0;et>>22,it=ut}it>>>=22,O.words[et-10]=it,it===0&&O.length>10?O.length-=10:O.length-=9},M.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var H=0,Y=0;Y>>=26,O.words[Y]=et,H=j}return H!==0&&(O.words[O.length++]=H),O},c._prime=function(O){if(s[O])return s[O];var H;if(O==="k256")H=new M;else if(O==="p224")H=new z;else if(O==="p192")H=new D;else if(O==="p25519")H=new N;else throw new Error("Unknown prime "+O);return s[O]=H,H};function I(B){if(typeof B=="string"){var O=c._prime(B);this.m=O.p,this.prime=O}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}I.prototype._verify1=function(O){n(O.negative===0,"red works only with positives"),n(O.red,"red works only with red numbers")},I.prototype._verify2=function(O,H){n((O.negative|H.negative)===0,"red works only with positives"),n(O.red&&O.red===H.red,"red works only with red numbers")},I.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):O.umod(this.m)._forceRed(this)},I.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},I.prototype.add=function(O,H){this._verify2(O,H);var Y=O.add(H);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y._forceRed(this)},I.prototype.iadd=function(O,H){this._verify2(O,H);var Y=O.iadd(H);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y},I.prototype.sub=function(O,H){this._verify2(O,H);var Y=O.sub(H);return Y.cmpn(0)<0&&Y.iadd(this.m),Y._forceRed(this)},I.prototype.isub=function(O,H){this._verify2(O,H);var Y=O.isub(H);return Y.cmpn(0)<0&&Y.iadd(this.m),Y},I.prototype.shl=function(O,H){return this._verify1(O),this.imod(O.ushln(H))},I.prototype.imul=function(O,H){return this._verify2(O,H),this.imod(O.imul(H))},I.prototype.mul=function(O,H){return this._verify2(O,H),this.imod(O.mul(H))},I.prototype.isqr=function(O){return this.imul(O,O.clone())},I.prototype.sqr=function(O){return this.mul(O,O)},I.prototype.sqrt=function(O){if(O.isZero())return O.clone();var H=this.m.andln(3);if(n(H%2===1),H===3){var Y=this.m.add(new c(1)).iushrn(2);return this.pow(O,Y)}for(var j=this.m.subn(1),et=0;!j.isZero()&&j.andln(1)===0;)et++,j.iushrn(1);n(!j.isZero());var it=new c(1).toRed(this),ut=it.redNeg(),J=this.m.subn(1).iushrn(1),X=this.m.bitLength();for(X=new c(2*X*X).toRed(this);this.pow(X,J).cmp(ut)!==0;)X.redIAdd(ut);for(var tt=this.pow(X,j),V=this.pow(O,j.addn(1).iushrn(1)),Q=this.pow(O,j),ot=et;Q.cmp(it)!==0;){for(var $=Q,Z=0;$.cmp(it)!==0;Z++)$=$.redSqr();n(Z=0;et--){for(var tt=H.words[et],V=X-1;V>=0;V--){var Q=tt>>V&1;if(it!==j[0]&&(it=this.sqr(it)),Q===0&&ut===0){J=0;continue}ut<<=1,ut|=Q,J++,!(J!==Y&&(et!==0||V!==0))&&(it=this.mul(it,j[ut]),J=0,ut=0)}X=26}return it},I.prototype.convertTo=function(O){var H=O.umod(this.m);return H===O?H.clone():H},I.prototype.convertFrom=function(O){var H=O.clone();return H.red=null,H},c.mont=function(O){return new k(O)};function k(B){I.call(this,B),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}f(k,I),k.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},k.prototype.convertFrom=function(O){var H=this.imod(O.mul(this.rinv));return H.red=null,H},k.prototype.imul=function(O,H){if(O.isZero()||H.isZero())return O.words[0]=0,O.length=1,O;var Y=O.imul(H),j=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),et=Y.isub(j).iushrn(this.shift),it=et;return et.cmp(this.m)>=0?it=et.isub(this.m):et.cmpn(0)<0&&(it=et.iadd(this.m)),it._forceRed(this)},k.prototype.mul=function(O,H){if(O.isZero()||H.isZero())return new c(0)._forceRed(this);var Y=O.mul(H),j=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),et=Y.isub(j).iushrn(this.shift),it=et;return et.cmp(this.m)>=0?it=et.isub(this.m):et.cmpn(0)<0&&(it=et.iadd(this.m)),it._forceRed(this)},k.prototype.invm=function(O){var H=this.imod(O._invmp(this.m).mul(this.r2));return H._forceRed(this)}}(v,this)},2692:function(v){v.exports=p;function p(r){var e,a,n,f=r.length,c=0;for(e=0;e>>1;if(!(T<=0)){var s,L=e.mallocDouble(2*T*y),M=e.mallocInt32(y);if(y=c(d,T,L,M),y>0){if(T===1&&_)a.init(y),s=a.sweepComplete(T,A,0,y,L,M,0,y,L,M);else{var z=e.mallocDouble(2*T*E),D=e.mallocInt32(E);E=c(w,T,z,D),E>0&&(a.init(y+E),T===1?s=a.sweepBipartite(T,A,0,y,L,M,0,E,z,D):s=n(T,A,_,y,L,M,E,z,D),e.free(z),e.free(D))}e.free(L),e.free(M)}return s}}}var m;function h(d,w){m.push([d,w])}function b(d){return m=[],l(d,d,h,!0),m}function u(d,w){return m=[],l(d,w,h,!1),m}function o(d,w,A){switch(arguments.length){case 1:return b(d);case 2:return typeof w=="function"?l(d,d,w,!0):u(d,w);case 3:return l(d,w,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},7333:function(v,p){function r(){function n(l,m,h,b,u,o,d,w,A,_,y){for(var E=2*l,T=b,s=E*b;TA-w?n(l,m,h,b,u,o,d,w,A,_,y):f(l,m,h,b,u,o,d,w,A,_,y)}return c}function e(){function n(h,b,u,o,d,w,A,_,y,E,T){for(var s=2*h,L=o,M=s*o;LE-y?o?n(h,b,u,d,w,A,_,y,E,T,s):f(h,b,u,d,w,A,_,y,E,T,s):o?c(h,b,u,d,w,A,_,y,E,T,s):l(h,b,u,d,w,A,_,y,E,T,s)}return m}function a(n){return n?r():e()}p.partial=a(!1),p.full=a(!0)},2337:function(v,p,r){v.exports=B;var e=r(5306),a=r(2288),n=r(7333),f=n.partial,c=n.full,l=r(1390),m=r(2464),h=r(122),b=128,u=1<<22,o=1<<22,d=h("!(lo>=p0)&&!(p1>=hi)"),w=h("lo===p0"),A=h("lo0;){tt-=1;var ot=tt*T,$=M[ot],Z=M[ot+1],st=M[ot+2],nt=M[ot+3],ct=M[ot+4],gt=M[ot+5],Tt=tt*s,wt=z[Tt],Rt=z[Tt+1],bt=gt&1,At=!!(gt&16),mt=et,Lt=it,Ht=J,Ut=X;if(bt&&(mt=J,Lt=X,Ht=et,Ut=it),!(gt&2&&(st=A(O,$,Z,st,mt,Lt,Rt),Z>=st))&&!(gt&4&&(Z=_(O,$,Z,st,mt,Lt,wt),Z>=st))){var kt=st-Z,Vt=ct-nt;if(At){if(O*kt*(kt+Vt)h&&u[E+m]>_;--y,E-=d){for(var T=E,s=E+d,L=0;L>>1,_=2*l,y=A,E=u[_*A+m];d=z?(y=M,E=z):L>=N?(y=s,E=L):(y=D,E=N):z>=N?(y=M,E=z):N>=L?(y=s,E=L):(y=D,E=N);for(var B=_*(w-1),O=_*y,I=0;I<_;++I,++B,++O){var k=u[B];u[B]=u[O],u[O]=k}var H=o[w-1];o[w-1]=o[y],o[y]=H,y=a(l,m,d,w-1,u,o,E);for(var B=_*(w-1),O=_*y,I=0;I<_;++I,++B,++O){var k=u[B];u[B]=u[O],u[O]=k}var H=o[w-1];if(o[w-1]=o[y],o[y]=H,A=p0)&&!(p1>=hi)":m};function r(h){return p[h]}function e(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s];if(z===A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function a(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s];if(zD;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function n(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+L];if(z<=A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function f(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+L];if(z<=A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function c(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s],D=d[y+L];if(z<=A&&A<=D)if(T===M)T+=1,E+=_;else{for(var N=0;_>N;++N){var I=d[y+N];d[y+N]=d[E],d[E++]=I}var k=w[M];w[M]=w[T],w[T++]=k}}return T}function l(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s],D=d[y+L];if(zN;++N){var I=d[y+N];d[y+N]=d[E],d[E++]=I}var k=w[M];w[M]=w[T],w[T++]=k}}return T}function m(h,b,u,o,d,w,A,_){for(var y=2*h,E=y*u,T=E,s=u,L=b,M=h+b,z=u;o>z;++z,E+=y){var D=d[E+L],N=d[E+M];if(!(D>=A)&&!(_>=N))if(s===z)s+=1,T+=y;else{for(var I=0;y>I;++I){var k=d[E+I];d[E+I]=d[T],d[T++]=k}var B=w[z];w[z]=w[s],w[s++]=B}}return s}},309:function(v){v.exports=r;var p=32;function r(b,u){u<=4*p?e(0,u-1,b):h(0,u-1,b)}function e(b,u,o){for(var d=2*(b+1),w=b+1;w<=u;++w){for(var A=o[d++],_=o[d++],y=w,E=d-2;y-- >b;){var T=o[E-2],s=o[E-1];if(To[u+1]:!0}function m(b,u,o,d){b*=2;var w=d[b];return w>1,y=_-d,E=_+d,T=w,s=y,L=_,M=E,z=A,D=b+1,N=u-1,I=0;l(T,s,o)&&(I=T,T=s,s=I),l(M,z,o)&&(I=M,M=z,z=I),l(T,L,o)&&(I=T,T=L,L=I),l(s,L,o)&&(I=s,s=L,L=I),l(T,M,o)&&(I=T,T=M,M=I),l(L,M,o)&&(I=L,L=M,M=I),l(s,z,o)&&(I=s,s=z,z=I),l(s,L,o)&&(I=s,s=L,L=I),l(M,z,o)&&(I=M,M=z,z=I);for(var k=o[2*s],B=o[2*s+1],O=o[2*M],H=o[2*M+1],Y=2*T,j=2*L,et=2*z,it=2*w,ut=2*_,J=2*A,X=0;X<2;++X){var tt=o[Y+X],V=o[j+X],Q=o[et+X];o[it+X]=tt,o[ut+X]=V,o[J+X]=Q}n(y,b,o),n(E,u,o);for(var ot=D;ot<=N;++ot)if(m(ot,k,B,o))ot!==D&&a(ot,D,o),++D;else if(!m(ot,O,H,o))for(;;)if(m(N,O,H,o)){m(N,k,B,o)?(f(ot,D,N,o),++D,--N):(a(ot,N,o),--N);break}else{if(--N>>1;n(d,V);for(var Q=0,ot=0,ut=0;ut=f)$=$-f|0,A(h,b,ot--,$);else if($>=0)A(l,m,Q--,$);else if($<=-f){$=-$-f|0;for(var Z=0;Z>>1;n(d,V);for(var Q=0,ot=0,$=0,ut=0;ut>1===d[2*ut+3]>>1&&(st=2,ut+=1),Z<0){for(var nt=-(Z>>1)-1,ct=0;ct<$;++ct){var gt=M(u[ct],nt);if(gt!==void 0)return gt}if(st!==0)for(var ct=0;ct>1)-1;st===0?A(l,m,Q--,nt):st===1?A(h,b,ot--,nt):st===2&&A(u,o,$--,nt)}}}function T(L,M,z,D,N,I,k,B,O,H,Y,j){var et=0,it=2*L,ut=M,J=M+L,X=1,tt=1;D?tt=f:X=f;for(var V=N;V>>1;n(d,Z);for(var st=0,V=0;V=f?(ct=!D,Q-=f):(ct=!!D,Q-=1),ct)_(l,m,st++,Q);else{var gt=j[Q],Tt=it*Q,wt=Y[Tt+M+1],Rt=Y[Tt+M+1+L];t:for(var bt=0;bt>>1;n(d,Q);for(var ot=0,J=0;J=f)l[ot++]=X-f;else{X-=1;var Z=Y[X],st=et*X,nt=H[st+M+1],ct=H[st+M+1+L];t:for(var gt=0;gt=0;--gt)if(l[gt]===X){for(var bt=gt+1;bt0;){for(var d=l.pop(),b=l.pop(),w=-1,A=-1,u=h[b],y=1;y=0||(c.flip(b,d),a(f,c,l,w,b,A),a(f,c,l,b,A,w),a(f,c,l,A,d,w),a(f,c,l,d,w,A))}}},7098:function(v,p,r){var e=r(5070);v.exports=m;function a(h,b,u,o,d,w,A){this.cells=h,this.neighbor=b,this.flags=o,this.constraint=u,this.active=d,this.next=w,this.boundary=A}var n=a.prototype;function f(h,b){return h[0]-b[0]||h[1]-b[1]||h[2]-b[2]}n.locate=function(){var h=[0,0,0];return function(b,u,o){var d=b,w=u,A=o;return u0||A.length>0;){for(;w.length>0;){var s=w.pop();if(_[s]!==-d){_[s]=d,y[s];for(var L=0;L<3;++L){var M=T[3*s+L];M>=0&&_[M]===0&&(E[3*s+L]?A.push(M):(w.push(M),_[M]=d))}}}var z=A;A=w,w=z,A.length=0,d=-d}var D=l(y,_,b);return u?D.concat(o.boundary):D}},9971:function(v,p,r){var e=r(5070),a=r(417)[3],n=0,f=1,c=2;v.exports=A;function l(_,y,E,T,s){this.a=_,this.b=y,this.idx=E,this.lowerIds=T,this.upperIds=s}function m(_,y,E,T){this.a=_,this.b=y,this.type=E,this.idx=T}function h(_,y){var E=_.a[0]-y.a[0]||_.a[1]-y.a[1]||_.type-y.type;return E||_.type!==n&&(E=a(_.a,_.b,y.b),E)?E:_.idx-y.idx}function b(_,y){return a(_.a,_.b,y)}function u(_,y,E,T,s){for(var L=e.lt(y,T,b),M=e.gt(y,T,b),z=L;z1&&a(E[N[k-2]],E[N[k-1]],T)>0;)_.push([N[k-1],N[k-2],s]),k-=1;N.length=k,N.push(s);for(var I=D.upperIds,k=I.length;k>1&&a(E[I[k-2]],E[I[k-1]],T)<0;)_.push([I[k-2],I[k-1],s]),k-=1;I.length=k,I.push(s)}}function o(_,y){var E;return _.a[0]D[0]&&s.push(new m(D,z,c,L),new m(z,D,f,L))}s.sort(h);for(var N=s[0].a[0]-(1+Math.abs(s[0].a[0]))*Math.pow(2,-52),I=[new l([N,1],[N,0],-1,[],[])],k=[],L=0,B=s.length;L=0}}(),n.removeTriangle=function(l,m,h){var b=this.stars;f(b[l],m,h),f(b[m],h,l),f(b[h],l,m)},n.addTriangle=function(l,m,h){var b=this.stars;b[l].push(m,h),b[m].push(h,l),b[h].push(l,m)},n.opposite=function(l,m){for(var h=this.stars[m],b=1,u=h.length;b=0;--O){var tt=k[O];H=tt[0];var V=N[H],Q=V[0],ot=V[1],$=D[Q],Z=D[ot];if(($[0]-Z[0]||$[1]-Z[1])<0){var st=Q;Q=ot,ot=st}V[0]=Q;var nt=V[1]=tt[1],ct;for(B&&(ct=V[2]);O>0&&k[O-1][0]===H;){var tt=k[--O],gt=tt[1];B?N.push([nt,gt,ct]):N.push([nt,gt]),nt=gt}B?N.push([nt,ot,ct]):N.push([nt,ot])}return Y}function y(D,N,I){for(var k=N.length,B=new e(k),O=[],H=0;HN[2]?1:0)}function s(D,N,I){if(D.length!==0){if(N)for(var k=0;k0||H.length>0}function z(D,N,I){var k;if(I){k=N;for(var B=new Array(N.length),O=0;O_+1)throw new Error(w+" map requires nshades to be at least size "+d.length);Array.isArray(m.alpha)?m.alpha.length!==2?y=[1,1]:y=m.alpha.slice():typeof m.alpha=="number"?y=[m.alpha,m.alpha]:y=[1,1],h=d.map(function(z){return Math.round(z.index*_)}),y[0]=Math.min(Math.max(y[0],0),1),y[1]=Math.min(Math.max(y[1],0),1);var T=d.map(function(z,D){var N=d[D].index,I=d[D].rgb.slice();return I.length===4&&I[3]>=0&&I[3]<=1||(I[3]=y[0]+(y[1]-y[0])*N),I}),s=[];for(E=0;E=0}function m(h,b,u,o){var d=e(b,u,o);if(d===0){var w=a(e(h,b,u)),A=a(e(h,b,o));if(w===A){if(w===0){var _=l(h,b,u),y=l(h,b,o);return _===y?0:_?1:-1}return 0}else{if(A===0)return w>0||l(h,b,o)?-1:1;if(w===0)return A>0||l(h,b,u)?1:-1}return a(A-w)}var E=e(h,b,u);if(E>0)return d>0&&e(h,b,o)>0?1:-1;if(E<0)return d>0||e(h,b,o)>0?1:-1;var T=e(h,b,o);return T>0||l(h,b,u)?1:-1}},7538:function(v){v.exports=function(r){return r<0?-1:r>0?1:0}},9209:function(v){v.exports=e;var p=Math.min;function r(a,n){return a-n}function e(a,n){var f=a.length,c=a.length-n.length;if(c)return c;switch(f){case 0:return 0;case 1:return a[0]-n[0];case 2:return a[0]+a[1]-n[0]-n[1]||p(a[0],a[1])-p(n[0],n[1]);case 3:var l=a[0]+a[1],m=n[0]+n[1];if(c=l+a[2]-(m+n[2]),c)return c;var h=p(a[0],a[1]),b=p(n[0],n[1]);return p(h,a[2])-p(b,n[2])||p(h+a[2],l)-p(b+n[2],m);case 4:var u=a[0],o=a[1],d=a[2],w=a[3],A=n[0],_=n[1],y=n[2],E=n[3];return u+o+d+w-(A+_+y+E)||p(u,o,d,w)-p(A,_,y,E,A)||p(u+o,u+d,u+w,o+d,o+w,d+w)-p(A+_,A+y,A+E,_+y,_+E,y+E)||p(u+o+d,u+o+w,u+d+w,o+d+w)-p(A+_+y,A+_+E,A+y+E,_+y+E);default:for(var T=a.slice().sort(r),s=n.slice().sort(r),L=0;Lr[a][0]&&(a=n);return ea?[[a],[e]]:[[e]]}},8722:function(v,p,r){v.exports=a;var e=r(3266);function a(n){var f=e(n),c=f.length;if(c<=2)return[];for(var l=new Array(c),m=f[c-1],h=0;h=m[A]&&(w+=1);o[d]=w}}return l}function c(l,m){try{return e(l,!0)}catch{var h=a(l);if(h.length<=m)return[];var b=n(l,h),u=e(b,!0);return f(u,h)}}},9680:function(v){function p(e,a,n,f,c,l){var m=6*c*c-6*c,h=3*c*c-4*c+1,b=-6*c*c+6*c,u=3*c*c-2*c;if(e.length){l||(l=new Array(e.length));for(var o=e.length-1;o>=0;--o)l[o]=m*e[o]+h*a[o]+b*n[o]+u*f[o];return l}return m*e+h*a+b*n[o]+u*f}function r(e,a,n,f,c,l){var m=c-1,h=c*c,b=m*m,u=(1+2*c)*b,o=c*b,d=h*(3-2*c),w=h*m;if(e.length){l||(l=new Array(e.length));for(var A=e.length-1;A>=0;--A)l[A]=u*e[A]+o*a[A]+d*n[A]+w*f[A];return l}return u*e+o*a+d*n+w*f}v.exports=r,v.exports.derivative=p},4419:function(v,p,r){var e=r(2183),a=r(1215);v.exports=l;function n(m,h){this.point=m,this.index=h}function f(m,h){for(var b=m.point,u=h.point,o=b.length,d=0;d=2)return!1;I[B]=O}return!0}):N=N.filter(function(I){for(var k=0;k<=u;++k){var B=L[I[k]];if(B<0)return!1;I[k]=B}return!0}),u&1)for(var w=0;w>>31},v.exports.exponent=function(n){var f=v.exports.hi(n);return(f<<1>>>21)-1023},v.exports.fraction=function(n){var f=v.exports.lo(n),c=v.exports.hi(n),l=c&(1<<20)-1;return c&2146435072&&(l+=1048576),[f,l]},v.exports.denormalized=function(n){var f=v.exports.hi(n);return!(f&2146435072)}},3094:function(v){function p(a,n,f){var c=a[f]|0;if(c<=0)return[];var l=new Array(c),m;if(f===a.length-1)for(m=0;m"u"&&(n=0),typeof a){case"number":if(a>0)return r(a|0,n);break;case"object":if(typeof a.length=="number")return p(a,n,0);break}return[]}v.exports=e},8348:function(v,p,r){v.exports=a;var e=r(1215);function a(n,f){var c=n.length;if(typeof f!="number"){f=0;for(var l=0;l=u-1)for(var E=w.length-1,s=h-b[u-1],T=0;T<_;++T,--E)d[T]=w[E]+s*A[E];else{for(var E=_*(o+1)-1,L=b[o],M=b[o+1],z=M-L||1,D=this._scratch[1],N=this._scratch[2],I=this._scratch[3],k=this._scratch[4],B=!0,T=0;T<_;++T,--E)D[T]=w[E],I[T]=A[E]*z,N[T]=w[E+_],k[T]=A[E+_]*z,B=B&&D[T]===N[T]&&I[T]===k[T]&&I[T]===0;if(B)for(var T=0;T<_;++T)d[T]=D[T];else e(D,I,N,k,(h-L)/z,d)}for(var O=y[0],H=y[1],T=0;T<_;++T)d[T]=n(O[T],H[T],d[T]);return d},c.dcurve=function(h){var b=this._time,u=b.length,o=a.le(b,h),d=this._scratch[0],w=this._state,A=this._velocity,_=this.dimension;if(o>=u-1){var y=w.length-1;h-b[u-1];for(var E=0;E<_;++E,--y)d[E]=A[y]}else{for(var y=_*(o+1)-1,T=b[o],s=b[o+1],L=s-T||1,M=this._scratch[1],z=this._scratch[2],D=this._scratch[3],N=this._scratch[4],I=!0,E=0;E<_;++E,--y)M[E]=w[y],D[E]=A[y]*L,z[E]=w[y+_],N[E]=A[y+_]*L,I=I&&M[E]===z[E]&&D[E]===N[E]&&D[E]===0;if(I)for(var E=0;E<_;++E)d[E]=0;else{e.derivative(M,D,z,N,(h-T)/L,d);for(var E=0;E<_;++E)d[E]/=L}}return d},c.lastT=function(){var h=this._time;return h[h.length-1]},c.stable=function(){for(var h=this._velocity,b=h.length,u=this.dimension-1;u>=0;--u)if(h[--b])return!1;return!0},c.jump=function(h){var b=this.lastT(),u=this.dimension;if(!(h0;--T)o.push(n(_[T-1],y[T-1],arguments[T])),d.push(0)}},c.push=function(h){var b=this.lastT(),u=this.dimension;if(!(h1e-6?1/A:0;this._time.push(h);for(var s=u;s>0;--s){var L=n(y[s-1],E[s-1],arguments[s]);o.push(L),d.push((L-o[w++])*T)}}},c.set=function(h){var b=this.dimension;if(!(h0;--_)u.push(n(w[_-1],A[_-1],arguments[_])),o.push(0)}},c.move=function(h){var b=this.lastT(),u=this.dimension;if(!(h<=b||arguments.length!==u+1)){var o=this._state,d=this._velocity,w=o.length-this.dimension,A=this.bounds,_=A[0],y=A[1],E=h-b,T=E>1e-6?1/E:0;this._time.push(h);for(var s=u;s>0;--s){var L=arguments[s];o.push(n(_[s-1],y[s-1],o[w++]+L)),d.push(L*T)}}},c.idle=function(h){var b=this.lastT();if(!(h=0;--T)o.push(n(_[T],y[T],o[w]+E*d[w])),d.push(0),w+=1}};function l(h){for(var b=new Array(h),u=0;u=0;--D){var s=L[D];M[D]<=0?L[D]=new e(s._color,s.key,s.value,L[D+1],s.right,s._count+1):L[D]=new e(s._color,s.key,s.value,s.left,L[D+1],s._count+1)}for(var D=L.length-1;D>1;--D){var N=L[D-1],s=L[D];if(N._color===r||s._color===r)break;var I=L[D-2];if(I.left===N)if(N.left===s){var k=I.right;if(k&&k._color===p)N._color=r,I.right=n(r,k),I._color=p,D-=1;else{if(I._color=p,I.left=N.right,N._color=r,N.right=I,L[D-2]=N,L[D-1]=s,f(I),f(N),D>=3){var B=L[D-3];B.left===I?B.left=N:B.right=N}break}}else{var k=I.right;if(k&&k._color===p)N._color=r,I.right=n(r,k),I._color=p,D-=1;else{if(N.right=s.left,I._color=p,I.left=s.right,s._color=r,s.left=N,s.right=I,L[D-2]=s,L[D-1]=N,f(I),f(N),f(s),D>=3){var B=L[D-3];B.left===I?B.left=s:B.right=s}break}}else if(N.right===s){var k=I.left;if(k&&k._color===p)N._color=r,I.left=n(r,k),I._color=p,D-=1;else{if(I._color=p,I.right=N.left,N._color=r,N.left=I,L[D-2]=N,L[D-1]=s,f(I),f(N),D>=3){var B=L[D-3];B.right===I?B.right=N:B.left=N}break}}else{var k=I.left;if(k&&k._color===p)N._color=r,I.left=n(r,k),I._color=p,D-=1;else{if(N.left=s.right,I._color=p,I.right=s.left,s._color=r,s.right=N,s.left=I,L[D-2]=s,L[D-1]=N,f(I),f(N),f(s),D>=3){var B=L[D-3];B.right===I?B.right=s:B.left=s}break}}}return L[0]._color=r,new c(T,L[0])};function m(y,E){if(E.left){var T=m(y,E.left);if(T)return T}var T=y(E.key,E.value);if(T)return T;if(E.right)return m(y,E.right)}function h(y,E,T,s){var L=E(y,s.key);if(L<=0){if(s.left){var M=h(y,E,T,s.left);if(M)return M}var M=T(s.key,s.value);if(M)return M}if(s.right)return h(y,E,T,s.right)}function b(y,E,T,s,L){var M=T(y,L.key),z=T(E,L.key),D;if(M<=0&&(L.left&&(D=b(y,E,T,s,L.left),D)||z>0&&(D=s(L.key,L.value),D)))return D;if(z>0&&L.right)return b(y,E,T,s,L.right)}l.forEach=function(E,T,s){if(this.root)switch(arguments.length){case 1:return m(E,this.root);case 2:return h(T,this._compare,E,this.root);case 3:return this._compare(T,s)>=0?void 0:b(T,s,this._compare,E,this.root)}},Object.defineProperty(l,"begin",{get:function(){for(var y=[],E=this.root;E;)y.push(E),E=E.left;return new u(this,y)}}),Object.defineProperty(l,"end",{get:function(){for(var y=[],E=this.root;E;)y.push(E),E=E.right;return new u(this,y)}}),l.at=function(y){if(y<0)return new u(this,[]);for(var E=this.root,T=[];;){if(T.push(E),E.left){if(y=E.right._count)break;E=E.right}else break}return new u(this,[])},l.ge=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M<=0&&(L=s.length),M<=0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.gt=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M<0&&(L=s.length),M<0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.lt=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M>0&&(L=s.length),M<=0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.le=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M>=0&&(L=s.length),M<0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.find=function(y){for(var E=this._compare,T=this.root,s=[];T;){var L=E(y,T.key);if(s.push(T),L===0)return new u(this,s);L<=0?T=T.left:T=T.right}return new u(this,[])},l.remove=function(y){var E=this.find(y);return E?E.remove():this},l.get=function(y){for(var E=this._compare,T=this.root;T;){var s=E(y,T.key);if(s===0)return T.value;s<=0?T=T.left:T=T.right}};function u(y,E){this.tree=y,this._stack=E}var o=u.prototype;Object.defineProperty(o,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(o,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),o.clone=function(){return new u(this.tree,this._stack.slice())};function d(y,E){y.key=E.key,y.value=E.value,y.left=E.left,y.right=E.right,y._color=E._color,y._count=E._count}function w(y){for(var E,T,s,L,M=y.length-1;M>=0;--M){if(E=y[M],M===0){E._color=r;return}if(T=y[M-1],T.left===E){if(s=T.right,s.right&&s.right._color===p){if(s=T.right=a(s),L=s.right=a(s.right),T.right=s.left,s.left=T,s.right=L,s._color=T._color,E._color=r,T._color=r,L._color=r,f(T),f(s),M>1){var z=y[M-2];z.left===T?z.left=s:z.right=s}y[M-1]=s;return}else if(s.left&&s.left._color===p){if(s=T.right=a(s),L=s.left=a(s.left),T.right=L.left,s.left=L.right,L.left=T,L.right=s,L._color=T._color,T._color=r,s._color=r,E._color=r,f(T),f(s),f(L),M>1){var z=y[M-2];z.left===T?z.left=L:z.right=L}y[M-1]=L;return}if(s._color===r)if(T._color===p){T._color=r,T.right=n(p,s);return}else{T.right=n(p,s);continue}else{if(s=a(s),T.right=s.left,s.left=T,s._color=T._color,T._color=p,f(T),f(s),M>1){var z=y[M-2];z.left===T?z.left=s:z.right=s}y[M-1]=s,y[M]=T,M+11){var z=y[M-2];z.right===T?z.right=s:z.left=s}y[M-1]=s;return}else if(s.right&&s.right._color===p){if(s=T.left=a(s),L=s.right=a(s.right),T.left=L.right,s.right=L.left,L.right=T,L.left=s,L._color=T._color,T._color=r,s._color=r,E._color=r,f(T),f(s),f(L),M>1){var z=y[M-2];z.right===T?z.right=L:z.left=L}y[M-1]=L;return}if(s._color===r)if(T._color===p){T._color=r,T.left=n(p,s);return}else{T.left=n(p,s);continue}else{if(s=a(s),T.left=s.right,s.right=T,s._color=T._color,T._color=p,f(T),f(s),M>1){var z=y[M-2];z.right===T?z.right=s:z.left=s}y[M-1]=s,y[M]=T,M+1=0;--s){var T=y[s];T.left===y[s+1]?E[s]=new e(T._color,T.key,T.value,E[s+1],T.right,T._count):E[s]=new e(T._color,T.key,T.value,T.left,E[s+1],T._count)}if(T=E[E.length-1],T.left&&T.right){var L=E.length;for(T=T.left;T.right;)E.push(T),T=T.right;var M=E[L-1];E.push(new e(T._color,M.key,M.value,T.left,T.right,T._count)),E[L-1].key=T.key,E[L-1].value=T.value;for(var s=E.length-2;s>=L;--s)T=E[s],E[s]=new e(T._color,T.key,T.value,T.left,E[s+1],T._count);E[L-1].left=E[L]}if(T=E[E.length-1],T._color===p){var z=E[E.length-2];z.left===T?z.left=null:z.right===T&&(z.right=null),E.pop();for(var s=0;s0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(o,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(o,"index",{get:function(){var y=0,E=this._stack;if(E.length===0){var T=this.tree.root;return T?T._count:0}else E[E.length-1].left&&(y=E[E.length-1].left._count);for(var s=E.length-2;s>=0;--s)E[s+1]===E[s].right&&(++y,E[s].left&&(y+=E[s].left._count));return y},enumerable:!0}),o.next=function(){var y=this._stack;if(y.length!==0){var E=y[y.length-1];if(E.right)for(E=E.right;E;)y.push(E),E=E.left;else for(y.pop();y.length>0&&y[y.length-1].right===E;)E=y[y.length-1],y.pop()}},Object.defineProperty(o,"hasNext",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].right)return!0;for(var E=y.length-1;E>0;--E)if(y[E-1].left===y[E])return!0;return!1}}),o.update=function(y){var E=this._stack;if(E.length===0)throw new Error("Can't update empty node!");var T=new Array(E.length),s=E[E.length-1];T[T.length-1]=new e(s._color,s.key,y,s.left,s.right,s._count);for(var L=E.length-2;L>=0;--L)s=E[L],s.left===E[L+1]?T[L]=new e(s._color,s.key,s.value,T[L+1],s.right,s._count):T[L]=new e(s._color,s.key,s.value,s.left,T[L+1],s._count);return new c(this.tree._compare,T[0])},o.prev=function(){var y=this._stack;if(y.length!==0){var E=y[y.length-1];if(E.left)for(E=E.left;E;)y.push(E),E=E.right;else for(y.pop();y.length>0&&y[y.length-1].left===E;)E=y[y.length-1],y.pop()}},Object.defineProperty(o,"hasPrev",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].left)return!0;for(var E=y.length-1;E>0;--E)if(y[E-1].right===y[E])return!0;return!1}});function A(y,E){return yE?1:0}function _(y){return new c(y||A,null)}},7453:function(v,p,r){v.exports=s;var e=r(9557),a=r(1681),n=r(1011),f=r(2864),c=r(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function m(L,M){return L[0]=M[0],L[1]=M[1],L[2]=M[2],L}function h(L){this.gl=L,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(L)}var b=h.prototype;b.update=function(L){L=L||{};function M(it,ut,J){if(J in L){var X=L[J],tt=this[J],V;(it?Array.isArray(X)&&Array.isArray(X[0]):Array.isArray(X))?this[J]=V=[ut(X[0]),ut(X[1]),ut(X[2])]:this[J]=V=[ut(X),ut(X),ut(X)];for(var Q=0;Q<3;++Q)if(V[Q]!==tt[Q])return!0}return!1}var z=M.bind(this,!1,Number),D=M.bind(this,!1,Boolean),N=M.bind(this,!1,String),I=M.bind(this,!0,function(it){if(Array.isArray(it)){if(it.length===3)return[+it[0],+it[1],+it[2],1];if(it.length===4)return[+it[0],+it[1],+it[2],+it[3]]}return[0,0,0,1]}),k,B=!1,O=!1;if("bounds"in L)for(var H=L.bounds,Y=0;Y<2;++Y)for(var j=0;j<3;++j)H[Y][j]!==this.bounds[Y][j]&&(O=!0),this.bounds[Y][j]=H[Y][j];if("ticks"in L){k=L.ticks,B=!0,this.autoTicks=!1;for(var Y=0;Y<3;++Y)this.tickSpacing[Y]=0}else z("tickSpacing")&&(this.autoTicks=!0,O=!0);if(this._firstInit&&("ticks"in L||"tickSpacing"in L||(this.autoTicks=!0),O=!0,B=!0,this._firstInit=!1),O&&this.autoTicks&&(k=c.create(this.bounds,this.tickSpacing),B=!0),B){for(var Y=0;Y<3;++Y)k[Y].sort(function(ut,J){return ut.x-J.x});c.equal(k,this.ticks)?B=!1:this.ticks=k}D("tickEnable"),N("tickFont")&&(B=!0),z("tickSize"),z("tickAngle"),z("tickPad"),I("tickColor");var et=N("labels");N("labelFont")&&(et=!0),D("labelEnable"),z("labelSize"),z("labelPad"),I("labelColor"),D("lineEnable"),D("lineMirror"),z("lineWidth"),I("lineColor"),D("lineTickEnable"),D("lineTickMirror"),z("lineTickLength"),z("lineTickWidth"),I("lineTickColor"),D("gridEnable"),z("gridWidth"),I("gridColor"),D("zeroEnable"),I("zeroLineColor"),z("zeroLineWidth"),D("backgroundEnable"),I("backgroundColor"),this._text?this._text&&(et||B)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=e(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&B&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};function u(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var o=[new u,new u,new u];function d(L,M,z,D,N){for(var I=L.primalOffset,k=L.primalMinor,B=L.mirrorOffset,O=L.mirrorMinor,H=D[M],Y=0;Y<3;++Y)if(M!==Y){var j=I,et=B,it=k,ut=O;H&1<0?(it[Y]=-1,ut[Y]=0):(it[Y]=0,ut[Y]=1)}}var w=[0,0,0],A={model:l,view:l,projection:l,_ortho:!1};b.isOpaque=function(){return!0},b.isTransparent=function(){return!1},b.drawTransparent=function(L){};var _=0,y=[0,0,0],E=[0,0,0],T=[0,0,0];b.draw=function(L){L=L||A;for(var tt=this.gl,M=L.model||l,z=L.view||l,D=L.projection||l,N=this.bounds,I=L._ortho||!1,k=f(M,z,D,N,I),B=k.cubeEdges,O=k.axis,H=z[12],Y=z[13],j=z[14],et=z[15],it=I?2:1,ut=it*this.pixelRatio*(D[3]*H+D[7]*Y+D[11]*j+D[15]*et)/tt.drawingBufferHeight,J=0;J<3;++J)this.lastCubeProps.cubeEdges[J]=B[J],this.lastCubeProps.axis[J]=O[J];for(var X=o,J=0;J<3;++J)d(o[J],J,this.bounds,B,O);for(var tt=this.gl,V=w,J=0;J<3;++J)this.backgroundEnable[J]?V[J]=O[J]:V[J]=0;this._background.draw(M,z,D,N,V,this.backgroundColor),this._lines.bind(M,z,D,this);for(var J=0;J<3;++J){var Q=[0,0,0];O[J]>0?Q[J]=N[1][J]:Q[J]=N[0][J];for(var ot=0;ot<2;++ot){var $=(J+1+ot)%3,Z=(J+1+(ot^1))%3;this.gridEnable[$]&&this._lines.drawGrid($,Z,this.bounds,Q,this.gridColor[$],this.gridWidth[$]*this.pixelRatio)}for(var ot=0;ot<2;++ot){var $=(J+1+ot)%3,Z=(J+1+(ot^1))%3;this.zeroEnable[Z]&&Math.min(N[0][Z],N[1][Z])<=0&&Math.max(N[0][Z],N[1][Z])>=0&&this._lines.drawZero($,Z,this.bounds,Q,this.zeroLineColor[Z],this.zeroLineWidth[Z]*this.pixelRatio)}}for(var J=0;J<3;++J){this.lineEnable[J]&&this._lines.drawAxisLine(J,this.bounds,X[J].primalOffset,this.lineColor[J],this.lineWidth[J]*this.pixelRatio),this.lineMirror[J]&&this._lines.drawAxisLine(J,this.bounds,X[J].mirrorOffset,this.lineColor[J],this.lineWidth[J]*this.pixelRatio);for(var st=m(y,X[J].primalMinor),nt=m(E,X[J].mirrorMinor),ct=this.lineTickLength,ot=0;ot<3;++ot){var gt=ut/M[5*ot];st[ot]*=ct[ot]*gt,nt[ot]*=ct[ot]*gt}this.lineTickEnable[J]&&this._lines.drawAxisTicks(J,X[J].primalOffset,st,this.lineTickColor[J],this.lineTickWidth[J]*this.pixelRatio),this.lineTickMirror[J]&&this._lines.drawAxisTicks(J,X[J].mirrorOffset,nt,this.lineTickColor[J],this.lineTickWidth[J]*this.pixelRatio)}this._lines.unbind(),this._text.bind(M,z,D,this.pixelRatio);var Tt,wt=.5,Rt,bt;function At(Vt){bt=[0,0,0],bt[Vt]=1}function mt(Vt,It,re){var Kt=(Vt+1)%3,$t=(Vt+2)%3,le=It[Kt],he=It[$t],de=re[Kt],xe=re[$t];if(le>0&&xe>0){At(Kt);return}else if(le>0&&xe<0){At(Kt);return}else if(le<0&&xe>0){At(Kt);return}else if(le<0&&xe<0){At(Kt);return}else if(he>0&&de>0){At($t);return}else if(he>0&&de<0){At($t);return}else if(he<0&&de>0){At($t);return}else if(he<0&&de<0){At($t);return}}for(var J=0;J<3;++J){for(var Lt=X[J].primalMinor,Ht=X[J].mirrorMinor,Ut=m(T,X[J].primalOffset),ot=0;ot<3;++ot)this.lineTickEnable[J]&&(Ut[ot]+=ut*Lt[ot]*Math.max(this.lineTickLength[ot],0)/M[5*ot]);var kt=[0,0,0];if(kt[J]=1,this.tickEnable[J]){this.tickAngle[J]===-3600?(this.tickAngle[J]=0,this.tickAlign[J]="auto"):this.tickAlign[J]=-1,Rt=1,Tt=[this.tickAlign[J],wt,Rt],Tt[0]==="auto"?Tt[0]=_:Tt[0]=parseInt(""+Tt[0]),bt=[0,0,0],mt(J,Lt,Ht);for(var ot=0;ot<3;++ot)Ut[ot]+=ut*Lt[ot]*this.tickPad[ot]/M[5*ot];this._text.drawTicks(J,this.tickSize[J],this.tickAngle[J],Ut,this.tickColor[J],kt,bt,Tt)}if(this.labelEnable[J]){Rt=0,bt=[0,0,0],this.labels[J].length>4&&(At(J),Rt=1),Tt=[this.labelAlign[J],wt,Rt],Tt[0]==="auto"?Tt[0]=_:Tt[0]=parseInt(""+Tt[0]);for(var ot=0;ot<3;++ot)Ut[ot]+=ut*Lt[ot]*this.labelPad[ot]/M[5*ot];Ut[J]+=.5*(N[0][J]+N[1][J]),this._text.drawLabel(J,this.labelSize[J],this.labelAngle[J],Ut,this.labelColor[J],[0,0,0],bt,Tt)}}this._text.unbind()},b.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function s(L,M){var z=new h(L);return z.update(M),z}},1011:function(v,p,r){v.exports=l;var e=r(5827),a=r(2944),n=r(1943).bg;function f(m,h,b,u){this.gl=m,this.buffer=h,this.vao=b,this.shader=u}var c=f.prototype;c.draw=function(m,h,b,u,o,d){for(var w=!1,A=0;A<3;++A)w=w||o[A];if(w){var _=this.gl;_.enable(_.POLYGON_OFFSET_FILL),_.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:h,projection:b,bounds:u,enable:o,colors:d},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),_.disable(_.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function l(m){for(var h=[],b=[],u=0,o=0;o<3;++o)for(var d=(o+1)%3,w=(o+2)%3,A=[0,0,0],_=[0,0,0],y=-1;y<=1;y+=2){b.push(u,u+2,u+1,u+1,u+2,u+3),A[o]=y,_[o]=y;for(var E=-1;E<=1;E+=2){A[d]=E;for(var T=-1;T<=1;T+=2)A[w]=T,h.push(A[0],A[1],A[2],_[0],_[1],_[2]),u+=1}var s=d;d=w,w=s}var L=e(m,new Float32Array(h)),M=e(m,new Uint16Array(b),m.ELEMENT_ARRAY_BUFFER),z=a(m,[{buffer:L,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:L,type:m.FLOAT,size:3,offset:12,stride:24}],M),D=n(m);return D.attributes.position.location=0,D.attributes.normal.location=1,new f(m,L,z,D)}},2864:function(v,p,r){v.exports=y;var e=r(2288),a=r(104),n=r(4670),f=r(417),c=new Array(16),l=new Array(8),m=new Array(8),h=new Array(3),b=[0,0,0];(function(){for(var E=0;E<8;++E)l[E]=[1,1,1,1],m[E]=[1,1,1]})();function u(E,T,s){for(var L=0;L<4;++L){E[L]=s[12+L];for(var M=0;M<3;++M)E[L]+=T[M]*s[4*M+L]}}var o=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(E){for(var T=0;Tet&&(k|=1<et){k|=1<m[D][1])&&(ot=D);for(var $=-1,D=0;D<3;++D){var Z=ot^1<m[st][0]&&(st=Z)}}var nt=w;nt[0]=nt[1]=nt[2]=0,nt[e.log2($^ot)]=ot&$,nt[e.log2(ot^st)]=ot&st;var ct=st^7;ct===k||ct===Q?(ct=$^7,nt[e.log2(st^ct)]=ct&st):nt[e.log2($^ct)]=ct&$;for(var gt=A,Tt=k,H=0;H<3;++H)Tt&1<"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u(xt){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Et){return Et.__proto__||Object.getPrototypeOf(Et)},u(xt)}function o(xt){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(yt){return typeof yt}:function(yt){return yt&&typeof Symbol=="function"&&yt.constructor===Symbol&&yt!==Symbol.prototype?"symbol":typeof yt},o(xt)}var d=r(3910),w=r(3187),A=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;p.lW=T,p.h2=50;var _=2147483647;T.TYPED_ARRAY_SUPPORT=y(),!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function y(){try{var xt=new Uint8Array(1),yt={foo:function(){return 42}};return Object.setPrototypeOf(yt,Uint8Array.prototype),Object.setPrototypeOf(xt,yt),xt.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}}),Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function E(xt){if(xt>_)throw new RangeError('The value "'+xt+'" is invalid for option "size"');var yt=new Uint8Array(xt);return Object.setPrototypeOf(yt,T.prototype),yt}function T(xt,yt,Et){if(typeof xt=="number"){if(typeof yt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return z(xt)}return s(xt,yt,Et)}T.poolSize=8192;function s(xt,yt,Et){if(typeof xt=="string")return D(xt,yt);if(ArrayBuffer.isView(xt))return I(xt);if(xt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(xt));if(zt(xt,ArrayBuffer)||xt&&zt(xt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(zt(xt,SharedArrayBuffer)||xt&&zt(xt.buffer,SharedArrayBuffer)))return k(xt,yt,Et);if(typeof xt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Mt=xt.valueOf&&xt.valueOf();if(Mt!=null&&Mt!==xt)return T.from(Mt,yt,Et);var Nt=B(xt);if(Nt)return Nt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof xt[Symbol.toPrimitive]=="function")return T.from(xt[Symbol.toPrimitive]("string"),yt,Et);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(xt))}T.from=function(xt,yt,Et){return s(xt,yt,Et)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function L(xt){if(typeof xt!="number")throw new TypeError('"size" argument must be of type number');if(xt<0)throw new RangeError('The value "'+xt+'" is invalid for option "size"')}function M(xt,yt,Et){return L(xt),xt<=0?E(xt):yt!==void 0?typeof Et=="string"?E(xt).fill(yt,Et):E(xt).fill(yt):E(xt)}T.alloc=function(xt,yt,Et){return M(xt,yt,Et)};function z(xt){return L(xt),E(xt<0?0:O(xt)|0)}T.allocUnsafe=function(xt){return z(xt)},T.allocUnsafeSlow=function(xt){return z(xt)};function D(xt,yt){if((typeof yt!="string"||yt==="")&&(yt="utf8"),!T.isEncoding(yt))throw new TypeError("Unknown encoding: "+yt);var Et=H(xt,yt)|0,Mt=E(Et),Nt=Mt.write(xt,yt);return Nt!==Et&&(Mt=Mt.slice(0,Nt)),Mt}function N(xt){for(var yt=xt.length<0?0:O(xt.length)|0,Et=E(yt),Mt=0;Mt=_)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_.toString(16)+" bytes");return xt|0}T.isBuffer=function(yt){return yt!=null&&yt._isBuffer===!0&&yt!==T.prototype},T.compare=function(yt,Et){if(zt(yt,Uint8Array)&&(yt=T.from(yt,yt.offset,yt.byteLength)),zt(Et,Uint8Array)&&(Et=T.from(Et,Et.offset,Et.byteLength)),!T.isBuffer(yt)||!T.isBuffer(Et))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(yt===Et)return 0;for(var Mt=yt.length,Nt=Et.length,jt=0,ie=Math.min(Mt,Nt);jtNt.length?(T.isBuffer(ie)||(ie=T.from(ie)),ie.copy(Nt,jt)):Uint8Array.prototype.set.call(Nt,ie,jt);else if(T.isBuffer(ie))ie.copy(Nt,jt);else throw new TypeError('"list" argument must be an Array of Buffers');jt+=ie.length}return Nt};function H(xt,yt){if(T.isBuffer(xt))return xt.length;if(ArrayBuffer.isView(xt)||zt(xt,ArrayBuffer))return xt.byteLength;if(typeof xt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+o(xt));var Et=xt.length,Mt=arguments.length>2&&arguments[2]===!0;if(!Mt&&Et===0)return 0;for(var Nt=!1;;)switch(yt){case"ascii":case"latin1":case"binary":return Et;case"utf8":case"utf-8":return he(xt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et*2;case"hex":return Et>>>1;case"base64":return Se(xt).length;default:if(Nt)return Mt?-1:he(xt).length;yt=(""+yt).toLowerCase(),Nt=!0}}T.byteLength=H;function Y(xt,yt,Et){var Mt=!1;if((yt===void 0||yt<0)&&(yt=0),yt>this.length||((Et===void 0||Et>this.length)&&(Et=this.length),Et<=0)||(Et>>>=0,yt>>>=0,Et<=yt))return"";for(xt||(xt="utf8");;)switch(xt){case"hex":return ct(this,yt,Et);case"utf8":case"utf-8":return ot(this,yt,Et);case"ascii":return st(this,yt,Et);case"latin1":case"binary":return nt(this,yt,Et);case"base64":return Q(this,yt,Et);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,yt,Et);default:if(Mt)throw new TypeError("Unknown encoding: "+xt);xt=(xt+"").toLowerCase(),Mt=!0}}T.prototype._isBuffer=!0;function j(xt,yt,Et){var Mt=xt[yt];xt[yt]=xt[Et],xt[Et]=Mt}T.prototype.swap16=function(){var yt=this.length;if(yt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Et=0;EtEt&&(yt+=" ... "),""},A&&(T.prototype[A]=T.prototype.inspect),T.prototype.compare=function(yt,Et,Mt,Nt,jt){if(zt(yt,Uint8Array)&&(yt=T.from(yt,yt.offset,yt.byteLength)),!T.isBuffer(yt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+o(yt));if(Et===void 0&&(Et=0),Mt===void 0&&(Mt=yt?yt.length:0),Nt===void 0&&(Nt=0),jt===void 0&&(jt=this.length),Et<0||Mt>yt.length||Nt<0||jt>this.length)throw new RangeError("out of range index");if(Nt>=jt&&Et>=Mt)return 0;if(Nt>=jt)return-1;if(Et>=Mt)return 1;if(Et>>>=0,Mt>>>=0,Nt>>>=0,jt>>>=0,this===yt)return 0;for(var ie=jt-Nt,me=Mt-Et,be=Math.min(ie,me),ve=this.slice(Nt,jt),Le=yt.slice(Et,Mt),ce=0;ce2147483647?Et=2147483647:Et<-2147483648&&(Et=-2147483648),Et=+Et,Xt(Et)&&(Et=Nt?0:xt.length-1),Et<0&&(Et=xt.length+Et),Et>=xt.length){if(Nt)return-1;Et=xt.length-1}else if(Et<0)if(Nt)Et=0;else return-1;if(typeof yt=="string"&&(yt=T.from(yt,Mt)),T.isBuffer(yt))return yt.length===0?-1:it(xt,yt,Et,Mt,Nt);if(typeof yt=="number")return yt=yt&255,typeof Uint8Array.prototype.indexOf=="function"?Nt?Uint8Array.prototype.indexOf.call(xt,yt,Et):Uint8Array.prototype.lastIndexOf.call(xt,yt,Et):it(xt,[yt],Et,Mt,Nt);throw new TypeError("val must be string, number or Buffer")}function it(xt,yt,Et,Mt,Nt){var jt=1,ie=xt.length,me=yt.length;if(Mt!==void 0&&(Mt=String(Mt).toLowerCase(),Mt==="ucs2"||Mt==="ucs-2"||Mt==="utf16le"||Mt==="utf-16le")){if(xt.length<2||yt.length<2)return-1;jt=2,ie/=2,me/=2,Et/=2}function be(Be,ir){return jt===1?Be[ir]:Be.readUInt16BE(ir*jt)}var ve;if(Nt){var Le=-1;for(ve=Et;veie&&(Et=ie-me),ve=Et;ve>=0;ve--){for(var ce=!0,Te=0;TeNt&&(Mt=Nt)):Mt=Nt;var jt=yt.length;Mt>jt/2&&(Mt=jt/2);var ie;for(ie=0;ie>>0,isFinite(Mt)?(Mt=Mt>>>0,Nt===void 0&&(Nt="utf8")):(Nt=Mt,Mt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var jt=this.length-Et;if((Mt===void 0||Mt>jt)&&(Mt=jt),yt.length>0&&(Mt<0||Et<0)||Et>this.length)throw new RangeError("Attempt to write outside buffer bounds");Nt||(Nt="utf8");for(var ie=!1;;)switch(Nt){case"hex":return ut(this,yt,Et,Mt);case"utf8":case"utf-8":return J(this,yt,Et,Mt);case"ascii":case"latin1":case"binary":return X(this,yt,Et,Mt);case"base64":return tt(this,yt,Et,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,yt,Et,Mt);default:if(ie)throw new TypeError("Unknown encoding: "+Nt);Nt=(""+Nt).toLowerCase(),ie=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(xt,yt,Et){return yt===0&&Et===xt.length?d.fromByteArray(xt):d.fromByteArray(xt.slice(yt,Et))}function ot(xt,yt,Et){Et=Math.min(xt.length,Et);for(var Mt=[],Nt=yt;Nt239?4:jt>223?3:jt>191?2:1;if(Nt+me<=Et){var be=void 0,ve=void 0,Le=void 0,ce=void 0;switch(me){case 1:jt<128&&(ie=jt);break;case 2:be=xt[Nt+1],(be&192)===128&&(ce=(jt&31)<<6|be&63,ce>127&&(ie=ce));break;case 3:be=xt[Nt+1],ve=xt[Nt+2],(be&192)===128&&(ve&192)===128&&(ce=(jt&15)<<12|(be&63)<<6|ve&63,ce>2047&&(ce<55296||ce>57343)&&(ie=ce));break;case 4:be=xt[Nt+1],ve=xt[Nt+2],Le=xt[Nt+3],(be&192)===128&&(ve&192)===128&&(Le&192)===128&&(ce=(jt&15)<<18|(be&63)<<12|(ve&63)<<6|Le&63,ce>65535&&ce<1114112&&(ie=ce))}}ie===null?(ie=65533,me=1):ie>65535&&(ie-=65536,Mt.push(ie>>>10&1023|55296),ie=56320|ie&1023),Mt.push(ie),Nt+=me}return Z(Mt)}var $=4096;function Z(xt){var yt=xt.length;if(yt<=$)return String.fromCharCode.apply(String,xt);for(var Et="",Mt=0;MtMt)&&(Et=Mt);for(var Nt="",jt=yt;jtMt&&(yt=Mt),Et<0?(Et+=Mt,Et<0&&(Et=0)):Et>Mt&&(Et=Mt),EtEt)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(yt,Et,Mt){yt=yt>>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=this[yt],jt=1,ie=0;++ie>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=this[yt+--Et],jt=1;Et>0&&(jt*=256);)Nt+=this[yt+--Et]*jt;return Nt},T.prototype.readUint8=T.prototype.readUInt8=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,1,this.length),this[yt]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,2,this.length),this[yt]|this[yt+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,2,this.length),this[yt]<<8|this[yt+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),(this[yt]|this[yt+1]<<8|this[yt+2]<<16)+this[yt+3]*16777216},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),this[yt]*16777216+(this[yt+1]<<16|this[yt+2]<<8|this[yt+3])},T.prototype.readBigUInt64LE=Wt(function(yt){yt=yt>>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=Et+this[++yt]*Math.pow(2,8)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,24),jt=this[++yt]+this[++yt]*Math.pow(2,8)+this[++yt]*Math.pow(2,16)+Mt*Math.pow(2,24);return BigInt(Nt)+(BigInt(jt)<>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=Et*Math.pow(2,24)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,8)+this[++yt],jt=this[++yt]*Math.pow(2,24)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,8)+Mt;return(BigInt(Nt)<>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=this[yt],jt=1,ie=0;++ie=jt&&(Nt-=Math.pow(2,8*Et)),Nt},T.prototype.readIntBE=function(yt,Et,Mt){yt=yt>>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=Et,jt=1,ie=this[yt+--Nt];Nt>0&&(jt*=256);)ie+=this[yt+--Nt]*jt;return jt*=128,ie>=jt&&(ie-=Math.pow(2,8*Et)),ie},T.prototype.readInt8=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,1,this.length),this[yt]&128?(255-this[yt]+1)*-1:this[yt]},T.prototype.readInt16LE=function(yt,Et){yt=yt>>>0,Et||Tt(yt,2,this.length);var Mt=this[yt]|this[yt+1]<<8;return Mt&32768?Mt|4294901760:Mt},T.prototype.readInt16BE=function(yt,Et){yt=yt>>>0,Et||Tt(yt,2,this.length);var Mt=this[yt+1]|this[yt]<<8;return Mt&32768?Mt|4294901760:Mt},T.prototype.readInt32LE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),this[yt]|this[yt+1]<<8|this[yt+2]<<16|this[yt+3]<<24},T.prototype.readInt32BE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),this[yt]<<24|this[yt+1]<<16|this[yt+2]<<8|this[yt+3]},T.prototype.readBigInt64LE=Wt(function(yt){yt=yt>>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=this[yt+4]+this[yt+5]*Math.pow(2,8)+this[yt+6]*Math.pow(2,16)+(Mt<<24);return(BigInt(Nt)<>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=(Et<<24)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,8)+this[++yt];return(BigInt(Nt)<>>0,Et||Tt(yt,4,this.length),w.read(this,yt,!0,23,4)},T.prototype.readFloatBE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),w.read(this,yt,!1,23,4)},T.prototype.readDoubleLE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,8,this.length),w.read(this,yt,!0,52,8)},T.prototype.readDoubleBE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,8,this.length),w.read(this,yt,!1,52,8)};function wt(xt,yt,Et,Mt,Nt,jt){if(!T.isBuffer(xt))throw new TypeError('"buffer" argument must be a Buffer instance');if(yt>Nt||ytxt.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(yt,Et,Mt,Nt){if(yt=+yt,Et=Et>>>0,Mt=Mt>>>0,!Nt){var jt=Math.pow(2,8*Mt)-1;wt(this,yt,Et,Mt,jt,0)}var ie=1,me=0;for(this[Et]=yt&255;++me>>0,Mt=Mt>>>0,!Nt){var jt=Math.pow(2,8*Mt)-1;wt(this,yt,Et,Mt,jt,0)}var ie=Mt-1,me=1;for(this[Et+ie]=yt&255;--ie>=0&&(me*=256);)this[Et+ie]=yt/me&255;return Et+Mt},T.prototype.writeUint8=T.prototype.writeUInt8=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,1,255,0),this[Et]=yt&255,Et+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,65535,0),this[Et]=yt&255,this[Et+1]=yt>>>8,Et+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,65535,0),this[Et]=yt>>>8,this[Et+1]=yt&255,Et+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,4294967295,0),this[Et+3]=yt>>>24,this[Et+2]=yt>>>16,this[Et+1]=yt>>>8,this[Et]=yt&255,Et+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,4294967295,0),this[Et]=yt>>>24,this[Et+1]=yt>>>16,this[Et+2]=yt>>>8,this[Et+3]=yt&255,Et+4};function Rt(xt,yt,Et,Mt,Nt){It(yt,Mt,Nt,xt,Et,7);var jt=Number(yt&BigInt(4294967295));xt[Et++]=jt,jt=jt>>8,xt[Et++]=jt,jt=jt>>8,xt[Et++]=jt,jt=jt>>8,xt[Et++]=jt;var ie=Number(yt>>BigInt(32)&BigInt(4294967295));return xt[Et++]=ie,ie=ie>>8,xt[Et++]=ie,ie=ie>>8,xt[Et++]=ie,ie=ie>>8,xt[Et++]=ie,Et}function bt(xt,yt,Et,Mt,Nt){It(yt,Mt,Nt,xt,Et,7);var jt=Number(yt&BigInt(4294967295));xt[Et+7]=jt,jt=jt>>8,xt[Et+6]=jt,jt=jt>>8,xt[Et+5]=jt,jt=jt>>8,xt[Et+4]=jt;var ie=Number(yt>>BigInt(32)&BigInt(4294967295));return xt[Et+3]=ie,ie=ie>>8,xt[Et+2]=ie,ie=ie>>8,xt[Et+1]=ie,ie=ie>>8,xt[Et]=ie,Et+8}T.prototype.writeBigUInt64LE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Rt(this,yt,Et,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return bt(this,yt,Et,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(yt,Et,Mt,Nt){if(yt=+yt,Et=Et>>>0,!Nt){var jt=Math.pow(2,8*Mt-1);wt(this,yt,Et,Mt,jt-1,-jt)}var ie=0,me=1,be=0;for(this[Et]=yt&255;++ie>0)-be&255;return Et+Mt},T.prototype.writeIntBE=function(yt,Et,Mt,Nt){if(yt=+yt,Et=Et>>>0,!Nt){var jt=Math.pow(2,8*Mt-1);wt(this,yt,Et,Mt,jt-1,-jt)}var ie=Mt-1,me=1,be=0;for(this[Et+ie]=yt&255;--ie>=0&&(me*=256);)yt<0&&be===0&&this[Et+ie+1]!==0&&(be=1),this[Et+ie]=(yt/me>>0)-be&255;return Et+Mt},T.prototype.writeInt8=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,1,127,-128),yt<0&&(yt=255+yt+1),this[Et]=yt&255,Et+1},T.prototype.writeInt16LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,32767,-32768),this[Et]=yt&255,this[Et+1]=yt>>>8,Et+2},T.prototype.writeInt16BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,32767,-32768),this[Et]=yt>>>8,this[Et+1]=yt&255,Et+2},T.prototype.writeInt32LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,2147483647,-2147483648),this[Et]=yt&255,this[Et+1]=yt>>>8,this[Et+2]=yt>>>16,this[Et+3]=yt>>>24,Et+4},T.prototype.writeInt32BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,2147483647,-2147483648),yt<0&&(yt=4294967295+yt+1),this[Et]=yt>>>24,this[Et+1]=yt>>>16,this[Et+2]=yt>>>8,this[Et+3]=yt&255,Et+4},T.prototype.writeBigInt64LE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Rt(this,yt,Et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return bt(this,yt,Et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function At(xt,yt,Et,Mt,Nt,jt){if(Et+Mt>xt.length)throw new RangeError("Index out of range");if(Et<0)throw new RangeError("Index out of range")}function mt(xt,yt,Et,Mt,Nt){return yt=+yt,Et=Et>>>0,Nt||At(xt,yt,Et,4),w.write(xt,yt,Et,Mt,23,4),Et+4}T.prototype.writeFloatLE=function(yt,Et,Mt){return mt(this,yt,Et,!0,Mt)},T.prototype.writeFloatBE=function(yt,Et,Mt){return mt(this,yt,Et,!1,Mt)};function Lt(xt,yt,Et,Mt,Nt){return yt=+yt,Et=Et>>>0,Nt||At(xt,yt,Et,8),w.write(xt,yt,Et,Mt,52,8),Et+8}T.prototype.writeDoubleLE=function(yt,Et,Mt){return Lt(this,yt,Et,!0,Mt)},T.prototype.writeDoubleBE=function(yt,Et,Mt){return Lt(this,yt,Et,!1,Mt)},T.prototype.copy=function(yt,Et,Mt,Nt){if(!T.isBuffer(yt))throw new TypeError("argument should be a Buffer");if(Mt||(Mt=0),!Nt&&Nt!==0&&(Nt=this.length),Et>=yt.length&&(Et=yt.length),Et||(Et=0),Nt>0&&Nt=this.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("sourceEnd out of bounds");Nt>this.length&&(Nt=this.length),yt.length-Et>>0,Mt=Mt===void 0?this.length:Mt>>>0,yt||(yt=0);var ie;if(typeof yt=="number")for(ie=Et;ieMath.pow(2,32)?Nt=kt(String(Et)):typeof Et=="bigint"&&(Nt=String(Et),(Et>Math.pow(BigInt(2),BigInt(32))||Et<-Math.pow(BigInt(2),BigInt(32)))&&(Nt=kt(Nt)),Nt+="n"),Mt+=" It must be ".concat(yt,". Received ").concat(Nt),Mt},RangeError);function kt(xt){for(var yt="",Et=xt.length,Mt=xt[0]==="-"?1:0;Et>=Mt+4;Et-=3)yt="_".concat(xt.slice(Et-3,Et)).concat(yt);return"".concat(xt.slice(0,Et)).concat(yt)}function Vt(xt,yt,Et){re(yt,"offset"),(xt[yt]===void 0||xt[yt+Et]===void 0)&&Kt(yt,xt.length-(Et+1))}function It(xt,yt,Et,Mt,Nt,jt){if(xt>Et||xt3?yt===0||yt===BigInt(0)?me=">= 0".concat(ie," and < 2").concat(ie," ** ").concat((jt+1)*8).concat(ie):me=">= -(2".concat(ie," ** ").concat((jt+1)*8-1).concat(ie,") and < 2 ** ")+"".concat((jt+1)*8-1).concat(ie):me=">= ".concat(yt).concat(ie," and <= ").concat(Et).concat(ie),new Ht.ERR_OUT_OF_RANGE("value",me,xt)}Vt(Mt,Nt,jt)}function re(xt,yt){if(typeof xt!="number")throw new Ht.ERR_INVALID_ARG_TYPE(yt,"number",xt)}function Kt(xt,yt,Et){throw Math.floor(xt)!==xt?(re(xt,Et),new Ht.ERR_OUT_OF_RANGE(Et||"offset","an integer",xt)):yt<0?new Ht.ERR_BUFFER_OUT_OF_BOUNDS:new Ht.ERR_OUT_OF_RANGE(Et||"offset",">= ".concat(Et?1:0," and <= ").concat(yt),xt)}var $t=/[^+/0-9A-Za-z-_]/g;function le(xt){if(xt=xt.split("=")[0],xt=xt.trim().replace($t,""),xt.length<2)return"";for(;xt.length%4!==0;)xt=xt+"=";return xt}function he(xt,yt){yt=yt||1/0;for(var Et,Mt=xt.length,Nt=null,jt=[],ie=0;ie55295&&Et<57344){if(!Nt){if(Et>56319){(yt-=3)>-1&&jt.push(239,191,189);continue}else if(ie+1===Mt){(yt-=3)>-1&&jt.push(239,191,189);continue}Nt=Et;continue}if(Et<56320){(yt-=3)>-1&&jt.push(239,191,189),Nt=Et;continue}Et=(Nt-55296<<10|Et-56320)+65536}else Nt&&(yt-=3)>-1&&jt.push(239,191,189);if(Nt=null,Et<128){if((yt-=1)<0)break;jt.push(Et)}else if(Et<2048){if((yt-=2)<0)break;jt.push(Et>>6|192,Et&63|128)}else if(Et<65536){if((yt-=3)<0)break;jt.push(Et>>12|224,Et>>6&63|128,Et&63|128)}else if(Et<1114112){if((yt-=4)<0)break;jt.push(Et>>18|240,Et>>12&63|128,Et>>6&63|128,Et&63|128)}else throw new Error("Invalid code point")}return jt}function de(xt){for(var yt=[],Et=0;Et>8,Nt=Et%256,jt.push(Nt),jt.push(Mt);return jt}function Se(xt){return d.toByteArray(le(xt))}function ne(xt,yt,Et,Mt){var Nt;for(Nt=0;Nt=yt.length||Nt>=xt.length);++Nt)yt[Nt+Et]=xt[Nt];return Nt}function zt(xt,yt){return xt instanceof yt||xt!=null&&xt.constructor!=null&&xt.constructor.name!=null&&xt.constructor.name===yt.name}function Xt(xt){return xt!==xt}var Jt=function(){for(var xt="0123456789abcdef",yt=new Array(256),Et=0;Et<16;++Et)for(var Mt=Et*16,Nt=0;Nt<16;++Nt)yt[Mt+Nt]=xt[Et]+xt[Nt];return yt}();function Wt(xt){return typeof BigInt>"u"?Ft:xt}function Ft(){throw new Error("BigInt not supported")}},2321:function(h){h.exports=a,h.exports.isMobile=a,h.exports.default=a;var p=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,e=/android|ipad|playbook|silk/i;function a(n){n||(n={});var f=n.ua;if(!f&&typeof navigator<"u"&&(f=navigator.userAgent),f&&f.headers&&typeof f.headers["user-agent"]=="string"&&(f=f.headers["user-agent"]),typeof f!="string")return!1;var c=p.test(f)&&!r.test(f)||!!n.tablet&&e.test(f);return!c&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&f.indexOf("Macintosh")!==-1&&f.indexOf("Safari")!==-1&&(c=!0),c}},3910:function(h,p){p.byteLength=m,p.toByteArray=b,p.fromByteArray=d;for(var r=[],e=[],a=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,c=n.length;f0)throw new Error("Invalid string. Length must be a multiple of 4");var _=w.indexOf("=");_===-1&&(_=A);var y=_===A?0:4-_%4;return[_,y]}function m(w){var A=l(w),_=A[0],y=A[1];return(_+y)*3/4-y}function v(w,A,_){return(A+_)*3/4-_}function b(w){var A,_=l(w),y=_[0],E=_[1],T=new a(v(w,y,E)),s=0,L=E>0?y-4:y,M;for(M=0;M>16&255,T[s++]=A>>8&255,T[s++]=A&255;return E===2&&(A=e[w.charCodeAt(M)]<<2|e[w.charCodeAt(M+1)]>>4,T[s++]=A&255),E===1&&(A=e[w.charCodeAt(M)]<<10|e[w.charCodeAt(M+1)]<<4|e[w.charCodeAt(M+2)]>>2,T[s++]=A>>8&255,T[s++]=A&255),T}function u(w){return r[w>>18&63]+r[w>>12&63]+r[w>>6&63]+r[w&63]}function o(w,A,_){for(var y,E=[],T=A;T<_;T+=3)y=(w[T]<<16&16711680)+(w[T+1]<<8&65280)+(w[T+2]&255),E.push(u(y));return E.join("")}function d(w){for(var A,_=w.length,y=_%3,E=[],T=16383,s=0,L=_-y;sL?L:s+T));return y===1?(A=w[_-1],E.push(r[A>>2]+r[A<<4&63]+"==")):y===2&&(A=(w[_-2]<<8)+w[_-1],E.push(r[A>>10]+r[A>>4&63]+r[A<<2&63]+"=")),E.join("")}},3187:function(h,p){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */p.read=function(r,e,a,n,f){var c,l,m=f*8-n-1,v=(1<>1,u=-7,o=a?f-1:0,d=a?-1:1,w=r[e+o];for(o+=d,c=w&(1<<-u)-1,w>>=-u,u+=m;u>0;c=c*256+r[e+o],o+=d,u-=8);for(l=c&(1<<-u)-1,c>>=-u,u+=n;u>0;l=l*256+r[e+o],o+=d,u-=8);if(c===0)c=1-b;else{if(c===v)return l?NaN:(w?-1:1)*(1/0);l=l+Math.pow(2,n),c=c-b}return(w?-1:1)*l*Math.pow(2,c-n)},p.write=function(r,e,a,n,f,c){var l,m,v,b=c*8-f-1,u=(1<>1,d=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:c-1,A=n?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(m=isNaN(e)?1:0,l=u):(l=Math.floor(Math.log(e)/Math.LN2),e*(v=Math.pow(2,-l))<1&&(l--,v*=2),l+o>=1?e+=d/v:e+=d*Math.pow(2,1-o),e*v>=2&&(l++,v/=2),l+o>=u?(m=0,l=u):l+o>=1?(m=(e*v-1)*Math.pow(2,f),l=l+o):(m=e*Math.pow(2,o-1)*Math.pow(2,f),l=0));f>=8;r[a+w]=m&255,w+=A,m/=256,f-=8);for(l=l<0;r[a+w]=l&255,w+=A,l/=256,b-=8);r[a+w-A]|=_*128}},1152:function(h,p,r){h.exports=l;var e=r(3440),a=r(7774),n=r(9298);function f(m,v){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(b){return m[b]}),this._mode=v,this._active=m[v],this._active||(this._mode="turntable",this._active=m.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var c=f.prototype;c.flush=function(m){for(var v=this._controllerList,b=0;b"u"?r(5346):WeakMap,a=r(5827),n=r(2944),f=new e;function c(l){var m=f.get(l),v=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!v||!l.isBuffer(v)){var b=a(l,new Float32Array([-1,-1,-1,4,4,-1]));m=n(l,[{buffer:b,type:l.FLOAT,size:2}]),m._triangleBuffer=b,f.set(l,m)}m.bind(),l.drawArrays(l.TRIANGLES,0,3),m.unbind()}h.exports=c},8008:function(h,p,r){var e=r(4930);h.exports=a;function a(n,f,c){f=typeof f=="number"?f:1,c=c||": ";var l=n.split(/\r?\n/),m=String(l.length+f-1).length;return l.map(function(v,b){var u=b+f,o=String(u).length,d=e(u,m-o);return d+c+v}).join(` +`)}},2153:function(h,p,r){h.exports=n;var e=r(417);function a(f,c){for(var l=new Array(c+1),m=0;m0?o=o.ushln(u):u<0&&(d=d.ushln(-u)),c(o,d)}},234:function(h,p,r){var e=r(3218);h.exports=a;function a(n){return Array.isArray(n)&&n.length===2&&e(n[0])&&e(n[1])}},4275:function(h,p,r){var e=r(1928);h.exports=a;function a(n){return n.cmp(new e(0))}},9958:function(h,p,r){var e=r(4275);h.exports=a;function a(n){var f=n.length,c=n.words,l=0;if(f===1)l=c[0];else if(f===2)l=c[0]+c[1]*67108864;else for(var m=0;m20?52:l+32}},3218:function(h,p,r){r(1928),h.exports=e;function e(a){return a&&typeof a=="object"&&!!a.words}},5514:function(h,p,r){var e=r(1928),a=r(8362);h.exports=n;function n(f){var c=a.exponent(f);return c<52?new e(f):new e(f*Math.pow(2,52-c)).ushln(c-52)}},8524:function(h,p,r){var e=r(5514),a=r(4275);h.exports=n;function n(f,c){var l=a(f),m=a(c);if(l===0)return[e(0),e(1)];if(m===0)return[e(0),e(0)];m<0&&(f=f.neg(),c=c.neg());var v=f.gcd(c);return v.cmpn(1)?[f.div(v),c.div(v)]:[f,c]}},2813:function(h,p,r){var e=r(1928);h.exports=a;function a(n){return new e(n)}},3962:function(h,p,r){var e=r(8524);h.exports=a;function a(n,f){return e(n[0].mul(f[0]),n[1].mul(f[1]))}},4951:function(h,p,r){var e=r(4275);h.exports=a;function a(n){return e(n[0])*e(n[1])}},4354:function(h,p,r){var e=r(8524);h.exports=a;function a(n,f){return e(n[0].mul(f[1]).sub(n[1].mul(f[0])),n[1].mul(f[1]))}},7999:function(h,p,r){var e=r(9958),a=r(1112);h.exports=n;function n(f){var c=f[0],l=f[1];if(c.cmpn(0)===0)return 0;var m=c.abs().divmod(l.abs()),v=m.div,b=e(v),u=m.mod,o=c.negative!==l.negative?-1:1;if(u.cmpn(0)===0)return o*b;if(b){var d=a(b)+4,w=e(u.ushln(d).divRound(l));return o*(b+w*Math.pow(2,-d))}else{var A=l.bitLength()-u.bitLength()+53,w=e(u.ushln(A).divRound(l));return A<1023?o*w*Math.pow(2,-A):(w*=Math.pow(2,-1023),o*w*Math.pow(2,1023-A))}}},5070:function(h){function p(c,l,m,v,b){for(var u=b+1;v<=b;){var o=v+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w>=0?(u=o,b=o-1):v=o+1}return u}function r(c,l,m,v,b){for(var u=b+1;v<=b;){var o=v+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w>0?(u=o,b=o-1):v=o+1}return u}function e(c,l,m,v,b){for(var u=v-1;v<=b;){var o=v+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w<0?(u=o,v=o+1):b=o-1}return u}function a(c,l,m,v,b){for(var u=v-1;v<=b;){var o=v+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w<=0?(u=o,v=o+1):b=o-1}return u}function n(c,l,m,v,b){for(;v<=b;){var u=v+b>>>1,o=c[u],d=m!==void 0?m(o,l):o-l;if(d===0)return u;d<=0?v=u+1:b=u-1}return-1}function f(c,l,m,v,b,u){return typeof m=="function"?u(c,l,m,v===void 0?0:v|0,b===void 0?c.length-1:b|0):u(c,l,void 0,m===void 0?0:m|0,v===void 0?c.length-1:v|0)}h.exports={ge:function(c,l,m,v,b){return f(c,l,m,v,b,p)},gt:function(c,l,m,v,b){return f(c,l,m,v,b,r)},lt:function(c,l,m,v,b){return f(c,l,m,v,b,e)},le:function(c,l,m,v,b){return f(c,l,m,v,b,a)},eq:function(c,l,m,v,b){return f(c,l,m,v,b,n)}}},2288:function(h,p){"use restrict";var r=32;p.INT_BITS=r,p.INT_MAX=2147483647,p.INT_MIN=-1<0)-(n<0)},p.abs=function(n){var f=n>>r-1;return(n^f)-f},p.min=function(n,f){return f^(n^f)&-(n65535)<<4,n>>>=f,c=(n>255)<<3,n>>>=c,f|=c,c=(n>15)<<2,n>>>=c,f|=c,c=(n>3)<<1,n>>>=c,f|=c,f|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function e(n){var f=32;return n&=-n,n&&f--,n&65535&&(f-=16),n&16711935&&(f-=8),n&252645135&&(f-=4),n&858993459&&(f-=2),n&1431655765&&(f-=1),f}p.countTrailingZeros=e,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var f=0;f<256;++f){var c=f,l=f,m=7;for(c>>>=1;c;c>>>=1)l<<=1,l|=c&1,--m;n[f]=l<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},p.interleave2=function(n,f){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,n|f<<1},p.deinterleave2=function(n,f){return n=n>>>f&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,f,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,n|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,f){return n=n>>>f&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var f=n|n-1;return f+1|(~f&-~f)-1>>>e(n)+1}},1928:function(h,p,r){h=r.nmd(h),function(e,a){function n(B,O){if(!B)throw new Error(O||"Assertion failed")}function f(B,O){B.super_=O;var H=function(){};H.prototype=O.prototype,B.prototype=new H,B.prototype.constructor=B}function c(B,O,H){if(c.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((O==="le"||O==="be")&&(H=O,O=10),this._init(B||0,O||10,H||"be"))}typeof e=="object"?e.exports=c:a.BN=c,c.BN=c,c.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=r(6601).Buffer}catch{}c.isBN=function(O){return O instanceof c?!0:O!==null&&typeof O=="object"&&O.constructor.wordSize===c.wordSize&&Array.isArray(O.words)},c.max=function(O,H){return O.cmp(H)>0?O:H},c.min=function(O,H){return O.cmp(H)<0?O:H},c.prototype._init=function(O,H,Y){if(typeof O=="number")return this._initNumber(O,H,Y);if(typeof O=="object")return this._initArray(O,H,Y);H==="hex"&&(H=16),n(H===(H|0)&&H>=2&&H<=36),O=O.toString().replace(/\s+/g,"");var j=0;O[0]==="-"&&(j++,this.negative=1),j=0;j-=3)it=O[j]|O[j-1]<<8|O[j-2]<<16,this.words[et]|=it<>>26-ut&67108863,ut+=24,ut>=26&&(ut-=26,et++);else if(Y==="le")for(j=0,et=0;j>>26-ut&67108863,ut+=24,ut>=26&&(ut-=26,et++);return this.strip()};function m(B,O){var H=B.charCodeAt(O);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function v(B,O,H){var Y=m(B,H);return H-1>=O&&(Y|=m(B,H-1)<<4),Y}c.prototype._parseHex=function(O,H,Y){this.length=Math.ceil((O.length-H)/6),this.words=new Array(this.length);for(var j=0;j=H;j-=2)ut=v(O,H,j)<=18?(et-=18,it+=1,this.words[it]|=ut>>>26):et+=8;else{var J=O.length-H;for(j=J%2===0?H+1:H;j=18?(et-=18,it+=1,this.words[it]|=ut>>>26):et+=8}this.strip()};function b(B,O,H,Y){for(var j=0,et=Math.min(B.length,H),it=O;it=49?j+=ut-49+10:ut>=17?j+=ut-17+10:j+=ut}return j}c.prototype._parseBase=function(O,H,Y){this.words=[0],this.length=1;for(var j=0,et=1;et<=67108863;et*=H)j++;j--,et=et/H|0;for(var it=O.length-Y,ut=it%j,J=Math.min(it,it-ut)+Y,X=0,tt=Y;tt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],o=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(O,H){O=O||10,H=H|0||1;var Y;if(O===16||O==="hex"){Y="";for(var j=0,et=0,it=0;it>>24-j&16777215,et!==0||it!==this.length-1?Y=u[6-J.length]+J+Y:Y=J+Y,j+=2,j>=26&&(j-=26,it--)}for(et!==0&&(Y=et.toString(16)+Y);Y.length%H!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}if(O===(O|0)&&O>=2&&O<=36){var X=o[O],tt=d[O];Y="";var V=this.clone();for(V.negative=0;!V.isZero();){var Q=V.modn(tt).toString(O);V=V.idivn(tt),V.isZero()?Y=Q+Y:Y=u[X-Q.length]+Q+Y}for(this.isZero()&&(Y="0"+Y);Y.length%H!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}n(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=this.words[1]*67108864:this.length===3&&this.words[2]===1?O+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(O,H){return n(typeof l<"u"),this.toArrayLike(l,O,H)},c.prototype.toArray=function(O,H){return this.toArrayLike(Array,O,H)},c.prototype.toArrayLike=function(O,H,Y){var j=this.byteLength(),et=Y||Math.max(1,j);n(j<=et,"byte array longer than desired length"),n(et>0,"Requested array length <= 0"),this.strip();var it=H==="le",ut=new O(et),J,X,tt=this.clone();if(it){for(X=0;!tt.isZero();X++)J=tt.andln(255),tt.iushrn(8),ut[X]=J;for(;X=4096&&(Y+=13,H>>>=13),H>=64&&(Y+=7,H>>>=7),H>=8&&(Y+=4,H>>>=4),H>=2&&(Y+=2,H>>>=2),Y+H},c.prototype._zeroBits=function(O){if(O===0)return 26;var H=O,Y=0;return H&8191||(Y+=13,H>>>=13),H&127||(Y+=7,H>>>=7),H&15||(Y+=4,H>>>=4),H&3||(Y+=2,H>>>=2),H&1||Y++,Y},c.prototype.bitLength=function(){var O=this.words[this.length-1],H=this._countBits(O);return(this.length-1)*26+H};function w(B){for(var O=new Array(B.bitLength()),H=0;H>>j}return O}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,H=0;HO.length?this.clone().ior(O):O.clone().ior(this)},c.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},c.prototype.iuand=function(O){var H;this.length>O.length?H=O:H=this;for(var Y=0;YO.length?this.clone().iand(O):O.clone().iand(this)},c.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},c.prototype.iuxor=function(O){var H,Y;this.length>O.length?(H=this,Y=O):(H=O,Y=this);for(var j=0;jO.length?this.clone().ixor(O):O.clone().ixor(this)},c.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},c.prototype.inotn=function(O){n(typeof O=="number"&&O>=0);var H=Math.ceil(O/26)|0,Y=O%26;this._expand(H),Y>0&&H--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-Y),this.strip()},c.prototype.notn=function(O){return this.clone().inotn(O)},c.prototype.setn=function(O,H){n(typeof O=="number"&&O>=0);var Y=O/26|0,j=O%26;return this._expand(Y+1),H?this.words[Y]=this.words[Y]|1<O.length?(Y=this,j=O):(Y=O,j=this);for(var et=0,it=0;it>>26;for(;et!==0&&it>>26;if(this.length=Y.length,et!==0)this.words[this.length]=et,this.length++;else if(Y!==this)for(;itO.length?this.clone().iadd(O):O.clone().iadd(this)},c.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var H=this.iadd(O);return O.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var Y=this.cmp(O);if(Y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var j,et;Y>0?(j=this,et=O):(j=O,et=this);for(var it=0,ut=0;ut>26,this.words[ut]=H&67108863;for(;it!==0&&ut>26,this.words[ut]=H&67108863;if(it===0&&ut>>26,V=J&67108863,Q=Math.min(X,O.length-1),ot=Math.max(0,X-B.length+1);ot<=Q;ot++){var $=X-ot|0;j=B.words[$]|0,et=O.words[ot]|0,it=j*et+V,tt+=it/67108864|0,V=it&67108863}H.words[X]=V|0,J=tt|0}return J!==0?H.words[X]=J|0:H.length--,H.strip()}var _=function(O,H,Y){var j=O.words,et=H.words,it=Y.words,ut=0,J,X,tt,V=j[0]|0,Q=V&8191,ot=V>>>13,$=j[1]|0,Z=$&8191,st=$>>>13,nt=j[2]|0,ct=nt&8191,gt=nt>>>13,Tt=j[3]|0,wt=Tt&8191,Rt=Tt>>>13,bt=j[4]|0,At=bt&8191,mt=bt>>>13,Lt=j[5]|0,Ht=Lt&8191,Ut=Lt>>>13,kt=j[6]|0,Vt=kt&8191,It=kt>>>13,re=j[7]|0,Kt=re&8191,$t=re>>>13,le=j[8]|0,he=le&8191,de=le>>>13,xe=j[9]|0,Se=xe&8191,ne=xe>>>13,zt=et[0]|0,Xt=zt&8191,Jt=zt>>>13,Wt=et[1]|0,Ft=Wt&8191,xt=Wt>>>13,yt=et[2]|0,Et=yt&8191,Mt=yt>>>13,Nt=et[3]|0,jt=Nt&8191,ie=Nt>>>13,me=et[4]|0,be=me&8191,ve=me>>>13,Le=et[5]|0,ce=Le&8191,Te=Le>>>13,Be=et[6]|0,ir=Be&8191,pe=Be>>>13,Xe=et[7]|0,Ke=Xe&8191,or=Xe>>>13,$e=et[8]|0,ge=$e&8191,se=$e>>>13,Ae=et[9]|0,Ce=Ae&8191,Ie=Ae>>>13;Y.negative=O.negative^H.negative,Y.length=19,J=Math.imul(Q,Xt),X=Math.imul(Q,Jt),X=X+Math.imul(ot,Xt)|0,tt=Math.imul(ot,Jt);var Pe=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,J=Math.imul(Z,Xt),X=Math.imul(Z,Jt),X=X+Math.imul(st,Xt)|0,tt=Math.imul(st,Jt),J=J+Math.imul(Q,Ft)|0,X=X+Math.imul(Q,xt)|0,X=X+Math.imul(ot,Ft)|0,tt=tt+Math.imul(ot,xt)|0;var ke=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(ke>>>26)|0,ke&=67108863,J=Math.imul(ct,Xt),X=Math.imul(ct,Jt),X=X+Math.imul(gt,Xt)|0,tt=Math.imul(gt,Jt),J=J+Math.imul(Z,Ft)|0,X=X+Math.imul(Z,xt)|0,X=X+Math.imul(st,Ft)|0,tt=tt+Math.imul(st,xt)|0,J=J+Math.imul(Q,Et)|0,X=X+Math.imul(Q,Mt)|0,X=X+Math.imul(ot,Et)|0,tt=tt+Math.imul(ot,Mt)|0;var Ve=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,J=Math.imul(wt,Xt),X=Math.imul(wt,Jt),X=X+Math.imul(Rt,Xt)|0,tt=Math.imul(Rt,Jt),J=J+Math.imul(ct,Ft)|0,X=X+Math.imul(ct,xt)|0,X=X+Math.imul(gt,Ft)|0,tt=tt+Math.imul(gt,xt)|0,J=J+Math.imul(Z,Et)|0,X=X+Math.imul(Z,Mt)|0,X=X+Math.imul(st,Et)|0,tt=tt+Math.imul(st,Mt)|0,J=J+Math.imul(Q,jt)|0,X=X+Math.imul(Q,ie)|0,X=X+Math.imul(ot,jt)|0,tt=tt+Math.imul(ot,ie)|0;var Je=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Je>>>26)|0,Je&=67108863,J=Math.imul(At,Xt),X=Math.imul(At,Jt),X=X+Math.imul(mt,Xt)|0,tt=Math.imul(mt,Jt),J=J+Math.imul(wt,Ft)|0,X=X+Math.imul(wt,xt)|0,X=X+Math.imul(Rt,Ft)|0,tt=tt+Math.imul(Rt,xt)|0,J=J+Math.imul(ct,Et)|0,X=X+Math.imul(ct,Mt)|0,X=X+Math.imul(gt,Et)|0,tt=tt+Math.imul(gt,Mt)|0,J=J+Math.imul(Z,jt)|0,X=X+Math.imul(Z,ie)|0,X=X+Math.imul(st,jt)|0,tt=tt+Math.imul(st,ie)|0,J=J+Math.imul(Q,be)|0,X=X+Math.imul(Q,ve)|0,X=X+Math.imul(ot,be)|0,tt=tt+Math.imul(ot,ve)|0;var ur=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(ur>>>26)|0,ur&=67108863,J=Math.imul(Ht,Xt),X=Math.imul(Ht,Jt),X=X+Math.imul(Ut,Xt)|0,tt=Math.imul(Ut,Jt),J=J+Math.imul(At,Ft)|0,X=X+Math.imul(At,xt)|0,X=X+Math.imul(mt,Ft)|0,tt=tt+Math.imul(mt,xt)|0,J=J+Math.imul(wt,Et)|0,X=X+Math.imul(wt,Mt)|0,X=X+Math.imul(Rt,Et)|0,tt=tt+Math.imul(Rt,Mt)|0,J=J+Math.imul(ct,jt)|0,X=X+Math.imul(ct,ie)|0,X=X+Math.imul(gt,jt)|0,tt=tt+Math.imul(gt,ie)|0,J=J+Math.imul(Z,be)|0,X=X+Math.imul(Z,ve)|0,X=X+Math.imul(st,be)|0,tt=tt+Math.imul(st,ve)|0,J=J+Math.imul(Q,ce)|0,X=X+Math.imul(Q,Te)|0,X=X+Math.imul(ot,ce)|0,tt=tt+Math.imul(ot,Te)|0;var hr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(hr>>>26)|0,hr&=67108863,J=Math.imul(Vt,Xt),X=Math.imul(Vt,Jt),X=X+Math.imul(It,Xt)|0,tt=Math.imul(It,Jt),J=J+Math.imul(Ht,Ft)|0,X=X+Math.imul(Ht,xt)|0,X=X+Math.imul(Ut,Ft)|0,tt=tt+Math.imul(Ut,xt)|0,J=J+Math.imul(At,Et)|0,X=X+Math.imul(At,Mt)|0,X=X+Math.imul(mt,Et)|0,tt=tt+Math.imul(mt,Mt)|0,J=J+Math.imul(wt,jt)|0,X=X+Math.imul(wt,ie)|0,X=X+Math.imul(Rt,jt)|0,tt=tt+Math.imul(Rt,ie)|0,J=J+Math.imul(ct,be)|0,X=X+Math.imul(ct,ve)|0,X=X+Math.imul(gt,be)|0,tt=tt+Math.imul(gt,ve)|0,J=J+Math.imul(Z,ce)|0,X=X+Math.imul(Z,Te)|0,X=X+Math.imul(st,ce)|0,tt=tt+Math.imul(st,Te)|0,J=J+Math.imul(Q,ir)|0,X=X+Math.imul(Q,pe)|0,X=X+Math.imul(ot,ir)|0,tt=tt+Math.imul(ot,pe)|0;var vr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(vr>>>26)|0,vr&=67108863,J=Math.imul(Kt,Xt),X=Math.imul(Kt,Jt),X=X+Math.imul($t,Xt)|0,tt=Math.imul($t,Jt),J=J+Math.imul(Vt,Ft)|0,X=X+Math.imul(Vt,xt)|0,X=X+Math.imul(It,Ft)|0,tt=tt+Math.imul(It,xt)|0,J=J+Math.imul(Ht,Et)|0,X=X+Math.imul(Ht,Mt)|0,X=X+Math.imul(Ut,Et)|0,tt=tt+Math.imul(Ut,Mt)|0,J=J+Math.imul(At,jt)|0,X=X+Math.imul(At,ie)|0,X=X+Math.imul(mt,jt)|0,tt=tt+Math.imul(mt,ie)|0,J=J+Math.imul(wt,be)|0,X=X+Math.imul(wt,ve)|0,X=X+Math.imul(Rt,be)|0,tt=tt+Math.imul(Rt,ve)|0,J=J+Math.imul(ct,ce)|0,X=X+Math.imul(ct,Te)|0,X=X+Math.imul(gt,ce)|0,tt=tt+Math.imul(gt,Te)|0,J=J+Math.imul(Z,ir)|0,X=X+Math.imul(Z,pe)|0,X=X+Math.imul(st,ir)|0,tt=tt+Math.imul(st,pe)|0,J=J+Math.imul(Q,Ke)|0,X=X+Math.imul(Q,or)|0,X=X+Math.imul(ot,Ke)|0,tt=tt+Math.imul(ot,or)|0;var Yt=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,J=Math.imul(he,Xt),X=Math.imul(he,Jt),X=X+Math.imul(de,Xt)|0,tt=Math.imul(de,Jt),J=J+Math.imul(Kt,Ft)|0,X=X+Math.imul(Kt,xt)|0,X=X+Math.imul($t,Ft)|0,tt=tt+Math.imul($t,xt)|0,J=J+Math.imul(Vt,Et)|0,X=X+Math.imul(Vt,Mt)|0,X=X+Math.imul(It,Et)|0,tt=tt+Math.imul(It,Mt)|0,J=J+Math.imul(Ht,jt)|0,X=X+Math.imul(Ht,ie)|0,X=X+Math.imul(Ut,jt)|0,tt=tt+Math.imul(Ut,ie)|0,J=J+Math.imul(At,be)|0,X=X+Math.imul(At,ve)|0,X=X+Math.imul(mt,be)|0,tt=tt+Math.imul(mt,ve)|0,J=J+Math.imul(wt,ce)|0,X=X+Math.imul(wt,Te)|0,X=X+Math.imul(Rt,ce)|0,tt=tt+Math.imul(Rt,Te)|0,J=J+Math.imul(ct,ir)|0,X=X+Math.imul(ct,pe)|0,X=X+Math.imul(gt,ir)|0,tt=tt+Math.imul(gt,pe)|0,J=J+Math.imul(Z,Ke)|0,X=X+Math.imul(Z,or)|0,X=X+Math.imul(st,Ke)|0,tt=tt+Math.imul(st,or)|0,J=J+Math.imul(Q,ge)|0,X=X+Math.imul(Q,se)|0,X=X+Math.imul(ot,ge)|0,tt=tt+Math.imul(ot,se)|0;var Gt=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,J=Math.imul(Se,Xt),X=Math.imul(Se,Jt),X=X+Math.imul(ne,Xt)|0,tt=Math.imul(ne,Jt),J=J+Math.imul(he,Ft)|0,X=X+Math.imul(he,xt)|0,X=X+Math.imul(de,Ft)|0,tt=tt+Math.imul(de,xt)|0,J=J+Math.imul(Kt,Et)|0,X=X+Math.imul(Kt,Mt)|0,X=X+Math.imul($t,Et)|0,tt=tt+Math.imul($t,Mt)|0,J=J+Math.imul(Vt,jt)|0,X=X+Math.imul(Vt,ie)|0,X=X+Math.imul(It,jt)|0,tt=tt+Math.imul(It,ie)|0,J=J+Math.imul(Ht,be)|0,X=X+Math.imul(Ht,ve)|0,X=X+Math.imul(Ut,be)|0,tt=tt+Math.imul(Ut,ve)|0,J=J+Math.imul(At,ce)|0,X=X+Math.imul(At,Te)|0,X=X+Math.imul(mt,ce)|0,tt=tt+Math.imul(mt,Te)|0,J=J+Math.imul(wt,ir)|0,X=X+Math.imul(wt,pe)|0,X=X+Math.imul(Rt,ir)|0,tt=tt+Math.imul(Rt,pe)|0,J=J+Math.imul(ct,Ke)|0,X=X+Math.imul(ct,or)|0,X=X+Math.imul(gt,Ke)|0,tt=tt+Math.imul(gt,or)|0,J=J+Math.imul(Z,ge)|0,X=X+Math.imul(Z,se)|0,X=X+Math.imul(st,ge)|0,tt=tt+Math.imul(st,se)|0,J=J+Math.imul(Q,Ce)|0,X=X+Math.imul(Q,Ie)|0,X=X+Math.imul(ot,Ce)|0,tt=tt+Math.imul(ot,Ie)|0;var Ne=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,J=Math.imul(Se,Ft),X=Math.imul(Se,xt),X=X+Math.imul(ne,Ft)|0,tt=Math.imul(ne,xt),J=J+Math.imul(he,Et)|0,X=X+Math.imul(he,Mt)|0,X=X+Math.imul(de,Et)|0,tt=tt+Math.imul(de,Mt)|0,J=J+Math.imul(Kt,jt)|0,X=X+Math.imul(Kt,ie)|0,X=X+Math.imul($t,jt)|0,tt=tt+Math.imul($t,ie)|0,J=J+Math.imul(Vt,be)|0,X=X+Math.imul(Vt,ve)|0,X=X+Math.imul(It,be)|0,tt=tt+Math.imul(It,ve)|0,J=J+Math.imul(Ht,ce)|0,X=X+Math.imul(Ht,Te)|0,X=X+Math.imul(Ut,ce)|0,tt=tt+Math.imul(Ut,Te)|0,J=J+Math.imul(At,ir)|0,X=X+Math.imul(At,pe)|0,X=X+Math.imul(mt,ir)|0,tt=tt+Math.imul(mt,pe)|0,J=J+Math.imul(wt,Ke)|0,X=X+Math.imul(wt,or)|0,X=X+Math.imul(Rt,Ke)|0,tt=tt+Math.imul(Rt,or)|0,J=J+Math.imul(ct,ge)|0,X=X+Math.imul(ct,se)|0,X=X+Math.imul(gt,ge)|0,tt=tt+Math.imul(gt,se)|0,J=J+Math.imul(Z,Ce)|0,X=X+Math.imul(Z,Ie)|0,X=X+Math.imul(st,Ce)|0,tt=tt+Math.imul(st,Ie)|0;var Oe=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,J=Math.imul(Se,Et),X=Math.imul(Se,Mt),X=X+Math.imul(ne,Et)|0,tt=Math.imul(ne,Mt),J=J+Math.imul(he,jt)|0,X=X+Math.imul(he,ie)|0,X=X+Math.imul(de,jt)|0,tt=tt+Math.imul(de,ie)|0,J=J+Math.imul(Kt,be)|0,X=X+Math.imul(Kt,ve)|0,X=X+Math.imul($t,be)|0,tt=tt+Math.imul($t,ve)|0,J=J+Math.imul(Vt,ce)|0,X=X+Math.imul(Vt,Te)|0,X=X+Math.imul(It,ce)|0,tt=tt+Math.imul(It,Te)|0,J=J+Math.imul(Ht,ir)|0,X=X+Math.imul(Ht,pe)|0,X=X+Math.imul(Ut,ir)|0,tt=tt+Math.imul(Ut,pe)|0,J=J+Math.imul(At,Ke)|0,X=X+Math.imul(At,or)|0,X=X+Math.imul(mt,Ke)|0,tt=tt+Math.imul(mt,or)|0,J=J+Math.imul(wt,ge)|0,X=X+Math.imul(wt,se)|0,X=X+Math.imul(Rt,ge)|0,tt=tt+Math.imul(Rt,se)|0,J=J+Math.imul(ct,Ce)|0,X=X+Math.imul(ct,Ie)|0,X=X+Math.imul(gt,Ce)|0,tt=tt+Math.imul(gt,Ie)|0;var Qe=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,J=Math.imul(Se,jt),X=Math.imul(Se,ie),X=X+Math.imul(ne,jt)|0,tt=Math.imul(ne,ie),J=J+Math.imul(he,be)|0,X=X+Math.imul(he,ve)|0,X=X+Math.imul(de,be)|0,tt=tt+Math.imul(de,ve)|0,J=J+Math.imul(Kt,ce)|0,X=X+Math.imul(Kt,Te)|0,X=X+Math.imul($t,ce)|0,tt=tt+Math.imul($t,Te)|0,J=J+Math.imul(Vt,ir)|0,X=X+Math.imul(Vt,pe)|0,X=X+Math.imul(It,ir)|0,tt=tt+Math.imul(It,pe)|0,J=J+Math.imul(Ht,Ke)|0,X=X+Math.imul(Ht,or)|0,X=X+Math.imul(Ut,Ke)|0,tt=tt+Math.imul(Ut,or)|0,J=J+Math.imul(At,ge)|0,X=X+Math.imul(At,se)|0,X=X+Math.imul(mt,ge)|0,tt=tt+Math.imul(mt,se)|0,J=J+Math.imul(wt,Ce)|0,X=X+Math.imul(wt,Ie)|0,X=X+Math.imul(Rt,Ce)|0,tt=tt+Math.imul(Rt,Ie)|0;var er=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(er>>>26)|0,er&=67108863,J=Math.imul(Se,be),X=Math.imul(Se,ve),X=X+Math.imul(ne,be)|0,tt=Math.imul(ne,ve),J=J+Math.imul(he,ce)|0,X=X+Math.imul(he,Te)|0,X=X+Math.imul(de,ce)|0,tt=tt+Math.imul(de,Te)|0,J=J+Math.imul(Kt,ir)|0,X=X+Math.imul(Kt,pe)|0,X=X+Math.imul($t,ir)|0,tt=tt+Math.imul($t,pe)|0,J=J+Math.imul(Vt,Ke)|0,X=X+Math.imul(Vt,or)|0,X=X+Math.imul(It,Ke)|0,tt=tt+Math.imul(It,or)|0,J=J+Math.imul(Ht,ge)|0,X=X+Math.imul(Ht,se)|0,X=X+Math.imul(Ut,ge)|0,tt=tt+Math.imul(Ut,se)|0,J=J+Math.imul(At,Ce)|0,X=X+Math.imul(At,Ie)|0,X=X+Math.imul(mt,Ce)|0,tt=tt+Math.imul(mt,Ie)|0;var fr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(fr>>>26)|0,fr&=67108863,J=Math.imul(Se,ce),X=Math.imul(Se,Te),X=X+Math.imul(ne,ce)|0,tt=Math.imul(ne,Te),J=J+Math.imul(he,ir)|0,X=X+Math.imul(he,pe)|0,X=X+Math.imul(de,ir)|0,tt=tt+Math.imul(de,pe)|0,J=J+Math.imul(Kt,Ke)|0,X=X+Math.imul(Kt,or)|0,X=X+Math.imul($t,Ke)|0,tt=tt+Math.imul($t,or)|0,J=J+Math.imul(Vt,ge)|0,X=X+Math.imul(Vt,se)|0,X=X+Math.imul(It,ge)|0,tt=tt+Math.imul(It,se)|0,J=J+Math.imul(Ht,Ce)|0,X=X+Math.imul(Ht,Ie)|0,X=X+Math.imul(Ut,Ce)|0,tt=tt+Math.imul(Ut,Ie)|0;var rr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(rr>>>26)|0,rr&=67108863,J=Math.imul(Se,ir),X=Math.imul(Se,pe),X=X+Math.imul(ne,ir)|0,tt=Math.imul(ne,pe),J=J+Math.imul(he,Ke)|0,X=X+Math.imul(he,or)|0,X=X+Math.imul(de,Ke)|0,tt=tt+Math.imul(de,or)|0,J=J+Math.imul(Kt,ge)|0,X=X+Math.imul(Kt,se)|0,X=X+Math.imul($t,ge)|0,tt=tt+Math.imul($t,se)|0,J=J+Math.imul(Vt,Ce)|0,X=X+Math.imul(Vt,Ie)|0,X=X+Math.imul(It,Ce)|0,tt=tt+Math.imul(It,Ie)|0;var He=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(He>>>26)|0,He&=67108863,J=Math.imul(Se,Ke),X=Math.imul(Se,or),X=X+Math.imul(ne,Ke)|0,tt=Math.imul(ne,or),J=J+Math.imul(he,ge)|0,X=X+Math.imul(he,se)|0,X=X+Math.imul(de,ge)|0,tt=tt+Math.imul(de,se)|0,J=J+Math.imul(Kt,Ce)|0,X=X+Math.imul(Kt,Ie)|0,X=X+Math.imul($t,Ce)|0,tt=tt+Math.imul($t,Ie)|0;var dr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(dr>>>26)|0,dr&=67108863,J=Math.imul(Se,ge),X=Math.imul(Se,se),X=X+Math.imul(ne,ge)|0,tt=Math.imul(ne,se),J=J+Math.imul(he,Ce)|0,X=X+Math.imul(he,Ie)|0,X=X+Math.imul(de,Ce)|0,tt=tt+Math.imul(de,Ie)|0;var mr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(mr>>>26)|0,mr&=67108863,J=Math.imul(Se,Ce),X=Math.imul(Se,Ie),X=X+Math.imul(ne,Ce)|0,tt=Math.imul(ne,Ie);var xr=(ut+J|0)+((X&8191)<<13)|0;return ut=(tt+(X>>>13)|0)+(xr>>>26)|0,xr&=67108863,it[0]=Pe,it[1]=ke,it[2]=Ve,it[3]=Je,it[4]=ur,it[5]=hr,it[6]=vr,it[7]=Yt,it[8]=Gt,it[9]=Ne,it[10]=Oe,it[11]=Qe,it[12]=er,it[13]=fr,it[14]=rr,it[15]=He,it[16]=dr,it[17]=mr,it[18]=xr,ut!==0&&(it[19]=ut,Y.length++),Y};Math.imul||(_=A);function y(B,O,H){H.negative=O.negative^B.negative,H.length=B.length+O.length;for(var Y=0,j=0,et=0;et>>26)|0,j+=it>>>26,it&=67108863}H.words[et]=ut,Y=it,it=j}return Y!==0?H.words[et]=Y:H.length--,H.strip()}function E(B,O,H){var Y=new T;return Y.mulp(B,O,H)}c.prototype.mulTo=function(O,H){var Y,j=this.length+O.length;return this.length===10&&O.length===10?Y=_(this,O,H):j<63?Y=A(this,O,H):j<1024?Y=y(this,O,H):Y=E(this,O,H),Y};function T(B,O){this.x=B,this.y=O}T.prototype.makeRBT=function(O){for(var H=new Array(O),Y=c.prototype._countBits(O)-1,j=0;j>=1;return j},T.prototype.permute=function(O,H,Y,j,et,it){for(var ut=0;ut>>1)et++;return 1<>>13,Y[2*it+1]=et&8191,et=et>>>13;for(it=2*H;it>=26,H+=j/67108864|0,H+=et>>>26,this.words[Y]=et&67108863}return H!==0&&(this.words[Y]=H,this.length++),this},c.prototype.muln=function(O){return this.clone().imuln(O)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(O){var H=w(O);if(H.length===0)return new c(1);for(var Y=this,j=0;j=0);var H=O%26,Y=(O-H)/26,j=67108863>>>26-H<<26-H,et;if(H!==0){var it=0;for(et=0;et>>26-H}it&&(this.words[et]=it,this.length++)}if(Y!==0){for(et=this.length-1;et>=0;et--)this.words[et+Y]=this.words[et];for(et=0;et=0);var j;H?j=(H-H%26)/26:j=0;var et=O%26,it=Math.min((O-et)/26,this.length),ut=67108863^67108863>>>et<it)for(this.length-=it,X=0;X=0&&(tt!==0||X>=j);X--){var V=this.words[X]|0;this.words[X]=tt<<26-et|V>>>et,tt=V&ut}return J&&tt!==0&&(J.words[J.length++]=tt),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(O,H,Y){return n(this.negative===0),this.iushrn(O,H,Y)},c.prototype.shln=function(O){return this.clone().ishln(O)},c.prototype.ushln=function(O){return this.clone().iushln(O)},c.prototype.shrn=function(O){return this.clone().ishrn(O)},c.prototype.ushrn=function(O){return this.clone().iushrn(O)},c.prototype.testn=function(O){n(typeof O=="number"&&O>=0);var H=O%26,Y=(O-H)/26,j=1<=0);var H=O%26,Y=(O-H)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=Y)return this;if(H!==0&&Y++,this.length=Math.min(Y,this.length),H!==0){var j=67108863^67108863>>>H<=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},c.prototype.isubn=function(O){if(n(typeof O=="number"),n(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H>26)-(J/67108864|0),this.words[et+Y]=it&67108863}for(;et>26,this.words[et+Y]=it&67108863;if(ut===0)return this.strip();for(n(ut===-1),ut=0,et=0;et>26,this.words[et]=it&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(O,H){var Y=this.length-O.length,j=this.clone(),et=O,it=et.words[et.length-1]|0,ut=this._countBits(it);Y=26-ut,Y!==0&&(et=et.ushln(Y),j.iushln(Y),it=et.words[et.length-1]|0);var J=j.length-et.length,X;if(H!=="mod"){X=new c(null),X.length=J+1,X.words=new Array(X.length);for(var tt=0;tt=0;Q--){var ot=(j.words[et.length+Q]|0)*67108864+(j.words[et.length+Q-1]|0);for(ot=Math.min(ot/it|0,67108863),j._ishlnsubmul(et,ot,Q);j.negative!==0;)ot--,j.negative=0,j._ishlnsubmul(et,1,Q),j.isZero()||(j.negative^=1);X&&(X.words[Q]=ot)}return X&&X.strip(),j.strip(),H!=="div"&&Y!==0&&j.iushrn(Y),{div:X||null,mod:j}},c.prototype.divmod=function(O,H,Y){if(n(!O.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var j,et,it;return this.negative!==0&&O.negative===0?(it=this.neg().divmod(O,H),H!=="mod"&&(j=it.div.neg()),H!=="div"&&(et=it.mod.neg(),Y&&et.negative!==0&&et.iadd(O)),{div:j,mod:et}):this.negative===0&&O.negative!==0?(it=this.divmod(O.neg(),H),H!=="mod"&&(j=it.div.neg()),{div:j,mod:it.mod}):this.negative&O.negative?(it=this.neg().divmod(O.neg(),H),H!=="div"&&(et=it.mod.neg(),Y&&et.negative!==0&&et.isub(O)),{div:it.div,mod:et}):O.length>this.length||this.cmp(O)<0?{div:new c(0),mod:this}:O.length===1?H==="div"?{div:this.divn(O.words[0]),mod:null}:H==="mod"?{div:null,mod:new c(this.modn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new c(this.modn(O.words[0]))}:this._wordDiv(O,H)},c.prototype.div=function(O){return this.divmod(O,"div",!1).div},c.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},c.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},c.prototype.divRound=function(O){var H=this.divmod(O);if(H.mod.isZero())return H.div;var Y=H.div.negative!==0?H.mod.isub(O):H.mod,j=O.ushrn(1),et=O.andln(1),it=Y.cmp(j);return it<0||et===1&&it===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},c.prototype.modn=function(O){n(O<=67108863);for(var H=(1<<26)%O,Y=0,j=this.length-1;j>=0;j--)Y=(H*Y+(this.words[j]|0))%O;return Y},c.prototype.idivn=function(O){n(O<=67108863);for(var H=0,Y=this.length-1;Y>=0;Y--){var j=(this.words[Y]|0)+H*67108864;this.words[Y]=j/O|0,H=j%O}return this.strip()},c.prototype.divn=function(O){return this.clone().idivn(O)},c.prototype.egcd=function(O){n(O.negative===0),n(!O.isZero());var H=this,Y=O.clone();H.negative!==0?H=H.umod(O):H=H.clone();for(var j=new c(1),et=new c(0),it=new c(0),ut=new c(1),J=0;H.isEven()&&Y.isEven();)H.iushrn(1),Y.iushrn(1),++J;for(var X=Y.clone(),tt=H.clone();!H.isZero();){for(var V=0,Q=1;!(H.words[0]&Q)&&V<26;++V,Q<<=1);if(V>0)for(H.iushrn(V);V-- >0;)(j.isOdd()||et.isOdd())&&(j.iadd(X),et.isub(tt)),j.iushrn(1),et.iushrn(1);for(var ot=0,$=1;!(Y.words[0]&$)&&ot<26;++ot,$<<=1);if(ot>0)for(Y.iushrn(ot);ot-- >0;)(it.isOdd()||ut.isOdd())&&(it.iadd(X),ut.isub(tt)),it.iushrn(1),ut.iushrn(1);H.cmp(Y)>=0?(H.isub(Y),j.isub(it),et.isub(ut)):(Y.isub(H),it.isub(j),ut.isub(et))}return{a:it,b:ut,gcd:Y.iushln(J)}},c.prototype._invmp=function(O){n(O.negative===0),n(!O.isZero());var H=this,Y=O.clone();H.negative!==0?H=H.umod(O):H=H.clone();for(var j=new c(1),et=new c(0),it=Y.clone();H.cmpn(1)>0&&Y.cmpn(1)>0;){for(var ut=0,J=1;!(H.words[0]&J)&&ut<26;++ut,J<<=1);if(ut>0)for(H.iushrn(ut);ut-- >0;)j.isOdd()&&j.iadd(it),j.iushrn(1);for(var X=0,tt=1;!(Y.words[0]&tt)&&X<26;++X,tt<<=1);if(X>0)for(Y.iushrn(X);X-- >0;)et.isOdd()&&et.iadd(it),et.iushrn(1);H.cmp(Y)>=0?(H.isub(Y),j.isub(et)):(Y.isub(H),et.isub(j))}var V;return H.cmpn(1)===0?V=j:V=et,V.cmpn(0)<0&&V.iadd(O),V},c.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var H=this.clone(),Y=O.clone();H.negative=0,Y.negative=0;for(var j=0;H.isEven()&&Y.isEven();j++)H.iushrn(1),Y.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;Y.isEven();)Y.iushrn(1);var et=H.cmp(Y);if(et<0){var it=H;H=Y,Y=it}else if(et===0||Y.cmpn(1)===0)break;H.isub(Y)}while(!0);return Y.iushln(j)},c.prototype.invm=function(O){return this.egcd(O).a.umod(O)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(O){return this.words[0]&O},c.prototype.bincn=function(O){n(typeof O=="number");var H=O%26,Y=(O-H)/26,j=1<>>26,ut&=67108863,this.words[it]=ut}return et!==0&&(this.words[it]=et,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(O){var H=O<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var Y;if(this.length>1)Y=1;else{H&&(O=-O),n(O<=67108863,"Number is too big");var j=this.words[0]|0;Y=j===O?0:jO.length)return 1;if(this.length=0;Y--){var j=this.words[Y]|0,et=O.words[Y]|0;if(j!==et){jet&&(H=1);break}}return H},c.prototype.gtn=function(O){return this.cmpn(O)===1},c.prototype.gt=function(O){return this.cmp(O)===1},c.prototype.gten=function(O){return this.cmpn(O)>=0},c.prototype.gte=function(O){return this.cmp(O)>=0},c.prototype.ltn=function(O){return this.cmpn(O)===-1},c.prototype.lt=function(O){return this.cmp(O)===-1},c.prototype.lten=function(O){return this.cmpn(O)<=0},c.prototype.lte=function(O){return this.cmp(O)<=0},c.prototype.eqn=function(O){return this.cmpn(O)===0},c.prototype.eq=function(O){return this.cmp(O)===0},c.red=function(O){return new I(O)},c.prototype.toRed=function(O){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(O){return this.red=O,this},c.prototype.forceRed=function(O){return n(!this.red,"Already a number in reduction context"),this._forceRed(O)},c.prototype.redAdd=function(O){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},c.prototype.redIAdd=function(O){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},c.prototype.redSub=function(O){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},c.prototype.redISub=function(O){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},c.prototype.redShl=function(O){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},c.prototype.redMul=function(O){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},c.prototype.redIMul=function(O){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(O){return n(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var s={k256:null,p224:null,p192:null,p25519:null};function L(B,O){this.name=B,this.p=new c(O,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var O=new c(null);return O.words=new Array(Math.ceil(this.n/13)),O},L.prototype.ireduce=function(O){var H=O,Y;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),Y=H.bitLength();while(Y>this.n);var j=Y0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},L.prototype.split=function(O,H){O.iushrn(this.n,0,H)},L.prototype.imulK=function(O){return O.imul(this.k)};function M(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(M,L),M.prototype.split=function(O,H){for(var Y=4194303,j=Math.min(O.length,9),et=0;et>>22,it=ut}it>>>=22,O.words[et-10]=it,it===0&&O.length>10?O.length-=10:O.length-=9},M.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var H=0,Y=0;Y>>=26,O.words[Y]=et,H=j}return H!==0&&(O.words[O.length++]=H),O},c._prime=function(O){if(s[O])return s[O];var H;if(O==="k256")H=new M;else if(O==="p224")H=new z;else if(O==="p192")H=new D;else if(O==="p25519")H=new N;else throw new Error("Unknown prime "+O);return s[O]=H,H};function I(B){if(typeof B=="string"){var O=c._prime(B);this.m=O.p,this.prime=O}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}I.prototype._verify1=function(O){n(O.negative===0,"red works only with positives"),n(O.red,"red works only with red numbers")},I.prototype._verify2=function(O,H){n((O.negative|H.negative)===0,"red works only with positives"),n(O.red&&O.red===H.red,"red works only with red numbers")},I.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):O.umod(this.m)._forceRed(this)},I.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},I.prototype.add=function(O,H){this._verify2(O,H);var Y=O.add(H);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y._forceRed(this)},I.prototype.iadd=function(O,H){this._verify2(O,H);var Y=O.iadd(H);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y},I.prototype.sub=function(O,H){this._verify2(O,H);var Y=O.sub(H);return Y.cmpn(0)<0&&Y.iadd(this.m),Y._forceRed(this)},I.prototype.isub=function(O,H){this._verify2(O,H);var Y=O.isub(H);return Y.cmpn(0)<0&&Y.iadd(this.m),Y},I.prototype.shl=function(O,H){return this._verify1(O),this.imod(O.ushln(H))},I.prototype.imul=function(O,H){return this._verify2(O,H),this.imod(O.imul(H))},I.prototype.mul=function(O,H){return this._verify2(O,H),this.imod(O.mul(H))},I.prototype.isqr=function(O){return this.imul(O,O.clone())},I.prototype.sqr=function(O){return this.mul(O,O)},I.prototype.sqrt=function(O){if(O.isZero())return O.clone();var H=this.m.andln(3);if(n(H%2===1),H===3){var Y=this.m.add(new c(1)).iushrn(2);return this.pow(O,Y)}for(var j=this.m.subn(1),et=0;!j.isZero()&&j.andln(1)===0;)et++,j.iushrn(1);n(!j.isZero());var it=new c(1).toRed(this),ut=it.redNeg(),J=this.m.subn(1).iushrn(1),X=this.m.bitLength();for(X=new c(2*X*X).toRed(this);this.pow(X,J).cmp(ut)!==0;)X.redIAdd(ut);for(var tt=this.pow(X,j),V=this.pow(O,j.addn(1).iushrn(1)),Q=this.pow(O,j),ot=et;Q.cmp(it)!==0;){for(var $=Q,Z=0;$.cmp(it)!==0;Z++)$=$.redSqr();n(Z=0;et--){for(var tt=H.words[et],V=X-1;V>=0;V--){var Q=tt>>V&1;if(it!==j[0]&&(it=this.sqr(it)),Q===0&&ut===0){J=0;continue}ut<<=1,ut|=Q,J++,!(J!==Y&&(et!==0||V!==0))&&(it=this.mul(it,j[ut]),J=0,ut=0)}X=26}return it},I.prototype.convertTo=function(O){var H=O.umod(this.m);return H===O?H.clone():H},I.prototype.convertFrom=function(O){var H=O.clone();return H.red=null,H},c.mont=function(O){return new k(O)};function k(B){I.call(this,B),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}f(k,I),k.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},k.prototype.convertFrom=function(O){var H=this.imod(O.mul(this.rinv));return H.red=null,H},k.prototype.imul=function(O,H){if(O.isZero()||H.isZero())return O.words[0]=0,O.length=1,O;var Y=O.imul(H),j=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),et=Y.isub(j).iushrn(this.shift),it=et;return et.cmp(this.m)>=0?it=et.isub(this.m):et.cmpn(0)<0&&(it=et.iadd(this.m)),it._forceRed(this)},k.prototype.mul=function(O,H){if(O.isZero()||H.isZero())return new c(0)._forceRed(this);var Y=O.mul(H),j=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),et=Y.isub(j).iushrn(this.shift),it=et;return et.cmp(this.m)>=0?it=et.isub(this.m):et.cmpn(0)<0&&(it=et.iadd(this.m)),it._forceRed(this)},k.prototype.invm=function(O){var H=this.imod(O._invmp(this.m).mul(this.r2));return H._forceRed(this)}}(h,this)},2692:function(h){h.exports=p;function p(r){var e,a,n,f=r.length,c=0;for(e=0;e>>1;if(!(T<=0)){var s,L=e.mallocDouble(2*T*y),M=e.mallocInt32(y);if(y=c(d,T,L,M),y>0){if(T===1&&_)a.init(y),s=a.sweepComplete(T,A,0,y,L,M,0,y,L,M);else{var z=e.mallocDouble(2*T*E),D=e.mallocInt32(E);E=c(w,T,z,D),E>0&&(a.init(y+E),T===1?s=a.sweepBipartite(T,A,0,y,L,M,0,E,z,D):s=n(T,A,_,y,L,M,E,z,D),e.free(z),e.free(D))}e.free(L),e.free(M)}return s}}}var m;function v(d,w){m.push([d,w])}function b(d){return m=[],l(d,d,v,!0),m}function u(d,w){return m=[],l(d,w,v,!1),m}function o(d,w,A){switch(arguments.length){case 1:return b(d);case 2:return typeof w=="function"?l(d,d,w,!0):u(d,w);case 3:return l(d,w,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},7333:function(h,p){function r(){function n(l,m,v,b,u,o,d,w,A,_,y){for(var E=2*l,T=b,s=E*b;TA-w?n(l,m,v,b,u,o,d,w,A,_,y):f(l,m,v,b,u,o,d,w,A,_,y)}return c}function e(){function n(v,b,u,o,d,w,A,_,y,E,T){for(var s=2*v,L=o,M=s*o;LE-y?o?n(v,b,u,d,w,A,_,y,E,T,s):f(v,b,u,d,w,A,_,y,E,T,s):o?c(v,b,u,d,w,A,_,y,E,T,s):l(v,b,u,d,w,A,_,y,E,T,s)}return m}function a(n){return n?r():e()}p.partial=a(!1),p.full=a(!0)},2337:function(h,p,r){h.exports=B;var e=r(5306),a=r(2288),n=r(7333),f=n.partial,c=n.full,l=r(1390),m=r(2464),v=r(122),b=128,u=1<<22,o=1<<22,d=v("!(lo>=p0)&&!(p1>=hi)"),w=v("lo===p0"),A=v("lo0;){tt-=1;var ot=tt*T,$=M[ot],Z=M[ot+1],st=M[ot+2],nt=M[ot+3],ct=M[ot+4],gt=M[ot+5],Tt=tt*s,wt=z[Tt],Rt=z[Tt+1],bt=gt&1,At=!!(gt&16),mt=et,Lt=it,Ht=J,Ut=X;if(bt&&(mt=J,Lt=X,Ht=et,Ut=it),!(gt&2&&(st=A(O,$,Z,st,mt,Lt,Rt),Z>=st))&&!(gt&4&&(Z=_(O,$,Z,st,mt,Lt,wt),Z>=st))){var kt=st-Z,Vt=ct-nt;if(At){if(O*kt*(kt+Vt)v&&u[E+m]>_;--y,E-=d){for(var T=E,s=E+d,L=0;L>>1,_=2*l,y=A,E=u[_*A+m];d=z?(y=M,E=z):L>=N?(y=s,E=L):(y=D,E=N):z>=N?(y=M,E=z):N>=L?(y=s,E=L):(y=D,E=N);for(var B=_*(w-1),O=_*y,I=0;I<_;++I,++B,++O){var k=u[B];u[B]=u[O],u[O]=k}var H=o[w-1];o[w-1]=o[y],o[y]=H,y=a(l,m,d,w-1,u,o,E);for(var B=_*(w-1),O=_*y,I=0;I<_;++I,++B,++O){var k=u[B];u[B]=u[O],u[O]=k}var H=o[w-1];if(o[w-1]=o[y],o[y]=H,A=p0)&&!(p1>=hi)":m};function r(v){return p[v]}function e(v,b,u,o,d,w,A){for(var _=2*v,y=_*u,E=y,T=u,s=b,L=v+b,M=u;o>M;++M,y+=_){var z=d[y+s];if(z===A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function a(v,b,u,o,d,w,A){for(var _=2*v,y=_*u,E=y,T=u,s=b,L=v+b,M=u;o>M;++M,y+=_){var z=d[y+s];if(zD;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function n(v,b,u,o,d,w,A){for(var _=2*v,y=_*u,E=y,T=u,s=b,L=v+b,M=u;o>M;++M,y+=_){var z=d[y+L];if(z<=A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function f(v,b,u,o,d,w,A){for(var _=2*v,y=_*u,E=y,T=u,s=b,L=v+b,M=u;o>M;++M,y+=_){var z=d[y+L];if(z<=A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function c(v,b,u,o,d,w,A){for(var _=2*v,y=_*u,E=y,T=u,s=b,L=v+b,M=u;o>M;++M,y+=_){var z=d[y+s],D=d[y+L];if(z<=A&&A<=D)if(T===M)T+=1,E+=_;else{for(var N=0;_>N;++N){var I=d[y+N];d[y+N]=d[E],d[E++]=I}var k=w[M];w[M]=w[T],w[T++]=k}}return T}function l(v,b,u,o,d,w,A){for(var _=2*v,y=_*u,E=y,T=u,s=b,L=v+b,M=u;o>M;++M,y+=_){var z=d[y+s],D=d[y+L];if(zN;++N){var I=d[y+N];d[y+N]=d[E],d[E++]=I}var k=w[M];w[M]=w[T],w[T++]=k}}return T}function m(v,b,u,o,d,w,A,_){for(var y=2*v,E=y*u,T=E,s=u,L=b,M=v+b,z=u;o>z;++z,E+=y){var D=d[E+L],N=d[E+M];if(!(D>=A)&&!(_>=N))if(s===z)s+=1,T+=y;else{for(var I=0;y>I;++I){var k=d[E+I];d[E+I]=d[T],d[T++]=k}var B=w[z];w[z]=w[s],w[s++]=B}}return s}},309:function(h){h.exports=r;var p=32;function r(b,u){u<=4*p?e(0,u-1,b):v(0,u-1,b)}function e(b,u,o){for(var d=2*(b+1),w=b+1;w<=u;++w){for(var A=o[d++],_=o[d++],y=w,E=d-2;y-- >b;){var T=o[E-2],s=o[E-1];if(To[u+1]:!0}function m(b,u,o,d){b*=2;var w=d[b];return w>1,y=_-d,E=_+d,T=w,s=y,L=_,M=E,z=A,D=b+1,N=u-1,I=0;l(T,s,o)&&(I=T,T=s,s=I),l(M,z,o)&&(I=M,M=z,z=I),l(T,L,o)&&(I=T,T=L,L=I),l(s,L,o)&&(I=s,s=L,L=I),l(T,M,o)&&(I=T,T=M,M=I),l(L,M,o)&&(I=L,L=M,M=I),l(s,z,o)&&(I=s,s=z,z=I),l(s,L,o)&&(I=s,s=L,L=I),l(M,z,o)&&(I=M,M=z,z=I);for(var k=o[2*s],B=o[2*s+1],O=o[2*M],H=o[2*M+1],Y=2*T,j=2*L,et=2*z,it=2*w,ut=2*_,J=2*A,X=0;X<2;++X){var tt=o[Y+X],V=o[j+X],Q=o[et+X];o[it+X]=tt,o[ut+X]=V,o[J+X]=Q}n(y,b,o),n(E,u,o);for(var ot=D;ot<=N;++ot)if(m(ot,k,B,o))ot!==D&&a(ot,D,o),++D;else if(!m(ot,O,H,o))for(;;)if(m(N,O,H,o)){m(N,k,B,o)?(f(ot,D,N,o),++D,--N):(a(ot,N,o),--N);break}else{if(--N>>1;n(d,V);for(var Q=0,ot=0,ut=0;ut=f)$=$-f|0,A(v,b,ot--,$);else if($>=0)A(l,m,Q--,$);else if($<=-f){$=-$-f|0;for(var Z=0;Z>>1;n(d,V);for(var Q=0,ot=0,$=0,ut=0;ut>1===d[2*ut+3]>>1&&(st=2,ut+=1),Z<0){for(var nt=-(Z>>1)-1,ct=0;ct<$;++ct){var gt=M(u[ct],nt);if(gt!==void 0)return gt}if(st!==0)for(var ct=0;ct>1)-1;st===0?A(l,m,Q--,nt):st===1?A(v,b,ot--,nt):st===2&&A(u,o,$--,nt)}}}function T(L,M,z,D,N,I,k,B,O,H,Y,j){var et=0,it=2*L,ut=M,J=M+L,X=1,tt=1;D?tt=f:X=f;for(var V=N;V>>1;n(d,Z);for(var st=0,V=0;V=f?(ct=!D,Q-=f):(ct=!!D,Q-=1),ct)_(l,m,st++,Q);else{var gt=j[Q],Tt=it*Q,wt=Y[Tt+M+1],Rt=Y[Tt+M+1+L];t:for(var bt=0;bt>>1;n(d,Q);for(var ot=0,J=0;J=f)l[ot++]=X-f;else{X-=1;var Z=Y[X],st=et*X,nt=H[st+M+1],ct=H[st+M+1+L];t:for(var gt=0;gt=0;--gt)if(l[gt]===X){for(var bt=gt+1;bt0;){for(var d=l.pop(),b=l.pop(),w=-1,A=-1,u=v[b],y=1;y=0||(c.flip(b,d),a(f,c,l,w,b,A),a(f,c,l,b,A,w),a(f,c,l,A,d,w),a(f,c,l,d,w,A))}}},7098:function(h,p,r){var e=r(5070);h.exports=m;function a(v,b,u,o,d,w,A){this.cells=v,this.neighbor=b,this.flags=o,this.constraint=u,this.active=d,this.next=w,this.boundary=A}var n=a.prototype;function f(v,b){return v[0]-b[0]||v[1]-b[1]||v[2]-b[2]}n.locate=function(){var v=[0,0,0];return function(b,u,o){var d=b,w=u,A=o;return u0||A.length>0;){for(;w.length>0;){var s=w.pop();if(_[s]!==-d){_[s]=d,y[s];for(var L=0;L<3;++L){var M=T[3*s+L];M>=0&&_[M]===0&&(E[3*s+L]?A.push(M):(w.push(M),_[M]=d))}}}var z=A;A=w,w=z,A.length=0,d=-d}var D=l(y,_,b);return u?D.concat(o.boundary):D}},9971:function(h,p,r){var e=r(5070),a=r(417)[3],n=0,f=1,c=2;h.exports=A;function l(_,y,E,T,s){this.a=_,this.b=y,this.idx=E,this.lowerIds=T,this.upperIds=s}function m(_,y,E,T){this.a=_,this.b=y,this.type=E,this.idx=T}function v(_,y){var E=_.a[0]-y.a[0]||_.a[1]-y.a[1]||_.type-y.type;return E||_.type!==n&&(E=a(_.a,_.b,y.b),E)?E:_.idx-y.idx}function b(_,y){return a(_.a,_.b,y)}function u(_,y,E,T,s){for(var L=e.lt(y,T,b),M=e.gt(y,T,b),z=L;z1&&a(E[N[k-2]],E[N[k-1]],T)>0;)_.push([N[k-1],N[k-2],s]),k-=1;N.length=k,N.push(s);for(var I=D.upperIds,k=I.length;k>1&&a(E[I[k-2]],E[I[k-1]],T)<0;)_.push([I[k-2],I[k-1],s]),k-=1;I.length=k,I.push(s)}}function o(_,y){var E;return _.a[0]D[0]&&s.push(new m(D,z,c,L),new m(z,D,f,L))}s.sort(v);for(var N=s[0].a[0]-(1+Math.abs(s[0].a[0]))*Math.pow(2,-52),I=[new l([N,1],[N,0],-1,[],[])],k=[],L=0,B=s.length;L=0}}(),n.removeTriangle=function(l,m,v){var b=this.stars;f(b[l],m,v),f(b[m],v,l),f(b[v],l,m)},n.addTriangle=function(l,m,v){var b=this.stars;b[l].push(m,v),b[m].push(v,l),b[v].push(l,m)},n.opposite=function(l,m){for(var v=this.stars[m],b=1,u=v.length;b=0;--O){var tt=k[O];H=tt[0];var V=N[H],Q=V[0],ot=V[1],$=D[Q],Z=D[ot];if(($[0]-Z[0]||$[1]-Z[1])<0){var st=Q;Q=ot,ot=st}V[0]=Q;var nt=V[1]=tt[1],ct;for(B&&(ct=V[2]);O>0&&k[O-1][0]===H;){var tt=k[--O],gt=tt[1];B?N.push([nt,gt,ct]):N.push([nt,gt]),nt=gt}B?N.push([nt,ot,ct]):N.push([nt,ot])}return Y}function y(D,N,I){for(var k=N.length,B=new e(k),O=[],H=0;HN[2]?1:0)}function s(D,N,I){if(D.length!==0){if(N)for(var k=0;k0||H.length>0}function z(D,N,I){var k;if(I){k=N;for(var B=new Array(N.length),O=0;O_+1)throw new Error(w+" map requires nshades to be at least size "+d.length);Array.isArray(m.alpha)?m.alpha.length!==2?y=[1,1]:y=m.alpha.slice():typeof m.alpha=="number"?y=[m.alpha,m.alpha]:y=[1,1],v=d.map(function(z){return Math.round(z.index*_)}),y[0]=Math.min(Math.max(y[0],0),1),y[1]=Math.min(Math.max(y[1],0),1);var T=d.map(function(z,D){var N=d[D].index,I=d[D].rgb.slice();return I.length===4&&I[3]>=0&&I[3]<=1||(I[3]=y[0]+(y[1]-y[0])*N),I}),s=[];for(E=0;E=0}function m(v,b,u,o){var d=e(b,u,o);if(d===0){var w=a(e(v,b,u)),A=a(e(v,b,o));if(w===A){if(w===0){var _=l(v,b,u),y=l(v,b,o);return _===y?0:_?1:-1}return 0}else{if(A===0)return w>0||l(v,b,o)?-1:1;if(w===0)return A>0||l(v,b,u)?1:-1}return a(A-w)}var E=e(v,b,u);if(E>0)return d>0&&e(v,b,o)>0?1:-1;if(E<0)return d>0||e(v,b,o)>0?1:-1;var T=e(v,b,o);return T>0||l(v,b,u)?1:-1}},7538:function(h){h.exports=function(r){return r<0?-1:r>0?1:0}},9209:function(h){h.exports=e;var p=Math.min;function r(a,n){return a-n}function e(a,n){var f=a.length,c=a.length-n.length;if(c)return c;switch(f){case 0:return 0;case 1:return a[0]-n[0];case 2:return a[0]+a[1]-n[0]-n[1]||p(a[0],a[1])-p(n[0],n[1]);case 3:var l=a[0]+a[1],m=n[0]+n[1];if(c=l+a[2]-(m+n[2]),c)return c;var v=p(a[0],a[1]),b=p(n[0],n[1]);return p(v,a[2])-p(b,n[2])||p(v+a[2],l)-p(b+n[2],m);case 4:var u=a[0],o=a[1],d=a[2],w=a[3],A=n[0],_=n[1],y=n[2],E=n[3];return u+o+d+w-(A+_+y+E)||p(u,o,d,w)-p(A,_,y,E,A)||p(u+o,u+d,u+w,o+d,o+w,d+w)-p(A+_,A+y,A+E,_+y,_+E,y+E)||p(u+o+d,u+o+w,u+d+w,o+d+w)-p(A+_+y,A+_+E,A+y+E,_+y+E);default:for(var T=a.slice().sort(r),s=n.slice().sort(r),L=0;Lr[a][0]&&(a=n);return ea?[[a],[e]]:[[e]]}},8722:function(h,p,r){h.exports=a;var e=r(3266);function a(n){var f=e(n),c=f.length;if(c<=2)return[];for(var l=new Array(c),m=f[c-1],v=0;v=m[A]&&(w+=1);o[d]=w}}return l}function c(l,m){try{return e(l,!0)}catch{var v=a(l);if(v.length<=m)return[];var b=n(l,v),u=e(b,!0);return f(u,v)}}},9680:function(h){function p(e,a,n,f,c,l){var m=6*c*c-6*c,v=3*c*c-4*c+1,b=-6*c*c+6*c,u=3*c*c-2*c;if(e.length){l||(l=new Array(e.length));for(var o=e.length-1;o>=0;--o)l[o]=m*e[o]+v*a[o]+b*n[o]+u*f[o];return l}return m*e+v*a+b*n[o]+u*f}function r(e,a,n,f,c,l){var m=c-1,v=c*c,b=m*m,u=(1+2*c)*b,o=c*b,d=v*(3-2*c),w=v*m;if(e.length){l||(l=new Array(e.length));for(var A=e.length-1;A>=0;--A)l[A]=u*e[A]+o*a[A]+d*n[A]+w*f[A];return l}return u*e+o*a+d*n+w*f}h.exports=r,h.exports.derivative=p},4419:function(h,p,r){var e=r(2183),a=r(1215);h.exports=l;function n(m,v){this.point=m,this.index=v}function f(m,v){for(var b=m.point,u=v.point,o=b.length,d=0;d=2)return!1;I[B]=O}return!0}):N=N.filter(function(I){for(var k=0;k<=u;++k){var B=L[I[k]];if(B<0)return!1;I[k]=B}return!0}),u&1)for(var w=0;w>>31},h.exports.exponent=function(n){var f=h.exports.hi(n);return(f<<1>>>21)-1023},h.exports.fraction=function(n){var f=h.exports.lo(n),c=h.exports.hi(n),l=c&(1<<20)-1;return c&2146435072&&(l+=1048576),[f,l]},h.exports.denormalized=function(n){var f=h.exports.hi(n);return!(f&2146435072)}},3094:function(h){function p(a,n,f){var c=a[f]|0;if(c<=0)return[];var l=new Array(c),m;if(f===a.length-1)for(m=0;m"u"&&(n=0),typeof a){case"number":if(a>0)return r(a|0,n);break;case"object":if(typeof a.length=="number")return p(a,n,0);break}return[]}h.exports=e},8348:function(h,p,r){h.exports=a;var e=r(1215);function a(n,f){var c=n.length;if(typeof f!="number"){f=0;for(var l=0;l=u-1)for(var E=w.length-1,s=v-b[u-1],T=0;T<_;++T,--E)d[T]=w[E]+s*A[E];else{for(var E=_*(o+1)-1,L=b[o],M=b[o+1],z=M-L||1,D=this._scratch[1],N=this._scratch[2],I=this._scratch[3],k=this._scratch[4],B=!0,T=0;T<_;++T,--E)D[T]=w[E],I[T]=A[E]*z,N[T]=w[E+_],k[T]=A[E+_]*z,B=B&&D[T]===N[T]&&I[T]===k[T]&&I[T]===0;if(B)for(var T=0;T<_;++T)d[T]=D[T];else e(D,I,N,k,(v-L)/z,d)}for(var O=y[0],H=y[1],T=0;T<_;++T)d[T]=n(O[T],H[T],d[T]);return d},c.dcurve=function(v){var b=this._time,u=b.length,o=a.le(b,v),d=this._scratch[0],w=this._state,A=this._velocity,_=this.dimension;if(o>=u-1){var y=w.length-1;v-b[u-1];for(var E=0;E<_;++E,--y)d[E]=A[y]}else{for(var y=_*(o+1)-1,T=b[o],s=b[o+1],L=s-T||1,M=this._scratch[1],z=this._scratch[2],D=this._scratch[3],N=this._scratch[4],I=!0,E=0;E<_;++E,--y)M[E]=w[y],D[E]=A[y]*L,z[E]=w[y+_],N[E]=A[y+_]*L,I=I&&M[E]===z[E]&&D[E]===N[E]&&D[E]===0;if(I)for(var E=0;E<_;++E)d[E]=0;else{e.derivative(M,D,z,N,(v-T)/L,d);for(var E=0;E<_;++E)d[E]/=L}}return d},c.lastT=function(){var v=this._time;return v[v.length-1]},c.stable=function(){for(var v=this._velocity,b=v.length,u=this.dimension-1;u>=0;--u)if(v[--b])return!1;return!0},c.jump=function(v){var b=this.lastT(),u=this.dimension;if(!(v0;--T)o.push(n(_[T-1],y[T-1],arguments[T])),d.push(0)}},c.push=function(v){var b=this.lastT(),u=this.dimension;if(!(v1e-6?1/A:0;this._time.push(v);for(var s=u;s>0;--s){var L=n(y[s-1],E[s-1],arguments[s]);o.push(L),d.push((L-o[w++])*T)}}},c.set=function(v){var b=this.dimension;if(!(v0;--_)u.push(n(w[_-1],A[_-1],arguments[_])),o.push(0)}},c.move=function(v){var b=this.lastT(),u=this.dimension;if(!(v<=b||arguments.length!==u+1)){var o=this._state,d=this._velocity,w=o.length-this.dimension,A=this.bounds,_=A[0],y=A[1],E=v-b,T=E>1e-6?1/E:0;this._time.push(v);for(var s=u;s>0;--s){var L=arguments[s];o.push(n(_[s-1],y[s-1],o[w++]+L)),d.push(L*T)}}},c.idle=function(v){var b=this.lastT();if(!(v=0;--T)o.push(n(_[T],y[T],o[w]+E*d[w])),d.push(0),w+=1}};function l(v){for(var b=new Array(v),u=0;u=0;--D){var s=L[D];M[D]<=0?L[D]=new e(s._color,s.key,s.value,L[D+1],s.right,s._count+1):L[D]=new e(s._color,s.key,s.value,s.left,L[D+1],s._count+1)}for(var D=L.length-1;D>1;--D){var N=L[D-1],s=L[D];if(N._color===r||s._color===r)break;var I=L[D-2];if(I.left===N)if(N.left===s){var k=I.right;if(k&&k._color===p)N._color=r,I.right=n(r,k),I._color=p,D-=1;else{if(I._color=p,I.left=N.right,N._color=r,N.right=I,L[D-2]=N,L[D-1]=s,f(I),f(N),D>=3){var B=L[D-3];B.left===I?B.left=N:B.right=N}break}}else{var k=I.right;if(k&&k._color===p)N._color=r,I.right=n(r,k),I._color=p,D-=1;else{if(N.right=s.left,I._color=p,I.left=s.right,s._color=r,s.left=N,s.right=I,L[D-2]=s,L[D-1]=N,f(I),f(N),f(s),D>=3){var B=L[D-3];B.left===I?B.left=s:B.right=s}break}}else if(N.right===s){var k=I.left;if(k&&k._color===p)N._color=r,I.left=n(r,k),I._color=p,D-=1;else{if(I._color=p,I.right=N.left,N._color=r,N.left=I,L[D-2]=N,L[D-1]=s,f(I),f(N),D>=3){var B=L[D-3];B.right===I?B.right=N:B.left=N}break}}else{var k=I.left;if(k&&k._color===p)N._color=r,I.left=n(r,k),I._color=p,D-=1;else{if(N.left=s.right,I._color=p,I.right=s.left,s._color=r,s.right=N,s.left=I,L[D-2]=s,L[D-1]=N,f(I),f(N),f(s),D>=3){var B=L[D-3];B.right===I?B.right=s:B.left=s}break}}}return L[0]._color=r,new c(T,L[0])};function m(y,E){if(E.left){var T=m(y,E.left);if(T)return T}var T=y(E.key,E.value);if(T)return T;if(E.right)return m(y,E.right)}function v(y,E,T,s){var L=E(y,s.key);if(L<=0){if(s.left){var M=v(y,E,T,s.left);if(M)return M}var M=T(s.key,s.value);if(M)return M}if(s.right)return v(y,E,T,s.right)}function b(y,E,T,s,L){var M=T(y,L.key),z=T(E,L.key),D;if(M<=0&&(L.left&&(D=b(y,E,T,s,L.left),D)||z>0&&(D=s(L.key,L.value),D)))return D;if(z>0&&L.right)return b(y,E,T,s,L.right)}l.forEach=function(E,T,s){if(this.root)switch(arguments.length){case 1:return m(E,this.root);case 2:return v(T,this._compare,E,this.root);case 3:return this._compare(T,s)>=0?void 0:b(T,s,this._compare,E,this.root)}},Object.defineProperty(l,"begin",{get:function(){for(var y=[],E=this.root;E;)y.push(E),E=E.left;return new u(this,y)}}),Object.defineProperty(l,"end",{get:function(){for(var y=[],E=this.root;E;)y.push(E),E=E.right;return new u(this,y)}}),l.at=function(y){if(y<0)return new u(this,[]);for(var E=this.root,T=[];;){if(T.push(E),E.left){if(y=E.right._count)break;E=E.right}else break}return new u(this,[])},l.ge=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M<=0&&(L=s.length),M<=0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.gt=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M<0&&(L=s.length),M<0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.lt=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M>0&&(L=s.length),M<=0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.le=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M>=0&&(L=s.length),M<0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.find=function(y){for(var E=this._compare,T=this.root,s=[];T;){var L=E(y,T.key);if(s.push(T),L===0)return new u(this,s);L<=0?T=T.left:T=T.right}return new u(this,[])},l.remove=function(y){var E=this.find(y);return E?E.remove():this},l.get=function(y){for(var E=this._compare,T=this.root;T;){var s=E(y,T.key);if(s===0)return T.value;s<=0?T=T.left:T=T.right}};function u(y,E){this.tree=y,this._stack=E}var o=u.prototype;Object.defineProperty(o,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(o,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),o.clone=function(){return new u(this.tree,this._stack.slice())};function d(y,E){y.key=E.key,y.value=E.value,y.left=E.left,y.right=E.right,y._color=E._color,y._count=E._count}function w(y){for(var E,T,s,L,M=y.length-1;M>=0;--M){if(E=y[M],M===0){E._color=r;return}if(T=y[M-1],T.left===E){if(s=T.right,s.right&&s.right._color===p){if(s=T.right=a(s),L=s.right=a(s.right),T.right=s.left,s.left=T,s.right=L,s._color=T._color,E._color=r,T._color=r,L._color=r,f(T),f(s),M>1){var z=y[M-2];z.left===T?z.left=s:z.right=s}y[M-1]=s;return}else if(s.left&&s.left._color===p){if(s=T.right=a(s),L=s.left=a(s.left),T.right=L.left,s.left=L.right,L.left=T,L.right=s,L._color=T._color,T._color=r,s._color=r,E._color=r,f(T),f(s),f(L),M>1){var z=y[M-2];z.left===T?z.left=L:z.right=L}y[M-1]=L;return}if(s._color===r)if(T._color===p){T._color=r,T.right=n(p,s);return}else{T.right=n(p,s);continue}else{if(s=a(s),T.right=s.left,s.left=T,s._color=T._color,T._color=p,f(T),f(s),M>1){var z=y[M-2];z.left===T?z.left=s:z.right=s}y[M-1]=s,y[M]=T,M+11){var z=y[M-2];z.right===T?z.right=s:z.left=s}y[M-1]=s;return}else if(s.right&&s.right._color===p){if(s=T.left=a(s),L=s.right=a(s.right),T.left=L.right,s.right=L.left,L.right=T,L.left=s,L._color=T._color,T._color=r,s._color=r,E._color=r,f(T),f(s),f(L),M>1){var z=y[M-2];z.right===T?z.right=L:z.left=L}y[M-1]=L;return}if(s._color===r)if(T._color===p){T._color=r,T.left=n(p,s);return}else{T.left=n(p,s);continue}else{if(s=a(s),T.left=s.right,s.right=T,s._color=T._color,T._color=p,f(T),f(s),M>1){var z=y[M-2];z.right===T?z.right=s:z.left=s}y[M-1]=s,y[M]=T,M+1=0;--s){var T=y[s];T.left===y[s+1]?E[s]=new e(T._color,T.key,T.value,E[s+1],T.right,T._count):E[s]=new e(T._color,T.key,T.value,T.left,E[s+1],T._count)}if(T=E[E.length-1],T.left&&T.right){var L=E.length;for(T=T.left;T.right;)E.push(T),T=T.right;var M=E[L-1];E.push(new e(T._color,M.key,M.value,T.left,T.right,T._count)),E[L-1].key=T.key,E[L-1].value=T.value;for(var s=E.length-2;s>=L;--s)T=E[s],E[s]=new e(T._color,T.key,T.value,T.left,E[s+1],T._count);E[L-1].left=E[L]}if(T=E[E.length-1],T._color===p){var z=E[E.length-2];z.left===T?z.left=null:z.right===T&&(z.right=null),E.pop();for(var s=0;s0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(o,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(o,"index",{get:function(){var y=0,E=this._stack;if(E.length===0){var T=this.tree.root;return T?T._count:0}else E[E.length-1].left&&(y=E[E.length-1].left._count);for(var s=E.length-2;s>=0;--s)E[s+1]===E[s].right&&(++y,E[s].left&&(y+=E[s].left._count));return y},enumerable:!0}),o.next=function(){var y=this._stack;if(y.length!==0){var E=y[y.length-1];if(E.right)for(E=E.right;E;)y.push(E),E=E.left;else for(y.pop();y.length>0&&y[y.length-1].right===E;)E=y[y.length-1],y.pop()}},Object.defineProperty(o,"hasNext",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].right)return!0;for(var E=y.length-1;E>0;--E)if(y[E-1].left===y[E])return!0;return!1}}),o.update=function(y){var E=this._stack;if(E.length===0)throw new Error("Can't update empty node!");var T=new Array(E.length),s=E[E.length-1];T[T.length-1]=new e(s._color,s.key,y,s.left,s.right,s._count);for(var L=E.length-2;L>=0;--L)s=E[L],s.left===E[L+1]?T[L]=new e(s._color,s.key,s.value,T[L+1],s.right,s._count):T[L]=new e(s._color,s.key,s.value,s.left,T[L+1],s._count);return new c(this.tree._compare,T[0])},o.prev=function(){var y=this._stack;if(y.length!==0){var E=y[y.length-1];if(E.left)for(E=E.left;E;)y.push(E),E=E.right;else for(y.pop();y.length>0&&y[y.length-1].left===E;)E=y[y.length-1],y.pop()}},Object.defineProperty(o,"hasPrev",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].left)return!0;for(var E=y.length-1;E>0;--E)if(y[E-1].right===y[E])return!0;return!1}});function A(y,E){return yE?1:0}function _(y){return new c(y||A,null)}},7453:function(h,p,r){h.exports=s;var e=r(9557),a=r(1681),n=r(1011),f=r(2864),c=r(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function m(L,M){return L[0]=M[0],L[1]=M[1],L[2]=M[2],L}function v(L){this.gl=L,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(L)}var b=v.prototype;b.update=function(L){L=L||{};function M(it,ut,J){if(J in L){var X=L[J],tt=this[J],V;(it?Array.isArray(X)&&Array.isArray(X[0]):Array.isArray(X))?this[J]=V=[ut(X[0]),ut(X[1]),ut(X[2])]:this[J]=V=[ut(X),ut(X),ut(X)];for(var Q=0;Q<3;++Q)if(V[Q]!==tt[Q])return!0}return!1}var z=M.bind(this,!1,Number),D=M.bind(this,!1,Boolean),N=M.bind(this,!1,String),I=M.bind(this,!0,function(it){if(Array.isArray(it)){if(it.length===3)return[+it[0],+it[1],+it[2],1];if(it.length===4)return[+it[0],+it[1],+it[2],+it[3]]}return[0,0,0,1]}),k,B=!1,O=!1;if("bounds"in L)for(var H=L.bounds,Y=0;Y<2;++Y)for(var j=0;j<3;++j)H[Y][j]!==this.bounds[Y][j]&&(O=!0),this.bounds[Y][j]=H[Y][j];if("ticks"in L){k=L.ticks,B=!0,this.autoTicks=!1;for(var Y=0;Y<3;++Y)this.tickSpacing[Y]=0}else z("tickSpacing")&&(this.autoTicks=!0,O=!0);if(this._firstInit&&("ticks"in L||"tickSpacing"in L||(this.autoTicks=!0),O=!0,B=!0,this._firstInit=!1),O&&this.autoTicks&&(k=c.create(this.bounds,this.tickSpacing),B=!0),B){for(var Y=0;Y<3;++Y)k[Y].sort(function(ut,J){return ut.x-J.x});c.equal(k,this.ticks)?B=!1:this.ticks=k}D("tickEnable"),N("tickFont")&&(B=!0),z("tickSize"),z("tickAngle"),z("tickPad"),I("tickColor");var et=N("labels");N("labelFont")&&(et=!0),D("labelEnable"),z("labelSize"),z("labelPad"),I("labelColor"),D("lineEnable"),D("lineMirror"),z("lineWidth"),I("lineColor"),D("lineTickEnable"),D("lineTickMirror"),z("lineTickLength"),z("lineTickWidth"),I("lineTickColor"),D("gridEnable"),z("gridWidth"),I("gridColor"),D("zeroEnable"),I("zeroLineColor"),z("zeroLineWidth"),D("backgroundEnable"),I("backgroundColor"),this._text?this._text&&(et||B)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=e(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&B&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};function u(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var o=[new u,new u,new u];function d(L,M,z,D,N){for(var I=L.primalOffset,k=L.primalMinor,B=L.mirrorOffset,O=L.mirrorMinor,H=D[M],Y=0;Y<3;++Y)if(M!==Y){var j=I,et=B,it=k,ut=O;H&1<0?(it[Y]=-1,ut[Y]=0):(it[Y]=0,ut[Y]=1)}}var w=[0,0,0],A={model:l,view:l,projection:l,_ortho:!1};b.isOpaque=function(){return!0},b.isTransparent=function(){return!1},b.drawTransparent=function(L){};var _=0,y=[0,0,0],E=[0,0,0],T=[0,0,0];b.draw=function(L){L=L||A;for(var tt=this.gl,M=L.model||l,z=L.view||l,D=L.projection||l,N=this.bounds,I=L._ortho||!1,k=f(M,z,D,N,I),B=k.cubeEdges,O=k.axis,H=z[12],Y=z[13],j=z[14],et=z[15],it=I?2:1,ut=it*this.pixelRatio*(D[3]*H+D[7]*Y+D[11]*j+D[15]*et)/tt.drawingBufferHeight,J=0;J<3;++J)this.lastCubeProps.cubeEdges[J]=B[J],this.lastCubeProps.axis[J]=O[J];for(var X=o,J=0;J<3;++J)d(o[J],J,this.bounds,B,O);for(var tt=this.gl,V=w,J=0;J<3;++J)this.backgroundEnable[J]?V[J]=O[J]:V[J]=0;this._background.draw(M,z,D,N,V,this.backgroundColor),this._lines.bind(M,z,D,this);for(var J=0;J<3;++J){var Q=[0,0,0];O[J]>0?Q[J]=N[1][J]:Q[J]=N[0][J];for(var ot=0;ot<2;++ot){var $=(J+1+ot)%3,Z=(J+1+(ot^1))%3;this.gridEnable[$]&&this._lines.drawGrid($,Z,this.bounds,Q,this.gridColor[$],this.gridWidth[$]*this.pixelRatio)}for(var ot=0;ot<2;++ot){var $=(J+1+ot)%3,Z=(J+1+(ot^1))%3;this.zeroEnable[Z]&&Math.min(N[0][Z],N[1][Z])<=0&&Math.max(N[0][Z],N[1][Z])>=0&&this._lines.drawZero($,Z,this.bounds,Q,this.zeroLineColor[Z],this.zeroLineWidth[Z]*this.pixelRatio)}}for(var J=0;J<3;++J){this.lineEnable[J]&&this._lines.drawAxisLine(J,this.bounds,X[J].primalOffset,this.lineColor[J],this.lineWidth[J]*this.pixelRatio),this.lineMirror[J]&&this._lines.drawAxisLine(J,this.bounds,X[J].mirrorOffset,this.lineColor[J],this.lineWidth[J]*this.pixelRatio);for(var st=m(y,X[J].primalMinor),nt=m(E,X[J].mirrorMinor),ct=this.lineTickLength,ot=0;ot<3;++ot){var gt=ut/M[5*ot];st[ot]*=ct[ot]*gt,nt[ot]*=ct[ot]*gt}this.lineTickEnable[J]&&this._lines.drawAxisTicks(J,X[J].primalOffset,st,this.lineTickColor[J],this.lineTickWidth[J]*this.pixelRatio),this.lineTickMirror[J]&&this._lines.drawAxisTicks(J,X[J].mirrorOffset,nt,this.lineTickColor[J],this.lineTickWidth[J]*this.pixelRatio)}this._lines.unbind(),this._text.bind(M,z,D,this.pixelRatio);var Tt,wt=.5,Rt,bt;function At(Vt){bt=[0,0,0],bt[Vt]=1}function mt(Vt,It,re){var Kt=(Vt+1)%3,$t=(Vt+2)%3,le=It[Kt],he=It[$t],de=re[Kt],xe=re[$t];if(le>0&&xe>0){At(Kt);return}else if(le>0&&xe<0){At(Kt);return}else if(le<0&&xe>0){At(Kt);return}else if(le<0&&xe<0){At(Kt);return}else if(he>0&&de>0){At($t);return}else if(he>0&&de<0){At($t);return}else if(he<0&&de>0){At($t);return}else if(he<0&&de<0){At($t);return}}for(var J=0;J<3;++J){for(var Lt=X[J].primalMinor,Ht=X[J].mirrorMinor,Ut=m(T,X[J].primalOffset),ot=0;ot<3;++ot)this.lineTickEnable[J]&&(Ut[ot]+=ut*Lt[ot]*Math.max(this.lineTickLength[ot],0)/M[5*ot]);var kt=[0,0,0];if(kt[J]=1,this.tickEnable[J]){this.tickAngle[J]===-3600?(this.tickAngle[J]=0,this.tickAlign[J]="auto"):this.tickAlign[J]=-1,Rt=1,Tt=[this.tickAlign[J],wt,Rt],Tt[0]==="auto"?Tt[0]=_:Tt[0]=parseInt(""+Tt[0]),bt=[0,0,0],mt(J,Lt,Ht);for(var ot=0;ot<3;++ot)Ut[ot]+=ut*Lt[ot]*this.tickPad[ot]/M[5*ot];this._text.drawTicks(J,this.tickSize[J],this.tickAngle[J],Ut,this.tickColor[J],kt,bt,Tt)}if(this.labelEnable[J]){Rt=0,bt=[0,0,0],this.labels[J].length>4&&(At(J),Rt=1),Tt=[this.labelAlign[J],wt,Rt],Tt[0]==="auto"?Tt[0]=_:Tt[0]=parseInt(""+Tt[0]);for(var ot=0;ot<3;++ot)Ut[ot]+=ut*Lt[ot]*this.labelPad[ot]/M[5*ot];Ut[J]+=.5*(N[0][J]+N[1][J]),this._text.drawLabel(J,this.labelSize[J],this.labelAngle[J],Ut,this.labelColor[J],[0,0,0],bt,Tt)}}this._text.unbind()},b.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function s(L,M){var z=new v(L);return z.update(M),z}},1011:function(h,p,r){h.exports=l;var e=r(5827),a=r(2944),n=r(1943).bg;function f(m,v,b,u){this.gl=m,this.buffer=v,this.vao=b,this.shader=u}var c=f.prototype;c.draw=function(m,v,b,u,o,d){for(var w=!1,A=0;A<3;++A)w=w||o[A];if(w){var _=this.gl;_.enable(_.POLYGON_OFFSET_FILL),_.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:v,projection:b,bounds:u,enable:o,colors:d},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),_.disable(_.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function l(m){for(var v=[],b=[],u=0,o=0;o<3;++o)for(var d=(o+1)%3,w=(o+2)%3,A=[0,0,0],_=[0,0,0],y=-1;y<=1;y+=2){b.push(u,u+2,u+1,u+1,u+2,u+3),A[o]=y,_[o]=y;for(var E=-1;E<=1;E+=2){A[d]=E;for(var T=-1;T<=1;T+=2)A[w]=T,v.push(A[0],A[1],A[2],_[0],_[1],_[2]),u+=1}var s=d;d=w,w=s}var L=e(m,new Float32Array(v)),M=e(m,new Uint16Array(b),m.ELEMENT_ARRAY_BUFFER),z=a(m,[{buffer:L,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:L,type:m.FLOAT,size:3,offset:12,stride:24}],M),D=n(m);return D.attributes.position.location=0,D.attributes.normal.location=1,new f(m,L,z,D)}},2864:function(h,p,r){h.exports=y;var e=r(2288),a=r(104),n=r(4670),f=r(417),c=new Array(16),l=new Array(8),m=new Array(8),v=new Array(3),b=[0,0,0];(function(){for(var E=0;E<8;++E)l[E]=[1,1,1,1],m[E]=[1,1,1]})();function u(E,T,s){for(var L=0;L<4;++L){E[L]=s[12+L];for(var M=0;M<3;++M)E[L]+=T[M]*s[4*M+L]}}var o=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(E){for(var T=0;Tet&&(k|=1<et){k|=1<m[D][1])&&(ot=D);for(var $=-1,D=0;D<3;++D){var Z=ot^1<m[st][0]&&(st=Z)}}var nt=w;nt[0]=nt[1]=nt[2]=0,nt[e.log2($^ot)]=ot&$,nt[e.log2(ot^st)]=ot&st;var ct=st^7;ct===k||ct===Q?(ct=$^7,nt[e.log2(st^ct)]=ct&st):nt[e.log2($^ct)]=ct&$;for(var gt=A,Tt=k,H=0;H<3;++H)Tt&1<=0;--Z){var st=tt[$[Z]];T.push(X*st[0],-X*st[1],O)}}for(var L=[0,0,0],M=[0,0,0],z=[0,0,0],D=[0,0,0],N=1.25,I={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},k=0;k<3;++k){z[k]=T.length/m|0,s(.5*(w[0][k]+w[1][k]),A[k],_[k],12,N,I),D[k]=(T.length/m|0)-z[k],L[k]=T.length/m|0;for(var B=0;B=0&&(m=c.length-l-1);var h=Math.pow(10,m),b=Math.round(n*f*h),u=b+"";if(u.indexOf("e")>=0)return u;var o=b/h,d=b%h;b<0?(o=-Math.ceil(o)|0,d=-d|0):(o=Math.floor(o)|0,d=d|0);var w=""+o;if(b<0&&(w="-"+w),m){for(var A=""+d;A.length=n[0][l];--h)m.push({x:h*f[l],text:r(f[l],h)});c.push(m)}return c}function a(n,f){for(var c=0;c<3;++c){if(n[c].length!==f[c].length)return!1;for(var l=0;lw)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return o.bufferSubData(d,y,_),w}function h(o,d){for(var w=e.malloc(o.length,d),A=o.length,_=0;_=0;--A){if(d[A]!==w)return!1;w*=o[A]}return!0}l.update=function(o,d){if(typeof d!="number"&&(d=-1),this.bind(),typeof o=="object"&&typeof o.shape<"u"){var w=o.dtype;if(f.indexOf(w)<0&&(w="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&w!=="uint16"?w="uint32":w="uint16"}if(w===o.dtype&&b(o.shape,o.stride))o.offset===0&&o.data.length===o.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,o.data,d):this.length=m(this.gl,this.type,this.length,this.usage,o.data.subarray(o.offset,o.shape[0]),d);else{var _=e.malloc(o.size,w),y=n(_,o.shape);a.assign(y,o),d<0?this.length=m(this.gl,this.type,this.length,this.usage,_,d):this.length=m(this.gl,this.type,this.length,this.usage,_.subarray(0,o.size),d),e.free(_)}}else if(Array.isArray(o)){var E;this.type===this.gl.ELEMENT_ARRAY_BUFFER?E=h(o,"uint16"):E=h(o,"float32"),d<0?this.length=m(this.gl,this.type,this.length,this.usage,E,d):this.length=m(this.gl,this.type,this.length,this.usage,E.subarray(0,o.length),d),e.free(E)}else if(typeof o=="object"&&typeof o.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,o,d);else if(typeof o=="number"||o===void 0){if(d>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");o=o|0,o<=0&&(o=1),this.gl.bufferData(this.type,o|0,this.usage),this.length=o}else throw new Error("gl-buffer: Invalid data type")};function u(o,d,w,A){if(w=w||o.ARRAY_BUFFER,A=A||o.DYNAMIC_DRAW,w!==o.ARRAY_BUFFER&&w!==o.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(A!==o.DYNAMIC_DRAW&&A!==o.STATIC_DRAW&&A!==o.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var _=o.createBuffer(),y=new c(o,w,_,0,A);return y.update(d),y}v.exports=u},1140:function(v,p,r){var e=r(2858);v.exports=function(n,f){var c=n.positions,l=n.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),m;for(var h=0,b=1/0,u=-1/0,o=1/0,d=-1/0,w=1/0,A=-1/0,_=null,y=null,E=[],T=1/0,s=!1,L=0;Lh&&(h=e.length(z)),L){var D=2*e.distance(_,M)/(e.length(y)+e.length(z));D?(T=Math.min(T,D),s=!1):s=!0}s||(_=M,y=z),E.push(z)}var N=[b,o,w],I=[u,d,A];f&&(f[0]=N,f[1]=I),h===0&&(h=1);var k=1/h;isFinite(T)||(T=1),m.vectorScale=T;var B=n.coneSize||.5;n.absoluteConeSize&&(B=n.absoluteConeSize*k),m.coneScale=B;for(var L=0,O=0;L=1},o.isTransparent=function(){return this.opacity<1},o.pickSlots=1,o.setPickBase=function(E){this.pickId=E};function d(E){for(var T=h({colormap:E,nshades:256,format:"rgba"}),s=new Uint8Array(256*4),L=0;L<256;++L){for(var M=T[L],z=0;z<3;++z)s[4*L+z]=M[z];s[4*L+3]=M[3]*255}return m(s,[256,256,4],[4,0,1])}function w(E){for(var T=E.length,s=new Array(T),L=0;L0){var H=this.triShader;H.bind(),H.uniforms=N,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},o.drawPick=function(E){E=E||{};for(var T=this.gl,s=E.model||b,L=E.view||b,M=E.projection||b,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)z[0][D]=Math.max(z[0][D],this.clipBounds[0][D]),z[1][D]=Math.min(z[1][D],this.clipBounds[1][D]);this._model=[].slice.call(s),this._view=[].slice.call(L),this._projection=[].slice.call(M),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var N={model:s,view:L,projection:M,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},I=this.pickShader;I.bind(),I.uniforms=N,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},o.pick=function(E){if(!E||E.id!==this.pickId)return null;var T=E.value[0]+256*E.value[1]+65536*E.value[2],s=this.cells[T],L=this.positions[s[1]].slice(0,3),M={position:L,dataCoordinate:L,index:Math.floor(s[1]/48)};return this.traceType==="cone"?M.index=Math.floor(s[1]/48):this.traceType==="streamtube"&&(M.intensity=this.intensity[s[1]],M.velocity=this.vectors[s[1]].slice(0,3),M.divergence=this.vectors[s[1]][3],M.index=T),M},o.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function A(E,T){var s=e(E,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return s.attributes.position.location=0,s.attributes.color.location=2,s.attributes.uv.location=3,s.attributes.vector.location=4,s}function _(E,T){var s=e(E,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return s.attributes.position.location=0,s.attributes.id.location=1,s.attributes.vector.location=4,s}function y(E,T,s){var L=s.shaders;arguments.length===1&&(T=E,E=T.gl);var M=A(E,L),z=_(E,L),D=f(E,m(new Uint8Array([255,255,255,255]),[1,1,4]));D.generateMipmap(),D.minFilter=E.LINEAR_MIPMAP_LINEAR,D.magFilter=E.LINEAR;var N=a(E),I=a(E),k=a(E),B=a(E),O=a(E),H=n(E,[{buffer:N,type:E.FLOAT,size:4},{buffer:O,type:E.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:k,type:E.FLOAT,size:4},{buffer:B,type:E.FLOAT,size:2},{buffer:I,type:E.FLOAT,size:4}]),Y=new u(E,D,M,z,N,I,O,k,B,H,s.traceType||"cone");return Y.update(T),Y}v.exports=y},7234:function(v,p,r){var e=r(6832),a=e([`precision highp float; +}`]);p.bg=function(b){return a(b,m,v,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(h,p,r){h.exports=d;var e=r(5827),a=r(2944),n=r(875),f=r(1943).f,c=window||g.global||{},l=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var m=3;function v(w,A,_,y){this.gl=w,this.shader=A,this.buffer=_,this.vao=y,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var b=v.prototype,u=[0,0];b.bind=function(w,A,_,y){this.vao.bind(),this.shader.bind();var E=this.shader.uniforms;E.model=w,E.view=A,E.projection=_,E.pixelScale=y,u[0]=this.gl.drawingBufferWidth,u[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=u},b.unbind=function(){this.vao.unbind()},b.update=function(w,A,_,y,E){var T=[];function s(O,H,Y,j,et,it){var ut=l[Y];ut||(ut=l[Y]={});var J=ut[H];J||(J=ut[H]=o(H,{triangles:!0,font:Y,textAlign:"center",textBaseline:"middle",lineSpacing:et,styletags:it}));for(var X=(j||12)/12,tt=J.positions,V=J.cells,Q=0,ot=V.length;Q=0;--Z){var st=tt[$[Z]];T.push(X*st[0],-X*st[1],O)}}for(var L=[0,0,0],M=[0,0,0],z=[0,0,0],D=[0,0,0],N=1.25,I={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},k=0;k<3;++k){z[k]=T.length/m|0,s(.5*(w[0][k]+w[1][k]),A[k],_[k],12,N,I),D[k]=(T.length/m|0)-z[k],L[k]=T.length/m|0;for(var B=0;B=0&&(m=c.length-l-1);var v=Math.pow(10,m),b=Math.round(n*f*v),u=b+"";if(u.indexOf("e")>=0)return u;var o=b/v,d=b%v;b<0?(o=-Math.ceil(o)|0,d=-d|0):(o=Math.floor(o)|0,d=d|0);var w=""+o;if(b<0&&(w="-"+w),m){for(var A=""+d;A.length=n[0][l];--v)m.push({x:v*f[l],text:r(f[l],v)});c.push(m)}return c}function a(n,f){for(var c=0;c<3;++c){if(n[c].length!==f[c].length)return!1;for(var l=0;lw)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return o.bufferSubData(d,y,_),w}function v(o,d){for(var w=e.malloc(o.length,d),A=o.length,_=0;_=0;--A){if(d[A]!==w)return!1;w*=o[A]}return!0}l.update=function(o,d){if(typeof d!="number"&&(d=-1),this.bind(),typeof o=="object"&&typeof o.shape<"u"){var w=o.dtype;if(f.indexOf(w)<0&&(w="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&w!=="uint16"?w="uint32":w="uint16"}if(w===o.dtype&&b(o.shape,o.stride))o.offset===0&&o.data.length===o.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,o.data,d):this.length=m(this.gl,this.type,this.length,this.usage,o.data.subarray(o.offset,o.shape[0]),d);else{var _=e.malloc(o.size,w),y=n(_,o.shape);a.assign(y,o),d<0?this.length=m(this.gl,this.type,this.length,this.usage,_,d):this.length=m(this.gl,this.type,this.length,this.usage,_.subarray(0,o.size),d),e.free(_)}}else if(Array.isArray(o)){var E;this.type===this.gl.ELEMENT_ARRAY_BUFFER?E=v(o,"uint16"):E=v(o,"float32"),d<0?this.length=m(this.gl,this.type,this.length,this.usage,E,d):this.length=m(this.gl,this.type,this.length,this.usage,E.subarray(0,o.length),d),e.free(E)}else if(typeof o=="object"&&typeof o.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,o,d);else if(typeof o=="number"||o===void 0){if(d>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");o=o|0,o<=0&&(o=1),this.gl.bufferData(this.type,o|0,this.usage),this.length=o}else throw new Error("gl-buffer: Invalid data type")};function u(o,d,w,A){if(w=w||o.ARRAY_BUFFER,A=A||o.DYNAMIC_DRAW,w!==o.ARRAY_BUFFER&&w!==o.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(A!==o.DYNAMIC_DRAW&&A!==o.STATIC_DRAW&&A!==o.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var _=o.createBuffer(),y=new c(o,w,_,0,A);return y.update(d),y}h.exports=u},1140:function(h,p,r){var e=r(2858);h.exports=function(n,f){var c=n.positions,l=n.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),m;for(var v=0,b=1/0,u=-1/0,o=1/0,d=-1/0,w=1/0,A=-1/0,_=null,y=null,E=[],T=1/0,s=!1,L=0;Lv&&(v=e.length(z)),L){var D=2*e.distance(_,M)/(e.length(y)+e.length(z));D?(T=Math.min(T,D),s=!1):s=!0}s||(_=M,y=z),E.push(z)}var N=[b,o,w],I=[u,d,A];f&&(f[0]=N,f[1]=I),v===0&&(v=1);var k=1/v;isFinite(T)||(T=1),m.vectorScale=T;var B=n.coneSize||.5;n.absoluteConeSize&&(B=n.absoluteConeSize*k),m.coneScale=B;for(var L=0,O=0;L=1},o.isTransparent=function(){return this.opacity<1},o.pickSlots=1,o.setPickBase=function(E){this.pickId=E};function d(E){for(var T=v({colormap:E,nshades:256,format:"rgba"}),s=new Uint8Array(256*4),L=0;L<256;++L){for(var M=T[L],z=0;z<3;++z)s[4*L+z]=M[z];s[4*L+3]=M[3]*255}return m(s,[256,256,4],[4,0,1])}function w(E){for(var T=E.length,s=new Array(T),L=0;L0){var H=this.triShader;H.bind(),H.uniforms=N,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},o.drawPick=function(E){E=E||{};for(var T=this.gl,s=E.model||b,L=E.view||b,M=E.projection||b,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)z[0][D]=Math.max(z[0][D],this.clipBounds[0][D]),z[1][D]=Math.min(z[1][D],this.clipBounds[1][D]);this._model=[].slice.call(s),this._view=[].slice.call(L),this._projection=[].slice.call(M),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var N={model:s,view:L,projection:M,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},I=this.pickShader;I.bind(),I.uniforms=N,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},o.pick=function(E){if(!E||E.id!==this.pickId)return null;var T=E.value[0]+256*E.value[1]+65536*E.value[2],s=this.cells[T],L=this.positions[s[1]].slice(0,3),M={position:L,dataCoordinate:L,index:Math.floor(s[1]/48)};return this.traceType==="cone"?M.index=Math.floor(s[1]/48):this.traceType==="streamtube"&&(M.intensity=this.intensity[s[1]],M.velocity=this.vectors[s[1]].slice(0,3),M.divergence=this.vectors[s[1]][3],M.index=T),M},o.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function A(E,T){var s=e(E,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return s.attributes.position.location=0,s.attributes.color.location=2,s.attributes.uv.location=3,s.attributes.vector.location=4,s}function _(E,T){var s=e(E,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return s.attributes.position.location=0,s.attributes.id.location=1,s.attributes.vector.location=4,s}function y(E,T,s){var L=s.shaders;arguments.length===1&&(T=E,E=T.gl);var M=A(E,L),z=_(E,L),D=f(E,m(new Uint8Array([255,255,255,255]),[1,1,4]));D.generateMipmap(),D.minFilter=E.LINEAR_MIPMAP_LINEAR,D.magFilter=E.LINEAR;var N=a(E),I=a(E),k=a(E),B=a(E),O=a(E),H=n(E,[{buffer:N,type:E.FLOAT,size:4},{buffer:O,type:E.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:k,type:E.FLOAT,size:4},{buffer:B,type:E.FLOAT,size:2},{buffer:I,type:E.FLOAT,size:4}]),Y=new u(E,D,M,z,N,I,O,k,B,H,s.traceType||"cone");return Y.update(T),Y}h.exports=y},7234:function(h,p,r){var e=r(6832),a=e([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -4796,7 +4796,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);p.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},p.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(v){v.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},6603:function(v,p,r){var e=r(1950);v.exports=function(n){return e[n]}},3110:function(v,p,r){v.exports=u;var e=r(5827),a=r(2944),n=r(7667),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(o,d,w,A){this.gl=o,this.shader=A,this.buffer=d,this.vao=w,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=c.prototype;l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(o){var d=this.gl,w=this.shader.uniforms;this.shader.bind();var A=w.view=o.view||f,_=w.projection=o.projection||f;w.model=o.model||f,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var y=A[12],E=A[13],T=A[14],s=A[15],L=o._ortho||!1,M=L?2:1,z=M*this.pixelRatio*(_[3]*y+_[7]*E+_[11]*T+_[15]*s)/d.drawingBufferHeight;this.vao.bind();for(var D=0;D<3;++D)d.lineWidth(this.lineWidth[D]*this.pixelRatio),w.capSize=this.capSize[D]*z,this.lineCount[D]&&d.drawArrays(d.LINES,this.lineOffset[D],this.lineCount[D]);this.vao.unbind()};function m(o,d){for(var w=0;w<3;++w)o[0][w]=Math.min(o[0][w],d[w]),o[1][w]=Math.max(o[1][w],d[w])}var h=function(){for(var o=new Array(3),d=0;d<3;++d){for(var w=[],A=1;A<=2;++A)for(var _=-1;_<=1;_+=2){var y=(A+d)%3,E=[0,0,0];E[y]=_,w.push(E)}o[d]=w}return o}();function b(o,d,w,A){for(var _=h[A],y=0;y<_.length;++y){var E=_[y];o.push(d[0],d[1],d[2],w[0],w[1],w[2],w[3],E[0],E[1],E[2])}return _.length}l.update=function(o){o=o||{},"lineWidth"in o&&(this.lineWidth=o.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in o&&(this.capSize=o.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in o&&(this.opacity=+o.opacity,this.opacity<1&&(this.hasAlpha=!0));var d=o.color||[[0,0,0],[0,0,0],[0,0,0]],w=o.position,A=o.error;if(Array.isArray(d[0])||(d=[d,d,d]),w&&A){var _=[],y=w.length,E=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var T=0;T<3;++T){this.lineOffset[T]=E;t:for(var s=0;s0){var N=L.slice();N[T]+=z[1][T],_.push(L[0],L[1],L[2],D[0],D[1],D[2],D[3],0,0,0,N[0],N[1],N[2],D[0],D[1],D[2],D[3],0,0,0),m(this.bounds,N),E+=2+b(_,N,D,T)}}}this.lineCount[T]=E-this.lineOffset[T]}this.buffer.update(_)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function u(o){var d=o.gl,w=e(d),A=a(d,[{buffer:w,type:d.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:d.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:d.FLOAT,size:3,offset:28,stride:40}]),_=n(d);_.attributes.position.location=0,_.attributes.color.location=1,_.attributes.offset.location=2;var y=new c(d,w,A,_);return y.update(o),y}},7667:function(v,p,r){var e=r(6832),a=r(5158),n=e([`precision highp float; +}`]);p.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},p.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(h){h.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},6603:function(h,p,r){var e=r(1950);h.exports=function(n){return e[n]}},3110:function(h,p,r){h.exports=u;var e=r(5827),a=r(2944),n=r(7667),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(o,d,w,A){this.gl=o,this.shader=A,this.buffer=d,this.vao=w,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=c.prototype;l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(o){var d=this.gl,w=this.shader.uniforms;this.shader.bind();var A=w.view=o.view||f,_=w.projection=o.projection||f;w.model=o.model||f,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var y=A[12],E=A[13],T=A[14],s=A[15],L=o._ortho||!1,M=L?2:1,z=M*this.pixelRatio*(_[3]*y+_[7]*E+_[11]*T+_[15]*s)/d.drawingBufferHeight;this.vao.bind();for(var D=0;D<3;++D)d.lineWidth(this.lineWidth[D]*this.pixelRatio),w.capSize=this.capSize[D]*z,this.lineCount[D]&&d.drawArrays(d.LINES,this.lineOffset[D],this.lineCount[D]);this.vao.unbind()};function m(o,d){for(var w=0;w<3;++w)o[0][w]=Math.min(o[0][w],d[w]),o[1][w]=Math.max(o[1][w],d[w])}var v=function(){for(var o=new Array(3),d=0;d<3;++d){for(var w=[],A=1;A<=2;++A)for(var _=-1;_<=1;_+=2){var y=(A+d)%3,E=[0,0,0];E[y]=_,w.push(E)}o[d]=w}return o}();function b(o,d,w,A){for(var _=v[A],y=0;y<_.length;++y){var E=_[y];o.push(d[0],d[1],d[2],w[0],w[1],w[2],w[3],E[0],E[1],E[2])}return _.length}l.update=function(o){o=o||{},"lineWidth"in o&&(this.lineWidth=o.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in o&&(this.capSize=o.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in o&&(this.opacity=+o.opacity,this.opacity<1&&(this.hasAlpha=!0));var d=o.color||[[0,0,0],[0,0,0],[0,0,0]],w=o.position,A=o.error;if(Array.isArray(d[0])||(d=[d,d,d]),w&&A){var _=[],y=w.length,E=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var T=0;T<3;++T){this.lineOffset[T]=E;t:for(var s=0;s0){var N=L.slice();N[T]+=z[1][T],_.push(L[0],L[1],L[2],D[0],D[1],D[2],D[3],0,0,0,N[0],N[1],N[2],D[0],D[1],D[2],D[3],0,0,0),m(this.bounds,N),E+=2+b(_,N,D,T)}}}this.lineCount[T]=E-this.lineOffset[T]}this.buffer.update(_)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function u(o){var d=o.gl,w=e(d),A=a(d,[{buffer:w,type:d.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:d.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:d.FLOAT,size:3,offset:28,stride:40}]),_=n(d);_.attributes.position.location=0,_.attributes.color.location=1,_.attributes.offset.location=2;var y=new c(d,w,A,_);return y.update(o),y}},7667:function(h,p,r){var e=r(6832),a=r(5158),n=e([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -4847,13 +4847,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);v.exports=function(c){return a(c,n,f,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(v,p,r){var e=r(8931);v.exports=E;var a=null,n,f,c,l;function m(T){var s=T.getParameter(T.FRAMEBUFFER_BINDING),L=T.getParameter(T.RENDERBUFFER_BINDING),M=T.getParameter(T.TEXTURE_BINDING_2D);return[s,L,M]}function h(T,s){T.bindFramebuffer(T.FRAMEBUFFER,s[0]),T.bindRenderbuffer(T.RENDERBUFFER,s[1]),T.bindTexture(T.TEXTURE_2D,s[2])}function b(T,s){var L=T.getParameter(s.MAX_COLOR_ATTACHMENTS_WEBGL);a=new Array(L+1);for(var M=0;M<=L;++M){for(var z=new Array(L),D=0;D1&&I.drawBuffersWEBGL(a[N]);var Y=L.getExtension("WEBGL_depth_texture");Y?k?T.depth=o(L,z,D,Y.UNSIGNED_INT_24_8_WEBGL,L.DEPTH_STENCIL,L.DEPTH_STENCIL_ATTACHMENT):B&&(T.depth=o(L,z,D,L.UNSIGNED_SHORT,L.DEPTH_COMPONENT,L.DEPTH_ATTACHMENT)):B&&k?T._depth_rb=d(L,z,D,L.DEPTH_STENCIL,L.DEPTH_STENCIL_ATTACHMENT):B?T._depth_rb=d(L,z,D,L.DEPTH_COMPONENT16,L.DEPTH_ATTACHMENT):k&&(T._depth_rb=d(L,z,D,L.STENCIL_INDEX,L.STENCIL_ATTACHMENT));var j=L.checkFramebufferStatus(L.FRAMEBUFFER);if(j!==L.FRAMEBUFFER_COMPLETE){T._destroyed=!0,L.bindFramebuffer(L.FRAMEBUFFER,null),L.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(L.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var H=0;Hz||L<0||L>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=s,T._shape[1]=L;for(var D=m(M),N=0;ND||L<0||L>D)throw new Error("gl-fbo: Parameters are too large for FBO");M=M||{};var N=1;if("color"in M){if(N=Math.max(M.color|0,0),N<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(N>1)if(z){if(N>T.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+N+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var I=T.UNSIGNED_BYTE,k=T.getExtension("OES_texture_float");if(M.float&&N>0){if(!k)throw new Error("gl-fbo: Context does not support floating point textures");I=T.FLOAT}else M.preferFloat&&N>0&&k&&(I=T.FLOAT);var B=!0;"depth"in M&&(B=!!M.depth);var O=!1;return"stencil"in M&&(O=!!M.stencil),new A(T,s,L,I,N,B,O,z)}},3530:function(v,p,r){var e=r(8974).sprintf,a=r(6603),n=r(9365),f=r(8008);v.exports=c;function c(l,m,h){var b=n(m)||"of unknown name (see npm glsl-shader-name)",u="unknown type";h!==void 0&&(u=h===a.FRAGMENT_SHADER?"fragment":"vertex");for(var o=e(`Error compiling %s shader %s: +}`]);h.exports=function(c){return a(c,n,f,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(h,p,r){var e=r(8931);h.exports=E;var a=null,n,f,c,l;function m(T){var s=T.getParameter(T.FRAMEBUFFER_BINDING),L=T.getParameter(T.RENDERBUFFER_BINDING),M=T.getParameter(T.TEXTURE_BINDING_2D);return[s,L,M]}function v(T,s){T.bindFramebuffer(T.FRAMEBUFFER,s[0]),T.bindRenderbuffer(T.RENDERBUFFER,s[1]),T.bindTexture(T.TEXTURE_2D,s[2])}function b(T,s){var L=T.getParameter(s.MAX_COLOR_ATTACHMENTS_WEBGL);a=new Array(L+1);for(var M=0;M<=L;++M){for(var z=new Array(L),D=0;D1&&I.drawBuffersWEBGL(a[N]);var Y=L.getExtension("WEBGL_depth_texture");Y?k?T.depth=o(L,z,D,Y.UNSIGNED_INT_24_8_WEBGL,L.DEPTH_STENCIL,L.DEPTH_STENCIL_ATTACHMENT):B&&(T.depth=o(L,z,D,L.UNSIGNED_SHORT,L.DEPTH_COMPONENT,L.DEPTH_ATTACHMENT)):B&&k?T._depth_rb=d(L,z,D,L.DEPTH_STENCIL,L.DEPTH_STENCIL_ATTACHMENT):B?T._depth_rb=d(L,z,D,L.DEPTH_COMPONENT16,L.DEPTH_ATTACHMENT):k&&(T._depth_rb=d(L,z,D,L.STENCIL_INDEX,L.STENCIL_ATTACHMENT));var j=L.checkFramebufferStatus(L.FRAMEBUFFER);if(j!==L.FRAMEBUFFER_COMPLETE){T._destroyed=!0,L.bindFramebuffer(L.FRAMEBUFFER,null),L.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(L.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var H=0;Hz||L<0||L>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=s,T._shape[1]=L;for(var D=m(M),N=0;ND||L<0||L>D)throw new Error("gl-fbo: Parameters are too large for FBO");M=M||{};var N=1;if("color"in M){if(N=Math.max(M.color|0,0),N<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(N>1)if(z){if(N>T.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+N+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var I=T.UNSIGNED_BYTE,k=T.getExtension("OES_texture_float");if(M.float&&N>0){if(!k)throw new Error("gl-fbo: Context does not support floating point textures");I=T.FLOAT}else M.preferFloat&&N>0&&k&&(I=T.FLOAT);var B=!0;"depth"in M&&(B=!!M.depth);var O=!1;return"stencil"in M&&(O=!!M.stencil),new A(T,s,L,I,N,B,O,z)}},3530:function(h,p,r){var e=r(8974).sprintf,a=r(6603),n=r(9365),f=r(8008);h.exports=c;function c(l,m,v){var b=n(m)||"of unknown name (see npm glsl-shader-name)",u="unknown type";v!==void 0&&(u=v===a.FRAGMENT_SHADER?"fragment":"vertex");for(var o=e(`Error compiling %s shader %s: `,u,b),d=e("%s%s",o,l),w=l.split(` `),A={},_=0;_>N*8&255;this.pickOffset=w,_.bind();var I=_.uniforms;I.viewTransform=o,I.pickOffset=d,I.shape=this.shape;var k=_.attributes;return this.positionBuffer.bind(),k.position.pointer(),this.weightBuffer.bind(),k.weight.pointer(T.UNSIGNED_BYTE,!1),this.idBuffer.bind(),k.pickId.pointer(T.UNSIGNED_BYTE,!1),T.drawArrays(T.TRIANGLES,0,E),w+this.shape[0]*this.shape[1]}}}(),h.pick=function(o,d,w){var A=this.pickOffset,_=this.shape[0]*this.shape[1];if(w=A+_)return null;var y=w-A,E=this.xData,T=this.yData;return{object:this,pointId:y,dataCoord:[E[y%this.shape[0]],T[y/this.shape[0]|0]]}},h.update=function(o){o=o||{};var d=o.shape||[0,0],w=o.x||a(d[0]),A=o.y||a(d[1]),_=o.z||new Float32Array(d[0]*d[1]),y=o.zsmooth!==!1;this.xData=w,this.yData=A;var E=o.colorLevels||[0],T=o.colorValues||[0,0,0,1],s=E.length,L=this.bounds,M,z,D,N;y?(M=L[0]=w[0],z=L[1]=A[0],D=L[2]=w[w.length-1],N=L[3]=A[A.length-1]):(M=L[0]=w[0]+(w[1]-w[0])/2,z=L[1]=A[0]+(A[1]-A[0])/2,D=L[2]=w[w.length-1]+(w[w.length-1]-w[w.length-2])/2,N=L[3]=A[A.length-1]+(A[A.length-1]-A[A.length-2])/2);var I=1/(D-M),k=1/(N-z),B=d[0],O=d[1];this.shape=[B,O];var H=(y?(B-1)*(O-1):B*O)*(b.length>>>1);this.numVertices=H;for(var Y=n.mallocUint8(H*4),j=n.mallocFloat32(H*2),et=n.mallocUint8(H*2),it=n.mallocUint32(H),ut=0,J=y?B-1:B,X=y?O-1:O,tt=0;tt>N*8&255;this.pickOffset=w,_.bind();var I=_.uniforms;I.viewTransform=o,I.pickOffset=d,I.shape=this.shape;var k=_.attributes;return this.positionBuffer.bind(),k.position.pointer(),this.weightBuffer.bind(),k.weight.pointer(T.UNSIGNED_BYTE,!1),this.idBuffer.bind(),k.pickId.pointer(T.UNSIGNED_BYTE,!1),T.drawArrays(T.TRIANGLES,0,E),w+this.shape[0]*this.shape[1]}}}(),v.pick=function(o,d,w){var A=this.pickOffset,_=this.shape[0]*this.shape[1];if(w=A+_)return null;var y=w-A,E=this.xData,T=this.yData;return{object:this,pointId:y,dataCoord:[E[y%this.shape[0]],T[y/this.shape[0]|0]]}},v.update=function(o){o=o||{};var d=o.shape||[0,0],w=o.x||a(d[0]),A=o.y||a(d[1]),_=o.z||new Float32Array(d[0]*d[1]),y=o.zsmooth!==!1;this.xData=w,this.yData=A;var E=o.colorLevels||[0],T=o.colorValues||[0,0,0,1],s=E.length,L=this.bounds,M,z,D,N;y?(M=L[0]=w[0],z=L[1]=A[0],D=L[2]=w[w.length-1],N=L[3]=A[A.length-1]):(M=L[0]=w[0]+(w[1]-w[0])/2,z=L[1]=A[0]+(A[1]-A[0])/2,D=L[2]=w[w.length-1]+(w[w.length-1]-w[w.length-2])/2,N=L[3]=A[A.length-1]+(A[A.length-1]-A[A.length-2])/2);var I=1/(D-M),k=1/(N-z),B=d[0],O=d[1];this.shape=[B,O];var H=(y?(B-1)*(O-1):B*O)*(b.length>>>1);this.numVertices=H;for(var Y=n.mallocUint8(H*4),j=n.mallocFloat32(H*2),et=n.mallocUint8(H*2),it=n.mallocUint32(H),ut=0,J=y?B-1:B,X=y?O-1:O,tt=0;tt0){for(var J=0;J<24;++J)D.push(D[D.length-12]);B+=2,et=!0}continue t}O[0][M]=Math.min(O[0][M],it[M],ut[M]),O[1][M]=Math.max(O[1][M],it[M],ut[M])}var X,tt;Array.isArray(Y[0])?(X=Y.length>L-1?Y[L-1]:Y.length>0?Y[Y.length-1]:[0,0,0,1],tt=Y.length>L?Y[L]:Y.length>0?Y[Y.length-1]:[0,0,0,1]):X=tt=Y,X.length===3&&(X=[X[0],X[1],X[2],1]),tt.length===3&&(tt=[tt[0],tt[1],tt[2],1]),!this.hasAlpha&&X[3]<1&&(this.hasAlpha=!0);var V;Array.isArray(j)?V=j.length>L-1?j[L-1]:j.length>0?j[j.length-1]:[0,0,0,1]:V=j;var Q=k;if(k+=w(it,ut),et){for(M=0;M<2;++M)D.push(it[0],it[1],it[2],ut[0],ut[1],ut[2],Q,V,X[0],X[1],X[2],X[3]);B+=2,et=!1}D.push(it[0],it[1],it[2],ut[0],ut[1],ut[2],Q,V,X[0],X[1],X[2],X[3],it[0],it[1],it[2],ut[0],ut[1],ut[2],Q,-V,X[0],X[1],X[2],X[3],ut[0],ut[1],ut[2],it[0],it[1],it[2],k,-V,tt[0],tt[1],tt[2],tt[3],ut[0],ut[1],ut[2],it[0],it[1],it[2],k,V,tt[0],tt[1],tt[2],tt[3]),B+=4}}if(this.buffer.update(D),N.push(k),I.push(H[H.length-1].slice()),this.bounds=O,this.vertexCount=B,this.points=I,this.arcLength=N,"dashes"in s){var ot=s.dashes,$=ot.slice();for($.unshift(0),L=1;L<$.length;++L)$[L]=$[L-1]+$[L];var Z=h(new Array(256*4),[256,1,4]);for(L=0;L<256;++L){for(M=0;M<4;++M)Z.set(L,0,M,0);m.le($,$[$.length-1]*L/255)&1?Z.set(L,0,0,0):Z.set(L,0,0,255)}this.texture.setPixels(Z)}},E.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},E.pick=function(s){if(!s||s.id!==this.pickId)return null;var L=l(s.value[0],s.value[1],s.value[2],0),M=m.le(this.arcLength,L);if(M<0)return null;if(M===this.arcLength.length-1)return new _(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),M);for(var z=this.points[M],D=this.points[Math.min(M+1,this.points.length-1)],N=(L-this.arcLength[M])/(this.arcLength[M+1]-this.arcLength[M]),I=1-N,k=[0,0,0],B=0;B<3;++B)k[B]=I*z[B]+N*D[B];var O=Math.min(N<.5?M:M+1,this.points.length-1);return new _(L,k,O,this.points[O])};function T(s){var L=s.gl||s.scene&&s.scene.gl,M=u(L);M.attributes.position.location=0,M.attributes.nextPosition.location=1,M.attributes.arcLength.location=2,M.attributes.lineWidth.location=3,M.attributes.color.location=4;var z=o(L);z.attributes.position.location=0,z.attributes.nextPosition.location=1,z.attributes.arcLength.location=2,z.attributes.lineWidth.location=3,z.attributes.color.location=4;for(var D=e(L),N=a(L,[{buffer:D,size:3,offset:0,stride:48},{buffer:D,size:3,offset:12,stride:48},{buffer:D,size:1,offset:24,stride:48},{buffer:D,size:1,offset:28,stride:48},{buffer:D,size:4,offset:32,stride:48}]),I=h(new Array(256*4),[256,1,4]),k=0;k<1024;++k)I.data[k]=255;var B=n(L,I);B.wrap=L.REPEAT;var O=new y(L,M,z,D,N,B);return O.update(s),O}},7332:function(v){v.exports=p;function p(r){var e=new Float32Array(16);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}},9823:function(v){v.exports=p;function p(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7787:function(v){v.exports=p;function p(r){var e=r[0],a=r[1],n=r[2],f=r[3],c=r[4],l=r[5],m=r[6],h=r[7],b=r[8],u=r[9],o=r[10],d=r[11],w=r[12],A=r[13],_=r[14],y=r[15],E=e*l-a*c,T=e*m-n*c,s=e*h-f*c,L=a*m-n*l,M=a*h-f*l,z=n*h-f*m,D=b*A-u*w,N=b*_-o*w,I=b*y-d*w,k=u*_-o*A,B=u*y-d*A,O=o*y-d*_;return E*O-T*B+s*k+L*I-M*N+z*D}},5950:function(v){v.exports=p;function p(r,e){var a=e[0],n=e[1],f=e[2],c=e[3],l=a+a,m=n+n,h=f+f,b=a*l,u=n*l,o=n*m,d=f*l,w=f*m,A=f*h,_=c*l,y=c*m,E=c*h;return r[0]=1-o-A,r[1]=u+E,r[2]=d-y,r[3]=0,r[4]=u-E,r[5]=1-b-A,r[6]=w+_,r[7]=0,r[8]=d+y,r[9]=w-_,r[10]=1-b-o,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7280:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=e[3],m=n+n,h=f+f,b=c+c,u=n*m,o=n*h,d=n*b,w=f*h,A=f*b,_=c*b,y=l*m,E=l*h,T=l*b;return r[0]=1-(w+_),r[1]=o+T,r[2]=d-E,r[3]=0,r[4]=o-T,r[5]=1-(u+_),r[6]=A+y,r[7]=0,r[8]=d+E,r[9]=A-y,r[10]=1-(u+w),r[11]=0,r[12]=a[0],r[13]=a[1],r[14]=a[2],r[15]=1,r}},9947:function(v){v.exports=p;function p(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7437:function(v){v.exports=p;function p(r,e){var a=e[0],n=e[1],f=e[2],c=e[3],l=e[4],m=e[5],h=e[6],b=e[7],u=e[8],o=e[9],d=e[10],w=e[11],A=e[12],_=e[13],y=e[14],E=e[15],T=a*m-n*l,s=a*h-f*l,L=a*b-c*l,M=n*h-f*m,z=n*b-c*m,D=f*b-c*h,N=u*_-o*A,I=u*y-d*A,k=u*E-w*A,B=o*y-d*_,O=o*E-w*_,H=d*E-w*y,Y=T*H-s*O+L*B+M*k-z*I+D*N;return Y?(Y=1/Y,r[0]=(m*H-h*O+b*B)*Y,r[1]=(f*O-n*H-c*B)*Y,r[2]=(_*D-y*z+E*M)*Y,r[3]=(d*z-o*D-w*M)*Y,r[4]=(h*k-l*H-b*I)*Y,r[5]=(a*H-f*k+c*I)*Y,r[6]=(y*L-A*D-E*s)*Y,r[7]=(u*D-d*L+w*s)*Y,r[8]=(l*O-m*k+b*N)*Y,r[9]=(n*k-a*O-c*N)*Y,r[10]=(A*z-_*L+E*T)*Y,r[11]=(o*L-u*z-w*T)*Y,r[12]=(m*I-l*B-h*N)*Y,r[13]=(a*B-n*I+f*N)*Y,r[14]=(_*s-A*M-y*T)*Y,r[15]=(u*M-o*s+d*T)*Y,r):null}},3012:function(v,p,r){var e=r(9947);v.exports=a;function a(n,f,c,l){var m,h,b,u,o,d,w,A,_,y,E=f[0],T=f[1],s=f[2],L=l[0],M=l[1],z=l[2],D=c[0],N=c[1],I=c[2];return Math.abs(E-D)<1e-6&&Math.abs(T-N)<1e-6&&Math.abs(s-I)<1e-6?e(n):(w=E-D,A=T-N,_=s-I,y=1/Math.sqrt(w*w+A*A+_*_),w*=y,A*=y,_*=y,m=M*_-z*A,h=z*w-L*_,b=L*A-M*w,y=Math.sqrt(m*m+h*h+b*b),y?(y=1/y,m*=y,h*=y,b*=y):(m=0,h=0,b=0),u=A*b-_*h,o=_*m-w*b,d=w*h-A*m,y=Math.sqrt(u*u+o*o+d*d),y?(y=1/y,u*=y,o*=y,d*=y):(u=0,o=0,d=0),n[0]=m,n[1]=u,n[2]=w,n[3]=0,n[4]=h,n[5]=o,n[6]=A,n[7]=0,n[8]=b,n[9]=d,n[10]=_,n[11]=0,n[12]=-(m*E+h*T+b*s),n[13]=-(u*E+o*T+d*s),n[14]=-(w*E+A*T+_*s),n[15]=1,n)}},104:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=e[3],m=e[4],h=e[5],b=e[6],u=e[7],o=e[8],d=e[9],w=e[10],A=e[11],_=e[12],y=e[13],E=e[14],T=e[15],s=a[0],L=a[1],M=a[2],z=a[3];return r[0]=s*n+L*m+M*o+z*_,r[1]=s*f+L*h+M*d+z*y,r[2]=s*c+L*b+M*w+z*E,r[3]=s*l+L*u+M*A+z*T,s=a[4],L=a[5],M=a[6],z=a[7],r[4]=s*n+L*m+M*o+z*_,r[5]=s*f+L*h+M*d+z*y,r[6]=s*c+L*b+M*w+z*E,r[7]=s*l+L*u+M*A+z*T,s=a[8],L=a[9],M=a[10],z=a[11],r[8]=s*n+L*m+M*o+z*_,r[9]=s*f+L*h+M*d+z*y,r[10]=s*c+L*b+M*w+z*E,r[11]=s*l+L*u+M*A+z*T,s=a[12],L=a[13],M=a[14],z=a[15],r[12]=s*n+L*m+M*o+z*_,r[13]=s*f+L*h+M*d+z*y,r[14]=s*c+L*b+M*w+z*E,r[15]=s*l+L*u+M*A+z*T,r}},5268:function(v){v.exports=p;function p(r,e,a,n,f,c,l){var m=1/(e-a),h=1/(n-f),b=1/(c-l);return r[0]=-2*m,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*h,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*b,r[11]=0,r[12]=(e+a)*m,r[13]=(f+n)*h,r[14]=(l+c)*b,r[15]=1,r}},1120:function(v){v.exports=p;function p(r,e,a,n,f){var c=1/Math.tan(e/2),l=1/(n-f);return r[0]=c/a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=c,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(f+n)*l,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*f*n*l,r[15]=0,r}},4422:function(v){v.exports=p;function p(r,e,a,n){var f=n[0],c=n[1],l=n[2],m=Math.sqrt(f*f+c*c+l*l),h,b,u,o,d,w,A,_,y,E,T,s,L,M,z,D,N,I,k,B,O,H,Y,j;return Math.abs(m)<1e-6?null:(m=1/m,f*=m,c*=m,l*=m,h=Math.sin(a),b=Math.cos(a),u=1-b,o=e[0],d=e[1],w=e[2],A=e[3],_=e[4],y=e[5],E=e[6],T=e[7],s=e[8],L=e[9],M=e[10],z=e[11],D=f*f*u+b,N=c*f*u+l*h,I=l*f*u-c*h,k=f*c*u-l*h,B=c*c*u+b,O=l*c*u+f*h,H=f*l*u+c*h,Y=c*l*u-f*h,j=l*l*u+b,r[0]=o*D+_*N+s*I,r[1]=d*D+y*N+L*I,r[2]=w*D+E*N+M*I,r[3]=A*D+T*N+z*I,r[4]=o*k+_*B+s*O,r[5]=d*k+y*B+L*O,r[6]=w*k+E*B+M*O,r[7]=A*k+T*B+z*O,r[8]=o*H+_*Y+s*j,r[9]=d*H+y*Y+L*j,r[10]=w*H+E*Y+M*j,r[11]=A*H+T*Y+z*j,e!==r&&(r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r)}},6109:function(v){v.exports=p;function p(r,e,a){var n=Math.sin(a),f=Math.cos(a),c=e[4],l=e[5],m=e[6],h=e[7],b=e[8],u=e[9],o=e[10],d=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=c*f+b*n,r[5]=l*f+u*n,r[6]=m*f+o*n,r[7]=h*f+d*n,r[8]=b*f-c*n,r[9]=u*f-l*n,r[10]=o*f-m*n,r[11]=d*f-h*n,r}},7115:function(v){v.exports=p;function p(r,e,a){var n=Math.sin(a),f=Math.cos(a),c=e[0],l=e[1],m=e[2],h=e[3],b=e[8],u=e[9],o=e[10],d=e[11];return e!==r&&(r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=c*f-b*n,r[1]=l*f-u*n,r[2]=m*f-o*n,r[3]=h*f-d*n,r[8]=c*n+b*f,r[9]=l*n+u*f,r[10]=m*n+o*f,r[11]=h*n+d*f,r}},5240:function(v){v.exports=p;function p(r,e,a){var n=Math.sin(a),f=Math.cos(a),c=e[0],l=e[1],m=e[2],h=e[3],b=e[4],u=e[5],o=e[6],d=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=c*f+b*n,r[1]=l*f+u*n,r[2]=m*f+o*n,r[3]=h*f+d*n,r[4]=b*f-c*n,r[5]=u*f-l*n,r[6]=o*f-m*n,r[7]=d*f-h*n,r}},3668:function(v){v.exports=p;function p(r,e,a){var n=a[0],f=a[1],c=a[2];return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r[3]=e[3]*n,r[4]=e[4]*f,r[5]=e[5]*f,r[6]=e[6]*f,r[7]=e[7]*f,r[8]=e[8]*c,r[9]=e[9]*c,r[10]=e[10]*c,r[11]=e[11]*c,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}},998:function(v){v.exports=p;function p(r,e,a){var n=a[0],f=a[1],c=a[2],l,m,h,b,u,o,d,w,A,_,y,E;return e===r?(r[12]=e[0]*n+e[4]*f+e[8]*c+e[12],r[13]=e[1]*n+e[5]*f+e[9]*c+e[13],r[14]=e[2]*n+e[6]*f+e[10]*c+e[14],r[15]=e[3]*n+e[7]*f+e[11]*c+e[15]):(l=e[0],m=e[1],h=e[2],b=e[3],u=e[4],o=e[5],d=e[6],w=e[7],A=e[8],_=e[9],y=e[10],E=e[11],r[0]=l,r[1]=m,r[2]=h,r[3]=b,r[4]=u,r[5]=o,r[6]=d,r[7]=w,r[8]=A,r[9]=_,r[10]=y,r[11]=E,r[12]=l*n+u*f+A*c+e[12],r[13]=m*n+o*f+_*c+e[13],r[14]=h*n+d*f+y*c+e[14],r[15]=b*n+w*f+E*c+e[15]),r}},2142:function(v){v.exports=p;function p(r,e){if(r===e){var a=e[1],n=e[2],f=e[3],c=e[6],l=e[7],m=e[11];r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=a,r[6]=e[9],r[7]=e[13],r[8]=n,r[9]=c,r[11]=e[14],r[12]=f,r[13]=l,r[14]=m}else r[0]=e[0],r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=e[1],r[5]=e[5],r[6]=e[9],r[7]=e[13],r[8]=e[2],r[9]=e[6],r[10]=e[10],r[11]=e[14],r[12]=e[3],r[13]=e[7],r[14]=e[11],r[15]=e[15];return r}},4340:function(v,p,r){var e=r(957),a=r(7309);v.exports=m;function n(h,b){for(var u=[0,0,0,0],o=0;o<4;++o)for(var d=0;d<4;++d)u[d]+=h[4*o+d]*b[o];return u}function f(h,b,u,o,d){for(var w=n(o,n(u,n(b,[h[0],h[1],h[2],1]))),A=0;A<3;++A)w[A]/=w[3];return[.5*d[0]*(1+w[0]),.5*d[1]*(1-w[1])]}function c(h,b){if(h.length===2){for(var u=0,o=0,d=0;d<2;++d)u+=Math.pow(b[d]-h[0][d],2),o+=Math.pow(b[d]-h[1][d],2);return u=Math.sqrt(u),o=Math.sqrt(o),u+o<1e-6?[1,0]:[o/(u+o),u/(o+u)]}else if(h.length===3){var w=[0,0];return a(h[0],h[1],h[2],b,w),e(h,w)}return[]}function l(h,b){for(var u=[0,0,0],o=0;o1.0001)return null;M+=L[_]}return Math.abs(M-1)>.001?null:[y,l(h,L),L]}},2056:function(v,p,r){var e=r(6832),a=e([`precision highp float; +}`]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];p.createShader=function(m){return a(m,n,f,null,l)},p.createPickShader=function(m){return a(m,n,c,null,l)}},6086:function(h,p,r){h.exports=T;var e=r(5827),a=r(2944),n=r(8931),f=new Uint8Array(4),c=new Float32Array(f.buffer);function l(s,L,M,z){return f[0]=z,f[1]=M,f[2]=L,f[3]=s,c[0]}var m=r(5070),v=r(5050),b=r(248),u=b.createShader,o=b.createPickShader,d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function w(s,L){for(var M=0,z=0;z<3;++z){var D=s[z]-L[z];M+=D*D}return Math.sqrt(M)}function A(s){for(var L=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],M=0;M<3;++M)L[0][M]=Math.max(s[0][M],L[0][M]),L[1][M]=Math.min(s[1][M],L[1][M]);return L}function _(s,L,M,z){this.arcLength=s,this.position=L,this.index=M,this.dataCoordinate=z}function y(s,L,M,z,D,N){this.gl=s,this.shader=L,this.pickShader=M,this.buffer=z,this.vao=D,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=N,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var E=y.prototype;E.isTransparent=function(){return this.hasAlpha},E.isOpaque=function(){return!this.hasAlpha},E.pickSlots=1,E.setPickBase=function(s){this.pickId=s},E.drawTransparent=E.draw=function(s){if(this.vertexCount){var L=this.gl,M=this.shader,z=this.vao;M.bind(),M.uniforms={model:s.model||d,view:s.view||d,projection:s.projection||d,clipBounds:A(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[L.drawingBufferWidth,L.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(L.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},E.drawPick=function(s){if(this.vertexCount){var L=this.gl,M=this.pickShader,z=this.vao;M.bind(),M.uniforms={model:s.model||d,view:s.view||d,projection:s.projection||d,pickId:this.pickId,clipBounds:A(this.clipBounds),screenShape:[L.drawingBufferWidth,L.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(L.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},E.update=function(s){var L,M;this.dirty=!0;var z=!!s.connectGaps;"dashScale"in s&&(this.dashScale=s.dashScale),this.hasAlpha=!1,"opacity"in s&&(this.opacity=+s.opacity,this.opacity<1&&(this.hasAlpha=!0));var D=[],N=[],I=[],k=0,B=0,O=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],H=s.position||s.positions;if(H){var Y=s.color||s.colors||[0,0,0,1],j=s.lineWidth||1,et=!1;t:for(L=1;L0){for(var J=0;J<24;++J)D.push(D[D.length-12]);B+=2,et=!0}continue t}O[0][M]=Math.min(O[0][M],it[M],ut[M]),O[1][M]=Math.max(O[1][M],it[M],ut[M])}var X,tt;Array.isArray(Y[0])?(X=Y.length>L-1?Y[L-1]:Y.length>0?Y[Y.length-1]:[0,0,0,1],tt=Y.length>L?Y[L]:Y.length>0?Y[Y.length-1]:[0,0,0,1]):X=tt=Y,X.length===3&&(X=[X[0],X[1],X[2],1]),tt.length===3&&(tt=[tt[0],tt[1],tt[2],1]),!this.hasAlpha&&X[3]<1&&(this.hasAlpha=!0);var V;Array.isArray(j)?V=j.length>L-1?j[L-1]:j.length>0?j[j.length-1]:[0,0,0,1]:V=j;var Q=k;if(k+=w(it,ut),et){for(M=0;M<2;++M)D.push(it[0],it[1],it[2],ut[0],ut[1],ut[2],Q,V,X[0],X[1],X[2],X[3]);B+=2,et=!1}D.push(it[0],it[1],it[2],ut[0],ut[1],ut[2],Q,V,X[0],X[1],X[2],X[3],it[0],it[1],it[2],ut[0],ut[1],ut[2],Q,-V,X[0],X[1],X[2],X[3],ut[0],ut[1],ut[2],it[0],it[1],it[2],k,-V,tt[0],tt[1],tt[2],tt[3],ut[0],ut[1],ut[2],it[0],it[1],it[2],k,V,tt[0],tt[1],tt[2],tt[3]),B+=4}}if(this.buffer.update(D),N.push(k),I.push(H[H.length-1].slice()),this.bounds=O,this.vertexCount=B,this.points=I,this.arcLength=N,"dashes"in s){var ot=s.dashes,$=ot.slice();for($.unshift(0),L=1;L<$.length;++L)$[L]=$[L-1]+$[L];var Z=v(new Array(256*4),[256,1,4]);for(L=0;L<256;++L){for(M=0;M<4;++M)Z.set(L,0,M,0);m.le($,$[$.length-1]*L/255)&1?Z.set(L,0,0,0):Z.set(L,0,0,255)}this.texture.setPixels(Z)}},E.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},E.pick=function(s){if(!s||s.id!==this.pickId)return null;var L=l(s.value[0],s.value[1],s.value[2],0),M=m.le(this.arcLength,L);if(M<0)return null;if(M===this.arcLength.length-1)return new _(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),M);for(var z=this.points[M],D=this.points[Math.min(M+1,this.points.length-1)],N=(L-this.arcLength[M])/(this.arcLength[M+1]-this.arcLength[M]),I=1-N,k=[0,0,0],B=0;B<3;++B)k[B]=I*z[B]+N*D[B];var O=Math.min(N<.5?M:M+1,this.points.length-1);return new _(L,k,O,this.points[O])};function T(s){var L=s.gl||s.scene&&s.scene.gl,M=u(L);M.attributes.position.location=0,M.attributes.nextPosition.location=1,M.attributes.arcLength.location=2,M.attributes.lineWidth.location=3,M.attributes.color.location=4;var z=o(L);z.attributes.position.location=0,z.attributes.nextPosition.location=1,z.attributes.arcLength.location=2,z.attributes.lineWidth.location=3,z.attributes.color.location=4;for(var D=e(L),N=a(L,[{buffer:D,size:3,offset:0,stride:48},{buffer:D,size:3,offset:12,stride:48},{buffer:D,size:1,offset:24,stride:48},{buffer:D,size:1,offset:28,stride:48},{buffer:D,size:4,offset:32,stride:48}]),I=v(new Array(256*4),[256,1,4]),k=0;k<1024;++k)I.data[k]=255;var B=n(L,I);B.wrap=L.REPEAT;var O=new y(L,M,z,D,N,B);return O.update(s),O}},7332:function(h){h.exports=p;function p(r){var e=new Float32Array(16);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}},9823:function(h){h.exports=p;function p(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7787:function(h){h.exports=p;function p(r){var e=r[0],a=r[1],n=r[2],f=r[3],c=r[4],l=r[5],m=r[6],v=r[7],b=r[8],u=r[9],o=r[10],d=r[11],w=r[12],A=r[13],_=r[14],y=r[15],E=e*l-a*c,T=e*m-n*c,s=e*v-f*c,L=a*m-n*l,M=a*v-f*l,z=n*v-f*m,D=b*A-u*w,N=b*_-o*w,I=b*y-d*w,k=u*_-o*A,B=u*y-d*A,O=o*y-d*_;return E*O-T*B+s*k+L*I-M*N+z*D}},5950:function(h){h.exports=p;function p(r,e){var a=e[0],n=e[1],f=e[2],c=e[3],l=a+a,m=n+n,v=f+f,b=a*l,u=n*l,o=n*m,d=f*l,w=f*m,A=f*v,_=c*l,y=c*m,E=c*v;return r[0]=1-o-A,r[1]=u+E,r[2]=d-y,r[3]=0,r[4]=u-E,r[5]=1-b-A,r[6]=w+_,r[7]=0,r[8]=d+y,r[9]=w-_,r[10]=1-b-o,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7280:function(h){h.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=e[3],m=n+n,v=f+f,b=c+c,u=n*m,o=n*v,d=n*b,w=f*v,A=f*b,_=c*b,y=l*m,E=l*v,T=l*b;return r[0]=1-(w+_),r[1]=o+T,r[2]=d-E,r[3]=0,r[4]=o-T,r[5]=1-(u+_),r[6]=A+y,r[7]=0,r[8]=d+E,r[9]=A-y,r[10]=1-(u+w),r[11]=0,r[12]=a[0],r[13]=a[1],r[14]=a[2],r[15]=1,r}},9947:function(h){h.exports=p;function p(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7437:function(h){h.exports=p;function p(r,e){var a=e[0],n=e[1],f=e[2],c=e[3],l=e[4],m=e[5],v=e[6],b=e[7],u=e[8],o=e[9],d=e[10],w=e[11],A=e[12],_=e[13],y=e[14],E=e[15],T=a*m-n*l,s=a*v-f*l,L=a*b-c*l,M=n*v-f*m,z=n*b-c*m,D=f*b-c*v,N=u*_-o*A,I=u*y-d*A,k=u*E-w*A,B=o*y-d*_,O=o*E-w*_,H=d*E-w*y,Y=T*H-s*O+L*B+M*k-z*I+D*N;return Y?(Y=1/Y,r[0]=(m*H-v*O+b*B)*Y,r[1]=(f*O-n*H-c*B)*Y,r[2]=(_*D-y*z+E*M)*Y,r[3]=(d*z-o*D-w*M)*Y,r[4]=(v*k-l*H-b*I)*Y,r[5]=(a*H-f*k+c*I)*Y,r[6]=(y*L-A*D-E*s)*Y,r[7]=(u*D-d*L+w*s)*Y,r[8]=(l*O-m*k+b*N)*Y,r[9]=(n*k-a*O-c*N)*Y,r[10]=(A*z-_*L+E*T)*Y,r[11]=(o*L-u*z-w*T)*Y,r[12]=(m*I-l*B-v*N)*Y,r[13]=(a*B-n*I+f*N)*Y,r[14]=(_*s-A*M-y*T)*Y,r[15]=(u*M-o*s+d*T)*Y,r):null}},3012:function(h,p,r){var e=r(9947);h.exports=a;function a(n,f,c,l){var m,v,b,u,o,d,w,A,_,y,E=f[0],T=f[1],s=f[2],L=l[0],M=l[1],z=l[2],D=c[0],N=c[1],I=c[2];return Math.abs(E-D)<1e-6&&Math.abs(T-N)<1e-6&&Math.abs(s-I)<1e-6?e(n):(w=E-D,A=T-N,_=s-I,y=1/Math.sqrt(w*w+A*A+_*_),w*=y,A*=y,_*=y,m=M*_-z*A,v=z*w-L*_,b=L*A-M*w,y=Math.sqrt(m*m+v*v+b*b),y?(y=1/y,m*=y,v*=y,b*=y):(m=0,v=0,b=0),u=A*b-_*v,o=_*m-w*b,d=w*v-A*m,y=Math.sqrt(u*u+o*o+d*d),y?(y=1/y,u*=y,o*=y,d*=y):(u=0,o=0,d=0),n[0]=m,n[1]=u,n[2]=w,n[3]=0,n[4]=v,n[5]=o,n[6]=A,n[7]=0,n[8]=b,n[9]=d,n[10]=_,n[11]=0,n[12]=-(m*E+v*T+b*s),n[13]=-(u*E+o*T+d*s),n[14]=-(w*E+A*T+_*s),n[15]=1,n)}},104:function(h){h.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=e[3],m=e[4],v=e[5],b=e[6],u=e[7],o=e[8],d=e[9],w=e[10],A=e[11],_=e[12],y=e[13],E=e[14],T=e[15],s=a[0],L=a[1],M=a[2],z=a[3];return r[0]=s*n+L*m+M*o+z*_,r[1]=s*f+L*v+M*d+z*y,r[2]=s*c+L*b+M*w+z*E,r[3]=s*l+L*u+M*A+z*T,s=a[4],L=a[5],M=a[6],z=a[7],r[4]=s*n+L*m+M*o+z*_,r[5]=s*f+L*v+M*d+z*y,r[6]=s*c+L*b+M*w+z*E,r[7]=s*l+L*u+M*A+z*T,s=a[8],L=a[9],M=a[10],z=a[11],r[8]=s*n+L*m+M*o+z*_,r[9]=s*f+L*v+M*d+z*y,r[10]=s*c+L*b+M*w+z*E,r[11]=s*l+L*u+M*A+z*T,s=a[12],L=a[13],M=a[14],z=a[15],r[12]=s*n+L*m+M*o+z*_,r[13]=s*f+L*v+M*d+z*y,r[14]=s*c+L*b+M*w+z*E,r[15]=s*l+L*u+M*A+z*T,r}},5268:function(h){h.exports=p;function p(r,e,a,n,f,c,l){var m=1/(e-a),v=1/(n-f),b=1/(c-l);return r[0]=-2*m,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*v,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*b,r[11]=0,r[12]=(e+a)*m,r[13]=(f+n)*v,r[14]=(l+c)*b,r[15]=1,r}},1120:function(h){h.exports=p;function p(r,e,a,n,f){var c=1/Math.tan(e/2),l=1/(n-f);return r[0]=c/a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=c,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(f+n)*l,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*f*n*l,r[15]=0,r}},4422:function(h){h.exports=p;function p(r,e,a,n){var f=n[0],c=n[1],l=n[2],m=Math.sqrt(f*f+c*c+l*l),v,b,u,o,d,w,A,_,y,E,T,s,L,M,z,D,N,I,k,B,O,H,Y,j;return Math.abs(m)<1e-6?null:(m=1/m,f*=m,c*=m,l*=m,v=Math.sin(a),b=Math.cos(a),u=1-b,o=e[0],d=e[1],w=e[2],A=e[3],_=e[4],y=e[5],E=e[6],T=e[7],s=e[8],L=e[9],M=e[10],z=e[11],D=f*f*u+b,N=c*f*u+l*v,I=l*f*u-c*v,k=f*c*u-l*v,B=c*c*u+b,O=l*c*u+f*v,H=f*l*u+c*v,Y=c*l*u-f*v,j=l*l*u+b,r[0]=o*D+_*N+s*I,r[1]=d*D+y*N+L*I,r[2]=w*D+E*N+M*I,r[3]=A*D+T*N+z*I,r[4]=o*k+_*B+s*O,r[5]=d*k+y*B+L*O,r[6]=w*k+E*B+M*O,r[7]=A*k+T*B+z*O,r[8]=o*H+_*Y+s*j,r[9]=d*H+y*Y+L*j,r[10]=w*H+E*Y+M*j,r[11]=A*H+T*Y+z*j,e!==r&&(r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r)}},6109:function(h){h.exports=p;function p(r,e,a){var n=Math.sin(a),f=Math.cos(a),c=e[4],l=e[5],m=e[6],v=e[7],b=e[8],u=e[9],o=e[10],d=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=c*f+b*n,r[5]=l*f+u*n,r[6]=m*f+o*n,r[7]=v*f+d*n,r[8]=b*f-c*n,r[9]=u*f-l*n,r[10]=o*f-m*n,r[11]=d*f-v*n,r}},7115:function(h){h.exports=p;function p(r,e,a){var n=Math.sin(a),f=Math.cos(a),c=e[0],l=e[1],m=e[2],v=e[3],b=e[8],u=e[9],o=e[10],d=e[11];return e!==r&&(r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=c*f-b*n,r[1]=l*f-u*n,r[2]=m*f-o*n,r[3]=v*f-d*n,r[8]=c*n+b*f,r[9]=l*n+u*f,r[10]=m*n+o*f,r[11]=v*n+d*f,r}},5240:function(h){h.exports=p;function p(r,e,a){var n=Math.sin(a),f=Math.cos(a),c=e[0],l=e[1],m=e[2],v=e[3],b=e[4],u=e[5],o=e[6],d=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=c*f+b*n,r[1]=l*f+u*n,r[2]=m*f+o*n,r[3]=v*f+d*n,r[4]=b*f-c*n,r[5]=u*f-l*n,r[6]=o*f-m*n,r[7]=d*f-v*n,r}},3668:function(h){h.exports=p;function p(r,e,a){var n=a[0],f=a[1],c=a[2];return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r[3]=e[3]*n,r[4]=e[4]*f,r[5]=e[5]*f,r[6]=e[6]*f,r[7]=e[7]*f,r[8]=e[8]*c,r[9]=e[9]*c,r[10]=e[10]*c,r[11]=e[11]*c,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}},998:function(h){h.exports=p;function p(r,e,a){var n=a[0],f=a[1],c=a[2],l,m,v,b,u,o,d,w,A,_,y,E;return e===r?(r[12]=e[0]*n+e[4]*f+e[8]*c+e[12],r[13]=e[1]*n+e[5]*f+e[9]*c+e[13],r[14]=e[2]*n+e[6]*f+e[10]*c+e[14],r[15]=e[3]*n+e[7]*f+e[11]*c+e[15]):(l=e[0],m=e[1],v=e[2],b=e[3],u=e[4],o=e[5],d=e[6],w=e[7],A=e[8],_=e[9],y=e[10],E=e[11],r[0]=l,r[1]=m,r[2]=v,r[3]=b,r[4]=u,r[5]=o,r[6]=d,r[7]=w,r[8]=A,r[9]=_,r[10]=y,r[11]=E,r[12]=l*n+u*f+A*c+e[12],r[13]=m*n+o*f+_*c+e[13],r[14]=v*n+d*f+y*c+e[14],r[15]=b*n+w*f+E*c+e[15]),r}},2142:function(h){h.exports=p;function p(r,e){if(r===e){var a=e[1],n=e[2],f=e[3],c=e[6],l=e[7],m=e[11];r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=a,r[6]=e[9],r[7]=e[13],r[8]=n,r[9]=c,r[11]=e[14],r[12]=f,r[13]=l,r[14]=m}else r[0]=e[0],r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=e[1],r[5]=e[5],r[6]=e[9],r[7]=e[13],r[8]=e[2],r[9]=e[6],r[10]=e[10],r[11]=e[14],r[12]=e[3],r[13]=e[7],r[14]=e[11],r[15]=e[15];return r}},4340:function(h,p,r){var e=r(957),a=r(7309);h.exports=m;function n(v,b){for(var u=[0,0,0,0],o=0;o<4;++o)for(var d=0;d<4;++d)u[d]+=v[4*o+d]*b[o];return u}function f(v,b,u,o,d){for(var w=n(o,n(u,n(b,[v[0],v[1],v[2],1]))),A=0;A<3;++A)w[A]/=w[3];return[.5*d[0]*(1+w[0]),.5*d[1]*(1-w[1])]}function c(v,b){if(v.length===2){for(var u=0,o=0,d=0;d<2;++d)u+=Math.pow(b[d]-v[0][d],2),o+=Math.pow(b[d]-v[1][d],2);return u=Math.sqrt(u),o=Math.sqrt(o),u+o<1e-6?[1,0]:[o/(u+o),u/(o+u)]}else if(v.length===3){var w=[0,0];return a(v[0],v[1],v[2],b,w),e(v,w)}return[]}function l(v,b){for(var u=[0,0,0],o=0;o1.0001)return null;M+=L[_]}return Math.abs(M-1)>.001?null:[y,l(v,L),L]}},2056:function(h,p,r){var e=r(6832),a=e([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -5340,7 +5340,7 @@ void main() { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),h=e([`precision highp float; +}`]),v=e([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -5448,13 +5448,13 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);p.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},p.wireShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},p.pointShader={vertex:l,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},p.pickShader={vertex:h,fragment:b,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},p.pointPickShader={vertex:u,fragment:b,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},p.contourShader={vertex:o,fragment:d,attributes:[{name:"position",type:"vec3"}]}},8116:function(v,p,r){var e=1e-6,a=1e-6,n=r(5158),f=r(5827),c=r(2944),l=r(8931),m=r(115),h=r(104),b=r(7437),u=r(5050),o=r(9156),d=r(7212),w=r(5306),A=r(2056),_=r(4340),y=A.meshShader,E=A.wireShader,T=A.pointShader,s=A.pickShader,L=A.pointPickShader,M=A.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(J,X,tt,V,Q,ot,$,Z,st,nt,ct,gt,Tt,wt,Rt,bt,At,mt,Lt,Ht,Ut,kt,Vt,It,re,Kt,$t){this.gl=J,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=X,this.dirty=!0,this.triShader=tt,this.lineShader=V,this.pointShader=Q,this.pickShader=ot,this.pointPickShader=$,this.contourShader=Z,this.trianglePositions=st,this.triangleColors=ct,this.triangleNormals=Tt,this.triangleUVs=gt,this.triangleIds=nt,this.triangleVAO=wt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Rt,this.edgeColors=At,this.edgeUVs=mt,this.edgeIds=bt,this.edgeVAO=Lt,this.edgeCount=0,this.pointPositions=Ht,this.pointColors=kt,this.pointUVs=Vt,this.pointSizes=It,this.pointIds=Ut,this.pointVAO=re,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Kt,this.contourVAO=$t,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=z,this._view=z,this._projection=z,this._resolution=[1,1]}var N=D.prototype;N.isOpaque=function(){return!this.hasAlpha},N.isTransparent=function(){return this.hasAlpha},N.pickSlots=1,N.setPickBase=function(J){this.pickId=J};function I(J,X){if(!X||!X.length)return 1;for(var tt=0;ttJ&&tt>0){var V=(X[tt][0]-J)/(X[tt][0]-X[tt-1][0]);return X[tt][1]*(1-V)+V*X[tt-1][1]}}return 1}function k(J,X){for(var tt=o({colormap:J,nshades:256,format:"rgba"}),V=new Uint8Array(256*4),Q=0;Q<256;++Q){for(var ot=tt[Q],$=0;$<3;++$)V[4*Q+$]=ot[$];X?V[4*Q+3]=255*I(Q/255,X):V[4*Q+3]=255*ot[3]}return u(V,[256,256,4],[4,0,1])}function B(J){for(var X=J.length,tt=new Array(X),V=0;V0){var Tt=this.triShader;Tt.bind(),Tt.uniforms=Z,this.triangleVAO.bind(),X.drawArrays(X.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Tt=this.lineShader;Tt.bind(),Tt.uniforms=Z,this.edgeVAO.bind(),X.lineWidth(this.lineWidth*this.pixelRatio),X.drawArrays(X.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Tt=this.pointShader;Tt.bind(),Tt.uniforms=Z,this.pointVAO.bind(),X.drawArrays(X.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Tt=this.contourShader;Tt.bind(),Tt.uniforms=Z,this.contourVAO.bind(),X.drawArrays(X.LINES,0,this.contourCount),this.contourVAO.unbind()}},N.drawPick=function(J){J=J||{};for(var X=this.gl,tt=J.model||z,V=J.view||z,Q=J.projection||z,ot=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],$=0;$<3;++$)ot[0][$]=Math.max(ot[0][$],this.clipBounds[0][$]),ot[1][$]=Math.min(ot[1][$],this.clipBounds[1][$]);this._model=[].slice.call(tt),this._view=[].slice.call(V),this._projection=[].slice.call(Q),this._resolution=[X.drawingBufferWidth,X.drawingBufferHeight];var Z={model:tt,view:V,projection:Q,clipBounds:ot,pickId:this.pickId/255},st=this.pickShader;if(st.bind(),st.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),X.drawArrays(X.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),X.lineWidth(this.lineWidth*this.pixelRatio),X.drawArrays(X.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var st=this.pointPickShader;st.bind(),st.uniforms=Z,this.pointVAO.bind(),X.drawArrays(X.POINTS,0,this.pointCount),this.pointVAO.unbind()}},N.pick=function(J){if(!J||J.id!==this.pickId)return null;for(var X=J.value[0]+256*J.value[1]+65536*J.value[2],tt=this.cells[X],V=this.positions,Q=new Array(tt.length),ot=0;otJ&&tt>0){var V=(X[tt][0]-J)/(X[tt][0]-X[tt-1][0]);return X[tt][1]*(1-V)+V*X[tt-1][1]}}return 1}function k(J,X){for(var tt=o({colormap:J,nshades:256,format:"rgba"}),V=new Uint8Array(256*4),Q=0;Q<256;++Q){for(var ot=tt[Q],$=0;$<3;++$)V[4*Q+$]=ot[$];X?V[4*Q+3]=255*I(Q/255,X):V[4*Q+3]=255*ot[3]}return u(V,[256,256,4],[4,0,1])}function B(J){for(var X=J.length,tt=new Array(X),V=0;V0){var Tt=this.triShader;Tt.bind(),Tt.uniforms=Z,this.triangleVAO.bind(),X.drawArrays(X.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Tt=this.lineShader;Tt.bind(),Tt.uniforms=Z,this.edgeVAO.bind(),X.lineWidth(this.lineWidth*this.pixelRatio),X.drawArrays(X.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Tt=this.pointShader;Tt.bind(),Tt.uniforms=Z,this.pointVAO.bind(),X.drawArrays(X.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Tt=this.contourShader;Tt.bind(),Tt.uniforms=Z,this.contourVAO.bind(),X.drawArrays(X.LINES,0,this.contourCount),this.contourVAO.unbind()}},N.drawPick=function(J){J=J||{};for(var X=this.gl,tt=J.model||z,V=J.view||z,Q=J.projection||z,ot=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],$=0;$<3;++$)ot[0][$]=Math.max(ot[0][$],this.clipBounds[0][$]),ot[1][$]=Math.min(ot[1][$],this.clipBounds[1][$]);this._model=[].slice.call(tt),this._view=[].slice.call(V),this._projection=[].slice.call(Q),this._resolution=[X.drawingBufferWidth,X.drawingBufferHeight];var Z={model:tt,view:V,projection:Q,clipBounds:ot,pickId:this.pickId/255},st=this.pickShader;if(st.bind(),st.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),X.drawArrays(X.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),X.lineWidth(this.lineWidth*this.pixelRatio),X.drawArrays(X.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var st=this.pointPickShader;st.bind(),st.uniforms=Z,this.pointVAO.bind(),X.drawArrays(X.POINTS,0,this.pointCount),this.pointVAO.unbind()}},N.pick=function(J){if(!J||J.id!==this.pickId)return null;for(var X=J.value[0]+256*J.value[1]+65536*J.value[2],tt=this.cells[X],V=this.positions,Q=new Array(tt.length),ot=0;oty[et]&&(A.uniforms.dataAxis=b,A.uniforms.screenOffset=u,A.uniforms.color=N[d],A.uniforms.angle=I[d],E.drawArrays(E.TRIANGLES,y[et],y[it]-y[et]))),k[d]&&j&&(u[d^1]-=ut*M*B[d],A.uniforms.dataAxis=o,A.uniforms.screenOffset=u,A.uniforms.color=O[d],A.uniforms.angle=H[d],E.drawArrays(E.TRIANGLES,Y,j)),u[d^1]=ut*T[2+(d^1)]-1,z[d+2]&&(u[d^1]+=ut*M*D[d+2],ety[et]&&(A.uniforms.dataAxis=b,A.uniforms.screenOffset=u,A.uniforms.color=N[d+2],A.uniforms.angle=I[d+2],E.drawArrays(E.TRIANGLES,y[et],y[it]-y[et]))),k[d+2]&&j&&(u[d^1]+=ut*M*B[d+2],A.uniforms.dataAxis=o,A.uniforms.screenOffset=u,A.uniforms.color=O[d+2],A.uniforms.angle=H[d+2],E.drawArrays(E.TRIANGLES,Y,j))}}(),m.drawTitle=function(){var b=[0,0],u=[0,0];return function(){var o=this.plot,d=this.shader,w=o.gl,A=o.screenBox,_=o.titleCenter,y=o.titleAngle,E=o.titleColor,T=o.pixelRatio;if(this.titleCount){for(var s=0;s<2;++s)u[s]=2*(_[s]*T-A[s])/(A[2+s]-A[s])-1;d.bind(),d.uniforms.dataAxis=b,d.uniforms.screenOffset=u,d.uniforms.angle=y,d.uniforms.color=E,w.drawArrays(w.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=function(){var b=[0,0],u=[0,0],o=[0,0];return function(){var d=this.plot,w=this.shader,A=d._tickBounds,_=d.dataBox,y=d.screenBox,E=d.viewBox;w.bind();for(var T=0;T<2;++T){var s=A[T],L=A[T+2],M=L-s,z=.5*(_[T+2]+_[T]),D=_[T+2]-_[T],N=E[T],I=E[T+2],k=I-N,B=y[T],O=y[T+2],H=O-B;u[T]=2*M/D*k/H,b[T]=2*(s-z)/D*k/H}o[1]=2*d.pixelRatio/(y[3]-y[1]),o[0]=o[1]*(y[3]-y[1])/(y[2]-y[0]),w.uniforms.dataScale=u,w.uniforms.dataShift=b,w.uniforms.textScale=o,this.vbo.bind(),w.attributes.textCoordinate.pointer()}}(),m.update=function(b){var u=[],o=b.ticks,d=b.bounds,w,A,_,y,E;for(E=0;E<2;++E){var T=[Math.floor(u.length/3)],s=[-1/0],L=o[E];for(w=0;w=0))){var k=d[I]-A[I]*(d[I+2]-d[I])/(A[I+2]-A[I]);I===0?E.drawLine(k,d[1],k,d[3],N[I],D[I]):E.drawLine(d[0],k,d[2],k,N[I],D[I])}}for(var I=0;I=0;--o)this.objects[o].dispose();this.objects.length=0;for(var o=this.overlays.length-1;o>=0;--o)this.overlays[o].dispose();this.overlays.length=0,this.gl=null},m.addObject=function(o){this.objects.indexOf(o)<0&&(this.objects.push(o),this.setDirty())},m.removeObject=function(o){for(var d=this.objects,w=0;wMath.abs(s))o.rotate(z,0,0,-T*L*Math.PI*y.rotateSpeed/window.innerWidth);else if(!y._ortho){var D=-y.zoomSpeed*M*s/window.innerHeight*(z-o.lastT())/20;o.pan(z,0,0,w*(Math.exp(D)-1))}}},!0)},y.enableMouseListeners(),y}},8245:function(v,p,r){var e=r(6832),a=r(5158),n=e([`precision mediump float; +`])}},5613:function(h,p,r){h.exports=v;var e=r(5827),a=r(5158),n=r(6946),f=r(5070),c=r(2709);function l(b,u,o){this.plot=b,this.vbo=u,this.shader=o,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var m=l.prototype;m.drawTicks=function(){var b=[0,0],u=[0,0],o=[0,0];return function(d){var w=this.plot,A=this.shader,_=this.tickX[d],y=this.tickOffset[d],E=w.gl,T=w.viewBox,s=w.dataBox,L=w.screenBox,M=w.pixelRatio,z=w.tickEnable,D=w.tickPad,N=w.tickColor,I=w.tickAngle,k=w.labelEnable,B=w.labelPad,O=w.labelColor,H=w.labelAngle,Y=this.labelOffset[d],j=this.labelCount[d],et=f.lt(_,s[d]),it=f.le(_,s[d+2]);b[0]=b[1]=0,b[d]=1,u[d]=(T[2+d]+T[d])/(L[2+d]-L[d])-1;var ut=2/L[2+(d^1)]-L[d^1];u[d^1]=ut*T[d^1]-1,z[d]&&(u[d^1]-=ut*M*D[d],ety[et]&&(A.uniforms.dataAxis=b,A.uniforms.screenOffset=u,A.uniforms.color=N[d],A.uniforms.angle=I[d],E.drawArrays(E.TRIANGLES,y[et],y[it]-y[et]))),k[d]&&j&&(u[d^1]-=ut*M*B[d],A.uniforms.dataAxis=o,A.uniforms.screenOffset=u,A.uniforms.color=O[d],A.uniforms.angle=H[d],E.drawArrays(E.TRIANGLES,Y,j)),u[d^1]=ut*T[2+(d^1)]-1,z[d+2]&&(u[d^1]+=ut*M*D[d+2],ety[et]&&(A.uniforms.dataAxis=b,A.uniforms.screenOffset=u,A.uniforms.color=N[d+2],A.uniforms.angle=I[d+2],E.drawArrays(E.TRIANGLES,y[et],y[it]-y[et]))),k[d+2]&&j&&(u[d^1]+=ut*M*B[d+2],A.uniforms.dataAxis=o,A.uniforms.screenOffset=u,A.uniforms.color=O[d+2],A.uniforms.angle=H[d+2],E.drawArrays(E.TRIANGLES,Y,j))}}(),m.drawTitle=function(){var b=[0,0],u=[0,0];return function(){var o=this.plot,d=this.shader,w=o.gl,A=o.screenBox,_=o.titleCenter,y=o.titleAngle,E=o.titleColor,T=o.pixelRatio;if(this.titleCount){for(var s=0;s<2;++s)u[s]=2*(_[s]*T-A[s])/(A[2+s]-A[s])-1;d.bind(),d.uniforms.dataAxis=b,d.uniforms.screenOffset=u,d.uniforms.angle=y,d.uniforms.color=E,w.drawArrays(w.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=function(){var b=[0,0],u=[0,0],o=[0,0];return function(){var d=this.plot,w=this.shader,A=d._tickBounds,_=d.dataBox,y=d.screenBox,E=d.viewBox;w.bind();for(var T=0;T<2;++T){var s=A[T],L=A[T+2],M=L-s,z=.5*(_[T+2]+_[T]),D=_[T+2]-_[T],N=E[T],I=E[T+2],k=I-N,B=y[T],O=y[T+2],H=O-B;u[T]=2*M/D*k/H,b[T]=2*(s-z)/D*k/H}o[1]=2*d.pixelRatio/(y[3]-y[1]),o[0]=o[1]*(y[3]-y[1])/(y[2]-y[0]),w.uniforms.dataScale=u,w.uniforms.dataShift=b,w.uniforms.textScale=o,this.vbo.bind(),w.attributes.textCoordinate.pointer()}}(),m.update=function(b){var u=[],o=b.ticks,d=b.bounds,w,A,_,y,E;for(E=0;E<2;++E){var T=[Math.floor(u.length/3)],s=[-1/0],L=o[E];for(w=0;w=0))){var k=d[I]-A[I]*(d[I+2]-d[I])/(A[I+2]-A[I]);I===0?E.drawLine(k,d[1],k,d[3],N[I],D[I]):E.drawLine(d[0],k,d[2],k,N[I],D[I])}}for(var I=0;I=0;--o)this.objects[o].dispose();this.objects.length=0;for(var o=this.overlays.length-1;o>=0;--o)this.overlays[o].dispose();this.overlays.length=0,this.gl=null},m.addObject=function(o){this.objects.indexOf(o)<0&&(this.objects.push(o),this.setDirty())},m.removeObject=function(o){for(var d=this.objects,w=0;wMath.abs(s))o.rotate(z,0,0,-T*L*Math.PI*y.rotateSpeed/window.innerWidth);else if(!y._ortho){var D=-y.zoomSpeed*M*s/window.innerHeight*(z-o.lastT())/20;o.pan(z,0,0,w*(Math.exp(D)-1))}}},!0)},y.enableMouseListeners(),y}},8245:function(h,p,r){var e=r(6832),a=r(5158),n=e([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; @@ -5546,7 +5546,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);v.exports=function(c){return a(c,n,f,null,[{name:"position",type:"vec2"}])}},1059:function(v,p,r){var e=r(4296),a=r(7453),n=r(2771),f=r(6496),c=r(2611),l=r(4234),m=r(8126),h=r(6145),b=r(1120),u=r(5268),o=r(8245),d=r(2321)({tablet:!0,featureDetect:!0});v.exports={createScene:E,createCamera:e};function w(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function A(s,L){var M=null;try{M=s.getContext("webgl",L),M||(M=s.getContext("experimental-webgl",L))}catch{return null}return M}function _(s){var L=Math.round(Math.log(Math.abs(s))/Math.log(10));if(L<0){var M=Math.round(Math.pow(10,-L));return Math.ceil(s*M)/M}else if(L>0){var M=Math.round(Math.pow(10,L));return Math.ceil(s/M)*M}return Math.ceil(s)}function y(s){return typeof s=="boolean"?s:!0}function E(s){s=s||{},s.camera=s.camera||{};var L=s.canvas;if(!L)if(L=document.createElement("canvas"),s.container){var M=s.container;M.appendChild(L)}else document.body.appendChild(L);var z=s.gl;if(z||(s.glOptions&&(d=!!s.glOptions.preserveDrawingBuffer),z=A(L,s.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!z)throw new Error("webgl not supported");var D=s.bounds||[[-10,-10,-10],[10,10,10]],N=new w,I=l(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!d}),k=o(z),B=s.cameraObject&&s.cameraObject._ortho===!0||s.camera.projection&&s.camera.projection.type==="orthographic"||!1,O={eye:s.camera.eye||[2,0,0],center:s.camera.center||[0,0,0],up:s.camera.up||[0,1,0],zoomMin:s.camera.zoomMax||.1,zoomMax:s.camera.zoomMin||100,mode:s.camera.mode||"turntable",_ortho:B},H=s.axes||{},Y=a(z,H);Y.enable=!H.disable;var j=s.spikes||{},et=f(z,j),it=[],ut=[],J=[],X=[],tt=!0,$=!0,V=new Array(16),Q=new Array(16),ot={view:null,projection:V,model:Q,_ortho:!1},$=!0,Z=[z.drawingBufferWidth,z.drawingBufferHeight],st=s.cameraObject||e(L,O),nt={gl:z,contextLost:!1,pixelRatio:s.pixelRatio||1,canvas:L,selection:N,camera:st,axes:Y,axesPixels:null,spikes:et,bounds:D,objects:it,shape:Z,aspect:s.aspectRatio||[1,1,1],pickRadius:s.pickRadius||10,zNear:s.zNear||.01,zFar:s.zFar||1e3,fovy:s.fovy||Math.PI/4,clearColor:s.clearColor||[0,0,0,0],autoResize:y(s.autoResize),autoBounds:y(s.autoBounds),autoScale:!!s.autoScale,autoCenter:y(s.autoCenter),clipToBounds:y(s.clipToBounds),snapToData:!!s.snapToData,onselect:s.onselect||null,onrender:s.onrender||null,onclick:s.onclick||null,cameraParams:ot,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ht){this.aspect[0]=Ht.x,this.aspect[1]=Ht.y,this.aspect[2]=Ht.z,$=!0},setBounds:function(Ht,Ut){this.bounds[0][Ht]=Ut.min,this.bounds[1][Ht]=Ut.max},setClearColor:function(Ht){this.clearColor=Ht},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ct=[z.drawingBufferWidth/nt.pixelRatio|0,z.drawingBufferHeight/nt.pixelRatio|0];function gt(){if(!nt._stopped&&nt.autoResize){var Ht=L.parentNode,Ut=1,kt=1;Ht&&Ht!==document.body?(Ut=Ht.clientWidth,kt=Ht.clientHeight):(Ut=window.innerWidth,kt=window.innerHeight);var Vt=Math.ceil(Ut*nt.pixelRatio)|0,It=Math.ceil(kt*nt.pixelRatio)|0;if(Vt!==L.width||It!==L.height){L.width=Vt,L.height=It;var re=L.style;re.position=re.position||"absolute",re.left="0px",re.top="0px",re.width=Ut+"px",re.height=kt+"px",tt=!0}}}nt.autoResize&>(),window.addEventListener("resize",gt);function Tt(){for(var Ht=it.length,Ut=X.length,kt=0;kt0&&J[Ut-1]===0;)J.pop(),X.pop().dispose()}nt.update=function(Ht){nt._stopped||(tt=!0,$=!0)},nt.add=function(Ht){nt._stopped||(Ht.axes=Y,it.push(Ht),ut.push(-1),tt=!0,$=!0,Tt())},nt.remove=function(Ht){if(!nt._stopped){var Ut=it.indexOf(Ht);Ut<0||(it.splice(Ut,1),ut.pop(),tt=!0,$=!0,Tt())}},nt.dispose=function(){if(!nt._stopped&&(nt._stopped=!0,window.removeEventListener("resize",gt),L.removeEventListener("webglcontextlost",wt),nt.mouseListener.enabled=!1,!nt.contextLost)){Y.dispose(),et.dispose();for(var Ht=0;HtN.distance)continue;for(var he=0;he0){var M=Math.round(Math.pow(10,L));return Math.ceil(s/M)*M}return Math.ceil(s)}function y(s){return typeof s=="boolean"?s:!0}function E(s){s=s||{},s.camera=s.camera||{};var L=s.canvas;if(!L)if(L=document.createElement("canvas"),s.container){var M=s.container;M.appendChild(L)}else document.body.appendChild(L);var z=s.gl;if(z||(s.glOptions&&(d=!!s.glOptions.preserveDrawingBuffer),z=A(L,s.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!z)throw new Error("webgl not supported");var D=s.bounds||[[-10,-10,-10],[10,10,10]],N=new w,I=l(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!d}),k=o(z),B=s.cameraObject&&s.cameraObject._ortho===!0||s.camera.projection&&s.camera.projection.type==="orthographic"||!1,O={eye:s.camera.eye||[2,0,0],center:s.camera.center||[0,0,0],up:s.camera.up||[0,1,0],zoomMin:s.camera.zoomMax||.1,zoomMax:s.camera.zoomMin||100,mode:s.camera.mode||"turntable",_ortho:B},H=s.axes||{},Y=a(z,H);Y.enable=!H.disable;var j=s.spikes||{},et=f(z,j),it=[],ut=[],J=[],X=[],tt=!0,$=!0,V=new Array(16),Q=new Array(16),ot={view:null,projection:V,model:Q,_ortho:!1},$=!0,Z=[z.drawingBufferWidth,z.drawingBufferHeight],st=s.cameraObject||e(L,O),nt={gl:z,contextLost:!1,pixelRatio:s.pixelRatio||1,canvas:L,selection:N,camera:st,axes:Y,axesPixels:null,spikes:et,bounds:D,objects:it,shape:Z,aspect:s.aspectRatio||[1,1,1],pickRadius:s.pickRadius||10,zNear:s.zNear||.01,zFar:s.zFar||1e3,fovy:s.fovy||Math.PI/4,clearColor:s.clearColor||[0,0,0,0],autoResize:y(s.autoResize),autoBounds:y(s.autoBounds),autoScale:!!s.autoScale,autoCenter:y(s.autoCenter),clipToBounds:y(s.clipToBounds),snapToData:!!s.snapToData,onselect:s.onselect||null,onrender:s.onrender||null,onclick:s.onclick||null,cameraParams:ot,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ht){this.aspect[0]=Ht.x,this.aspect[1]=Ht.y,this.aspect[2]=Ht.z,$=!0},setBounds:function(Ht,Ut){this.bounds[0][Ht]=Ut.min,this.bounds[1][Ht]=Ut.max},setClearColor:function(Ht){this.clearColor=Ht},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ct=[z.drawingBufferWidth/nt.pixelRatio|0,z.drawingBufferHeight/nt.pixelRatio|0];function gt(){if(!nt._stopped&&nt.autoResize){var Ht=L.parentNode,Ut=1,kt=1;Ht&&Ht!==document.body?(Ut=Ht.clientWidth,kt=Ht.clientHeight):(Ut=window.innerWidth,kt=window.innerHeight);var Vt=Math.ceil(Ut*nt.pixelRatio)|0,It=Math.ceil(kt*nt.pixelRatio)|0;if(Vt!==L.width||It!==L.height){L.width=Vt,L.height=It;var re=L.style;re.position=re.position||"absolute",re.left="0px",re.top="0px",re.width=Ut+"px",re.height=kt+"px",tt=!0}}}nt.autoResize&>(),window.addEventListener("resize",gt);function Tt(){for(var Ht=it.length,Ut=X.length,kt=0;kt0&&J[Ut-1]===0;)J.pop(),X.pop().dispose()}nt.update=function(Ht){nt._stopped||(tt=!0,$=!0)},nt.add=function(Ht){nt._stopped||(Ht.axes=Y,it.push(Ht),ut.push(-1),tt=!0,$=!0,Tt())},nt.remove=function(Ht){if(!nt._stopped){var Ut=it.indexOf(Ht);Ut<0||(it.splice(Ut,1),ut.pop(),tt=!0,$=!0,Tt())}},nt.dispose=function(){if(!nt._stopped&&(nt._stopped=!0,window.removeEventListener("resize",gt),L.removeEventListener("webglcontextlost",wt),nt.mouseListener.enabled=!1,!nt.contextLost)){Y.dispose(),et.dispose();for(var Ht=0;HtN.distance)continue;for(var he=0;he>>1,w=b.positions instanceof Float32Array,A=b.idToIndex instanceof Int32Array&&b.idToIndex.length>=d,_=b.positions,y=w?_:n.mallocFloat32(_.length),E=A?b.idToIndex:n.mallocInt32(d);if(w||y.set(_),!A)for(y.set(_),u=0;u>>1,w;for(w=0;w=u[0]&&A<=u[2]&&_>=u[1]&&_<=u[3]&&o++}return o}l.unifiedDraw=function(){var b=[1,0,0,0,1,0,0,0,1],u=[0,0,0,0];return function(o){var d=o!==void 0,w=d?this.pickShader:this.shader,A=this.plot.gl,_=this.plot.dataBox;if(this.pointCount===0)return o;var y=_[2]-_[0],E=_[3]-_[1],T=m(this.points,_),s=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(T,.33333)));b[0]=2/y,b[4]=2/E,b[6]=-2*_[0]/y-1,b[7]=-2*_[1]/E-1,this.offsetBuffer.bind(),w.bind(),w.attributes.position.pointer(),w.uniforms.matrix=b,w.uniforms.color=this.color,w.uniforms.borderColor=this.borderColor,w.uniforms.pointCloud=s<5,w.uniforms.pointSize=s,w.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),d&&(u[0]=o&255,u[1]=o>>8&255,u[2]=o>>16&255,u[3]=o>>24&255,this.pickBuffer.bind(),w.attributes.pickId.pointer(A.UNSIGNED_BYTE),w.uniforms.pickOffset=u,this.pickOffset=o);var L=A.getParameter(A.BLEND),M=A.getParameter(A.DITHER);return L&&!this.blend&&A.disable(A.BLEND),M&&A.disable(A.DITHER),A.drawArrays(A.POINTS,0,this.pointCount),L&&!this.blend&&A.enable(A.BLEND),M&&A.enable(A.DITHER),o+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(b,u,o){var d=this.pickOffset,w=this.pointCount;if(o=d+w)return null;var A=o-d,_=this.points;return{object:this,pointId:A,dataCoord:[_[2*A],_[2*A+1]]}};function h(b,u){var o=b.gl,d=a(o),w=a(o),A=e(o,f.pointVertex,f.pointFragment),_=e(o,f.pickVertex,f.pickFragment),y=new c(b,d,w,A,_);return y.update(u),b.addObject(y),y}},6093:function(v){v.exports=p;function p(r,e,a,n){var f=e[0],c=e[1],l=e[2],m=e[3],h=a[0],b=a[1],u=a[2],o=a[3],d,w,A,_,y;return w=f*h+c*b+l*u+m*o,w<0&&(w=-w,h=-h,b=-b,u=-u,o=-o),1-w>1e-6?(d=Math.acos(w),A=Math.sin(d),_=Math.sin((1-n)*d)/A,y=Math.sin(n*d)/A):(_=1-n,y=n),r[0]=_*f+y*h,r[1]=_*c+y*b,r[2]=_*l+y*u,r[3]=_*m+y*o,r}},8240:function(v){v.exports=function(p){return!p&&p!==0?"":p.toString()}},4123:function(v,p,r){var e=r(875);v.exports=n;var a={};function n(f,c,l){var m=a[c];if(m||(m=a[c]={}),f in m)return m[f];var h={textAlign:"center",textBaseline:"middle",lineHeight:1,font:c,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};h.triangles=!0;var b=e(f,h);h.triangles=!1;var u=e(f,h),o,d;if(l&&l!==1){for(o=0;o>>1,w=b.positions instanceof Float32Array,A=b.idToIndex instanceof Int32Array&&b.idToIndex.length>=d,_=b.positions,y=w?_:n.mallocFloat32(_.length),E=A?b.idToIndex:n.mallocInt32(d);if(w||y.set(_),!A)for(y.set(_),u=0;u>>1,w;for(w=0;w=u[0]&&A<=u[2]&&_>=u[1]&&_<=u[3]&&o++}return o}l.unifiedDraw=function(){var b=[1,0,0,0,1,0,0,0,1],u=[0,0,0,0];return function(o){var d=o!==void 0,w=d?this.pickShader:this.shader,A=this.plot.gl,_=this.plot.dataBox;if(this.pointCount===0)return o;var y=_[2]-_[0],E=_[3]-_[1],T=m(this.points,_),s=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(T,.33333)));b[0]=2/y,b[4]=2/E,b[6]=-2*_[0]/y-1,b[7]=-2*_[1]/E-1,this.offsetBuffer.bind(),w.bind(),w.attributes.position.pointer(),w.uniforms.matrix=b,w.uniforms.color=this.color,w.uniforms.borderColor=this.borderColor,w.uniforms.pointCloud=s<5,w.uniforms.pointSize=s,w.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),d&&(u[0]=o&255,u[1]=o>>8&255,u[2]=o>>16&255,u[3]=o>>24&255,this.pickBuffer.bind(),w.attributes.pickId.pointer(A.UNSIGNED_BYTE),w.uniforms.pickOffset=u,this.pickOffset=o);var L=A.getParameter(A.BLEND),M=A.getParameter(A.DITHER);return L&&!this.blend&&A.disable(A.BLEND),M&&A.disable(A.DITHER),A.drawArrays(A.POINTS,0,this.pointCount),L&&!this.blend&&A.enable(A.BLEND),M&&A.enable(A.DITHER),o+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(b,u,o){var d=this.pickOffset,w=this.pointCount;if(o=d+w)return null;var A=o-d,_=this.points;return{object:this,pointId:A,dataCoord:[_[2*A],_[2*A+1]]}};function v(b,u){var o=b.gl,d=a(o),w=a(o),A=e(o,f.pointVertex,f.pointFragment),_=e(o,f.pickVertex,f.pickFragment),y=new c(b,d,w,A,_);return y.update(u),b.addObject(y),y}},6093:function(h){h.exports=p;function p(r,e,a,n){var f=e[0],c=e[1],l=e[2],m=e[3],v=a[0],b=a[1],u=a[2],o=a[3],d,w,A,_,y;return w=f*v+c*b+l*u+m*o,w<0&&(w=-w,v=-v,b=-b,u=-u,o=-o),1-w>1e-6?(d=Math.acos(w),A=Math.sin(d),_=Math.sin((1-n)*d)/A,y=Math.sin(n*d)/A):(_=1-n,y=n),r[0]=_*f+y*v,r[1]=_*c+y*b,r[2]=_*l+y*u,r[3]=_*m+y*o,r}},8240:function(h){h.exports=function(p){return!p&&p!==0?"":p.toString()}},4123:function(h,p,r){var e=r(875);h.exports=n;var a={};function n(f,c,l){var m=a[c];if(m||(m=a[c]={}),f in m)return m[f];var v={textAlign:"center",textBaseline:"middle",lineHeight:1,font:c,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};v.triangles=!0;var b=e(f,v);v.triangles=!1;var u=e(f,v),o,d;if(l&&l!==1){for(o=0;o1?1:J}function A(J,X,tt,V,Q,ot,$,Z,st,nt,ct,gt){this.gl=J,this.pixelRatio=1,this.shader=X,this.orthoShader=tt,this.projectShader=V,this.pointBuffer=Q,this.colorBuffer=ot,this.glyphBuffer=$,this.idBuffer=Z,this.vao=st,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=nt,this.pickOrthoShader=ct,this.pickProjectShader=gt,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var _=A.prototype;_.pickSlots=1,_.setPickBase=function(J){this.pickId=J},_.isTransparent=function(){if(this.hasAlpha)return!0;for(var J=0;J<3;++J)if(this.axesProject[J]&&this.projectHasAlpha)return!0;return!1},_.isOpaque=function(){if(!this.hasAlpha)return!0;for(var J=0;J<3;++J)if(this.axesProject[J]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],E=[0,0,0],T=[0,0,0],s=[0,0,0,1],L=[0,0,0,1],M=b.slice(),z=[0,0,0],D=[[0,0,0],[0,0,0]];function N(J){return J[0]=J[1]=J[2]=0,J}function I(J,X){return J[0]=X[0],J[1]=X[1],J[2]=X[2],J[3]=1,J}function k(J,X,tt,V){return J[0]=X[0],J[1]=X[1],J[2]=X[2],J[tt]=V,J}function B(J){for(var X=D,tt=0;tt<2;++tt)for(var V=0;V<3;++V)X[tt][V]=Math.max(Math.min(J[tt][V],1e8),-1e8);return X}function O(J,X,tt,V){var Q=X.axesProject,ot=X.gl,$=J.uniforms,Z=tt.model||b,st=tt.view||b,nt=tt.projection||b,ct=X.axesBounds,gt=B(X.clipBounds),Tt;X.axes&&X.axes.lastCubeProps?Tt=X.axes.lastCubeProps.axis:Tt=[1,1,1],y[0]=2/ot.drawingBufferWidth,y[1]=2/ot.drawingBufferHeight,J.bind(),$.view=st,$.projection=nt,$.screenSize=y,$.highlightId=X.highlightId,$.highlightScale=X.highlightScale,$.clipBounds=gt,$.pickGroup=X.pickId/255,$.pixelRatio=V;for(var wt=0;wt<3;++wt)if(Q[wt]){$.scale=X.projectScale[wt],$.opacity=X.projectOpacity[wt];for(var Rt=M,bt=0;bt<16;++bt)Rt[bt]=0;for(var bt=0;bt<4;++bt)Rt[5*bt]=1;Rt[5*wt]=0,Tt[wt]<0?Rt[12+wt]=ct[0][wt]:Rt[12+wt]=ct[1][wt],c(Rt,Z,Rt),$.model=Rt;var At=(wt+1)%3,mt=(wt+2)%3,Lt=N(E),Ht=N(T);Lt[At]=1,Ht[mt]=1;var Ut=o(nt,st,Z,I(s,Lt)),kt=o(nt,st,Z,I(L,Ht));if(Math.abs(Ut[1])>Math.abs(kt[1])){var Vt=Ut;Ut=kt,kt=Vt,Vt=Lt,Lt=Ht,Ht=Vt;var It=At;At=mt,mt=It}Ut[0]<0&&(Lt[At]=-1),kt[1]>0&&(Ht[mt]=-1);for(var re=0,Kt=0,bt=0;bt<4;++bt)re+=Math.pow(Z[4*At+bt],2),Kt+=Math.pow(Z[4*mt+bt],2);Lt[At]/=Math.sqrt(re),Ht[mt]/=Math.sqrt(Kt),$.axes[0]=Lt,$.axes[1]=Ht,$.fragClipBounds[0]=k(z,gt[0],wt,-1e8),$.fragClipBounds[1]=k(z,gt[1],wt,1e8),X.vao.bind(),X.vao.draw(ot.TRIANGLES,X.vertexCount),X.lineWidth>0&&(ot.lineWidth(X.lineWidth*V),X.vao.draw(ot.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}var H=[-1e8,-1e8,-1e8],Y=[1e8,1e8,1e8],j=[H,Y];function et(J,X,tt,V,Q,ot,$){var Z=tt.gl;if((ot===tt.projectHasAlpha||$)&&O(X,tt,V,Q),ot===tt.hasAlpha||$){J.bind();var st=J.uniforms;st.model=V.model||b,st.view=V.view||b,st.projection=V.projection||b,y[0]=2/Z.drawingBufferWidth,y[1]=2/Z.drawingBufferHeight,st.screenSize=y,st.highlightId=tt.highlightId,st.highlightScale=tt.highlightScale,st.fragClipBounds=j,st.clipBounds=tt.axes.bounds,st.opacity=tt.opacity,st.pickGroup=tt.pickId/255,st.pixelRatio=Q,tt.vao.bind(),tt.vao.draw(Z.TRIANGLES,tt.vertexCount),tt.lineWidth>0&&(Z.lineWidth(tt.lineWidth*Q),tt.vao.draw(Z.LINES,tt.lineVertexCount,tt.vertexCount)),tt.vao.unbind()}}_.draw=function(J){var X=this.useOrtho?this.orthoShader:this.shader;et(X,this.projectShader,this,J,this.pixelRatio,!1,!1)},_.drawTransparent=function(J){var X=this.useOrtho?this.orthoShader:this.shader;et(X,this.projectShader,this,J,this.pixelRatio,!0,!1)},_.drawPick=function(J){var X=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;et(X,this.pickProjectShader,this,J,1,!0,!0)},_.pick=function(J){if(!J||J.id!==this.pickId)return null;var X=J.value[2]+(J.value[1]<<8)+(J.value[0]<<16);if(X>=this.pointCount||X<0)return null;var tt=this.points[X],V=this._selectResult;V.index=X;for(var Q=0;Q<3;++Q)V.position[Q]=V.dataCoordinate[Q]=tt[Q];return V},_.highlight=function(J){if(!J)this.highlightId=[1,1,1,1];else{var X=J.index,tt=X&255,V=X>>8&255,Q=X>>16&255;this.highlightId=[tt/255,V/255,Q/255,0]}};function it(J,X,tt,V){var Q;Array.isArray(J)?X0){var Se=0,ne=mt,zt=[0,0,0,1],Xt=[0,0,0,1],Jt=Array.isArray(Tt)&&Array.isArray(Tt[0]),Wt=Array.isArray(bt)&&Array.isArray(bt[0]);t:for(var V=0;V0?1-Kt[0][0]:jt<0?1+Kt[1][0]:1,ie*=ie>0?1-Kt[0][1]:ie<0?1+Kt[1][1]:1;for(var me=[jt,ie],Te=It.cells||[],Be=It.positions||[],kt=0;kt1?1:J}function A(J,X,tt,V,Q,ot,$,Z,st,nt,ct,gt){this.gl=J,this.pixelRatio=1,this.shader=X,this.orthoShader=tt,this.projectShader=V,this.pointBuffer=Q,this.colorBuffer=ot,this.glyphBuffer=$,this.idBuffer=Z,this.vao=st,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=nt,this.pickOrthoShader=ct,this.pickProjectShader=gt,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var _=A.prototype;_.pickSlots=1,_.setPickBase=function(J){this.pickId=J},_.isTransparent=function(){if(this.hasAlpha)return!0;for(var J=0;J<3;++J)if(this.axesProject[J]&&this.projectHasAlpha)return!0;return!1},_.isOpaque=function(){if(!this.hasAlpha)return!0;for(var J=0;J<3;++J)if(this.axesProject[J]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],E=[0,0,0],T=[0,0,0],s=[0,0,0,1],L=[0,0,0,1],M=b.slice(),z=[0,0,0],D=[[0,0,0],[0,0,0]];function N(J){return J[0]=J[1]=J[2]=0,J}function I(J,X){return J[0]=X[0],J[1]=X[1],J[2]=X[2],J[3]=1,J}function k(J,X,tt,V){return J[0]=X[0],J[1]=X[1],J[2]=X[2],J[tt]=V,J}function B(J){for(var X=D,tt=0;tt<2;++tt)for(var V=0;V<3;++V)X[tt][V]=Math.max(Math.min(J[tt][V],1e8),-1e8);return X}function O(J,X,tt,V){var Q=X.axesProject,ot=X.gl,$=J.uniforms,Z=tt.model||b,st=tt.view||b,nt=tt.projection||b,ct=X.axesBounds,gt=B(X.clipBounds),Tt;X.axes&&X.axes.lastCubeProps?Tt=X.axes.lastCubeProps.axis:Tt=[1,1,1],y[0]=2/ot.drawingBufferWidth,y[1]=2/ot.drawingBufferHeight,J.bind(),$.view=st,$.projection=nt,$.screenSize=y,$.highlightId=X.highlightId,$.highlightScale=X.highlightScale,$.clipBounds=gt,$.pickGroup=X.pickId/255,$.pixelRatio=V;for(var wt=0;wt<3;++wt)if(Q[wt]){$.scale=X.projectScale[wt],$.opacity=X.projectOpacity[wt];for(var Rt=M,bt=0;bt<16;++bt)Rt[bt]=0;for(var bt=0;bt<4;++bt)Rt[5*bt]=1;Rt[5*wt]=0,Tt[wt]<0?Rt[12+wt]=ct[0][wt]:Rt[12+wt]=ct[1][wt],c(Rt,Z,Rt),$.model=Rt;var At=(wt+1)%3,mt=(wt+2)%3,Lt=N(E),Ht=N(T);Lt[At]=1,Ht[mt]=1;var Ut=o(nt,st,Z,I(s,Lt)),kt=o(nt,st,Z,I(L,Ht));if(Math.abs(Ut[1])>Math.abs(kt[1])){var Vt=Ut;Ut=kt,kt=Vt,Vt=Lt,Lt=Ht,Ht=Vt;var It=At;At=mt,mt=It}Ut[0]<0&&(Lt[At]=-1),kt[1]>0&&(Ht[mt]=-1);for(var re=0,Kt=0,bt=0;bt<4;++bt)re+=Math.pow(Z[4*At+bt],2),Kt+=Math.pow(Z[4*mt+bt],2);Lt[At]/=Math.sqrt(re),Ht[mt]/=Math.sqrt(Kt),$.axes[0]=Lt,$.axes[1]=Ht,$.fragClipBounds[0]=k(z,gt[0],wt,-1e8),$.fragClipBounds[1]=k(z,gt[1],wt,1e8),X.vao.bind(),X.vao.draw(ot.TRIANGLES,X.vertexCount),X.lineWidth>0&&(ot.lineWidth(X.lineWidth*V),X.vao.draw(ot.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}var H=[-1e8,-1e8,-1e8],Y=[1e8,1e8,1e8],j=[H,Y];function et(J,X,tt,V,Q,ot,$){var Z=tt.gl;if((ot===tt.projectHasAlpha||$)&&O(X,tt,V,Q),ot===tt.hasAlpha||$){J.bind();var st=J.uniforms;st.model=V.model||b,st.view=V.view||b,st.projection=V.projection||b,y[0]=2/Z.drawingBufferWidth,y[1]=2/Z.drawingBufferHeight,st.screenSize=y,st.highlightId=tt.highlightId,st.highlightScale=tt.highlightScale,st.fragClipBounds=j,st.clipBounds=tt.axes.bounds,st.opacity=tt.opacity,st.pickGroup=tt.pickId/255,st.pixelRatio=Q,tt.vao.bind(),tt.vao.draw(Z.TRIANGLES,tt.vertexCount),tt.lineWidth>0&&(Z.lineWidth(tt.lineWidth*Q),tt.vao.draw(Z.LINES,tt.lineVertexCount,tt.vertexCount)),tt.vao.unbind()}}_.draw=function(J){var X=this.useOrtho?this.orthoShader:this.shader;et(X,this.projectShader,this,J,this.pixelRatio,!1,!1)},_.drawTransparent=function(J){var X=this.useOrtho?this.orthoShader:this.shader;et(X,this.projectShader,this,J,this.pixelRatio,!0,!1)},_.drawPick=function(J){var X=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;et(X,this.pickProjectShader,this,J,1,!0,!0)},_.pick=function(J){if(!J||J.id!==this.pickId)return null;var X=J.value[2]+(J.value[1]<<8)+(J.value[0]<<16);if(X>=this.pointCount||X<0)return null;var tt=this.points[X],V=this._selectResult;V.index=X;for(var Q=0;Q<3;++Q)V.position[Q]=V.dataCoordinate[Q]=tt[Q];return V},_.highlight=function(J){if(!J)this.highlightId=[1,1,1,1];else{var X=J.index,tt=X&255,V=X>>8&255,Q=X>>16&255;this.highlightId=[tt/255,V/255,Q/255,0]}};function it(J,X,tt,V){var Q;Array.isArray(J)?X0){var Se=0,ne=mt,zt=[0,0,0,1],Xt=[0,0,0,1],Jt=Array.isArray(Tt)&&Array.isArray(Tt[0]),Wt=Array.isArray(bt)&&Array.isArray(bt[0]);t:for(var V=0;V0?1-Kt[0][0]:jt<0?1+Kt[1][0]:1,ie*=ie>0?1-Kt[0][1]:ie<0?1+Kt[1][1]:1;for(var me=[jt,ie],Te=It.cells||[],Be=It.positions||[],kt=0;kt0){var N=b*E;w.drawBox(T-N,s-N,L+N,s+N,d),w.drawBox(T-N,M-N,L+N,M+N,d),w.drawBox(T-N,s-N,T+N,M+N,d),w.drawBox(L-N,s-N,L+N,M+N,d)}}}},c.update=function(m){m=m||{},this.innerFill=!!m.innerFill,this.outerFill=!!m.outerFill,this.innerColor=(m.innerColor||[0,0,0,.5]).slice(),this.outerColor=(m.outerColor||[0,0,0,.5]).slice(),this.borderColor=(m.borderColor||[0,0,0,1]).slice(),this.borderWidth=m.borderWidth||0,this.selectBox=(m.selectBox||this.selectBox).slice()},c.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function l(m,h){var b=m.gl,u=a(b,[0,0,0,1,1,0,1,1]),o=e(b,n.boxVertex,n.boxFragment),d=new f(m,u,o);return d.update(h),m.addOverlay(d),d}},2611:function(v,p,r){v.exports=b;var e=r(4234),a=r(5306),n=r(5050),f=r(2288).nextPow2,c=function(u,o,d){for(var w=1e8,A=-1,_=-1,y=u.shape[0],E=u.shape[1],T=0;Tthis.buffer.length){a.free(this.buffer);for(var w=this.buffer=a.mallocUint8(f(d*o*4)),A=0;Aw)for(o=w;od)for(o=d;o=0){for(var B=k.type.charAt(k.type.length-1)|0,O=new Array(B),H=0;H=0;)Y+=1;N[I]=Y}var j=new Array(w.length);function et(){y.program=f.program(E,y._vref,y._fref,D,N);for(var it=0;it=0){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new e("","Invalid data type for attribute "+y+": "+E);c(h,b,T[0],o,s,d,y)}else if(E.indexOf("mat")>=0){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new e("","Invalid data type for attribute "+y+": "+E);l(h,b,T,o,s,d,y)}else throw new e("","Unknown data type for attribute "+y+": "+E);break}}return d}},9016:function(v,p,r){var e=r(3984),a=r(9068);v.exports=c;function n(l){return function(){return l}}function f(l,m){for(var h=new Array(l),b=0;b4)throw new a("","Invalid data type");switch(Y.charAt(0)){case"b":case"i":l["uniform"+j+"iv"](b[N],I);break;case"v":l["uniform"+j+"fv"](b[N],I);break;default:throw new a("","Unrecognized data type for vector "+name+": "+Y)}}else if(Y.indexOf("mat")===0&&Y.length===4){if(j=Y.charCodeAt(Y.length-1)-48,j<2||j>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+Y);l["uniformMatrix"+j+"fv"](b[N],!1,I);break}else throw new a("","Unknown uniform data type for "+name+": "+Y)}}}}}function d(E,T){if(typeof T!="object")return[[E,T]];var s=[];for(var L in T){var M=T[L],z=E;parseInt(L)+""===L?z+="["+L+"]":z+="."+L,typeof M=="object"?s.push.apply(s,d(z,M)):s.push([z,M])}return s}function w(E){switch(E){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=E.indexOf("vec");if(0<=T&&T<=1&&E.length===4+T){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new a("","Invalid data type");return E.charAt(0)==="b"?f(s,!1):f(s,0)}else if(E.indexOf("mat")===0&&E.length===4){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+E);return f(s*s,0)}else throw new a("","Unknown uniform data type for "+name+": "+E)}}function A(E,T,s){if(typeof s=="object"){var L=_(s);Object.defineProperty(E,T,{get:n(L),set:o(s),enumerable:!0,configurable:!1})}else b[s]?Object.defineProperty(E,T,{get:u(s),set:o(s),enumerable:!0,configurable:!1}):E[T]=w(h[s].type)}function _(E){var T;if(Array.isArray(E)){T=new Array(E.length);for(var s=0;s1){h[0]in l||(l[h[0]]=[]),l=l[h[0]];for(var b=1;b1)for(var d=0;d"u"?r(4037):WeakMap,f=new n,c=0;function l(A,_,y,E,T,s,L){this.id=A,this.src=_,this.type=y,this.shader=E,this.count=s,this.programs=[],this.cache=L}l.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,_=A.gl,y=this.programs,E=0,T=y.length;E0){var N=b*E;w.drawBox(T-N,s-N,L+N,s+N,d),w.drawBox(T-N,M-N,L+N,M+N,d),w.drawBox(T-N,s-N,T+N,M+N,d),w.drawBox(L-N,s-N,L+N,M+N,d)}}}},c.update=function(m){m=m||{},this.innerFill=!!m.innerFill,this.outerFill=!!m.outerFill,this.innerColor=(m.innerColor||[0,0,0,.5]).slice(),this.outerColor=(m.outerColor||[0,0,0,.5]).slice(),this.borderColor=(m.borderColor||[0,0,0,1]).slice(),this.borderWidth=m.borderWidth||0,this.selectBox=(m.selectBox||this.selectBox).slice()},c.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function l(m,v){var b=m.gl,u=a(b,[0,0,0,1,1,0,1,1]),o=e(b,n.boxVertex,n.boxFragment),d=new f(m,u,o);return d.update(v),m.addOverlay(d),d}},2611:function(h,p,r){h.exports=b;var e=r(4234),a=r(5306),n=r(5050),f=r(2288).nextPow2,c=function(u,o,d){for(var w=1e8,A=-1,_=-1,y=u.shape[0],E=u.shape[1],T=0;Tthis.buffer.length){a.free(this.buffer);for(var w=this.buffer=a.mallocUint8(f(d*o*4)),A=0;Aw)for(o=w;od)for(o=d;o=0){for(var B=k.type.charAt(k.type.length-1)|0,O=new Array(B),H=0;H=0;)Y+=1;N[I]=Y}var j=new Array(w.length);function et(){y.program=f.program(E,y._vref,y._fref,D,N);for(var it=0;it=0){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new e("","Invalid data type for attribute "+y+": "+E);c(v,b,T[0],o,s,d,y)}else if(E.indexOf("mat")>=0){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new e("","Invalid data type for attribute "+y+": "+E);l(v,b,T,o,s,d,y)}else throw new e("","Unknown data type for attribute "+y+": "+E);break}}return d}},9016:function(h,p,r){var e=r(3984),a=r(9068);h.exports=c;function n(l){return function(){return l}}function f(l,m){for(var v=new Array(l),b=0;b4)throw new a("","Invalid data type");switch(Y.charAt(0)){case"b":case"i":l["uniform"+j+"iv"](b[N],I);break;case"v":l["uniform"+j+"fv"](b[N],I);break;default:throw new a("","Unrecognized data type for vector "+name+": "+Y)}}else if(Y.indexOf("mat")===0&&Y.length===4){if(j=Y.charCodeAt(Y.length-1)-48,j<2||j>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+Y);l["uniformMatrix"+j+"fv"](b[N],!1,I);break}else throw new a("","Unknown uniform data type for "+name+": "+Y)}}}}}function d(E,T){if(typeof T!="object")return[[E,T]];var s=[];for(var L in T){var M=T[L],z=E;parseInt(L)+""===L?z+="["+L+"]":z+="."+L,typeof M=="object"?s.push.apply(s,d(z,M)):s.push([z,M])}return s}function w(E){switch(E){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=E.indexOf("vec");if(0<=T&&T<=1&&E.length===4+T){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new a("","Invalid data type");return E.charAt(0)==="b"?f(s,!1):f(s,0)}else if(E.indexOf("mat")===0&&E.length===4){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+E);return f(s*s,0)}else throw new a("","Unknown uniform data type for "+name+": "+E)}}function A(E,T,s){if(typeof s=="object"){var L=_(s);Object.defineProperty(E,T,{get:n(L),set:o(s),enumerable:!0,configurable:!1})}else b[s]?Object.defineProperty(E,T,{get:u(s),set:o(s),enumerable:!0,configurable:!1}):E[T]=w(v[s].type)}function _(E){var T;if(Array.isArray(E)){T=new Array(E.length);for(var s=0;s1){v[0]in l||(l[v[0]]=[]),l=l[v[0]];for(var b=1;b1)for(var d=0;d"u"?r(4037):WeakMap,f=new n,c=0;function l(A,_,y,E,T,s,L){this.id=A,this.src=_,this.type=y,this.shader=E,this.count=s,this.programs=[],this.cache=L}l.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,_=A.gl,y=this.programs,E=0,T=y.length;E0)for(var J=0;JA)return y-1}return y},m=function(w,A,_){return w_?_:w},h=function(w,A,_){var y=A.vectors,E=A.meshgrid,T=w[0],s=w[1],L=w[2],M=E[0].length,z=E[1].length,D=E[2].length,N=l(E[0],T),I=l(E[1],s),k=l(E[2],L),B=N+1,O=I+1,H=k+1;if(N=m(N,0,M-1),B=m(B,0,M-1),I=m(I,0,z-1),O=m(O,0,z-1),k=m(k,0,D-1),H=m(H,0,D-1),N<0||I<0||k<0||B>M-1||O>z-1||H>D-1)return e.create();var Y=E[0][N],j=E[0][B],et=E[1][I],it=E[1][O],ut=E[2][k],J=E[2][H],X=(T-Y)/(j-Y),tt=(s-et)/(it-et),V=(L-ut)/(J-ut);isFinite(X)||(X=.5),isFinite(tt)||(tt=.5),isFinite(V)||(V=.5);var Q,ot,$,Z,st,nt;switch(_.reversedX&&(N=M-1-N,B=M-1-B),_.reversedY&&(I=z-1-I,O=z-1-O),_.reversedZ&&(k=D-1-k,H=D-1-H),_.filled){case 5:st=k,nt=H,$=I*D,Z=O*D,Q=N*D*z,ot=B*D*z;break;case 4:st=k,nt=H,Q=N*D,ot=B*D,$=I*D*M,Z=O*D*M;break;case 3:$=I,Z=O,st=k*z,nt=H*z,Q=N*z*D,ot=B*z*D;break;case 2:$=I,Z=O,Q=N*z,ot=B*z,st=k*z*M,nt=H*z*M;break;case 1:Q=N,ot=B,st=k*M,nt=H*M,$=I*M*D,Z=O*M*D;break;default:Q=N,ot=B,$=I*M,Z=O*M,st=k*M*z,nt=H*M*z;break}var ct=y[Q+$+st],gt=y[Q+$+nt],Tt=y[Q+Z+st],wt=y[Q+Z+nt],Rt=y[ot+$+st],bt=y[ot+$+nt],At=y[ot+Z+st],mt=y[ot+Z+nt],Lt=e.create(),Ht=e.create(),Ut=e.create(),kt=e.create();e.lerp(Lt,ct,Rt,X),e.lerp(Ht,gt,bt,X),e.lerp(Ut,Tt,At,X),e.lerp(kt,wt,mt,X);var Vt=e.create(),It=e.create();e.lerp(Vt,Lt,Ut,tt),e.lerp(It,Ht,kt,tt);var re=e.create();return e.lerp(re,Vt,It,V),re},b=function(w){var A=1/0;w.sort(function(T,s){return T-s});for(var _=w.length,y=1;y<_;y++){var E=Math.abs(w[y]-w[y-1]);EB||mtO||LtH)},j=e.distance(A[0],A[1]),et=10*j/y,it=et*et,ut=1,J=0,X=_.length;X>1&&(ut=u(_));for(var tt=0;ttJ&&(J=ct),st.push(ct),D.push({points:Q,velocities:ot,divergences:st});for(var gt=0;gtit&&e.scale(Tt,Tt,et/Math.sqrt(wt)),e.add(Tt,Tt,V),$=M(Tt),e.squaredDistance(Z,Tt)-it>-1e-4*it){Q.push(Tt),Z=Tt,ot.push($);var nt=z(Tt,$),ct=e.length(nt);isFinite(ct)&&ct>J&&(J=ct),st.push(ct)}V=Tt}}var Rt=c(D,w.colormap,J,ut);return T?Rt.tubeScale=T:(J===0&&(J=1),Rt.tubeScale=E*.5*ut/J),Rt};var o=r(9578),d=r(1140).createMesh;v.exports.createTubeMesh=function(w,A){return d(w,A,{shaders:o,traceType:"streamtube"})}},9054:function(v,p,r){var e=r(5158),a=r(6832),n=a([`precision highp float; +}`]);p.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},p.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(h,p,r){var e=r(2858),a=r(4020),n=["xyz","xzy","yxz","yzx","zxy","zyx"],f=function(w,A,_,y){for(var E=w.points,T=w.velocities,s=w.divergences,L=[],M=[],z=[],D=[],N=[],I=[],k=0,B=0,O=a.create(),H=a.create(),Y=8,j=0;j0)for(var J=0;JA)return y-1}return y},m=function(w,A,_){return w_?_:w},v=function(w,A,_){var y=A.vectors,E=A.meshgrid,T=w[0],s=w[1],L=w[2],M=E[0].length,z=E[1].length,D=E[2].length,N=l(E[0],T),I=l(E[1],s),k=l(E[2],L),B=N+1,O=I+1,H=k+1;if(N=m(N,0,M-1),B=m(B,0,M-1),I=m(I,0,z-1),O=m(O,0,z-1),k=m(k,0,D-1),H=m(H,0,D-1),N<0||I<0||k<0||B>M-1||O>z-1||H>D-1)return e.create();var Y=E[0][N],j=E[0][B],et=E[1][I],it=E[1][O],ut=E[2][k],J=E[2][H],X=(T-Y)/(j-Y),tt=(s-et)/(it-et),V=(L-ut)/(J-ut);isFinite(X)||(X=.5),isFinite(tt)||(tt=.5),isFinite(V)||(V=.5);var Q,ot,$,Z,st,nt;switch(_.reversedX&&(N=M-1-N,B=M-1-B),_.reversedY&&(I=z-1-I,O=z-1-O),_.reversedZ&&(k=D-1-k,H=D-1-H),_.filled){case 5:st=k,nt=H,$=I*D,Z=O*D,Q=N*D*z,ot=B*D*z;break;case 4:st=k,nt=H,Q=N*D,ot=B*D,$=I*D*M,Z=O*D*M;break;case 3:$=I,Z=O,st=k*z,nt=H*z,Q=N*z*D,ot=B*z*D;break;case 2:$=I,Z=O,Q=N*z,ot=B*z,st=k*z*M,nt=H*z*M;break;case 1:Q=N,ot=B,st=k*M,nt=H*M,$=I*M*D,Z=O*M*D;break;default:Q=N,ot=B,$=I*M,Z=O*M,st=k*M*z,nt=H*M*z;break}var ct=y[Q+$+st],gt=y[Q+$+nt],Tt=y[Q+Z+st],wt=y[Q+Z+nt],Rt=y[ot+$+st],bt=y[ot+$+nt],At=y[ot+Z+st],mt=y[ot+Z+nt],Lt=e.create(),Ht=e.create(),Ut=e.create(),kt=e.create();e.lerp(Lt,ct,Rt,X),e.lerp(Ht,gt,bt,X),e.lerp(Ut,Tt,At,X),e.lerp(kt,wt,mt,X);var Vt=e.create(),It=e.create();e.lerp(Vt,Lt,Ut,tt),e.lerp(It,Ht,kt,tt);var re=e.create();return e.lerp(re,Vt,It,V),re},b=function(w){var A=1/0;w.sort(function(T,s){return T-s});for(var _=w.length,y=1;y<_;y++){var E=Math.abs(w[y]-w[y-1]);EB||mtO||LtH)},j=e.distance(A[0],A[1]),et=10*j/y,it=et*et,ut=1,J=0,X=_.length;X>1&&(ut=u(_));for(var tt=0;ttJ&&(J=ct),st.push(ct),D.push({points:Q,velocities:ot,divergences:st});for(var gt=0;gtit&&e.scale(Tt,Tt,et/Math.sqrt(wt)),e.add(Tt,Tt,V),$=M(Tt),e.squaredDistance(Z,Tt)-it>-1e-4*it){Q.push(Tt),Z=Tt,ot.push($);var nt=z(Tt,$),ct=e.length(nt);isFinite(ct)&&ct>J&&(J=ct),st.push(ct)}V=Tt}}var Rt=c(D,w.colormap,J,ut);return T?Rt.tubeScale=T:(J===0&&(J=1),Rt.tubeScale=E*.5*ut/J),Rt};var o=r(9578),d=r(1140).createMesh;h.exports.createTubeMesh=function(w,A){return d(w,A,{shaders:o,traceType:"streamtube"})}},9054:function(h,p,r){var e=r(5158),a=r(6832),n=a([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -6403,36 +6403,36 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);p.createShader=function(m){var h=e(m,n,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},p.createPickShader=function(m){var h=e(m,n,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},p.createContourShader=function(m){var h=e(m,c,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},p.createPickContourShader=function(m){var h=e(m,c,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},3754:function(v,p,r){v.exports=ot;var e=r(2288),a=r(5827),n=r(2944),f=r(8931),c=r(5306),l=r(9156),m=r(7498),h=r(7382),b=r(5050),u=r(4162),o=r(104),d=r(7437),w=r(5070),A=r(9144),_=r(9054),y=_.createShader,E=_.createContourShader,T=_.createPickShader,s=_.createPickContourShader,L=4*10,M=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],D=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var $=0;$<3;++$){var Z=D[$],st=($+1)%3,nt=($+2)%3;Z[st+0]=1,Z[nt+3]=1,Z[$+6]=1}})();function N($,Z,st,nt,ct){this.position=$,this.index=Z,this.uv=st,this.level=nt,this.dataCoordinate=ct}var I=256;function k($,Z,st,nt,ct,gt,Tt,wt,Rt,bt,At,mt,Lt,Ht,Ut){this.gl=$,this.shape=Z,this.bounds=st,this.objectOffset=Ut,this.intensityBounds=[],this._shader=nt,this._pickShader=ct,this._coordinateBuffer=gt,this._vao=Tt,this._colorMap=wt,this._contourShader=Rt,this._contourPickShader=bt,this._contourBuffer=At,this._contourVAO=mt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new N([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Lt,this._dynamicVAO=Ht,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[b(c.mallocFloat(1024),[0,0]),b(c.mallocFloat(1024),[0,0]),b(c.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var B=k.prototype;B.genColormap=function($,Z){var st=!1,nt=h([l({colormap:$,nshades:I,format:"rgba"}).map(function(ct,gt){var Tt=Z?O(gt/255,Z):ct[3];return Tt<1&&(st=!0),[ct[0],ct[1],ct[2],255*Tt]})]);return m.divseq(nt,255),this.hasAlphaScale=st,nt},B.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},B.isOpaque=function(){return!this.isTransparent()},B.pickSlots=1,B.setPickBase=function($){this.pickId=$};function O($,Z){if(!Z||!Z.length)return 1;for(var st=0;st$&&st>0){var nt=(Z[st][0]-$)/(Z[st][0]-Z[st-1][0]);return Z[st][1]*(1-nt)+nt*Z[st-1][1]}}return 1}var H=[0,0,0],Y={showSurface:!1,showContour:!1,projections:[M.slice(),M.slice(),M.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function j($,Z){var st,nt,ct,gt=Z.axes&&Z.axes.lastCubeProps.axis||H,Tt=Z.showSurface,wt=Z.showContour;for(st=0;st<3;++st)for(Tt=Tt||Z.surfaceProject[st],nt=0;nt<3;++nt)wt=wt||Z.contourProject[st][nt];for(st=0;st<3;++st){var Rt=Y.projections[st];for(nt=0;nt<16;++nt)Rt[nt]=0;for(nt=0;nt<4;++nt)Rt[5*nt]=1;Rt[5*st]=0,Rt[12+st]=Z.axesBounds[+(gt[st]>0)][st],o(Rt,$.model,Rt);var bt=Y.clipBounds[st];for(ct=0;ct<2;++ct)for(nt=0;nt<3;++nt)bt[ct][nt]=$.clipBounds[ct][nt];bt[0][st]=-1e8,bt[1][st]=1e8}return Y.showSurface=Tt,Y.showContour=wt,Y}var et={model:M,view:M,projection:M,inverseModel:M.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},it=M.slice(),ut=[1,0,0,0,1,0,0,0,1];function J($,Z){$=$||{};var st=this.gl;st.disable(st.CULL_FACE),this._colorMap.bind(0);var nt=et;nt.model=$.model||M,nt.view=$.view||M,nt.projection=$.projection||M,nt.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],nt.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],nt.objectOffset=this.objectOffset,nt.contourColor=this.contourColor[0],nt.inverseModel=d(nt.inverseModel,nt.model);for(var ct=0;ct<2;++ct)for(var gt=nt.clipBounds[ct],Tt=0;Tt<3;++Tt)gt[Tt]=Math.min(Math.max(this.clipBounds[ct][Tt],-1e8),1e8);nt.kambient=this.ambientLight,nt.kdiffuse=this.diffuseLight,nt.kspecular=this.specularLight,nt.roughness=this.roughness,nt.fresnel=this.fresnel,nt.opacity=this.opacity,nt.height=0,nt.permutation=ut,nt.vertexColor=this.vertexColor;var wt=it;for(o(wt,nt.view,nt.model),o(wt,nt.projection,wt),d(wt,wt),ct=0;ct<3;++ct)nt.eyePosition[ct]=wt[12+ct]/wt[15];var Rt=wt[15];for(ct=0;ct<3;++ct)Rt+=this.lightPosition[ct]*wt[4*ct+3];for(ct=0;ct<3;++ct){var bt=wt[12+ct];for(Tt=0;Tt<3;++Tt)bt+=wt[4*Tt+ct]*this.lightPosition[Tt];nt.lightPosition[ct]=bt/Rt}var At=j(nt,this);if(At.showSurface){for(this._shader.bind(),this._shader.uniforms=nt,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(st.TRIANGLES,this._vertexCount),ct=0;ct<3;++ct)!this.surfaceProject[ct]||!this.vertexCount||(this._shader.uniforms.model=At.projections[ct],this._shader.uniforms.clipBounds=At.clipBounds[ct],this._vao.draw(st.TRIANGLES,this._vertexCount));this._vao.unbind()}if(At.showContour){var mt=this._contourShader;nt.kambient=1,nt.kdiffuse=0,nt.kspecular=0,nt.opacity=1,mt.bind(),mt.uniforms=nt;var Lt=this._contourVAO;for(Lt.bind(),ct=0;ct<3;++ct)for(mt.uniforms.permutation=D[ct],st.lineWidth(this.contourWidth[ct]*this.pixelRatio),Tt=0;Tt>4)/16)/255,ct=Math.floor(nt),gt=nt-ct,Tt=Z[1]*($.value[1]+($.value[2]&15)/16)/255,wt=Math.floor(Tt),Rt=Tt-wt;ct+=1,wt+=1;var bt=st.position;bt[0]=bt[1]=bt[2]=0;for(var At=0;At<2;++At)for(var mt=At?gt:1-gt,Lt=0;Lt<2;++Lt)for(var Ht=Lt?Rt:1-Rt,Ut=ct+At,kt=wt+Lt,Vt=mt*Ht,It=0;It<3;++It)bt[It]+=this._field[It].get(Ut,kt)*Vt;for(var re=this._pickResult.level,Kt=0;Kt<3;++Kt)if(re[Kt]=w.le(this.contourLevels[Kt],bt[Kt]),re[Kt]<0)this.contourLevels[Kt].length>0&&(re[Kt]=0);else if(re[Kt]Math.abs(le-bt[Kt])&&(re[Kt]+=1)}for(st.index[0]=gt<.5?ct:ct+1,st.index[1]=Rt<.5?wt:wt+1,st.uv[0]=nt/Z[0],st.uv[1]=Tt/Z[1],It=0;It<3;++It)st.dataCoordinate[It]=this._field[It].get(st.index[0],st.index[1]);return st},B.padField=function($,Z){var st=Z.shape.slice(),nt=$.shape.slice();m.assign($.lo(1,1).hi(st[0],st[1]),Z),m.assign($.lo(1).hi(st[0],1),Z.hi(st[0],1)),m.assign($.lo(1,nt[1]-1).hi(st[0],1),Z.lo(0,st[1]-1).hi(st[0],1)),m.assign($.lo(0,1).hi(1,st[1]),Z.hi(1)),m.assign($.lo(nt[0]-1,1).hi(1,st[1]),Z.lo(st[0]-1)),$.set(0,0,Z.get(0,0)),$.set(0,nt[1]-1,Z.get(0,st[1]-1)),$.set(nt[0]-1,0,Z.get(st[0]-1,0)),$.set(nt[0]-1,nt[1]-1,Z.get(st[0]-1,st[1]-1))};function tt($,Z){return Array.isArray($)?[Z($[0]),Z($[1]),Z($[2])]:[Z($),Z($),Z($)]}function V($){return Array.isArray($)?$.length===3?[$[0],$[1],$[2],1]:[$[0],$[1],$[2],$[3]]:[0,0,0,1]}function Q($){if(Array.isArray($)){if(Array.isArray($))return[V($[0]),V($[1]),V($[2])];var Z=V($);return[Z.slice(),Z.slice(),Z.slice()]}}B.update=function($){$=$||{},this.objectOffset=$.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in $&&(this.contourWidth=tt($.contourWidth,Number)),"showContour"in $&&(this.showContour=tt($.showContour,Boolean)),"showSurface"in $&&(this.showSurface=!!$.showSurface),"contourTint"in $&&(this.contourTint=tt($.contourTint,Boolean)),"contourColor"in $&&(this.contourColor=Q($.contourColor)),"contourProject"in $&&(this.contourProject=tt($.contourProject,function(Oe){return tt(Oe,Boolean)})),"surfaceProject"in $&&(this.surfaceProject=$.surfaceProject),"dynamicColor"in $&&(this.dynamicColor=Q($.dynamicColor)),"dynamicTint"in $&&(this.dynamicTint=tt($.dynamicTint,Number)),"dynamicWidth"in $&&(this.dynamicWidth=tt($.dynamicWidth,Number)),"opacity"in $&&(this.opacity=$.opacity),"opacityscale"in $&&(this.opacityscale=$.opacityscale),"colorBounds"in $&&(this.colorBounds=$.colorBounds),"vertexColor"in $&&(this.vertexColor=$.vertexColor?1:0),"colormap"in $&&this._colorMap.setPixels(this.genColormap($.colormap,this.opacityscale));var Z=$.field||$.coords&&$.coords[2]||null,st=!1;if(Z||(this._field[2].shape[0]||this._field[2].shape[2]?Z=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Z=this._field[2].hi(0,0)),"field"in $||"coords"in $){var nt=(Z.shape[0]+2)*(Z.shape[1]+2);nt>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(e.nextPow2(nt))),this._field[2]=b(this._field[2].data,[Z.shape[0]+2,Z.shape[1]+2]),this.padField(this._field[2],Z),this.shape=Z.shape.slice();for(var ct=this.shape,gt=0;gt<2;++gt)this._field[2].size>this._field[gt].data.length&&(c.freeFloat(this._field[gt].data),this._field[gt].data=c.mallocFloat(this._field[2].size)),this._field[gt]=b(this._field[gt].data,[ct[0]+2,ct[1]+2]);if($.coords){var Tt=$.coords;if(!Array.isArray(Tt)||Tt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(gt=0;gt<2;++gt){var wt=Tt[gt];for(Lt=0;Lt<2;++Lt)if(wt.shape[Lt]!==ct[Lt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[gt],wt)}}else if($.ticks){var Rt=$.ticks;if(!Array.isArray(Rt)||Rt.length!==2)throw new Error("gl-surface: invalid ticks");for(gt=0;gt<2;++gt){var bt=Rt[gt];if((Array.isArray(bt)||bt.length)&&(bt=b(bt)),bt.shape[0]!==ct[gt])throw new Error("gl-surface: invalid tick length");var At=b(bt.data,ct);At.stride[gt]=bt.stride[0],At.stride[gt^1]=0,this.padField(this._field[gt],At)}}else{for(gt=0;gt<2;++gt){var mt=[0,0];mt[gt]=1,this._field[gt]=b(this._field[gt].data,[ct[0]+2,ct[1]+2],mt,0)}this._field[0].set(0,0,0);for(var Lt=0;Lt0){for(var Gt=0;Gt<5;++Gt)Te.pop();yt-=1}continue t}}}Xe.push(yt)}this._contourOffsets[Be]=pe,this._contourCounts[Be]=Xe}var Ne=c.mallocFloat(Te.length);for(gt=0;gtN||z<0||z>N)throw new Error("gl-texture2d: Invalid texture size");return L._shape=[M,z],L.bind(),D.texImage2D(D.TEXTURE_2D,0,L.format,M,z,0,L.format,L.type,null),L._mipLevels=[0],L}function o(L,M,z,D,N,I){this.gl=L,this.handle=M,this.format=N,this.type=I,this._shape=[z,D],this._mipLevels=[0],this._magFilter=L.NEAREST,this._minFilter=L.NEAREST,this._wrapS=L.CLAMP_TO_EDGE,this._wrapT=L.CLAMP_TO_EDGE,this._anisoSamples=1;var k=this,B=[this._wrapS,this._wrapT];Object.defineProperties(B,[{get:function(){return k._wrapS},set:function(H){return k.wrapS=H}},{get:function(){return k._wrapT},set:function(H){return k.wrapT=H}}]),this._wrapVector=B;var O=[this._shape[0],this._shape[1]];Object.defineProperties(O,[{get:function(){return k._shape[0]},set:function(H){return k.width=H}},{get:function(){return k._shape[1]},set:function(H){return k.height=H}}]),this._shapeVector=O}var d=o.prototype;Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(L){this.bind();var M=this.gl;if(this.type===M.FLOAT&&f.indexOf(L)>=0&&(M.getExtension("OES_texture_float_linear")||(L=M.NEAREST)),c.indexOf(L)<0)throw new Error("gl-texture2d: Unknown filter mode "+L);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,L),this._minFilter=L}},magFilter:{get:function(){return this._magFilter},set:function(L){this.bind();var M=this.gl;if(this.type===M.FLOAT&&f.indexOf(L)>=0&&(M.getExtension("OES_texture_float_linear")||(L=M.NEAREST)),c.indexOf(L)<0)throw new Error("gl-texture2d: Unknown filter mode "+L);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,L),this._magFilter=L}},mipSamples:{get:function(){return this._anisoSamples},set:function(L){var M=this._anisoSamples;if(this._anisoSamples=Math.max(L,1)|0,M!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(L){if(this.bind(),l.indexOf(L)<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,L),this._wrapS=L}},wrapT:{get:function(){return this._wrapT},set:function(L){if(this.bind(),l.indexOf(L)<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,L),this._wrapT=L}},wrap:{get:function(){return this._wrapVector},set:function(L){if(Array.isArray(L)||(L=[L,L]),L.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var M=0;M<2;++M)if(l.indexOf(L[M])<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);this._wrapS=L[0],this._wrapT=L[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),L}},shape:{get:function(){return this._shapeVector},set:function(L){if(!Array.isArray(L))L=[L|0,L|0];else if(L.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return u(this,L[0]|0,L[1]|0),[L[0]|0,L[1]|0]}},width:{get:function(){return this._shape[0]},set:function(L){return L=L|0,u(this,L,this._shape[1]),L}},height:{get:function(){return this._shape[1]},set:function(L){return L=L|0,u(this,this._shape[0],L),L}}}),d.bind=function(L){var M=this.gl;return L!==void 0&&M.activeTexture(M.TEXTURE0+(L|0)),M.bindTexture(M.TEXTURE_2D,this.handle),L!==void 0?L|0:M.getParameter(M.ACTIVE_TEXTURE)-M.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var L=Math.min(this._shape[0],this._shape[1]),M=0;L>0;++M,L>>>=1)this._mipLevels.indexOf(M)<0&&this._mipLevels.push(M)},d.setPixels=function(L,M,z,D){var N=this.gl;this.bind(),Array.isArray(M)?(D=z,z=M[1]|0,M=M[0]|0):(M=M||0,z=z||0),D=D||0;var I=h(L)?L:L.raw;if(I){var k=this._mipLevels.indexOf(D)<0;k?(N.texImage2D(N.TEXTURE_2D,0,this.format,this.format,this.type,I),this._mipLevels.push(D)):N.texSubImage2D(N.TEXTURE_2D,D,M,z,this.format,this.type,I)}else if(L.shape&&L.stride&&L.data){if(L.shape.length<2||M+L.shape[1]>this._shape[1]>>>D||z+L.shape[0]>this._shape[0]>>>D||M<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(N,M,z,D,this.format,this.type,this._mipLevels,L)}else throw new Error("gl-texture2d: Unsupported data type")};function w(L,M){return L.length===3?M[2]===1&&M[1]===L[0]*L[2]&&M[0]===L[2]:M[0]===1&&M[1]===L[0]}function A(L,M,z,D,N,I,k,B){var O=B.dtype,H=B.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var Y=0,j=0,et=w(H,B.stride.slice());if(O==="float32"?Y=L.FLOAT:O==="float64"?(Y=L.FLOAT,et=!1,O="float32"):O==="uint8"?Y=L.UNSIGNED_BYTE:(Y=L.UNSIGNED_BYTE,et=!1,O="uint8"),H.length===2)j=L.LUMINANCE,H=[H[0],H[1],1],B=e(B.data,H,[B.stride[0],B.stride[1],1],B.offset);else if(H.length===3){if(H[2]===1)j=L.ALPHA;else if(H[2]===2)j=L.LUMINANCE_ALPHA;else if(H[2]===3)j=L.RGB;else if(H[2]===4)j=L.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((j===L.LUMINANCE||j===L.ALPHA)&&(N===L.LUMINANCE||N===L.ALPHA)&&(j=N),j!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var it=B.size,ut=k.indexOf(D)<0;if(ut&&k.push(D),Y===I&&et)B.offset===0&&B.data.length===it?ut?L.texImage2D(L.TEXTURE_2D,D,N,H[0],H[1],0,N,I,B.data):L.texSubImage2D(L.TEXTURE_2D,D,M,z,H[0],H[1],N,I,B.data):ut?L.texImage2D(L.TEXTURE_2D,D,N,H[0],H[1],0,N,I,B.data.subarray(B.offset,B.offset+it)):L.texSubImage2D(L.TEXTURE_2D,D,M,z,H[0],H[1],N,I,B.data.subarray(B.offset,B.offset+it));else{var J;I===L.FLOAT?J=n.mallocFloat32(it):J=n.mallocUint8(it);var X=e(J,H,[H[2],H[2]*H[0],1]);Y===L.FLOAT&&I===L.UNSIGNED_BYTE?b(X,B):a.assign(X,B),ut?L.texImage2D(L.TEXTURE_2D,D,N,H[0],H[1],0,N,I,J.subarray(0,it)):L.texSubImage2D(L.TEXTURE_2D,D,M,z,H[0],H[1],N,I,J.subarray(0,it)),I===L.FLOAT?n.freeFloat32(J):n.freeUint8(J)}}function _(L){var M=L.createTexture();return L.bindTexture(L.TEXTURE_2D,M),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_MIN_FILTER,L.NEAREST),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_MAG_FILTER,L.NEAREST),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),M}function y(L,M,z,D,N){var I=L.getParameter(L.MAX_TEXTURE_SIZE);if(M<0||M>I||z<0||z>I)throw new Error("gl-texture2d: Invalid texture shape");if(N===L.FLOAT&&!L.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var k=_(L);return L.texImage2D(L.TEXTURE_2D,0,D,M,z,0,D,N,null),new o(L,k,M,z,D,N)}function E(L,M,z,D,N,I){var k=_(L);return L.texImage2D(L.TEXTURE_2D,0,N,N,I,M),new o(L,k,z,D,N,I)}function T(L,M){var z=M.dtype,D=M.shape.slice(),N=L.getParameter(L.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>N||D[1]<0||D[1]>N)throw new Error("gl-texture2d: Invalid texture size");var I=w(D,M.stride.slice()),k=0;z==="float32"?k=L.FLOAT:z==="float64"?(k=L.FLOAT,I=!1,z="float32"):z==="uint8"?k=L.UNSIGNED_BYTE:(k=L.UNSIGNED_BYTE,I=!1,z="uint8");var B=0;if(D.length===2)B=L.LUMINANCE,D=[D[0],D[1],1],M=e(M.data,D,[M.stride[0],M.stride[1],1],M.offset);else if(D.length===3)if(D[2]===1)B=L.ALPHA;else if(D[2]===2)B=L.LUMINANCE_ALPHA;else if(D[2]===3)B=L.RGB;else if(D[2]===4)B=L.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");k===L.FLOAT&&!L.getExtension("OES_texture_float")&&(k=L.UNSIGNED_BYTE,I=!1);var O,H,Y=M.size;if(I)M.offset===0&&M.data.length===Y?O=M.data:O=M.data.subarray(M.offset,M.offset+Y);else{var j=[D[2],D[2]*D[0],1];H=n.malloc(Y,z);var et=e(H,D,j,0);(z==="float32"||z==="float64")&&k===L.UNSIGNED_BYTE?b(et,M):a.assign(et,M),O=H.subarray(0,Y)}var it=_(L);return L.texImage2D(L.TEXTURE_2D,0,B,D[0],D[1],0,B,k,O),I||n.free(H),new o(L,it,D[0],D[1],B,k)}function s(L){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||m(L),typeof arguments[1]=="number")return y(L,arguments[1],arguments[2],arguments[3]||L.RGBA,arguments[4]||L.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return y(L,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||L.RGBA,arguments[3]||L.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var M=arguments[1],z=h(M)?M:M.raw;if(z)return E(L,z,M.width|0,M.height|0,arguments[2]||L.RGBA,arguments[3]||L.UNSIGNED_BYTE);if(M.shape&&M.data&&M.stride)return T(L,M)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},3056:function(v){function p(r,e,a){e?e.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var n=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(a){if(a.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f1?0:Math.acos(b)}},8827:function(v){v.exports=p;function p(r,e){return r[0]=Math.ceil(e[0]),r[1]=Math.ceil(e[1]),r[2]=Math.ceil(e[2]),r}},7622:function(v){v.exports=p;function p(r){var e=new Float32Array(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}},8782:function(v){v.exports=p;function p(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}},8501:function(v){v.exports=p;function p(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},903:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[0],m=a[1],h=a[2];return r[0]=f*h-c*m,r[1]=c*l-n*h,r[2]=n*m-f*l,r}},5981:function(v,p,r){v.exports=r(8288)},8288:function(v){v.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2];return Math.sqrt(a*a+n*n+f*f)}},8629:function(v,p,r){v.exports=r(7979)},7979:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]/a[0],r[1]=e[1]/a[1],r[2]=e[2]/a[2],r}},9305:function(v){v.exports=p;function p(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}},154:function(v){v.exports=1e-6},4932:function(v,p,r){v.exports=a;var e=r(154);function a(n,f){var c=n[0],l=n[1],m=n[2],h=f[0],b=f[1],u=f[2];return Math.abs(c-h)<=e*Math.max(1,Math.abs(c),Math.abs(h))&&Math.abs(l-b)<=e*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(m-u)<=e*Math.max(1,Math.abs(m),Math.abs(u))}},5777:function(v){v.exports=p;function p(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}},3306:function(v){v.exports=p;function p(r,e){return r[0]=Math.floor(e[0]),r[1]=Math.floor(e[1]),r[2]=Math.floor(e[2]),r}},7447:function(v,p,r){v.exports=a;var e=r(8501)();function a(n,f,c,l,m,h){var b,u;for(f||(f=3),c||(c=0),l?u=Math.min(l*f+c,n.length):u=n.length,b=c;b0&&(c=1/Math.sqrt(c),r[0]=e[0]*c,r[1]=e[1]*c,r[2]=e[2]*c),r}},6660:function(v){v.exports=p;function p(r,e){e=e||1;var a=Math.random()*2*Math.PI,n=Math.random()*2-1,f=Math.sqrt(1-n*n)*e;return r[0]=Math.cos(a)*f,r[1]=Math.sin(a)*f,r[2]=n*e,r}},392:function(v){v.exports=p;function p(r,e,a,n){var f=a[1],c=a[2],l=e[1]-f,m=e[2]-c,h=Math.sin(n),b=Math.cos(n);return r[0]=e[0],r[1]=f+l*b-m*h,r[2]=c+l*h+m*b,r}},3222:function(v){v.exports=p;function p(r,e,a,n){var f=a[0],c=a[2],l=e[0]-f,m=e[2]-c,h=Math.sin(n),b=Math.cos(n);return r[0]=f+m*h+l*b,r[1]=e[1],r[2]=c+m*b-l*h,r}},3388:function(v){v.exports=p;function p(r,e,a,n){var f=a[0],c=a[1],l=e[0]-f,m=e[1]-c,h=Math.sin(n),b=Math.cos(n);return r[0]=f+l*b-m*h,r[1]=c+l*h+m*b,r[2]=e[2],r}},1624:function(v){v.exports=p;function p(r,e){return r[0]=Math.round(e[0]),r[1]=Math.round(e[1]),r[2]=Math.round(e[2]),r}},5685:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]*a,r[1]=e[1]*a,r[2]=e[2]*a,r}},6722:function(v){v.exports=p;function p(r,e,a,n){return r[0]=e[0]+a[0]*n,r[1]=e[1]+a[1]*n,r[2]=e[2]+a[2]*n,r}},831:function(v){v.exports=p;function p(r,e,a,n){return r[0]=e,r[1]=a,r[2]=n,r}},5294:function(v,p,r){v.exports=r(6403)},3303:function(v,p,r){v.exports=r(4337)},6403:function(v){v.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2];return a*a+n*n+f*f}},4337:function(v){v.exports=p;function p(r){var e=r[0],a=r[1],n=r[2];return e*e+a*a+n*n}},8921:function(v,p,r){v.exports=r(911)},911:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]-a[0],r[1]=e[1]-a[1],r[2]=e[2]-a[2],r}},9908:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2];return r[0]=n*a[0]+f*a[3]+c*a[6],r[1]=n*a[1]+f*a[4]+c*a[7],r[2]=n*a[2]+f*a[5]+c*a[8],r}},3255:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[3]*n+a[7]*f+a[11]*c+a[15];return l=l||1,r[0]=(a[0]*n+a[4]*f+a[8]*c+a[12])/l,r[1]=(a[1]*n+a[5]*f+a[9]*c+a[13])/l,r[2]=(a[2]*n+a[6]*f+a[10]*c+a[14])/l,r}},6568:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[0],m=a[1],h=a[2],b=a[3],u=b*n+m*c-h*f,o=b*f+h*n-l*c,d=b*c+l*f-m*n,w=-l*n-m*f-h*c;return r[0]=u*b+w*-l+o*-h-d*-m,r[1]=o*b+w*-m+d*-l-u*-h,r[2]=d*b+w*-h+u*-m-o*-l,r}},3433:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]+a[0],r[1]=e[1]+a[1],r[2]=e[2]+a[2],r[3]=e[3]+a[3],r}},1413:function(v){v.exports=p;function p(r){var e=new Float32Array(4);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e}},3470:function(v){v.exports=p;function p(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}},5313:function(v){v.exports=p;function p(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},5446:function(v){v.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2],c=e[3]-r[3];return Math.sqrt(a*a+n*n+f*f+c*c)}},205:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]/a[0],r[1]=e[1]/a[1],r[2]=e[2]/a[2],r[3]=e[3]/a[3],r}},4242:function(v){v.exports=p;function p(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]}},5680:function(v){v.exports=p;function p(r,e,a,n){var f=new Float32Array(4);return f[0]=r,f[1]=e,f[2]=a,f[3]=n,f}},4020:function(v,p,r){v.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(v){v.exports=p;function p(r,e){return r[0]=1/e[0],r[1]=1/e[1],r[2]=1/e[2],r[3]=1/e[3],r}},8177:function(v){v.exports=p;function p(r){var e=r[0],a=r[1],n=r[2],f=r[3];return Math.sqrt(e*e+a*a+n*n+f*f)}},8746:function(v){v.exports=p;function p(r,e,a,n){var f=e[0],c=e[1],l=e[2],m=e[3];return r[0]=f+n*(a[0]-f),r[1]=c+n*(a[1]-c),r[2]=l+n*(a[2]-l),r[3]=m+n*(a[3]-m),r}},3030:function(v){v.exports=p;function p(r,e,a){return r[0]=Math.max(e[0],a[0]),r[1]=Math.max(e[1],a[1]),r[2]=Math.max(e[2],a[2]),r[3]=Math.max(e[3],a[3]),r}},2170:function(v){v.exports=p;function p(r,e,a){return r[0]=Math.min(e[0],a[0]),r[1]=Math.min(e[1],a[1]),r[2]=Math.min(e[2],a[2]),r[3]=Math.min(e[3],a[3]),r}},746:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]*a[0],r[1]=e[1]*a[1],r[2]=e[2]*a[2],r[3]=e[3]*a[3],r}},6459:function(v){v.exports=p;function p(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r[3]=-e[3],r}},381:function(v){v.exports=p;function p(r,e){var a=e[0],n=e[1],f=e[2],c=e[3],l=a*a+n*n+f*f+c*c;return l>0&&(l=1/Math.sqrt(l),r[0]=a*l,r[1]=n*l,r[2]=f*l,r[3]=c*l),r}},3770:function(v,p,r){var e=r(381),a=r(5510);v.exports=n;function n(f,c){return c=c||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),e(f,f),a(f,f,c),f}},5510:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]*a,r[1]=e[1]*a,r[2]=e[2]*a,r[3]=e[3]*a,r}},4224:function(v){v.exports=p;function p(r,e,a,n){return r[0]=e[0]+a[0]*n,r[1]=e[1]+a[1]*n,r[2]=e[2]+a[2]*n,r[3]=e[3]+a[3]*n,r}},6453:function(v){v.exports=p;function p(r,e,a,n,f){return r[0]=e,r[1]=a,r[2]=n,r[3]=f,r}},1542:function(v){v.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2],c=e[3]-r[3];return a*a+n*n+f*f+c*c}},9037:function(v){v.exports=p;function p(r){var e=r[0],a=r[1],n=r[2],f=r[3];return e*e+a*a+n*n+f*f}},2705:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]-a[0],r[1]=e[1]-a[1],r[2]=e[2]-a[2],r[3]=e[3]-a[3],r}},6342:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=e[3];return r[0]=a[0]*n+a[4]*f+a[8]*c+a[12]*l,r[1]=a[1]*n+a[5]*f+a[9]*c+a[13]*l,r[2]=a[2]*n+a[6]*f+a[10]*c+a[14]*l,r[3]=a[3]*n+a[7]*f+a[11]*c+a[15]*l,r}},5022:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[0],m=a[1],h=a[2],b=a[3],u=b*n+m*c-h*f,o=b*f+h*n-l*c,d=b*c+l*f-m*n,w=-l*n-m*f-h*c;return r[0]=u*b+w*-l+o*-h-d*-m,r[1]=o*b+w*-m+d*-l-u*-h,r[2]=d*b+w*-h+u*-m-o*-l,r[3]=e[3],r}},9365:function(v,p,r){var e=r(8096),a=r(7896);v.exports=n;function n(f){for(var c=Array.isArray(f)?f:e(f),l=0;l0)continue;It=Ut.slice(0,1).join("")}return $(It),et+=It.length,O=O.slice(It.length),O.length}while(!0)}function At(){return/[^a-fA-F0-9]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function mt(){return k==="."||/[eE]/.test(k)?(O.push(k),I=w,B=k,D+1):k==="x"&&O.length===1&&O[0]==="0"?(I=s,O.push(k),B=k,D+1):/[^\d]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function Lt(){return k==="f"&&(O.push(k),B=k,D+=1),/[eE]/.test(k)||(k==="-"||k==="+")&&/[eE]/.test(B)?(O.push(k),B=k,D+1):/[^\d]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function Ht(){if(/[^\d\w_]/.test(k)){var Ut=O.join("");return ot[Ut]?I=y:Q[Ut]?I=_:I=A,$(O.join("")),I=l,D}return O.push(k),B=k,D+1}}},3585:function(v,p,r){var e=r(9525);e=e.slice().filter(function(a){return!/^(gl\_|texture)/.test(a)}),v.exports=e.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},9525:function(v){v.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},9458:function(v,p,r){var e=r(399);v.exports=e.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},399:function(v){v.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},9746:function(v){v.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(v,p,r){var e=r(3193);v.exports=a;function a(n,f){var c=e(f),l=[];return l=l.concat(c(n)),l=l.concat(c(null)),l}},6832:function(v){v.exports=function(p){typeof p=="string"&&(p=[p]);for(var r=[].slice.call(arguments,1),e=[],a=0;a0;){d=T.pop();for(var s=d.adjacent,L=0;L<=A;++L){var M=s[L];if(!(!M.boundary||M.lastVisited<=-_)){for(var z=M.vertices,D=0;D<=A;++D){var N=z[D];N<0?y[D]=w:y[D]=E[N]}var I=this.orient();if(I>0)return M;M.lastVisited=-_,I===0&&T.push(M)}}}return null},u.walk=function(d,w){var A=this.vertices.length-1,_=this.dimension,y=this.vertices,E=this.tuple,T=w?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[T];t:for(;!s.boundary;){for(var L=s.vertices,M=s.adjacent,z=0;z<=_;++z)E[z]=y[L[z]];s.lastVisited=A;for(var z=0;z<=_;++z){var D=M[z];if(!(D.lastVisited>=A)){var N=E[z];E[z]=d;var I=this.orient();if(E[z]=N,I<0){s=D;continue t}else D.boundary?D.lastVisited=-A:D.lastVisited=A}}return}return s},u.addPeaks=function(d,w){var A=this.vertices.length-1,_=this.dimension,y=this.vertices,E=this.tuple,T=this.interior,s=this.simplices,L=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,T.push(w);for(var M=[];L.length>0;){var w=L.pop(),z=w.vertices,D=w.adjacent,N=z.indexOf(A);if(!(N<0)){for(var I=0;I<=_;++I)if(I!==N){var k=D[I];if(!(!k.boundary||k.lastVisited>=A)){var B=k.vertices;if(k.lastVisited!==-A){for(var O=0,H=0;H<=_;++H)B[H]<0?(O=H,E[H]=d):E[H]=y[B[H]];var Y=this.orient();if(Y>0){B[O]=A,k.boundary=!1,T.push(k),L.push(k),k.lastVisited=A;continue}else k.lastVisited=-A}var j=k.adjacent,et=z.slice(),it=D.slice(),ut=new n(et,it,!0);s.push(ut);var J=j.indexOf(w);if(!(J<0)){j[J]=ut,it[N]=k,et[I]=-1,it[I]=w,D[I]=ut,ut.flip();for(var H=0;H<=_;++H){var X=et[H];if(!(X<0||X===A)){for(var tt=new Array(_-1),V=0,Q=0;Q<=_;++Q){var ot=et[Q];ot<0||Q===H||(tt[V++]=ot)}M.push(new f(tt,ut,H))}}}}}}}M.sort(c);for(var I=0;I+1=0?T[L++]=s[z]:M=z&1;if(M===(d&1)){var D=T[0];T[0]=T[1],T[1]=D}w.push(T)}}return w};function o(d,w){var A=d.length;if(A===0)throw new Error("Must have at least d+1 points");var _=d[0].length;if(A<=_)throw new Error("Must input at least d+1 points");var y=d.slice(0,_+1),E=e.apply(void 0,y);if(E===0)throw new Error("Input not in general position");for(var T=new Array(_+1),s=0;s<=_;++s)T[s]=s;E<0&&(T[0]=1,T[1]=0);for(var L=new n(T,new Array(_+1),!1),M=L.adjacent,z=new Array(_+2),s=0;s<=_;++s){for(var D=T.slice(),N=0;N<=_;++N)N===s&&(D[N]=-1);var I=D[0];D[0]=D[1],D[1]=I;var k=new n(D,new Array(_+1),!0);M[s]=k,z[s]=k}z[_+1]=L;for(var s=0;s<=_;++s)for(var D=M[s].vertices,B=M[s].adjacent,N=0;N<=_;++N){var O=D[N];if(O<0){B[N]=L;continue}for(var H=0;H<=_;++H)M[H].vertices.indexOf(O)<0&&(B[N]=M[H])}for(var Y=new b(_,y,z),j=!!w,s=_+1;s3*(z+1)?b(this,M):this.left.insert(M):this.left=E([M]);else if(M[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?b(this,M):this.right.insert(M):this.right=E([M]);else{var D=e.ge(this.leftPoints,M,_),N=e.ge(this.rightPoints,M,y);this.leftPoints.splice(D,0,M),this.rightPoints.splice(N,0,M)}},l.remove=function(M){var z=this.count-this.leftPoints;if(M[1]3*(z-1))return u(this,M);var N=this.left.remove(M);return N===f?(this.left=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else if(M[0]>this.mid){if(!this.right)return a;var I=this.left?this.left.count:0;if(4*I>3*(z-1))return u(this,M);var N=this.right.remove(M);return N===f?(this.right=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else{if(this.count===1)return this.leftPoints[0]===M?f:a;if(this.leftPoints.length===1&&this.leftPoints[0]===M){if(this.left&&this.right){for(var k=this,B=this.left;B.right;)k=B,B=B.right;if(k===this)B.right=this.right;else{var O=this.left,N=this.right;k.count-=B.count,k.right=B.left,B.left=O,B.right=N}m(this,B),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return n}for(var O=e.ge(this.leftPoints,M,_);O=0&&M[N][1]>=z;--N){var I=D(M[N]);if(I)return I}}function w(M,z){for(var D=0;Dthis.mid){if(this.right){var D=this.right.queryPoint(M,z);if(D)return D}return d(this.rightPoints,M,z)}else return w(this.leftPoints,z)},l.queryInterval=function(M,z,D){if(Mthis.mid&&this.right){var N=this.right.queryInterval(M,z,D);if(N)return N}return zthis.mid?d(this.rightPoints,M,D):w(this.leftPoints,D)};function A(M,z){return M-z}function _(M,z){var D=M[0]-z[0];return D||M[1]-z[1]}function y(M,z){var D=M[1]-z[1];return D||M[0]-z[0]}function E(M){if(M.length===0)return null;for(var z=[],D=0;D>1],I=[],k=[],B=[],D=0;D$&&st>0){var nt=(Z[st][0]-$)/(Z[st][0]-Z[st-1][0]);return Z[st][1]*(1-nt)+nt*Z[st-1][1]}}return 1}var H=[0,0,0],Y={showSurface:!1,showContour:!1,projections:[M.slice(),M.slice(),M.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function j($,Z){var st,nt,ct,gt=Z.axes&&Z.axes.lastCubeProps.axis||H,Tt=Z.showSurface,wt=Z.showContour;for(st=0;st<3;++st)for(Tt=Tt||Z.surfaceProject[st],nt=0;nt<3;++nt)wt=wt||Z.contourProject[st][nt];for(st=0;st<3;++st){var Rt=Y.projections[st];for(nt=0;nt<16;++nt)Rt[nt]=0;for(nt=0;nt<4;++nt)Rt[5*nt]=1;Rt[5*st]=0,Rt[12+st]=Z.axesBounds[+(gt[st]>0)][st],o(Rt,$.model,Rt);var bt=Y.clipBounds[st];for(ct=0;ct<2;++ct)for(nt=0;nt<3;++nt)bt[ct][nt]=$.clipBounds[ct][nt];bt[0][st]=-1e8,bt[1][st]=1e8}return Y.showSurface=Tt,Y.showContour=wt,Y}var et={model:M,view:M,projection:M,inverseModel:M.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},it=M.slice(),ut=[1,0,0,0,1,0,0,0,1];function J($,Z){$=$||{};var st=this.gl;st.disable(st.CULL_FACE),this._colorMap.bind(0);var nt=et;nt.model=$.model||M,nt.view=$.view||M,nt.projection=$.projection||M,nt.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],nt.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],nt.objectOffset=this.objectOffset,nt.contourColor=this.contourColor[0],nt.inverseModel=d(nt.inverseModel,nt.model);for(var ct=0;ct<2;++ct)for(var gt=nt.clipBounds[ct],Tt=0;Tt<3;++Tt)gt[Tt]=Math.min(Math.max(this.clipBounds[ct][Tt],-1e8),1e8);nt.kambient=this.ambientLight,nt.kdiffuse=this.diffuseLight,nt.kspecular=this.specularLight,nt.roughness=this.roughness,nt.fresnel=this.fresnel,nt.opacity=this.opacity,nt.height=0,nt.permutation=ut,nt.vertexColor=this.vertexColor;var wt=it;for(o(wt,nt.view,nt.model),o(wt,nt.projection,wt),d(wt,wt),ct=0;ct<3;++ct)nt.eyePosition[ct]=wt[12+ct]/wt[15];var Rt=wt[15];for(ct=0;ct<3;++ct)Rt+=this.lightPosition[ct]*wt[4*ct+3];for(ct=0;ct<3;++ct){var bt=wt[12+ct];for(Tt=0;Tt<3;++Tt)bt+=wt[4*Tt+ct]*this.lightPosition[Tt];nt.lightPosition[ct]=bt/Rt}var At=j(nt,this);if(At.showSurface){for(this._shader.bind(),this._shader.uniforms=nt,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(st.TRIANGLES,this._vertexCount),ct=0;ct<3;++ct)!this.surfaceProject[ct]||!this.vertexCount||(this._shader.uniforms.model=At.projections[ct],this._shader.uniforms.clipBounds=At.clipBounds[ct],this._vao.draw(st.TRIANGLES,this._vertexCount));this._vao.unbind()}if(At.showContour){var mt=this._contourShader;nt.kambient=1,nt.kdiffuse=0,nt.kspecular=0,nt.opacity=1,mt.bind(),mt.uniforms=nt;var Lt=this._contourVAO;for(Lt.bind(),ct=0;ct<3;++ct)for(mt.uniforms.permutation=D[ct],st.lineWidth(this.contourWidth[ct]*this.pixelRatio),Tt=0;Tt>4)/16)/255,ct=Math.floor(nt),gt=nt-ct,Tt=Z[1]*($.value[1]+($.value[2]&15)/16)/255,wt=Math.floor(Tt),Rt=Tt-wt;ct+=1,wt+=1;var bt=st.position;bt[0]=bt[1]=bt[2]=0;for(var At=0;At<2;++At)for(var mt=At?gt:1-gt,Lt=0;Lt<2;++Lt)for(var Ht=Lt?Rt:1-Rt,Ut=ct+At,kt=wt+Lt,Vt=mt*Ht,It=0;It<3;++It)bt[It]+=this._field[It].get(Ut,kt)*Vt;for(var re=this._pickResult.level,Kt=0;Kt<3;++Kt)if(re[Kt]=w.le(this.contourLevels[Kt],bt[Kt]),re[Kt]<0)this.contourLevels[Kt].length>0&&(re[Kt]=0);else if(re[Kt]Math.abs(le-bt[Kt])&&(re[Kt]+=1)}for(st.index[0]=gt<.5?ct:ct+1,st.index[1]=Rt<.5?wt:wt+1,st.uv[0]=nt/Z[0],st.uv[1]=Tt/Z[1],It=0;It<3;++It)st.dataCoordinate[It]=this._field[It].get(st.index[0],st.index[1]);return st},B.padField=function($,Z){var st=Z.shape.slice(),nt=$.shape.slice();m.assign($.lo(1,1).hi(st[0],st[1]),Z),m.assign($.lo(1).hi(st[0],1),Z.hi(st[0],1)),m.assign($.lo(1,nt[1]-1).hi(st[0],1),Z.lo(0,st[1]-1).hi(st[0],1)),m.assign($.lo(0,1).hi(1,st[1]),Z.hi(1)),m.assign($.lo(nt[0]-1,1).hi(1,st[1]),Z.lo(st[0]-1)),$.set(0,0,Z.get(0,0)),$.set(0,nt[1]-1,Z.get(0,st[1]-1)),$.set(nt[0]-1,0,Z.get(st[0]-1,0)),$.set(nt[0]-1,nt[1]-1,Z.get(st[0]-1,st[1]-1))};function tt($,Z){return Array.isArray($)?[Z($[0]),Z($[1]),Z($[2])]:[Z($),Z($),Z($)]}function V($){return Array.isArray($)?$.length===3?[$[0],$[1],$[2],1]:[$[0],$[1],$[2],$[3]]:[0,0,0,1]}function Q($){if(Array.isArray($)){if(Array.isArray($))return[V($[0]),V($[1]),V($[2])];var Z=V($);return[Z.slice(),Z.slice(),Z.slice()]}}B.update=function($){$=$||{},this.objectOffset=$.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in $&&(this.contourWidth=tt($.contourWidth,Number)),"showContour"in $&&(this.showContour=tt($.showContour,Boolean)),"showSurface"in $&&(this.showSurface=!!$.showSurface),"contourTint"in $&&(this.contourTint=tt($.contourTint,Boolean)),"contourColor"in $&&(this.contourColor=Q($.contourColor)),"contourProject"in $&&(this.contourProject=tt($.contourProject,function(Oe){return tt(Oe,Boolean)})),"surfaceProject"in $&&(this.surfaceProject=$.surfaceProject),"dynamicColor"in $&&(this.dynamicColor=Q($.dynamicColor)),"dynamicTint"in $&&(this.dynamicTint=tt($.dynamicTint,Number)),"dynamicWidth"in $&&(this.dynamicWidth=tt($.dynamicWidth,Number)),"opacity"in $&&(this.opacity=$.opacity),"opacityscale"in $&&(this.opacityscale=$.opacityscale),"colorBounds"in $&&(this.colorBounds=$.colorBounds),"vertexColor"in $&&(this.vertexColor=$.vertexColor?1:0),"colormap"in $&&this._colorMap.setPixels(this.genColormap($.colormap,this.opacityscale));var Z=$.field||$.coords&&$.coords[2]||null,st=!1;if(Z||(this._field[2].shape[0]||this._field[2].shape[2]?Z=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Z=this._field[2].hi(0,0)),"field"in $||"coords"in $){var nt=(Z.shape[0]+2)*(Z.shape[1]+2);nt>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(e.nextPow2(nt))),this._field[2]=b(this._field[2].data,[Z.shape[0]+2,Z.shape[1]+2]),this.padField(this._field[2],Z),this.shape=Z.shape.slice();for(var ct=this.shape,gt=0;gt<2;++gt)this._field[2].size>this._field[gt].data.length&&(c.freeFloat(this._field[gt].data),this._field[gt].data=c.mallocFloat(this._field[2].size)),this._field[gt]=b(this._field[gt].data,[ct[0]+2,ct[1]+2]);if($.coords){var Tt=$.coords;if(!Array.isArray(Tt)||Tt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(gt=0;gt<2;++gt){var wt=Tt[gt];for(Lt=0;Lt<2;++Lt)if(wt.shape[Lt]!==ct[Lt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[gt],wt)}}else if($.ticks){var Rt=$.ticks;if(!Array.isArray(Rt)||Rt.length!==2)throw new Error("gl-surface: invalid ticks");for(gt=0;gt<2;++gt){var bt=Rt[gt];if((Array.isArray(bt)||bt.length)&&(bt=b(bt)),bt.shape[0]!==ct[gt])throw new Error("gl-surface: invalid tick length");var At=b(bt.data,ct);At.stride[gt]=bt.stride[0],At.stride[gt^1]=0,this.padField(this._field[gt],At)}}else{for(gt=0;gt<2;++gt){var mt=[0,0];mt[gt]=1,this._field[gt]=b(this._field[gt].data,[ct[0]+2,ct[1]+2],mt,0)}this._field[0].set(0,0,0);for(var Lt=0;Lt0){for(var Gt=0;Gt<5;++Gt)Te.pop();yt-=1}continue t}}}Xe.push(yt)}this._contourOffsets[Be]=pe,this._contourCounts[Be]=Xe}var Ne=c.mallocFloat(Te.length);for(gt=0;gtN||z<0||z>N)throw new Error("gl-texture2d: Invalid texture size");return L._shape=[M,z],L.bind(),D.texImage2D(D.TEXTURE_2D,0,L.format,M,z,0,L.format,L.type,null),L._mipLevels=[0],L}function o(L,M,z,D,N,I){this.gl=L,this.handle=M,this.format=N,this.type=I,this._shape=[z,D],this._mipLevels=[0],this._magFilter=L.NEAREST,this._minFilter=L.NEAREST,this._wrapS=L.CLAMP_TO_EDGE,this._wrapT=L.CLAMP_TO_EDGE,this._anisoSamples=1;var k=this,B=[this._wrapS,this._wrapT];Object.defineProperties(B,[{get:function(){return k._wrapS},set:function(H){return k.wrapS=H}},{get:function(){return k._wrapT},set:function(H){return k.wrapT=H}}]),this._wrapVector=B;var O=[this._shape[0],this._shape[1]];Object.defineProperties(O,[{get:function(){return k._shape[0]},set:function(H){return k.width=H}},{get:function(){return k._shape[1]},set:function(H){return k.height=H}}]),this._shapeVector=O}var d=o.prototype;Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(L){this.bind();var M=this.gl;if(this.type===M.FLOAT&&f.indexOf(L)>=0&&(M.getExtension("OES_texture_float_linear")||(L=M.NEAREST)),c.indexOf(L)<0)throw new Error("gl-texture2d: Unknown filter mode "+L);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,L),this._minFilter=L}},magFilter:{get:function(){return this._magFilter},set:function(L){this.bind();var M=this.gl;if(this.type===M.FLOAT&&f.indexOf(L)>=0&&(M.getExtension("OES_texture_float_linear")||(L=M.NEAREST)),c.indexOf(L)<0)throw new Error("gl-texture2d: Unknown filter mode "+L);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,L),this._magFilter=L}},mipSamples:{get:function(){return this._anisoSamples},set:function(L){var M=this._anisoSamples;if(this._anisoSamples=Math.max(L,1)|0,M!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(L){if(this.bind(),l.indexOf(L)<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,L),this._wrapS=L}},wrapT:{get:function(){return this._wrapT},set:function(L){if(this.bind(),l.indexOf(L)<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,L),this._wrapT=L}},wrap:{get:function(){return this._wrapVector},set:function(L){if(Array.isArray(L)||(L=[L,L]),L.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var M=0;M<2;++M)if(l.indexOf(L[M])<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);this._wrapS=L[0],this._wrapT=L[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),L}},shape:{get:function(){return this._shapeVector},set:function(L){if(!Array.isArray(L))L=[L|0,L|0];else if(L.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return u(this,L[0]|0,L[1]|0),[L[0]|0,L[1]|0]}},width:{get:function(){return this._shape[0]},set:function(L){return L=L|0,u(this,L,this._shape[1]),L}},height:{get:function(){return this._shape[1]},set:function(L){return L=L|0,u(this,this._shape[0],L),L}}}),d.bind=function(L){var M=this.gl;return L!==void 0&&M.activeTexture(M.TEXTURE0+(L|0)),M.bindTexture(M.TEXTURE_2D,this.handle),L!==void 0?L|0:M.getParameter(M.ACTIVE_TEXTURE)-M.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var L=Math.min(this._shape[0],this._shape[1]),M=0;L>0;++M,L>>>=1)this._mipLevels.indexOf(M)<0&&this._mipLevels.push(M)},d.setPixels=function(L,M,z,D){var N=this.gl;this.bind(),Array.isArray(M)?(D=z,z=M[1]|0,M=M[0]|0):(M=M||0,z=z||0),D=D||0;var I=v(L)?L:L.raw;if(I){var k=this._mipLevels.indexOf(D)<0;k?(N.texImage2D(N.TEXTURE_2D,0,this.format,this.format,this.type,I),this._mipLevels.push(D)):N.texSubImage2D(N.TEXTURE_2D,D,M,z,this.format,this.type,I)}else if(L.shape&&L.stride&&L.data){if(L.shape.length<2||M+L.shape[1]>this._shape[1]>>>D||z+L.shape[0]>this._shape[0]>>>D||M<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(N,M,z,D,this.format,this.type,this._mipLevels,L)}else throw new Error("gl-texture2d: Unsupported data type")};function w(L,M){return L.length===3?M[2]===1&&M[1]===L[0]*L[2]&&M[0]===L[2]:M[0]===1&&M[1]===L[0]}function A(L,M,z,D,N,I,k,B){var O=B.dtype,H=B.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var Y=0,j=0,et=w(H,B.stride.slice());if(O==="float32"?Y=L.FLOAT:O==="float64"?(Y=L.FLOAT,et=!1,O="float32"):O==="uint8"?Y=L.UNSIGNED_BYTE:(Y=L.UNSIGNED_BYTE,et=!1,O="uint8"),H.length===2)j=L.LUMINANCE,H=[H[0],H[1],1],B=e(B.data,H,[B.stride[0],B.stride[1],1],B.offset);else if(H.length===3){if(H[2]===1)j=L.ALPHA;else if(H[2]===2)j=L.LUMINANCE_ALPHA;else if(H[2]===3)j=L.RGB;else if(H[2]===4)j=L.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((j===L.LUMINANCE||j===L.ALPHA)&&(N===L.LUMINANCE||N===L.ALPHA)&&(j=N),j!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var it=B.size,ut=k.indexOf(D)<0;if(ut&&k.push(D),Y===I&&et)B.offset===0&&B.data.length===it?ut?L.texImage2D(L.TEXTURE_2D,D,N,H[0],H[1],0,N,I,B.data):L.texSubImage2D(L.TEXTURE_2D,D,M,z,H[0],H[1],N,I,B.data):ut?L.texImage2D(L.TEXTURE_2D,D,N,H[0],H[1],0,N,I,B.data.subarray(B.offset,B.offset+it)):L.texSubImage2D(L.TEXTURE_2D,D,M,z,H[0],H[1],N,I,B.data.subarray(B.offset,B.offset+it));else{var J;I===L.FLOAT?J=n.mallocFloat32(it):J=n.mallocUint8(it);var X=e(J,H,[H[2],H[2]*H[0],1]);Y===L.FLOAT&&I===L.UNSIGNED_BYTE?b(X,B):a.assign(X,B),ut?L.texImage2D(L.TEXTURE_2D,D,N,H[0],H[1],0,N,I,J.subarray(0,it)):L.texSubImage2D(L.TEXTURE_2D,D,M,z,H[0],H[1],N,I,J.subarray(0,it)),I===L.FLOAT?n.freeFloat32(J):n.freeUint8(J)}}function _(L){var M=L.createTexture();return L.bindTexture(L.TEXTURE_2D,M),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_MIN_FILTER,L.NEAREST),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_MAG_FILTER,L.NEAREST),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),M}function y(L,M,z,D,N){var I=L.getParameter(L.MAX_TEXTURE_SIZE);if(M<0||M>I||z<0||z>I)throw new Error("gl-texture2d: Invalid texture shape");if(N===L.FLOAT&&!L.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var k=_(L);return L.texImage2D(L.TEXTURE_2D,0,D,M,z,0,D,N,null),new o(L,k,M,z,D,N)}function E(L,M,z,D,N,I){var k=_(L);return L.texImage2D(L.TEXTURE_2D,0,N,N,I,M),new o(L,k,z,D,N,I)}function T(L,M){var z=M.dtype,D=M.shape.slice(),N=L.getParameter(L.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>N||D[1]<0||D[1]>N)throw new Error("gl-texture2d: Invalid texture size");var I=w(D,M.stride.slice()),k=0;z==="float32"?k=L.FLOAT:z==="float64"?(k=L.FLOAT,I=!1,z="float32"):z==="uint8"?k=L.UNSIGNED_BYTE:(k=L.UNSIGNED_BYTE,I=!1,z="uint8");var B=0;if(D.length===2)B=L.LUMINANCE,D=[D[0],D[1],1],M=e(M.data,D,[M.stride[0],M.stride[1],1],M.offset);else if(D.length===3)if(D[2]===1)B=L.ALPHA;else if(D[2]===2)B=L.LUMINANCE_ALPHA;else if(D[2]===3)B=L.RGB;else if(D[2]===4)B=L.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");k===L.FLOAT&&!L.getExtension("OES_texture_float")&&(k=L.UNSIGNED_BYTE,I=!1);var O,H,Y=M.size;if(I)M.offset===0&&M.data.length===Y?O=M.data:O=M.data.subarray(M.offset,M.offset+Y);else{var j=[D[2],D[2]*D[0],1];H=n.malloc(Y,z);var et=e(H,D,j,0);(z==="float32"||z==="float64")&&k===L.UNSIGNED_BYTE?b(et,M):a.assign(et,M),O=H.subarray(0,Y)}var it=_(L);return L.texImage2D(L.TEXTURE_2D,0,B,D[0],D[1],0,B,k,O),I||n.free(H),new o(L,it,D[0],D[1],B,k)}function s(L){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||m(L),typeof arguments[1]=="number")return y(L,arguments[1],arguments[2],arguments[3]||L.RGBA,arguments[4]||L.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return y(L,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||L.RGBA,arguments[3]||L.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var M=arguments[1],z=v(M)?M:M.raw;if(z)return E(L,z,M.width|0,M.height|0,arguments[2]||L.RGBA,arguments[3]||L.UNSIGNED_BYTE);if(M.shape&&M.data&&M.stride)return T(L,M)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},3056:function(h){function p(r,e,a){e?e.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var n=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(a){if(a.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f1?0:Math.acos(b)}},8827:function(h){h.exports=p;function p(r,e){return r[0]=Math.ceil(e[0]),r[1]=Math.ceil(e[1]),r[2]=Math.ceil(e[2]),r}},7622:function(h){h.exports=p;function p(r){var e=new Float32Array(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}},8782:function(h){h.exports=p;function p(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}},8501:function(h){h.exports=p;function p(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},903:function(h){h.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[0],m=a[1],v=a[2];return r[0]=f*v-c*m,r[1]=c*l-n*v,r[2]=n*m-f*l,r}},5981:function(h,p,r){h.exports=r(8288)},8288:function(h){h.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2];return Math.sqrt(a*a+n*n+f*f)}},8629:function(h,p,r){h.exports=r(7979)},7979:function(h){h.exports=p;function p(r,e,a){return r[0]=e[0]/a[0],r[1]=e[1]/a[1],r[2]=e[2]/a[2],r}},9305:function(h){h.exports=p;function p(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}},154:function(h){h.exports=1e-6},4932:function(h,p,r){h.exports=a;var e=r(154);function a(n,f){var c=n[0],l=n[1],m=n[2],v=f[0],b=f[1],u=f[2];return Math.abs(c-v)<=e*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(l-b)<=e*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(m-u)<=e*Math.max(1,Math.abs(m),Math.abs(u))}},5777:function(h){h.exports=p;function p(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}},3306:function(h){h.exports=p;function p(r,e){return r[0]=Math.floor(e[0]),r[1]=Math.floor(e[1]),r[2]=Math.floor(e[2]),r}},7447:function(h,p,r){h.exports=a;var e=r(8501)();function a(n,f,c,l,m,v){var b,u;for(f||(f=3),c||(c=0),l?u=Math.min(l*f+c,n.length):u=n.length,b=c;b0&&(c=1/Math.sqrt(c),r[0]=e[0]*c,r[1]=e[1]*c,r[2]=e[2]*c),r}},6660:function(h){h.exports=p;function p(r,e){e=e||1;var a=Math.random()*2*Math.PI,n=Math.random()*2-1,f=Math.sqrt(1-n*n)*e;return r[0]=Math.cos(a)*f,r[1]=Math.sin(a)*f,r[2]=n*e,r}},392:function(h){h.exports=p;function p(r,e,a,n){var f=a[1],c=a[2],l=e[1]-f,m=e[2]-c,v=Math.sin(n),b=Math.cos(n);return r[0]=e[0],r[1]=f+l*b-m*v,r[2]=c+l*v+m*b,r}},3222:function(h){h.exports=p;function p(r,e,a,n){var f=a[0],c=a[2],l=e[0]-f,m=e[2]-c,v=Math.sin(n),b=Math.cos(n);return r[0]=f+m*v+l*b,r[1]=e[1],r[2]=c+m*b-l*v,r}},3388:function(h){h.exports=p;function p(r,e,a,n){var f=a[0],c=a[1],l=e[0]-f,m=e[1]-c,v=Math.sin(n),b=Math.cos(n);return r[0]=f+l*b-m*v,r[1]=c+l*v+m*b,r[2]=e[2],r}},1624:function(h){h.exports=p;function p(r,e){return r[0]=Math.round(e[0]),r[1]=Math.round(e[1]),r[2]=Math.round(e[2]),r}},5685:function(h){h.exports=p;function p(r,e,a){return r[0]=e[0]*a,r[1]=e[1]*a,r[2]=e[2]*a,r}},6722:function(h){h.exports=p;function p(r,e,a,n){return r[0]=e[0]+a[0]*n,r[1]=e[1]+a[1]*n,r[2]=e[2]+a[2]*n,r}},831:function(h){h.exports=p;function p(r,e,a,n){return r[0]=e,r[1]=a,r[2]=n,r}},5294:function(h,p,r){h.exports=r(6403)},3303:function(h,p,r){h.exports=r(4337)},6403:function(h){h.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2];return a*a+n*n+f*f}},4337:function(h){h.exports=p;function p(r){var e=r[0],a=r[1],n=r[2];return e*e+a*a+n*n}},8921:function(h,p,r){h.exports=r(911)},911:function(h){h.exports=p;function p(r,e,a){return r[0]=e[0]-a[0],r[1]=e[1]-a[1],r[2]=e[2]-a[2],r}},9908:function(h){h.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2];return r[0]=n*a[0]+f*a[3]+c*a[6],r[1]=n*a[1]+f*a[4]+c*a[7],r[2]=n*a[2]+f*a[5]+c*a[8],r}},3255:function(h){h.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[3]*n+a[7]*f+a[11]*c+a[15];return l=l||1,r[0]=(a[0]*n+a[4]*f+a[8]*c+a[12])/l,r[1]=(a[1]*n+a[5]*f+a[9]*c+a[13])/l,r[2]=(a[2]*n+a[6]*f+a[10]*c+a[14])/l,r}},6568:function(h){h.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[0],m=a[1],v=a[2],b=a[3],u=b*n+m*c-v*f,o=b*f+v*n-l*c,d=b*c+l*f-m*n,w=-l*n-m*f-v*c;return r[0]=u*b+w*-l+o*-v-d*-m,r[1]=o*b+w*-m+d*-l-u*-v,r[2]=d*b+w*-v+u*-m-o*-l,r}},3433:function(h){h.exports=p;function p(r,e,a){return r[0]=e[0]+a[0],r[1]=e[1]+a[1],r[2]=e[2]+a[2],r[3]=e[3]+a[3],r}},1413:function(h){h.exports=p;function p(r){var e=new Float32Array(4);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e}},3470:function(h){h.exports=p;function p(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}},5313:function(h){h.exports=p;function p(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},5446:function(h){h.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2],c=e[3]-r[3];return Math.sqrt(a*a+n*n+f*f+c*c)}},205:function(h){h.exports=p;function p(r,e,a){return r[0]=e[0]/a[0],r[1]=e[1]/a[1],r[2]=e[2]/a[2],r[3]=e[3]/a[3],r}},4242:function(h){h.exports=p;function p(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]}},5680:function(h){h.exports=p;function p(r,e,a,n){var f=new Float32Array(4);return f[0]=r,f[1]=e,f[2]=a,f[3]=n,f}},4020:function(h,p,r){h.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(h){h.exports=p;function p(r,e){return r[0]=1/e[0],r[1]=1/e[1],r[2]=1/e[2],r[3]=1/e[3],r}},8177:function(h){h.exports=p;function p(r){var e=r[0],a=r[1],n=r[2],f=r[3];return Math.sqrt(e*e+a*a+n*n+f*f)}},8746:function(h){h.exports=p;function p(r,e,a,n){var f=e[0],c=e[1],l=e[2],m=e[3];return r[0]=f+n*(a[0]-f),r[1]=c+n*(a[1]-c),r[2]=l+n*(a[2]-l),r[3]=m+n*(a[3]-m),r}},3030:function(h){h.exports=p;function p(r,e,a){return r[0]=Math.max(e[0],a[0]),r[1]=Math.max(e[1],a[1]),r[2]=Math.max(e[2],a[2]),r[3]=Math.max(e[3],a[3]),r}},2170:function(h){h.exports=p;function p(r,e,a){return r[0]=Math.min(e[0],a[0]),r[1]=Math.min(e[1],a[1]),r[2]=Math.min(e[2],a[2]),r[3]=Math.min(e[3],a[3]),r}},746:function(h){h.exports=p;function p(r,e,a){return r[0]=e[0]*a[0],r[1]=e[1]*a[1],r[2]=e[2]*a[2],r[3]=e[3]*a[3],r}},6459:function(h){h.exports=p;function p(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r[3]=-e[3],r}},381:function(h){h.exports=p;function p(r,e){var a=e[0],n=e[1],f=e[2],c=e[3],l=a*a+n*n+f*f+c*c;return l>0&&(l=1/Math.sqrt(l),r[0]=a*l,r[1]=n*l,r[2]=f*l,r[3]=c*l),r}},3770:function(h,p,r){var e=r(381),a=r(5510);h.exports=n;function n(f,c){return c=c||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),e(f,f),a(f,f,c),f}},5510:function(h){h.exports=p;function p(r,e,a){return r[0]=e[0]*a,r[1]=e[1]*a,r[2]=e[2]*a,r[3]=e[3]*a,r}},4224:function(h){h.exports=p;function p(r,e,a,n){return r[0]=e[0]+a[0]*n,r[1]=e[1]+a[1]*n,r[2]=e[2]+a[2]*n,r[3]=e[3]+a[3]*n,r}},6453:function(h){h.exports=p;function p(r,e,a,n,f){return r[0]=e,r[1]=a,r[2]=n,r[3]=f,r}},1542:function(h){h.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2],c=e[3]-r[3];return a*a+n*n+f*f+c*c}},9037:function(h){h.exports=p;function p(r){var e=r[0],a=r[1],n=r[2],f=r[3];return e*e+a*a+n*n+f*f}},2705:function(h){h.exports=p;function p(r,e,a){return r[0]=e[0]-a[0],r[1]=e[1]-a[1],r[2]=e[2]-a[2],r[3]=e[3]-a[3],r}},6342:function(h){h.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=e[3];return r[0]=a[0]*n+a[4]*f+a[8]*c+a[12]*l,r[1]=a[1]*n+a[5]*f+a[9]*c+a[13]*l,r[2]=a[2]*n+a[6]*f+a[10]*c+a[14]*l,r[3]=a[3]*n+a[7]*f+a[11]*c+a[15]*l,r}},5022:function(h){h.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[0],m=a[1],v=a[2],b=a[3],u=b*n+m*c-v*f,o=b*f+v*n-l*c,d=b*c+l*f-m*n,w=-l*n-m*f-v*c;return r[0]=u*b+w*-l+o*-v-d*-m,r[1]=o*b+w*-m+d*-l-u*-v,r[2]=d*b+w*-v+u*-m-o*-l,r[3]=e[3],r}},9365:function(h,p,r){var e=r(8096),a=r(7896);h.exports=n;function n(f){for(var c=Array.isArray(f)?f:e(f),l=0;l0)continue;It=Ut.slice(0,1).join("")}return $(It),et+=It.length,O=O.slice(It.length),O.length}while(!0)}function At(){return/[^a-fA-F0-9]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function mt(){return k==="."||/[eE]/.test(k)?(O.push(k),I=w,B=k,D+1):k==="x"&&O.length===1&&O[0]==="0"?(I=s,O.push(k),B=k,D+1):/[^\d]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function Lt(){return k==="f"&&(O.push(k),B=k,D+=1),/[eE]/.test(k)||(k==="-"||k==="+")&&/[eE]/.test(B)?(O.push(k),B=k,D+1):/[^\d]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function Ht(){if(/[^\d\w_]/.test(k)){var Ut=O.join("");return ot[Ut]?I=y:Q[Ut]?I=_:I=A,$(O.join("")),I=l,D}return O.push(k),B=k,D+1}}},3585:function(h,p,r){var e=r(9525);e=e.slice().filter(function(a){return!/^(gl\_|texture)/.test(a)}),h.exports=e.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},9525:function(h){h.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},9458:function(h,p,r){var e=r(399);h.exports=e.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},399:function(h){h.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},9746:function(h){h.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(h,p,r){var e=r(3193);h.exports=a;function a(n,f){var c=e(f),l=[];return l=l.concat(c(n)),l=l.concat(c(null)),l}},6832:function(h){h.exports=function(p){typeof p=="string"&&(p=[p]);for(var r=[].slice.call(arguments,1),e=[],a=0;a0;){d=T.pop();for(var s=d.adjacent,L=0;L<=A;++L){var M=s[L];if(!(!M.boundary||M.lastVisited<=-_)){for(var z=M.vertices,D=0;D<=A;++D){var N=z[D];N<0?y[D]=w:y[D]=E[N]}var I=this.orient();if(I>0)return M;M.lastVisited=-_,I===0&&T.push(M)}}}return null},u.walk=function(d,w){var A=this.vertices.length-1,_=this.dimension,y=this.vertices,E=this.tuple,T=w?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[T];t:for(;!s.boundary;){for(var L=s.vertices,M=s.adjacent,z=0;z<=_;++z)E[z]=y[L[z]];s.lastVisited=A;for(var z=0;z<=_;++z){var D=M[z];if(!(D.lastVisited>=A)){var N=E[z];E[z]=d;var I=this.orient();if(E[z]=N,I<0){s=D;continue t}else D.boundary?D.lastVisited=-A:D.lastVisited=A}}return}return s},u.addPeaks=function(d,w){var A=this.vertices.length-1,_=this.dimension,y=this.vertices,E=this.tuple,T=this.interior,s=this.simplices,L=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,T.push(w);for(var M=[];L.length>0;){var w=L.pop(),z=w.vertices,D=w.adjacent,N=z.indexOf(A);if(!(N<0)){for(var I=0;I<=_;++I)if(I!==N){var k=D[I];if(!(!k.boundary||k.lastVisited>=A)){var B=k.vertices;if(k.lastVisited!==-A){for(var O=0,H=0;H<=_;++H)B[H]<0?(O=H,E[H]=d):E[H]=y[B[H]];var Y=this.orient();if(Y>0){B[O]=A,k.boundary=!1,T.push(k),L.push(k),k.lastVisited=A;continue}else k.lastVisited=-A}var j=k.adjacent,et=z.slice(),it=D.slice(),ut=new n(et,it,!0);s.push(ut);var J=j.indexOf(w);if(!(J<0)){j[J]=ut,it[N]=k,et[I]=-1,it[I]=w,D[I]=ut,ut.flip();for(var H=0;H<=_;++H){var X=et[H];if(!(X<0||X===A)){for(var tt=new Array(_-1),V=0,Q=0;Q<=_;++Q){var ot=et[Q];ot<0||Q===H||(tt[V++]=ot)}M.push(new f(tt,ut,H))}}}}}}}M.sort(c);for(var I=0;I+1=0?T[L++]=s[z]:M=z&1;if(M===(d&1)){var D=T[0];T[0]=T[1],T[1]=D}w.push(T)}}return w};function o(d,w){var A=d.length;if(A===0)throw new Error("Must have at least d+1 points");var _=d[0].length;if(A<=_)throw new Error("Must input at least d+1 points");var y=d.slice(0,_+1),E=e.apply(void 0,y);if(E===0)throw new Error("Input not in general position");for(var T=new Array(_+1),s=0;s<=_;++s)T[s]=s;E<0&&(T[0]=1,T[1]=0);for(var L=new n(T,new Array(_+1),!1),M=L.adjacent,z=new Array(_+2),s=0;s<=_;++s){for(var D=T.slice(),N=0;N<=_;++N)N===s&&(D[N]=-1);var I=D[0];D[0]=D[1],D[1]=I;var k=new n(D,new Array(_+1),!0);M[s]=k,z[s]=k}z[_+1]=L;for(var s=0;s<=_;++s)for(var D=M[s].vertices,B=M[s].adjacent,N=0;N<=_;++N){var O=D[N];if(O<0){B[N]=L;continue}for(var H=0;H<=_;++H)M[H].vertices.indexOf(O)<0&&(B[N]=M[H])}for(var Y=new b(_,y,z),j=!!w,s=_+1;s3*(z+1)?b(this,M):this.left.insert(M):this.left=E([M]);else if(M[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?b(this,M):this.right.insert(M):this.right=E([M]);else{var D=e.ge(this.leftPoints,M,_),N=e.ge(this.rightPoints,M,y);this.leftPoints.splice(D,0,M),this.rightPoints.splice(N,0,M)}},l.remove=function(M){var z=this.count-this.leftPoints;if(M[1]3*(z-1))return u(this,M);var N=this.left.remove(M);return N===f?(this.left=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else if(M[0]>this.mid){if(!this.right)return a;var I=this.left?this.left.count:0;if(4*I>3*(z-1))return u(this,M);var N=this.right.remove(M);return N===f?(this.right=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else{if(this.count===1)return this.leftPoints[0]===M?f:a;if(this.leftPoints.length===1&&this.leftPoints[0]===M){if(this.left&&this.right){for(var k=this,B=this.left;B.right;)k=B,B=B.right;if(k===this)B.right=this.right;else{var O=this.left,N=this.right;k.count-=B.count,k.right=B.left,B.left=O,B.right=N}m(this,B),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return n}for(var O=e.ge(this.leftPoints,M,_);O=0&&M[N][1]>=z;--N){var I=D(M[N]);if(I)return I}}function w(M,z){for(var D=0;Dthis.mid){if(this.right){var D=this.right.queryPoint(M,z);if(D)return D}return d(this.rightPoints,M,z)}else return w(this.leftPoints,z)},l.queryInterval=function(M,z,D){if(Mthis.mid&&this.right){var N=this.right.queryInterval(M,z,D);if(N)return N}return zthis.mid?d(this.rightPoints,M,D):w(this.leftPoints,D)};function A(M,z){return M-z}function _(M,z){var D=M[0]-z[0];return D||M[1]-z[1]}function y(M,z){var D=M[1]-z[1];return D||M[0]-z[0]}function E(M){if(M.length===0)return null;for(var z=[],D=0;D>1],I=[],k=[],B=[],D=0;D * @license MIT -*/v.exports=function(e){return e!=null&&(p(e)||r(e)||!!e._isBuffer)};function p(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function r(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&p(e.slice(0,0))}},3596:function(v){v.exports=function(p){for(var r=p.length,e,a=0;a13)&&e!==32&&e!==133&&e!==160&&e!==5760&&e!==6158&&(e<8192||e>8205)&&e!==8232&&e!==8233&&e!==8239&&e!==8287&&e!==8288&&e!==12288&&e!==65279)return!1;return!0}},3578:function(v){function p(r,e,a){return r*(1-a)+e*a}v.exports=p},7191:function(v,p,r){var e=r(4690),a=r(9823),n=r(7332),f=r(7787),c=r(7437),l=r(2142),m={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},h=a(),b=a(),u=[0,0,0,0],o=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];v.exports=function(E,T,s,L,M,z){if(T||(T=[0,0,0]),s||(s=[0,0,0]),L||(L=[0,0,0]),M||(M=[0,0,0,1]),z||(z=[0,0,0,1]),!e(h,E)||(n(b,h),b[3]=0,b[7]=0,b[11]=0,b[15]=1,Math.abs(f(b)<1e-8)))return!1;var D=h[3],N=h[7],I=h[11],k=h[12],B=h[13],O=h[14],H=h[15];if(D!==0||N!==0||I!==0){u[0]=D,u[1]=N,u[2]=I,u[3]=H;var Y=c(b,b);if(!Y)return!1;l(b,b),w(M,u,b)}else M[0]=M[1]=M[2]=0,M[3]=1;if(T[0]=k,T[1]=B,T[2]=O,A(o,h),s[0]=m.length(o[0]),m.normalize(o[0],o[0]),L[0]=m.dot(o[0],o[1]),_(o[1],o[1],o[0],1,-L[0]),s[1]=m.length(o[1]),m.normalize(o[1],o[1]),L[0]/=s[1],L[1]=m.dot(o[0],o[2]),_(o[2],o[2],o[0],1,-L[1]),L[2]=m.dot(o[1],o[2]),_(o[2],o[2],o[1],1,-L[2]),s[2]=m.length(o[2]),m.normalize(o[2],o[2]),L[1]/=s[2],L[2]/=s[2],m.cross(d,o[1],o[2]),m.dot(o[0],d)<0)for(var j=0;j<3;j++)s[j]*=-1,o[j][0]*=-1,o[j][1]*=-1,o[j][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+o[0][0]-o[1][1]-o[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-o[0][0]+o[1][1]-o[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-o[0][0]-o[1][1]+o[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+o[0][0]+o[1][1]+o[2][2],0)),o[2][1]>o[1][2]&&(z[0]=-z[0]),o[0][2]>o[2][0]&&(z[1]=-z[1]),o[1][0]>o[0][1]&&(z[2]=-z[2]),!0};function w(y,E,T){var s=E[0],L=E[1],M=E[2],z=E[3];return y[0]=T[0]*s+T[4]*L+T[8]*M+T[12]*z,y[1]=T[1]*s+T[5]*L+T[9]*M+T[13]*z,y[2]=T[2]*s+T[6]*L+T[10]*M+T[14]*z,y[3]=T[3]*s+T[7]*L+T[11]*M+T[15]*z,y}function A(y,E){y[0][0]=E[0],y[0][1]=E[1],y[0][2]=E[2],y[1][0]=E[4],y[1][1]=E[5],y[1][2]=E[6],y[2][0]=E[8],y[2][1]=E[9],y[2][2]=E[10]}function _(y,E,T,s,L){y[0]=E[0]*s+T[0]*L,y[1]=E[1]*s+T[1]*L,y[2]=E[2]*s+T[2]*L}},4690:function(v){v.exports=function(r,e){var a=e[15];if(a===0)return!1;for(var n=1/a,f=0;f<16;f++)r[f]=e[f]*n;return!0}},7649:function(v,p,r){var e=r(1868),a=r(1102),n=r(7191),f=r(7787),c=r(1116),l=u(),m=u(),h=u();v.exports=b;function b(w,A,_,y){if(f(A)===0||f(_)===0)return!1;var E=n(A,l.translate,l.scale,l.skew,l.perspective,l.quaternion),T=n(_,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!E||!T?!1:(e(h.translate,l.translate,m.translate,y),e(h.skew,l.skew,m.skew,y),e(h.scale,l.scale,m.scale,y),e(h.perspective,l.perspective,m.perspective,y),c(h.quaternion,l.quaternion,m.quaternion,y),a(w,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function u(){return{translate:o(),scale:o(1),skew:o(),perspective:d(),quaternion:d()}}function o(w){return[w||0,w||0,w||0]}function d(){return[0,0,0,1]}},1102:function(v,p,r){var e={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)};e.create();var a=e.create();v.exports=function(f,c,l,m,h,b){return e.identity(f),e.fromRotationTranslation(f,b,c),f[3]=h[0],f[7]=h[1],f[11]=h[2],f[15]=h[3],e.identity(a),m[2]!==0&&(a[9]=m[2],e.multiply(f,f,a)),m[1]!==0&&(a[9]=0,a[8]=m[1],e.multiply(f,f,a)),m[0]!==0&&(a[8]=0,a[4]=m[0],e.multiply(f,f,a)),e.scale(f,f,l),f}},9298:function(v,p,r){var e=r(5070),a=r(7649),n=r(7437),f=r(6109),c=r(7115),l=r(5240),m=r(3012),h=r(998);r(3668);var b=r(899),u=[0,0,0];v.exports=A;function o(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var d=o.prototype;d.recalcMatrix=function(_){var y=this._time,E=e.le(y,_),T=this.computedMatrix;if(!(E<0)){var s=this._components;if(E===y.length-1)for(var L=16*E,M=0;M<16;++M)T[M]=s[L++];else{for(var z=y[E+1]-y[E],L=16*E,D=this.prevMatrix,N=!0,M=0;M<16;++M)D[M]=s[L++];for(var I=this.nextMatrix,M=0;M<16;++M)I[M]=s[L++],N=N&&D[M]===I[M];if(z<1e-6||N)for(var M=0;M<16;++M)T[M]=D[M];else a(T,D,I,(_-y[E])/z)}var k=this.computedUp;k[0]=T[1],k[1]=T[5],k[2]=T[9],b(k,k);var B=this.computedInverse;n(B,T);var O=this.computedEye,H=B[15];O[0]=B[12]/H,O[1]=B[13]/H,O[2]=B[14]/H;for(var Y=this.computedCenter,j=Math.exp(this.computedRadius[0]),M=0;M<3;++M)Y[M]=O[M]-T[2+4*M]*j}},d.idle=function(_){if(!(_1&&e(n[m[o-2]],n[m[o-1]],u)<=0;)o-=1,m.pop();for(m.push(b),o=h.length;o>1&&e(n[h[o-2]],n[h[o-1]],u)>=0;)o-=1,h.pop();h.push(b)}for(var d=new Array(h.length+m.length-2),w=0,c=0,A=m.length;c0;--_)d[w++]=h[_];return d}},6145:function(v,p,r){v.exports=a;var e=r(4110);function a(n,f){f||(f=n,n=window);var c=0,l=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},b=!1;function u(M){var z=!1;return"altKey"in M&&(z=z||M.altKey!==h.alt,h.alt=!!M.altKey),"shiftKey"in M&&(z=z||M.shiftKey!==h.shift,h.shift=!!M.shiftKey),"ctrlKey"in M&&(z=z||M.ctrlKey!==h.control,h.control=!!M.ctrlKey),"metaKey"in M&&(z=z||M.metaKey!==h.meta,h.meta=!!M.metaKey),z}function o(M,z){var D=e.x(z),N=e.y(z);"buttons"in z&&(M=z.buttons|0),(M!==c||D!==l||N!==m||u(z))&&(c=M|0,l=D||0,m=N||0,f&&f(c,l,m,h))}function d(M){o(0,M)}function w(){(c||l||m||h.shift||h.alt||h.meta||h.control)&&(l=m=0,c=0,h.shift=h.alt=h.control=h.meta=!1,f&&f(0,0,0,h))}function A(M){u(M)&&f&&f(c,l,m,h)}function _(M){e.buttons(M)===0?o(0,M):o(c,M)}function y(M){o(c|e.buttons(M),M)}function E(M){o(c&~e.buttons(M),M)}function T(){b||(b=!0,n.addEventListener("mousemove",_),n.addEventListener("mousedown",y),n.addEventListener("mouseup",E),n.addEventListener("mouseleave",d),n.addEventListener("mouseenter",d),n.addEventListener("mouseout",d),n.addEventListener("mouseover",d),n.addEventListener("blur",w),n.addEventListener("keyup",A),n.addEventListener("keydown",A),n.addEventListener("keypress",A),n!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function s(){b&&(b=!1,n.removeEventListener("mousemove",_),n.removeEventListener("mousedown",y),n.removeEventListener("mouseup",E),n.removeEventListener("mouseleave",d),n.removeEventListener("mouseenter",d),n.removeEventListener("mouseout",d),n.removeEventListener("mouseover",d),n.removeEventListener("blur",w),n.removeEventListener("keyup",A),n.removeEventListener("keydown",A),n.removeEventListener("keypress",A),n!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}T();var L={element:n};return Object.defineProperties(L,{enabled:{get:function(){return b},set:function(M){M?T():s()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return l},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),L}},2565:function(v){var p={left:0,top:0};v.exports=r;function r(a,n,f){n=n||a.currentTarget||a.srcElement,Array.isArray(f)||(f=[0,0]);var c=a.clientX||0,l=a.clientY||0,m=e(n);return f[0]=c-m.left,f[1]=l-m.top,f}function e(a){return a===window||a===document||a===document.body?p:a.getBoundingClientRect()}},4110:function(v,p){function r(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var c=f.which;if(c===2)return 4;if(c===3)return 2;if(c>0)return 1<=0)return 1<0){if(it=1,X[V++]=h(T[z],w,A,_),z+=Y,y>0)for(et=1,D=T[z],Q=X[V]=h(D,w,A,_),Z=X[V+ot],ct=X[V+st],wt=X[V+gt],(Q!==Z||Q!==ct||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,Z,ct,wt,w,A,_),Rt=tt[V]=ut++),V+=1,z+=Y,et=2;et0)for(et=1,D=T[z],Q=X[V]=h(D,w,A,_),Z=X[V+ot],ct=X[V+st],wt=X[V+gt],(Q!==Z||Q!==ct||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,Z,ct,wt,w,A,_),Rt=tt[V]=ut++,wt!==ct&&m(tt[V+st],Rt,B,H,ct,wt,w,A,_)),V+=1,z+=Y,et=2;et0){if(et=1,X[V++]=h(T[z],w,A,_),z+=Y,E>0)for(it=1,D=T[z],Q=X[V]=h(D,w,A,_),ct=X[V+st],Z=X[V+ot],wt=X[V+gt],(Q!==ct||Q!==Z||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,ct,Z,wt,w,A,_),Rt=tt[V]=ut++),V+=1,z+=Y,it=2;it0)for(it=1,D=T[z],Q=X[V]=h(D,w,A,_),ct=X[V+st],Z=X[V+ot],wt=X[V+gt],(Q!==ct||Q!==Z||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,ct,Z,wt,w,A,_),Rt=tt[V]=ut++,wt!==ct&&m(tt[V+st],Rt,H,I,wt,ct,w,A,_)),V+=1,z+=Y,it=2;it 0"),typeof c.vertex!="function"&&l("Must specify vertex creation function"),typeof c.cell!="function"&&l("Must specify cell creation function"),typeof c.phase!="function"&&l("Must specify phase function");for(var u=c.getters||[],o=new Array(h),d=0;d=0?o[d]=!0:o[d]=!1;return n(c.vertex,c.cell,c.phase,b,m,o)}},9144:function(v,p,r){var e=r(3094),a={zero:function(A,_,y,E){var T=A[0],s=y[0];E|=0;var L=0,M=s;for(L=0;L2&&L[1]>2&&E(s.pick(-1,-1).lo(1,1).hi(L[0]-2,L[1]-2),T.pick(-1,-1,0).lo(1,1).hi(L[0]-2,L[1]-2),T.pick(-1,-1,1).lo(1,1).hi(L[0]-2,L[1]-2)),L[1]>2&&(y(s.pick(0,-1).lo(1).hi(L[1]-2),T.pick(0,-1,1).lo(1).hi(L[1]-2)),_(T.pick(0,-1,0).lo(1).hi(L[1]-2))),L[1]>2&&(y(s.pick(L[0]-1,-1).lo(1).hi(L[1]-2),T.pick(L[0]-1,-1,1).lo(1).hi(L[1]-2)),_(T.pick(L[0]-1,-1,0).lo(1).hi(L[1]-2))),L[0]>2&&(y(s.pick(-1,0).lo(1).hi(L[0]-2),T.pick(-1,0,0).lo(1).hi(L[0]-2)),_(T.pick(-1,0,1).lo(1).hi(L[0]-2))),L[0]>2&&(y(s.pick(-1,L[1]-1).lo(1).hi(L[0]-2),T.pick(-1,L[1]-1,0).lo(1).hi(L[0]-2)),_(T.pick(-1,L[1]-1,1).lo(1).hi(L[0]-2))),T.set(0,0,0,0),T.set(0,0,1,0),T.set(L[0]-1,0,0,0),T.set(L[0]-1,0,1,0),T.set(0,L[1]-1,0,0),T.set(0,L[1]-1,1,0),T.set(L[0]-1,L[1]-1,0,0),T.set(L[0]-1,L[1]-1,1,0),T}}function w(A){var _=A.join(),L=h[_];if(L)return L;for(var y=A.length,E=[b,u],T=1;T<=y;++T)E.push(o(T));var s=d,L=s.apply(void 0,E);return h[_]=L,L}v.exports=function(_,y,E){if(Array.isArray(E)||(typeof E=="string"?E=e(y.dimension,E):E=e(y.dimension,"clamp")),y.size===0)return _;if(y.dimension===0)return _.set(0),_;var T=w(E);return T(_,y)}},3581:function(v){function p(f,c){var l=Math.floor(c),m=c-l,h=0<=l&&l0;){B<64?(y=B,B=0):(y=64,B-=64);for(var O=h[1]|0;O>0;){O<64?(E=O,O=0):(E=64,O-=64),o=I+B*s+O*L,A=k+B*z+O*D;var H=0,Y=0,j=0,et=M,it=s-T*M,ut=L-y*s,J=N,X=z-T*N,tt=D-y*z;for(j=0;j0;){D<64?(y=D,D=0):(y=64,D-=64);for(var N=h[0]|0;N>0;){N<64?(_=N,N=0):(_=64,N-=64),o=M+D*T+N*E,A=z+D*L+N*s;var I=0,k=0,B=T,O=E-y*T,H=L,Y=s-y*L;for(k=0;k<_;++k){for(I=0;I0;){k<64?(E=k,k=0):(E=64,k-=64);for(var B=h[0]|0;B>0;){B<64?(_=B,B=0):(_=64,B-=64);for(var O=h[1]|0;O>0;){O<64?(y=O,O=0):(y=64,O-=64),o=N+k*L+B*T+O*s,A=I+k*D+B*M+O*z;var H=0,Y=0,j=0,et=L,it=T-E*L,ut=s-_*T,J=D,X=M-E*D,tt=z-_*M;for(j=0;jd;){H=0,Y=I-y;e:for(B=0;Bet)break e;Y+=M,H+=z}for(H=I,Y=I-y,B=0;B>1,O=B-N,H=B+N,Y=I,j=O,et=B,it=H,ut=k,J=w+1,X=A-1,tt=!0,V,Q,ot,$,Z,st,nt,ct,gt,Tt=0,wt=0,Rt=0,bt,At,mt,Lt,Ht,Ut,kt,Vt,It,re,Kt,$t,le,he,de,xe,Se=L,ne=u(Se),zt=u(Se);At=E*Y,mt=E*j,xe=y;t:for(bt=0;bt0){Q=Y,Y=j,j=Q;break t}if(Rt<0)break t;xe+=z}At=E*it,mt=E*ut,xe=y;t:for(bt=0;bt0){Q=it,it=ut,ut=Q;break t}if(Rt<0)break t;xe+=z}At=E*Y,mt=E*et,xe=y;t:for(bt=0;bt0){Q=Y,Y=et,et=Q;break t}if(Rt<0)break t;xe+=z}At=E*j,mt=E*et,xe=y;t:for(bt=0;bt0){Q=j,j=et,et=Q;break t}if(Rt<0)break t;xe+=z}At=E*Y,mt=E*it,xe=y;t:for(bt=0;bt0){Q=Y,Y=it,it=Q;break t}if(Rt<0)break t;xe+=z}At=E*et,mt=E*it,xe=y;t:for(bt=0;bt0){Q=et,et=it,it=Q;break t}if(Rt<0)break t;xe+=z}At=E*j,mt=E*ut,xe=y;t:for(bt=0;bt0){Q=j,j=ut,ut=Q;break t}if(Rt<0)break t;xe+=z}At=E*j,mt=E*et,xe=y;t:for(bt=0;bt0){Q=j,j=et,et=Q;break t}if(Rt<0)break t;xe+=z}At=E*it,mt=E*ut,xe=y;t:for(bt=0;bt0){Q=it,it=ut,ut=Q;break t}if(Rt<0)break t;xe+=z}for(At=E*Y,mt=E*j,Lt=E*et,Ht=E*it,Ut=E*ut,kt=E*I,Vt=E*B,It=E*k,de=0,xe=y,bt=0;bt0)X--;else if(Rt<0){for(At=E*st,mt=E*J,Lt=E*X,xe=y,bt=0;bt0)for(;;){nt=y+X*E,de=0;t:for(bt=0;bt0){if(--Xk){t:for(;;){for(nt=y+J*E,de=0,xe=y,bt=0;bt1&&d?A(o,d[0],d[1]):A(o)}var m={"uint32,1,0":function(b,u){return function(o){var d=o.data,w=o.offset|0,A=o.shape,_=o.stride,y=_[0]|0,E=A[0]|0,T=_[1]|0,s=A[1]|0,L=T,M=T,z=1;E<=32?b(0,E-1,d,w,y,T,E,s,L,M,z):u(0,E-1,d,w,y,T,E,s,L,M,z)}}};function h(b,u){var o=[u,b].join(","),d=m[o],w=f(b,u),A=l(b,u,w);return d(w,A)}v.exports=h},8729:function(v,p,r){var e=r(8139),a={};function n(f){var c=f.order,l=f.dtype,m=[c,l],h=m.join(":"),b=a[h];return b||(a[h]=b=e(c,l)),b(f),f}v.exports=n},5050:function(v,p,r){var e=r(4780),a=typeof Float64Array<"u";function n(u,o){return u[0]-o[0]}function f(){var u=this.stride,o=new Array(u.length),d;for(d=0;d=0&&(T=y|0,E+=L*T,s-=T),new w(this.data,s,L,E)},A.step=function(y){var E=this.shape[0],T=this.stride[0],s=this.offset,L=0,M=Math.ceil;return typeof y=="number"&&(L=y|0,L<0?(s+=T*(E-1),E=M(-E/L)):E=M(E/L),T*=L),new w(this.data,E,T,s)},A.transpose=function(y){y=y===void 0?0:y|0;var E=this.shape,T=this.stride;return new w(this.data,E[y],T[y],this.offset)},A.pick=function(y){var E=[],T=[],s=this.offset;typeof y=="number"&&y>=0?s=s+this.stride[0]*y|0:(E.push(this.shape[0]),T.push(this.stride[0]));var L=o[E.length+1];return L(this.data,E,T,s)},function(y,E,T,s){return new w(y,E[0],T[0],s)}},2:function(u,o,d){function w(_,y,E,T,s,L){this.data=_,this.shape=[y,E],this.stride=[T,s],this.offset=L|0}var A=w.prototype;return A.dtype=u,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(y,E,T){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E,T):this.data[this.offset+this.stride[0]*y+this.stride[1]*E]=T},A.get=function(y,E){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E):this.data[this.offset+this.stride[0]*y+this.stride[1]*E]},A.index=function(y,E){return this.offset+this.stride[0]*y+this.stride[1]*E},A.hi=function(y,E){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(y,E){var T=this.offset,s=0,L=this.shape[0],M=this.shape[1],z=this.stride[0],D=this.stride[1];return typeof y=="number"&&y>=0&&(s=y|0,T+=z*s,L-=s),typeof E=="number"&&E>=0&&(s=E|0,T+=D*s,M-=s),new w(this.data,L,M,z,D,T)},A.step=function(y,E){var T=this.shape[0],s=this.shape[1],L=this.stride[0],M=this.stride[1],z=this.offset,D=0,N=Math.ceil;return typeof y=="number"&&(D=y|0,D<0?(z+=L*(T-1),T=N(-T/D)):T=N(T/D),L*=D),typeof E=="number"&&(D=E|0,D<0?(z+=M*(s-1),s=N(-s/D)):s=N(s/D),M*=D),new w(this.data,T,s,L,M,z)},A.transpose=function(y,E){y=y===void 0?0:y|0,E=E===void 0?1:E|0;var T=this.shape,s=this.stride;return new w(this.data,T[y],T[E],s[y],s[E],this.offset)},A.pick=function(y,E){var T=[],s=[],L=this.offset;typeof y=="number"&&y>=0?L=L+this.stride[0]*y|0:(T.push(this.shape[0]),s.push(this.stride[0])),typeof E=="number"&&E>=0?L=L+this.stride[1]*E|0:(T.push(this.shape[1]),s.push(this.stride[1]));var M=o[T.length+1];return M(this.data,T,s,L)},function(y,E,T,s){return new w(y,E[0],E[1],T[0],T[1],s)}},3:function(u,o,d){function w(_,y,E,T,s,L,M,z){this.data=_,this.shape=[y,E,T],this.stride=[s,L,M],this.offset=z|0}var A=w.prototype;return A.dtype=u,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var y=Math.abs(this.stride[0]),E=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return y>E?E>T?[2,1,0]:y>T?[1,2,0]:[1,0,2]:y>T?[2,0,1]:T>E?[0,1,2]:[0,2,1]}}),A.set=function(y,E,T,s){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T,s):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T]=s},A.get=function(y,E,T){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T]},A.index=function(y,E,T){return this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T},A.hi=function(y,E,T){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(y,E,T){var s=this.offset,L=0,M=this.shape[0],z=this.shape[1],D=this.shape[2],N=this.stride[0],I=this.stride[1],k=this.stride[2];return typeof y=="number"&&y>=0&&(L=y|0,s+=N*L,M-=L),typeof E=="number"&&E>=0&&(L=E|0,s+=I*L,z-=L),typeof T=="number"&&T>=0&&(L=T|0,s+=k*L,D-=L),new w(this.data,M,z,D,N,I,k,s)},A.step=function(y,E,T){var s=this.shape[0],L=this.shape[1],M=this.shape[2],z=this.stride[0],D=this.stride[1],N=this.stride[2],I=this.offset,k=0,B=Math.ceil;return typeof y=="number"&&(k=y|0,k<0?(I+=z*(s-1),s=B(-s/k)):s=B(s/k),z*=k),typeof E=="number"&&(k=E|0,k<0?(I+=D*(L-1),L=B(-L/k)):L=B(L/k),D*=k),typeof T=="number"&&(k=T|0,k<0?(I+=N*(M-1),M=B(-M/k)):M=B(M/k),N*=k),new w(this.data,s,L,M,z,D,N,I)},A.transpose=function(y,E,T){y=y===void 0?0:y|0,E=E===void 0?1:E|0,T=T===void 0?2:T|0;var s=this.shape,L=this.stride;return new w(this.data,s[y],s[E],s[T],L[y],L[E],L[T],this.offset)},A.pick=function(y,E,T){var s=[],L=[],M=this.offset;typeof y=="number"&&y>=0?M=M+this.stride[0]*y|0:(s.push(this.shape[0]),L.push(this.stride[0])),typeof E=="number"&&E>=0?M=M+this.stride[1]*E|0:(s.push(this.shape[1]),L.push(this.stride[1])),typeof T=="number"&&T>=0?M=M+this.stride[2]*T|0:(s.push(this.shape[2]),L.push(this.stride[2]));var z=o[s.length+1];return z(this.data,s,L,M)},function(y,E,T,s){return new w(y,E[0],E[1],E[2],T[0],T[1],T[2],s)}},4:function(u,o,d){function w(_,y,E,T,s,L,M,z,D,N){this.data=_,this.shape=[y,E,T,s],this.stride=[L,M,z,D],this.offset=N|0}var A=w.prototype;return A.dtype=u,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:d}),A.set=function(y,E,T,s,L){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s,L):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s]=L},A.get=function(y,E,T,s){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s]},A.index=function(y,E,T,s){return this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s},A.hi=function(y,E,T,s){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof s!="number"||s<0?this.shape[3]:s|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(y,E,T,s){var L=this.offset,M=0,z=this.shape[0],D=this.shape[1],N=this.shape[2],I=this.shape[3],k=this.stride[0],B=this.stride[1],O=this.stride[2],H=this.stride[3];return typeof y=="number"&&y>=0&&(M=y|0,L+=k*M,z-=M),typeof E=="number"&&E>=0&&(M=E|0,L+=B*M,D-=M),typeof T=="number"&&T>=0&&(M=T|0,L+=O*M,N-=M),typeof s=="number"&&s>=0&&(M=s|0,L+=H*M,I-=M),new w(this.data,z,D,N,I,k,B,O,H,L)},A.step=function(y,E,T,s){var L=this.shape[0],M=this.shape[1],z=this.shape[2],D=this.shape[3],N=this.stride[0],I=this.stride[1],k=this.stride[2],B=this.stride[3],O=this.offset,H=0,Y=Math.ceil;return typeof y=="number"&&(H=y|0,H<0?(O+=N*(L-1),L=Y(-L/H)):L=Y(L/H),N*=H),typeof E=="number"&&(H=E|0,H<0?(O+=I*(M-1),M=Y(-M/H)):M=Y(M/H),I*=H),typeof T=="number"&&(H=T|0,H<0?(O+=k*(z-1),z=Y(-z/H)):z=Y(z/H),k*=H),typeof s=="number"&&(H=s|0,H<0?(O+=B*(D-1),D=Y(-D/H)):D=Y(D/H),B*=H),new w(this.data,L,M,z,D,N,I,k,B,O)},A.transpose=function(y,E,T,s){y=y===void 0?0:y|0,E=E===void 0?1:E|0,T=T===void 0?2:T|0,s=s===void 0?3:s|0;var L=this.shape,M=this.stride;return new w(this.data,L[y],L[E],L[T],L[s],M[y],M[E],M[T],M[s],this.offset)},A.pick=function(y,E,T,s){var L=[],M=[],z=this.offset;typeof y=="number"&&y>=0?z=z+this.stride[0]*y|0:(L.push(this.shape[0]),M.push(this.stride[0])),typeof E=="number"&&E>=0?z=z+this.stride[1]*E|0:(L.push(this.shape[1]),M.push(this.stride[1])),typeof T=="number"&&T>=0?z=z+this.stride[2]*T|0:(L.push(this.shape[2]),M.push(this.stride[2])),typeof s=="number"&&s>=0?z=z+this.stride[3]*s|0:(L.push(this.shape[3]),M.push(this.stride[3]));var D=o[L.length+1];return D(this.data,L,M,z)},function(y,E,T,s){return new w(y,E[0],E[1],E[2],E[3],T[0],T[1],T[2],T[3],s)}},5:function(o,d,w){function A(y,E,T,s,L,M,z,D,N,I,k,B){this.data=y,this.shape=[E,T,s,L,M],this.stride=[z,D,N,I,k],this.offset=B|0}var _=A.prototype;return _.dtype=o,_.dimension=5,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(_,"order",{get:w}),_.set=function(E,T,s,L,M,z){return o==="generic"?this.data.set(this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M,z):this.data[this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M]=z},_.get=function(E,T,s,L,M){return o==="generic"?this.data.get(this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M):this.data[this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M]},_.index=function(E,T,s,L,M){return this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M},_.hi=function(E,T,s,L,M){return new A(this.data,typeof E!="number"||E<0?this.shape[0]:E|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof s!="number"||s<0?this.shape[2]:s|0,typeof L!="number"||L<0?this.shape[3]:L|0,typeof M!="number"||M<0?this.shape[4]:M|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},_.lo=function(E,T,s,L,M){var z=this.offset,D=0,N=this.shape[0],I=this.shape[1],k=this.shape[2],B=this.shape[3],O=this.shape[4],H=this.stride[0],Y=this.stride[1],j=this.stride[2],et=this.stride[3],it=this.stride[4];return typeof E=="number"&&E>=0&&(D=E|0,z+=H*D,N-=D),typeof T=="number"&&T>=0&&(D=T|0,z+=Y*D,I-=D),typeof s=="number"&&s>=0&&(D=s|0,z+=j*D,k-=D),typeof L=="number"&&L>=0&&(D=L|0,z+=et*D,B-=D),typeof M=="number"&&M>=0&&(D=M|0,z+=it*D,O-=D),new A(this.data,N,I,k,B,O,H,Y,j,et,it,z)},_.step=function(E,T,s,L,M){var z=this.shape[0],D=this.shape[1],N=this.shape[2],I=this.shape[3],k=this.shape[4],B=this.stride[0],O=this.stride[1],H=this.stride[2],Y=this.stride[3],j=this.stride[4],et=this.offset,it=0,ut=Math.ceil;return typeof E=="number"&&(it=E|0,it<0?(et+=B*(z-1),z=ut(-z/it)):z=ut(z/it),B*=it),typeof T=="number"&&(it=T|0,it<0?(et+=O*(D-1),D=ut(-D/it)):D=ut(D/it),O*=it),typeof s=="number"&&(it=s|0,it<0?(et+=H*(N-1),N=ut(-N/it)):N=ut(N/it),H*=it),typeof L=="number"&&(it=L|0,it<0?(et+=Y*(I-1),I=ut(-I/it)):I=ut(I/it),Y*=it),typeof M=="number"&&(it=M|0,it<0?(et+=j*(k-1),k=ut(-k/it)):k=ut(k/it),j*=it),new A(this.data,z,D,N,I,k,B,O,H,Y,j,et)},_.transpose=function(E,T,s,L,M){E=E===void 0?0:E|0,T=T===void 0?1:T|0,s=s===void 0?2:s|0,L=L===void 0?3:L|0,M=M===void 0?4:M|0;var z=this.shape,D=this.stride;return new A(this.data,z[E],z[T],z[s],z[L],z[M],D[E],D[T],D[s],D[L],D[M],this.offset)},_.pick=function(E,T,s,L,M){var z=[],D=[],N=this.offset;typeof E=="number"&&E>=0?N=N+this.stride[0]*E|0:(z.push(this.shape[0]),D.push(this.stride[0])),typeof T=="number"&&T>=0?N=N+this.stride[1]*T|0:(z.push(this.shape[1]),D.push(this.stride[1])),typeof s=="number"&&s>=0?N=N+this.stride[2]*s|0:(z.push(this.shape[2]),D.push(this.stride[2])),typeof L=="number"&&L>=0?N=N+this.stride[3]*L|0:(z.push(this.shape[3]),D.push(this.stride[3])),typeof M=="number"&&M>=0?N=N+this.stride[4]*M|0:(z.push(this.shape[4]),D.push(this.stride[4]));var I=d[z.length+1];return I(this.data,z,D,N)},function(E,T,s,L){return new A(E,T[0],T[1],T[2],T[3],T[4],s[0],s[1],s[2],s[3],s[4],L)}}};function l(u,o){var d=o===-1?"T":String(o),w=c[d];return o===-1?w(u):o===0?w(u,h[u][0]):w(u,h[u],f)}function m(u){if(e(u))return"buffer";if(a)switch(Object.prototype.toString.call(u)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(u)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function b(u,o,d,w){if(u===void 0){var s=h.array[0];return s([])}else typeof u=="number"&&(u=[u]);o===void 0&&(o=[u.length]);var A=o.length;if(d===void 0){d=new Array(A);for(var _=A-1,y=1;_>=0;--_)d[_]=y,y*=o[_]}if(w===void 0){w=0;for(var _=0;_>>0;v.exports=f;function f(c,l){if(isNaN(c)||isNaN(l))return NaN;if(c===l)return c;if(c===0)return l<0?-a:a;var m=e.hi(c),h=e.lo(c);return l>c==c>0?h===n?(m+=1,h=0):h+=1:h===0?(h=n,m-=1):h-=1,e.pack(h,m)}},115:function(v,p){var r=1e-6,e=1e-6;p.vertexNormals=function(a,n,f){for(var c=n.length,l=new Array(c),m=f===void 0?r:f,h=0;hm)for(var z=l[o],D=1/Math.sqrt(T*L),M=0;M<3;++M){var N=(M+1)%3,I=(M+2)%3;z[M]+=D*(s[N]*E[I]-s[I]*E[N])}}for(var h=0;hm)for(var D=1/Math.sqrt(k),M=0;M<3;++M)z[M]*=D;else for(var M=0;M<3;++M)z[M]=0}return l},p.faceNormals=function(a,n,f){for(var c=a.length,l=new Array(c),m=f===void 0?e:f,h=0;hm?_=1/Math.sqrt(_):_=0;for(var o=0;o<3;++o)A[o]*=_;l[h]=A}return l}},567:function(v){v.exports=p;function p(r,e,a,n,f,c,l,m,h,b){var u=e+c+b;if(o>0){var o=Math.sqrt(u+1);r[0]=.5*(l-h)/o,r[1]=.5*(m-n)/o,r[2]=.5*(a-c)/o,r[3]=.5*o}else{var d=Math.max(e,c,b),o=Math.sqrt(2*d-u+1);e>=d?(r[0]=.5*o,r[1]=.5*(f+a)/o,r[2]=.5*(m+n)/o,r[3]=.5*(l-h)/o):c>=d?(r[0]=.5*(a+f)/o,r[1]=.5*o,r[2]=.5*(h+l)/o,r[3]=.5*(m-n)/o):(r[0]=.5*(n+m)/o,r[1]=.5*(l+h)/o,r[2]=.5*o,r[3]=.5*(a-f)/o)}return r}},7774:function(v,p,r){v.exports=o;var e=r(8444),a=r(3012),n=r(5950),f=r(7437),c=r(567);function l(d,w,A){return Math.sqrt(Math.pow(d,2)+Math.pow(w,2)+Math.pow(A,2))}function m(d,w,A,_){return Math.sqrt(Math.pow(d,2)+Math.pow(w,2)+Math.pow(A,2)+Math.pow(_,2))}function h(d,w){var A=w[0],_=w[1],y=w[2],E=w[3],T=m(A,_,y,E);T>1e-6?(d[0]=A/T,d[1]=_/T,d[2]=y/T,d[3]=E/T):(d[0]=d[1]=d[2]=0,d[3]=1)}function b(d,w,A){this.radius=e([A]),this.center=e(w),this.rotation=e(d),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var u=b.prototype;u.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},u.recalcMatrix=function(d){this.radius.curve(d),this.center.curve(d),this.rotation.curve(d);var w=this.computedRotation;h(w,w);var A=this.computedMatrix;n(A,w);var _=this.computedCenter,y=this.computedEye,E=this.computedUp,T=Math.exp(this.computedRadius[0]);y[0]=_[0]+T*A[2],y[1]=_[1]+T*A[6],y[2]=_[2]+T*A[10],E[0]=A[1],E[1]=A[5],E[2]=A[9];for(var s=0;s<3;++s){for(var L=0,M=0;M<3;++M)L+=A[s+4*M]*y[M];A[12+s]=-L}},u.getMatrix=function(d,w){this.recalcMatrix(d);var A=this.computedMatrix;if(w){for(var _=0;_<16;++_)w[_]=A[_];return w}return A},u.idle=function(d){this.center.idle(d),this.radius.idle(d),this.rotation.idle(d)},u.flush=function(d){this.center.flush(d),this.radius.flush(d),this.rotation.flush(d)},u.pan=function(d,w,A,_){w=w||0,A=A||0,_=_||0,this.recalcMatrix(d);var y=this.computedMatrix,E=y[1],T=y[5],s=y[9],L=l(E,T,s);E/=L,T/=L,s/=L;var M=y[0],z=y[4],D=y[8],N=M*E+z*T+D*s;M-=E*N,z-=T*N,D-=s*N;var I=l(M,z,D);M/=I,z/=I,D/=I,y[2],y[6],y[10];var k=M*w+E*A,B=z*w+T*A,O=D*w+s*A;this.center.move(d,k,B,O);var H=Math.exp(this.computedRadius[0]);H=Math.max(1e-4,H+_),this.radius.set(d,Math.log(H))},u.rotate=function(d,w,A,_){this.recalcMatrix(d),w=w||0,A=A||0;var y=this.computedMatrix,E=y[0],T=y[4],s=y[8],L=y[1],M=y[5],z=y[9],D=y[2],N=y[6],I=y[10],k=w*E+A*L,B=w*T+A*M,O=w*s+A*z,H=-(N*O-I*B),Y=-(I*k-D*O),j=-(D*B-N*k),et=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(Y,2)-Math.pow(j,2))),it=m(H,Y,j,et);it>1e-6?(H/=it,Y/=it,j/=it,et/=it):(H=Y=j=0,et=1);var ut=this.computedRotation,J=ut[0],X=ut[1],tt=ut[2],V=ut[3],Q=J*et+V*H+X*j-tt*Y,ot=X*et+V*Y+tt*H-J*j,$=tt*et+V*j+J*Y-X*H,Z=V*et-J*H-X*Y-tt*j;if(_){H=D,Y=N,j=I;var st=Math.sin(_)/l(H,Y,j);H*=st,Y*=st,j*=st,et=Math.cos(w),Q=Q*et+Z*H+ot*j-$*Y,ot=ot*et+Z*Y+$*H-Q*j,$=$*et+Z*j+Q*Y-ot*H,Z=Z*et-Q*H-ot*Y-$*j}var nt=m(Q,ot,$,Z);nt>1e-6?(Q/=nt,ot/=nt,$/=nt,Z/=nt):(Q=ot=$=0,Z=1),this.rotation.set(d,Q,ot,$,Z)},u.lookAt=function(d,w,A,_){this.recalcMatrix(d),A=A||this.computedCenter,w=w||this.computedEye,_=_||this.computedUp;var y=this.computedMatrix;a(y,w,A,_);var E=this.computedRotation;c(E,y[0],y[1],y[2],y[4],y[5],y[6],y[8],y[9],y[10]),h(E,E),this.rotation.set(d,E[0],E[1],E[2],E[3]);for(var T=0,s=0;s<3;++s)T+=Math.pow(A[s]-w[s],2);this.radius.set(d,.5*Math.log(Math.max(T,1e-6))),this.center.set(d,A[0],A[1],A[2])},u.translate=function(d,w,A,_){this.center.move(d,w||0,A||0,_||0)},u.setMatrix=function(d,w){var A=this.computedRotation;c(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),h(A,A),this.rotation.set(d,A[0],A[1],A[2],A[3]);var _=this.computedMatrix;f(_,w);var y=_[15];if(Math.abs(y)>1e-6){var E=_[12]/y,T=_[13]/y,s=_[14]/y;this.recalcMatrix(d);var L=Math.exp(this.computedRadius[0]);this.center.set(d,E-_[2]*L,T-_[6]*L,s-_[10]*L),this.radius.idle(d)}else this.center.idle(d),this.radius.idle(d)},u.setDistance=function(d,w){w>0&&this.radius.set(d,Math.log(w))},u.setDistanceLimits=function(d,w){d>0?d=Math.log(d):d=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,d),this.radius.bounds[0][0]=d,this.radius.bounds[1][0]=w},u.getDistanceLimits=function(d){var w=this.radius.bounds;return d?(d[0]=Math.exp(w[0][0]),d[1]=Math.exp(w[1][0]),d):[Math.exp(w[0][0]),Math.exp(w[1][0])]},u.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},u.fromJSON=function(d){var w=this.lastT(),A=d.center;A&&this.center.set(w,A[0],A[1],A[2]);var _=d.rotation;_&&this.rotation.set(w,_[0],_[1],_[2],_[3]);var y=d.distance;y&&y>0&&this.radius.set(w,Math.log(y)),this.setDistanceLimits(d.zoomMin,d.zoomMax)};function o(d){d=d||{};var w=d.center||[0,0,0],A=d.rotation||[0,0,0,1],_=d.radius||1;w=[].slice.call(w,0,3),A=[].slice.call(A,0,4),h(A,A);var y=new b(A,w,Math.log(_));return y.setDistanceLimits(d.zoomMin,d.zoomMax),("eye"in d||"up"in d)&&y.lookAt(0,d.eye,d.center,d.up),y}},4930:function(v,p,r){/*! +*/h.exports=function(e){return e!=null&&(p(e)||r(e)||!!e._isBuffer)};function p(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function r(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&p(e.slice(0,0))}},3596:function(h){h.exports=function(p){for(var r=p.length,e,a=0;a13)&&e!==32&&e!==133&&e!==160&&e!==5760&&e!==6158&&(e<8192||e>8205)&&e!==8232&&e!==8233&&e!==8239&&e!==8287&&e!==8288&&e!==12288&&e!==65279)return!1;return!0}},3578:function(h){function p(r,e,a){return r*(1-a)+e*a}h.exports=p},7191:function(h,p,r){var e=r(4690),a=r(9823),n=r(7332),f=r(7787),c=r(7437),l=r(2142),m={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},v=a(),b=a(),u=[0,0,0,0],o=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];h.exports=function(E,T,s,L,M,z){if(T||(T=[0,0,0]),s||(s=[0,0,0]),L||(L=[0,0,0]),M||(M=[0,0,0,1]),z||(z=[0,0,0,1]),!e(v,E)||(n(b,v),b[3]=0,b[7]=0,b[11]=0,b[15]=1,Math.abs(f(b)<1e-8)))return!1;var D=v[3],N=v[7],I=v[11],k=v[12],B=v[13],O=v[14],H=v[15];if(D!==0||N!==0||I!==0){u[0]=D,u[1]=N,u[2]=I,u[3]=H;var Y=c(b,b);if(!Y)return!1;l(b,b),w(M,u,b)}else M[0]=M[1]=M[2]=0,M[3]=1;if(T[0]=k,T[1]=B,T[2]=O,A(o,v),s[0]=m.length(o[0]),m.normalize(o[0],o[0]),L[0]=m.dot(o[0],o[1]),_(o[1],o[1],o[0],1,-L[0]),s[1]=m.length(o[1]),m.normalize(o[1],o[1]),L[0]/=s[1],L[1]=m.dot(o[0],o[2]),_(o[2],o[2],o[0],1,-L[1]),L[2]=m.dot(o[1],o[2]),_(o[2],o[2],o[1],1,-L[2]),s[2]=m.length(o[2]),m.normalize(o[2],o[2]),L[1]/=s[2],L[2]/=s[2],m.cross(d,o[1],o[2]),m.dot(o[0],d)<0)for(var j=0;j<3;j++)s[j]*=-1,o[j][0]*=-1,o[j][1]*=-1,o[j][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+o[0][0]-o[1][1]-o[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-o[0][0]+o[1][1]-o[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-o[0][0]-o[1][1]+o[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+o[0][0]+o[1][1]+o[2][2],0)),o[2][1]>o[1][2]&&(z[0]=-z[0]),o[0][2]>o[2][0]&&(z[1]=-z[1]),o[1][0]>o[0][1]&&(z[2]=-z[2]),!0};function w(y,E,T){var s=E[0],L=E[1],M=E[2],z=E[3];return y[0]=T[0]*s+T[4]*L+T[8]*M+T[12]*z,y[1]=T[1]*s+T[5]*L+T[9]*M+T[13]*z,y[2]=T[2]*s+T[6]*L+T[10]*M+T[14]*z,y[3]=T[3]*s+T[7]*L+T[11]*M+T[15]*z,y}function A(y,E){y[0][0]=E[0],y[0][1]=E[1],y[0][2]=E[2],y[1][0]=E[4],y[1][1]=E[5],y[1][2]=E[6],y[2][0]=E[8],y[2][1]=E[9],y[2][2]=E[10]}function _(y,E,T,s,L){y[0]=E[0]*s+T[0]*L,y[1]=E[1]*s+T[1]*L,y[2]=E[2]*s+T[2]*L}},4690:function(h){h.exports=function(r,e){var a=e[15];if(a===0)return!1;for(var n=1/a,f=0;f<16;f++)r[f]=e[f]*n;return!0}},7649:function(h,p,r){var e=r(1868),a=r(1102),n=r(7191),f=r(7787),c=r(1116),l=u(),m=u(),v=u();h.exports=b;function b(w,A,_,y){if(f(A)===0||f(_)===0)return!1;var E=n(A,l.translate,l.scale,l.skew,l.perspective,l.quaternion),T=n(_,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!E||!T?!1:(e(v.translate,l.translate,m.translate,y),e(v.skew,l.skew,m.skew,y),e(v.scale,l.scale,m.scale,y),e(v.perspective,l.perspective,m.perspective,y),c(v.quaternion,l.quaternion,m.quaternion,y),a(w,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function u(){return{translate:o(),scale:o(1),skew:o(),perspective:d(),quaternion:d()}}function o(w){return[w||0,w||0,w||0]}function d(){return[0,0,0,1]}},1102:function(h,p,r){var e={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)};e.create();var a=e.create();h.exports=function(f,c,l,m,v,b){return e.identity(f),e.fromRotationTranslation(f,b,c),f[3]=v[0],f[7]=v[1],f[11]=v[2],f[15]=v[3],e.identity(a),m[2]!==0&&(a[9]=m[2],e.multiply(f,f,a)),m[1]!==0&&(a[9]=0,a[8]=m[1],e.multiply(f,f,a)),m[0]!==0&&(a[8]=0,a[4]=m[0],e.multiply(f,f,a)),e.scale(f,f,l),f}},9298:function(h,p,r){var e=r(5070),a=r(7649),n=r(7437),f=r(6109),c=r(7115),l=r(5240),m=r(3012),v=r(998);r(3668);var b=r(899),u=[0,0,0];h.exports=A;function o(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var d=o.prototype;d.recalcMatrix=function(_){var y=this._time,E=e.le(y,_),T=this.computedMatrix;if(!(E<0)){var s=this._components;if(E===y.length-1)for(var L=16*E,M=0;M<16;++M)T[M]=s[L++];else{for(var z=y[E+1]-y[E],L=16*E,D=this.prevMatrix,N=!0,M=0;M<16;++M)D[M]=s[L++];for(var I=this.nextMatrix,M=0;M<16;++M)I[M]=s[L++],N=N&&D[M]===I[M];if(z<1e-6||N)for(var M=0;M<16;++M)T[M]=D[M];else a(T,D,I,(_-y[E])/z)}var k=this.computedUp;k[0]=T[1],k[1]=T[5],k[2]=T[9],b(k,k);var B=this.computedInverse;n(B,T);var O=this.computedEye,H=B[15];O[0]=B[12]/H,O[1]=B[13]/H,O[2]=B[14]/H;for(var Y=this.computedCenter,j=Math.exp(this.computedRadius[0]),M=0;M<3;++M)Y[M]=O[M]-T[2+4*M]*j}},d.idle=function(_){if(!(_1&&e(n[m[o-2]],n[m[o-1]],u)<=0;)o-=1,m.pop();for(m.push(b),o=v.length;o>1&&e(n[v[o-2]],n[v[o-1]],u)>=0;)o-=1,v.pop();v.push(b)}for(var d=new Array(v.length+m.length-2),w=0,c=0,A=m.length;c0;--_)d[w++]=v[_];return d}},6145:function(h,p,r){h.exports=a;var e=r(4110);function a(n,f){f||(f=n,n=window);var c=0,l=0,m=0,v={shift:!1,alt:!1,control:!1,meta:!1},b=!1;function u(M){var z=!1;return"altKey"in M&&(z=z||M.altKey!==v.alt,v.alt=!!M.altKey),"shiftKey"in M&&(z=z||M.shiftKey!==v.shift,v.shift=!!M.shiftKey),"ctrlKey"in M&&(z=z||M.ctrlKey!==v.control,v.control=!!M.ctrlKey),"metaKey"in M&&(z=z||M.metaKey!==v.meta,v.meta=!!M.metaKey),z}function o(M,z){var D=e.x(z),N=e.y(z);"buttons"in z&&(M=z.buttons|0),(M!==c||D!==l||N!==m||u(z))&&(c=M|0,l=D||0,m=N||0,f&&f(c,l,m,v))}function d(M){o(0,M)}function w(){(c||l||m||v.shift||v.alt||v.meta||v.control)&&(l=m=0,c=0,v.shift=v.alt=v.control=v.meta=!1,f&&f(0,0,0,v))}function A(M){u(M)&&f&&f(c,l,m,v)}function _(M){e.buttons(M)===0?o(0,M):o(c,M)}function y(M){o(c|e.buttons(M),M)}function E(M){o(c&~e.buttons(M),M)}function T(){b||(b=!0,n.addEventListener("mousemove",_),n.addEventListener("mousedown",y),n.addEventListener("mouseup",E),n.addEventListener("mouseleave",d),n.addEventListener("mouseenter",d),n.addEventListener("mouseout",d),n.addEventListener("mouseover",d),n.addEventListener("blur",w),n.addEventListener("keyup",A),n.addEventListener("keydown",A),n.addEventListener("keypress",A),n!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function s(){b&&(b=!1,n.removeEventListener("mousemove",_),n.removeEventListener("mousedown",y),n.removeEventListener("mouseup",E),n.removeEventListener("mouseleave",d),n.removeEventListener("mouseenter",d),n.removeEventListener("mouseout",d),n.removeEventListener("mouseover",d),n.removeEventListener("blur",w),n.removeEventListener("keyup",A),n.removeEventListener("keydown",A),n.removeEventListener("keypress",A),n!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}T();var L={element:n};return Object.defineProperties(L,{enabled:{get:function(){return b},set:function(M){M?T():s()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return l},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),L}},2565:function(h){var p={left:0,top:0};h.exports=r;function r(a,n,f){n=n||a.currentTarget||a.srcElement,Array.isArray(f)||(f=[0,0]);var c=a.clientX||0,l=a.clientY||0,m=e(n);return f[0]=c-m.left,f[1]=l-m.top,f}function e(a){return a===window||a===document||a===document.body?p:a.getBoundingClientRect()}},4110:function(h,p){function r(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var c=f.which;if(c===2)return 4;if(c===3)return 2;if(c>0)return 1<=0)return 1<0){if(it=1,X[V++]=v(T[z],w,A,_),z+=Y,y>0)for(et=1,D=T[z],Q=X[V]=v(D,w,A,_),Z=X[V+ot],ct=X[V+st],wt=X[V+gt],(Q!==Z||Q!==ct||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,Z,ct,wt,w,A,_),Rt=tt[V]=ut++),V+=1,z+=Y,et=2;et0)for(et=1,D=T[z],Q=X[V]=v(D,w,A,_),Z=X[V+ot],ct=X[V+st],wt=X[V+gt],(Q!==Z||Q!==ct||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,Z,ct,wt,w,A,_),Rt=tt[V]=ut++,wt!==ct&&m(tt[V+st],Rt,B,H,ct,wt,w,A,_)),V+=1,z+=Y,et=2;et0){if(et=1,X[V++]=v(T[z],w,A,_),z+=Y,E>0)for(it=1,D=T[z],Q=X[V]=v(D,w,A,_),ct=X[V+st],Z=X[V+ot],wt=X[V+gt],(Q!==ct||Q!==Z||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,ct,Z,wt,w,A,_),Rt=tt[V]=ut++),V+=1,z+=Y,it=2;it0)for(it=1,D=T[z],Q=X[V]=v(D,w,A,_),ct=X[V+st],Z=X[V+ot],wt=X[V+gt],(Q!==ct||Q!==Z||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,ct,Z,wt,w,A,_),Rt=tt[V]=ut++,wt!==ct&&m(tt[V+st],Rt,H,I,wt,ct,w,A,_)),V+=1,z+=Y,it=2;it 0"),typeof c.vertex!="function"&&l("Must specify vertex creation function"),typeof c.cell!="function"&&l("Must specify cell creation function"),typeof c.phase!="function"&&l("Must specify phase function");for(var u=c.getters||[],o=new Array(v),d=0;d=0?o[d]=!0:o[d]=!1;return n(c.vertex,c.cell,c.phase,b,m,o)}},9144:function(h,p,r){var e=r(3094),a={zero:function(A,_,y,E){var T=A[0],s=y[0];E|=0;var L=0,M=s;for(L=0;L2&&L[1]>2&&E(s.pick(-1,-1).lo(1,1).hi(L[0]-2,L[1]-2),T.pick(-1,-1,0).lo(1,1).hi(L[0]-2,L[1]-2),T.pick(-1,-1,1).lo(1,1).hi(L[0]-2,L[1]-2)),L[1]>2&&(y(s.pick(0,-1).lo(1).hi(L[1]-2),T.pick(0,-1,1).lo(1).hi(L[1]-2)),_(T.pick(0,-1,0).lo(1).hi(L[1]-2))),L[1]>2&&(y(s.pick(L[0]-1,-1).lo(1).hi(L[1]-2),T.pick(L[0]-1,-1,1).lo(1).hi(L[1]-2)),_(T.pick(L[0]-1,-1,0).lo(1).hi(L[1]-2))),L[0]>2&&(y(s.pick(-1,0).lo(1).hi(L[0]-2),T.pick(-1,0,0).lo(1).hi(L[0]-2)),_(T.pick(-1,0,1).lo(1).hi(L[0]-2))),L[0]>2&&(y(s.pick(-1,L[1]-1).lo(1).hi(L[0]-2),T.pick(-1,L[1]-1,0).lo(1).hi(L[0]-2)),_(T.pick(-1,L[1]-1,1).lo(1).hi(L[0]-2))),T.set(0,0,0,0),T.set(0,0,1,0),T.set(L[0]-1,0,0,0),T.set(L[0]-1,0,1,0),T.set(0,L[1]-1,0,0),T.set(0,L[1]-1,1,0),T.set(L[0]-1,L[1]-1,0,0),T.set(L[0]-1,L[1]-1,1,0),T}}function w(A){var _=A.join(),L=v[_];if(L)return L;for(var y=A.length,E=[b,u],T=1;T<=y;++T)E.push(o(T));var s=d,L=s.apply(void 0,E);return v[_]=L,L}h.exports=function(_,y,E){if(Array.isArray(E)||(typeof E=="string"?E=e(y.dimension,E):E=e(y.dimension,"clamp")),y.size===0)return _;if(y.dimension===0)return _.set(0),_;var T=w(E);return T(_,y)}},3581:function(h){function p(f,c){var l=Math.floor(c),m=c-l,v=0<=l&&l0;){B<64?(y=B,B=0):(y=64,B-=64);for(var O=v[1]|0;O>0;){O<64?(E=O,O=0):(E=64,O-=64),o=I+B*s+O*L,A=k+B*z+O*D;var H=0,Y=0,j=0,et=M,it=s-T*M,ut=L-y*s,J=N,X=z-T*N,tt=D-y*z;for(j=0;j0;){D<64?(y=D,D=0):(y=64,D-=64);for(var N=v[0]|0;N>0;){N<64?(_=N,N=0):(_=64,N-=64),o=M+D*T+N*E,A=z+D*L+N*s;var I=0,k=0,B=T,O=E-y*T,H=L,Y=s-y*L;for(k=0;k<_;++k){for(I=0;I0;){k<64?(E=k,k=0):(E=64,k-=64);for(var B=v[0]|0;B>0;){B<64?(_=B,B=0):(_=64,B-=64);for(var O=v[1]|0;O>0;){O<64?(y=O,O=0):(y=64,O-=64),o=N+k*L+B*T+O*s,A=I+k*D+B*M+O*z;var H=0,Y=0,j=0,et=L,it=T-E*L,ut=s-_*T,J=D,X=M-E*D,tt=z-_*M;for(j=0;jd;){H=0,Y=I-y;e:for(B=0;Bet)break e;Y+=M,H+=z}for(H=I,Y=I-y,B=0;B>1,O=B-N,H=B+N,Y=I,j=O,et=B,it=H,ut=k,J=w+1,X=A-1,tt=!0,V,Q,ot,$,Z,st,nt,ct,gt,Tt=0,wt=0,Rt=0,bt,At,mt,Lt,Ht,Ut,kt,Vt,It,re,Kt,$t,le,he,de,xe,Se=L,ne=u(Se),zt=u(Se);At=E*Y,mt=E*j,xe=y;t:for(bt=0;bt0){Q=Y,Y=j,j=Q;break t}if(Rt<0)break t;xe+=z}At=E*it,mt=E*ut,xe=y;t:for(bt=0;bt0){Q=it,it=ut,ut=Q;break t}if(Rt<0)break t;xe+=z}At=E*Y,mt=E*et,xe=y;t:for(bt=0;bt0){Q=Y,Y=et,et=Q;break t}if(Rt<0)break t;xe+=z}At=E*j,mt=E*et,xe=y;t:for(bt=0;bt0){Q=j,j=et,et=Q;break t}if(Rt<0)break t;xe+=z}At=E*Y,mt=E*it,xe=y;t:for(bt=0;bt0){Q=Y,Y=it,it=Q;break t}if(Rt<0)break t;xe+=z}At=E*et,mt=E*it,xe=y;t:for(bt=0;bt0){Q=et,et=it,it=Q;break t}if(Rt<0)break t;xe+=z}At=E*j,mt=E*ut,xe=y;t:for(bt=0;bt0){Q=j,j=ut,ut=Q;break t}if(Rt<0)break t;xe+=z}At=E*j,mt=E*et,xe=y;t:for(bt=0;bt0){Q=j,j=et,et=Q;break t}if(Rt<0)break t;xe+=z}At=E*it,mt=E*ut,xe=y;t:for(bt=0;bt0){Q=it,it=ut,ut=Q;break t}if(Rt<0)break t;xe+=z}for(At=E*Y,mt=E*j,Lt=E*et,Ht=E*it,Ut=E*ut,kt=E*I,Vt=E*B,It=E*k,de=0,xe=y,bt=0;bt0)X--;else if(Rt<0){for(At=E*st,mt=E*J,Lt=E*X,xe=y,bt=0;bt0)for(;;){nt=y+X*E,de=0;t:for(bt=0;bt0){if(--Xk){t:for(;;){for(nt=y+J*E,de=0,xe=y,bt=0;bt1&&d?A(o,d[0],d[1]):A(o)}var m={"uint32,1,0":function(b,u){return function(o){var d=o.data,w=o.offset|0,A=o.shape,_=o.stride,y=_[0]|0,E=A[0]|0,T=_[1]|0,s=A[1]|0,L=T,M=T,z=1;E<=32?b(0,E-1,d,w,y,T,E,s,L,M,z):u(0,E-1,d,w,y,T,E,s,L,M,z)}}};function v(b,u){var o=[u,b].join(","),d=m[o],w=f(b,u),A=l(b,u,w);return d(w,A)}h.exports=v},8729:function(h,p,r){var e=r(8139),a={};function n(f){var c=f.order,l=f.dtype,m=[c,l],v=m.join(":"),b=a[v];return b||(a[v]=b=e(c,l)),b(f),f}h.exports=n},5050:function(h,p,r){var e=r(4780),a=typeof Float64Array<"u";function n(u,o){return u[0]-o[0]}function f(){var u=this.stride,o=new Array(u.length),d;for(d=0;d=0&&(T=y|0,E+=L*T,s-=T),new w(this.data,s,L,E)},A.step=function(y){var E=this.shape[0],T=this.stride[0],s=this.offset,L=0,M=Math.ceil;return typeof y=="number"&&(L=y|0,L<0?(s+=T*(E-1),E=M(-E/L)):E=M(E/L),T*=L),new w(this.data,E,T,s)},A.transpose=function(y){y=y===void 0?0:y|0;var E=this.shape,T=this.stride;return new w(this.data,E[y],T[y],this.offset)},A.pick=function(y){var E=[],T=[],s=this.offset;typeof y=="number"&&y>=0?s=s+this.stride[0]*y|0:(E.push(this.shape[0]),T.push(this.stride[0]));var L=o[E.length+1];return L(this.data,E,T,s)},function(y,E,T,s){return new w(y,E[0],T[0],s)}},2:function(u,o,d){function w(_,y,E,T,s,L){this.data=_,this.shape=[y,E],this.stride=[T,s],this.offset=L|0}var A=w.prototype;return A.dtype=u,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(y,E,T){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E,T):this.data[this.offset+this.stride[0]*y+this.stride[1]*E]=T},A.get=function(y,E){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E):this.data[this.offset+this.stride[0]*y+this.stride[1]*E]},A.index=function(y,E){return this.offset+this.stride[0]*y+this.stride[1]*E},A.hi=function(y,E){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(y,E){var T=this.offset,s=0,L=this.shape[0],M=this.shape[1],z=this.stride[0],D=this.stride[1];return typeof y=="number"&&y>=0&&(s=y|0,T+=z*s,L-=s),typeof E=="number"&&E>=0&&(s=E|0,T+=D*s,M-=s),new w(this.data,L,M,z,D,T)},A.step=function(y,E){var T=this.shape[0],s=this.shape[1],L=this.stride[0],M=this.stride[1],z=this.offset,D=0,N=Math.ceil;return typeof y=="number"&&(D=y|0,D<0?(z+=L*(T-1),T=N(-T/D)):T=N(T/D),L*=D),typeof E=="number"&&(D=E|0,D<0?(z+=M*(s-1),s=N(-s/D)):s=N(s/D),M*=D),new w(this.data,T,s,L,M,z)},A.transpose=function(y,E){y=y===void 0?0:y|0,E=E===void 0?1:E|0;var T=this.shape,s=this.stride;return new w(this.data,T[y],T[E],s[y],s[E],this.offset)},A.pick=function(y,E){var T=[],s=[],L=this.offset;typeof y=="number"&&y>=0?L=L+this.stride[0]*y|0:(T.push(this.shape[0]),s.push(this.stride[0])),typeof E=="number"&&E>=0?L=L+this.stride[1]*E|0:(T.push(this.shape[1]),s.push(this.stride[1]));var M=o[T.length+1];return M(this.data,T,s,L)},function(y,E,T,s){return new w(y,E[0],E[1],T[0],T[1],s)}},3:function(u,o,d){function w(_,y,E,T,s,L,M,z){this.data=_,this.shape=[y,E,T],this.stride=[s,L,M],this.offset=z|0}var A=w.prototype;return A.dtype=u,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var y=Math.abs(this.stride[0]),E=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return y>E?E>T?[2,1,0]:y>T?[1,2,0]:[1,0,2]:y>T?[2,0,1]:T>E?[0,1,2]:[0,2,1]}}),A.set=function(y,E,T,s){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T,s):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T]=s},A.get=function(y,E,T){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T]},A.index=function(y,E,T){return this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T},A.hi=function(y,E,T){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(y,E,T){var s=this.offset,L=0,M=this.shape[0],z=this.shape[1],D=this.shape[2],N=this.stride[0],I=this.stride[1],k=this.stride[2];return typeof y=="number"&&y>=0&&(L=y|0,s+=N*L,M-=L),typeof E=="number"&&E>=0&&(L=E|0,s+=I*L,z-=L),typeof T=="number"&&T>=0&&(L=T|0,s+=k*L,D-=L),new w(this.data,M,z,D,N,I,k,s)},A.step=function(y,E,T){var s=this.shape[0],L=this.shape[1],M=this.shape[2],z=this.stride[0],D=this.stride[1],N=this.stride[2],I=this.offset,k=0,B=Math.ceil;return typeof y=="number"&&(k=y|0,k<0?(I+=z*(s-1),s=B(-s/k)):s=B(s/k),z*=k),typeof E=="number"&&(k=E|0,k<0?(I+=D*(L-1),L=B(-L/k)):L=B(L/k),D*=k),typeof T=="number"&&(k=T|0,k<0?(I+=N*(M-1),M=B(-M/k)):M=B(M/k),N*=k),new w(this.data,s,L,M,z,D,N,I)},A.transpose=function(y,E,T){y=y===void 0?0:y|0,E=E===void 0?1:E|0,T=T===void 0?2:T|0;var s=this.shape,L=this.stride;return new w(this.data,s[y],s[E],s[T],L[y],L[E],L[T],this.offset)},A.pick=function(y,E,T){var s=[],L=[],M=this.offset;typeof y=="number"&&y>=0?M=M+this.stride[0]*y|0:(s.push(this.shape[0]),L.push(this.stride[0])),typeof E=="number"&&E>=0?M=M+this.stride[1]*E|0:(s.push(this.shape[1]),L.push(this.stride[1])),typeof T=="number"&&T>=0?M=M+this.stride[2]*T|0:(s.push(this.shape[2]),L.push(this.stride[2]));var z=o[s.length+1];return z(this.data,s,L,M)},function(y,E,T,s){return new w(y,E[0],E[1],E[2],T[0],T[1],T[2],s)}},4:function(u,o,d){function w(_,y,E,T,s,L,M,z,D,N){this.data=_,this.shape=[y,E,T,s],this.stride=[L,M,z,D],this.offset=N|0}var A=w.prototype;return A.dtype=u,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:d}),A.set=function(y,E,T,s,L){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s,L):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s]=L},A.get=function(y,E,T,s){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s]},A.index=function(y,E,T,s){return this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s},A.hi=function(y,E,T,s){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof s!="number"||s<0?this.shape[3]:s|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(y,E,T,s){var L=this.offset,M=0,z=this.shape[0],D=this.shape[1],N=this.shape[2],I=this.shape[3],k=this.stride[0],B=this.stride[1],O=this.stride[2],H=this.stride[3];return typeof y=="number"&&y>=0&&(M=y|0,L+=k*M,z-=M),typeof E=="number"&&E>=0&&(M=E|0,L+=B*M,D-=M),typeof T=="number"&&T>=0&&(M=T|0,L+=O*M,N-=M),typeof s=="number"&&s>=0&&(M=s|0,L+=H*M,I-=M),new w(this.data,z,D,N,I,k,B,O,H,L)},A.step=function(y,E,T,s){var L=this.shape[0],M=this.shape[1],z=this.shape[2],D=this.shape[3],N=this.stride[0],I=this.stride[1],k=this.stride[2],B=this.stride[3],O=this.offset,H=0,Y=Math.ceil;return typeof y=="number"&&(H=y|0,H<0?(O+=N*(L-1),L=Y(-L/H)):L=Y(L/H),N*=H),typeof E=="number"&&(H=E|0,H<0?(O+=I*(M-1),M=Y(-M/H)):M=Y(M/H),I*=H),typeof T=="number"&&(H=T|0,H<0?(O+=k*(z-1),z=Y(-z/H)):z=Y(z/H),k*=H),typeof s=="number"&&(H=s|0,H<0?(O+=B*(D-1),D=Y(-D/H)):D=Y(D/H),B*=H),new w(this.data,L,M,z,D,N,I,k,B,O)},A.transpose=function(y,E,T,s){y=y===void 0?0:y|0,E=E===void 0?1:E|0,T=T===void 0?2:T|0,s=s===void 0?3:s|0;var L=this.shape,M=this.stride;return new w(this.data,L[y],L[E],L[T],L[s],M[y],M[E],M[T],M[s],this.offset)},A.pick=function(y,E,T,s){var L=[],M=[],z=this.offset;typeof y=="number"&&y>=0?z=z+this.stride[0]*y|0:(L.push(this.shape[0]),M.push(this.stride[0])),typeof E=="number"&&E>=0?z=z+this.stride[1]*E|0:(L.push(this.shape[1]),M.push(this.stride[1])),typeof T=="number"&&T>=0?z=z+this.stride[2]*T|0:(L.push(this.shape[2]),M.push(this.stride[2])),typeof s=="number"&&s>=0?z=z+this.stride[3]*s|0:(L.push(this.shape[3]),M.push(this.stride[3]));var D=o[L.length+1];return D(this.data,L,M,z)},function(y,E,T,s){return new w(y,E[0],E[1],E[2],E[3],T[0],T[1],T[2],T[3],s)}},5:function(o,d,w){function A(y,E,T,s,L,M,z,D,N,I,k,B){this.data=y,this.shape=[E,T,s,L,M],this.stride=[z,D,N,I,k],this.offset=B|0}var _=A.prototype;return _.dtype=o,_.dimension=5,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(_,"order",{get:w}),_.set=function(E,T,s,L,M,z){return o==="generic"?this.data.set(this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M,z):this.data[this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M]=z},_.get=function(E,T,s,L,M){return o==="generic"?this.data.get(this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M):this.data[this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M]},_.index=function(E,T,s,L,M){return this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M},_.hi=function(E,T,s,L,M){return new A(this.data,typeof E!="number"||E<0?this.shape[0]:E|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof s!="number"||s<0?this.shape[2]:s|0,typeof L!="number"||L<0?this.shape[3]:L|0,typeof M!="number"||M<0?this.shape[4]:M|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},_.lo=function(E,T,s,L,M){var z=this.offset,D=0,N=this.shape[0],I=this.shape[1],k=this.shape[2],B=this.shape[3],O=this.shape[4],H=this.stride[0],Y=this.stride[1],j=this.stride[2],et=this.stride[3],it=this.stride[4];return typeof E=="number"&&E>=0&&(D=E|0,z+=H*D,N-=D),typeof T=="number"&&T>=0&&(D=T|0,z+=Y*D,I-=D),typeof s=="number"&&s>=0&&(D=s|0,z+=j*D,k-=D),typeof L=="number"&&L>=0&&(D=L|0,z+=et*D,B-=D),typeof M=="number"&&M>=0&&(D=M|0,z+=it*D,O-=D),new A(this.data,N,I,k,B,O,H,Y,j,et,it,z)},_.step=function(E,T,s,L,M){var z=this.shape[0],D=this.shape[1],N=this.shape[2],I=this.shape[3],k=this.shape[4],B=this.stride[0],O=this.stride[1],H=this.stride[2],Y=this.stride[3],j=this.stride[4],et=this.offset,it=0,ut=Math.ceil;return typeof E=="number"&&(it=E|0,it<0?(et+=B*(z-1),z=ut(-z/it)):z=ut(z/it),B*=it),typeof T=="number"&&(it=T|0,it<0?(et+=O*(D-1),D=ut(-D/it)):D=ut(D/it),O*=it),typeof s=="number"&&(it=s|0,it<0?(et+=H*(N-1),N=ut(-N/it)):N=ut(N/it),H*=it),typeof L=="number"&&(it=L|0,it<0?(et+=Y*(I-1),I=ut(-I/it)):I=ut(I/it),Y*=it),typeof M=="number"&&(it=M|0,it<0?(et+=j*(k-1),k=ut(-k/it)):k=ut(k/it),j*=it),new A(this.data,z,D,N,I,k,B,O,H,Y,j,et)},_.transpose=function(E,T,s,L,M){E=E===void 0?0:E|0,T=T===void 0?1:T|0,s=s===void 0?2:s|0,L=L===void 0?3:L|0,M=M===void 0?4:M|0;var z=this.shape,D=this.stride;return new A(this.data,z[E],z[T],z[s],z[L],z[M],D[E],D[T],D[s],D[L],D[M],this.offset)},_.pick=function(E,T,s,L,M){var z=[],D=[],N=this.offset;typeof E=="number"&&E>=0?N=N+this.stride[0]*E|0:(z.push(this.shape[0]),D.push(this.stride[0])),typeof T=="number"&&T>=0?N=N+this.stride[1]*T|0:(z.push(this.shape[1]),D.push(this.stride[1])),typeof s=="number"&&s>=0?N=N+this.stride[2]*s|0:(z.push(this.shape[2]),D.push(this.stride[2])),typeof L=="number"&&L>=0?N=N+this.stride[3]*L|0:(z.push(this.shape[3]),D.push(this.stride[3])),typeof M=="number"&&M>=0?N=N+this.stride[4]*M|0:(z.push(this.shape[4]),D.push(this.stride[4]));var I=d[z.length+1];return I(this.data,z,D,N)},function(E,T,s,L){return new A(E,T[0],T[1],T[2],T[3],T[4],s[0],s[1],s[2],s[3],s[4],L)}}};function l(u,o){var d=o===-1?"T":String(o),w=c[d];return o===-1?w(u):o===0?w(u,v[u][0]):w(u,v[u],f)}function m(u){if(e(u))return"buffer";if(a)switch(Object.prototype.toString.call(u)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(u)?"array":"generic"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function b(u,o,d,w){if(u===void 0){var s=v.array[0];return s([])}else typeof u=="number"&&(u=[u]);o===void 0&&(o=[u.length]);var A=o.length;if(d===void 0){d=new Array(A);for(var _=A-1,y=1;_>=0;--_)d[_]=y,y*=o[_]}if(w===void 0){w=0;for(var _=0;_>>0;h.exports=f;function f(c,l){if(isNaN(c)||isNaN(l))return NaN;if(c===l)return c;if(c===0)return l<0?-a:a;var m=e.hi(c),v=e.lo(c);return l>c==c>0?v===n?(m+=1,v=0):v+=1:v===0?(v=n,m-=1):v-=1,e.pack(v,m)}},115:function(h,p){var r=1e-6,e=1e-6;p.vertexNormals=function(a,n,f){for(var c=n.length,l=new Array(c),m=f===void 0?r:f,v=0;vm)for(var z=l[o],D=1/Math.sqrt(T*L),M=0;M<3;++M){var N=(M+1)%3,I=(M+2)%3;z[M]+=D*(s[N]*E[I]-s[I]*E[N])}}for(var v=0;vm)for(var D=1/Math.sqrt(k),M=0;M<3;++M)z[M]*=D;else for(var M=0;M<3;++M)z[M]=0}return l},p.faceNormals=function(a,n,f){for(var c=a.length,l=new Array(c),m=f===void 0?e:f,v=0;vm?_=1/Math.sqrt(_):_=0;for(var o=0;o<3;++o)A[o]*=_;l[v]=A}return l}},567:function(h){h.exports=p;function p(r,e,a,n,f,c,l,m,v,b){var u=e+c+b;if(o>0){var o=Math.sqrt(u+1);r[0]=.5*(l-v)/o,r[1]=.5*(m-n)/o,r[2]=.5*(a-c)/o,r[3]=.5*o}else{var d=Math.max(e,c,b),o=Math.sqrt(2*d-u+1);e>=d?(r[0]=.5*o,r[1]=.5*(f+a)/o,r[2]=.5*(m+n)/o,r[3]=.5*(l-v)/o):c>=d?(r[0]=.5*(a+f)/o,r[1]=.5*o,r[2]=.5*(v+l)/o,r[3]=.5*(m-n)/o):(r[0]=.5*(n+m)/o,r[1]=.5*(l+v)/o,r[2]=.5*o,r[3]=.5*(a-f)/o)}return r}},7774:function(h,p,r){h.exports=o;var e=r(8444),a=r(3012),n=r(5950),f=r(7437),c=r(567);function l(d,w,A){return Math.sqrt(Math.pow(d,2)+Math.pow(w,2)+Math.pow(A,2))}function m(d,w,A,_){return Math.sqrt(Math.pow(d,2)+Math.pow(w,2)+Math.pow(A,2)+Math.pow(_,2))}function v(d,w){var A=w[0],_=w[1],y=w[2],E=w[3],T=m(A,_,y,E);T>1e-6?(d[0]=A/T,d[1]=_/T,d[2]=y/T,d[3]=E/T):(d[0]=d[1]=d[2]=0,d[3]=1)}function b(d,w,A){this.radius=e([A]),this.center=e(w),this.rotation=e(d),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var u=b.prototype;u.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},u.recalcMatrix=function(d){this.radius.curve(d),this.center.curve(d),this.rotation.curve(d);var w=this.computedRotation;v(w,w);var A=this.computedMatrix;n(A,w);var _=this.computedCenter,y=this.computedEye,E=this.computedUp,T=Math.exp(this.computedRadius[0]);y[0]=_[0]+T*A[2],y[1]=_[1]+T*A[6],y[2]=_[2]+T*A[10],E[0]=A[1],E[1]=A[5],E[2]=A[9];for(var s=0;s<3;++s){for(var L=0,M=0;M<3;++M)L+=A[s+4*M]*y[M];A[12+s]=-L}},u.getMatrix=function(d,w){this.recalcMatrix(d);var A=this.computedMatrix;if(w){for(var _=0;_<16;++_)w[_]=A[_];return w}return A},u.idle=function(d){this.center.idle(d),this.radius.idle(d),this.rotation.idle(d)},u.flush=function(d){this.center.flush(d),this.radius.flush(d),this.rotation.flush(d)},u.pan=function(d,w,A,_){w=w||0,A=A||0,_=_||0,this.recalcMatrix(d);var y=this.computedMatrix,E=y[1],T=y[5],s=y[9],L=l(E,T,s);E/=L,T/=L,s/=L;var M=y[0],z=y[4],D=y[8],N=M*E+z*T+D*s;M-=E*N,z-=T*N,D-=s*N;var I=l(M,z,D);M/=I,z/=I,D/=I,y[2],y[6],y[10];var k=M*w+E*A,B=z*w+T*A,O=D*w+s*A;this.center.move(d,k,B,O);var H=Math.exp(this.computedRadius[0]);H=Math.max(1e-4,H+_),this.radius.set(d,Math.log(H))},u.rotate=function(d,w,A,_){this.recalcMatrix(d),w=w||0,A=A||0;var y=this.computedMatrix,E=y[0],T=y[4],s=y[8],L=y[1],M=y[5],z=y[9],D=y[2],N=y[6],I=y[10],k=w*E+A*L,B=w*T+A*M,O=w*s+A*z,H=-(N*O-I*B),Y=-(I*k-D*O),j=-(D*B-N*k),et=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(Y,2)-Math.pow(j,2))),it=m(H,Y,j,et);it>1e-6?(H/=it,Y/=it,j/=it,et/=it):(H=Y=j=0,et=1);var ut=this.computedRotation,J=ut[0],X=ut[1],tt=ut[2],V=ut[3],Q=J*et+V*H+X*j-tt*Y,ot=X*et+V*Y+tt*H-J*j,$=tt*et+V*j+J*Y-X*H,Z=V*et-J*H-X*Y-tt*j;if(_){H=D,Y=N,j=I;var st=Math.sin(_)/l(H,Y,j);H*=st,Y*=st,j*=st,et=Math.cos(w),Q=Q*et+Z*H+ot*j-$*Y,ot=ot*et+Z*Y+$*H-Q*j,$=$*et+Z*j+Q*Y-ot*H,Z=Z*et-Q*H-ot*Y-$*j}var nt=m(Q,ot,$,Z);nt>1e-6?(Q/=nt,ot/=nt,$/=nt,Z/=nt):(Q=ot=$=0,Z=1),this.rotation.set(d,Q,ot,$,Z)},u.lookAt=function(d,w,A,_){this.recalcMatrix(d),A=A||this.computedCenter,w=w||this.computedEye,_=_||this.computedUp;var y=this.computedMatrix;a(y,w,A,_);var E=this.computedRotation;c(E,y[0],y[1],y[2],y[4],y[5],y[6],y[8],y[9],y[10]),v(E,E),this.rotation.set(d,E[0],E[1],E[2],E[3]);for(var T=0,s=0;s<3;++s)T+=Math.pow(A[s]-w[s],2);this.radius.set(d,.5*Math.log(Math.max(T,1e-6))),this.center.set(d,A[0],A[1],A[2])},u.translate=function(d,w,A,_){this.center.move(d,w||0,A||0,_||0)},u.setMatrix=function(d,w){var A=this.computedRotation;c(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),v(A,A),this.rotation.set(d,A[0],A[1],A[2],A[3]);var _=this.computedMatrix;f(_,w);var y=_[15];if(Math.abs(y)>1e-6){var E=_[12]/y,T=_[13]/y,s=_[14]/y;this.recalcMatrix(d);var L=Math.exp(this.computedRadius[0]);this.center.set(d,E-_[2]*L,T-_[6]*L,s-_[10]*L),this.radius.idle(d)}else this.center.idle(d),this.radius.idle(d)},u.setDistance=function(d,w){w>0&&this.radius.set(d,Math.log(w))},u.setDistanceLimits=function(d,w){d>0?d=Math.log(d):d=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,d),this.radius.bounds[0][0]=d,this.radius.bounds[1][0]=w},u.getDistanceLimits=function(d){var w=this.radius.bounds;return d?(d[0]=Math.exp(w[0][0]),d[1]=Math.exp(w[1][0]),d):[Math.exp(w[0][0]),Math.exp(w[1][0])]},u.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},u.fromJSON=function(d){var w=this.lastT(),A=d.center;A&&this.center.set(w,A[0],A[1],A[2]);var _=d.rotation;_&&this.rotation.set(w,_[0],_[1],_[2],_[3]);var y=d.distance;y&&y>0&&this.radius.set(w,Math.log(y)),this.setDistanceLimits(d.zoomMin,d.zoomMax)};function o(d){d=d||{};var w=d.center||[0,0,0],A=d.rotation||[0,0,0,1],_=d.radius||1;w=[].slice.call(w,0,3),A=[].slice.call(A,0,4),v(A,A);var y=new b(A,w,Math.log(_));return y.setDistanceLimits(d.zoomMin,d.zoomMax),("eye"in d||"up"in d)&&y.lookAt(0,d.eye,d.center,d.up),y}},4930:function(h,p,r){/*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. -*/var e=r(6184);v.exports=function(n,f,c){return c=typeof c<"u"?c+"":" ",e(c,f)+n}},4405:function(v){v.exports=function(r,e){e||(e=[0,""]),r=String(r);var a=parseFloat(r,10);return e[0]=a,e[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},4166:function(v,p,r){v.exports=a;var e=r(9398);function a(n,f){for(var c=f.length|0,l=n.length,m=[new Array(c),new Array(c)],h=0;h0){M=m[N][s][0],D=N;break}z=M[D^1];for(var I=0;I<2;++I)for(var k=m[I][s],B=0;B0&&(M=O,z=H,D=I)}return L||M&&o(M,D),z}function w(T,s){var L=m[s][T][0],M=[T];o(L,s);for(var z=L[s^1];;){for(;z!==T;)M.push(z),z=d(M[M.length-2],z,!1);if(m[0][T].length+m[1][T].length===0)break;var D=M[M.length-1],N=T,I=M[1],k=d(D,N,!0);if(e(f[D],f[N],f[I],f[k])<0)break;M.push(T),z=d(D,N)}return M}function A(T,s){return s[1]===s[s.length-1]}for(var h=0;h0;){m[0][h].length;var E=w(h,_);A(y,E)?y.push.apply(y,E):(y.length>0&&u.push(y),y=E)}y.length>0&&u.push(y)}return u}},3959:function(v,p,r){v.exports=a;var e=r(8348);function a(n,f){for(var c=e(n,f.length),l=new Array(f.length),m=new Array(f.length),h=[],b=0;b0;){var o=h.pop();l[o]=!1;for(var d=c[o],b=0;b0}y=y.filter(E);for(var T=y.length,s=new Array(T),L=new Array(T),_=0;_0;){var st=ot.pop(),nt=et[st];l(nt,function(Rt,bt){return Rt-bt});var ct=nt.length,gt=$[st],Tt;if(gt===0){var k=y[st];Tt=[k]}for(var _=0;_=0)&&($[wt]=gt^1,ot.push(wt),gt===0)){var k=y[wt];Q(k)||(k.reverse(),Tt.push(k))}}gt===0&&Z.push(Tt)}return Z}},211:function(v,p,r){v.exports=d;var e=r(417)[3],a=r(4385),n=r(9014),f=r(5070);function c(){return!0}function l(w){return function(A,_){var y=w[A];return y?!!y.queryPoint(_,c):!1}}function m(w){for(var A={},_=0;_0&&A[y]===_[0])E=w[y-1];else return 1;for(var T=1;E;){var s=E.key,L=e(_,s[0],s[1]);if(s[0][0]0)T=-1,E=E.right;else return 0;else if(L>0)E=E.left;else if(L<0)T=1,E=E.right;else return 0}return T}}function b(w){return 1}function u(w){return function(_){return w(_[0],_[1])?0:1}}function o(w,A){return function(y){return w(y[0],y[1])?0:A(y)}}function d(w){for(var A=w.length,_=[],y=[],E=0;E=b?(s=1,M=b+2*d+A):(s=-d/b,M=d*s+A)):(s=0,w>=0?(L=0,M=A):-w>=o?(L=1,M=o+2*w+A):(L=-w/o,M=w*L+A));else if(L<0)L=0,d>=0?(s=0,M=A):-d>=b?(s=1,M=b+2*d+A):(s=-d/b,M=d*s+A);else{var z=1/T;s*=z,L*=z,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A}else{var D,N,I,k;s<0?(D=u+d,N=o+w,N>D?(I=N-D,k=b-2*u+o,I>=k?(s=1,L=0,M=b+2*d+A):(s=I/k,L=1-s,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)):(s=0,N<=0?(L=1,M=o+2*w+A):w>=0?(L=0,M=A):(L=-w/o,M=w*L+A))):L<0?(D=u+w,N=b+d,N>D?(I=N-D,k=b-2*u+o,I>=k?(L=1,s=0,M=o+2*w+A):(L=I/k,s=1-L,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)):(L=0,N<=0?(s=1,M=b+2*d+A):d>=0?(s=0,M=A):(s=-d/b,M=d*s+A))):(I=o+w-u-d,I<=0?(s=0,L=1,M=o+2*w+A):(k=b-2*u+o,I>=k?(s=1,L=0,M=b+2*d+A):(s=I/k,L=1-s,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)))}for(var B=1-s-L,h=0;h0){var o=c[m-1];if(e(b,o)===0&&n(o)!==u){m-=1;continue}}c[m++]=b}}return c.length=m,c}},6184:function(v){/*! +*/var e=r(6184);h.exports=function(n,f,c){return c=typeof c<"u"?c+"":" ",e(c,f)+n}},4405:function(h){h.exports=function(r,e){e||(e=[0,""]),r=String(r);var a=parseFloat(r,10);return e[0]=a,e[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},4166:function(h,p,r){h.exports=a;var e=r(9398);function a(n,f){for(var c=f.length|0,l=n.length,m=[new Array(c),new Array(c)],v=0;v0){M=m[N][s][0],D=N;break}z=M[D^1];for(var I=0;I<2;++I)for(var k=m[I][s],B=0;B0&&(M=O,z=H,D=I)}return L||M&&o(M,D),z}function w(T,s){var L=m[s][T][0],M=[T];o(L,s);for(var z=L[s^1];;){for(;z!==T;)M.push(z),z=d(M[M.length-2],z,!1);if(m[0][T].length+m[1][T].length===0)break;var D=M[M.length-1],N=T,I=M[1],k=d(D,N,!0);if(e(f[D],f[N],f[I],f[k])<0)break;M.push(T),z=d(D,N)}return M}function A(T,s){return s[1]===s[s.length-1]}for(var v=0;v0;){m[0][v].length;var E=w(v,_);A(y,E)?y.push.apply(y,E):(y.length>0&&u.push(y),y=E)}y.length>0&&u.push(y)}return u}},3959:function(h,p,r){h.exports=a;var e=r(8348);function a(n,f){for(var c=e(n,f.length),l=new Array(f.length),m=new Array(f.length),v=[],b=0;b0;){var o=v.pop();l[o]=!1;for(var d=c[o],b=0;b0}y=y.filter(E);for(var T=y.length,s=new Array(T),L=new Array(T),_=0;_0;){var st=ot.pop(),nt=et[st];l(nt,function(Rt,bt){return Rt-bt});var ct=nt.length,gt=$[st],Tt;if(gt===0){var k=y[st];Tt=[k]}for(var _=0;_=0)&&($[wt]=gt^1,ot.push(wt),gt===0)){var k=y[wt];Q(k)||(k.reverse(),Tt.push(k))}}gt===0&&Z.push(Tt)}return Z}},211:function(h,p,r){h.exports=d;var e=r(417)[3],a=r(4385),n=r(9014),f=r(5070);function c(){return!0}function l(w){return function(A,_){var y=w[A];return y?!!y.queryPoint(_,c):!1}}function m(w){for(var A={},_=0;_0&&A[y]===_[0])E=w[y-1];else return 1;for(var T=1;E;){var s=E.key,L=e(_,s[0],s[1]);if(s[0][0]0)T=-1,E=E.right;else return 0;else if(L>0)E=E.left;else if(L<0)T=1,E=E.right;else return 0}return T}}function b(w){return 1}function u(w){return function(_){return w(_[0],_[1])?0:1}}function o(w,A){return function(y){return w(y[0],y[1])?0:A(y)}}function d(w){for(var A=w.length,_=[],y=[],E=0;E=b?(s=1,M=b+2*d+A):(s=-d/b,M=d*s+A)):(s=0,w>=0?(L=0,M=A):-w>=o?(L=1,M=o+2*w+A):(L=-w/o,M=w*L+A));else if(L<0)L=0,d>=0?(s=0,M=A):-d>=b?(s=1,M=b+2*d+A):(s=-d/b,M=d*s+A);else{var z=1/T;s*=z,L*=z,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A}else{var D,N,I,k;s<0?(D=u+d,N=o+w,N>D?(I=N-D,k=b-2*u+o,I>=k?(s=1,L=0,M=b+2*d+A):(s=I/k,L=1-s,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)):(s=0,N<=0?(L=1,M=o+2*w+A):w>=0?(L=0,M=A):(L=-w/o,M=w*L+A))):L<0?(D=u+w,N=b+d,N>D?(I=N-D,k=b-2*u+o,I>=k?(L=1,s=0,M=o+2*w+A):(L=I/k,s=1-L,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)):(L=0,N<=0?(s=1,M=b+2*d+A):d>=0?(s=0,M=A):(s=-d/b,M=d*s+A))):(I=o+w-u-d,I<=0?(s=0,L=1,M=o+2*w+A):(k=b-2*u+o,I>=k?(s=1,L=0,M=b+2*d+A):(s=I/k,L=1-s,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)))}for(var B=1-s-L,v=0;v0){var o=c[m-1];if(e(b,o)===0&&n(o)!==u){m-=1;continue}}c[m++]=b}}return c.length=m,c}},6184:function(h){/*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. -*/var p="",r;v.exports=e;function e(a,n){if(typeof a!="string")throw new TypeError("expected a string");if(n===1)return a;if(n===2)return a+a;var f=a.length*n;if(r!==a||typeof r>"u")r=a,p="";else if(p.length>=f)return p.substr(0,f);for(;f>p.length&&n>1;)n&1&&(p+=a),n>>=1,a+=a;return p+=a,p=p.substr(0,f),p}},8161:function(v,p,r){v.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(v){v.exports=p;function p(r){for(var e=r.length,a=r[r.length-1],n=e,f=e-2;f>=0;--f){var c=a,l=r[f];a=c+l;var m=a-c,h=l-m;h&&(r[--n]=a,a=h)}for(var b=0,f=n;f0){if(N<=0)return I;k=D+N}else if(D<0){if(N>=0)return I;k=-(D+N)}else return I;var B=m*k;return I>=B||I<=-B?I:w(L,M,z)},function(L,M,z,D){var N=L[0]-D[0],I=M[0]-D[0],k=z[0]-D[0],B=L[1]-D[1],O=M[1]-D[1],H=z[1]-D[1],Y=L[2]-D[2],j=M[2]-D[2],et=z[2]-D[2],it=I*H,ut=k*O,J=k*B,X=N*H,tt=N*O,V=I*B,Q=Y*(it-ut)+j*(J-X)+et*(tt-V),ot=(Math.abs(it)+Math.abs(ut))*Math.abs(Y)+(Math.abs(J)+Math.abs(X))*Math.abs(j)+(Math.abs(tt)+Math.abs(V))*Math.abs(et),$=h*ot;return Q>$||-Q>$?Q:A(L,M,z,D)}];function y(s){var L=_[s.length];return L||(L=_[s.length]=d(s.length)),L.apply(void 0,s)}function E(s,L,M,z,D,N,I){return function(B,O,H,Y,j){switch(arguments.length){case 0:case 1:return 0;case 2:return z(B,O);case 3:return D(B,O,H);case 4:return N(B,O,H,Y);case 5:return I(B,O,H,Y,j)}for(var et=new Array(arguments.length),it=0;it0&&b>0||h<0&&b<0)return!1;var u=e(l,f,c),o=e(m,f,c);return u>0&&o>0||u<0&&o<0?!1:h===0&&b===0&&u===0&&o===0?a(f,c,l,m):!0}},4078:function(v){v.exports=r;function p(e,a){var n=e+a,f=n-e,c=n-f,l=a-f,m=e-c,h=m+l;return h?[h,n]:[n]}function r(e,a){var n=e.length|0,f=a.length|0;if(n===1&&f===1)return p(e[0],-a[0]);var c=n+f,l=new Array(c),m=0,h=0,b=0,u=Math.abs,o=e[h],d=u(o),w=-a[b],A=u(w),_,y;d=f?(_=o,h+=1,h=f?(_=o,h+=1,h"u"&&(_=c(d));var y=d.length;if(y===0||_<1)return{cells:[],vertexIds:[],vertexWeights:[]};var E=l(w,+A),T=m(d,_),s=h(T,w,E,+A),L=b(T,w.length|0),M=f(_)(d,T.data,L,E),z=u(T),D=[].slice.call(s.data,0,s.shape[0]);return a.free(E),a.free(T.data),a.free(s.data),a.free(L),{cells:M,vertexIds:z,vertexWeights:D}}},1168:function(v){v.exports=r;var p=[function(){function a(n,f,c,l){for(var m=n.length,h=[],b=0;b>1,w=c[2*d+1];if(w===b)return d;b>1,w=c[2*d+1];if(w===b)return d;b>1,w=c[2*d+1];if(w===b)return d;b0)-(n<0)},p.abs=function(n){var f=n>>r-1;return(n^f)-f},p.min=function(n,f){return f^(n^f)&-(n65535)<<4,n>>>=f,c=(n>255)<<3,n>>>=c,f|=c,c=(n>15)<<2,n>>>=c,f|=c,c=(n>3)<<1,n>>>=c,f|=c,f|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function e(n){var f=32;return n&=-n,n&&f--,n&65535&&(f-=16),n&16711935&&(f-=8),n&252645135&&(f-=4),n&858993459&&(f-=2),n&1431655765&&(f-=1),f}p.countTrailingZeros=e,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var f=0;f<256;++f){var c=f,l=f,m=7;for(c>>>=1;c;c>>>=1)l<<=1,l|=c&1,--m;n[f]=l<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},p.interleave2=function(n,f){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,n|f<<1},p.deinterleave2=function(n,f){return n=n>>>f&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,f,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,n|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,f){return n=n>>>f&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var f=n|n-1;return f+1|(~f&-~f)-1>>>e(n)+1}},6656:function(v,p,r){"use restrict";var e=r(9392),a=r(9521);function n(s){for(var L=0,M=Math.max,z=0,D=s.length;z>1,I=l(s[N],L);I<=0?(I===0&&(D=N),M=N+1):I>0&&(z=N-1)}return D}p.findCell=u;function o(s,L){for(var M=new Array(s.length),z=0,D=M.length;z=s.length||l(s[et],N)!==0););}return M}p.incidence=o;function d(s,L){if(!L)return o(b(A(s,0)),s);for(var M=new Array(L),z=0;z>>O&1&&B.push(D[O]);L.push(B)}return h(L)}p.explode=w;function A(s,L){if(L<0)return[];for(var M=[],z=(1<>1:(J>>1)-1}function z(J){for(var X=L(J);;){var tt=X,V=2*J+1,Q=2*(J+1),ot=J;if(V0;){var tt=M(J);if(tt>=0){var V=L(tt);if(X0){var J=B[0];return s(0,Y-1),Y-=1,z(0),J}return-1}function I(J,X){var tt=B[J];return d[tt]===X?J:(d[tt]=-1/0,D(J),N(),d[tt]=X,Y+=1,D(Y-1))}function k(J){if(!w[J]){w[J]=!0;var X=u[J],tt=o[J];u[tt]>=0&&(u[tt]=X),o[X]>=0&&(o[X]=tt),O[X]>=0&&I(O[X],T(X)),O[tt]>=0&&I(O[tt],T(tt))}}for(var B=[],O=new Array(h),A=0;A>1;A>=0;--A)z(A);for(;;){var j=N();if(j<0||d[j]>m)break;k(j)}for(var et=[],A=0;A=0&&tt>=0&&X!==tt){var V=O[X],Q=O[tt];V!==Q&&ut.push([V,Q])}}),a.unique(a.normalize(ut)),{positions:et,edges:ut}}},6638:function(v,p,r){v.exports=n;var e=r(417);function a(f,c){var l,m;if(c[0][0]c[1][0])l=c[1],m=c[0];else{var h=Math.min(f[0][1],f[1][1]),b=Math.max(f[0][1],f[1][1]),u=Math.min(c[0][1],c[1][1]),o=Math.max(c[0][1],c[1][1]);return bo?h-o:b-o}var d,w;f[0][1]c[1][0])l=c[1],m=c[0];else return a(c,f);var h,b;if(f[0][0]f[1][0])h=f[1],b=f[0];else return-a(f,c);var u=e(l,m,b),o=e(l,m,h);if(u<0){if(o<=0)return u}else if(u>0){if(o>=0)return u}else if(o)return o;if(u=e(b,h,m),o=e(b,h,l),u<0){if(o<=0)return u}else if(u>0){if(o>=0)return u}else if(o)return o;return m[0]-b[0]}},4385:function(v,p,r){v.exports=o;var e=r(5070),a=r(7080),n=r(417),f=r(6638);function c(d,w,A){this.slabs=d,this.coordinates=w,this.horizontal=A}var l=c.prototype;function m(d,w){return d.y-w}function h(d,w){for(var A=null;d;){var _=d.key,y,E;_[0][0]<_[1][0]?(y=_[0],E=_[1]):(y=_[1],E=_[0]);var T=n(y,E,w);if(T<0)d=d.left;else if(T>0)if(w[0]!==_[1][0])A=d,d=d.right;else{var s=h(d.right,w);if(s)return s;d=d.left}else{if(w[0]!==_[1][0])return d;var s=h(d.right,w);if(s)return s;d=d.left}}return A}l.castUp=function(d){var w=e.le(this.coordinates,d[0]);if(w<0)return-1;this.slabs[w];var A=h(this.slabs[w],d),_=-1;if(A&&(_=A.value),this.coordinates[w]===d[0]){var y=null;if(A&&(y=A.key),w>0){var E=h(this.slabs[w-1],d);E&&(y?f(E.key,y)>0&&(y=E.key,_=E.value):(_=E.value,y=E.key))}var T=this.horizontal[w];if(T.length>0){var s=e.ge(T,d[1],m);if(s=T.length)return _;L=T[s]}}if(L.start)if(y){var M=n(y[0],y[1],[d[0],L.y]);y[0][0]>y[1][0]&&(M=-M),M>0&&(_=L.index)}else _=L.index;else L.y!==d[1]&&(_=L.index)}}}return _};function b(d,w,A,_){this.y=d,this.index=w,this.start=A,this.closed=_}function u(d,w,A,_){this.x=d,this.segment=w,this.create=A,this.index=_}function o(d){for(var w=d.length,A=2*w,_=new Array(A),y=0;y1&&(w=1);for(var A=1-w,_=h.length,y=new Array(_),E=0;E<_;++E)y[E]=w*h[E]+A*u[E];return y}function c(h,b){for(var u=[],o=[],d=n(h[h.length-1],b),w=h[h.length-1],A=h[0],_=0;_0||d>0&&y<0){var E=f(w,y,A,d);u.push(E),o.push(E.slice())}y<0?o.push(A.slice()):y>0?u.push(A.slice()):(u.push(A.slice()),o.push(A.slice())),d=y}return{positive:u,negative:o}}function l(h,b){for(var u=[],o=n(h[h.length-1],b),d=h[h.length-1],w=h[0],A=0;A0||o>0&&_<0)&&u.push(f(d,_,w,o)),_>=0&&u.push(w.slice()),o=_}return u}function m(h,b){for(var u=[],o=n(h[h.length-1],b),d=h[h.length-1],w=h[0],A=0;A0||o>0&&_<0)&&u.push(f(d,_,w,o)),_<=0&&u.push(w.slice()),o=_}return u}},8974:function(v,p,r){var e;(function(){var a={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(h){return c(m(h),arguments)}function f(h,b){return n.apply(null,[h].concat(b||[]))}function c(h,b){var u=1,o=h.length,d,w="",A,_,y,E,T,s,L,M;for(A=0;A=0),y.type){case"b":d=parseInt(d,10).toString(2);break;case"c":d=String.fromCharCode(parseInt(d,10));break;case"d":case"i":d=parseInt(d,10);break;case"j":d=JSON.stringify(d,null,y.width?parseInt(y.width):0);break;case"e":d=y.precision?parseFloat(d).toExponential(y.precision):parseFloat(d).toExponential();break;case"f":d=y.precision?parseFloat(d).toFixed(y.precision):parseFloat(d);break;case"g":d=y.precision?String(Number(d.toPrecision(y.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=y.precision?d.substring(0,y.precision):d;break;case"t":d=String(!!d),d=y.precision?d.substring(0,y.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=y.precision?d.substring(0,y.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=y.precision?d.substring(0,y.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase();break}a.json.test(y.type)?w+=d:(a.number.test(y.type)&&(!L||y.sign)?(M=L?"+":"-",d=d.toString().replace(a.sign,"")):M="",T=y.pad_char?y.pad_char==="0"?"0":y.pad_char.charAt(1):" ",s=y.width-(M+d).length,E=y.width&&s>0?T.repeat(s):"",w+=y.align?M+d+E:T==="0"?M+E+d:E+M+d)}return w}var l=Object.create(null);function m(h){if(l[h])return l[h];for(var b=h,u,o=[],d=0;b;){if((u=a.text.exec(b))!==null)o.push(u[0]);else if((u=a.modulo.exec(b))!==null)o.push("%");else if((u=a.placeholder.exec(b))!==null){if(u[2]){d|=1;var w=[],A=u[2],_=[];if((_=a.key.exec(A))!==null)for(w.push(_[1]);(A=A.substring(_[0].length))!=="";)if((_=a.key_access.exec(A))!==null)w.push(_[1]);else if((_=a.index_access.exec(A))!==null)w.push(_[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=w}else d|=2;if(d===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");b=b.substring(u[0].length)}return l[h]=o}p.sprintf=n,p.vsprintf=f,typeof window<"u"&&(window.sprintf=n,window.vsprintf=f,e=(function(){return{sprintf:n,vsprintf:f}}).call(p,r,p,v),e!==void 0&&(v.exports=e))})()},4162:function(v,p,r){v.exports=m;var e=r(9284),a=r(9584),n={"2d":function(h,b,u){var o=h({order:b,scalarArguments:3,getters:u==="generic"?[0]:void 0,phase:function(w,A,_,y){return w>y|0},vertex:function(w,A,_,y,E,T,s,L,M,z,D,N,I){var k=(s<<0)+(L<<1)+(M<<2)+(z<<3)|0;if(!(k===0||k===15))switch(k){case 0:D.push([w-.5,A-.5]);break;case 1:D.push([w-.25-.25*(y+_-2*I)/(_-y),A-.25-.25*(E+_-2*I)/(_-E)]);break;case 2:D.push([w-.75-.25*(-y-_+2*I)/(y-_),A-.25-.25*(T+y-2*I)/(y-T)]);break;case 3:D.push([w-.5,A-.5-.5*(E+_+T+y-4*I)/(_-E+y-T)]);break;case 4:D.push([w-.25-.25*(T+E-2*I)/(E-T),A-.75-.25*(-E-_+2*I)/(E-_)]);break;case 5:D.push([w-.5-.5*(y+_+T+E-4*I)/(_-y+E-T),A-.5]);break;case 6:D.push([w-.5-.25*(-y-_+T+E)/(y-_+E-T),A-.5-.25*(-E-_+T+y)/(E-_+y-T)]);break;case 7:D.push([w-.75-.25*(T+E-2*I)/(E-T),A-.75-.25*(T+y-2*I)/(y-T)]);break;case 8:D.push([w-.75-.25*(-T-E+2*I)/(T-E),A-.75-.25*(-T-y+2*I)/(T-y)]);break;case 9:D.push([w-.5-.25*(y+_+-T-E)/(_-y+T-E),A-.5-.25*(E+_+-T-y)/(_-E+T-y)]);break;case 10:D.push([w-.5-.5*(-y-_+-T-E+4*I)/(y-_+T-E),A-.5]);break;case 11:D.push([w-.25-.25*(-T-E+2*I)/(T-E),A-.75-.25*(E+_-2*I)/(_-E)]);break;case 12:D.push([w-.5,A-.5-.5*(-E-_+-T-y+4*I)/(E-_+T-y)]);break;case 13:D.push([w-.75-.25*(y+_-2*I)/(_-y),A-.25-.25*(-T-y+2*I)/(T-y)]);break;case 14:D.push([w-.25-.25*(-y-_+2*I)/(y-_),A-.25-.25*(-E-_+2*I)/(E-_)]);break;case 15:D.push([w-.5,A-.5]);break}},cell:function(w,A,_,y,E,T,s,L,M){E?L.push([w,A]):L.push([A,w])}});return function(d,w){var A=[],_=[];return o(d,A,_,w),{positions:A,cells:_}}}};function f(h,b){var u=h.length+"d",o=n[u];if(o)return o(e,h,b)}function c(h,b){for(var u=a(h,b),o=u.length,d=new Array(o),w=new Array(o),A=0;A0&&(_+=.02);for(var E=new Float32Array(A),T=0,s=-.5*_,y=0;yMath.max(y,E)?T[2]=1:y>Math.max(_,E)?T[0]=1:T[1]=1;for(var s=0,L=0,M=0;M<3;++M)s+=A[M]*A[M],L+=T[M]*A[M];for(var M=0;M<3;++M)T[M]-=L/s*A[M];return c(T,T),T}function u(A,_,y,E,T,s,L,M){this.center=e(y),this.up=e(E),this.right=e(T),this.radius=e([s]),this.angle=e([L,M]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,_),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var o=u.prototype;o.setDistanceLimits=function(A,_){A>0?A=Math.log(A):A=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=_},o.getDistanceLimits=function(A){var _=this.radius.bounds[0];return A?(A[0]=Math.exp(_[0][0]),A[1]=Math.exp(_[1][0]),A):[Math.exp(_[0][0]),Math.exp(_[1][0])]},o.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var _=this.computedUp,y=this.computedRight,E=0,T=0,s=0;s<3;++s)T+=_[s]*y[s],E+=_[s]*_[s];for(var L=Math.sqrt(E),M=0,s=0;s<3;++s)y[s]-=_[s]*T/E,M+=y[s]*y[s],_[s]/=L;for(var z=Math.sqrt(M),s=0;s<3;++s)y[s]/=z;var D=this.computedToward;f(D,_,y),c(D,D);for(var N=Math.exp(this.computedRadius[0]),I=this.computedAngle[0],k=this.computedAngle[1],B=Math.cos(I),O=Math.sin(I),H=Math.cos(k),Y=Math.sin(k),j=this.computedCenter,et=B*H,it=O*H,ut=Y,J=-B*Y,X=-O*Y,tt=H,V=this.computedEye,Q=this.computedMatrix,s=0;s<3;++s){var ot=et*y[s]+it*D[s]+ut*_[s];Q[4*s+1]=J*y[s]+X*D[s]+tt*_[s],Q[4*s+2]=ot,Q[4*s+3]=0}var $=Q[1],Z=Q[5],st=Q[9],nt=Q[2],ct=Q[6],gt=Q[10],Tt=Z*gt-st*ct,wt=st*nt-$*gt,Rt=$*ct-Z*nt,bt=m(Tt,wt,Rt);Tt/=bt,wt/=bt,Rt/=bt,Q[0]=Tt,Q[4]=wt,Q[8]=Rt;for(var s=0;s<3;++s)V[s]=j[s]+Q[2+4*s]*N;for(var s=0;s<3;++s){for(var M=0,At=0;At<3;++At)M+=Q[s+4*At]*V[At];Q[12+s]=-M}Q[15]=1},o.getMatrix=function(A,_){this.recalcMatrix(A);var y=this.computedMatrix;if(_){for(var E=0;E<16;++E)_[E]=y[E];return _}return y};var d=[0,0,0];o.rotate=function(A,_,y,E){if(this.angle.move(A,_,y),E){this.recalcMatrix(A);var T=this.computedMatrix;d[0]=T[2],d[1]=T[6],d[2]=T[10];for(var s=this.computedUp,L=this.computedRight,M=this.computedToward,z=0;z<3;++z)T[4*z]=s[z],T[4*z+1]=L[z],T[4*z+2]=M[z];n(T,T,E,d);for(var z=0;z<3;++z)s[z]=T[4*z],L[z]=T[4*z+1];this.up.set(A,s[0],s[1],s[2]),this.right.set(A,L[0],L[1],L[2])}},o.pan=function(A,_,y,E){_=_||0,y=y||0,E=E||0,this.recalcMatrix(A);var T=this.computedMatrix;Math.exp(this.computedRadius[0]);var s=T[1],L=T[5],M=T[9],z=m(s,L,M);s/=z,L/=z,M/=z;var D=T[0],N=T[4],I=T[8],k=D*s+N*L+I*M;D-=s*k,N-=L*k,I-=M*k;var B=m(D,N,I);D/=B,N/=B,I/=B;var O=D*_+s*y,H=N*_+L*y,Y=I*_+M*y;this.center.move(A,O,H,Y);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+E),this.radius.set(A,Math.log(j))},o.translate=function(A,_,y,E){this.center.move(A,_||0,y||0,E||0)},o.setMatrix=function(A,_,y,E){var T=1;typeof y=="number"&&(T=y|0),(T<0||T>3)&&(T=1);var s=(T+2)%3;_||(this.recalcMatrix(A),_=this.computedMatrix);var L=_[T],M=_[T+4],z=_[T+8];if(E){var N=Math.abs(L),I=Math.abs(M),k=Math.abs(z),B=Math.max(N,I,k);N===B?(L=L<0?-1:1,M=z=0):k===B?(z=z<0?-1:1,L=M=0):(M=M<0?-1:1,L=z=0)}else{var D=m(L,M,z);L/=D,M/=D,z/=D}var O=_[s],H=_[s+4],Y=_[s+8],j=O*L+H*M+Y*z;O-=L*j,H-=M*j,Y-=z*j;var et=m(O,H,Y);O/=et,H/=et,Y/=et;var it=M*Y-z*H,ut=z*O-L*Y,J=L*H-M*O,X=m(it,ut,J);it/=X,ut/=X,J/=X,this.center.jump(A,Ut,kt,Vt),this.radius.idle(A),this.up.jump(A,L,M,z),this.right.jump(A,O,H,Y);var tt,V;if(T===2){var Q=_[1],ot=_[5],$=_[9],Z=Q*O+ot*H+$*Y,st=Q*it+ot*ut+$*J;Tt<0?tt=-Math.PI/2:tt=Math.PI/2,V=Math.atan2(st,Z)}else{var nt=_[2],ct=_[6],gt=_[10],Tt=nt*L+ct*M+gt*z,wt=nt*O+ct*H+gt*Y,Rt=nt*it+ct*ut+gt*J;tt=Math.asin(h(Tt)),V=Math.atan2(Rt,wt)}this.angle.jump(A,V,tt),this.recalcMatrix(A);var bt=_[2],At=_[6],mt=_[10],Lt=this.computedMatrix;a(Lt,_);var Ht=Lt[15],Ut=Lt[12]/Ht,kt=Lt[13]/Ht,Vt=Lt[14]/Ht,It=Math.exp(this.computedRadius[0]);this.center.jump(A,Ut-bt*It,kt-At*It,Vt-mt*It)},o.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},o.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},o.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},o.setDistance=function(A,_){_>0&&this.radius.set(A,Math.log(_))},o.lookAt=function(A,_,y,E){this.recalcMatrix(A),_=_||this.computedEye,y=y||this.computedCenter,E=E||this.computedUp;var T=E[0],s=E[1],L=E[2],M=m(T,s,L);if(!(M<1e-6)){T/=M,s/=M,L/=M;var z=_[0]-y[0],D=_[1]-y[1],N=_[2]-y[2],I=m(z,D,N);if(!(I<1e-6)){z/=I,D/=I,N/=I;var k=this.computedRight,B=k[0],O=k[1],H=k[2],Y=T*B+s*O+L*H;B-=Y*T,O-=Y*s,H-=Y*L;var j=m(B,O,H);if(!(j<.01&&(B=s*N-L*D,O=L*z-T*N,H=T*D-s*z,j=m(B,O,H),j<1e-6))){B/=j,O/=j,H/=j,this.up.set(A,T,s,L),this.right.set(A,B,O,H),this.center.set(A,y[0],y[1],y[2]),this.radius.set(A,Math.log(I));var et=s*H-L*O,it=L*B-T*H,ut=T*O-s*B,J=m(et,it,ut);et/=J,it/=J,ut/=J;var X=T*z+s*D+L*N,tt=B*z+O*D+H*N,V=et*z+it*D+ut*N,Q=Math.asin(h(X)),ot=Math.atan2(V,tt),$=this.angle._state,Z=$[$.length-1],st=$[$.length-2];Z=Z%(2*Math.PI);var nt=Math.abs(Z+2*Math.PI-ot),ct=Math.abs(Z-ot),gt=Math.abs(Z-2*Math.PI-ot);nt0?H.pop():new ArrayBuffer(B)}p.mallocArrayBuffer=d;function w(k){return new Uint8Array(d(k),0,k)}p.mallocUint8=w;function A(k){return new Uint16Array(d(2*k),0,k)}p.mallocUint16=A;function _(k){return new Uint32Array(d(4*k),0,k)}p.mallocUint32=_;function y(k){return new Int8Array(d(k),0,k)}p.mallocInt8=y;function E(k){return new Int16Array(d(2*k),0,k)}p.mallocInt16=E;function T(k){return new Int32Array(d(4*k),0,k)}p.mallocInt32=T;function s(k){return new Float32Array(d(4*k),0,k)}p.mallocFloat32=p.mallocFloat=s;function L(k){return new Float64Array(d(8*k),0,k)}p.mallocFloat64=p.mallocDouble=L;function M(k){return f?new Uint8ClampedArray(d(k),0,k):w(k)}p.mallocUint8Clamped=M;function z(k){return c?new BigUint64Array(d(8*k),0,k):null}p.mallocBigUint64=z;function D(k){return l?new BigInt64Array(d(8*k),0,k):null}p.mallocBigInt64=D;function N(k){return new DataView(d(k),0,k)}p.mallocDataView=N;function I(k){k=e.nextPow2(k);var B=e.log2(k),O=b[B];return O.length>0?O.pop():new n(k)}p.mallocBuffer=I,p.clearCache=function(){for(var B=0;B<32;++B)m.UINT8[B].length=0,m.UINT16[B].length=0,m.UINT32[B].length=0,m.INT8[B].length=0,m.INT16[B].length=0,m.INT32[B].length=0,m.FLOAT[B].length=0,m.DOUBLE[B].length=0,m.BIGUINT64[B].length=0,m.BIGINT64[B].length=0,m.UINT8C[B].length=0,h[B].length=0,b[B].length=0}},1731:function(v){"use restrict";v.exports=p;function p(e){this.roots=new Array(e),this.ranks=new Array(e);for(var a=0;a",H="",Y=O.length,j=H.length,et=I[0]===d||I[0]===_,it=0,ut=-j;it>-1&&(it=k.indexOf(O,it),!(it===-1||(ut=k.indexOf(H,it+Y),ut===-1)||ut<=it));){for(var J=it;J=ut)B[J]=null,k=k.substr(0,J)+" "+k.substr(J+1);else if(B[J]!==null){var X=B[J].indexOf(I[0]);X===-1?B[J]+=I:et&&(B[J]=B[J].substr(0,X+1)+(1+parseInt(B[J][X+1]))+B[J].substr(X+2))}var tt=it+Y,V=k.substr(tt,ut-tt),Q=V.indexOf(O);Q!==-1?it=Q:it=ut+j}return B}function T(N,I,k){for(var B=I.textAlign||"start",O=I.textBaseline||"alphabetic",H=[1<<30,1<<30],Y=[0,0],j=N.length,et=0;et/g,` -`):k=k.replace(/\/g," ");var Y="",j=[];for(Z=0;Z-1?parseInt(Vt[1+Kt]):0,he=$t>-1?parseInt(It[1+$t]):0;le!==he&&(re=re.replace(Rt(),"?px "),ct*=Math.pow(.75,he-le),re=re.replace("?px ",Rt())),nt+=.25*X*(he-le)}if(H.superscripts===!0){var de=Vt.indexOf(d),xe=It.indexOf(d),Se=de>-1?parseInt(Vt[1+de]):0,ne=xe>-1?parseInt(It[1+xe]):0;Se!==ne&&(re=re.replace(Rt(),"?px "),ct*=Math.pow(.75,ne-Se),re=re.replace("?px ",Rt())),nt-=.25*X*(ne-Se)}if(H.bolds===!0){var zt=Vt.indexOf(h)>-1,Xt=It.indexOf(h)>-1;!zt&&Xt&&(Jt?re=re.replace("italic ","italic bold "):re="bold "+re),zt&&!Xt&&(re=re.replace("bold ",""))}if(H.italics===!0){var Jt=Vt.indexOf(u)>-1,Wt=It.indexOf(u)>-1;!Jt&&Wt&&(re="italic "+re),Jt&&!Wt&&(re=re.replace("italic ",""))}I.font=re}for($=0;$0&&(O=B.size),B.lineSpacing&&B.lineSpacing>0&&(H=B.lineSpacing),B.styletags&&B.styletags.breaklines&&(Y.breaklines=!!B.styletags.breaklines),B.styletags&&B.styletags.bolds&&(Y.bolds=!!B.styletags.bolds),B.styletags&&B.styletags.italics&&(Y.italics=!!B.styletags.italics),B.styletags&&B.styletags.subscripts&&(Y.subscripts=!!B.styletags.subscripts),B.styletags&&B.styletags.superscripts&&(Y.superscripts=!!B.styletags.superscripts)),k.font=[B.fontStyle,B.fontVariant,B.fontWeight,O+"px",B.font].filter(function(et){return et}).join(" "),k.textAlign="start",k.textBaseline="alphabetic",k.direction="ltr";var j=s(I,k,N,O,H,Y);return z(j,B,O)}},5346:function(v){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(L){L.permitHostObjects___&&L.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var e=!1;if(typeof WeakMap=="function"){var a=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new a,f=Object.freeze({});if(n.set(f,1),n.get(f)!==1)e=!0;else{v.exports=WeakMap;return}}}var c=Object.getOwnPropertyNames,l=Object.defineProperty,m=Object.isExtensible,h="weakmap:",b=h+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var u=new ArrayBuffer(25),o=new Uint8Array(u);crypto.getRandomValues(o),b=h+"rand:"+Array.prototype.map.call(o,function(L){return(L%36).toString(36)}).join("")+"___"}function d(L){return!(L.substr(0,h.length)==h&&L.substr(L.length-3)==="___")}if(l(Object,"getOwnPropertyNames",{value:function(M){return c(M).filter(d)}}),"getPropertyNames"in Object){var w=Object.getPropertyNames;l(Object,"getPropertyNames",{value:function(M){return w(M).filter(d)}})}function A(L){if(L!==Object(L))throw new TypeError("Not an object: "+L);var M=L[b];if(M&&M.key===L)return M;if(m(L)){M={key:L};try{return l(L,b,{value:M,writable:!1,enumerable:!1,configurable:!1}),M}catch{return}}}(function(){var L=Object.freeze;l(Object,"freeze",{value:function(N){return A(N),L(N)}});var M=Object.seal;l(Object,"seal",{value:function(N){return A(N),M(N)}});var z=Object.preventExtensions;l(Object,"preventExtensions",{value:function(N){return A(N),z(N)}})})();function _(L){return L.prototype=null,Object.freeze(L)}var y=!1;function E(){!y&&typeof console<"u"&&(y=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var T=0,s=function(){this instanceof s||E();var L=[],M=[],z=T++;function D(B,O){var H,Y=A(B);return Y?z in Y?Y[z]:O:(H=L.indexOf(B),H>=0?M[H]:O)}function N(B){var O=A(B);return O?z in O:L.indexOf(B)>=0}function I(B,O){var H,Y=A(B);return Y?Y[z]=O:(H=L.indexOf(B),H>=0?M[H]=O:(H=L.length,M[H]=O,L[H]=B)),this}function k(B){var O=A(B),H,Y;return O?z in O&&delete O[z]:(H=L.indexOf(B),H<0?!1:(Y=L.length-1,L[H]=void 0,M[H]=M[Y],L[H]=L[Y],L.length=Y,M.length=Y,!0))}return Object.create(s.prototype,{get___:{value:_(D)},has___:{value:_(N)},set___:{value:_(I)},delete___:{value:_(k)}})};s.prototype=Object.create(Object.prototype,{get:{value:function(M,z){return this.get___(M,z)},writable:!0,configurable:!0},has:{value:function(M){return this.has___(M)},writable:!0,configurable:!0},set:{value:function(M,z){return this.set___(M,z)},writable:!0,configurable:!0},delete:{value:function(M){return this.delete___(M)},writable:!0,configurable:!0}}),typeof a=="function"?function(){e&&typeof Proxy<"u"&&(Proxy=void 0);function L(){this instanceof s||E();var M=new a,z=void 0,D=!1;function N(O,H){return z?M.has(O)?M.get(O):z.get___(O,H):M.get(O,H)}function I(O){return M.has(O)||(z?z.has___(O):!1)}var k;e?k=function(O,H){return M.set(O,H),M.has(O)||(z||(z=new s),z.set(O,H)),this}:k=function(O,H){if(D)try{M.set(O,H)}catch{z||(z=new s),z.set___(O,H)}else M.set(O,H);return this};function B(O){var H=!!M.delete(O);return z&&z.delete___(O)||H}return Object.create(s.prototype,{get___:{value:_(N)},has___:{value:_(I)},set___:{value:_(k)},delete___:{value:_(B)},permitHostObjects___:{value:_(function(O){if(O===r)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}L.prototype=s.prototype,v.exports=L,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),v.exports=s)})()},9222:function(v,p,r){var e=r(7178);v.exports=a;function a(){var n={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var c=f.valueOf(n);return c&&c.identity===n?c:e(f,n)}}},7178:function(v){v.exports=p;function p(r,e){var a={identity:e},n=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(f){return f!==e?n.apply(this,arguments):a},writable:!0}),a}},4037:function(v,p,r){var e=r(9222);v.exports=a;function a(){var n=e();return{get:function(f,c){var l=n(f);return l.hasOwnProperty("value")?l.value:c},set:function(f,c){return n(f).value=c,this},has:function(f){return"value"in n(f)},delete:function(f){return delete n(f).value}}}},6183:function(v){function p(){return function(c,l,m,h,b,u){var o=c[0],d=m[0],w=[0],A=d;h|=0;var _=0,y=d;for(_=0;_=0!=T>=0&&b.push(w[0]+.5+.5*(E+T)/(E-T))}h+=y,++w[0]}}}function r(){return p()}var e=r;function a(c){var l={};return function(h,b,u){var o=h.dtype,d=h.order,w=[o,d.join()].join(),A=l[w];return A||(l[w]=A=c([o,d])),A(h.shape.slice(0),h.data,h.stride,h.offset|0,b,u)}}function n(c){return a(e.bind(void 0,c))}function f(c){return n({funcName:c.funcName})}v.exports=f({funcName:"zeroCrossings"})},9584:function(v,p,r){v.exports=a;var e=r(6183);function a(n,f){var c=[];return f=+f||0,e(n.hi(n.shape[0]-1),c,f),c}},6601:function(){}},i={};function S(v){var p=i[v];if(p!==void 0)return p.exports;var r=i[v]={id:v,loaded:!1,exports:{}};return C[v].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}(function(){S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){S.nmd=function(v){return v.paths=[],v.children||(v.children=[]),v}}();var x=S(7386);return x}()})},33576:function(G,U,t){/*! +*/var p="",r;h.exports=e;function e(a,n){if(typeof a!="string")throw new TypeError("expected a string");if(n===1)return a;if(n===2)return a+a;var f=a.length*n;if(r!==a||typeof r>"u")r=a,p="";else if(p.length>=f)return p.substr(0,f);for(;f>p.length&&n>1;)n&1&&(p+=a),n>>=1,a+=a;return p+=a,p=p.substr(0,f),p}},8161:function(h,p,r){h.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(h){h.exports=p;function p(r){for(var e=r.length,a=r[r.length-1],n=e,f=e-2;f>=0;--f){var c=a,l=r[f];a=c+l;var m=a-c,v=l-m;v&&(r[--n]=a,a=v)}for(var b=0,f=n;f0){if(N<=0)return I;k=D+N}else if(D<0){if(N>=0)return I;k=-(D+N)}else return I;var B=m*k;return I>=B||I<=-B?I:w(L,M,z)},function(L,M,z,D){var N=L[0]-D[0],I=M[0]-D[0],k=z[0]-D[0],B=L[1]-D[1],O=M[1]-D[1],H=z[1]-D[1],Y=L[2]-D[2],j=M[2]-D[2],et=z[2]-D[2],it=I*H,ut=k*O,J=k*B,X=N*H,tt=N*O,V=I*B,Q=Y*(it-ut)+j*(J-X)+et*(tt-V),ot=(Math.abs(it)+Math.abs(ut))*Math.abs(Y)+(Math.abs(J)+Math.abs(X))*Math.abs(j)+(Math.abs(tt)+Math.abs(V))*Math.abs(et),$=v*ot;return Q>$||-Q>$?Q:A(L,M,z,D)}];function y(s){var L=_[s.length];return L||(L=_[s.length]=d(s.length)),L.apply(void 0,s)}function E(s,L,M,z,D,N,I){return function(B,O,H,Y,j){switch(arguments.length){case 0:case 1:return 0;case 2:return z(B,O);case 3:return D(B,O,H);case 4:return N(B,O,H,Y);case 5:return I(B,O,H,Y,j)}for(var et=new Array(arguments.length),it=0;it0&&b>0||v<0&&b<0)return!1;var u=e(l,f,c),o=e(m,f,c);return u>0&&o>0||u<0&&o<0?!1:v===0&&b===0&&u===0&&o===0?a(f,c,l,m):!0}},4078:function(h){h.exports=r;function p(e,a){var n=e+a,f=n-e,c=n-f,l=a-f,m=e-c,v=m+l;return v?[v,n]:[n]}function r(e,a){var n=e.length|0,f=a.length|0;if(n===1&&f===1)return p(e[0],-a[0]);var c=n+f,l=new Array(c),m=0,v=0,b=0,u=Math.abs,o=e[v],d=u(o),w=-a[b],A=u(w),_,y;d=f?(_=o,v+=1,v=f?(_=o,v+=1,v"u"&&(_=c(d));var y=d.length;if(y===0||_<1)return{cells:[],vertexIds:[],vertexWeights:[]};var E=l(w,+A),T=m(d,_),s=v(T,w,E,+A),L=b(T,w.length|0),M=f(_)(d,T.data,L,E),z=u(T),D=[].slice.call(s.data,0,s.shape[0]);return a.free(E),a.free(T.data),a.free(s.data),a.free(L),{cells:M,vertexIds:z,vertexWeights:D}}},1168:function(h){h.exports=r;var p=[function(){function a(n,f,c,l){for(var m=n.length,v=[],b=0;b>1,w=c[2*d+1];if(w===b)return d;b>1,w=c[2*d+1];if(w===b)return d;b>1,w=c[2*d+1];if(w===b)return d;b0)-(n<0)},p.abs=function(n){var f=n>>r-1;return(n^f)-f},p.min=function(n,f){return f^(n^f)&-(n65535)<<4,n>>>=f,c=(n>255)<<3,n>>>=c,f|=c,c=(n>15)<<2,n>>>=c,f|=c,c=(n>3)<<1,n>>>=c,f|=c,f|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function e(n){var f=32;return n&=-n,n&&f--,n&65535&&(f-=16),n&16711935&&(f-=8),n&252645135&&(f-=4),n&858993459&&(f-=2),n&1431655765&&(f-=1),f}p.countTrailingZeros=e,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var f=0;f<256;++f){var c=f,l=f,m=7;for(c>>>=1;c;c>>>=1)l<<=1,l|=c&1,--m;n[f]=l<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},p.interleave2=function(n,f){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,n|f<<1},p.deinterleave2=function(n,f){return n=n>>>f&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,f,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,n|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,f){return n=n>>>f&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var f=n|n-1;return f+1|(~f&-~f)-1>>>e(n)+1}},6656:function(h,p,r){"use restrict";var e=r(9392),a=r(9521);function n(s){for(var L=0,M=Math.max,z=0,D=s.length;z>1,I=l(s[N],L);I<=0?(I===0&&(D=N),M=N+1):I>0&&(z=N-1)}return D}p.findCell=u;function o(s,L){for(var M=new Array(s.length),z=0,D=M.length;z=s.length||l(s[et],N)!==0););}return M}p.incidence=o;function d(s,L){if(!L)return o(b(A(s,0)),s);for(var M=new Array(L),z=0;z>>O&1&&B.push(D[O]);L.push(B)}return v(L)}p.explode=w;function A(s,L){if(L<0)return[];for(var M=[],z=(1<>1:(J>>1)-1}function z(J){for(var X=L(J);;){var tt=X,V=2*J+1,Q=2*(J+1),ot=J;if(V0;){var tt=M(J);if(tt>=0){var V=L(tt);if(X0){var J=B[0];return s(0,Y-1),Y-=1,z(0),J}return-1}function I(J,X){var tt=B[J];return d[tt]===X?J:(d[tt]=-1/0,D(J),N(),d[tt]=X,Y+=1,D(Y-1))}function k(J){if(!w[J]){w[J]=!0;var X=u[J],tt=o[J];u[tt]>=0&&(u[tt]=X),o[X]>=0&&(o[X]=tt),O[X]>=0&&I(O[X],T(X)),O[tt]>=0&&I(O[tt],T(tt))}}for(var B=[],O=new Array(v),A=0;A>1;A>=0;--A)z(A);for(;;){var j=N();if(j<0||d[j]>m)break;k(j)}for(var et=[],A=0;A=0&&tt>=0&&X!==tt){var V=O[X],Q=O[tt];V!==Q&&ut.push([V,Q])}}),a.unique(a.normalize(ut)),{positions:et,edges:ut}}},6638:function(h,p,r){h.exports=n;var e=r(417);function a(f,c){var l,m;if(c[0][0]c[1][0])l=c[1],m=c[0];else{var v=Math.min(f[0][1],f[1][1]),b=Math.max(f[0][1],f[1][1]),u=Math.min(c[0][1],c[1][1]),o=Math.max(c[0][1],c[1][1]);return bo?v-o:b-o}var d,w;f[0][1]c[1][0])l=c[1],m=c[0];else return a(c,f);var v,b;if(f[0][0]f[1][0])v=f[1],b=f[0];else return-a(f,c);var u=e(l,m,b),o=e(l,m,v);if(u<0){if(o<=0)return u}else if(u>0){if(o>=0)return u}else if(o)return o;if(u=e(b,v,m),o=e(b,v,l),u<0){if(o<=0)return u}else if(u>0){if(o>=0)return u}else if(o)return o;return m[0]-b[0]}},4385:function(h,p,r){h.exports=o;var e=r(5070),a=r(7080),n=r(417),f=r(6638);function c(d,w,A){this.slabs=d,this.coordinates=w,this.horizontal=A}var l=c.prototype;function m(d,w){return d.y-w}function v(d,w){for(var A=null;d;){var _=d.key,y,E;_[0][0]<_[1][0]?(y=_[0],E=_[1]):(y=_[1],E=_[0]);var T=n(y,E,w);if(T<0)d=d.left;else if(T>0)if(w[0]!==_[1][0])A=d,d=d.right;else{var s=v(d.right,w);if(s)return s;d=d.left}else{if(w[0]!==_[1][0])return d;var s=v(d.right,w);if(s)return s;d=d.left}}return A}l.castUp=function(d){var w=e.le(this.coordinates,d[0]);if(w<0)return-1;this.slabs[w];var A=v(this.slabs[w],d),_=-1;if(A&&(_=A.value),this.coordinates[w]===d[0]){var y=null;if(A&&(y=A.key),w>0){var E=v(this.slabs[w-1],d);E&&(y?f(E.key,y)>0&&(y=E.key,_=E.value):(_=E.value,y=E.key))}var T=this.horizontal[w];if(T.length>0){var s=e.ge(T,d[1],m);if(s=T.length)return _;L=T[s]}}if(L.start)if(y){var M=n(y[0],y[1],[d[0],L.y]);y[0][0]>y[1][0]&&(M=-M),M>0&&(_=L.index)}else _=L.index;else L.y!==d[1]&&(_=L.index)}}}return _};function b(d,w,A,_){this.y=d,this.index=w,this.start=A,this.closed=_}function u(d,w,A,_){this.x=d,this.segment=w,this.create=A,this.index=_}function o(d){for(var w=d.length,A=2*w,_=new Array(A),y=0;y1&&(w=1);for(var A=1-w,_=v.length,y=new Array(_),E=0;E<_;++E)y[E]=w*v[E]+A*u[E];return y}function c(v,b){for(var u=[],o=[],d=n(v[v.length-1],b),w=v[v.length-1],A=v[0],_=0;_0||d>0&&y<0){var E=f(w,y,A,d);u.push(E),o.push(E.slice())}y<0?o.push(A.slice()):y>0?u.push(A.slice()):(u.push(A.slice()),o.push(A.slice())),d=y}return{positive:u,negative:o}}function l(v,b){for(var u=[],o=n(v[v.length-1],b),d=v[v.length-1],w=v[0],A=0;A0||o>0&&_<0)&&u.push(f(d,_,w,o)),_>=0&&u.push(w.slice()),o=_}return u}function m(v,b){for(var u=[],o=n(v[v.length-1],b),d=v[v.length-1],w=v[0],A=0;A0||o>0&&_<0)&&u.push(f(d,_,w,o)),_<=0&&u.push(w.slice()),o=_}return u}},8974:function(h,p,r){var e;(function(){var a={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(v){return c(m(v),arguments)}function f(v,b){return n.apply(null,[v].concat(b||[]))}function c(v,b){var u=1,o=v.length,d,w="",A,_,y,E,T,s,L,M;for(A=0;A=0),y.type){case"b":d=parseInt(d,10).toString(2);break;case"c":d=String.fromCharCode(parseInt(d,10));break;case"d":case"i":d=parseInt(d,10);break;case"j":d=JSON.stringify(d,null,y.width?parseInt(y.width):0);break;case"e":d=y.precision?parseFloat(d).toExponential(y.precision):parseFloat(d).toExponential();break;case"f":d=y.precision?parseFloat(d).toFixed(y.precision):parseFloat(d);break;case"g":d=y.precision?String(Number(d.toPrecision(y.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=y.precision?d.substring(0,y.precision):d;break;case"t":d=String(!!d),d=y.precision?d.substring(0,y.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=y.precision?d.substring(0,y.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=y.precision?d.substring(0,y.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase();break}a.json.test(y.type)?w+=d:(a.number.test(y.type)&&(!L||y.sign)?(M=L?"+":"-",d=d.toString().replace(a.sign,"")):M="",T=y.pad_char?y.pad_char==="0"?"0":y.pad_char.charAt(1):" ",s=y.width-(M+d).length,E=y.width&&s>0?T.repeat(s):"",w+=y.align?M+d+E:T==="0"?M+E+d:E+M+d)}return w}var l=Object.create(null);function m(v){if(l[v])return l[v];for(var b=v,u,o=[],d=0;b;){if((u=a.text.exec(b))!==null)o.push(u[0]);else if((u=a.modulo.exec(b))!==null)o.push("%");else if((u=a.placeholder.exec(b))!==null){if(u[2]){d|=1;var w=[],A=u[2],_=[];if((_=a.key.exec(A))!==null)for(w.push(_[1]);(A=A.substring(_[0].length))!=="";)if((_=a.key_access.exec(A))!==null)w.push(_[1]);else if((_=a.index_access.exec(A))!==null)w.push(_[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=w}else d|=2;if(d===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");b=b.substring(u[0].length)}return l[v]=o}p.sprintf=n,p.vsprintf=f,typeof window<"u"&&(window.sprintf=n,window.vsprintf=f,e=(function(){return{sprintf:n,vsprintf:f}}).call(p,r,p,h),e!==void 0&&(h.exports=e))})()},4162:function(h,p,r){h.exports=m;var e=r(9284),a=r(9584),n={"2d":function(v,b,u){var o=v({order:b,scalarArguments:3,getters:u==="generic"?[0]:void 0,phase:function(w,A,_,y){return w>y|0},vertex:function(w,A,_,y,E,T,s,L,M,z,D,N,I){var k=(s<<0)+(L<<1)+(M<<2)+(z<<3)|0;if(!(k===0||k===15))switch(k){case 0:D.push([w-.5,A-.5]);break;case 1:D.push([w-.25-.25*(y+_-2*I)/(_-y),A-.25-.25*(E+_-2*I)/(_-E)]);break;case 2:D.push([w-.75-.25*(-y-_+2*I)/(y-_),A-.25-.25*(T+y-2*I)/(y-T)]);break;case 3:D.push([w-.5,A-.5-.5*(E+_+T+y-4*I)/(_-E+y-T)]);break;case 4:D.push([w-.25-.25*(T+E-2*I)/(E-T),A-.75-.25*(-E-_+2*I)/(E-_)]);break;case 5:D.push([w-.5-.5*(y+_+T+E-4*I)/(_-y+E-T),A-.5]);break;case 6:D.push([w-.5-.25*(-y-_+T+E)/(y-_+E-T),A-.5-.25*(-E-_+T+y)/(E-_+y-T)]);break;case 7:D.push([w-.75-.25*(T+E-2*I)/(E-T),A-.75-.25*(T+y-2*I)/(y-T)]);break;case 8:D.push([w-.75-.25*(-T-E+2*I)/(T-E),A-.75-.25*(-T-y+2*I)/(T-y)]);break;case 9:D.push([w-.5-.25*(y+_+-T-E)/(_-y+T-E),A-.5-.25*(E+_+-T-y)/(_-E+T-y)]);break;case 10:D.push([w-.5-.5*(-y-_+-T-E+4*I)/(y-_+T-E),A-.5]);break;case 11:D.push([w-.25-.25*(-T-E+2*I)/(T-E),A-.75-.25*(E+_-2*I)/(_-E)]);break;case 12:D.push([w-.5,A-.5-.5*(-E-_+-T-y+4*I)/(E-_+T-y)]);break;case 13:D.push([w-.75-.25*(y+_-2*I)/(_-y),A-.25-.25*(-T-y+2*I)/(T-y)]);break;case 14:D.push([w-.25-.25*(-y-_+2*I)/(y-_),A-.25-.25*(-E-_+2*I)/(E-_)]);break;case 15:D.push([w-.5,A-.5]);break}},cell:function(w,A,_,y,E,T,s,L,M){E?L.push([w,A]):L.push([A,w])}});return function(d,w){var A=[],_=[];return o(d,A,_,w),{positions:A,cells:_}}}};function f(v,b){var u=v.length+"d",o=n[u];if(o)return o(e,v,b)}function c(v,b){for(var u=a(v,b),o=u.length,d=new Array(o),w=new Array(o),A=0;A0&&(_+=.02);for(var E=new Float32Array(A),T=0,s=-.5*_,y=0;yMath.max(y,E)?T[2]=1:y>Math.max(_,E)?T[0]=1:T[1]=1;for(var s=0,L=0,M=0;M<3;++M)s+=A[M]*A[M],L+=T[M]*A[M];for(var M=0;M<3;++M)T[M]-=L/s*A[M];return c(T,T),T}function u(A,_,y,E,T,s,L,M){this.center=e(y),this.up=e(E),this.right=e(T),this.radius=e([s]),this.angle=e([L,M]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,_),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var o=u.prototype;o.setDistanceLimits=function(A,_){A>0?A=Math.log(A):A=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=_},o.getDistanceLimits=function(A){var _=this.radius.bounds[0];return A?(A[0]=Math.exp(_[0][0]),A[1]=Math.exp(_[1][0]),A):[Math.exp(_[0][0]),Math.exp(_[1][0])]},o.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var _=this.computedUp,y=this.computedRight,E=0,T=0,s=0;s<3;++s)T+=_[s]*y[s],E+=_[s]*_[s];for(var L=Math.sqrt(E),M=0,s=0;s<3;++s)y[s]-=_[s]*T/E,M+=y[s]*y[s],_[s]/=L;for(var z=Math.sqrt(M),s=0;s<3;++s)y[s]/=z;var D=this.computedToward;f(D,_,y),c(D,D);for(var N=Math.exp(this.computedRadius[0]),I=this.computedAngle[0],k=this.computedAngle[1],B=Math.cos(I),O=Math.sin(I),H=Math.cos(k),Y=Math.sin(k),j=this.computedCenter,et=B*H,it=O*H,ut=Y,J=-B*Y,X=-O*Y,tt=H,V=this.computedEye,Q=this.computedMatrix,s=0;s<3;++s){var ot=et*y[s]+it*D[s]+ut*_[s];Q[4*s+1]=J*y[s]+X*D[s]+tt*_[s],Q[4*s+2]=ot,Q[4*s+3]=0}var $=Q[1],Z=Q[5],st=Q[9],nt=Q[2],ct=Q[6],gt=Q[10],Tt=Z*gt-st*ct,wt=st*nt-$*gt,Rt=$*ct-Z*nt,bt=m(Tt,wt,Rt);Tt/=bt,wt/=bt,Rt/=bt,Q[0]=Tt,Q[4]=wt,Q[8]=Rt;for(var s=0;s<3;++s)V[s]=j[s]+Q[2+4*s]*N;for(var s=0;s<3;++s){for(var M=0,At=0;At<3;++At)M+=Q[s+4*At]*V[At];Q[12+s]=-M}Q[15]=1},o.getMatrix=function(A,_){this.recalcMatrix(A);var y=this.computedMatrix;if(_){for(var E=0;E<16;++E)_[E]=y[E];return _}return y};var d=[0,0,0];o.rotate=function(A,_,y,E){if(this.angle.move(A,_,y),E){this.recalcMatrix(A);var T=this.computedMatrix;d[0]=T[2],d[1]=T[6],d[2]=T[10];for(var s=this.computedUp,L=this.computedRight,M=this.computedToward,z=0;z<3;++z)T[4*z]=s[z],T[4*z+1]=L[z],T[4*z+2]=M[z];n(T,T,E,d);for(var z=0;z<3;++z)s[z]=T[4*z],L[z]=T[4*z+1];this.up.set(A,s[0],s[1],s[2]),this.right.set(A,L[0],L[1],L[2])}},o.pan=function(A,_,y,E){_=_||0,y=y||0,E=E||0,this.recalcMatrix(A);var T=this.computedMatrix;Math.exp(this.computedRadius[0]);var s=T[1],L=T[5],M=T[9],z=m(s,L,M);s/=z,L/=z,M/=z;var D=T[0],N=T[4],I=T[8],k=D*s+N*L+I*M;D-=s*k,N-=L*k,I-=M*k;var B=m(D,N,I);D/=B,N/=B,I/=B;var O=D*_+s*y,H=N*_+L*y,Y=I*_+M*y;this.center.move(A,O,H,Y);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+E),this.radius.set(A,Math.log(j))},o.translate=function(A,_,y,E){this.center.move(A,_||0,y||0,E||0)},o.setMatrix=function(A,_,y,E){var T=1;typeof y=="number"&&(T=y|0),(T<0||T>3)&&(T=1);var s=(T+2)%3;_||(this.recalcMatrix(A),_=this.computedMatrix);var L=_[T],M=_[T+4],z=_[T+8];if(E){var N=Math.abs(L),I=Math.abs(M),k=Math.abs(z),B=Math.max(N,I,k);N===B?(L=L<0?-1:1,M=z=0):k===B?(z=z<0?-1:1,L=M=0):(M=M<0?-1:1,L=z=0)}else{var D=m(L,M,z);L/=D,M/=D,z/=D}var O=_[s],H=_[s+4],Y=_[s+8],j=O*L+H*M+Y*z;O-=L*j,H-=M*j,Y-=z*j;var et=m(O,H,Y);O/=et,H/=et,Y/=et;var it=M*Y-z*H,ut=z*O-L*Y,J=L*H-M*O,X=m(it,ut,J);it/=X,ut/=X,J/=X,this.center.jump(A,Ut,kt,Vt),this.radius.idle(A),this.up.jump(A,L,M,z),this.right.jump(A,O,H,Y);var tt,V;if(T===2){var Q=_[1],ot=_[5],$=_[9],Z=Q*O+ot*H+$*Y,st=Q*it+ot*ut+$*J;Tt<0?tt=-Math.PI/2:tt=Math.PI/2,V=Math.atan2(st,Z)}else{var nt=_[2],ct=_[6],gt=_[10],Tt=nt*L+ct*M+gt*z,wt=nt*O+ct*H+gt*Y,Rt=nt*it+ct*ut+gt*J;tt=Math.asin(v(Tt)),V=Math.atan2(Rt,wt)}this.angle.jump(A,V,tt),this.recalcMatrix(A);var bt=_[2],At=_[6],mt=_[10],Lt=this.computedMatrix;a(Lt,_);var Ht=Lt[15],Ut=Lt[12]/Ht,kt=Lt[13]/Ht,Vt=Lt[14]/Ht,It=Math.exp(this.computedRadius[0]);this.center.jump(A,Ut-bt*It,kt-At*It,Vt-mt*It)},o.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},o.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},o.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},o.setDistance=function(A,_){_>0&&this.radius.set(A,Math.log(_))},o.lookAt=function(A,_,y,E){this.recalcMatrix(A),_=_||this.computedEye,y=y||this.computedCenter,E=E||this.computedUp;var T=E[0],s=E[1],L=E[2],M=m(T,s,L);if(!(M<1e-6)){T/=M,s/=M,L/=M;var z=_[0]-y[0],D=_[1]-y[1],N=_[2]-y[2],I=m(z,D,N);if(!(I<1e-6)){z/=I,D/=I,N/=I;var k=this.computedRight,B=k[0],O=k[1],H=k[2],Y=T*B+s*O+L*H;B-=Y*T,O-=Y*s,H-=Y*L;var j=m(B,O,H);if(!(j<.01&&(B=s*N-L*D,O=L*z-T*N,H=T*D-s*z,j=m(B,O,H),j<1e-6))){B/=j,O/=j,H/=j,this.up.set(A,T,s,L),this.right.set(A,B,O,H),this.center.set(A,y[0],y[1],y[2]),this.radius.set(A,Math.log(I));var et=s*H-L*O,it=L*B-T*H,ut=T*O-s*B,J=m(et,it,ut);et/=J,it/=J,ut/=J;var X=T*z+s*D+L*N,tt=B*z+O*D+H*N,V=et*z+it*D+ut*N,Q=Math.asin(v(X)),ot=Math.atan2(V,tt),$=this.angle._state,Z=$[$.length-1],st=$[$.length-2];Z=Z%(2*Math.PI);var nt=Math.abs(Z+2*Math.PI-ot),ct=Math.abs(Z-ot),gt=Math.abs(Z-2*Math.PI-ot);nt0?H.pop():new ArrayBuffer(B)}p.mallocArrayBuffer=d;function w(k){return new Uint8Array(d(k),0,k)}p.mallocUint8=w;function A(k){return new Uint16Array(d(2*k),0,k)}p.mallocUint16=A;function _(k){return new Uint32Array(d(4*k),0,k)}p.mallocUint32=_;function y(k){return new Int8Array(d(k),0,k)}p.mallocInt8=y;function E(k){return new Int16Array(d(2*k),0,k)}p.mallocInt16=E;function T(k){return new Int32Array(d(4*k),0,k)}p.mallocInt32=T;function s(k){return new Float32Array(d(4*k),0,k)}p.mallocFloat32=p.mallocFloat=s;function L(k){return new Float64Array(d(8*k),0,k)}p.mallocFloat64=p.mallocDouble=L;function M(k){return f?new Uint8ClampedArray(d(k),0,k):w(k)}p.mallocUint8Clamped=M;function z(k){return c?new BigUint64Array(d(8*k),0,k):null}p.mallocBigUint64=z;function D(k){return l?new BigInt64Array(d(8*k),0,k):null}p.mallocBigInt64=D;function N(k){return new DataView(d(k),0,k)}p.mallocDataView=N;function I(k){k=e.nextPow2(k);var B=e.log2(k),O=b[B];return O.length>0?O.pop():new n(k)}p.mallocBuffer=I,p.clearCache=function(){for(var B=0;B<32;++B)m.UINT8[B].length=0,m.UINT16[B].length=0,m.UINT32[B].length=0,m.INT8[B].length=0,m.INT16[B].length=0,m.INT32[B].length=0,m.FLOAT[B].length=0,m.DOUBLE[B].length=0,m.BIGUINT64[B].length=0,m.BIGINT64[B].length=0,m.UINT8C[B].length=0,v[B].length=0,b[B].length=0}},1731:function(h){"use restrict";h.exports=p;function p(e){this.roots=new Array(e),this.ranks=new Array(e);for(var a=0;a",H="",Y=O.length,j=H.length,et=I[0]===d||I[0]===_,it=0,ut=-j;it>-1&&(it=k.indexOf(O,it),!(it===-1||(ut=k.indexOf(H,it+Y),ut===-1)||ut<=it));){for(var J=it;J=ut)B[J]=null,k=k.substr(0,J)+" "+k.substr(J+1);else if(B[J]!==null){var X=B[J].indexOf(I[0]);X===-1?B[J]+=I:et&&(B[J]=B[J].substr(0,X+1)+(1+parseInt(B[J][X+1]))+B[J].substr(X+2))}var tt=it+Y,V=k.substr(tt,ut-tt),Q=V.indexOf(O);Q!==-1?it=Q:it=ut+j}return B}function T(N,I,k){for(var B=I.textAlign||"start",O=I.textBaseline||"alphabetic",H=[1<<30,1<<30],Y=[0,0],j=N.length,et=0;et/g,` +`):k=k.replace(/\/g," ");var Y="",j=[];for(Z=0;Z-1?parseInt(Vt[1+Kt]):0,he=$t>-1?parseInt(It[1+$t]):0;le!==he&&(re=re.replace(Rt(),"?px "),ct*=Math.pow(.75,he-le),re=re.replace("?px ",Rt())),nt+=.25*X*(he-le)}if(H.superscripts===!0){var de=Vt.indexOf(d),xe=It.indexOf(d),Se=de>-1?parseInt(Vt[1+de]):0,ne=xe>-1?parseInt(It[1+xe]):0;Se!==ne&&(re=re.replace(Rt(),"?px "),ct*=Math.pow(.75,ne-Se),re=re.replace("?px ",Rt())),nt-=.25*X*(ne-Se)}if(H.bolds===!0){var zt=Vt.indexOf(v)>-1,Xt=It.indexOf(v)>-1;!zt&&Xt&&(Jt?re=re.replace("italic ","italic bold "):re="bold "+re),zt&&!Xt&&(re=re.replace("bold ",""))}if(H.italics===!0){var Jt=Vt.indexOf(u)>-1,Wt=It.indexOf(u)>-1;!Jt&&Wt&&(re="italic "+re),Jt&&!Wt&&(re=re.replace("italic ",""))}I.font=re}for($=0;$0&&(O=B.size),B.lineSpacing&&B.lineSpacing>0&&(H=B.lineSpacing),B.styletags&&B.styletags.breaklines&&(Y.breaklines=!!B.styletags.breaklines),B.styletags&&B.styletags.bolds&&(Y.bolds=!!B.styletags.bolds),B.styletags&&B.styletags.italics&&(Y.italics=!!B.styletags.italics),B.styletags&&B.styletags.subscripts&&(Y.subscripts=!!B.styletags.subscripts),B.styletags&&B.styletags.superscripts&&(Y.superscripts=!!B.styletags.superscripts)),k.font=[B.fontStyle,B.fontVariant,B.fontWeight,O+"px",B.font].filter(function(et){return et}).join(" "),k.textAlign="start",k.textBaseline="alphabetic",k.direction="ltr";var j=s(I,k,N,O,H,Y);return z(j,B,O)}},5346:function(h){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(L){L.permitHostObjects___&&L.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var e=!1;if(typeof WeakMap=="function"){var a=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new a,f=Object.freeze({});if(n.set(f,1),n.get(f)!==1)e=!0;else{h.exports=WeakMap;return}}}var c=Object.getOwnPropertyNames,l=Object.defineProperty,m=Object.isExtensible,v="weakmap:",b=v+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var u=new ArrayBuffer(25),o=new Uint8Array(u);crypto.getRandomValues(o),b=v+"rand:"+Array.prototype.map.call(o,function(L){return(L%36).toString(36)}).join("")+"___"}function d(L){return!(L.substr(0,v.length)==v&&L.substr(L.length-3)==="___")}if(l(Object,"getOwnPropertyNames",{value:function(M){return c(M).filter(d)}}),"getPropertyNames"in Object){var w=Object.getPropertyNames;l(Object,"getPropertyNames",{value:function(M){return w(M).filter(d)}})}function A(L){if(L!==Object(L))throw new TypeError("Not an object: "+L);var M=L[b];if(M&&M.key===L)return M;if(m(L)){M={key:L};try{return l(L,b,{value:M,writable:!1,enumerable:!1,configurable:!1}),M}catch{return}}}(function(){var L=Object.freeze;l(Object,"freeze",{value:function(N){return A(N),L(N)}});var M=Object.seal;l(Object,"seal",{value:function(N){return A(N),M(N)}});var z=Object.preventExtensions;l(Object,"preventExtensions",{value:function(N){return A(N),z(N)}})})();function _(L){return L.prototype=null,Object.freeze(L)}var y=!1;function E(){!y&&typeof console<"u"&&(y=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var T=0,s=function(){this instanceof s||E();var L=[],M=[],z=T++;function D(B,O){var H,Y=A(B);return Y?z in Y?Y[z]:O:(H=L.indexOf(B),H>=0?M[H]:O)}function N(B){var O=A(B);return O?z in O:L.indexOf(B)>=0}function I(B,O){var H,Y=A(B);return Y?Y[z]=O:(H=L.indexOf(B),H>=0?M[H]=O:(H=L.length,M[H]=O,L[H]=B)),this}function k(B){var O=A(B),H,Y;return O?z in O&&delete O[z]:(H=L.indexOf(B),H<0?!1:(Y=L.length-1,L[H]=void 0,M[H]=M[Y],L[H]=L[Y],L.length=Y,M.length=Y,!0))}return Object.create(s.prototype,{get___:{value:_(D)},has___:{value:_(N)},set___:{value:_(I)},delete___:{value:_(k)}})};s.prototype=Object.create(Object.prototype,{get:{value:function(M,z){return this.get___(M,z)},writable:!0,configurable:!0},has:{value:function(M){return this.has___(M)},writable:!0,configurable:!0},set:{value:function(M,z){return this.set___(M,z)},writable:!0,configurable:!0},delete:{value:function(M){return this.delete___(M)},writable:!0,configurable:!0}}),typeof a=="function"?function(){e&&typeof Proxy<"u"&&(Proxy=void 0);function L(){this instanceof s||E();var M=new a,z=void 0,D=!1;function N(O,H){return z?M.has(O)?M.get(O):z.get___(O,H):M.get(O,H)}function I(O){return M.has(O)||(z?z.has___(O):!1)}var k;e?k=function(O,H){return M.set(O,H),M.has(O)||(z||(z=new s),z.set(O,H)),this}:k=function(O,H){if(D)try{M.set(O,H)}catch{z||(z=new s),z.set___(O,H)}else M.set(O,H);return this};function B(O){var H=!!M.delete(O);return z&&z.delete___(O)||H}return Object.create(s.prototype,{get___:{value:_(N)},has___:{value:_(I)},set___:{value:_(k)},delete___:{value:_(B)},permitHostObjects___:{value:_(function(O){if(O===r)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}L.prototype=s.prototype,h.exports=L,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),h.exports=s)})()},9222:function(h,p,r){var e=r(7178);h.exports=a;function a(){var n={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var c=f.valueOf(n);return c&&c.identity===n?c:e(f,n)}}},7178:function(h){h.exports=p;function p(r,e){var a={identity:e},n=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(f){return f!==e?n.apply(this,arguments):a},writable:!0}),a}},4037:function(h,p,r){var e=r(9222);h.exports=a;function a(){var n=e();return{get:function(f,c){var l=n(f);return l.hasOwnProperty("value")?l.value:c},set:function(f,c){return n(f).value=c,this},has:function(f){return"value"in n(f)},delete:function(f){return delete n(f).value}}}},6183:function(h){function p(){return function(c,l,m,v,b,u){var o=c[0],d=m[0],w=[0],A=d;v|=0;var _=0,y=d;for(_=0;_=0!=T>=0&&b.push(w[0]+.5+.5*(E+T)/(E-T))}v+=y,++w[0]}}}function r(){return p()}var e=r;function a(c){var l={};return function(v,b,u){var o=v.dtype,d=v.order,w=[o,d.join()].join(),A=l[w];return A||(l[w]=A=c([o,d])),A(v.shape.slice(0),v.data,v.stride,v.offset|0,b,u)}}function n(c){return a(e.bind(void 0,c))}function f(c){return n({funcName:c.funcName})}h.exports=f({funcName:"zeroCrossings"})},9584:function(h,p,r){h.exports=a;var e=r(6183);function a(n,f){var c=[];return f=+f||0,e(n.hi(n.shape[0]-1),c,f),c}},6601:function(){}},i={};function S(h){var p=i[h];if(p!==void 0)return p.exports;var r=i[h]={id:h,loaded:!1,exports:{}};return C[h].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}(function(){S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){S.nmd=function(h){return h.paths=[],h.children||(h.children=[]),h}}();var x=S(7386);return x}()})},33576:function(G,U,t){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */function g(ne,zt){if(!(ne instanceof zt))throw new TypeError("Cannot call a class as a function")}function C(ne,zt){for(var Xt=0;Xt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{return!1}}return zt=r(zt),p(ne,Jt()?Reflect.construct(zt,Xt||[],r(ne).constructor):zt.apply(ne,Xt))}function p(ne,zt){if(zt&&(f(zt)==="object"||typeof zt=="function"))return zt;if(zt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e(ne)}function r(ne){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Xt){return Xt.__proto__||Object.getPrototypeOf(Xt)},r(ne)}function e(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function a(ne,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Super expression must either be null or a function");ne.prototype=Object.create(zt&&zt.prototype,{constructor:{value:ne,writable:!0,configurable:!0}}),Object.defineProperty(ne,"prototype",{writable:!1}),zt&&n(ne,zt)}function n(ne,zt){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Jt,Wt){return Jt.__proto__=Wt,Jt},n(ne,zt)}function f(ne){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(zt){return typeof zt}:function(zt){return zt&&typeof Symbol=="function"&&zt.constructor===Symbol&&zt!==Symbol.prototype?"symbol":typeof zt},f(ne)}var c=t(59968),l=t(35984),m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;U.Buffer=o,U.SlowBuffer=z,U.INSPECT_MAX_BYTES=50;var h=2147483647;U.kMaxLength=h,o.TYPED_ARRAY_SUPPORT=b(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function b(){try{var ne=new Uint8Array(1),zt={foo:function(){return 42}};return Object.setPrototypeOf(zt,Uint8Array.prototype),Object.setPrototypeOf(ne,zt),ne.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function u(ne){if(ne>h)throw new RangeError('The value "'+ne+'" is invalid for option "size"');var zt=new Uint8Array(ne);return Object.setPrototypeOf(zt,o.prototype),zt}function o(ne,zt,Xt){if(typeof ne=="number"){if(typeof zt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(ne)}return d(ne,zt,Xt)}o.poolSize=8192;function d(ne,zt,Xt){if(typeof ne=="string")return y(ne,zt);if(ArrayBuffer.isView(ne))return T(ne);if(ne==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+f(ne));if(le(ne,ArrayBuffer)||ne&&le(ne.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(le(ne,SharedArrayBuffer)||ne&&le(ne.buffer,SharedArrayBuffer)))return s(ne,zt,Xt);if(typeof ne=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Jt=ne.valueOf&&ne.valueOf();if(Jt!=null&&Jt!==ne)return o.from(Jt,zt,Xt);var Wt=L(ne);if(Wt)return Wt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ne[Symbol.toPrimitive]=="function")return o.from(ne[Symbol.toPrimitive]("string"),zt,Xt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+f(ne))}o.from=function(ne,zt,Xt){return d(ne,zt,Xt)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function w(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be of type number');if(ne<0)throw new RangeError('The value "'+ne+'" is invalid for option "size"')}function A(ne,zt,Xt){return w(ne),ne<=0?u(ne):zt!==void 0?typeof Xt=="string"?u(ne).fill(zt,Xt):u(ne).fill(zt):u(ne)}o.alloc=function(ne,zt,Xt){return A(ne,zt,Xt)};function _(ne){return w(ne),u(ne<0?0:M(ne)|0)}o.allocUnsafe=function(ne){return _(ne)},o.allocUnsafeSlow=function(ne){return _(ne)};function y(ne,zt){if((typeof zt!="string"||zt==="")&&(zt="utf8"),!o.isEncoding(zt))throw new TypeError("Unknown encoding: "+zt);var Xt=D(ne,zt)|0,Jt=u(Xt),Wt=Jt.write(ne,zt);return Wt!==Xt&&(Jt=Jt.slice(0,Wt)),Jt}function E(ne){for(var zt=ne.length<0?0:M(ne.length)|0,Xt=u(zt),Jt=0;Jt=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return ne|0}function z(ne){return+ne!=ne&&(ne=0),o.alloc(+ne)}o.isBuffer=function(zt){return zt!=null&&zt._isBuffer===!0&&zt!==o.prototype},o.compare=function(zt,Xt){if(le(zt,Uint8Array)&&(zt=o.from(zt,zt.offset,zt.byteLength)),le(Xt,Uint8Array)&&(Xt=o.from(Xt,Xt.offset,Xt.byteLength)),!o.isBuffer(zt)||!o.isBuffer(Xt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(zt===Xt)return 0;for(var Jt=zt.length,Wt=Xt.length,Ft=0,xt=Math.min(Jt,Wt);FtWt.length?(o.isBuffer(xt)||(xt=o.from(xt)),xt.copy(Wt,Ft)):Uint8Array.prototype.set.call(Wt,xt,Ft);else if(o.isBuffer(xt))xt.copy(Wt,Ft);else throw new TypeError('"list" argument must be an Array of Buffers');Ft+=xt.length}return Wt};function D(ne,zt){if(o.isBuffer(ne))return ne.length;if(ArrayBuffer.isView(ne)||le(ne,ArrayBuffer))return ne.byteLength;if(typeof ne!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+f(ne));var Xt=ne.length,Jt=arguments.length>2&&arguments[2]===!0;if(!Jt&&Xt===0)return 0;for(var Wt=!1;;)switch(zt){case"ascii":case"latin1":case"binary":return Xt;case"utf8":case"utf-8":return Vt(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt*2;case"hex":return Xt>>>1;case"base64":return Kt(ne).length;default:if(Wt)return Jt?-1:Vt(ne).length;zt=(""+zt).toLowerCase(),Wt=!0}}o.byteLength=D;function N(ne,zt,Xt){var Jt=!1;if((zt===void 0||zt<0)&&(zt=0),zt>this.length||((Xt===void 0||Xt>this.length)&&(Xt=this.length),Xt<=0)||(Xt>>>=0,zt>>>=0,Xt<=zt))return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return Q(this,zt,Xt);case"utf8":case"utf-8":return ut(this,zt,Xt);case"ascii":return tt(this,zt,Xt);case"latin1":case"binary":return V(this,zt,Xt);case"base64":return it(this,zt,Xt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,zt,Xt);default:if(Jt)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),Jt=!0}}o.prototype._isBuffer=!0;function I(ne,zt,Xt){var Jt=ne[zt];ne[zt]=ne[Xt],ne[Xt]=Jt}o.prototype.swap16=function(){var zt=this.length;if(zt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Xt=0;XtXt&&(zt+=" ... "),""},m&&(o.prototype[m]=o.prototype.inspect),o.prototype.compare=function(zt,Xt,Jt,Wt,Ft){if(le(zt,Uint8Array)&&(zt=o.from(zt,zt.offset,zt.byteLength)),!o.isBuffer(zt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+f(zt));if(Xt===void 0&&(Xt=0),Jt===void 0&&(Jt=zt?zt.length:0),Wt===void 0&&(Wt=0),Ft===void 0&&(Ft=this.length),Xt<0||Jt>zt.length||Wt<0||Ft>this.length)throw new RangeError("out of range index");if(Wt>=Ft&&Xt>=Jt)return 0;if(Wt>=Ft)return-1;if(Xt>=Jt)return 1;if(Xt>>>=0,Jt>>>=0,Wt>>>=0,Ft>>>=0,this===zt)return 0;for(var xt=Ft-Wt,yt=Jt-Xt,Et=Math.min(xt,yt),Mt=this.slice(Wt,Ft),Nt=zt.slice(Xt,Jt),jt=0;jt2147483647?Xt=2147483647:Xt<-2147483648&&(Xt=-2147483648),Xt=+Xt,he(Xt)&&(Xt=Wt?0:ne.length-1),Xt<0&&(Xt=ne.length+Xt),Xt>=ne.length){if(Wt)return-1;Xt=ne.length-1}else if(Xt<0)if(Wt)Xt=0;else return-1;if(typeof zt=="string"&&(zt=o.from(zt,Jt)),o.isBuffer(zt))return zt.length===0?-1:B(ne,zt,Xt,Jt,Wt);if(typeof zt=="number")return zt=zt&255,typeof Uint8Array.prototype.indexOf=="function"?Wt?Uint8Array.prototype.indexOf.call(ne,zt,Xt):Uint8Array.prototype.lastIndexOf.call(ne,zt,Xt):B(ne,[zt],Xt,Jt,Wt);throw new TypeError("val must be string, number or Buffer")}function B(ne,zt,Xt,Jt,Wt){var Ft=1,xt=ne.length,yt=zt.length;if(Jt!==void 0&&(Jt=String(Jt).toLowerCase(),Jt==="ucs2"||Jt==="ucs-2"||Jt==="utf16le"||Jt==="utf-16le")){if(ne.length<2||zt.length<2)return-1;Ft=2,xt/=2,yt/=2,Xt/=2}function Et(me,be){return Ft===1?me[be]:me.readUInt16BE(be*Ft)}var Mt;if(Wt){var Nt=-1;for(Mt=Xt;Mtxt&&(Xt=xt-yt),Mt=Xt;Mt>=0;Mt--){for(var jt=!0,ie=0;ieWt&&(Jt=Wt)):Jt=Wt;var Ft=zt.length;Jt>Ft/2&&(Jt=Ft/2);var xt;for(xt=0;xt>>0,isFinite(Jt)?(Jt=Jt>>>0,Wt===void 0&&(Wt="utf8")):(Wt=Jt,Jt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ft=this.length-Xt;if((Jt===void 0||Jt>Ft)&&(Jt=Ft),zt.length>0&&(Jt<0||Xt<0)||Xt>this.length)throw new RangeError("Attempt to write outside buffer bounds");Wt||(Wt="utf8");for(var xt=!1;;)switch(Wt){case"hex":return O(this,zt,Xt,Jt);case"utf8":case"utf-8":return H(this,zt,Xt,Jt);case"ascii":case"latin1":case"binary":return Y(this,zt,Xt,Jt);case"base64":return j(this,zt,Xt,Jt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,zt,Xt,Jt);default:if(xt)throw new TypeError("Unknown encoding: "+Wt);Wt=(""+Wt).toLowerCase(),xt=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(ne,zt,Xt){return zt===0&&Xt===ne.length?c.fromByteArray(ne):c.fromByteArray(ne.slice(zt,Xt))}function ut(ne,zt,Xt){Xt=Math.min(ne.length,Xt);for(var Jt=[],Wt=zt;Wt239?4:Ft>223?3:Ft>191?2:1;if(Wt+yt<=Xt){var Et=void 0,Mt=void 0,Nt=void 0,jt=void 0;switch(yt){case 1:Ft<128&&(xt=Ft);break;case 2:Et=ne[Wt+1],(Et&192)===128&&(jt=(Ft&31)<<6|Et&63,jt>127&&(xt=jt));break;case 3:Et=ne[Wt+1],Mt=ne[Wt+2],(Et&192)===128&&(Mt&192)===128&&(jt=(Ft&15)<<12|(Et&63)<<6|Mt&63,jt>2047&&(jt<55296||jt>57343)&&(xt=jt));break;case 4:Et=ne[Wt+1],Mt=ne[Wt+2],Nt=ne[Wt+3],(Et&192)===128&&(Mt&192)===128&&(Nt&192)===128&&(jt=(Ft&15)<<18|(Et&63)<<12|(Mt&63)<<6|Nt&63,jt>65535&&jt<1114112&&(xt=jt))}}xt===null?(xt=65533,yt=1):xt>65535&&(xt-=65536,Jt.push(xt>>>10&1023|55296),xt=56320|xt&1023),Jt.push(xt),Wt+=yt}return X(Jt)}var J=4096;function X(ne){var zt=ne.length;if(zt<=J)return String.fromCharCode.apply(String,ne);for(var Xt="",Jt=0;JtJt)&&(Xt=Jt);for(var Wt="",Ft=zt;FtJt&&(zt=Jt),Xt<0?(Xt+=Jt,Xt<0&&(Xt=0)):Xt>Jt&&(Xt=Jt),XtXt)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(zt,Xt,Jt){zt=zt>>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=this[zt],Ft=1,xt=0;++xt>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=this[zt+--Xt],Ft=1;Xt>0&&(Ft*=256);)Wt+=this[zt+--Xt]*Ft;return Wt},o.prototype.readUint8=o.prototype.readUInt8=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,1,this.length),this[zt]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,2,this.length),this[zt]|this[zt+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,2,this.length),this[zt]<<8|this[zt+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),(this[zt]|this[zt+1]<<8|this[zt+2]<<16)+this[zt+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),this[zt]*16777216+(this[zt+1]<<16|this[zt+2]<<8|this[zt+3])},o.prototype.readBigUInt64LE=xe(function(zt){zt=zt>>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=Xt+this[++zt]*Math.pow(2,8)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,24),Ft=this[++zt]+this[++zt]*Math.pow(2,8)+this[++zt]*Math.pow(2,16)+Jt*Math.pow(2,24);return BigInt(Wt)+(BigInt(Ft)<>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=Xt*Math.pow(2,24)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,8)+this[++zt],Ft=this[++zt]*Math.pow(2,24)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,8)+Jt;return(BigInt(Wt)<>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=this[zt],Ft=1,xt=0;++xt=Ft&&(Wt-=Math.pow(2,8*Xt)),Wt},o.prototype.readIntBE=function(zt,Xt,Jt){zt=zt>>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=Xt,Ft=1,xt=this[zt+--Wt];Wt>0&&(Ft*=256);)xt+=this[zt+--Wt]*Ft;return Ft*=128,xt>=Ft&&(xt-=Math.pow(2,8*Xt)),xt},o.prototype.readInt8=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,1,this.length),this[zt]&128?(255-this[zt]+1)*-1:this[zt]},o.prototype.readInt16LE=function(zt,Xt){zt=zt>>>0,Xt||$(zt,2,this.length);var Jt=this[zt]|this[zt+1]<<8;return Jt&32768?Jt|4294901760:Jt},o.prototype.readInt16BE=function(zt,Xt){zt=zt>>>0,Xt||$(zt,2,this.length);var Jt=this[zt+1]|this[zt]<<8;return Jt&32768?Jt|4294901760:Jt},o.prototype.readInt32LE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),this[zt]|this[zt+1]<<8|this[zt+2]<<16|this[zt+3]<<24},o.prototype.readInt32BE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),this[zt]<<24|this[zt+1]<<16|this[zt+2]<<8|this[zt+3]},o.prototype.readBigInt64LE=xe(function(zt){zt=zt>>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=this[zt+4]+this[zt+5]*Math.pow(2,8)+this[zt+6]*Math.pow(2,16)+(Jt<<24);return(BigInt(Wt)<>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=(Xt<<24)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,8)+this[++zt];return(BigInt(Wt)<>>0,Xt||$(zt,4,this.length),l.read(this,zt,!0,23,4)},o.prototype.readFloatBE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),l.read(this,zt,!1,23,4)},o.prototype.readDoubleLE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,8,this.length),l.read(this,zt,!0,52,8)},o.prototype.readDoubleBE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,8,this.length),l.read(this,zt,!1,52,8)};function Z(ne,zt,Xt,Jt,Wt,Ft){if(!o.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(zt>Wt||ztne.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(zt,Xt,Jt,Wt){if(zt=+zt,Xt=Xt>>>0,Jt=Jt>>>0,!Wt){var Ft=Math.pow(2,8*Jt)-1;Z(this,zt,Xt,Jt,Ft,0)}var xt=1,yt=0;for(this[Xt]=zt&255;++yt>>0,Jt=Jt>>>0,!Wt){var Ft=Math.pow(2,8*Jt)-1;Z(this,zt,Xt,Jt,Ft,0)}var xt=Jt-1,yt=1;for(this[Xt+xt]=zt&255;--xt>=0&&(yt*=256);)this[Xt+xt]=zt/yt&255;return Xt+Jt},o.prototype.writeUint8=o.prototype.writeUInt8=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,1,255,0),this[Xt]=zt&255,Xt+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,65535,0),this[Xt]=zt&255,this[Xt+1]=zt>>>8,Xt+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,65535,0),this[Xt]=zt>>>8,this[Xt+1]=zt&255,Xt+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,4294967295,0),this[Xt+3]=zt>>>24,this[Xt+2]=zt>>>16,this[Xt+1]=zt>>>8,this[Xt]=zt&255,Xt+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,4294967295,0),this[Xt]=zt>>>24,this[Xt+1]=zt>>>16,this[Xt+2]=zt>>>8,this[Xt+3]=zt&255,Xt+4};function st(ne,zt,Xt,Jt,Wt){mt(zt,Jt,Wt,ne,Xt,7);var Ft=Number(zt&BigInt(4294967295));ne[Xt++]=Ft,Ft=Ft>>8,ne[Xt++]=Ft,Ft=Ft>>8,ne[Xt++]=Ft,Ft=Ft>>8,ne[Xt++]=Ft;var xt=Number(zt>>BigInt(32)&BigInt(4294967295));return ne[Xt++]=xt,xt=xt>>8,ne[Xt++]=xt,xt=xt>>8,ne[Xt++]=xt,xt=xt>>8,ne[Xt++]=xt,Xt}function nt(ne,zt,Xt,Jt,Wt){mt(zt,Jt,Wt,ne,Xt,7);var Ft=Number(zt&BigInt(4294967295));ne[Xt+7]=Ft,Ft=Ft>>8,ne[Xt+6]=Ft,Ft=Ft>>8,ne[Xt+5]=Ft,Ft=Ft>>8,ne[Xt+4]=Ft;var xt=Number(zt>>BigInt(32)&BigInt(4294967295));return ne[Xt+3]=xt,xt=xt>>8,ne[Xt+2]=xt,xt=xt>>8,ne[Xt+1]=xt,xt=xt>>8,ne[Xt]=xt,Xt+8}o.prototype.writeBigUInt64LE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,zt,Xt,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return nt(this,zt,Xt,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(zt,Xt,Jt,Wt){if(zt=+zt,Xt=Xt>>>0,!Wt){var Ft=Math.pow(2,8*Jt-1);Z(this,zt,Xt,Jt,Ft-1,-Ft)}var xt=0,yt=1,Et=0;for(this[Xt]=zt&255;++xt>0)-Et&255;return Xt+Jt},o.prototype.writeIntBE=function(zt,Xt,Jt,Wt){if(zt=+zt,Xt=Xt>>>0,!Wt){var Ft=Math.pow(2,8*Jt-1);Z(this,zt,Xt,Jt,Ft-1,-Ft)}var xt=Jt-1,yt=1,Et=0;for(this[Xt+xt]=zt&255;--xt>=0&&(yt*=256);)zt<0&&Et===0&&this[Xt+xt+1]!==0&&(Et=1),this[Xt+xt]=(zt/yt>>0)-Et&255;return Xt+Jt},o.prototype.writeInt8=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,1,127,-128),zt<0&&(zt=255+zt+1),this[Xt]=zt&255,Xt+1},o.prototype.writeInt16LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,32767,-32768),this[Xt]=zt&255,this[Xt+1]=zt>>>8,Xt+2},o.prototype.writeInt16BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,32767,-32768),this[Xt]=zt>>>8,this[Xt+1]=zt&255,Xt+2},o.prototype.writeInt32LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,2147483647,-2147483648),this[Xt]=zt&255,this[Xt+1]=zt>>>8,this[Xt+2]=zt>>>16,this[Xt+3]=zt>>>24,Xt+4},o.prototype.writeInt32BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,2147483647,-2147483648),zt<0&&(zt=4294967295+zt+1),this[Xt]=zt>>>24,this[Xt+1]=zt>>>16,this[Xt+2]=zt>>>8,this[Xt+3]=zt&255,Xt+4},o.prototype.writeBigInt64LE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,zt,Xt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return nt(this,zt,Xt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ct(ne,zt,Xt,Jt,Wt,Ft){if(Xt+Jt>ne.length)throw new RangeError("Index out of range");if(Xt<0)throw new RangeError("Index out of range")}function gt(ne,zt,Xt,Jt,Wt){return zt=+zt,Xt=Xt>>>0,Wt||ct(ne,zt,Xt,4),l.write(ne,zt,Xt,Jt,23,4),Xt+4}o.prototype.writeFloatLE=function(zt,Xt,Jt){return gt(this,zt,Xt,!0,Jt)},o.prototype.writeFloatBE=function(zt,Xt,Jt){return gt(this,zt,Xt,!1,Jt)};function Tt(ne,zt,Xt,Jt,Wt){return zt=+zt,Xt=Xt>>>0,Wt||ct(ne,zt,Xt,8),l.write(ne,zt,Xt,Jt,52,8),Xt+8}o.prototype.writeDoubleLE=function(zt,Xt,Jt){return Tt(this,zt,Xt,!0,Jt)},o.prototype.writeDoubleBE=function(zt,Xt,Jt){return Tt(this,zt,Xt,!1,Jt)},o.prototype.copy=function(zt,Xt,Jt,Wt){if(!o.isBuffer(zt))throw new TypeError("argument should be a Buffer");if(Jt||(Jt=0),!Wt&&Wt!==0&&(Wt=this.length),Xt>=zt.length&&(Xt=zt.length),Xt||(Xt=0),Wt>0&&Wt=this.length)throw new RangeError("Index out of range");if(Wt<0)throw new RangeError("sourceEnd out of bounds");Wt>this.length&&(Wt=this.length),zt.length-Xt>>0,Jt=Jt===void 0?this.length:Jt>>>0,zt||(zt=0);var xt;if(typeof zt=="number")for(xt=Xt;xtMath.pow(2,32)?Wt=bt(String(Xt)):typeof Xt=="bigint"&&(Wt=String(Xt),(Xt>Math.pow(BigInt(2),BigInt(32))||Xt<-Math.pow(BigInt(2),BigInt(32)))&&(Wt=bt(Wt)),Wt+="n"),Jt+=" It must be ".concat(zt,". Received ").concat(Wt),Jt},RangeError);function bt(ne){for(var zt="",Xt=ne.length,Jt=ne[0]==="-"?1:0;Xt>=Jt+4;Xt-=3)zt="_".concat(ne.slice(Xt-3,Xt)).concat(zt);return"".concat(ne.slice(0,Xt)).concat(zt)}function At(ne,zt,Xt){Lt(zt,"offset"),(ne[zt]===void 0||ne[zt+Xt]===void 0)&&Ht(zt,ne.length-(Xt+1))}function mt(ne,zt,Xt,Jt,Wt,Ft){if(ne>Xt||ne3?zt===0||zt===BigInt(0)?yt=">= 0".concat(xt," and < 2").concat(xt," ** ").concat((Ft+1)*8).concat(xt):yt=">= -(2".concat(xt," ** ").concat((Ft+1)*8-1).concat(xt,") and < 2 ** ")+"".concat((Ft+1)*8-1).concat(xt):yt=">= ".concat(zt).concat(xt," and <= ").concat(Xt).concat(xt),new wt.ERR_OUT_OF_RANGE("value",yt,ne)}At(Jt,Wt,Ft)}function Lt(ne,zt){if(typeof ne!="number")throw new wt.ERR_INVALID_ARG_TYPE(zt,"number",ne)}function Ht(ne,zt,Xt){throw Math.floor(ne)!==ne?(Lt(ne,Xt),new wt.ERR_OUT_OF_RANGE(Xt||"offset","an integer",ne)):zt<0?new wt.ERR_BUFFER_OUT_OF_BOUNDS:new wt.ERR_OUT_OF_RANGE(Xt||"offset",">= ".concat(Xt?1:0," and <= ").concat(zt),ne)}var Ut=/[^+/0-9A-Za-z-_]/g;function kt(ne){if(ne=ne.split("=")[0],ne=ne.trim().replace(Ut,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function Vt(ne,zt){zt=zt||1/0;for(var Xt,Jt=ne.length,Wt=null,Ft=[],xt=0;xt55295&&Xt<57344){if(!Wt){if(Xt>56319){(zt-=3)>-1&&Ft.push(239,191,189);continue}else if(xt+1===Jt){(zt-=3)>-1&&Ft.push(239,191,189);continue}Wt=Xt;continue}if(Xt<56320){(zt-=3)>-1&&Ft.push(239,191,189),Wt=Xt;continue}Xt=(Wt-55296<<10|Xt-56320)+65536}else Wt&&(zt-=3)>-1&&Ft.push(239,191,189);if(Wt=null,Xt<128){if((zt-=1)<0)break;Ft.push(Xt)}else if(Xt<2048){if((zt-=2)<0)break;Ft.push(Xt>>6|192,Xt&63|128)}else if(Xt<65536){if((zt-=3)<0)break;Ft.push(Xt>>12|224,Xt>>6&63|128,Xt&63|128)}else if(Xt<1114112){if((zt-=4)<0)break;Ft.push(Xt>>18|240,Xt>>12&63|128,Xt>>6&63|128,Xt&63|128)}else throw new Error("Invalid code point")}return Ft}function It(ne){for(var zt=[],Xt=0;Xt>8,Wt=Xt%256,Ft.push(Wt),Ft.push(Jt);return Ft}function Kt(ne){return c.toByteArray(kt(ne))}function $t(ne,zt,Xt,Jt){var Wt;for(Wt=0;Wt=zt.length||Wt>=ne.length);++Wt)zt[Wt+Xt]=ne[Wt];return Wt}function le(ne,zt){return ne instanceof zt||ne!=null&&ne.constructor!=null&&ne.constructor.name!=null&&ne.constructor.name===zt.name}function he(ne){return ne!==ne}var de=function(){for(var ne="0123456789abcdef",zt=new Array(256),Xt=0;Xt<16;++Xt)for(var Jt=Xt*16,Wt=0;Wt<16;++Wt)zt[Jt+Wt]=ne[Xt]+ne[Wt];return zt}();function xe(ne){return typeof BigInt>"u"?Se:ne}function Se(){throw new Error("BigInt not supported")}},25928:function(G){G.exports=C,G.exports.isMobile=C,G.exports.default=C;var U=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,g=/android|ipad|playbook|silk/i;function C(i){i||(i={});var S=i.ua;if(!S&&typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),typeof S!="string")return!1;var x=U.test(S)&&!t.test(S)||!!i.tablet&&g.test(S);return!x&&i.tablet&&i.featureDetect&&navigator&&navigator.maxTouchPoints>1&&S.indexOf("Macintosh")!==-1&&S.indexOf("Safari")!==-1&&(x=!0),x}},48932:function(G,U,t){t.r(U),t.d(U,{sankeyCenter:function(){return a},sankeyCircular:function(){return L},sankeyJustify:function(){return e},sankeyLeft:function(){return p},sankeyRight:function(){return r}});var g=t(84706),C=t(34712),i=t(10132),S=t(6688),x=t.n(S);function v(wt){return wt.target.depth}function p(wt){return wt.depth}function r(wt,Rt){return Rt-1-wt.height}function e(wt,Rt){return wt.sourceLinks.length?wt.depth:Rt-1}function a(wt){return wt.targetLinks.length?wt.depth:wt.sourceLinks.length?(0,g.SY)(wt.sourceLinks,v)-1:0}function n(wt){return function(){return wt}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(wt){return typeof wt}:function(wt){return wt&&typeof Symbol=="function"&&wt.constructor===Symbol&&wt!==Symbol.prototype?"symbol":typeof wt};function c(wt,Rt){return m(wt.source,Rt.source)||wt.index-Rt.index}function l(wt,Rt){return m(wt.target,Rt.target)||wt.index-Rt.index}function m(wt,Rt){return wt.partOfCycle===Rt.partOfCycle?wt.y0-Rt.y0:wt.circularLinkType==="top"||Rt.circularLinkType==="bottom"?-1:1}function h(wt){return wt.value}function b(wt){return(wt.y0+wt.y1)/2}function u(wt){return b(wt.source)}function o(wt){return b(wt.target)}function d(wt){return wt.index}function w(wt){return wt.nodes}function A(wt){return wt.links}function _(wt,Rt){var bt=wt.get(Rt);if(!bt)throw new Error("missing: "+Rt);return bt}function y(wt,Rt){return Rt(wt)}var E=25,T=10,s=.3;function L(){var wt=0,Rt=0,bt=1,At=1,mt=24,Lt,Ht=d,Ut=e,kt=w,Vt=A,It=32,re=2,Kt,$t=null;function le(){var Jt={nodes:kt.apply(null,arguments),links:Vt.apply(null,arguments)};he(Jt),M(Jt,Ht,$t),de(Jt),ne(Jt),z(Jt,Ht),zt(Jt,It,Ht),Xt(Jt);for(var Wt=4,Ft=0;Ft"u"?"undefined":f(yt))!=="object"&&(yt=Ft.source=_(Wt,yt)),(typeof Et>"u"?"undefined":f(Et))!=="object"&&(Et=Ft.target=_(Wt,Et)),yt.sourceLinks.push(Ft),Et.targetLinks.push(Ft)}),Jt}function de(Jt){Jt.nodes.forEach(function(Wt){Wt.partOfCycle=!1,Wt.value=Math.max((0,g.oh)(Wt.sourceLinks,h),(0,g.oh)(Wt.targetLinks,h)),Wt.sourceLinks.forEach(function(Ft){Ft.circular&&(Wt.partOfCycle=!0,Wt.circularLinkType=Ft.circularLinkType)}),Wt.targetLinks.forEach(function(Ft){Ft.circular&&(Wt.partOfCycle=!0,Wt.circularLinkType=Ft.circularLinkType)})})}function xe(Jt){var Wt=0,Ft=0,xt=0,yt=0,Et=(0,g.kv)(Jt.nodes,function(Mt){return Mt.column});return Jt.links.forEach(function(Mt){Mt.circular&&(Mt.circularLinkType=="top"?Wt=Wt+Mt.width:Ft=Ft+Mt.width,Mt.target.column==0&&(yt=yt+Mt.width),Mt.source.column==Et&&(xt=xt+Mt.width))}),Wt=Wt>0?Wt+E+T:Wt,Ft=Ft>0?Ft+E+T:Ft,xt=xt>0?xt+E+T:xt,yt=yt>0?yt+E+T:yt,{top:Wt,bottom:Ft,left:yt,right:xt}}function Se(Jt,Wt){var Ft=(0,g.kv)(Jt.nodes,function(ie){return ie.column}),xt=bt-wt,yt=At-Rt,Et=xt+Wt.right+Wt.left,Mt=yt+Wt.top+Wt.bottom,Nt=xt/Et,jt=yt/Mt;return wt=wt*Nt+Wt.left,bt=Wt.right==0?bt:bt*Nt,Rt=Rt*jt+Wt.top,At=At*jt,Jt.nodes.forEach(function(ie){ie.x0=wt+ie.column*((bt-wt-mt)/Ft),ie.x1=ie.x0+mt}),jt}function ne(Jt){var Wt,Ft,xt;for(Wt=Jt.nodes,Ft=[],xt=0;Wt.length;++xt,Wt=Ft,Ft=[])Wt.forEach(function(yt){yt.depth=xt,yt.sourceLinks.forEach(function(Et){Ft.indexOf(Et.target)<0&&!Et.circular&&Ft.push(Et.target)})});for(Wt=Jt.nodes,Ft=[],xt=0;Wt.length;++xt,Wt=Ft,Ft=[])Wt.forEach(function(yt){yt.height=xt,yt.targetLinks.forEach(function(Et){Ft.indexOf(Et.source)<0&&!Et.circular&&Ft.push(Et.source)})});Jt.nodes.forEach(function(yt){yt.column=Math.floor(Ut.call(null,yt,xt))})}function zt(Jt,Wt,Ft){var xt=(0,C.UJ)().key(function(ie){return ie.column}).sortKeys(g.XE).entries(Jt.nodes).map(function(ie){return ie.values});Mt(Ft),jt();for(var yt=1,Et=Wt;Et>0;--Et)Nt(yt*=.99,Ft),jt();function Mt(ie){if(Kt){var me=1/0;xt.forEach(function(ce){var Te=At*Kt/(ce.length+1);me=Te0))if(ce==0&&Le==1)Be=Te.y1-Te.y0,Te.y0=At/2-Be/2,Te.y1=At/2+Be/2;else if(ce==be-1&&Le==1)Be=Te.y1-Te.y0,Te.y0=At/2-Be/2,Te.y1=At/2+Be/2;else{var ir=0,pe=(0,g.mo)(Te.sourceLinks,o),Xe=(0,g.mo)(Te.targetLinks,u);pe&&Xe?ir=(pe+Xe)/2:ir=pe||Xe;var Ke=(ir-b(Te))*ie;Te.y0+=Ke,Te.y1+=Ke}})})}function jt(){xt.forEach(function(ie){var me,be,ve=Rt,Le=ie.length,ce;for(ie.sort(m),ce=0;ce0&&(me.y0+=be,me.y1+=be),ve=me.y1+Lt;if(be=ve-Lt-At,be>0)for(ve=me.y0-=be,me.y1-=be,ce=Le-2;ce>=0;--ce)me=ie[ce],be=me.y1+Lt-ve,be>0&&(me.y0-=be,me.y1-=be),ve=me.y0})}}function Xt(Jt){Jt.nodes.forEach(function(Wt){Wt.sourceLinks.sort(l),Wt.targetLinks.sort(c)}),Jt.nodes.forEach(function(Wt){var Ft=Wt.y0,xt=Ft,yt=Wt.y1,Et=yt;Wt.sourceLinks.forEach(function(Mt){Mt.circular?(Mt.y0=yt-Mt.width/2,yt=yt-Mt.width):(Mt.y0=Ft+Mt.width/2,Ft+=Mt.width)}),Wt.targetLinks.forEach(function(Mt){Mt.circular?(Mt.y1=Et-Mt.width/2,Et=Et-Mt.width):(Mt.y1=xt+Mt.width/2,xt+=Mt.width)})})}return le}function M(wt,Rt,bt){var At=0;if(bt===null){for(var mt=[],Lt=0;LtRt.source.column)}function I(wt,Rt){var bt=0;wt.sourceLinks.forEach(function(mt){bt=mt.circular&&!gt(mt,Rt)?bt+1:bt});var At=0;return wt.targetLinks.forEach(function(mt){At=mt.circular&&!gt(mt,Rt)?At+1:At}),bt+At}function k(wt){var Rt=wt.source.sourceLinks,bt=0;Rt.forEach(function(Lt){bt=Lt.circular?bt+1:bt});var At=wt.target.targetLinks,mt=0;return At.forEach(function(Lt){mt=Lt.circular?mt+1:mt}),!(bt>1||mt>1)}function B(wt,Rt,bt){return wt.sort(Y),wt.forEach(function(At,mt){var Lt=0;if(gt(At,bt)&&k(At))At.circularPathData.verticalBuffer=Lt+At.width/2;else{var Ht=0;for(Ht;HtLt?Ut:Lt}At.circularPathData.verticalBuffer=Lt+At.width/2}}),wt}function O(wt,Rt,bt,At){var mt=5,Lt=(0,g.SY)(wt.links,function(kt){return kt.source.y0});wt.links.forEach(function(kt){kt.circular&&(kt.circularPathData={})});var Ht=wt.links.filter(function(kt){return kt.circularLinkType=="top"});B(Ht,Rt,At);var Ut=wt.links.filter(function(kt){return kt.circularLinkType=="bottom"});B(Ut,Rt,At),wt.links.forEach(function(kt){if(kt.circular){if(kt.circularPathData.arcRadius=kt.width+T,kt.circularPathData.leftNodeBuffer=mt,kt.circularPathData.rightNodeBuffer=mt,kt.circularPathData.sourceWidth=kt.source.x1-kt.source.x0,kt.circularPathData.sourceX=kt.source.x0+kt.circularPathData.sourceWidth,kt.circularPathData.targetX=kt.target.x0,kt.circularPathData.sourceY=kt.y0,kt.circularPathData.targetY=kt.y1,gt(kt,At)&&k(kt))kt.circularPathData.leftSmallArcRadius=T+kt.width/2,kt.circularPathData.leftLargeArcRadius=T+kt.width/2,kt.circularPathData.rightSmallArcRadius=T+kt.width/2,kt.circularPathData.rightLargeArcRadius=T+kt.width/2,kt.circularLinkType=="bottom"?(kt.circularPathData.verticalFullExtent=kt.source.y1+E+kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.rightLargeArcRadius):(kt.circularPathData.verticalFullExtent=kt.source.y0-E-kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.rightLargeArcRadius);else{var Vt=kt.source.column,It=kt.circularLinkType,re=wt.links.filter(function(le){return le.source.column==Vt&&le.circularLinkType==It});kt.circularLinkType=="bottom"?re.sort(et):re.sort(j);var Kt=0;re.forEach(function(le,he){le.circularLinkID==kt.circularLinkID&&(kt.circularPathData.leftSmallArcRadius=T+kt.width/2+Kt,kt.circularPathData.leftLargeArcRadius=T+kt.width/2+he*Rt+Kt),Kt=Kt+le.width}),Vt=kt.target.column,re=wt.links.filter(function(le){return le.target.column==Vt&&le.circularLinkType==It}),kt.circularLinkType=="bottom"?re.sort(ut):re.sort(it),Kt=0,re.forEach(function(le,he){le.circularLinkID==kt.circularLinkID&&(kt.circularPathData.rightSmallArcRadius=T+kt.width/2+Kt,kt.circularPathData.rightLargeArcRadius=T+kt.width/2+he*Rt+Kt),Kt=Kt+le.width}),kt.circularLinkType=="bottom"?(kt.circularPathData.verticalFullExtent=Math.max(bt,kt.source.y1,kt.target.y1)+E+kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.rightLargeArcRadius):(kt.circularPathData.verticalFullExtent=Lt-E-kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.rightLargeArcRadius)}kt.circularPathData.leftInnerExtent=kt.circularPathData.sourceX+kt.circularPathData.leftNodeBuffer,kt.circularPathData.rightInnerExtent=kt.circularPathData.targetX-kt.circularPathData.rightNodeBuffer,kt.circularPathData.leftFullExtent=kt.circularPathData.sourceX+kt.circularPathData.leftLargeArcRadius+kt.circularPathData.leftNodeBuffer,kt.circularPathData.rightFullExtent=kt.circularPathData.targetX-kt.circularPathData.rightLargeArcRadius-kt.circularPathData.rightNodeBuffer}if(kt.circular)kt.path=H(kt);else{var $t=(0,i.ak)().source(function(le){var he=le.source.x0+(le.source.x1-le.source.x0),de=le.y0;return[he,de]}).target(function(le){var he=le.target.x0,de=le.y1;return[he,de]});kt.path=$t(kt)}})}function H(wt){var Rt="";return wt.circularLinkType=="top"?Rt="M"+wt.circularPathData.sourceX+" "+wt.circularPathData.sourceY+" L"+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.sourceY+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftSmallArcRadius+" 0 0 0 "+wt.circularPathData.leftFullExtent+" "+(wt.circularPathData.sourceY-wt.circularPathData.leftSmallArcRadius)+" L"+wt.circularPathData.leftFullExtent+" "+wt.circularPathData.verticalLeftInnerExtent+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftLargeArcRadius+" 0 0 0 "+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.verticalFullExtent+" L"+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.verticalFullExtent+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightLargeArcRadius+" 0 0 0 "+wt.circularPathData.rightFullExtent+" "+wt.circularPathData.verticalRightInnerExtent+" L"+wt.circularPathData.rightFullExtent+" "+(wt.circularPathData.targetY-wt.circularPathData.rightSmallArcRadius)+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightSmallArcRadius+" 0 0 0 "+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.targetY+" L"+wt.circularPathData.targetX+" "+wt.circularPathData.targetY:Rt="M"+wt.circularPathData.sourceX+" "+wt.circularPathData.sourceY+" L"+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.sourceY+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftSmallArcRadius+" 0 0 1 "+wt.circularPathData.leftFullExtent+" "+(wt.circularPathData.sourceY+wt.circularPathData.leftSmallArcRadius)+" L"+wt.circularPathData.leftFullExtent+" "+wt.circularPathData.verticalLeftInnerExtent+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftLargeArcRadius+" 0 0 1 "+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.verticalFullExtent+" L"+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.verticalFullExtent+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightLargeArcRadius+" 0 0 1 "+wt.circularPathData.rightFullExtent+" "+wt.circularPathData.verticalRightInnerExtent+" L"+wt.circularPathData.rightFullExtent+" "+(wt.circularPathData.targetY+wt.circularPathData.rightSmallArcRadius)+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightSmallArcRadius+" 0 0 1 "+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.targetY+" L"+wt.circularPathData.targetX+" "+wt.circularPathData.targetY,Rt}function Y(wt,Rt){return J(wt)==J(Rt)?wt.circularLinkType=="bottom"?et(wt,Rt):j(wt,Rt):J(Rt)-J(wt)}function j(wt,Rt){return wt.y0-Rt.y0}function et(wt,Rt){return Rt.y0-wt.y0}function it(wt,Rt){return wt.y1-Rt.y1}function ut(wt,Rt){return Rt.y1-wt.y1}function J(wt){return wt.target.column-wt.source.column}function X(wt){return wt.target.x0-wt.source.x1}function tt(wt,Rt){var bt=D(wt),At=X(Rt)/Math.tan(bt),mt=ct(wt)=="up"?wt.y1+At:wt.y1-At;return mt}function V(wt,Rt){var bt=D(wt),At=X(Rt)/Math.tan(bt),mt=ct(wt)=="up"?wt.y1-At:wt.y1+At;return mt}function Q(wt,Rt,bt,At){wt.links.forEach(function(mt){if(!mt.circular&&mt.target.column-mt.source.column>1){var Lt=mt.source.column+1,Ht=mt.target.column-1,Ut=1,kt=Ht-Lt+1;for(Ut=1;Lt<=Ht;Lt++,Ut++)wt.nodes.forEach(function(Vt){if(Vt.column==Lt){var It=Ut/(kt+1),re=Math.pow(1-It,3),Kt=3*It*Math.pow(1-It,2),$t=3*Math.pow(It,2)*(1-It),le=Math.pow(It,3),he=re*mt.y0+Kt*mt.y0+$t*mt.y1+le*mt.y1,de=he-mt.width/2,xe=he+mt.width/2,Se;de>Vt.y0&&deVt.y0&&xeVt.y1&&$(ne,Se,Rt,bt)})):deVt.y1&&(Se=xe-Vt.y0+10,Vt=$(Vt,Se,Rt,bt),wt.nodes.forEach(function(ne){y(ne,At)==y(Vt,At)||ne.column!=Vt.column||ne.y0Vt.y1&&$(ne,Se,Rt,bt)}))}})}})}function ot(wt,Rt){return wt.y0>Rt.y0&&wt.y0Rt.y0&&wt.y1Rt.y1}function $(wt,Rt,bt,At){return wt.y0+Rt>=bt&&wt.y1+Rt<=At&&(wt.y0=wt.y0+Rt,wt.y1=wt.y1+Rt,wt.targetLinks.forEach(function(mt){mt.y1=mt.y1+Rt}),wt.sourceLinks.forEach(function(mt){mt.y0=mt.y0+Rt})),wt}function Z(wt,Rt,bt,At){wt.nodes.forEach(function(mt){At&&mt.y+(mt.y1-mt.y0)>Rt&&(mt.y=mt.y-(mt.y+(mt.y1-mt.y0)-Rt));var Lt=wt.links.filter(function(kt){return y(kt.source,bt)==y(mt,bt)}),Ht=Lt.length;Ht>1&&Lt.sort(function(kt,Vt){if(!kt.circular&&!Vt.circular){if(kt.target.column==Vt.target.column)return kt.y1-Vt.y1;if(nt(kt,Vt)){if(kt.target.column>Vt.target.column){var It=V(Vt,kt);return kt.y1-It}if(Vt.target.column>kt.target.column){var re=V(kt,Vt);return re-Vt.y1}}else return kt.y1-Vt.y1}if(kt.circular&&!Vt.circular)return kt.circularLinkType=="top"?-1:1;if(Vt.circular&&!kt.circular)return Vt.circularLinkType=="top"?1:-1;if(kt.circular&&Vt.circular)return kt.circularLinkType===Vt.circularLinkType&&kt.circularLinkType=="top"?kt.target.column===Vt.target.column?kt.target.y1-Vt.target.y1:Vt.target.column-kt.target.column:kt.circularLinkType===Vt.circularLinkType&&kt.circularLinkType=="bottom"?kt.target.column===Vt.target.column?Vt.target.y1-kt.target.y1:kt.target.column-Vt.target.column:kt.circularLinkType=="top"?-1:1});var Ut=mt.y0;Lt.forEach(function(kt){kt.y0=Ut+kt.width/2,Ut=Ut+kt.width}),Lt.forEach(function(kt,Vt){if(kt.circularLinkType=="bottom"){var It=Vt+1,re=0;for(It;It1&&mt.sort(function(Ut,kt){if(!Ut.circular&&!kt.circular){if(Ut.source.column==kt.source.column)return Ut.y0-kt.y0;if(nt(Ut,kt)){if(kt.source.column0?"up":"down"}function gt(wt,Rt){return y(wt.source,Rt)==y(wt.target,Rt)}function Tt(wt,Rt,bt){var At=wt.nodes,mt=wt.links,Lt=!1,Ht=!1;if(mt.forEach(function(Kt){Kt.circularLinkType=="top"?Lt=!0:Kt.circularLinkType=="bottom"&&(Ht=!0)}),Lt==!1||Ht==!1){var Ut=(0,g.SY)(At,function(Kt){return Kt.y0}),kt=(0,g.kv)(At,function(Kt){return Kt.y1}),Vt=kt-Ut,It=bt-Rt,re=It/Vt;At.forEach(function(Kt){var $t=(Kt.y1-Kt.y0)*re;Kt.y0=(Kt.y0-Ut)*re,Kt.y1=Kt.y0+$t}),mt.forEach(function(Kt){Kt.y0=(Kt.y0-Ut)*re,Kt.y1=(Kt.y1-Ut)*re,Kt.width=Kt.width*re})}}},26800:function(G,U,t){t.r(U),t.d(U,{sankey:function(){return d},sankeyCenter:function(){return p},sankeyJustify:function(){return v},sankeyLeft:function(){return S},sankeyLinkHorizontal:function(){return y},sankeyRight:function(){return x}});var g=t(84706),C=t(34712);function i(E){return E.target.depth}function S(E){return E.depth}function x(E,T){return T-1-E.height}function v(E,T){return E.sourceLinks.length?E.depth:T-1}function p(E){return E.targetLinks.length?E.depth:E.sourceLinks.length?(0,g.SY)(E.sourceLinks,i)-1:0}function r(E){return function(){return E}}function e(E,T){return n(E.source,T.source)||E.index-T.index}function a(E,T){return n(E.target,T.target)||E.index-T.index}function n(E,T){return E.y0-T.y0}function f(E){return E.value}function c(E){return(E.y0+E.y1)/2}function l(E){return c(E.source)*E.value}function m(E){return c(E.target)*E.value}function h(E){return E.index}function b(E){return E.nodes}function u(E){return E.links}function o(E,T){var s=E.get(T);if(!s)throw new Error("missing: "+T);return s}function d(){var E=0,T=0,s=1,L=1,M=24,z=8,D=h,N=v,I=b,k=u,B=32,O=2/3;function H(){var J={nodes:I.apply(null,arguments),links:k.apply(null,arguments)};return Y(J),j(J),et(J),it(J),ut(J),J}H.update=function(J){return ut(J),J},H.nodeId=function(J){return arguments.length?(D=typeof J=="function"?J:r(J),H):D},H.nodeAlign=function(J){return arguments.length?(N=typeof J=="function"?J:r(J),H):N},H.nodeWidth=function(J){return arguments.length?(M=+J,H):M},H.nodePadding=function(J){return arguments.length?(z=+J,H):z},H.nodes=function(J){return arguments.length?(I=typeof J=="function"?J:r(J),H):I},H.links=function(J){return arguments.length?(k=typeof J=="function"?J:r(J),H):k},H.size=function(J){return arguments.length?(E=T=0,s=+J[0],L=+J[1],H):[s-E,L-T]},H.extent=function(J){return arguments.length?(E=+J[0][0],s=+J[1][0],T=+J[0][1],L=+J[1][1],H):[[E,T],[s,L]]},H.iterations=function(J){return arguments.length?(B=+J,H):B};function Y(J){J.nodes.forEach(function(tt,V){tt.index=V,tt.sourceLinks=[],tt.targetLinks=[]});var X=(0,C.kH)(J.nodes,D);J.links.forEach(function(tt,V){tt.index=V;var Q=tt.source,ot=tt.target;typeof Q!="object"&&(Q=tt.source=o(X,Q)),typeof ot!="object"&&(ot=tt.target=o(X,ot)),Q.sourceLinks.push(tt),ot.targetLinks.push(tt)})}function j(J){J.nodes.forEach(function(X){X.value=Math.max((0,g.oh)(X.sourceLinks,f),(0,g.oh)(X.targetLinks,f))})}function et(J){var X,tt,V;for(X=J.nodes,tt=[],V=0;X.length;++V,X=tt,tt=[])X.forEach(function(ot){ot.depth=V,ot.sourceLinks.forEach(function($){tt.indexOf($.target)<0&&tt.push($.target)})});for(X=J.nodes,tt=[],V=0;X.length;++V,X=tt,tt=[])X.forEach(function(ot){ot.height=V,ot.targetLinks.forEach(function($){tt.indexOf($.source)<0&&tt.push($.source)})});var Q=(s-E-M)/(V-1);J.nodes.forEach(function(ot){ot.x1=(ot.x0=E+Math.max(0,Math.min(V-1,Math.floor(N.call(null,ot,V))))*Q)+M})}function it(J){var X=(0,C.UJ)().key(function(st){return st.x0}).sortKeys(g.XE).entries(J.nodes).map(function(st){return st.values});Q(),Z();for(var tt=1,V=B;V>0;--V)$(tt*=.99),Z(),ot(tt),Z();function Q(){var st=(0,g.kv)(X,function(gt){return gt.length}),nt=O*(L-T)/(st-1);z>nt&&(z=nt);var ct=(0,g.SY)(X,function(gt){return(L-T-(gt.length-1)*z)/(0,g.oh)(gt,f)});X.forEach(function(gt){gt.forEach(function(Tt,wt){Tt.y1=(Tt.y0=wt)+Tt.value*ct})}),J.links.forEach(function(gt){gt.width=gt.value*ct})}function ot(st){X.forEach(function(nt){nt.forEach(function(ct){if(ct.targetLinks.length){var gt=((0,g.oh)(ct.targetLinks,l)/(0,g.oh)(ct.targetLinks,f)-c(ct))*st;ct.y0+=gt,ct.y1+=gt}})})}function $(st){X.slice().reverse().forEach(function(nt){nt.forEach(function(ct){if(ct.sourceLinks.length){var gt=((0,g.oh)(ct.sourceLinks,m)/(0,g.oh)(ct.sourceLinks,f)-c(ct))*st;ct.y0+=gt,ct.y1+=gt}})})}function Z(){X.forEach(function(st){var nt,ct,gt=T,Tt=st.length,wt;for(st.sort(n),wt=0;wt0&&(nt.y0+=ct,nt.y1+=ct),gt=nt.y1+z;if(ct=gt-z-L,ct>0)for(gt=nt.y0-=ct,nt.y1-=ct,wt=Tt-2;wt>=0;--wt)nt=st[wt],ct=nt.y1+z-gt,ct>0&&(nt.y0-=ct,nt.y1-=ct),gt=nt.y0})}}function ut(J){J.nodes.forEach(function(X){X.sourceLinks.sort(a),X.targetLinks.sort(e)}),J.nodes.forEach(function(X){var tt=X.y0,V=tt;X.sourceLinks.forEach(function(Q){Q.y0=tt+Q.width/2,tt+=Q.width}),X.targetLinks.forEach(function(Q){Q.y1=V+Q.width/2,V+=Q.width})})}return H}var w=t(10132);function A(E){return[E.source.x1,E.y0]}function _(E){return[E.target.x0,E.y1]}function y(){return(0,w.ak)().source(A).target(_)}},33428:function(G,U,t){var g,C;(function(){var i={version:"3.8.0"},S=[].slice,x=function(ft){return S.call(ft)},v=self.document;function p(ft){return ft&&(ft.ownerDocument||ft.document||ft).documentElement}function r(ft){return ft&&(ft.ownerDocument&&ft.ownerDocument.defaultView||ft.document&&ft||ft.defaultView)}if(v)try{x(v.documentElement.childNodes)[0].nodeType}catch{x=function(Ct){for(var Bt=Ct.length,ee=new Array(Bt);Bt--;)ee[Bt]=Ct[Bt];return ee}}if(Date.now||(Date.now=function(){return+new Date}),v)try{v.createElement("DIV").style.setProperty("opacity",0,"")}catch{var e=this.Element.prototype,a=e.setAttribute,n=e.setAttributeNS,f=this.CSSStyleDeclaration.prototype,c=f.setProperty;e.setAttribute=function(Ct,Bt){a.call(this,Ct,Bt+"")},e.setAttributeNS=function(Ct,Bt,ee){n.call(this,Ct,Bt,ee+"")},f.setProperty=function(Ct,Bt,ee){c.call(this,Ct,Bt+"",ee)}}i.ascending=l;function l(ft,Ct){return ftCt?1:ft>=Ct?0:NaN}i.descending=function(ft,Ct){return Ctft?1:Ct>=ft?0:NaN},i.min=function(ft,Ct){var Bt=-1,ee=ft.length,ae,fe;if(arguments.length===1){for(;++Bt=fe){ae=fe;break}for(;++Btfe&&(ae=fe)}else{for(;++Bt=fe){ae=fe;break}for(;++Btfe&&(ae=fe)}return ae},i.max=function(ft,Ct){var Bt=-1,ee=ft.length,ae,fe;if(arguments.length===1){for(;++Bt=fe){ae=fe;break}for(;++Btae&&(ae=fe)}else{for(;++Bt=fe){ae=fe;break}for(;++Btae&&(ae=fe)}return ae},i.extent=function(ft,Ct){var Bt=-1,ee=ft.length,ae,fe,De;if(arguments.length===1){for(;++Bt=fe){ae=De=fe;break}for(;++Btfe&&(ae=fe),De=fe){ae=De=fe;break}for(;++Btfe&&(ae=fe),De1)return De/(Ye-1)},i.deviation=function(){var ft=i.variance.apply(this,arguments);return ft&&Math.sqrt(ft)};function b(ft){return{left:function(Ct,Bt,ee,ae){for(arguments.length<3&&(ee=0),arguments.length<4&&(ae=Ct.length);ee>>1;ft(Ct[fe],Bt)<0?ee=fe+1:ae=fe}return ee},right:function(Ct,Bt,ee,ae){for(arguments.length<3&&(ee=0),arguments.length<4&&(ae=Ct.length);ee>>1;ft(Ct[fe],Bt)>0?ae=fe:ee=fe+1}return ee}}}var u=b(l);i.bisectLeft=u.left,i.bisect=i.bisectRight=u.right,i.bisector=function(ft){return b(ft.length===1?function(Ct,Bt){return l(ft(Ct),Bt)}:ft)},i.shuffle=function(ft,Ct,Bt){(ee=arguments.length)<3&&(Bt=ft.length,ee<2&&(Ct=0));for(var ee=Bt-Ct,ae,fe;ee;)fe=Math.random()*ee--|0,ae=ft[ee+Ct],ft[ee+Ct]=ft[fe+Ct],ft[fe+Ct]=ae;return ft},i.permute=function(ft,Ct){for(var Bt=Ct.length,ee=new Array(Bt);Bt--;)ee[Bt]=ft[Ct[Bt]];return ee},i.pairs=function(ft){for(var Ct=0,Bt=ft.length-1,ee=ft[0],ae=new Array(Bt<0?0:Bt);Ct=0;)for(De=ft[Ct],Bt=De.length;--Bt>=0;)fe[--ae]=De[Bt];return fe};var d=Math.abs;i.range=function(ft,Ct,Bt){if(arguments.length<3&&(Bt=1,arguments.length<2&&(Ct=ft,ft=0)),(Ct-ft)/Bt===1/0)throw new Error("infinite range");var ee=[],ae=w(d(Bt)),fe=-1,De;if(ft*=ae,Ct*=ae,Bt*=ae,Bt<0)for(;(De=ft+Bt*++fe)>Ct;)ee.push(De/ae);else for(;(De=ft+Bt*++fe)=Ct.length)return ae?ae.call(ft,Ye):ee?Ye.sort(ee):Ye;for(var nr=-1,_r=Ye.length,Lr=Ct[Ze++],Jr,on,Rr,Br=new _,jr;++nr<_r;)(jr=Br.get(Jr=Lr(on=Ye[nr])))?jr.push(on):Br.set(Jr,[on]);return Ee?(on=Ee(),Rr=function(un,vn){on.set(un,fe(Ee,vn,Ze))}):(on={},Rr=function(un,vn){on[un]=fe(Ee,vn,Ze)}),Br.forEach(Rr),on}function De(Ee,Ye){if(Ye>=Ct.length)return Ee;var Ze=[],nr=Bt[Ye++];return Ee.forEach(function(_r,Lr){Ze.push({key:_r,values:De(Lr,Ye)})}),nr?Ze.sort(function(_r,Lr){return nr(_r.key,Lr.key)}):Ze}return ft.map=function(Ee,Ye){return fe(Ye,Ee,0)},ft.entries=function(Ee){return De(fe(i.map,Ee,0),0)},ft.key=function(Ee){return Ct.push(Ee),ft},ft.sortKeys=function(Ee){return Bt[Ct.length-1]=Ee,ft},ft.sortValues=function(Ee){return ee=Ee,ft},ft.rollup=function(Ee){return ae=Ee,ft},ft},i.set=function(ft){var Ct=new I;if(ft)for(var Bt=0,ee=ft.length;Bt=0&&(ee=ft.slice(Bt+1),ft=ft.slice(0,Bt)),ft)return arguments.length<2?this[ft].on(ee):this[ft].on(ee,Ct);if(arguments.length===2){if(Ct==null)for(ft in this)this.hasOwnProperty(ft)&&this[ft].on(ee,null);return this}};function et(ft){var Ct=[],Bt=new _;function ee(){for(var ae=Ct,fe=-1,De=ae.length,Ee;++fe=0&&(Bt=ft.slice(0,Ct))!=="xmlns"&&(ft=ft.slice(Ct+1)),gt.hasOwnProperty(Bt)?{space:gt[Bt],local:ft}:ft}},Z.attr=function(ft,Ct){if(arguments.length<2){if(typeof ft=="string"){var Bt=this.node();return ft=i.ns.qualify(ft),ft.local?Bt.getAttributeNS(ft.space,ft.local):Bt.getAttribute(ft)}for(Ct in ft)this.each(Tt(Ct,ft[Ct]));return this}return this.each(Tt(ft,Ct))};function Tt(ft,Ct){ft=i.ns.qualify(ft);function Bt(){this.removeAttribute(ft)}function ee(){this.removeAttributeNS(ft.space,ft.local)}function ae(){this.setAttribute(ft,Ct)}function fe(){this.setAttributeNS(ft.space,ft.local,Ct)}function De(){var Ye=Ct.apply(this,arguments);Ye==null?this.removeAttribute(ft):this.setAttribute(ft,Ye)}function Ee(){var Ye=Ct.apply(this,arguments);Ye==null?this.removeAttributeNS(ft.space,ft.local):this.setAttributeNS(ft.space,ft.local,Ye)}return Ct==null?ft.local?ee:Bt:typeof Ct=="function"?ft.local?Ee:De:ft.local?fe:ae}function wt(ft){return ft.trim().replace(/\s+/g," ")}Z.classed=function(ft,Ct){if(arguments.length<2){if(typeof ft=="string"){var Bt=this.node(),ee=(ft=bt(ft)).length,ae=-1;if(Ct=Bt.classList){for(;++ae=0;)(fe=Bt[ee])&&(ae&&ae!==fe.nextSibling&&ae.parentNode.insertBefore(fe,ae),ae=fe);return this},Z.sort=function(ft){ft=re.apply(this,arguments);for(var Ct=-1,Bt=this.length;++Ct=Ct&&(Ct=ae+1);!(Ye=De[Ct])&&++Ct0&&(ft=ft.slice(0,ae));var De=xe.get(ft);De&&(ft=De,fe=ne);function Ee(){var nr=this[ee];nr&&(this.removeEventListener(ft,nr,nr.$),delete this[ee])}function Ye(){var nr=fe(Ct,x(arguments));Ee.call(this),this.addEventListener(ft,this[ee]=nr,nr.$=Bt),nr._=Ct}function Ze(){var nr=new RegExp("^__on([^.]+)"+i.requote(ft)+"$"),_r;for(var Lr in this)if(_r=Lr.match(nr)){var Jr=this[Lr];this.removeEventListener(_r[1],Jr,Jr.$),delete this[Lr]}}return ae?Ct?Ye:Ee:Ct?Y:Ze}var xe=i.map({mouseenter:"mouseover",mouseleave:"mouseout"});v&&xe.forEach(function(ft){"on"+ft in v&&xe.remove(ft)});function Se(ft,Ct){return function(Bt){var ee=i.event;i.event=Bt,Ct[0]=this.__data__;try{ft.apply(this,Ct)}finally{i.event=ee}}}function ne(ft,Ct){var Bt=Se(ft,Ct);return function(ee){var ae=this,fe=ee.relatedTarget;(!fe||fe!==ae&&!(fe.compareDocumentPosition(ae)&8))&&Bt.call(ae,ee)}}var zt,Xt=0;function Jt(ft){var Ct=".dragsuppress-"+ ++Xt,Bt="click"+Ct,ee=i.select(r(ft)).on("touchmove"+Ct,it).on("dragstart"+Ct,it).on("selectstart"+Ct,it);if(zt==null&&(zt="onselectstart"in ft?!1:O(ft.style,"userSelect")),zt){var ae=p(ft).style,fe=ae[zt];ae[zt]="none"}return function(De){if(ee.on(Ct,null),zt&&(ae[zt]=fe),De){var Ee=function(){ee.on(Bt,null)};ee.on(Bt,function(){it(),Ee()},!0),setTimeout(Ee,0)}}}i.mouse=function(ft){return Ft(ft,ut())};var Wt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ft(ft,Ct){Ct.changedTouches&&(Ct=Ct.changedTouches[0]);var Bt=ft.ownerSVGElement||ft;if(Bt.createSVGPoint){var ee=Bt.createSVGPoint();if(Wt<0){var ae=r(ft);if(ae.scrollX||ae.scrollY){Bt=i.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var fe=Bt[0][0].getScreenCTM();Wt=!(fe.f||fe.e),Bt.remove()}}return Wt?(ee.x=Ct.pageX,ee.y=Ct.pageY):(ee.x=Ct.clientX,ee.y=Ct.clientY),ee=ee.matrixTransform(ft.getScreenCTM().inverse()),[ee.x,ee.y]}var De=ft.getBoundingClientRect();return[Ct.clientX-De.left-ft.clientLeft,Ct.clientY-De.top-ft.clientTop]}i.touch=function(ft,Ct,Bt){if(arguments.length<3&&(Bt=Ct,Ct=ut().changedTouches),Ct){for(var ee=0,ae=Ct.length,fe;ee1?ie:ft<-1?-ie:Math.asin(ft)}function ce(ft){return((ft=Math.exp(ft))-1/ft)/2}function Te(ft){return((ft=Math.exp(ft))+1/ft)/2}function Be(ft){return((ft=Math.exp(2*ft))-1)/(ft+1)}var ir=Math.SQRT2,pe=2,Xe=4;i.interpolateZoom=function(ft,Ct){var Bt=ft[0],ee=ft[1],ae=ft[2],fe=Ct[0],De=Ct[1],Ee=Ct[2],Ye=fe-Bt,Ze=De-ee,nr=Ye*Ye+Ze*Ze,_r,Lr;if(nr0&&(Kn=Kn.transition().duration(De)),Kn.call(vn.event)}function ii(){Br&&Br.domain(Rr.range().map(function(Kn){return(Kn-ft.x)/ft.k}).map(Rr.invert)),un&&un.domain(jr.range().map(function(Kn){return(Kn-ft.y)/ft.k}).map(jr.invert))}function fi(Kn){Ee++||Kn({type:"zoomstart"})}function Oi(Kn){ii(),Kn({type:"zoom",scale:ft.k,translate:[ft.x,ft.y]})}function Mi(Kn){--Ee||(Kn({type:"zoomend"}),Bt=null)}function Ii(){var Kn=this,Bi=on.of(Kn,arguments),Ti=0,Zi=i.select(r(Kn)).on(Ze,Ka).on(nr,Ja),ba=qr(i.mouse(Kn)),na=Jt(Kn);Ge.call(Kn),fi(Bi);function Ka(){Ti=1,ui(i.mouse(Kn),ba),Oi(Bi)}function Ja(){Zi.on(Ze,null).on(nr,null),na(Ti),Mi(Bi)}}function ra(){var Kn=this,Bi=on.of(Kn,arguments),Ti={},Zi=0,ba,na=".zoom-"+i.event.changedTouches[0].identifier,Ka="touchmove"+na,Ja="touchend"+na,to=[],wa=i.select(Kn),uo=Jt(Kn);Ei(),fi(Bi),wa.on(Ye,null).on(Lr,Ei);function oi(){var eo=i.touches(Kn);return ba=ft.k,eo.forEach(function(ca){ca.identifier in Ti&&(Ti[ca.identifier]=qr(ca))}),eo}function Ei(){var eo=i.event.target;i.select(eo).on(Ka,Ao).on(Ja,Lo),to.push(eo);for(var ca=i.event.changedTouches,Va=0,Oa=ca.length;Va1){var Ea=is[0],_l=is[1],ji=Ea[0]-_l[0],_a=Ea[1]-_l[1];Zi=ji*ji+_a*_a}}function Ao(){var eo=i.touches(Kn),ca,Va,Oa,is;Ge.call(Kn);for(var bs=0,Ea=eo.length;bs1?1:Ct,Bt=Bt<0?0:Bt>1?1:Bt,ae=Bt<=.5?Bt*(1+Ct):Bt+Ct-Bt*Ct,ee=2*Bt-ae;function fe(Ee){return Ee>360?Ee-=360:Ee<0&&(Ee+=360),Ee<60?ee+(ae-ee)*Ee/60:Ee<180?ae:Ee<240?ee+(ae-ee)*(240-Ee)/60:ee}function De(Ee){return Math.round(fe(Ee)*255)}return new fr(De(ft+120),De(ft),De(ft-120))}i.hcl=Ie;function Ie(ft,Ct,Bt){return this instanceof Ie?(this.h=+ft,this.c=+Ct,void(this.l=+Bt)):arguments.length<2?ft instanceof Ie?new Ie(ft.h,ft.c,ft.l):ft instanceof Ve?Ne(ft.l,ft.a,ft.b):Ne((ft=Gr((ft=i.rgb(ft)).r,ft.g,ft.b)).l,ft.a,ft.b):new Ie(ft,Ct,Bt)}var Pe=Ie.prototype=new ge;Pe.brighter=function(ft){return new Ie(this.h,this.c,Math.min(100,this.l+Je*(arguments.length?ft:1)))},Pe.darker=function(ft){return new Ie(this.h,this.c,Math.max(0,this.l-Je*(arguments.length?ft:1)))},Pe.rgb=function(){return ke(this.h,this.c,this.l).rgb()};function ke(ft,Ct,Bt){return isNaN(ft)&&(ft=0),isNaN(Ct)&&(Ct=0),new Ve(Bt,Math.cos(ft*=me)*Ct,Math.sin(ft)*Ct)}i.lab=Ve;function Ve(ft,Ct,Bt){return this instanceof Ve?(this.l=+ft,this.a=+Ct,void(this.b=+Bt)):arguments.length<2?ft instanceof Ve?new Ve(ft.l,ft.a,ft.b):ft instanceof Ie?ke(ft.h,ft.c,ft.l):Gr((ft=fr(ft)).r,ft.g,ft.b):new Ve(ft,Ct,Bt)}var Je=18,ur=.95047,hr=1,vr=1.08883,Yt=Ve.prototype=new ge;Yt.brighter=function(ft){return new Ve(Math.min(100,this.l+Je*(arguments.length?ft:1)),this.a,this.b)},Yt.darker=function(ft){return new Ve(Math.max(0,this.l-Je*(arguments.length?ft:1)),this.a,this.b)},Yt.rgb=function(){return Gt(this.l,this.a,this.b)};function Gt(ft,Ct,Bt){var ee=(ft+16)/116,ae=ee+Ct/500,fe=ee-Bt/200;return ae=Oe(ae)*ur,ee=Oe(ee)*hr,fe=Oe(fe)*vr,new fr(er(3.2404542*ae-1.5371385*ee-.4985314*fe),er(-.969266*ae+1.8760108*ee+.041556*fe),er(.0556434*ae-.2040259*ee+1.0572252*fe))}function Ne(ft,Ct,Bt){return ft>0?new Ie(Math.atan2(Bt,Ct)*be,Math.sqrt(Ct*Ct+Bt*Bt),ft):new Ie(NaN,NaN,ft)}function Oe(ft){return ft>.206893034?ft*ft*ft:(ft-.13793103448275862)/7.787037}function Qe(ft){return ft>.008856?Math.pow(ft,.3333333333333333):7.787037*ft+.13793103448275862}function er(ft){return Math.round(255*(ft<=.00304?12.92*ft:1.055*Math.pow(ft,.4166666666666667)-.055))}i.rgb=fr;function fr(ft,Ct,Bt){return this instanceof fr?(this.r=~~ft,this.g=~~Ct,void(this.b=~~Bt)):arguments.length<2?ft instanceof fr?new fr(ft.r,ft.g,ft.b):xr(""+ft,fr,Ce):new fr(ft,Ct,Bt)}function rr(ft){return new fr(ft>>16,ft>>8&255,ft&255)}function He(ft){return rr(ft)+""}var dr=fr.prototype=new ge;dr.brighter=function(ft){ft=Math.pow(.7,arguments.length?ft:1);var Ct=this.r,Bt=this.g,ee=this.b,ae=30;return!Ct&&!Bt&&!ee?new fr(ae,ae,ae):(Ct&&Ct>4,ee=ee>>4|ee,ae=Ye&240,ae=ae>>4|ae,fe=Ye&15,fe=fe<<4|fe):ft.length===7&&(ee=(Ye&16711680)>>16,ae=(Ye&65280)>>8,fe=Ye&255)),Ct(ee,ae,fe))}function pr(ft,Ct,Bt){var ee=Math.min(ft/=255,Ct/=255,Bt/=255),ae=Math.max(ft,Ct,Bt),fe=ae-ee,De,Ee,Ye=(ae+ee)/2;return fe?(Ee=Ye<.5?fe/(ae+ee):fe/(2-ae-ee),ft==ae?De=(Ct-Bt)/fe+(Ct0&&Ye<1?0:De),new se(De,Ee,Ye)}function Gr(ft,Ct,Bt){ft=Pr(ft),Ct=Pr(Ct),Bt=Pr(Bt);var ee=Qe((.4124564*ft+.3575761*Ct+.1804375*Bt)/ur),ae=Qe((.2126729*ft+.7151522*Ct+.072175*Bt)/hr),fe=Qe((.0193339*ft+.119192*Ct+.9503041*Bt)/vr);return Ve(116*ae-16,500*(ee-ae),200*(ae-fe))}function Pr(ft){return(ft/=255)<=.04045?ft/12.92:Math.pow((ft+.055)/1.055,2.4)}function Dr(ft){var Ct=parseFloat(ft);return ft.charAt(ft.length-1)==="%"?Math.round(Ct*2.55):Ct}var cn=i.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});cn.forEach(function(ft,Ct){cn.set(ft,rr(Ct))});function rn(ft){return typeof ft=="function"?ft:function(){return ft}}i.functor=rn,i.xhr=Cn(k);function Cn(ft){return function(Ct,Bt,ee){return arguments.length===2&&typeof Bt=="function"&&(ee=Bt,Bt=null),En(Ct,Bt,ft,ee)}}function En(ft,Ct,Bt,ee){var ae={},fe=i.dispatch("beforesend","progress","load","error"),De={},Ee=new XMLHttpRequest,Ye=null;self.XDomainRequest&&!("withCredentials"in Ee)&&/^(http(s)?:)?\/\//.test(ft)&&(Ee=new XDomainRequest),"onload"in Ee?Ee.onload=Ee.onerror=Ze:Ee.onreadystatechange=function(){Ee.readyState>3&&Ze()};function Ze(){var nr=Ee.status,_r;if(!nr&&Cr(Ee)||nr>=200&&nr<300||nr===304){try{_r=Bt.call(ae,Ee)}catch(Lr){fe.error.call(ae,Lr);return}fe.load.call(ae,_r)}else fe.error.call(ae,Ee)}return Ee.onprogress=function(nr){var _r=i.event;i.event=nr;try{fe.progress.call(ae,Ee)}finally{i.event=_r}},ae.header=function(nr,_r){return nr=(nr+"").toLowerCase(),arguments.length<2?De[nr]:(_r==null?delete De[nr]:De[nr]=_r+"",ae)},ae.mimeType=function(nr){return arguments.length?(Ct=nr==null?null:nr+"",ae):Ct},ae.responseType=function(nr){return arguments.length?(Ye=nr,ae):Ye},ae.response=function(nr){return Bt=nr,ae},["get","post"].forEach(function(nr){ae[nr]=function(){return ae.send.apply(ae,[nr].concat(x(arguments)))}}),ae.send=function(nr,_r,Lr){if(arguments.length===2&&typeof _r=="function"&&(Lr=_r,_r=null),Ee.open(nr,ft,!0),Ct!=null&&!("accept"in De)&&(De.accept=Ct+",*/*"),Ee.setRequestHeader)for(var Jr in De)Ee.setRequestHeader(Jr,De[Jr]);return Ct!=null&&Ee.overrideMimeType&&Ee.overrideMimeType(Ct),Ye!=null&&(Ee.responseType=Ye),Lr!=null&&ae.on("error",Lr).on("load",function(on){Lr(null,on)}),fe.beforesend.call(ae,Ee),Ee.send(_r??null),ae},ae.abort=function(){return Ee.abort(),ae},i.rebind(ae,fe,"on"),ee==null?ae:ae.get(Tr(ee))}function Tr(ft){return ft.length===1?function(Ct,Bt){ft(Ct==null?Bt:null)}:ft}function Cr(ft){var Ct=ft.responseType;return Ct&&Ct!=="text"?ft.response:ft.responseText}i.dsv=function(ft,Ct){var Bt=new RegExp('["'+ft+` + */function g(ne,zt){if(!(ne instanceof zt))throw new TypeError("Cannot call a class as a function")}function C(ne,zt){for(var Xt=0;Xt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{return!1}}return zt=r(zt),p(ne,Jt()?Reflect.construct(zt,Xt||[],r(ne).constructor):zt.apply(ne,Xt))}function p(ne,zt){if(zt&&(f(zt)==="object"||typeof zt=="function"))return zt;if(zt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e(ne)}function r(ne){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Xt){return Xt.__proto__||Object.getPrototypeOf(Xt)},r(ne)}function e(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function a(ne,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Super expression must either be null or a function");ne.prototype=Object.create(zt&&zt.prototype,{constructor:{value:ne,writable:!0,configurable:!0}}),Object.defineProperty(ne,"prototype",{writable:!1}),zt&&n(ne,zt)}function n(ne,zt){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Jt,Wt){return Jt.__proto__=Wt,Jt},n(ne,zt)}function f(ne){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(zt){return typeof zt}:function(zt){return zt&&typeof Symbol=="function"&&zt.constructor===Symbol&&zt!==Symbol.prototype?"symbol":typeof zt},f(ne)}var c=t(59968),l=t(35984),m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;U.Buffer=o,U.SlowBuffer=z,U.INSPECT_MAX_BYTES=50;var v=2147483647;U.kMaxLength=v,o.TYPED_ARRAY_SUPPORT=b(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function b(){try{var ne=new Uint8Array(1),zt={foo:function(){return 42}};return Object.setPrototypeOf(zt,Uint8Array.prototype),Object.setPrototypeOf(ne,zt),ne.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function u(ne){if(ne>v)throw new RangeError('The value "'+ne+'" is invalid for option "size"');var zt=new Uint8Array(ne);return Object.setPrototypeOf(zt,o.prototype),zt}function o(ne,zt,Xt){if(typeof ne=="number"){if(typeof zt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(ne)}return d(ne,zt,Xt)}o.poolSize=8192;function d(ne,zt,Xt){if(typeof ne=="string")return y(ne,zt);if(ArrayBuffer.isView(ne))return T(ne);if(ne==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+f(ne));if(le(ne,ArrayBuffer)||ne&&le(ne.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(le(ne,SharedArrayBuffer)||ne&&le(ne.buffer,SharedArrayBuffer)))return s(ne,zt,Xt);if(typeof ne=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Jt=ne.valueOf&&ne.valueOf();if(Jt!=null&&Jt!==ne)return o.from(Jt,zt,Xt);var Wt=L(ne);if(Wt)return Wt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ne[Symbol.toPrimitive]=="function")return o.from(ne[Symbol.toPrimitive]("string"),zt,Xt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+f(ne))}o.from=function(ne,zt,Xt){return d(ne,zt,Xt)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function w(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be of type number');if(ne<0)throw new RangeError('The value "'+ne+'" is invalid for option "size"')}function A(ne,zt,Xt){return w(ne),ne<=0?u(ne):zt!==void 0?typeof Xt=="string"?u(ne).fill(zt,Xt):u(ne).fill(zt):u(ne)}o.alloc=function(ne,zt,Xt){return A(ne,zt,Xt)};function _(ne){return w(ne),u(ne<0?0:M(ne)|0)}o.allocUnsafe=function(ne){return _(ne)},o.allocUnsafeSlow=function(ne){return _(ne)};function y(ne,zt){if((typeof zt!="string"||zt==="")&&(zt="utf8"),!o.isEncoding(zt))throw new TypeError("Unknown encoding: "+zt);var Xt=D(ne,zt)|0,Jt=u(Xt),Wt=Jt.write(ne,zt);return Wt!==Xt&&(Jt=Jt.slice(0,Wt)),Jt}function E(ne){for(var zt=ne.length<0?0:M(ne.length)|0,Xt=u(zt),Jt=0;Jt=v)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v.toString(16)+" bytes");return ne|0}function z(ne){return+ne!=ne&&(ne=0),o.alloc(+ne)}o.isBuffer=function(zt){return zt!=null&&zt._isBuffer===!0&&zt!==o.prototype},o.compare=function(zt,Xt){if(le(zt,Uint8Array)&&(zt=o.from(zt,zt.offset,zt.byteLength)),le(Xt,Uint8Array)&&(Xt=o.from(Xt,Xt.offset,Xt.byteLength)),!o.isBuffer(zt)||!o.isBuffer(Xt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(zt===Xt)return 0;for(var Jt=zt.length,Wt=Xt.length,Ft=0,xt=Math.min(Jt,Wt);FtWt.length?(o.isBuffer(xt)||(xt=o.from(xt)),xt.copy(Wt,Ft)):Uint8Array.prototype.set.call(Wt,xt,Ft);else if(o.isBuffer(xt))xt.copy(Wt,Ft);else throw new TypeError('"list" argument must be an Array of Buffers');Ft+=xt.length}return Wt};function D(ne,zt){if(o.isBuffer(ne))return ne.length;if(ArrayBuffer.isView(ne)||le(ne,ArrayBuffer))return ne.byteLength;if(typeof ne!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+f(ne));var Xt=ne.length,Jt=arguments.length>2&&arguments[2]===!0;if(!Jt&&Xt===0)return 0;for(var Wt=!1;;)switch(zt){case"ascii":case"latin1":case"binary":return Xt;case"utf8":case"utf-8":return Vt(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt*2;case"hex":return Xt>>>1;case"base64":return Kt(ne).length;default:if(Wt)return Jt?-1:Vt(ne).length;zt=(""+zt).toLowerCase(),Wt=!0}}o.byteLength=D;function N(ne,zt,Xt){var Jt=!1;if((zt===void 0||zt<0)&&(zt=0),zt>this.length||((Xt===void 0||Xt>this.length)&&(Xt=this.length),Xt<=0)||(Xt>>>=0,zt>>>=0,Xt<=zt))return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return Q(this,zt,Xt);case"utf8":case"utf-8":return ut(this,zt,Xt);case"ascii":return tt(this,zt,Xt);case"latin1":case"binary":return V(this,zt,Xt);case"base64":return it(this,zt,Xt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,zt,Xt);default:if(Jt)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),Jt=!0}}o.prototype._isBuffer=!0;function I(ne,zt,Xt){var Jt=ne[zt];ne[zt]=ne[Xt],ne[Xt]=Jt}o.prototype.swap16=function(){var zt=this.length;if(zt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Xt=0;XtXt&&(zt+=" ... "),""},m&&(o.prototype[m]=o.prototype.inspect),o.prototype.compare=function(zt,Xt,Jt,Wt,Ft){if(le(zt,Uint8Array)&&(zt=o.from(zt,zt.offset,zt.byteLength)),!o.isBuffer(zt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+f(zt));if(Xt===void 0&&(Xt=0),Jt===void 0&&(Jt=zt?zt.length:0),Wt===void 0&&(Wt=0),Ft===void 0&&(Ft=this.length),Xt<0||Jt>zt.length||Wt<0||Ft>this.length)throw new RangeError("out of range index");if(Wt>=Ft&&Xt>=Jt)return 0;if(Wt>=Ft)return-1;if(Xt>=Jt)return 1;if(Xt>>>=0,Jt>>>=0,Wt>>>=0,Ft>>>=0,this===zt)return 0;for(var xt=Ft-Wt,yt=Jt-Xt,Et=Math.min(xt,yt),Mt=this.slice(Wt,Ft),Nt=zt.slice(Xt,Jt),jt=0;jt2147483647?Xt=2147483647:Xt<-2147483648&&(Xt=-2147483648),Xt=+Xt,he(Xt)&&(Xt=Wt?0:ne.length-1),Xt<0&&(Xt=ne.length+Xt),Xt>=ne.length){if(Wt)return-1;Xt=ne.length-1}else if(Xt<0)if(Wt)Xt=0;else return-1;if(typeof zt=="string"&&(zt=o.from(zt,Jt)),o.isBuffer(zt))return zt.length===0?-1:B(ne,zt,Xt,Jt,Wt);if(typeof zt=="number")return zt=zt&255,typeof Uint8Array.prototype.indexOf=="function"?Wt?Uint8Array.prototype.indexOf.call(ne,zt,Xt):Uint8Array.prototype.lastIndexOf.call(ne,zt,Xt):B(ne,[zt],Xt,Jt,Wt);throw new TypeError("val must be string, number or Buffer")}function B(ne,zt,Xt,Jt,Wt){var Ft=1,xt=ne.length,yt=zt.length;if(Jt!==void 0&&(Jt=String(Jt).toLowerCase(),Jt==="ucs2"||Jt==="ucs-2"||Jt==="utf16le"||Jt==="utf-16le")){if(ne.length<2||zt.length<2)return-1;Ft=2,xt/=2,yt/=2,Xt/=2}function Et(me,be){return Ft===1?me[be]:me.readUInt16BE(be*Ft)}var Mt;if(Wt){var Nt=-1;for(Mt=Xt;Mtxt&&(Xt=xt-yt),Mt=Xt;Mt>=0;Mt--){for(var jt=!0,ie=0;ieWt&&(Jt=Wt)):Jt=Wt;var Ft=zt.length;Jt>Ft/2&&(Jt=Ft/2);var xt;for(xt=0;xt>>0,isFinite(Jt)?(Jt=Jt>>>0,Wt===void 0&&(Wt="utf8")):(Wt=Jt,Jt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ft=this.length-Xt;if((Jt===void 0||Jt>Ft)&&(Jt=Ft),zt.length>0&&(Jt<0||Xt<0)||Xt>this.length)throw new RangeError("Attempt to write outside buffer bounds");Wt||(Wt="utf8");for(var xt=!1;;)switch(Wt){case"hex":return O(this,zt,Xt,Jt);case"utf8":case"utf-8":return H(this,zt,Xt,Jt);case"ascii":case"latin1":case"binary":return Y(this,zt,Xt,Jt);case"base64":return j(this,zt,Xt,Jt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,zt,Xt,Jt);default:if(xt)throw new TypeError("Unknown encoding: "+Wt);Wt=(""+Wt).toLowerCase(),xt=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(ne,zt,Xt){return zt===0&&Xt===ne.length?c.fromByteArray(ne):c.fromByteArray(ne.slice(zt,Xt))}function ut(ne,zt,Xt){Xt=Math.min(ne.length,Xt);for(var Jt=[],Wt=zt;Wt239?4:Ft>223?3:Ft>191?2:1;if(Wt+yt<=Xt){var Et=void 0,Mt=void 0,Nt=void 0,jt=void 0;switch(yt){case 1:Ft<128&&(xt=Ft);break;case 2:Et=ne[Wt+1],(Et&192)===128&&(jt=(Ft&31)<<6|Et&63,jt>127&&(xt=jt));break;case 3:Et=ne[Wt+1],Mt=ne[Wt+2],(Et&192)===128&&(Mt&192)===128&&(jt=(Ft&15)<<12|(Et&63)<<6|Mt&63,jt>2047&&(jt<55296||jt>57343)&&(xt=jt));break;case 4:Et=ne[Wt+1],Mt=ne[Wt+2],Nt=ne[Wt+3],(Et&192)===128&&(Mt&192)===128&&(Nt&192)===128&&(jt=(Ft&15)<<18|(Et&63)<<12|(Mt&63)<<6|Nt&63,jt>65535&&jt<1114112&&(xt=jt))}}xt===null?(xt=65533,yt=1):xt>65535&&(xt-=65536,Jt.push(xt>>>10&1023|55296),xt=56320|xt&1023),Jt.push(xt),Wt+=yt}return X(Jt)}var J=4096;function X(ne){var zt=ne.length;if(zt<=J)return String.fromCharCode.apply(String,ne);for(var Xt="",Jt=0;JtJt)&&(Xt=Jt);for(var Wt="",Ft=zt;FtJt&&(zt=Jt),Xt<0?(Xt+=Jt,Xt<0&&(Xt=0)):Xt>Jt&&(Xt=Jt),XtXt)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(zt,Xt,Jt){zt=zt>>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=this[zt],Ft=1,xt=0;++xt>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=this[zt+--Xt],Ft=1;Xt>0&&(Ft*=256);)Wt+=this[zt+--Xt]*Ft;return Wt},o.prototype.readUint8=o.prototype.readUInt8=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,1,this.length),this[zt]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,2,this.length),this[zt]|this[zt+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,2,this.length),this[zt]<<8|this[zt+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),(this[zt]|this[zt+1]<<8|this[zt+2]<<16)+this[zt+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),this[zt]*16777216+(this[zt+1]<<16|this[zt+2]<<8|this[zt+3])},o.prototype.readBigUInt64LE=xe(function(zt){zt=zt>>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=Xt+this[++zt]*Math.pow(2,8)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,24),Ft=this[++zt]+this[++zt]*Math.pow(2,8)+this[++zt]*Math.pow(2,16)+Jt*Math.pow(2,24);return BigInt(Wt)+(BigInt(Ft)<>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=Xt*Math.pow(2,24)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,8)+this[++zt],Ft=this[++zt]*Math.pow(2,24)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,8)+Jt;return(BigInt(Wt)<>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=this[zt],Ft=1,xt=0;++xt=Ft&&(Wt-=Math.pow(2,8*Xt)),Wt},o.prototype.readIntBE=function(zt,Xt,Jt){zt=zt>>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=Xt,Ft=1,xt=this[zt+--Wt];Wt>0&&(Ft*=256);)xt+=this[zt+--Wt]*Ft;return Ft*=128,xt>=Ft&&(xt-=Math.pow(2,8*Xt)),xt},o.prototype.readInt8=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,1,this.length),this[zt]&128?(255-this[zt]+1)*-1:this[zt]},o.prototype.readInt16LE=function(zt,Xt){zt=zt>>>0,Xt||$(zt,2,this.length);var Jt=this[zt]|this[zt+1]<<8;return Jt&32768?Jt|4294901760:Jt},o.prototype.readInt16BE=function(zt,Xt){zt=zt>>>0,Xt||$(zt,2,this.length);var Jt=this[zt+1]|this[zt]<<8;return Jt&32768?Jt|4294901760:Jt},o.prototype.readInt32LE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),this[zt]|this[zt+1]<<8|this[zt+2]<<16|this[zt+3]<<24},o.prototype.readInt32BE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),this[zt]<<24|this[zt+1]<<16|this[zt+2]<<8|this[zt+3]},o.prototype.readBigInt64LE=xe(function(zt){zt=zt>>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=this[zt+4]+this[zt+5]*Math.pow(2,8)+this[zt+6]*Math.pow(2,16)+(Jt<<24);return(BigInt(Wt)<>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=(Xt<<24)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,8)+this[++zt];return(BigInt(Wt)<>>0,Xt||$(zt,4,this.length),l.read(this,zt,!0,23,4)},o.prototype.readFloatBE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),l.read(this,zt,!1,23,4)},o.prototype.readDoubleLE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,8,this.length),l.read(this,zt,!0,52,8)},o.prototype.readDoubleBE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,8,this.length),l.read(this,zt,!1,52,8)};function Z(ne,zt,Xt,Jt,Wt,Ft){if(!o.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(zt>Wt||ztne.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(zt,Xt,Jt,Wt){if(zt=+zt,Xt=Xt>>>0,Jt=Jt>>>0,!Wt){var Ft=Math.pow(2,8*Jt)-1;Z(this,zt,Xt,Jt,Ft,0)}var xt=1,yt=0;for(this[Xt]=zt&255;++yt>>0,Jt=Jt>>>0,!Wt){var Ft=Math.pow(2,8*Jt)-1;Z(this,zt,Xt,Jt,Ft,0)}var xt=Jt-1,yt=1;for(this[Xt+xt]=zt&255;--xt>=0&&(yt*=256);)this[Xt+xt]=zt/yt&255;return Xt+Jt},o.prototype.writeUint8=o.prototype.writeUInt8=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,1,255,0),this[Xt]=zt&255,Xt+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,65535,0),this[Xt]=zt&255,this[Xt+1]=zt>>>8,Xt+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,65535,0),this[Xt]=zt>>>8,this[Xt+1]=zt&255,Xt+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,4294967295,0),this[Xt+3]=zt>>>24,this[Xt+2]=zt>>>16,this[Xt+1]=zt>>>8,this[Xt]=zt&255,Xt+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,4294967295,0),this[Xt]=zt>>>24,this[Xt+1]=zt>>>16,this[Xt+2]=zt>>>8,this[Xt+3]=zt&255,Xt+4};function st(ne,zt,Xt,Jt,Wt){mt(zt,Jt,Wt,ne,Xt,7);var Ft=Number(zt&BigInt(4294967295));ne[Xt++]=Ft,Ft=Ft>>8,ne[Xt++]=Ft,Ft=Ft>>8,ne[Xt++]=Ft,Ft=Ft>>8,ne[Xt++]=Ft;var xt=Number(zt>>BigInt(32)&BigInt(4294967295));return ne[Xt++]=xt,xt=xt>>8,ne[Xt++]=xt,xt=xt>>8,ne[Xt++]=xt,xt=xt>>8,ne[Xt++]=xt,Xt}function nt(ne,zt,Xt,Jt,Wt){mt(zt,Jt,Wt,ne,Xt,7);var Ft=Number(zt&BigInt(4294967295));ne[Xt+7]=Ft,Ft=Ft>>8,ne[Xt+6]=Ft,Ft=Ft>>8,ne[Xt+5]=Ft,Ft=Ft>>8,ne[Xt+4]=Ft;var xt=Number(zt>>BigInt(32)&BigInt(4294967295));return ne[Xt+3]=xt,xt=xt>>8,ne[Xt+2]=xt,xt=xt>>8,ne[Xt+1]=xt,xt=xt>>8,ne[Xt]=xt,Xt+8}o.prototype.writeBigUInt64LE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,zt,Xt,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return nt(this,zt,Xt,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(zt,Xt,Jt,Wt){if(zt=+zt,Xt=Xt>>>0,!Wt){var Ft=Math.pow(2,8*Jt-1);Z(this,zt,Xt,Jt,Ft-1,-Ft)}var xt=0,yt=1,Et=0;for(this[Xt]=zt&255;++xt>0)-Et&255;return Xt+Jt},o.prototype.writeIntBE=function(zt,Xt,Jt,Wt){if(zt=+zt,Xt=Xt>>>0,!Wt){var Ft=Math.pow(2,8*Jt-1);Z(this,zt,Xt,Jt,Ft-1,-Ft)}var xt=Jt-1,yt=1,Et=0;for(this[Xt+xt]=zt&255;--xt>=0&&(yt*=256);)zt<0&&Et===0&&this[Xt+xt+1]!==0&&(Et=1),this[Xt+xt]=(zt/yt>>0)-Et&255;return Xt+Jt},o.prototype.writeInt8=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,1,127,-128),zt<0&&(zt=255+zt+1),this[Xt]=zt&255,Xt+1},o.prototype.writeInt16LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,32767,-32768),this[Xt]=zt&255,this[Xt+1]=zt>>>8,Xt+2},o.prototype.writeInt16BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,32767,-32768),this[Xt]=zt>>>8,this[Xt+1]=zt&255,Xt+2},o.prototype.writeInt32LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,2147483647,-2147483648),this[Xt]=zt&255,this[Xt+1]=zt>>>8,this[Xt+2]=zt>>>16,this[Xt+3]=zt>>>24,Xt+4},o.prototype.writeInt32BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,2147483647,-2147483648),zt<0&&(zt=4294967295+zt+1),this[Xt]=zt>>>24,this[Xt+1]=zt>>>16,this[Xt+2]=zt>>>8,this[Xt+3]=zt&255,Xt+4},o.prototype.writeBigInt64LE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,zt,Xt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return nt(this,zt,Xt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ct(ne,zt,Xt,Jt,Wt,Ft){if(Xt+Jt>ne.length)throw new RangeError("Index out of range");if(Xt<0)throw new RangeError("Index out of range")}function gt(ne,zt,Xt,Jt,Wt){return zt=+zt,Xt=Xt>>>0,Wt||ct(ne,zt,Xt,4),l.write(ne,zt,Xt,Jt,23,4),Xt+4}o.prototype.writeFloatLE=function(zt,Xt,Jt){return gt(this,zt,Xt,!0,Jt)},o.prototype.writeFloatBE=function(zt,Xt,Jt){return gt(this,zt,Xt,!1,Jt)};function Tt(ne,zt,Xt,Jt,Wt){return zt=+zt,Xt=Xt>>>0,Wt||ct(ne,zt,Xt,8),l.write(ne,zt,Xt,Jt,52,8),Xt+8}o.prototype.writeDoubleLE=function(zt,Xt,Jt){return Tt(this,zt,Xt,!0,Jt)},o.prototype.writeDoubleBE=function(zt,Xt,Jt){return Tt(this,zt,Xt,!1,Jt)},o.prototype.copy=function(zt,Xt,Jt,Wt){if(!o.isBuffer(zt))throw new TypeError("argument should be a Buffer");if(Jt||(Jt=0),!Wt&&Wt!==0&&(Wt=this.length),Xt>=zt.length&&(Xt=zt.length),Xt||(Xt=0),Wt>0&&Wt=this.length)throw new RangeError("Index out of range");if(Wt<0)throw new RangeError("sourceEnd out of bounds");Wt>this.length&&(Wt=this.length),zt.length-Xt>>0,Jt=Jt===void 0?this.length:Jt>>>0,zt||(zt=0);var xt;if(typeof zt=="number")for(xt=Xt;xtMath.pow(2,32)?Wt=bt(String(Xt)):typeof Xt=="bigint"&&(Wt=String(Xt),(Xt>Math.pow(BigInt(2),BigInt(32))||Xt<-Math.pow(BigInt(2),BigInt(32)))&&(Wt=bt(Wt)),Wt+="n"),Jt+=" It must be ".concat(zt,". Received ").concat(Wt),Jt},RangeError);function bt(ne){for(var zt="",Xt=ne.length,Jt=ne[0]==="-"?1:0;Xt>=Jt+4;Xt-=3)zt="_".concat(ne.slice(Xt-3,Xt)).concat(zt);return"".concat(ne.slice(0,Xt)).concat(zt)}function At(ne,zt,Xt){Lt(zt,"offset"),(ne[zt]===void 0||ne[zt+Xt]===void 0)&&Ht(zt,ne.length-(Xt+1))}function mt(ne,zt,Xt,Jt,Wt,Ft){if(ne>Xt||ne3?zt===0||zt===BigInt(0)?yt=">= 0".concat(xt," and < 2").concat(xt," ** ").concat((Ft+1)*8).concat(xt):yt=">= -(2".concat(xt," ** ").concat((Ft+1)*8-1).concat(xt,") and < 2 ** ")+"".concat((Ft+1)*8-1).concat(xt):yt=">= ".concat(zt).concat(xt," and <= ").concat(Xt).concat(xt),new wt.ERR_OUT_OF_RANGE("value",yt,ne)}At(Jt,Wt,Ft)}function Lt(ne,zt){if(typeof ne!="number")throw new wt.ERR_INVALID_ARG_TYPE(zt,"number",ne)}function Ht(ne,zt,Xt){throw Math.floor(ne)!==ne?(Lt(ne,Xt),new wt.ERR_OUT_OF_RANGE(Xt||"offset","an integer",ne)):zt<0?new wt.ERR_BUFFER_OUT_OF_BOUNDS:new wt.ERR_OUT_OF_RANGE(Xt||"offset",">= ".concat(Xt?1:0," and <= ").concat(zt),ne)}var Ut=/[^+/0-9A-Za-z-_]/g;function kt(ne){if(ne=ne.split("=")[0],ne=ne.trim().replace(Ut,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function Vt(ne,zt){zt=zt||1/0;for(var Xt,Jt=ne.length,Wt=null,Ft=[],xt=0;xt55295&&Xt<57344){if(!Wt){if(Xt>56319){(zt-=3)>-1&&Ft.push(239,191,189);continue}else if(xt+1===Jt){(zt-=3)>-1&&Ft.push(239,191,189);continue}Wt=Xt;continue}if(Xt<56320){(zt-=3)>-1&&Ft.push(239,191,189),Wt=Xt;continue}Xt=(Wt-55296<<10|Xt-56320)+65536}else Wt&&(zt-=3)>-1&&Ft.push(239,191,189);if(Wt=null,Xt<128){if((zt-=1)<0)break;Ft.push(Xt)}else if(Xt<2048){if((zt-=2)<0)break;Ft.push(Xt>>6|192,Xt&63|128)}else if(Xt<65536){if((zt-=3)<0)break;Ft.push(Xt>>12|224,Xt>>6&63|128,Xt&63|128)}else if(Xt<1114112){if((zt-=4)<0)break;Ft.push(Xt>>18|240,Xt>>12&63|128,Xt>>6&63|128,Xt&63|128)}else throw new Error("Invalid code point")}return Ft}function It(ne){for(var zt=[],Xt=0;Xt>8,Wt=Xt%256,Ft.push(Wt),Ft.push(Jt);return Ft}function Kt(ne){return c.toByteArray(kt(ne))}function $t(ne,zt,Xt,Jt){var Wt;for(Wt=0;Wt=zt.length||Wt>=ne.length);++Wt)zt[Wt+Xt]=ne[Wt];return Wt}function le(ne,zt){return ne instanceof zt||ne!=null&&ne.constructor!=null&&ne.constructor.name!=null&&ne.constructor.name===zt.name}function he(ne){return ne!==ne}var de=function(){for(var ne="0123456789abcdef",zt=new Array(256),Xt=0;Xt<16;++Xt)for(var Jt=Xt*16,Wt=0;Wt<16;++Wt)zt[Jt+Wt]=ne[Xt]+ne[Wt];return zt}();function xe(ne){return typeof BigInt>"u"?Se:ne}function Se(){throw new Error("BigInt not supported")}},25928:function(G){G.exports=C,G.exports.isMobile=C,G.exports.default=C;var U=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,g=/android|ipad|playbook|silk/i;function C(i){i||(i={});var S=i.ua;if(!S&&typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),typeof S!="string")return!1;var x=U.test(S)&&!t.test(S)||!!i.tablet&&g.test(S);return!x&&i.tablet&&i.featureDetect&&navigator&&navigator.maxTouchPoints>1&&S.indexOf("Macintosh")!==-1&&S.indexOf("Safari")!==-1&&(x=!0),x}},48932:function(G,U,t){t.r(U),t.d(U,{sankeyCenter:function(){return a},sankeyCircular:function(){return L},sankeyJustify:function(){return e},sankeyLeft:function(){return p},sankeyRight:function(){return r}});var g=t(84706),C=t(34712),i=t(10132),S=t(6688),x=t.n(S);function h(wt){return wt.target.depth}function p(wt){return wt.depth}function r(wt,Rt){return Rt-1-wt.height}function e(wt,Rt){return wt.sourceLinks.length?wt.depth:Rt-1}function a(wt){return wt.targetLinks.length?wt.depth:wt.sourceLinks.length?(0,g.SY)(wt.sourceLinks,h)-1:0}function n(wt){return function(){return wt}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(wt){return typeof wt}:function(wt){return wt&&typeof Symbol=="function"&&wt.constructor===Symbol&&wt!==Symbol.prototype?"symbol":typeof wt};function c(wt,Rt){return m(wt.source,Rt.source)||wt.index-Rt.index}function l(wt,Rt){return m(wt.target,Rt.target)||wt.index-Rt.index}function m(wt,Rt){return wt.partOfCycle===Rt.partOfCycle?wt.y0-Rt.y0:wt.circularLinkType==="top"||Rt.circularLinkType==="bottom"?-1:1}function v(wt){return wt.value}function b(wt){return(wt.y0+wt.y1)/2}function u(wt){return b(wt.source)}function o(wt){return b(wt.target)}function d(wt){return wt.index}function w(wt){return wt.nodes}function A(wt){return wt.links}function _(wt,Rt){var bt=wt.get(Rt);if(!bt)throw new Error("missing: "+Rt);return bt}function y(wt,Rt){return Rt(wt)}var E=25,T=10,s=.3;function L(){var wt=0,Rt=0,bt=1,At=1,mt=24,Lt,Ht=d,Ut=e,kt=w,Vt=A,It=32,re=2,Kt,$t=null;function le(){var Jt={nodes:kt.apply(null,arguments),links:Vt.apply(null,arguments)};he(Jt),M(Jt,Ht,$t),de(Jt),ne(Jt),z(Jt,Ht),zt(Jt,It,Ht),Xt(Jt);for(var Wt=4,Ft=0;Ft"u"?"undefined":f(yt))!=="object"&&(yt=Ft.source=_(Wt,yt)),(typeof Et>"u"?"undefined":f(Et))!=="object"&&(Et=Ft.target=_(Wt,Et)),yt.sourceLinks.push(Ft),Et.targetLinks.push(Ft)}),Jt}function de(Jt){Jt.nodes.forEach(function(Wt){Wt.partOfCycle=!1,Wt.value=Math.max((0,g.oh)(Wt.sourceLinks,v),(0,g.oh)(Wt.targetLinks,v)),Wt.sourceLinks.forEach(function(Ft){Ft.circular&&(Wt.partOfCycle=!0,Wt.circularLinkType=Ft.circularLinkType)}),Wt.targetLinks.forEach(function(Ft){Ft.circular&&(Wt.partOfCycle=!0,Wt.circularLinkType=Ft.circularLinkType)})})}function xe(Jt){var Wt=0,Ft=0,xt=0,yt=0,Et=(0,g.kv)(Jt.nodes,function(Mt){return Mt.column});return Jt.links.forEach(function(Mt){Mt.circular&&(Mt.circularLinkType=="top"?Wt=Wt+Mt.width:Ft=Ft+Mt.width,Mt.target.column==0&&(yt=yt+Mt.width),Mt.source.column==Et&&(xt=xt+Mt.width))}),Wt=Wt>0?Wt+E+T:Wt,Ft=Ft>0?Ft+E+T:Ft,xt=xt>0?xt+E+T:xt,yt=yt>0?yt+E+T:yt,{top:Wt,bottom:Ft,left:yt,right:xt}}function Se(Jt,Wt){var Ft=(0,g.kv)(Jt.nodes,function(ie){return ie.column}),xt=bt-wt,yt=At-Rt,Et=xt+Wt.right+Wt.left,Mt=yt+Wt.top+Wt.bottom,Nt=xt/Et,jt=yt/Mt;return wt=wt*Nt+Wt.left,bt=Wt.right==0?bt:bt*Nt,Rt=Rt*jt+Wt.top,At=At*jt,Jt.nodes.forEach(function(ie){ie.x0=wt+ie.column*((bt-wt-mt)/Ft),ie.x1=ie.x0+mt}),jt}function ne(Jt){var Wt,Ft,xt;for(Wt=Jt.nodes,Ft=[],xt=0;Wt.length;++xt,Wt=Ft,Ft=[])Wt.forEach(function(yt){yt.depth=xt,yt.sourceLinks.forEach(function(Et){Ft.indexOf(Et.target)<0&&!Et.circular&&Ft.push(Et.target)})});for(Wt=Jt.nodes,Ft=[],xt=0;Wt.length;++xt,Wt=Ft,Ft=[])Wt.forEach(function(yt){yt.height=xt,yt.targetLinks.forEach(function(Et){Ft.indexOf(Et.source)<0&&!Et.circular&&Ft.push(Et.source)})});Jt.nodes.forEach(function(yt){yt.column=Math.floor(Ut.call(null,yt,xt))})}function zt(Jt,Wt,Ft){var xt=(0,C.UJ)().key(function(ie){return ie.column}).sortKeys(g.XE).entries(Jt.nodes).map(function(ie){return ie.values});Mt(Ft),jt();for(var yt=1,Et=Wt;Et>0;--Et)Nt(yt*=.99,Ft),jt();function Mt(ie){if(Kt){var me=1/0;xt.forEach(function(ce){var Te=At*Kt/(ce.length+1);me=Te0))if(ce==0&&Le==1)Be=Te.y1-Te.y0,Te.y0=At/2-Be/2,Te.y1=At/2+Be/2;else if(ce==be-1&&Le==1)Be=Te.y1-Te.y0,Te.y0=At/2-Be/2,Te.y1=At/2+Be/2;else{var ir=0,pe=(0,g.mo)(Te.sourceLinks,o),Xe=(0,g.mo)(Te.targetLinks,u);pe&&Xe?ir=(pe+Xe)/2:ir=pe||Xe;var Ke=(ir-b(Te))*ie;Te.y0+=Ke,Te.y1+=Ke}})})}function jt(){xt.forEach(function(ie){var me,be,ve=Rt,Le=ie.length,ce;for(ie.sort(m),ce=0;ce0&&(me.y0+=be,me.y1+=be),ve=me.y1+Lt;if(be=ve-Lt-At,be>0)for(ve=me.y0-=be,me.y1-=be,ce=Le-2;ce>=0;--ce)me=ie[ce],be=me.y1+Lt-ve,be>0&&(me.y0-=be,me.y1-=be),ve=me.y0})}}function Xt(Jt){Jt.nodes.forEach(function(Wt){Wt.sourceLinks.sort(l),Wt.targetLinks.sort(c)}),Jt.nodes.forEach(function(Wt){var Ft=Wt.y0,xt=Ft,yt=Wt.y1,Et=yt;Wt.sourceLinks.forEach(function(Mt){Mt.circular?(Mt.y0=yt-Mt.width/2,yt=yt-Mt.width):(Mt.y0=Ft+Mt.width/2,Ft+=Mt.width)}),Wt.targetLinks.forEach(function(Mt){Mt.circular?(Mt.y1=Et-Mt.width/2,Et=Et-Mt.width):(Mt.y1=xt+Mt.width/2,xt+=Mt.width)})})}return le}function M(wt,Rt,bt){var At=0;if(bt===null){for(var mt=[],Lt=0;LtRt.source.column)}function I(wt,Rt){var bt=0;wt.sourceLinks.forEach(function(mt){bt=mt.circular&&!gt(mt,Rt)?bt+1:bt});var At=0;return wt.targetLinks.forEach(function(mt){At=mt.circular&&!gt(mt,Rt)?At+1:At}),bt+At}function k(wt){var Rt=wt.source.sourceLinks,bt=0;Rt.forEach(function(Lt){bt=Lt.circular?bt+1:bt});var At=wt.target.targetLinks,mt=0;return At.forEach(function(Lt){mt=Lt.circular?mt+1:mt}),!(bt>1||mt>1)}function B(wt,Rt,bt){return wt.sort(Y),wt.forEach(function(At,mt){var Lt=0;if(gt(At,bt)&&k(At))At.circularPathData.verticalBuffer=Lt+At.width/2;else{var Ht=0;for(Ht;HtLt?Ut:Lt}At.circularPathData.verticalBuffer=Lt+At.width/2}}),wt}function O(wt,Rt,bt,At){var mt=5,Lt=(0,g.SY)(wt.links,function(kt){return kt.source.y0});wt.links.forEach(function(kt){kt.circular&&(kt.circularPathData={})});var Ht=wt.links.filter(function(kt){return kt.circularLinkType=="top"});B(Ht,Rt,At);var Ut=wt.links.filter(function(kt){return kt.circularLinkType=="bottom"});B(Ut,Rt,At),wt.links.forEach(function(kt){if(kt.circular){if(kt.circularPathData.arcRadius=kt.width+T,kt.circularPathData.leftNodeBuffer=mt,kt.circularPathData.rightNodeBuffer=mt,kt.circularPathData.sourceWidth=kt.source.x1-kt.source.x0,kt.circularPathData.sourceX=kt.source.x0+kt.circularPathData.sourceWidth,kt.circularPathData.targetX=kt.target.x0,kt.circularPathData.sourceY=kt.y0,kt.circularPathData.targetY=kt.y1,gt(kt,At)&&k(kt))kt.circularPathData.leftSmallArcRadius=T+kt.width/2,kt.circularPathData.leftLargeArcRadius=T+kt.width/2,kt.circularPathData.rightSmallArcRadius=T+kt.width/2,kt.circularPathData.rightLargeArcRadius=T+kt.width/2,kt.circularLinkType=="bottom"?(kt.circularPathData.verticalFullExtent=kt.source.y1+E+kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.rightLargeArcRadius):(kt.circularPathData.verticalFullExtent=kt.source.y0-E-kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.rightLargeArcRadius);else{var Vt=kt.source.column,It=kt.circularLinkType,re=wt.links.filter(function(le){return le.source.column==Vt&&le.circularLinkType==It});kt.circularLinkType=="bottom"?re.sort(et):re.sort(j);var Kt=0;re.forEach(function(le,he){le.circularLinkID==kt.circularLinkID&&(kt.circularPathData.leftSmallArcRadius=T+kt.width/2+Kt,kt.circularPathData.leftLargeArcRadius=T+kt.width/2+he*Rt+Kt),Kt=Kt+le.width}),Vt=kt.target.column,re=wt.links.filter(function(le){return le.target.column==Vt&&le.circularLinkType==It}),kt.circularLinkType=="bottom"?re.sort(ut):re.sort(it),Kt=0,re.forEach(function(le,he){le.circularLinkID==kt.circularLinkID&&(kt.circularPathData.rightSmallArcRadius=T+kt.width/2+Kt,kt.circularPathData.rightLargeArcRadius=T+kt.width/2+he*Rt+Kt),Kt=Kt+le.width}),kt.circularLinkType=="bottom"?(kt.circularPathData.verticalFullExtent=Math.max(bt,kt.source.y1,kt.target.y1)+E+kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.rightLargeArcRadius):(kt.circularPathData.verticalFullExtent=Lt-E-kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.rightLargeArcRadius)}kt.circularPathData.leftInnerExtent=kt.circularPathData.sourceX+kt.circularPathData.leftNodeBuffer,kt.circularPathData.rightInnerExtent=kt.circularPathData.targetX-kt.circularPathData.rightNodeBuffer,kt.circularPathData.leftFullExtent=kt.circularPathData.sourceX+kt.circularPathData.leftLargeArcRadius+kt.circularPathData.leftNodeBuffer,kt.circularPathData.rightFullExtent=kt.circularPathData.targetX-kt.circularPathData.rightLargeArcRadius-kt.circularPathData.rightNodeBuffer}if(kt.circular)kt.path=H(kt);else{var $t=(0,i.ak)().source(function(le){var he=le.source.x0+(le.source.x1-le.source.x0),de=le.y0;return[he,de]}).target(function(le){var he=le.target.x0,de=le.y1;return[he,de]});kt.path=$t(kt)}})}function H(wt){var Rt="";return wt.circularLinkType=="top"?Rt="M"+wt.circularPathData.sourceX+" "+wt.circularPathData.sourceY+" L"+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.sourceY+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftSmallArcRadius+" 0 0 0 "+wt.circularPathData.leftFullExtent+" "+(wt.circularPathData.sourceY-wt.circularPathData.leftSmallArcRadius)+" L"+wt.circularPathData.leftFullExtent+" "+wt.circularPathData.verticalLeftInnerExtent+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftLargeArcRadius+" 0 0 0 "+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.verticalFullExtent+" L"+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.verticalFullExtent+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightLargeArcRadius+" 0 0 0 "+wt.circularPathData.rightFullExtent+" "+wt.circularPathData.verticalRightInnerExtent+" L"+wt.circularPathData.rightFullExtent+" "+(wt.circularPathData.targetY-wt.circularPathData.rightSmallArcRadius)+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightSmallArcRadius+" 0 0 0 "+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.targetY+" L"+wt.circularPathData.targetX+" "+wt.circularPathData.targetY:Rt="M"+wt.circularPathData.sourceX+" "+wt.circularPathData.sourceY+" L"+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.sourceY+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftSmallArcRadius+" 0 0 1 "+wt.circularPathData.leftFullExtent+" "+(wt.circularPathData.sourceY+wt.circularPathData.leftSmallArcRadius)+" L"+wt.circularPathData.leftFullExtent+" "+wt.circularPathData.verticalLeftInnerExtent+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftLargeArcRadius+" 0 0 1 "+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.verticalFullExtent+" L"+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.verticalFullExtent+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightLargeArcRadius+" 0 0 1 "+wt.circularPathData.rightFullExtent+" "+wt.circularPathData.verticalRightInnerExtent+" L"+wt.circularPathData.rightFullExtent+" "+(wt.circularPathData.targetY+wt.circularPathData.rightSmallArcRadius)+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightSmallArcRadius+" 0 0 1 "+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.targetY+" L"+wt.circularPathData.targetX+" "+wt.circularPathData.targetY,Rt}function Y(wt,Rt){return J(wt)==J(Rt)?wt.circularLinkType=="bottom"?et(wt,Rt):j(wt,Rt):J(Rt)-J(wt)}function j(wt,Rt){return wt.y0-Rt.y0}function et(wt,Rt){return Rt.y0-wt.y0}function it(wt,Rt){return wt.y1-Rt.y1}function ut(wt,Rt){return Rt.y1-wt.y1}function J(wt){return wt.target.column-wt.source.column}function X(wt){return wt.target.x0-wt.source.x1}function tt(wt,Rt){var bt=D(wt),At=X(Rt)/Math.tan(bt),mt=ct(wt)=="up"?wt.y1+At:wt.y1-At;return mt}function V(wt,Rt){var bt=D(wt),At=X(Rt)/Math.tan(bt),mt=ct(wt)=="up"?wt.y1-At:wt.y1+At;return mt}function Q(wt,Rt,bt,At){wt.links.forEach(function(mt){if(!mt.circular&&mt.target.column-mt.source.column>1){var Lt=mt.source.column+1,Ht=mt.target.column-1,Ut=1,kt=Ht-Lt+1;for(Ut=1;Lt<=Ht;Lt++,Ut++)wt.nodes.forEach(function(Vt){if(Vt.column==Lt){var It=Ut/(kt+1),re=Math.pow(1-It,3),Kt=3*It*Math.pow(1-It,2),$t=3*Math.pow(It,2)*(1-It),le=Math.pow(It,3),he=re*mt.y0+Kt*mt.y0+$t*mt.y1+le*mt.y1,de=he-mt.width/2,xe=he+mt.width/2,Se;de>Vt.y0&&deVt.y0&&xeVt.y1&&$(ne,Se,Rt,bt)})):deVt.y1&&(Se=xe-Vt.y0+10,Vt=$(Vt,Se,Rt,bt),wt.nodes.forEach(function(ne){y(ne,At)==y(Vt,At)||ne.column!=Vt.column||ne.y0Vt.y1&&$(ne,Se,Rt,bt)}))}})}})}function ot(wt,Rt){return wt.y0>Rt.y0&&wt.y0Rt.y0&&wt.y1Rt.y1}function $(wt,Rt,bt,At){return wt.y0+Rt>=bt&&wt.y1+Rt<=At&&(wt.y0=wt.y0+Rt,wt.y1=wt.y1+Rt,wt.targetLinks.forEach(function(mt){mt.y1=mt.y1+Rt}),wt.sourceLinks.forEach(function(mt){mt.y0=mt.y0+Rt})),wt}function Z(wt,Rt,bt,At){wt.nodes.forEach(function(mt){At&&mt.y+(mt.y1-mt.y0)>Rt&&(mt.y=mt.y-(mt.y+(mt.y1-mt.y0)-Rt));var Lt=wt.links.filter(function(kt){return y(kt.source,bt)==y(mt,bt)}),Ht=Lt.length;Ht>1&&Lt.sort(function(kt,Vt){if(!kt.circular&&!Vt.circular){if(kt.target.column==Vt.target.column)return kt.y1-Vt.y1;if(nt(kt,Vt)){if(kt.target.column>Vt.target.column){var It=V(Vt,kt);return kt.y1-It}if(Vt.target.column>kt.target.column){var re=V(kt,Vt);return re-Vt.y1}}else return kt.y1-Vt.y1}if(kt.circular&&!Vt.circular)return kt.circularLinkType=="top"?-1:1;if(Vt.circular&&!kt.circular)return Vt.circularLinkType=="top"?1:-1;if(kt.circular&&Vt.circular)return kt.circularLinkType===Vt.circularLinkType&&kt.circularLinkType=="top"?kt.target.column===Vt.target.column?kt.target.y1-Vt.target.y1:Vt.target.column-kt.target.column:kt.circularLinkType===Vt.circularLinkType&&kt.circularLinkType=="bottom"?kt.target.column===Vt.target.column?Vt.target.y1-kt.target.y1:kt.target.column-Vt.target.column:kt.circularLinkType=="top"?-1:1});var Ut=mt.y0;Lt.forEach(function(kt){kt.y0=Ut+kt.width/2,Ut=Ut+kt.width}),Lt.forEach(function(kt,Vt){if(kt.circularLinkType=="bottom"){var It=Vt+1,re=0;for(It;It1&&mt.sort(function(Ut,kt){if(!Ut.circular&&!kt.circular){if(Ut.source.column==kt.source.column)return Ut.y0-kt.y0;if(nt(Ut,kt)){if(kt.source.column0?"up":"down"}function gt(wt,Rt){return y(wt.source,Rt)==y(wt.target,Rt)}function Tt(wt,Rt,bt){var At=wt.nodes,mt=wt.links,Lt=!1,Ht=!1;if(mt.forEach(function(Kt){Kt.circularLinkType=="top"?Lt=!0:Kt.circularLinkType=="bottom"&&(Ht=!0)}),Lt==!1||Ht==!1){var Ut=(0,g.SY)(At,function(Kt){return Kt.y0}),kt=(0,g.kv)(At,function(Kt){return Kt.y1}),Vt=kt-Ut,It=bt-Rt,re=It/Vt;At.forEach(function(Kt){var $t=(Kt.y1-Kt.y0)*re;Kt.y0=(Kt.y0-Ut)*re,Kt.y1=Kt.y0+$t}),mt.forEach(function(Kt){Kt.y0=(Kt.y0-Ut)*re,Kt.y1=(Kt.y1-Ut)*re,Kt.width=Kt.width*re})}}},26800:function(G,U,t){t.r(U),t.d(U,{sankey:function(){return d},sankeyCenter:function(){return p},sankeyJustify:function(){return h},sankeyLeft:function(){return S},sankeyLinkHorizontal:function(){return y},sankeyRight:function(){return x}});var g=t(84706),C=t(34712);function i(E){return E.target.depth}function S(E){return E.depth}function x(E,T){return T-1-E.height}function h(E,T){return E.sourceLinks.length?E.depth:T-1}function p(E){return E.targetLinks.length?E.depth:E.sourceLinks.length?(0,g.SY)(E.sourceLinks,i)-1:0}function r(E){return function(){return E}}function e(E,T){return n(E.source,T.source)||E.index-T.index}function a(E,T){return n(E.target,T.target)||E.index-T.index}function n(E,T){return E.y0-T.y0}function f(E){return E.value}function c(E){return(E.y0+E.y1)/2}function l(E){return c(E.source)*E.value}function m(E){return c(E.target)*E.value}function v(E){return E.index}function b(E){return E.nodes}function u(E){return E.links}function o(E,T){var s=E.get(T);if(!s)throw new Error("missing: "+T);return s}function d(){var E=0,T=0,s=1,L=1,M=24,z=8,D=v,N=h,I=b,k=u,B=32,O=2/3;function H(){var J={nodes:I.apply(null,arguments),links:k.apply(null,arguments)};return Y(J),j(J),et(J),it(J),ut(J),J}H.update=function(J){return ut(J),J},H.nodeId=function(J){return arguments.length?(D=typeof J=="function"?J:r(J),H):D},H.nodeAlign=function(J){return arguments.length?(N=typeof J=="function"?J:r(J),H):N},H.nodeWidth=function(J){return arguments.length?(M=+J,H):M},H.nodePadding=function(J){return arguments.length?(z=+J,H):z},H.nodes=function(J){return arguments.length?(I=typeof J=="function"?J:r(J),H):I},H.links=function(J){return arguments.length?(k=typeof J=="function"?J:r(J),H):k},H.size=function(J){return arguments.length?(E=T=0,s=+J[0],L=+J[1],H):[s-E,L-T]},H.extent=function(J){return arguments.length?(E=+J[0][0],s=+J[1][0],T=+J[0][1],L=+J[1][1],H):[[E,T],[s,L]]},H.iterations=function(J){return arguments.length?(B=+J,H):B};function Y(J){J.nodes.forEach(function(tt,V){tt.index=V,tt.sourceLinks=[],tt.targetLinks=[]});var X=(0,C.kH)(J.nodes,D);J.links.forEach(function(tt,V){tt.index=V;var Q=tt.source,ot=tt.target;typeof Q!="object"&&(Q=tt.source=o(X,Q)),typeof ot!="object"&&(ot=tt.target=o(X,ot)),Q.sourceLinks.push(tt),ot.targetLinks.push(tt)})}function j(J){J.nodes.forEach(function(X){X.value=Math.max((0,g.oh)(X.sourceLinks,f),(0,g.oh)(X.targetLinks,f))})}function et(J){var X,tt,V;for(X=J.nodes,tt=[],V=0;X.length;++V,X=tt,tt=[])X.forEach(function(ot){ot.depth=V,ot.sourceLinks.forEach(function($){tt.indexOf($.target)<0&&tt.push($.target)})});for(X=J.nodes,tt=[],V=0;X.length;++V,X=tt,tt=[])X.forEach(function(ot){ot.height=V,ot.targetLinks.forEach(function($){tt.indexOf($.source)<0&&tt.push($.source)})});var Q=(s-E-M)/(V-1);J.nodes.forEach(function(ot){ot.x1=(ot.x0=E+Math.max(0,Math.min(V-1,Math.floor(N.call(null,ot,V))))*Q)+M})}function it(J){var X=(0,C.UJ)().key(function(st){return st.x0}).sortKeys(g.XE).entries(J.nodes).map(function(st){return st.values});Q(),Z();for(var tt=1,V=B;V>0;--V)$(tt*=.99),Z(),ot(tt),Z();function Q(){var st=(0,g.kv)(X,function(gt){return gt.length}),nt=O*(L-T)/(st-1);z>nt&&(z=nt);var ct=(0,g.SY)(X,function(gt){return(L-T-(gt.length-1)*z)/(0,g.oh)(gt,f)});X.forEach(function(gt){gt.forEach(function(Tt,wt){Tt.y1=(Tt.y0=wt)+Tt.value*ct})}),J.links.forEach(function(gt){gt.width=gt.value*ct})}function ot(st){X.forEach(function(nt){nt.forEach(function(ct){if(ct.targetLinks.length){var gt=((0,g.oh)(ct.targetLinks,l)/(0,g.oh)(ct.targetLinks,f)-c(ct))*st;ct.y0+=gt,ct.y1+=gt}})})}function $(st){X.slice().reverse().forEach(function(nt){nt.forEach(function(ct){if(ct.sourceLinks.length){var gt=((0,g.oh)(ct.sourceLinks,m)/(0,g.oh)(ct.sourceLinks,f)-c(ct))*st;ct.y0+=gt,ct.y1+=gt}})})}function Z(){X.forEach(function(st){var nt,ct,gt=T,Tt=st.length,wt;for(st.sort(n),wt=0;wt0&&(nt.y0+=ct,nt.y1+=ct),gt=nt.y1+z;if(ct=gt-z-L,ct>0)for(gt=nt.y0-=ct,nt.y1-=ct,wt=Tt-2;wt>=0;--wt)nt=st[wt],ct=nt.y1+z-gt,ct>0&&(nt.y0-=ct,nt.y1-=ct),gt=nt.y0})}}function ut(J){J.nodes.forEach(function(X){X.sourceLinks.sort(a),X.targetLinks.sort(e)}),J.nodes.forEach(function(X){var tt=X.y0,V=tt;X.sourceLinks.forEach(function(Q){Q.y0=tt+Q.width/2,tt+=Q.width}),X.targetLinks.forEach(function(Q){Q.y1=V+Q.width/2,V+=Q.width})})}return H}var w=t(10132);function A(E){return[E.source.x1,E.y0]}function _(E){return[E.target.x0,E.y1]}function y(){return(0,w.ak)().source(A).target(_)}},33428:function(G,U,t){var g,C;(function(){var i={version:"3.8.0"},S=[].slice,x=function(ft){return S.call(ft)},h=self.document;function p(ft){return ft&&(ft.ownerDocument||ft.document||ft).documentElement}function r(ft){return ft&&(ft.ownerDocument&&ft.ownerDocument.defaultView||ft.document&&ft||ft.defaultView)}if(h)try{x(h.documentElement.childNodes)[0].nodeType}catch{x=function(Ct){for(var Bt=Ct.length,ee=new Array(Bt);Bt--;)ee[Bt]=Ct[Bt];return ee}}if(Date.now||(Date.now=function(){return+new Date}),h)try{h.createElement("DIV").style.setProperty("opacity",0,"")}catch{var e=this.Element.prototype,a=e.setAttribute,n=e.setAttributeNS,f=this.CSSStyleDeclaration.prototype,c=f.setProperty;e.setAttribute=function(Ct,Bt){a.call(this,Ct,Bt+"")},e.setAttributeNS=function(Ct,Bt,ee){n.call(this,Ct,Bt,ee+"")},f.setProperty=function(Ct,Bt,ee){c.call(this,Ct,Bt+"",ee)}}i.ascending=l;function l(ft,Ct){return ftCt?1:ft>=Ct?0:NaN}i.descending=function(ft,Ct){return Ctft?1:Ct>=ft?0:NaN},i.min=function(ft,Ct){var Bt=-1,ee=ft.length,ae,fe;if(arguments.length===1){for(;++Bt=fe){ae=fe;break}for(;++Btfe&&(ae=fe)}else{for(;++Bt=fe){ae=fe;break}for(;++Btfe&&(ae=fe)}return ae},i.max=function(ft,Ct){var Bt=-1,ee=ft.length,ae,fe;if(arguments.length===1){for(;++Bt=fe){ae=fe;break}for(;++Btae&&(ae=fe)}else{for(;++Bt=fe){ae=fe;break}for(;++Btae&&(ae=fe)}return ae},i.extent=function(ft,Ct){var Bt=-1,ee=ft.length,ae,fe,De;if(arguments.length===1){for(;++Bt=fe){ae=De=fe;break}for(;++Btfe&&(ae=fe),De=fe){ae=De=fe;break}for(;++Btfe&&(ae=fe),De1)return De/(Ye-1)},i.deviation=function(){var ft=i.variance.apply(this,arguments);return ft&&Math.sqrt(ft)};function b(ft){return{left:function(Ct,Bt,ee,ae){for(arguments.length<3&&(ee=0),arguments.length<4&&(ae=Ct.length);ee>>1;ft(Ct[fe],Bt)<0?ee=fe+1:ae=fe}return ee},right:function(Ct,Bt,ee,ae){for(arguments.length<3&&(ee=0),arguments.length<4&&(ae=Ct.length);ee>>1;ft(Ct[fe],Bt)>0?ae=fe:ee=fe+1}return ee}}}var u=b(l);i.bisectLeft=u.left,i.bisect=i.bisectRight=u.right,i.bisector=function(ft){return b(ft.length===1?function(Ct,Bt){return l(ft(Ct),Bt)}:ft)},i.shuffle=function(ft,Ct,Bt){(ee=arguments.length)<3&&(Bt=ft.length,ee<2&&(Ct=0));for(var ee=Bt-Ct,ae,fe;ee;)fe=Math.random()*ee--|0,ae=ft[ee+Ct],ft[ee+Ct]=ft[fe+Ct],ft[fe+Ct]=ae;return ft},i.permute=function(ft,Ct){for(var Bt=Ct.length,ee=new Array(Bt);Bt--;)ee[Bt]=ft[Ct[Bt]];return ee},i.pairs=function(ft){for(var Ct=0,Bt=ft.length-1,ee=ft[0],ae=new Array(Bt<0?0:Bt);Ct=0;)for(De=ft[Ct],Bt=De.length;--Bt>=0;)fe[--ae]=De[Bt];return fe};var d=Math.abs;i.range=function(ft,Ct,Bt){if(arguments.length<3&&(Bt=1,arguments.length<2&&(Ct=ft,ft=0)),(Ct-ft)/Bt===1/0)throw new Error("infinite range");var ee=[],ae=w(d(Bt)),fe=-1,De;if(ft*=ae,Ct*=ae,Bt*=ae,Bt<0)for(;(De=ft+Bt*++fe)>Ct;)ee.push(De/ae);else for(;(De=ft+Bt*++fe)=Ct.length)return ae?ae.call(ft,Ye):ee?Ye.sort(ee):Ye;for(var nr=-1,_r=Ye.length,Lr=Ct[Ze++],Jr,on,Rr,Br=new _,jr;++nr<_r;)(jr=Br.get(Jr=Lr(on=Ye[nr])))?jr.push(on):Br.set(Jr,[on]);return Ee?(on=Ee(),Rr=function(un,vn){on.set(un,fe(Ee,vn,Ze))}):(on={},Rr=function(un,vn){on[un]=fe(Ee,vn,Ze)}),Br.forEach(Rr),on}function De(Ee,Ye){if(Ye>=Ct.length)return Ee;var Ze=[],nr=Bt[Ye++];return Ee.forEach(function(_r,Lr){Ze.push({key:_r,values:De(Lr,Ye)})}),nr?Ze.sort(function(_r,Lr){return nr(_r.key,Lr.key)}):Ze}return ft.map=function(Ee,Ye){return fe(Ye,Ee,0)},ft.entries=function(Ee){return De(fe(i.map,Ee,0),0)},ft.key=function(Ee){return Ct.push(Ee),ft},ft.sortKeys=function(Ee){return Bt[Ct.length-1]=Ee,ft},ft.sortValues=function(Ee){return ee=Ee,ft},ft.rollup=function(Ee){return ae=Ee,ft},ft},i.set=function(ft){var Ct=new I;if(ft)for(var Bt=0,ee=ft.length;Bt=0&&(ee=ft.slice(Bt+1),ft=ft.slice(0,Bt)),ft)return arguments.length<2?this[ft].on(ee):this[ft].on(ee,Ct);if(arguments.length===2){if(Ct==null)for(ft in this)this.hasOwnProperty(ft)&&this[ft].on(ee,null);return this}};function et(ft){var Ct=[],Bt=new _;function ee(){for(var ae=Ct,fe=-1,De=ae.length,Ee;++fe=0&&(Bt=ft.slice(0,Ct))!=="xmlns"&&(ft=ft.slice(Ct+1)),gt.hasOwnProperty(Bt)?{space:gt[Bt],local:ft}:ft}},Z.attr=function(ft,Ct){if(arguments.length<2){if(typeof ft=="string"){var Bt=this.node();return ft=i.ns.qualify(ft),ft.local?Bt.getAttributeNS(ft.space,ft.local):Bt.getAttribute(ft)}for(Ct in ft)this.each(Tt(Ct,ft[Ct]));return this}return this.each(Tt(ft,Ct))};function Tt(ft,Ct){ft=i.ns.qualify(ft);function Bt(){this.removeAttribute(ft)}function ee(){this.removeAttributeNS(ft.space,ft.local)}function ae(){this.setAttribute(ft,Ct)}function fe(){this.setAttributeNS(ft.space,ft.local,Ct)}function De(){var Ye=Ct.apply(this,arguments);Ye==null?this.removeAttribute(ft):this.setAttribute(ft,Ye)}function Ee(){var Ye=Ct.apply(this,arguments);Ye==null?this.removeAttributeNS(ft.space,ft.local):this.setAttributeNS(ft.space,ft.local,Ye)}return Ct==null?ft.local?ee:Bt:typeof Ct=="function"?ft.local?Ee:De:ft.local?fe:ae}function wt(ft){return ft.trim().replace(/\s+/g," ")}Z.classed=function(ft,Ct){if(arguments.length<2){if(typeof ft=="string"){var Bt=this.node(),ee=(ft=bt(ft)).length,ae=-1;if(Ct=Bt.classList){for(;++ae=0;)(fe=Bt[ee])&&(ae&&ae!==fe.nextSibling&&ae.parentNode.insertBefore(fe,ae),ae=fe);return this},Z.sort=function(ft){ft=re.apply(this,arguments);for(var Ct=-1,Bt=this.length;++Ct=Ct&&(Ct=ae+1);!(Ye=De[Ct])&&++Ct0&&(ft=ft.slice(0,ae));var De=xe.get(ft);De&&(ft=De,fe=ne);function Ee(){var nr=this[ee];nr&&(this.removeEventListener(ft,nr,nr.$),delete this[ee])}function Ye(){var nr=fe(Ct,x(arguments));Ee.call(this),this.addEventListener(ft,this[ee]=nr,nr.$=Bt),nr._=Ct}function Ze(){var nr=new RegExp("^__on([^.]+)"+i.requote(ft)+"$"),_r;for(var Lr in this)if(_r=Lr.match(nr)){var Jr=this[Lr];this.removeEventListener(_r[1],Jr,Jr.$),delete this[Lr]}}return ae?Ct?Ye:Ee:Ct?Y:Ze}var xe=i.map({mouseenter:"mouseover",mouseleave:"mouseout"});h&&xe.forEach(function(ft){"on"+ft in h&&xe.remove(ft)});function Se(ft,Ct){return function(Bt){var ee=i.event;i.event=Bt,Ct[0]=this.__data__;try{ft.apply(this,Ct)}finally{i.event=ee}}}function ne(ft,Ct){var Bt=Se(ft,Ct);return function(ee){var ae=this,fe=ee.relatedTarget;(!fe||fe!==ae&&!(fe.compareDocumentPosition(ae)&8))&&Bt.call(ae,ee)}}var zt,Xt=0;function Jt(ft){var Ct=".dragsuppress-"+ ++Xt,Bt="click"+Ct,ee=i.select(r(ft)).on("touchmove"+Ct,it).on("dragstart"+Ct,it).on("selectstart"+Ct,it);if(zt==null&&(zt="onselectstart"in ft?!1:O(ft.style,"userSelect")),zt){var ae=p(ft).style,fe=ae[zt];ae[zt]="none"}return function(De){if(ee.on(Ct,null),zt&&(ae[zt]=fe),De){var Ee=function(){ee.on(Bt,null)};ee.on(Bt,function(){it(),Ee()},!0),setTimeout(Ee,0)}}}i.mouse=function(ft){return Ft(ft,ut())};var Wt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ft(ft,Ct){Ct.changedTouches&&(Ct=Ct.changedTouches[0]);var Bt=ft.ownerSVGElement||ft;if(Bt.createSVGPoint){var ee=Bt.createSVGPoint();if(Wt<0){var ae=r(ft);if(ae.scrollX||ae.scrollY){Bt=i.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var fe=Bt[0][0].getScreenCTM();Wt=!(fe.f||fe.e),Bt.remove()}}return Wt?(ee.x=Ct.pageX,ee.y=Ct.pageY):(ee.x=Ct.clientX,ee.y=Ct.clientY),ee=ee.matrixTransform(ft.getScreenCTM().inverse()),[ee.x,ee.y]}var De=ft.getBoundingClientRect();return[Ct.clientX-De.left-ft.clientLeft,Ct.clientY-De.top-ft.clientTop]}i.touch=function(ft,Ct,Bt){if(arguments.length<3&&(Bt=Ct,Ct=ut().changedTouches),Ct){for(var ee=0,ae=Ct.length,fe;ee1?ie:ft<-1?-ie:Math.asin(ft)}function ce(ft){return((ft=Math.exp(ft))-1/ft)/2}function Te(ft){return((ft=Math.exp(ft))+1/ft)/2}function Be(ft){return((ft=Math.exp(2*ft))-1)/(ft+1)}var ir=Math.SQRT2,pe=2,Xe=4;i.interpolateZoom=function(ft,Ct){var Bt=ft[0],ee=ft[1],ae=ft[2],fe=Ct[0],De=Ct[1],Ee=Ct[2],Ye=fe-Bt,Ze=De-ee,nr=Ye*Ye+Ze*Ze,_r,Lr;if(nr0&&(Kn=Kn.transition().duration(De)),Kn.call(vn.event)}function ii(){Br&&Br.domain(Rr.range().map(function(Kn){return(Kn-ft.x)/ft.k}).map(Rr.invert)),un&&un.domain(jr.range().map(function(Kn){return(Kn-ft.y)/ft.k}).map(jr.invert))}function fi(Kn){Ee++||Kn({type:"zoomstart"})}function Oi(Kn){ii(),Kn({type:"zoom",scale:ft.k,translate:[ft.x,ft.y]})}function Mi(Kn){--Ee||(Kn({type:"zoomend"}),Bt=null)}function Ii(){var Kn=this,Bi=on.of(Kn,arguments),Ti=0,Zi=i.select(r(Kn)).on(Ze,Ka).on(nr,Ja),ba=qr(i.mouse(Kn)),na=Jt(Kn);Ge.call(Kn),fi(Bi);function Ka(){Ti=1,ui(i.mouse(Kn),ba),Oi(Bi)}function Ja(){Zi.on(Ze,null).on(nr,null),na(Ti),Mi(Bi)}}function ra(){var Kn=this,Bi=on.of(Kn,arguments),Ti={},Zi=0,ba,na=".zoom-"+i.event.changedTouches[0].identifier,Ka="touchmove"+na,Ja="touchend"+na,to=[],wa=i.select(Kn),uo=Jt(Kn);Ei(),fi(Bi),wa.on(Ye,null).on(Lr,Ei);function oi(){var eo=i.touches(Kn);return ba=ft.k,eo.forEach(function(ca){ca.identifier in Ti&&(Ti[ca.identifier]=qr(ca))}),eo}function Ei(){var eo=i.event.target;i.select(eo).on(Ka,Ao).on(Ja,Lo),to.push(eo);for(var ca=i.event.changedTouches,Va=0,Oa=ca.length;Va1){var Ea=is[0],_l=is[1],ji=Ea[0]-_l[0],_a=Ea[1]-_l[1];Zi=ji*ji+_a*_a}}function Ao(){var eo=i.touches(Kn),ca,Va,Oa,is;Ge.call(Kn);for(var bs=0,Ea=eo.length;bs1?1:Ct,Bt=Bt<0?0:Bt>1?1:Bt,ae=Bt<=.5?Bt*(1+Ct):Bt+Ct-Bt*Ct,ee=2*Bt-ae;function fe(Ee){return Ee>360?Ee-=360:Ee<0&&(Ee+=360),Ee<60?ee+(ae-ee)*Ee/60:Ee<180?ae:Ee<240?ee+(ae-ee)*(240-Ee)/60:ee}function De(Ee){return Math.round(fe(Ee)*255)}return new fr(De(ft+120),De(ft),De(ft-120))}i.hcl=Ie;function Ie(ft,Ct,Bt){return this instanceof Ie?(this.h=+ft,this.c=+Ct,void(this.l=+Bt)):arguments.length<2?ft instanceof Ie?new Ie(ft.h,ft.c,ft.l):ft instanceof Ve?Ne(ft.l,ft.a,ft.b):Ne((ft=Gr((ft=i.rgb(ft)).r,ft.g,ft.b)).l,ft.a,ft.b):new Ie(ft,Ct,Bt)}var Pe=Ie.prototype=new ge;Pe.brighter=function(ft){return new Ie(this.h,this.c,Math.min(100,this.l+Je*(arguments.length?ft:1)))},Pe.darker=function(ft){return new Ie(this.h,this.c,Math.max(0,this.l-Je*(arguments.length?ft:1)))},Pe.rgb=function(){return ke(this.h,this.c,this.l).rgb()};function ke(ft,Ct,Bt){return isNaN(ft)&&(ft=0),isNaN(Ct)&&(Ct=0),new Ve(Bt,Math.cos(ft*=me)*Ct,Math.sin(ft)*Ct)}i.lab=Ve;function Ve(ft,Ct,Bt){return this instanceof Ve?(this.l=+ft,this.a=+Ct,void(this.b=+Bt)):arguments.length<2?ft instanceof Ve?new Ve(ft.l,ft.a,ft.b):ft instanceof Ie?ke(ft.h,ft.c,ft.l):Gr((ft=fr(ft)).r,ft.g,ft.b):new Ve(ft,Ct,Bt)}var Je=18,ur=.95047,hr=1,vr=1.08883,Yt=Ve.prototype=new ge;Yt.brighter=function(ft){return new Ve(Math.min(100,this.l+Je*(arguments.length?ft:1)),this.a,this.b)},Yt.darker=function(ft){return new Ve(Math.max(0,this.l-Je*(arguments.length?ft:1)),this.a,this.b)},Yt.rgb=function(){return Gt(this.l,this.a,this.b)};function Gt(ft,Ct,Bt){var ee=(ft+16)/116,ae=ee+Ct/500,fe=ee-Bt/200;return ae=Oe(ae)*ur,ee=Oe(ee)*hr,fe=Oe(fe)*vr,new fr(er(3.2404542*ae-1.5371385*ee-.4985314*fe),er(-.969266*ae+1.8760108*ee+.041556*fe),er(.0556434*ae-.2040259*ee+1.0572252*fe))}function Ne(ft,Ct,Bt){return ft>0?new Ie(Math.atan2(Bt,Ct)*be,Math.sqrt(Ct*Ct+Bt*Bt),ft):new Ie(NaN,NaN,ft)}function Oe(ft){return ft>.206893034?ft*ft*ft:(ft-.13793103448275862)/7.787037}function Qe(ft){return ft>.008856?Math.pow(ft,.3333333333333333):7.787037*ft+.13793103448275862}function er(ft){return Math.round(255*(ft<=.00304?12.92*ft:1.055*Math.pow(ft,.4166666666666667)-.055))}i.rgb=fr;function fr(ft,Ct,Bt){return this instanceof fr?(this.r=~~ft,this.g=~~Ct,void(this.b=~~Bt)):arguments.length<2?ft instanceof fr?new fr(ft.r,ft.g,ft.b):xr(""+ft,fr,Ce):new fr(ft,Ct,Bt)}function rr(ft){return new fr(ft>>16,ft>>8&255,ft&255)}function He(ft){return rr(ft)+""}var dr=fr.prototype=new ge;dr.brighter=function(ft){ft=Math.pow(.7,arguments.length?ft:1);var Ct=this.r,Bt=this.g,ee=this.b,ae=30;return!Ct&&!Bt&&!ee?new fr(ae,ae,ae):(Ct&&Ct>4,ee=ee>>4|ee,ae=Ye&240,ae=ae>>4|ae,fe=Ye&15,fe=fe<<4|fe):ft.length===7&&(ee=(Ye&16711680)>>16,ae=(Ye&65280)>>8,fe=Ye&255)),Ct(ee,ae,fe))}function pr(ft,Ct,Bt){var ee=Math.min(ft/=255,Ct/=255,Bt/=255),ae=Math.max(ft,Ct,Bt),fe=ae-ee,De,Ee,Ye=(ae+ee)/2;return fe?(Ee=Ye<.5?fe/(ae+ee):fe/(2-ae-ee),ft==ae?De=(Ct-Bt)/fe+(Ct0&&Ye<1?0:De),new se(De,Ee,Ye)}function Gr(ft,Ct,Bt){ft=Pr(ft),Ct=Pr(Ct),Bt=Pr(Bt);var ee=Qe((.4124564*ft+.3575761*Ct+.1804375*Bt)/ur),ae=Qe((.2126729*ft+.7151522*Ct+.072175*Bt)/hr),fe=Qe((.0193339*ft+.119192*Ct+.9503041*Bt)/vr);return Ve(116*ae-16,500*(ee-ae),200*(ae-fe))}function Pr(ft){return(ft/=255)<=.04045?ft/12.92:Math.pow((ft+.055)/1.055,2.4)}function Dr(ft){var Ct=parseFloat(ft);return ft.charAt(ft.length-1)==="%"?Math.round(Ct*2.55):Ct}var cn=i.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});cn.forEach(function(ft,Ct){cn.set(ft,rr(Ct))});function rn(ft){return typeof ft=="function"?ft:function(){return ft}}i.functor=rn,i.xhr=Cn(k);function Cn(ft){return function(Ct,Bt,ee){return arguments.length===2&&typeof Bt=="function"&&(ee=Bt,Bt=null),En(Ct,Bt,ft,ee)}}function En(ft,Ct,Bt,ee){var ae={},fe=i.dispatch("beforesend","progress","load","error"),De={},Ee=new XMLHttpRequest,Ye=null;self.XDomainRequest&&!("withCredentials"in Ee)&&/^(http(s)?:)?\/\//.test(ft)&&(Ee=new XDomainRequest),"onload"in Ee?Ee.onload=Ee.onerror=Ze:Ee.onreadystatechange=function(){Ee.readyState>3&&Ze()};function Ze(){var nr=Ee.status,_r;if(!nr&&Cr(Ee)||nr>=200&&nr<300||nr===304){try{_r=Bt.call(ae,Ee)}catch(Lr){fe.error.call(ae,Lr);return}fe.load.call(ae,_r)}else fe.error.call(ae,Ee)}return Ee.onprogress=function(nr){var _r=i.event;i.event=nr;try{fe.progress.call(ae,Ee)}finally{i.event=_r}},ae.header=function(nr,_r){return nr=(nr+"").toLowerCase(),arguments.length<2?De[nr]:(_r==null?delete De[nr]:De[nr]=_r+"",ae)},ae.mimeType=function(nr){return arguments.length?(Ct=nr==null?null:nr+"",ae):Ct},ae.responseType=function(nr){return arguments.length?(Ye=nr,ae):Ye},ae.response=function(nr){return Bt=nr,ae},["get","post"].forEach(function(nr){ae[nr]=function(){return ae.send.apply(ae,[nr].concat(x(arguments)))}}),ae.send=function(nr,_r,Lr){if(arguments.length===2&&typeof _r=="function"&&(Lr=_r,_r=null),Ee.open(nr,ft,!0),Ct!=null&&!("accept"in De)&&(De.accept=Ct+",*/*"),Ee.setRequestHeader)for(var Jr in De)Ee.setRequestHeader(Jr,De[Jr]);return Ct!=null&&Ee.overrideMimeType&&Ee.overrideMimeType(Ct),Ye!=null&&(Ee.responseType=Ye),Lr!=null&&ae.on("error",Lr).on("load",function(on){Lr(null,on)}),fe.beforesend.call(ae,Ee),Ee.send(_r??null),ae},ae.abort=function(){return Ee.abort(),ae},i.rebind(ae,fe,"on"),ee==null?ae:ae.get(Tr(ee))}function Tr(ft){return ft.length===1?function(Ct,Bt){ft(Ct==null?Bt:null)}:ft}function Cr(ft){var Ct=ft.responseType;return Ct&&Ct!=="text"?ft.response:ft.responseText}i.dsv=function(ft,Ct){var Bt=new RegExp('["'+ft+` ]`),ee=ft.charCodeAt(0);function ae(Ze,nr,_r){arguments.length<3&&(_r=nr,nr=null);var Lr=En(Ze,Ct,nr==null?fe:De(nr),_r);return Lr.row=function(Jr){return arguments.length?Lr.response((nr=Jr)==null?fe:De(Jr)):nr},Lr}function fe(Ze){return ae.parse(Ze.responseText)}function De(Ze){return function(nr){return ae.parse(nr.responseText,Ze)}}ae.parse=function(Ze,nr){var _r;return ae.parseRows(Ze,function(Lr,Jr){if(_r)return _r(Lr,Jr-1);var on=function(Rr){for(var Br={},jr=Lr.length,un=0;un=on)return Lr;if(un)return un=!1,_r;var Hn=Rr;if(Ze.charCodeAt(Hn)===34){for(var qn=Hn;qn++24?(isFinite(Ct)&&(clearTimeout(pn),pn=setTimeout(kn,Ct)),an=0):(an=1,gn(kn))}i.timer.flush=function(){ni(),ci()};function ni(){for(var ft=Date.now(),Ct=Wr;Ct;)ft>=Ct.t&&Ct.c(ft-Ct.t)&&(Ct.c=null),Ct=Ct.n;return ft}function ci(){for(var ft,Ct=Wr,Bt=1/0;Ct;)Ct.c?(Ct.t=0;--Ee)Rr.push(ae[Ze[_r[Ee]][2]]);for(Ee=+Jr;Ee1&&ve(ft[Bt[ee-2]],ft[Bt[ee-1]],ft[ae])<=0;)--ee;Bt[ee++]=ae}return Bt.slice(0,ee)}function wr(ft,Ct){return ft[0]-Ct[0]||ft[1]-Ct[1]}i.geom.polygon=function(ft){return tt(ft,nn),ft};var nn=i.geom.polygon.prototype=[];nn.area=function(){for(var ft=-1,Ct=this.length,Bt,ee=this[Ct-1],ae=0;++ftyt)Ee=Ee.L;else if(De=Ct-sn(Ee,Bt),De>yt){if(!Ee.R){ee=Ee;break}Ee=Ee.R}else{fe>-yt?(ee=Ee.P,ae=Ee):De>-yt?(ee=Ee,ae=Ee.N):ee=ae=Ee;break}var Ye=Ar(ft);if(Bn.insert(ee,Ye),!(!ee&&!ae)){if(ee===ae){Ln(ee),ae=Ar(ee.site),Bn.insert(Ye,ae),Ye.edge=ae.edge=ai(ee.site,Ye.site),wn(ee),wn(ae);return}if(!ae){Ye.edge=ai(ee.site,Ye.site);return}Ln(ee),Ln(ae);var Ze=ee.site,nr=Ze.x,_r=Ze.y,Lr=ft.x-nr,Jr=ft.y-_r,on=ae.site,Rr=on.x-nr,Br=on.y-_r,jr=2*(Lr*Br-Jr*Rr),un=Lr*Lr+Jr*Jr,vn=Rr*Rr+Br*Br,qr={x:(Br*un-Jr*vn)/jr+nr,y:(Lr*vn-Rr*un)/jr+_r};Ci(ae.edge,Ze,on,qr),Ye.edge=ai(Ze,ft,null,qr),ae.edge=ai(ft,on,null,qr),wn(ee),wn(ae)}}function hn(ft,Ct){var Bt=ft.site,ee=Bt.x,ae=Bt.y,fe=ae-Ct;if(!fe)return ee;var De=ft.P;if(!De)return-1/0;Bt=De.site;var Ee=Bt.x,Ye=Bt.y,Ze=Ye-Ct;if(!Ze)return Ee;var nr=Ee-ee,_r=1/fe-1/Ze,Lr=nr/Ze;return _r?(-Lr+Math.sqrt(Lr*Lr-2*_r*(nr*nr/(-2*Ze)-Ye+Ze/2+ae-fe/2)))/_r+ee:(ee+Ee)/2}function sn(ft,Ct){var Bt=ft.N;if(Bt)return hn(Bt,Ct);var ee=ft.site;return ee.y===Ct?ee.x:1/0}function Er(ft){this.site=ft,this.edges=[]}Er.prototype.prepare=function(){for(var ft=this.edges,Ct=ft.length,Bt;Ct--;)Bt=ft[Ct].edge,(!Bt.b||!Bt.a)&&ft.splice(Ct,1);return ft.sort(Hr),ft.length};function Zr(ft){for(var Ct=ft[0][0],Bt=ft[1][0],ee=ft[0][1],ae=ft[1][1],fe,De,Ee,Ye,Ze=An,nr=Ze.length,_r,Lr,Jr,on,Rr,Br;nr--;)if(_r=Ze[nr],!(!_r||!_r.prepare()))for(Jr=_r.edges,on=Jr.length,Lr=0;Lryt||d(Ye-De)>yt)&&(Jr.splice(Lr,0,new pa(pi(_r.site,Br,d(Ee-Ct)yt?{x:Ct,y:d(fe-Ct)yt?{x:d(De-ae)yt?{x:Bt,y:d(fe-Bt)yt?{x:d(De-ee)=-Et)){var Lr=Ye*Ye+Ze*Ze,Jr=nr*nr+Br*Br,on=(Br*Lr-Ze*Jr)/_r,Rr=(Ye*Jr-nr*Lr)/_r,Br=Rr+Ee,jr=Sr.pop()||new Qr;jr.arc=ft,jr.site=ae,jr.x=on+De,jr.y=Br+Math.sqrt(on*on+Rr*Rr),jr.cy=Br,ft.circle=jr;for(var un=null,vn=Di._;vn;)if(jr.y0)){if(Rr/=Jr,Jr<0){if(Rr<_r)return;Rr0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}if(Rr=Bt-Ee,!(!Jr&&Rr<0)){if(Rr/=Jr,Jr<0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}else if(Jr>0){if(Rr<_r)return;Rr0)){if(Rr/=on,on<0){if(Rr<_r)return;Rr0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}if(Rr=ee-Ye,!(!on&&Rr<0)){if(Rr/=on,on<0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}else if(on>0){if(Rr<_r)return;Rr0&&(ae.a={x:Ee+_r*Jr,y:Ye+_r*on}),Lr<1&&(ae.b={x:Ee+Lr*Jr,y:Ye+Lr*on}),ae}}}}}}function Un(ft){for(var Ct=Tn,Bt=Pn(ft[0][0],ft[0][1],ft[1][0],ft[1][1]),ee=Ct.length,ae;ee--;)ae=Ct[ee],(!On(ae,ft)||!Bt(ae)||d(ae.a.x-ae.b.x)=fe)return;if(nr>Lr){if(!ee)ee={x:on,y:De};else if(ee.y>=Ee)return;Bt={x:on,y:Ee}}else{if(!ee)ee={x:on,y:Ee};else if(ee.y1)if(nr>Lr){if(!ee)ee={x:(De-jr)/Br,y:De};else if(ee.y>=Ee)return;Bt={x:(Ee-jr)/Br,y:Ee}}else{if(!ee)ee={x:(Ee-jr)/Br,y:Ee};else if(ee.y=fe)return;Bt={x:fe,y:Br*fe+jr}}else{if(!ee)ee={x:fe,y:Br*fe+jr};else if(ee.x=nr&&jr.x<=Lr&&jr.y>=_r&&jr.y<=Jr?[[nr,Jr],[Lr,Jr],[Lr,_r],[nr,_r]]:[];un.point=Ye[Rr]}),Ze}function Ee(Ye){return Ye.map(function(Ze,nr){return{x:Math.round(ee(Ze,nr)/yt)*yt,y:Math.round(ae(Ze,nr)/yt)*yt,i:nr}})}return De.links=function(Ye){return Bu(Ee(Ye)).edges.filter(function(Ze){return Ze.l&&Ze.r}).map(function(Ze){return{source:Ye[Ze.l.i],target:Ye[Ze.r.i]}})},De.triangles=function(Ye){var Ze=[];return Bu(Ee(Ye)).cells.forEach(function(nr,_r){for(var Lr=nr.site,Jr=nr.edges.sort(Hr),on=-1,Rr=Jr.length,Br,jr=Jr[Rr-1].edge,un=jr.l===Lr?jr.r:jr.l;++onvn&&(vn=nr.x),nr.y>qr&&(qr=nr.y),Jr.push(nr.x),on.push(nr.y);else for(Rr=0;Rrvn&&(vn=Hn),qn>qr&&(qr=qn),Jr.push(Hn),on.push(qn)}var ui=vn-jr,Qn=qr-un;ui>Qn?qr=un+ui:vn=jr+Qn;function ii(Mi,Ii,ra,ka,la,Kn,Bi,Ti){if(!(isNaN(ra)||isNaN(ka)))if(Mi.leaf){var Zi=Mi.x,ba=Mi.y;if(Zi!=null)if(d(Zi-ra)+d(ba-ka)<.01)fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti);else{var na=Mi.point;Mi.x=Mi.y=Mi.point=null,fi(Mi,na,Zi,ba,la,Kn,Bi,Ti),fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}else Mi.x=ra,Mi.y=ka,Mi.point=Ii}else fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}function fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti){var Zi=(la+Bi)*.5,ba=(Kn+Ti)*.5,na=ra>=Zi,Ka=ka>=ba,Ja=Ka<<1|na;Mi.leaf=!1,Mi=Mi.nodes[Ja]||(Mi.nodes[Ja]=ho()),na?la=Zi:Bi=Zi,Ka?Kn=ba:Ti=ba,ii(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}var Oi=ho();if(Oi.add=function(Mi){ii(Oi,Mi,+_r(Mi,++Rr),+Lr(Mi,Rr),jr,un,vn,qr)},Oi.visit=function(Mi){ll(Mi,Oi,jr,un,vn,qr)},Oi.find=function(Mi){return vu(Oi,Mi[0],Mi[1],jr,un,vn,qr)},Rr=-1,Ct==null){for(;++Rrfe||Lr>De||Jr=Hn,Qn=Bt>=qn,ii=Qn<<1|ui,fi=ii+4;iiBt&&(fe=Ct.slice(Bt,fe),Ee[De]?Ee[De]+=fe:Ee[++De]=fe),(ee=ee[0])===(ae=ae[0])?Ee[De]?Ee[De]+=ae:Ee[++De]=ae:(Ee[++De]=null,Ye.push({i:De,x:za(ee,ae)})),Bt=$a.lastIndex;return Bt=0&&!(ee=i.interpolators[Bt](ft,Ct)););return ee}i.interpolators=[function(ft,Ct){var Bt=typeof Ct;return(Bt==="string"?cn.has(Ct.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ct)?Ra:Ua:Ct instanceof ge?Ra:Array.isArray(Ct)?_o:Bt==="object"&&isNaN(Ct)?ul:za)(ft,Ct)}],i.interpolateArray=_o;function _o(ft,Ct){var Bt=[],ee=[],ae=ft.length,fe=Ct.length,De=Math.min(ft.length,Ct.length),Ee;for(Ee=0;Ee=0?ft.slice(0,Ct):ft,ee=Ct>=0?ft.slice(Ct+1):"in";return Bt=bo.get(Bt)||Tf,ee=yc.get(ee)||k,ts(ee(Bt.apply(null,S.call(arguments,1))))};function ts(ft){return function(Ct){return Ct<=0?0:Ct>=1?1:ft(Ct)}}function Za(ft){return function(Ct){return 1-ft(1-Ct)}}function Hu(ft){return function(Ct){return .5*(Ct<.5?ft(2*Ct):2-ft(2-2*Ct))}}function Cs(ft){return ft*ft}function es(ft){return ft*ft*ft}function Vu(ft){if(ft<=0)return 0;if(ft>=1)return 1;var Ct=ft*ft,Bt=Ct*ft;return 4*(ft<.5?Bt:3*(ft-Ct)+Bt-.75)}function Af(ft){return function(Ct){return Math.pow(Ct,ft)}}function xc(ft){return 1-Math.cos(ft*ie)}function du(ft){return Math.pow(2,10*(ft-1))}function bc(ft){return 1-Math.sqrt(1-ft*ft)}function wc(ft,Ct){var Bt;return arguments.length<2&&(Ct=.45),arguments.length?Bt=Ct/Nt*Math.asin(1/ft):(ft=1,Bt=Ct/4),function(ee){return 1+ft*Math.pow(2,-10*ee)*Math.sin((ee-Bt)*Nt/Ct)}}function Tc(ft){return ft||(ft=1.70158),function(Ct){return Ct*Ct*((ft+1)*Ct-ft)}}function Gu(ft){return ft<.36363636363636365?7.5625*ft*ft:ft<.7272727272727273?7.5625*(ft-=.5454545454545454)*ft+.75:ft<.9090909090909091?7.5625*(ft-=.8181818181818182)*ft+.9375:7.5625*(ft-=.9545454545454546)*ft+.984375}i.interpolateHcl=Ac;function Ac(ft,Ct){ft=i.hcl(ft),Ct=i.hcl(Ct);var Bt=ft.h,ee=ft.c,ae=ft.l,fe=Ct.h-Bt,De=Ct.c-ee,Ee=Ct.l-ae;return isNaN(De)&&(De=0,ee=isNaN(ee)?Ct.c:ee),isNaN(fe)?(fe=0,Bt=isNaN(Bt)?Ct.h:Bt):fe>180?fe-=360:fe<-180&&(fe+=360),function(Ye){return ke(Bt+fe*Ye,ee+De*Ye,ae+Ee*Ye)+""}}i.interpolateHsl=Mc;function Mc(ft,Ct){ft=i.hsl(ft),Ct=i.hsl(Ct);var Bt=ft.h,ee=ft.s,ae=ft.l,fe=Ct.h-Bt,De=Ct.s-ee,Ee=Ct.l-ae;return isNaN(De)&&(De=0,ee=isNaN(ee)?Ct.s:ee),isNaN(fe)?(fe=0,Bt=isNaN(Bt)?Ct.h:Bt):fe>180?fe-=360:fe<-180&&(fe+=360),function(Ye){return Ce(Bt+fe*Ye,ee+De*Ye,ae+Ee*Ye)+""}}i.interpolateLab=Mf;function Mf(ft,Ct){ft=i.lab(ft),Ct=i.lab(Ct);var Bt=ft.l,ee=ft.a,ae=ft.b,fe=Ct.l-Bt,De=Ct.a-ee,Ee=Ct.b-ae;return function(Ye){return Gt(Bt+fe*Ye,ee+De*Ye,ae+Ee*Ye)+""}}i.interpolateRound=Sf;function Sf(ft,Ct){return Ct-=ft,function(Bt){return Math.round(ft+Ct*Bt)}}i.transform=function(ft){var Ct=v.createElementNS(i.ns.prefix.svg,"g");return(i.transform=function(Bt){if(Bt!=null){Ct.setAttribute("transform",Bt);var ee=Ct.transform.baseVal.consolidate()}return new Xs(ee?ee.matrix:Ef)})(ft)};function Xs(ft){var Ct=[ft.a,ft.b],Bt=[ft.c,ft.d],ee=zl(Ct),ae=cl(Ct,Bt),fe=zl(kl(Bt,Ct,-ae))||0;Ct[0]*Bt[1]180?Ct+=360:Ct-ft>180&&(ft+=360),ee.push({i:Bt.push(vs(Bt)+"rotate(",null,")")-2,x:za(ft,Ct)})):Ct&&Bt.push(vs(Bt)+"rotate("+Ct+")")}function _f(ft,Ct,Bt,ee){ft!==Ct?ee.push({i:Bt.push(vs(Bt)+"skewX(",null,")")-2,x:za(ft,Ct)}):Ct&&Bt.push(vs(Bt)+"skewX("+Ct+")")}function Cf(ft,Ct,Bt,ee){if(ft[0]!==Ct[0]||ft[1]!==Ct[1]){var ae=Bt.push(vs(Bt)+"scale(",null,",",null,")");ee.push({i:ae-4,x:za(ft[0],Ct[0])},{i:ae-2,x:za(ft[1],Ct[1])})}else(Ct[0]!==1||Ct[1]!==1)&&Bt.push(vs(Bt)+"scale("+Ct+")")}function gu(ft,Ct){var Bt=[],ee=[];return ft=i.transform(ft),Ct=i.transform(Ct),Sc(ft.translate,Ct.translate,Bt,ee),pu(ft.rotate,Ct.rotate,Bt,ee),_f(ft.skew,Ct.skew,Bt,ee),Cf(ft.scale,Ct.scale,Bt,ee),ft=Ct=null,function(ae){for(var fe=-1,De=ee.length,Ee;++fe0?fe=qr:(Bt.c=null,Bt.t=NaN,Bt=null,Ct.end({type:"end",alpha:fe=0})):qr>0&&(Ct.start({type:"start",alpha:fe=qr}),Bt=_n(ft.tick)),ft):fe},ft.start=function(){var qr,Hn=Jr.length,qn=on.length,ui=ee[0],Qn=ee[1],ii,fi;for(qr=0;qr=0;)fe.push(nr=Ze[Ye]),nr.parent=Ee,nr.depth=Ee.depth+1;Bt&&(Ee.value=0),Ee.children=Ze}else Bt&&(Ee.value=+Bt.call(ee,Ee,Ee.depth)||0),delete Ee.children;return wo(ae,function(_r){var Lr,Jr;ft&&(Lr=_r.children)&&Lr.sort(ft),Bt&&(Jr=_r.parent)&&(Jr.value+=_r.value)}),De}return ee.sort=function(ae){return arguments.length?(ft=ae,ee):ft},ee.children=function(ae){return arguments.length?(Ct=ae,ee):Ct},ee.value=function(ae){return arguments.length?(Bt=ae,ee):Bt},ee.revalue=function(ae){return Bt&&(pl(ae,function(fe){fe.children&&(fe.value=0)}),wo(ae,function(fe){var De;fe.children||(fe.value=+Bt.call(ee,fe,fe.depth)||0),(De=fe.parent)&&(De.value+=fe.value)})),ae},ee};function dl(ft,Ct){return i.rebind(ft,Ct,"sort","children","value"),ft.nodes=ft,ft.links=_c,ft}function pl(ft,Ct){for(var Bt=[ft];(ft=Bt.pop())!=null;)if(Ct(ft),(ae=ft.children)&&(ee=ae.length))for(var ee,ae;--ee>=0;)Bt.push(ae[ee])}function wo(ft,Ct){for(var Bt=[ft],ee=[];(ft=Bt.pop())!=null;)if(ee.push(ft),(De=ft.children)&&(fe=De.length))for(var ae=-1,fe,De;++aeae&&(ae=Ee),ee.push(Ee)}for(De=0;Deee&&(Bt=Ct,ee=ae);return Bt}function Pf(ft){return ft.reduce(Vo,0)}function Vo(ft,Ct){return ft+Ct[1]}i.layout.histogram=function(){var ft=!0,Ct=Number,Bt=js,ee=Rf;function ae(fe,Lr){for(var Ee=[],Ye=fe.map(Ct,this),Ze=Bt.call(this,Ye,Lr),nr=ee.call(this,Ze,Ye,Lr),_r,Lr=-1,Jr=Ye.length,on=nr.length-1,Rr=ft?1:1/Jr,Br;++Lr0)for(Lr=-1;++Lr=Ze[0]&&Br<=Ze[1]&&(_r=Ee[i.bisect(nr,Br,1,on)-1],_r.y+=Rr,_r.push(fe[Lr]));return Ee}return ae.value=function(fe){return arguments.length?(Ct=fe,ae):Ct},ae.range=function(fe){return arguments.length?(Bt=rn(fe),ae):Bt},ae.bins=function(fe){return arguments.length?(ee=typeof fe=="number"?function(De){return Ku(De,fe)}:rn(fe),ae):ee},ae.frequency=function(fe){return arguments.length?(ft=!!fe,ae):ft},ae};function Rf(ft,Ct){return Ku(ft,Math.ceil(Math.log(Ct.length)/Math.LN2+1))}function Ku(ft,Ct){for(var Bt=-1,ee=+ft[0],ae=(ft[1]-ee)/Ct,fe=[];++Bt<=Ct;)fe[Bt]=ae*Bt+ee;return fe}function js(ft){return[i.min(ft),i.max(ft)]}i.layout.pack=function(){var ft=i.layout.hierarchy().sort(Ps),Ct=0,Bt=[1,1],ee;function ae(fe,De){var Ee=ft.call(this,fe,De),Ye=Ee[0],Ze=Bt[0],nr=Bt[1],_r=ee==null?Math.sqrt:typeof ee=="function"?ee:function(){return ee};if(Ye.x=Ye.y=0,wo(Ye,function(Jr){Jr.r=+_r(Jr.value)}),wo(Ye,Go),Ct){var Lr=Ct*(ee?1:Math.max(2*Ye.r/Ze,2*Ye.r/nr))/2;wo(Ye,function(Jr){Jr.r+=Lr}),wo(Ye,Go),wo(Ye,function(Jr){Jr.r-=Lr})}return Rs(Ye,Ze/2,nr/2,ee?1:1/Math.max(2*Ye.r/Ze,2*Ye.r/nr)),Ee}return ae.size=function(fe){return arguments.length?(Bt=fe,ae):Bt},ae.radius=function(fe){return arguments.length?(ee=fe==null||typeof fe=="function"?fe:+fe,ae):ee},ae.padding=function(fe){return arguments.length?(Ct=+fe,ae):Ct},dl(ae,ft)};function Ps(ft,Ct){return ft.value-Ct.value}function Tu(ft,Ct){var Bt=ft._pack_next;ft._pack_next=Ct,Ct._pack_prev=ft,Ct._pack_next=Bt,Bt._pack_prev=Ct}function Da(ft,Ct){ft._pack_next=Ct,Ct._pack_prev=ft}function Bl(ft,Ct){var Bt=Ct.x-ft.x,ee=Ct.y-ft.y,ae=ft.r+Ct.r;return .999*ae*ae>Bt*Bt+ee*ee}function Go(ft){if(!(Ct=ft.children)||!(Lr=Ct.length))return;var Ct,Bt=1/0,ee=-1/0,ae=1/0,fe=-1/0,De,Ee,Ye,Ze,nr,_r,Lr;function Jr(qr){Bt=Math.min(qr.x-qr.r,Bt),ee=Math.max(qr.x+qr.r,ee),ae=Math.min(qr.y-qr.r,ae),fe=Math.max(qr.y+qr.r,fe)}if(Ct.forEach(ds),De=Ct[0],De.x=-De.r,De.y=0,Jr(De),Lr>1&&(Ee=Ct[1],Ee.x=Ee.r,Ee.y=0,Jr(Ee),Lr>2))for(Ye=Ct[2],Wo(De,Ee,Ye),Jr(Ye),Tu(De,Ye),De._pack_prev=Ye,Tu(Ye,Ee),Ee=De._pack_next,Ze=3;ZeBr.x&&(Br=Hn),Hn.depth>jr.depth&&(jr=Hn)});var un=Ct(Rr,Br)/2-Rr.x,vn=Bt[0]/(Br.x+Ct(Br,Rr)/2+un),qr=Bt[1]/(jr.depth||1);pl(Jr,function(Hn){Hn.x=(Hn.x+un)*vn,Hn.y=Hn.depth*qr})}return Lr}function fe(nr){for(var _r={A:null,children:[nr]},Lr=[_r],Jr;(Jr=Lr.pop())!=null;)for(var on=Jr.children,Rr,Br=0,jr=on.length;Br0&&(Ul(Lc(Rr,nr,Lr),nr,Hn),jr+=Hn,un+=Hn),vn+=Rr.m,jr+=Jr.m,qr+=Br.m,un+=on.m;Rr&&!Do(on)&&(on.t=Rr,on.m+=vn-un),Jr&&!Yo(Br)&&(Br.t=Jr,Br.m+=jr-qr,Lr=nr)}return Lr}function Ze(nr){nr.x*=Bt[0],nr.y=nr.depth*Bt[1]}return ae.separation=function(nr){return arguments.length?(Ct=nr,ae):Ct},ae.size=function(nr){return arguments.length?(ee=(Bt=nr)==null?Ze:null,ae):ee?null:Bt},ae.nodeSize=function(nr){return arguments.length?(ee=(Bt=nr)==null?null:Ze,ae):ee?Bt:null},dl(ae,ft)};function ps(ft,Ct){return ft.parent==Ct.parent?1:2}function Yo(ft){var Ct=ft.children;return Ct.length?Ct[0]:ft.t}function Do(ft){var Ct=ft.children,Bt;return(Bt=Ct.length)?Ct[Bt-1]:ft.t}function Ul(ft,Ct,Bt){var ee=Bt/(Ct.i-ft.i);Ct.c-=ee,Ct.s+=Bt,ft.c+=ee,Ct.z+=Bt,Ct.m+=Bt}function Cc(ft){for(var Ct=0,Bt=0,ee=ft.children,ae=ee.length,fe;--ae>=0;)fe=ee[ae],fe.z+=Ct,fe.m+=Ct,Ct+=fe.s+(Bt+=fe.c)}function Lc(ft,Ct,Bt){return ft.a.parent===Ct.parent?ft.a:Bt}i.layout.cluster=function(){var ft=i.layout.hierarchy().sort(null).value(null),Ct=ps,Bt=[1,1],ee=!1;function ae(fe,De){var Ee=ft.call(this,fe,De),Ye=Ee[0],Ze,nr=0;wo(Ye,function(Rr){var Br=Rr.children;Br&&Br.length?(Rr.x=Rc(Br),Rr.y=Pc(Br)):(Rr.x=Ze?nr+=Ct(Rr,Ze):0,Rr.y=0,Ze=Rr)});var _r=Ju(Ye),Lr=Df(Ye),Jr=_r.x-Ct(_r,Lr)/2,on=Lr.x+Ct(Lr,_r)/2;return wo(Ye,ee?function(Rr){Rr.x=(Rr.x-Ye.x)*Bt[0],Rr.y=(Ye.y-Rr.y)*Bt[1]}:function(Rr){Rr.x=(Rr.x-Jr)/(on-Jr)*Bt[0],Rr.y=(1-(Ye.y?Rr.y/Ye.y:1))*Bt[1]}),Ee}return ae.separation=function(fe){return arguments.length?(Ct=fe,ae):Ct},ae.size=function(fe){return arguments.length?(ee=(Bt=fe)==null,ae):ee?null:Bt},ae.nodeSize=function(fe){return arguments.length?(ee=(Bt=fe)!=null,ae):ee?Bt:null},dl(ae,ft)};function Pc(ft){return 1+i.max(ft,function(Ct){return Ct.y})}function Rc(ft){return ft.reduce(function(Ct,Bt){return Ct+Bt.x},0)/ft.length}function Ju(ft){var Ct=ft.children;return Ct&&Ct.length?Ju(Ct[0]):ft}function Df(ft){var Ct=ft.children,Bt;return Ct&&(Bt=Ct.length)?Df(Ct[Bt-1]):ft}i.layout.treemap=function(){var ft=i.layout.hierarchy(),Ct=Math.round,Bt=[1,1],ee=null,ae=xl,fe=!1,De,Ee="squarify",Ye=.5*(1+Math.sqrt(5));function Ze(Rr,Br){for(var jr=-1,un=Rr.length,vn,qr;++jr0;)un.push(qr=vn[Qn-1]),un.area+=qr.area,Ee!=="squarify"||(qn=Lr(un,ui))<=Hn?(vn.pop(),Hn=qn):(un.area-=un.pop().area,Jr(un,ui,jr,!1),ui=Math.min(jr.dx,jr.dy),un.length=un.area=0,Hn=1/0);un.length&&(Jr(un,ui,jr,!0),un.length=un.area=0),Br.forEach(nr)}}function _r(Rr){var Br=Rr.children;if(Br&&Br.length){var jr=ae(Rr),un=Br.slice(),vn,qr=[];for(Ze(un,jr.dx*jr.dy/Rr.value),qr.area=0;vn=un.pop();)qr.push(vn),qr.area+=vn.area,vn.z!=null&&(Jr(qr,vn.z?jr.dx:jr.dy,jr,!un.length),qr.length=qr.area=0);Br.forEach(_r)}}function Lr(Rr,Br){for(var jr=Rr.area,un,vn=0,qr=1/0,Hn=-1,qn=Rr.length;++Hnvn&&(vn=un));return jr*=jr,Br*=Br,jr?Math.max(Br*vn*Ye/jr,jr/(Br*qr*Ye)):1/0}function Jr(Rr,Br,jr,un){var vn=-1,qr=Rr.length,Hn=jr.x,qn=jr.y,ui=Br?Ct(Rr.area/Br):0,Qn;if(Br==jr.dx){for((un||ui>jr.dy)&&(ui=jr.dy);++vnjr.dx)&&(ui=jr.dx);++vn1);return ft+Ct*ee*Math.sqrt(-2*Math.log(fe)/fe)}},logNormal:function(){var ft=i.random.normal.apply(i,arguments);return function(){return Math.exp(ft())}},bates:function(ft){var Ct=i.random.irwinHall(ft);return function(){return Ct()/ft}},irwinHall:function(ft){return function(){for(var Ct=0,Bt=0;Bt2?Ff:If,Ze=ee?hl:Uo;return ae=Ye(ft,Ct,Ze,Bt),fe=Ye(Ct,ft,Ze,qa),Ee}function Ee(Ye){return ae(Ye)}return Ee.invert=function(Ye){return fe(Ye)},Ee.domain=function(Ye){return arguments.length?(ft=Ye.map(Number),De()):ft},Ee.range=function(Ye){return arguments.length?(Ct=Ye,De()):Ct},Ee.rangeRound=function(Ye){return Ee.range(Ye).interpolate(Sf)},Ee.clamp=function(Ye){return arguments.length?(ee=Ye,De()):ee},Ee.interpolate=function(Ye){return arguments.length?(Bt=Ye,De()):Bt},Ee.ticks=function(Ye){return Xo(ft,Ye)},Ee.tickFormat=function(Ye,Ze){return d3_scale_linearTickFormat(ft,Ye,Ze)},Ee.nice=function(Ye){return kf(ft,Ye),De()},Ee.copy=function(){return zf(ft,Ct,Bt,ee)},De()}function Qu(ft,Ct){return i.rebind(ft,Ct,"range","rangeRound","interpolate","clamp")}function kf(ft,Ct){return Hl(ft,gs(vo(ft,Ct)[2])),Hl(ft,gs(vo(ft,Ct)[2])),ft}function vo(ft,Ct){Ct==null&&(Ct=10);var Bt=Co(ft),ee=Bt[1]-Bt[0],ae=Math.pow(10,Math.floor(Math.log(ee/Ct)/Math.LN10)),fe=Ct/ee*ae;return fe<=.15?ae*=10:fe<=.35?ae*=5:fe<=.75&&(ae*=2),Bt[0]=Math.ceil(Bt[0]/ae)*ae,Bt[1]=Math.floor(Bt[1]/ae)*ae+ae*.5,Bt[2]=ae,Bt}function Xo(ft,Ct){return i.range.apply(i,vo(ft,Ct))}i.scale.log=function(){return Ds(i.scale.linear().domain([0,1]),10,!0,[1,10])};function Ds(ft,Ct,Bt,ee){function ae(Ee){return(Bt?Math.log(Ee<0?0:Ee):-Math.log(Ee>0?0:-Ee))/Math.log(Ct)}function fe(Ee){return Bt?Math.pow(Ct,Ee):-Math.pow(Ct,-Ee)}function De(Ee){return ft(ae(Ee))}return De.invert=function(Ee){return fe(ft.invert(Ee))},De.domain=function(Ee){return arguments.length?(Bt=Ee[0]>=0,ft.domain((ee=Ee.map(Number)).map(ae)),De):ee},De.base=function(Ee){return arguments.length?(Ct=+Ee,ft.domain(ee.map(ae)),De):Ct},De.nice=function(){var Ee=Hl(ee.map(ae),Bt?Math:wl);return ft.domain(Ee),ee=Ee.map(fe),De},De.ticks=function(){var Ee=Co(ee),Ye=[],Ze=Ee[0],nr=Ee[1],_r=Math.floor(ae(Ze)),Lr=Math.ceil(ae(nr)),Jr=Ct%1?2:Ct;if(isFinite(Lr-_r)){if(Bt){for(;_r0;on--)Ye.push(fe(_r)*on);for(_r=0;Ye[_r]nr;Lr--);Ye=Ye.slice(_r,Lr)}return Ye},De.copy=function(){return Ds(ft.copy(),Ct,Bt,ee)},Qu(De,ft)}var wl={floor:function(ft){return-Math.ceil(-ft)},ceil:function(ft){return-Math.floor(-ft)}};i.scale.pow=function(){return Au(i.scale.linear(),1,[0,1])};function Au(ft,Ct,Bt){var ee=Js(Ct),ae=Js(1/Ct);function fe(De){return ft(ee(De))}return fe.invert=function(De){return ae(ft.invert(De))},fe.domain=function(De){return arguments.length?(ft.domain((Bt=De.map(Number)).map(ee)),fe):Bt},fe.ticks=function(De){return Xo(Bt,De)},fe.tickFormat=function(De,Ee){return d3_scale_linearTickFormat(Bt,De,Ee)},fe.nice=function(De){return fe.domain(kf(Bt,De))},fe.exponent=function(De){return arguments.length?(ee=Js(Ct=De),ae=Js(1/Ct),ft.domain(Bt.map(ee)),fe):Ct},fe.copy=function(){return Au(ft.copy(),Ct,Bt)},Qu(fe,ft)}function Js(ft){return function(Ct){return Ct<0?-Math.pow(-Ct,ft):Math.pow(Ct,ft)}}i.scale.sqrt=function(){return i.scale.pow().exponent(.5)},i.scale.ordinal=function(){return Qs([],{t:"range",a:[[]]})};function Qs(ft,Ct){var Bt,ee,ae;function fe(Ee){return ee[((Bt.get(Ee)||(Ct.t==="range"?Bt.set(Ee,ft.push(Ee)):NaN))-1)%ee.length]}function De(Ee,Ye){return i.range(ft.length).map(function(Ze){return Ee+Ye*Ze})}return fe.domain=function(Ee){if(!arguments.length)return ft;ft=[],Bt=new _;for(var Ye=-1,Ze=Ee.length,nr;++Ye0?Bt[fe-1]:ft[0],feLr?0:1;if(nr=jt)return Ye(nr,on)+(Ze?Ye(Ze,1-on):"")+"Z";var Rr,Br,jr,un,vn=0,qr=0,Hn,qn,ui,Qn,ii,fi,Oi,Mi,Ii=[];if((un=(+De.apply(this,arguments)||0)/2)&&(jr=ee===Mu?Math.sqrt(Ze*Ze+nr*nr):+ee.apply(this,arguments),on||(qr*=-1),nr&&(qr=Le(jr/nr*Math.sin(un))),Ze&&(vn=Le(jr/Ze*Math.sin(un)))),nr){Hn=nr*Math.cos(_r+qr),qn=nr*Math.sin(_r+qr),ui=nr*Math.cos(Lr-qr),Qn=nr*Math.sin(Lr-qr);var ra=Math.abs(Lr-_r-2*qr)<=Mt?0:1;if(qr&&Wl(Hn,qn,ui,Qn)===on^ra){var ka=(_r+Lr)/2;Hn=nr*Math.cos(ka),qn=nr*Math.sin(ka),ui=Qn=null}}else Hn=qn=0;if(Ze){ii=Ze*Math.cos(Lr-vn),fi=Ze*Math.sin(Lr-vn),Oi=Ze*Math.cos(_r+vn),Mi=Ze*Math.sin(_r+vn);var la=Math.abs(_r-Lr+2*vn)<=Mt?0:1;if(vn&&Wl(ii,fi,Oi,Mi)===1-on^la){var Kn=(_r+Lr)/2;ii=Ze*Math.cos(Kn),fi=Ze*Math.sin(Kn),Oi=Mi=null}}else ii=fi=0;if(Jr>yt&&(Rr=Math.min(Math.abs(nr-Ze)/2,+Bt.apply(this,arguments)))>.001){Br=Ze0?0:1}function Yl(ft,Ct,Bt,ee,ae){var fe=ft[0]-Ct[0],De=ft[1]-Ct[1],Ee=(ae?ee:-ee)/Math.sqrt(fe*fe+De*De),Ye=Ee*De,Ze=-Ee*fe,nr=ft[0]+Ye,_r=ft[1]+Ze,Lr=Ct[0]+Ye,Jr=Ct[1]+Ze,on=(nr+Lr)/2,Rr=(_r+Jr)/2,Br=Lr-nr,jr=Jr-_r,un=Br*Br+jr*jr,vn=Bt-ee,qr=nr*Jr-Lr*_r,Hn=(jr<0?-1:1)*Math.sqrt(Math.max(0,vn*vn*un-qr*qr)),qn=(qr*jr-Br*Hn)/un,ui=(-qr*Br-jr*Hn)/un,Qn=(qr*jr+Br*Hn)/un,ii=(-qr*Br+jr*Hn)/un,fi=qn-on,Oi=ui-Rr,Mi=Qn-on,Ii=ii-Rr;return fi*fi+Oi*Oi>Mi*Mi+Ii*Ii&&(qn=Qn,ui=ii),[[qn-Ye,ui-Ze],[qn*Bt/vn,ui*Bt/vn]]}function Fs(){return!0}function Xl(ft){var Ct=di,Bt=li,ee=Fs,ae=Ha,fe=ae.key,De=.7;function Ee(Ye){var Ze=[],nr=[],_r=-1,Lr=Ye.length,Jr,on=rn(Ct),Rr=rn(Bt);function Br(){Ze.push("M",ae(ft(nr),De))}for(;++_r1?ft.join("L"):ft+"Z"}function ns(ft){return ft.join("L")+"Z"}function qu(ft){for(var Ct=0,Bt=ft.length,ee=ft[0],ae=[ee[0],",",ee[1]];++Ct1&&ae.push("H",ee[0]),ae.join("")}function $s(ft){for(var Ct=0,Bt=ft.length,ee=ft[0],ae=[ee[0],",",ee[1]];++Ct1){Ee=Ct[1],fe=ft[Ye],Ye++,ee+="C"+(ae[0]+De[0])+","+(ae[1]+De[1])+","+(fe[0]-Ee[0])+","+(fe[1]-Ee[1])+","+fe[0]+","+fe[1];for(var Ze=2;Ze9&&(fe=Bt*3/Math.sqrt(fe),De[Ee]=fe*ee,De[Ee+1]=fe*ae));for(Ee=-1;++Ee<=Ye;)fe=(ft[Math.min(Ye,Ee+1)][0]-ft[Math.max(0,Ee-1)][0])/(6*(1+De[Ee]*De[Ee])),Ct.push([fe||0,De[Ee]*fe||0]);return Ct}function Cu(ft){return ft.length<3?Ha(ft):ft[0]+lo(ft,Ql(ft))}i.svg.line.radial=function(){var ft=Xl(Hf);return ft.radius=ft.x,delete ft.x,ft.angle=ft.y,delete ft.y,ft};function Hf(ft){for(var Ct,Bt=-1,ee=ft.length,ae,fe;++BtMt)+",1 "+_r}function Ze(nr,_r,Lr,Jr){return"Q 0,0 "+Jr}return fe.radius=function(nr){return arguments.length?(Bt=rn(nr),fe):Bt},fe.source=function(nr){return arguments.length?(ft=rn(nr),fe):ft},fe.target=function(nr){return arguments.length?(Ct=rn(nr),fe):Ct},fe.startAngle=function(nr){return arguments.length?(ee=rn(nr),fe):ee},fe.endAngle=function(nr){return arguments.length?(ae=rn(nr),fe):ae},fe};function rf(ft){return ft.radius}i.svg.diagonal=function(){var ft=ef,Ct=qs,Bt=ql;function ee(ae,fe){var De=ft.call(this,ae,fe),Ee=Ct.call(this,ae,fe),Ye=(De.y+Ee.y)/2,Ze=[De,{x:De.x,y:Ye},{x:Ee.x,y:Ye},Ee];return Ze=Ze.map(Bt),"M"+Ze[0]+"C"+Ze[1]+" "+Ze[2]+" "+Ze[3]}return ee.source=function(ae){return arguments.length?(ft=rn(ae),ee):ft},ee.target=function(ae){return arguments.length?(Ct=rn(ae),ee):Ct},ee.projection=function(ae){return arguments.length?(Bt=ae,ee):Bt},ee};function ql(ft){return[ft.x,ft.y]}i.svg.diagonal.radial=function(){var ft=i.svg.diagonal(),Ct=ql,Bt=ft.projection;return ft.projection=function(ee){return arguments.length?Bt(Vf(Ct=ee)):Ct},ft};function Vf(ft){return function(){var Ct=ft.apply(this,arguments),Bt=Ct[0],ee=Ct[1]-ie;return[Bt*Math.cos(ee),Bt*Math.sin(ee)]}}i.svg.symbol=function(){var ft=oe,Ct=qt;function Bt(ee,ae){return(Me.get(ft.call(this,ee,ae))||we)(Ct.call(this,ee,ae))}return Bt.type=function(ee){return arguments.length?(ft=rn(ee),Bt):ft},Bt.size=function(ee){return arguments.length?(Ct=rn(ee),Bt):Ct},Bt};function qt(){return 64}function oe(){return"circle"}function we(ft){var Ct=Math.sqrt(ft/Mt);return"M0,"+Ct+"A"+Ct+","+Ct+" 0 1,1 0,"+-Ct+"A"+Ct+","+Ct+" 0 1,1 0,"+Ct+"Z"}var Me=i.map({circle:we,cross:function(ft){var Ct=Math.sqrt(ft/5)/2;return"M"+-3*Ct+","+-Ct+"H"+-Ct+"V"+-3*Ct+"H"+Ct+"V"+-Ct+"H"+3*Ct+"V"+Ct+"H"+Ct+"V"+3*Ct+"H"+-Ct+"V"+Ct+"H"+-3*Ct+"Z"},diamond:function(ft){var Ct=Math.sqrt(ft/(2*ze)),Bt=Ct*ze;return"M0,"+-Ct+"L"+Bt+",0 0,"+Ct+" "+-Bt+",0Z"},square:function(ft){var Ct=Math.sqrt(ft)/2;return"M"+-Ct+","+-Ct+"L"+Ct+","+-Ct+" "+Ct+","+Ct+" "+-Ct+","+Ct+"Z"},"triangle-down":function(ft){var Ct=Math.sqrt(ft/Ue),Bt=Ct*Ue/2;return"M0,"+Bt+"L"+Ct+","+-Bt+" "+-Ct+","+-Bt+"Z"},"triangle-up":function(ft){var Ct=Math.sqrt(ft/Ue),Bt=Ct*Ue/2;return"M0,"+-Bt+"L"+Ct+","+Bt+" "+-Ct+","+Bt+"Z"}});i.svg.symbolTypes=Me.keys();var Ue=Math.sqrt(3),ze=Math.tan(30*me);Z.transition=function(ft){for(var Ct=Ir||++Mr,Bt=Rn(ft),ee=[],ae,fe,De=Nr||{time:Date.now(),ease:Vu,delay:0,duration:250},Ee=-1,Ye=this.length;++Ee0;)_r[--un].call(ft,jr);if(Br>=1)return De.event&&De.event.end.call(ft,ft.__data__,Ct),--fe.count?delete fe[ee]:delete ft[Bt],1}De||(Ee=ae.time,Ye=_n(Lr,0,Ee),De=fe[ee]={tween:new _,time:Ee,timer:Ye,delay:ae.delay,duration:ae.duration,ease:ae.ease,index:Ct},ae=null,++fe.count)}i.svg.axis=function(){var ft=i.scale.linear(),Ct=Zn,Bt=6,ee=6,ae=3,fe=[10],De=null,Ee;function Ye(Ze){Ze.each(function(){var nr=i.select(this),_r=this.__chart__||ft,Lr=this.__chart__=ft.copy(),Jr=De??(Lr.ticks?Lr.ticks.apply(Lr,fe):Lr.domain()),on=Ee??(Lr.tickFormat?Lr.tickFormat.apply(Lr,fe):k),Rr=nr.selectAll(".tick").data(Jr,Lr),Br=Rr.enter().insert("g",".domain").attr("class","tick").style("opacity",yt),jr=i.transition(Rr.exit()).style("opacity",yt).remove(),un=i.transition(Rr.order()).style("opacity",1),vn=Math.max(Bt,0)+ae,qr,Hn=bl(Lr),qn=nr.selectAll(".domain").data([0]),ui=(qn.enter().append("path").attr("class","domain"),i.transition(qn));Br.append("line"),Br.append("text");var Qn=Br.select("line"),ii=un.select("line"),fi=Rr.select("text").text(on),Oi=Br.select("text"),Mi=un.select("text"),Ii=Ct==="top"||Ct==="left"?-1:1,ra,ka,la,Kn;if(Ct==="bottom"||Ct==="top"?(qr=Pi,ra="x",la="y",ka="x2",Kn="y2",fi.attr("dy",Ii<0?"0em":".71em").style("text-anchor","middle"),ui.attr("d","M"+Hn[0]+","+Ii*ee+"V0H"+Hn[1]+"V"+Ii*ee)):(qr=Ri,ra="y",la="x",ka="y2",Kn="x2",fi.attr("dy",".32em").style("text-anchor",Ii<0?"end":"start"),ui.attr("d","M"+Ii*ee+","+Hn[0]+"H0V"+Hn[1]+"H"+Ii*ee)),Qn.attr(Kn,Ii*Bt),Oi.attr(la,Ii*vn),ii.attr(ka,0).attr(Kn,Ii*Bt),Mi.attr(ra,0).attr(la,Ii*vn),Lr.rangeBand){var Bi=Lr,Ti=Bi.rangeBand()/2;_r=Lr=function(Zi){return Bi(Zi)+Ti}}else _r.rangeBand?_r=Lr:jr.call(qr,Lr,_r);Br.call(qr,_r,Lr),un.call(qr,Lr,Lr)})}return Ye.scale=function(Ze){return arguments.length?(ft=Ze,Ye):ft},Ye.orient=function(Ze){return arguments.length?(Ct=Ze in Li?Ze+"":Zn,Ye):Ct},Ye.ticks=function(){return arguments.length?(fe=x(arguments),Ye):fe},Ye.tickValues=function(Ze){return arguments.length?(De=Ze,Ye):De},Ye.tickFormat=function(Ze){return arguments.length?(Ee=Ze,Ye):Ee},Ye.tickSize=function(Ze){var nr=arguments.length;return nr?(Bt=+Ze,ee=+arguments[nr-1],Ye):Bt},Ye.innerTickSize=function(Ze){return arguments.length?(Bt=+Ze,Ye):Bt},Ye.outerTickSize=function(Ze){return arguments.length?(ee=+Ze,Ye):ee},Ye.tickPadding=function(Ze){return arguments.length?(ae=+Ze,Ye):ae},Ye.tickSubdivide=function(){return arguments.length&&Ye},Ye};var Zn="bottom",Li={top:1,right:1,bottom:1,left:1};function Pi(ft,Ct,Bt){ft.attr("transform",function(ee){var ae=Ct(ee);return"translate("+(isFinite(ae)?ae:Bt(ee))+",0)"})}function Ri(ft,Ct,Bt){ft.attr("transform",function(ee){var ae=Ct(ee);return"translate(0,"+(isFinite(ae)?ae:Bt(ee))+")"})}i.svg.brush=function(){var ft=J(nr,"brushstart","brush","brushend"),Ct=null,Bt=null,ee=[0,0],ae=[0,0],fe,De,Ee=!0,Ye=!0,Ze=Xi[0];function nr(Rr){Rr.each(function(){var Br=i.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",on).on("touchstart.brush",on),jr=Br.selectAll(".background").data([0]);jr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Br.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var un=Br.selectAll(".resize").data(Ze,k);un.exit().remove(),un.enter().append("g").attr("class",function(qn){return"resize "+qn}).style("cursor",function(qn){return zi[qn]}).append("rect").attr("x",function(qn){return/[ew]$/.test(qn)?-3:null}).attr("y",function(qn){return/^[ns]/.test(qn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),un.style("display",nr.empty()?"none":null);var vn=i.transition(Br),qr=i.transition(jr),Hn;Ct&&(Hn=bl(Ct),qr.attr("x",Hn[0]).attr("width",Hn[1]-Hn[0]),Lr(vn)),Bt&&(Hn=bl(Bt),qr.attr("y",Hn[0]).attr("height",Hn[1]-Hn[0]),Jr(vn)),_r(vn)})}nr.event=function(Rr){Rr.each(function(){var Br=ft.of(this,arguments),jr={x:ee,y:ae,i:fe,j:De},un=this.__chart__||jr;this.__chart__=jr,Ir?i.select(this).transition().each("start.brush",function(){fe=un.i,De=un.j,ee=un.x,ae=un.y,Br({type:"brushstart"})}).tween("brush:brush",function(){var vn=_o(ee,jr.x),qr=_o(ae,jr.y);return fe=De=null,function(Hn){ee=jr.x=vn(Hn),ae=jr.y=qr(Hn),Br({type:"brush",mode:"resize"})}}).each("end.brush",function(){fe=jr.i,De=jr.j,Br({type:"brush",mode:"resize"}),Br({type:"brushend"})}):(Br({type:"brushstart"}),Br({type:"brush",mode:"resize"}),Br({type:"brushend"}))})};function _r(Rr){Rr.selectAll(".resize").attr("transform",function(Br){return"translate("+ee[+/e$/.test(Br)]+","+ae[+/^s/.test(Br)]+")"})}function Lr(Rr){Rr.select(".extent").attr("x",ee[0]),Rr.selectAll(".extent,.n>rect,.s>rect").attr("width",ee[1]-ee[0])}function Jr(Rr){Rr.select(".extent").attr("y",ae[0]),Rr.selectAll(".extent,.e>rect,.w>rect").attr("height",ae[1]-ae[0])}function on(){var Rr=this,Br=i.select(i.event.target),jr=ft.of(Rr,arguments),un=i.select(Rr),vn=Br.datum(),qr=!/^(n|s)$/.test(vn)&&Ct,Hn=!/^(e|w)$/.test(vn)&&Bt,qn=Br.classed("extent"),ui=Jt(Rr),Qn,ii=i.mouse(Rr),fi,Oi=i.select(r(Rr)).on("keydown.brush",ra).on("keyup.brush",ka);if(i.event.changedTouches?Oi.on("touchmove.brush",la).on("touchend.brush",Bi):Oi.on("mousemove.brush",la).on("mouseup.brush",Bi),un.interrupt().selectAll("*").interrupt(),qn)ii[0]=ee[0]-ii[0],ii[1]=ae[0]-ii[1];else if(vn){var Mi=+/w$/.test(vn),Ii=+/^n/.test(vn);fi=[ee[1-Mi]-ii[0],ae[1-Ii]-ii[1]],ii[0]=ee[Mi],ii[1]=ae[Ii]}else i.event.altKey&&(Qn=ii.slice());un.style("pointer-events","none").selectAll(".resize").style("display",null),i.select("body").style("cursor",Br.style("cursor")),jr({type:"brushstart"}),la();function ra(){i.event.keyCode==32&&(qn||(Qn=null,ii[0]-=ee[1],ii[1]-=ae[1],qn=2),it())}function ka(){i.event.keyCode==32&&qn==2&&(ii[0]+=ee[1],ii[1]+=ae[1],qn=0,it())}function la(){var Ti=i.mouse(Rr),Zi=!1;fi&&(Ti[0]+=fi[0],Ti[1]+=fi[1]),qn||(i.event.altKey?(Qn||(Qn=[(ee[0]+ee[1])/2,(ae[0]+ae[1])/2]),ii[0]=ee[+(Ti[0]"u"&&(R=1e-6);var W,at,vt,St,Pt;for(vt=P,Pt=0;Pt<8;Pt++){if(St=this.sampleCurveX(vt)-P,Math.abs(St)at)return at;for(;WSt?W=vt:at=vt,vt=(at-W)*.5+W}return vt},p.prototype.solve=function(P,R){return this.sampleCurveY(this.solveCurveX(P,R))};var r=e;function e(P,R){this.x=P,this.y=R}e.prototype={clone:function(){return new e(this.x,this.y)},add:function(P){return this.clone()._add(P)},sub:function(P){return this.clone()._sub(P)},multByPoint:function(P){return this.clone()._multByPoint(P)},divByPoint:function(P){return this.clone()._divByPoint(P)},mult:function(P){return this.clone()._mult(P)},div:function(P){return this.clone()._div(P)},rotate:function(P){return this.clone()._rotate(P)},rotateAround:function(P,R){return this.clone()._rotateAround(P,R)},matMult:function(P){return this.clone()._matMult(P)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(P){return this.x===P.x&&this.y===P.y},dist:function(P){return Math.sqrt(this.distSqr(P))},distSqr:function(P){var R=P.x-this.x,W=P.y-this.y;return R*R+W*W},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(P){return Math.atan2(this.y-P.y,this.x-P.x)},angleWith:function(P){return this.angleWithSep(P.x,P.y)},angleWithSep:function(P,R){return Math.atan2(this.x*R-this.y*P,this.x*P+this.y*R)},_matMult:function(P){var R=P[0]*this.x+P[1]*this.y,W=P[2]*this.x+P[3]*this.y;return this.x=R,this.y=W,this},_add:function(P){return this.x+=P.x,this.y+=P.y,this},_sub:function(P){return this.x-=P.x,this.y-=P.y,this},_mult:function(P){return this.x*=P,this.y*=P,this},_div:function(P){return this.x/=P,this.y/=P,this},_multByPoint:function(P){return this.x*=P.x,this.y*=P.y,this},_divByPoint:function(P){return this.x/=P.x,this.y/=P.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var P=this.y;return this.y=this.x,this.x=-P,this},_rotate:function(P){var R=Math.cos(P),W=Math.sin(P),at=R*this.x-W*this.y,vt=W*this.x+R*this.y;return this.x=at,this.y=vt,this},_rotateAround:function(P,R){var W=Math.cos(P),at=Math.sin(P),vt=R.x+W*(this.x-R.x)-at*(this.y-R.y),St=R.y+at*(this.x-R.x)+W*(this.y-R.y);return this.x=vt,this.y=St,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},e.convert=function(P){return P instanceof e?P:Array.isArray(P)?new e(P[0],P[1]):P};var a=typeof self<"u"?self:{};function n(P,R){if(Array.isArray(P)){if(!Array.isArray(R)||P.length!==R.length)return!1;for(var W=0;W=1)return 1;var R=P*P,W=R*P;return 4*(P<.5?W:3*(P-R)+W-.75)}function l(P,R,W,at){var vt=new v(P,R,W,at);return function(St){return vt.solve(St)}}var m=l(.25,.1,.25,1);function h(P,R,W){return Math.min(W,Math.max(R,P))}function b(P,R,W){var at=W-R,vt=((P-R)%at+at)%at+R;return vt===R?W:vt}function u(P,R,W){if(!P.length)return W(null,[]);var at=P.length,vt=new Array(P.length),St=null;P.forEach(function(Pt,te){R(Pt,function(ye,_e){ye&&(St=ye),vt[te]=_e,--at===0&&W(St,vt)})})}function o(P){var R=[];for(var W in P)R.push(P[W]);return R}function d(P,R){var W=[];for(var at in P)at in R||W.push(at);return W}function w(P){for(var R=[],W=arguments.length-1;W-- >0;)R[W]=arguments[W+1];for(var at=0,vt=R;at>R/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,P)}return P()}function T(P){return P<=1?1:Math.pow(2,Math.ceil(Math.log(P)/Math.LN2))}function s(P){return P?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(P):!1}function L(P,R){P.forEach(function(W){R[W]&&(R[W]=R[W].bind(R))})}function M(P,R){return P.indexOf(R,P.length-R.length)!==-1}function z(P,R,W){var at={};for(var vt in P)at[vt]=R.call(W||this,P[vt],vt,P);return at}function D(P,R,W){var at={};for(var vt in P)R.call(W||this,P[vt],vt,P)&&(at[vt]=P[vt]);return at}function N(P){return Array.isArray(P)?P.map(N):typeof P=="object"&&P?z(P,N):P}function I(P,R){for(var W=0;W=0)return!0;return!1}var k={};function B(P){k[P]||(typeof console<"u"&&console.warn(P),k[P]=!0)}function O(P,R,W){return(W.y-P.y)*(R.x-P.x)>(R.y-P.y)*(W.x-P.x)}function H(P){for(var R=0,W=0,at=P.length,vt=at-1,St=void 0,Pt=void 0;W@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,W={};if(P.replace(R,function(vt,St,Pt,te){var ye=Pt||te;return W[St]=ye?ye.toLowerCase():!0,""}),W["max-age"]){var at=parseInt(W["max-age"],10);isNaN(at)?delete W["max-age"]:W["max-age"]=at}return W}var it=null;function ut(P){if(it==null){var R=P.navigator?P.navigator.userAgent:null;it=!!P.safari||!!(R&&(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return it}function J(P){try{var R=a[P];return R.setItem("_mapbox_test_",1),R.removeItem("_mapbox_test_"),!0}catch{return!1}}function X(P){return a.btoa(encodeURIComponent(P).replace(/%([0-9A-F]{2})/g,function(R,W){return String.fromCharCode(+("0x"+W))}))}function tt(P){return decodeURIComponent(a.atob(P).split("").map(function(R){return"%"+("00"+R.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var V=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now.bind(Date),Q=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,ot=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,$,Z,st={now:V,frame:function(R){var W=Q(R);return{cancel:function(){return ot(W)}}},getImageData:function(R,W){W===void 0&&(W=0);var at=a.document.createElement("canvas"),vt=at.getContext("2d");if(!vt)throw new Error("failed to create canvas 2d context");return at.width=R.width,at.height=R.height,vt.drawImage(R,0,0,R.width,R.height),vt.getImageData(-W,-W,R.width+2*W,R.height+2*W)},resolveURL:function(R){return $||($=a.document.createElement("a")),$.href=R,$.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return a.matchMedia?(Z==null&&(Z=a.matchMedia("(prefers-reduced-motion: reduce)")),Z.matches):!1}},nt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},ct={supported:!1,testSupport:bt},gt,Tt=!1,wt,Rt=!1;a.document&&(wt=a.document.createElement("img"),wt.onload=function(){gt&&At(gt),gt=null,Rt=!0},wt.onerror=function(){Tt=!0,gt=null},wt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function bt(P){Tt||!wt||(Rt?At(P):gt=P)}function At(P){var R=P.createTexture();P.bindTexture(P.TEXTURE_2D,R);try{if(P.texImage2D(P.TEXTURE_2D,0,P.RGBA,P.RGBA,P.UNSIGNED_BYTE,wt),P.isContextLost())return;ct.supported=!0}catch{}P.deleteTexture(R),Tt=!0}var mt="01";function Lt(){for(var P="1",R="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",W="",at=0;at<10;at++)W+=R[Math.floor(Math.random()*62)];var vt=12*60*60*1e3,St=[P,mt,W].join(""),Pt=Date.now()+vt;return{token:St,tokenExpiresAt:Pt}}var Ht=function(R,W){this._transformRequestFn=R,this._customAccessToken=W,this._createSkuToken()};Ht.prototype._createSkuToken=function(){var R=Lt();this._skuToken=R.token,this._skuTokenExpiresAt=R.tokenExpiresAt},Ht.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ht.prototype.transformRequest=function(R,W){return this._transformRequestFn?this._transformRequestFn(R,W)||{url:R}:{url:R}},Ht.prototype.normalizeStyleURL=function(R,W){if(!Ut(R))return R;var at=$t(R);return at.path="/styles/v1"+at.path,this._makeAPIURL(at,this._customAccessToken||W)},Ht.prototype.normalizeGlyphsURL=function(R,W){if(!Ut(R))return R;var at=$t(R);return at.path="/fonts/v1"+at.path,this._makeAPIURL(at,this._customAccessToken||W)},Ht.prototype.normalizeSourceURL=function(R,W){if(!Ut(R))return R;var at=$t(R);return at.path="/v4/"+at.authority+".json",at.params.push("secure"),this._makeAPIURL(at,this._customAccessToken||W)},Ht.prototype.normalizeSpriteURL=function(R,W,at,vt){var St=$t(R);return Ut(R)?(St.path="/styles/v1"+St.path+"/sprite"+W+at,this._makeAPIURL(St,this._customAccessToken||vt)):(St.path+=""+W+at,le(St))},Ht.prototype.normalizeTileURL=function(R,W){if(this._isSkuTokenExpired()&&this._createSkuToken(),R&&!Ut(R))return R;var at=$t(R),vt=/(\.(png|jpg)\d*)(?=$)/,St=/^.+\/v4\//,Pt=st.devicePixelRatio>=2||W===512?"@2x":"",te=ct.supported?".webp":"$1";at.path=at.path.replace(vt,""+Pt+te),at.path=at.path.replace(St,"/"),at.path="/v4"+at.path;var ye=this._customAccessToken||re(at.params)||nt.ACCESS_TOKEN;return nt.REQUIRE_ACCESS_TOKEN&&ye&&this._skuToken&&at.params.push("sku="+this._skuToken),this._makeAPIURL(at,ye)},Ht.prototype.canonicalizeTileURL=function(R,W){var at="/v4/",vt=/\.[\w]+$/,St=$t(R);if(!St.path.match(/(^\/v4\/)/)||!St.path.match(vt))return R;var Pt="mapbox://tiles/";Pt+=St.path.replace(at,"");var te=St.params;return W&&(te=te.filter(function(ye){return!ye.match(/^access_token=/)})),te.length&&(Pt+="?"+te.join("&")),Pt},Ht.prototype.canonicalizeTileset=function(R,W){for(var at=W?Ut(W):!1,vt=[],St=0,Pt=R.tiles||[];St=0&&R.params.splice(St,1)}if(vt.path!=="/"&&(R.path=""+vt.path+R.path),!nt.REQUIRE_ACCESS_TOKEN)return le(R);if(W=W||nt.ACCESS_TOKEN,!W)throw new Error("An API access token is required to use Mapbox GL. "+at);if(W[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+at);return R.params=R.params.filter(function(Pt){return Pt.indexOf("access_token")===-1}),R.params.push("access_token="+W),le(R)};function Ut(P){return P.indexOf("mapbox:")===0}var kt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Vt(P){return kt.test(P)}function It(P){return P.indexOf("sku=")>0&&Vt(P)}function re(P){for(var R=0,W=P;R=1&&a.localStorage.setItem(W,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},xe.prototype.processRequests=function(R){},xe.prototype.postEvent=function(R,W,at,vt){var St=this;if(nt.EVENTS_URL){var Pt=$t(nt.EVENTS_URL);Pt.params.push("access_token="+(vt||nt.ACCESS_TOKEN||""));var te={event:this.type,created:new Date(R).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:x,skuId:mt,userId:this.anonId},ye=W?w(te,W):te,_e={url:le(Pt),headers:{"Content-Type":"text/plain"},body:JSON.stringify([ye])};this.pendingRequest=Ve(_e,function(Fe){St.pendingRequest=null,at(Fe),St.saveEventData(),St.processRequests(vt)})}},xe.prototype.queueRequest=function(R,W){this.queue.push(R),this.processRequests(W)};var Se=function(P){function R(){P.call(this,"map.load"),this.success={},this.skuToken=""}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.postMapLoadEvent=function(at,vt,St,Pt){this.skuToken=St,(nt.EVENTS_URL&&Pt||nt.ACCESS_TOKEN&&Array.isArray(at)&&at.some(function(te){return Ut(te)||Vt(te)}))&&this.queueRequest({id:vt,timestamp:Date.now()},Pt)},R.prototype.processRequests=function(at){var vt=this;if(!(this.pendingRequest||this.queue.length===0)){var St=this.queue.shift(),Pt=St.id,te=St.timestamp;Pt&&this.success[Pt]||(this.anonId||this.fetchEventData(),s(this.anonId)||(this.anonId=E()),this.postEvent(te,{skuToken:this.skuToken},function(ye){ye||Pt&&(vt.success[Pt]=!0)},at))}},R}(xe),ne=function(P){function R(W){P.call(this,"appUserTurnstile"),this._customAccessToken=W}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.postTurnstileEvent=function(at,vt){nt.EVENTS_URL&&nt.ACCESS_TOKEN&&Array.isArray(at)&&at.some(function(St){return Ut(St)||Vt(St)})&&this.queueRequest(Date.now(),vt)},R.prototype.processRequests=function(at){var vt=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var St=de(nt.ACCESS_TOKEN),Pt=St?St.u:nt.ACCESS_TOKEN,te=Pt!==this.eventData.tokenU;s(this.anonId)||(this.anonId=E(),te=!0);var ye=this.queue.shift();if(this.eventData.lastSuccess){var _e=new Date(this.eventData.lastSuccess),Fe=new Date(ye),je=(ye-this.eventData.lastSuccess)/(24*60*60*1e3);te=te||je>=1||je<-1||_e.getDate()!==Fe.getDate()}else te=!0;if(!te)return this.processRequests();this.postEvent(ye,{"enabled.telemetry":!1},function(ar){ar||(vt.eventData.lastSuccess=ye,vt.eventData.tokenU=Pt)},at)}},R}(xe),zt=new ne,Xt=zt.postTurnstileEvent.bind(zt),Jt=new Se,Wt=Jt.postMapLoadEvent.bind(Jt),Ft="mapbox-tiles",xt=500,yt=50,Et=1e3*60*7,Mt;function Nt(){a.caches&&!Mt&&(Mt=a.caches.open(Ft))}var jt;function ie(P,R){if(jt===void 0)try{new Response(new ReadableStream),jt=!0}catch{jt=!1}jt?R(P.body):P.blob().then(R)}function me(P,R,W){if(Nt(),!!Mt){var at={status:R.status,statusText:R.statusText,headers:new a.Headers};R.headers.forEach(function(Pt,te){return at.headers.set(te,Pt)});var vt=et(R.headers.get("Cache-Control")||"");if(!vt["no-store"]){vt["max-age"]&&at.headers.set("Expires",new Date(W+vt["max-age"]*1e3).toUTCString());var St=new Date(at.headers.get("Expires")).getTime()-W;StDate.now()&&!W["no-cache"]}var ce=1/0;function Te(P){ce++,ce>yt&&(P.getActor().send("enforceCacheSizeLimit",xt),ce=0)}function Be(P){Nt(),Mt&&Mt.then(function(R){R.keys().then(function(W){for(var at=0;at=200&&W.status<300||W.status===0)&&W.response!==null){var vt=W.response;if(P.type==="json")try{vt=JSON.parse(W.response)}catch(St){return R(St)}R(null,vt,W.getResponseHeader("Cache-Control"),W.getResponseHeader("Expires"))}else R(new $e(W.statusText,W.status,P.url))},W.send(P.body),{cancel:function(){return W.abort()}}}var Ie=function(P,R){if(!se(P.url)){if(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return Ae(P,R);if(j()&&self.worker&&self.worker.actor){var W=!0;return self.worker.actor.send("getResource",P,R,void 0,W)}}return Ce(P,R)},Pe=function(P,R){return Ie(w(P,{type:"json"}),R)},ke=function(P,R){return Ie(w(P,{type:"arrayBuffer"}),R)},Ve=function(P,R){return Ie(w(P,{method:"POST"}),R)};function Je(P){var R=a.document.createElement("a");return R.href=P,R.protocol===a.document.location.protocol&&R.host===a.document.location.host}var ur="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function hr(P,R,W,at){var vt=new a.Image,St=a.URL;vt.onload=function(){R(null,vt),St.revokeObjectURL(vt.src),vt.onload=null,a.requestAnimationFrame(function(){vt.src=ur})},vt.onerror=function(){return R(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Pt=new a.Blob([new Uint8Array(P)],{type:"image/png"});vt.cacheControl=W,vt.expires=at,vt.src=P.byteLength?St.createObjectURL(Pt):ur}function vr(P,R){var W=new a.Blob([new Uint8Array(P)],{type:"image/png"});a.createImageBitmap(W).then(function(at){R(null,at)}).catch(function(at){R(new Error("Could not load image because of "+at.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Yt,Gt,Ne=function(){Yt=[],Gt=0};Ne();var Oe=function(P,R){if(ct.supported&&(P.headers||(P.headers={}),P.headers.accept="image/webp,*/*"),Gt>=nt.MAX_PARALLEL_IMAGE_REQUESTS){var W={requestParameters:P,callback:R,cancelled:!1,cancel:function(){this.cancelled=!0}};return Yt.push(W),W}Gt++;var at=!1,vt=function(){if(!at)for(at=!0,Gt--;Yt.length&&Gt0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)},dr.prototype.setEventedParent=function(R,W){return this._eventedParent=R,this._eventedParentData=W,this};var mr=8,xr={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},pr={"*":{type:"source"}},Gr=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Pr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Dr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},cn={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},rn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Cn={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},En={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Tr={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Cr=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Wr={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ur={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},an={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},pn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},gn={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_n={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ni={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ci={type:"array",value:"*"},di={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},li={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ri={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wr={type:"array",value:"*",minimum:1},nn={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},$r=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],dn={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Vn={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Tn={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},An={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Bn={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Jn={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},gi={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Di={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Sr={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},kr={"*":{type:"string"}},Ar={$version:mr,$root:xr,sources:pr,source:Gr,source_vector:Pr,source_raster:Dr,source_raster_dem:cn,source_geojson:rn,source_video:Cn,source_image:En,layer:Tr,layout:Cr,layout_background:Wr,layout_fill:Ur,layout_circle:an,layout_heatmap:pn,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:gn,layout_symbol:_n,layout_raster:kn,layout_hillshade:ni,filter:ci,filter_operator:di,geometry_type:li,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:ri,expression:wr,light:nn,paint:$r,paint_fill:dn,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Vn,paint_circle:Tn,paint_heatmap:An,paint_symbol:Bn,paint_raster:Jn,paint_hillshade:gi,paint_background:Di,transition:Sr,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:kr},Or=function(R,W,at,vt){this.message=(R?R+": ":"")+at,vt&&(this.identifier=vt),W!=null&&W.__line__&&(this.line=W.__line__)};function xn(P){var R=P.key,W=P.value;return W?[new Or(R,W,"constants have been deprecated as of v8")]:[]}function In(P){for(var R=[],W=arguments.length-1;W-- >0;)R[W]=arguments[W+1];for(var at=0,vt=R;at":P.itemType.kind==="value"?"array":"array<"+R+">"}else return P.kind}var Eo=[Hr,Qr,wn,Ln,Pn,pi,Un,pa(On),Ci];function xo(P,R){if(R.kind==="error")return null;if(P.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!xo(P.itemType,R.itemType))&&(typeof P.N!="number"||P.N===R.N))return null}else{if(P.kind===R.kind)return null;if(P.kind==="value")for(var W=0,at=Eo;W255?255:_e}function vt(_e){return _e<0?0:_e>1?1:_e}function St(_e){return _e[_e.length-1]==="%"?at(parseFloat(_e)/100*255):at(parseInt(_e))}function Pt(_e){return _e[_e.length-1]==="%"?vt(parseFloat(_e)/100):vt(parseFloat(_e))}function te(_e,Fe,je){return je<0?je+=1:je>1&&(je-=1),je*6<1?_e+(Fe-_e)*je*6:je*2<1?Fe:je*3<2?_e+(Fe-_e)*(2/3-je)*6:_e}function ye(_e){var Fe=_e.replace(/ /g,"").toLowerCase();if(Fe in W)return W[Fe].slice();if(Fe[0]==="#"){if(Fe.length===4){var je=parseInt(Fe.substr(1),16);return je>=0&&je<=4095?[(je&3840)>>4|(je&3840)>>8,je&240|(je&240)>>4,je&15|(je&15)<<4,1]:null}else if(Fe.length===7){var je=parseInt(Fe.substr(1),16);return je>=0&&je<=16777215?[(je&16711680)>>16,(je&65280)>>8,je&255,1]:null}return null}var ar=Fe.indexOf("("),tr=Fe.indexOf(")");if(ar!==-1&&tr+1===Fe.length){var yr=Fe.substr(0,ar),zr=Fe.substr(ar+1,tr-(ar+1)).split(","),ln=1;switch(yr){case"rgba":if(zr.length!==4)return null;ln=Pt(zr.pop());case"rgb":return zr.length!==3?null:[St(zr[0]),St(zr[1]),St(zr[2]),ln];case"hsla":if(zr.length!==4)return null;ln=Pt(zr.pop());case"hsl":if(zr.length!==3)return null;var tn=(parseFloat(zr[0])%360+360)%360/360,Sn=Pt(zr[1]),mn=Pt(zr[2]),Mn=mn<=.5?mn*(Sn+1):mn+Sn-mn*Sn,zn=mn*2-Mn;return[at(te(zn,Mn,tn+1/3)*255),at(te(zn,Mn,tn)*255),at(te(zn,Mn,tn-1/3)*255),ln];default:return null}}return null}try{R.parseCSSColor=ye}catch{}}),wf=Bu.parseCSSColor,$i=function(R,W,at,vt){vt===void 0&&(vt=1),this.r=R,this.g=W,this.b=at,this.a=vt};$i.parse=function(R){if(R){if(R instanceof $i)return R;if(typeof R=="string"){var W=wf(R);if(W)return new $i(W[0]/255*W[3],W[1]/255*W[3],W[2]/255*W[3],W[3])}}},$i.prototype.toString=function(){var R=this.toArray(),W=R[0],at=R[1],vt=R[2],St=R[3];return"rgba("+Math.round(W)+","+Math.round(at)+","+Math.round(vt)+","+St+")"},$i.prototype.toArray=function(){var R=this,W=R.r,at=R.g,vt=R.b,St=R.a;return St===0?[0,0,0,0]:[W*255/St,at*255/St,vt*255/St,St]},$i.black=new $i(0,0,0,1),$i.white=new $i(1,1,1,1),$i.transparent=new $i(0,0,0,0),$i.red=new $i(1,0,0,1);var Fl=function(R,W,at){R?this.sensitivity=W?"variant":"case":this.sensitivity=W?"accent":"base",this.locale=at,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Fl.prototype.compare=function(R,W){return this.collator.compare(R,W)},Fl.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Uu=function(R,W,at,vt,St){this.text=R,this.image=W,this.scale=at,this.fontStack=vt,this.textColor=St},Xa=function(R){this.sections=R};Xa.fromString=function(R){return new Xa([new Uu(R,null,null,null,null)])},Xa.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(R){return R.text.length!==0||R.image&&R.image.name.length!==0})},Xa.factory=function(R){return R instanceof Xa?R:Xa.fromString(R)},Xa.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(R){return R.text}).join("")},Xa.prototype.serialize=function(){for(var R=["format"],W=0,at=this.sections;W=0&&P<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof W=="number"&&W>=0&&W<=255)){var vt=typeof at=="number"?[P,R,W,at]:[P,R,W];return"Invalid rgba value ["+vt.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof at>"u"||typeof at=="number"&&at>=0&&at<=1?null:"Invalid rgba value ["+[P,R,W,at].join(", ")+"]: 'a' must be between 0 and 1."}function vu(P){if(P===null)return!0;if(typeof P=="string")return!0;if(typeof P=="boolean")return!0;if(typeof P=="number")return!0;if(P instanceof $i)return!0;if(P instanceof Fl)return!0;if(P instanceof Xa)return!0;if(P instanceof ho)return!0;if(Array.isArray(P)){for(var R=0,W=P;R2){var te=R[1];if(typeof te!="string"||!(te in fl)||te==="object")return W.error('The item type argument of "array" must be one of string, number, boolean',1);Pt=fl[te],at++}else Pt=On;var ye;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return W.error('The length argument to "array" must be a positive integer literal',2);ye=R[2],at++}vt=pa(Pt,ye)}else vt=fl[St];for(var _e=[];at1)&&W.push(vt)}}return W.concat(this.args.map(function(St){return St.serialize()}))};var qa=function(R){this.type=pi,this.sections=R};qa.parse=function(R,W){if(R.length<2)return W.error("Expected at least one argument.");var at=R[1];if(!Array.isArray(at)&&typeof at=="object")return W.error("First argument must be an image or text section.");for(var vt=[],St=!1,Pt=1;Pt<=R.length-1;++Pt){var te=R[Pt];if(St&&typeof te=="object"&&!Array.isArray(te)){St=!1;var ye=null;if(te["font-scale"]&&(ye=W.parse(te["font-scale"],1,Qr),!ye))return null;var _e=null;if(te["text-font"]&&(_e=W.parse(te["text-font"],1,pa(wn)),!_e))return null;var Fe=null;if(te["text-color"]&&(Fe=W.parse(te["text-color"],1,Pn),!Fe))return null;var je=vt[vt.length-1];je.scale=ye,je.font=_e,je.textColor=Fe}else{var ar=W.parse(R[Pt],1,On);if(!ar)return null;var tr=ar.type.kind;if(tr!=="string"&&tr!=="value"&&tr!=="null"&&tr!=="resolvedImage")return W.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");St=!0,vt.push({content:ar,scale:null,font:null,textColor:null})}}return new qa(vt)},qa.prototype.evaluate=function(R){var W=function(at){var vt=at.content.evaluate(R);return Ra(vt)===Ci?new Uu("",vt,null,null,null):new Uu(ul(vt),null,at.scale?at.scale.evaluate(R):null,at.font?at.font.evaluate(R).join(","):null,at.textColor?at.textColor.evaluate(R):null)};return new Xa(this.sections.map(W))},qa.prototype.eachChild=function(R){for(var W=0,at=this.sections;W-1),at},_o.prototype.eachChild=function(R){R(this.input)},_o.prototype.outputDefined=function(){return!1},_o.prototype.serialize=function(){return["image",this.input.serialize()]};var Tf={"to-boolean":Ln,"to-color":Pn,"to-number":Qr,"to-string":wn},bo=function(R,W){this.type=R,this.args=W};bo.parse=function(R,W){if(R.length<2)return W.error("Expected at least one argument.");var at=R[0];if((at==="to-boolean"||at==="to-string")&&R.length!==2)return W.error("Expected one argument.");for(var vt=Tf[at],St=[],Pt=1;Pt4?at="Invalid rbga value "+JSON.stringify(W)+": expected an array containing either three or four numeric values.":at=ll(W[0],W[1],W[2],W[3]),!at))return new $i(W[0]/255,W[1]/255,W[2]/255,W[3])}throw new Ua(at||"Could not parse color from value '"+(typeof W=="string"?W:String(JSON.stringify(W)))+"'")}else if(this.type.kind==="number"){for(var ye=null,_e=0,Fe=this.args;_e=R[2]||P[1]<=R[1]||P[3]>=R[3])}function bc(P,R){var W=Af(P[0]),at=xc(P[1]),vt=Math.pow(2,R.z);return[Math.round(W*vt*es),Math.round(at*vt*es)]}function wc(P,R,W){var at=P[0]-R[0],vt=P[1]-R[1],St=P[0]-W[0],Pt=P[1]-W[1];return at*Pt-St*vt===0&&at*St<=0&&vt*Pt<=0}function Tc(P,R,W){return R[1]>P[1]!=W[1]>P[1]&&P[0]<(W[0]-R[0])*(P[1]-R[1])/(W[1]-R[1])+R[0]}function Gu(P,R){for(var W=!1,at=0,vt=R.length;at0&&je<0||Fe<0&&je>0}function Sf(P,R,W,at){var vt=[R[0]-P[0],R[1]-P[1]],St=[at[0]-W[0],at[1]-W[1]];return Mc(St,vt)===0?!1:!!(Mf(P,R,W,at)&&Mf(W,at,P,R))}function Xs(P,R,W){for(var at=0,vt=W;atW[2]){var vt=at*.5,St=P[0]-W[0]>vt?-at:W[0]-P[0]>vt?at:0;St===0&&(St=P[0]-W[2]>vt?-at:W[2]-P[0]>vt?at:0),P[0]+=St}Vu(R,P)}function Sc(P){P[0]=P[1]=1/0,P[2]=P[3]=-1/0}function pu(P,R,W,at){for(var vt=Math.pow(2,at.z)*es,St=[at.x*es,at.y*es],Pt=[],te=0,ye=P;te=0)return!1;var W=!0;return P.eachChild(function(at){W&&!Ol(at,R)&&(W=!1)}),W}var Ls=function(R,W){this.type=W.type,this.name=R,this.boundExpression=W};Ls.parse=function(R,W){if(R.length!==2||typeof R[1]!="string")return W.error("'var' expression requires exactly one string literal argument.");var at=R[1];return W.scope.has(at)?new Ls(at,W.scope.get(at)):W.error('Unknown variable "'+at+'". Make sure "'+at+'" has been bound in an enclosing "let" expression before using it.',1)},Ls.prototype.evaluate=function(R){return this.boundExpression.evaluate(R)},Ls.prototype.eachChild=function(){},Ls.prototype.outputDefined=function(){return!1},Ls.prototype.serialize=function(){return["var",this.name]};var rs=function(R,W,at,vt,St){W===void 0&&(W=[]),vt===void 0&&(vt=new Zr),St===void 0&&(St=[]),this.registry=R,this.path=W,this.key=W.map(function(Pt){return"["+Pt+"]"}).join(""),this.scope=vt,this.errors=St,this.expectedType=at};rs.prototype.parse=function(R,W,at,vt,St){return St===void 0&&(St={}),W?this.concat(W,at,vt)._parse(R,St):this._parse(R,St)},rs.prototype._parse=function(R,W){(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number")&&(R=["literal",R]);function at(Fe,je,ar){return ar==="assert"?new $a(je,[Fe]):ar==="coerce"?new bo(je,[Fe]):Fe}if(Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var vt=R[0];if(typeof vt!="string")return this.error("Expression name must be a string, but found "+typeof vt+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var St=this.registry[vt];if(St){var Pt=St.parse(R,this);if(!Pt)return null;if(this.expectedType){var te=this.expectedType,ye=Pt.type;if((te.kind==="string"||te.kind==="number"||te.kind==="boolean"||te.kind==="object"||te.kind==="array")&&ye.kind==="value")Pt=at(Pt,te,W.typeAnnotation||"assert");else if((te.kind==="color"||te.kind==="formatted"||te.kind==="resolvedImage")&&(ye.kind==="value"||ye.kind==="string"))Pt=at(Pt,te,W.typeAnnotation||"coerce");else if(this.checkSubtype(te,ye))return null}if(!(Pt instanceof za)&&Pt.type.kind!=="resolvedImage"&&Wu(Pt)){var _e=new ts;try{Pt=new za(Pt.type,Pt.evaluate(_e))}catch(Fe){return this.error(Fe.message),null}}return Pt}return this.error('Unknown expression "'+vt+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof R>"u"?this.error("'undefined' value invalid. Use null instead."):typeof R=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof R+" instead.")},rs.prototype.concat=function(R,W,at){var vt=typeof R=="number"?this.path.concat(R):this.path,St=at?this.scope.concat(at):this.scope;return new rs(this.registry,vt,W||null,St,this.errors)},rs.prototype.error=function(R){for(var W=[],at=arguments.length-1;at-- >0;)W[at]=arguments[at+1];var vt=""+this.key+W.map(function(St){return"["+St+"]"}).join("");this.errors.push(new Er(vt,R))},rs.prototype.checkSubtype=function(R,W){var at=xo(R,W);return at&&this.error(at),at};function Wu(P){if(P instanceof Ls)return Wu(P.boundExpression);if(P instanceof Za&&P.name==="error")return!1;if(P instanceof Cs)return!1;if(P instanceof Uo)return!1;var R=P instanceof bo||P instanceof $a,W=!0;return P.eachChild(function(at){R?W=W&&Wu(at):W=W&&at instanceof za}),W?hl(P)&&Ol(P,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function vl(P,R){for(var W=P.length-1,at=0,vt=W,St=0,Pt,te;at<=vt;)if(St=Math.floor((at+vt)/2),Pt=P[St],te=P[St+1],Pt<=R){if(St===W||RR)vt=St-1;else throw new Ua("Input is not a number.");return 0}var Ho=function(R,W,at){this.type=R,this.input=W,this.labels=[],this.outputs=[];for(var vt=0,St=at;vt=te)return W.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',_e);var je=W.parse(ye,Fe,St);if(!je)return null;St=St||je.type,vt.push([te,je])}return new Ho(St,at,vt)},Ho.prototype.evaluate=function(R){var W=this.labels,at=this.outputs;if(W.length===1)return at[0].evaluate(R);var vt=this.input.evaluate(R);if(vt<=W[0])return at[0].evaluate(R);var St=W.length;if(vt>=W[St-1])return at[St-1].evaluate(R);var Pt=vl(W,vt);return at[Pt].evaluate(R)},Ho.prototype.eachChild=function(R){R(this.input);for(var W=0,at=this.outputs;W0&&R.push(this.labels[W]),R.push(this.outputs[W].serialize());return R};function Ca(P,R,W){return P*(1-W)+R*W}function Yu(P,R,W){return new $i(Ca(P.r,R.r,W),Ca(P.g,R.g,W),Ca(P.b,R.b,W),Ca(P.a,R.a,W))}function Ec(P,R,W){return P.map(function(at,vt){return Ca(at,R[vt],W)})}var mu=Object.freeze({__proto__:null,number:Ca,color:Yu,array:Ec}),dl=.95047,pl=1,wo=1.08883,yu=4/29,ml=6/29,xu=3*ml*ml,_c=ml*ml*ml,Lf=Math.PI/180,Xu=180/Math.PI;function Zu(P){return P>_c?Math.pow(P,.3333333333333333):P/xu+yu}function ju(P){return P>ml?P*P*P:xu*(P-yu)}function yl(P){return 255*(P<=.0031308?12.92*P:1.055*Math.pow(P,.4166666666666667)-.055)}function bu(P){return P/=255,P<=.04045?P/12.92:Math.pow((P+.055)/1.055,2.4)}function Nl(P){var R=bu(P.r),W=bu(P.g),at=bu(P.b),vt=Zu((.4124564*R+.3575761*W+.1804375*at)/dl),St=Zu((.2126729*R+.7151522*W+.072175*at)/pl),Pt=Zu((.0193339*R+.119192*W+.9503041*at)/wo);return{l:116*St-16,a:500*(vt-St),b:200*(St-Pt),alpha:P.a}}function wu(P){var R=(P.l+16)/116,W=isNaN(P.a)?R:R+P.a/500,at=isNaN(P.b)?R:R-P.b/200;return R=pl*ju(R),W=dl*ju(W),at=wo*ju(at),new $i(yl(3.2404542*W-1.5371385*R-.4985314*at),yl(-.969266*W+1.8760108*R+.041556*at),yl(.0556434*W-.2040259*R+1.0572252*at),P.alpha)}function ga(P,R,W){return{l:Ca(P.l,R.l,W),a:Ca(P.a,R.a,W),b:Ca(P.b,R.b,W),alpha:Ca(P.alpha,R.alpha,W)}}function Pf(P){var R=Nl(P),W=R.l,at=R.a,vt=R.b,St=Math.atan2(vt,at)*Xu;return{h:St<0?St+360:St,c:Math.sqrt(at*at+vt*vt),l:W,alpha:P.a}}function Vo(P){var R=P.h*Lf,W=P.c,at=P.l;return wu({l:at,a:Math.cos(R)*W,b:Math.sin(R)*W,alpha:P.alpha})}function Rf(P,R,W){var at=R-P;return P+W*(at>180||at<-180?at-360*Math.round(at/360):at)}function Ku(P,R,W){return{h:Rf(P.h,R.h,W),c:Ca(P.c,R.c,W),l:Ca(P.l,R.l,W),alpha:Ca(P.alpha,R.alpha,W)}}var js={forward:Nl,reverse:wu,interpolate:ga},Ps={forward:Pf,reverse:Vo,interpolate:Ku},Tu=Object.freeze({__proto__:null,lab:js,hcl:Ps}),Da=function(R,W,at,vt,St){this.type=R,this.operator=W,this.interpolation=at,this.input=vt,this.labels=[],this.outputs=[];for(var Pt=0,te=St;Pt1}))return W.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);vt={name:"cubic-bezier",controlPoints:ye}}else return W.error("Unknown interpolation type "+String(vt[0]),1,0);if(R.length-1<4)return W.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if((R.length-1)%2!==0)return W.error("Expected an even number of arguments.");if(St=W.parse(St,2,Qr),!St)return null;var _e=[],Fe=null;at==="interpolate-hcl"||at==="interpolate-lab"?Fe=Pn:W.expectedType&&W.expectedType.kind!=="value"&&(Fe=W.expectedType);for(var je=0;je=ar)return W.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',yr);var ln=W.parse(tr,zr,Fe);if(!ln)return null;Fe=Fe||ln.type,_e.push([ar,ln])}return Fe.kind!=="number"&&Fe.kind!=="color"&&!(Fe.kind==="array"&&Fe.itemType.kind==="number"&&typeof Fe.N=="number")?W.error("Type "+ea(Fe)+" is not interpolatable."):new Da(Fe,at,vt,St,_e)},Da.prototype.evaluate=function(R){var W=this.labels,at=this.outputs;if(W.length===1)return at[0].evaluate(R);var vt=this.input.evaluate(R);if(vt<=W[0])return at[0].evaluate(R);var St=W.length;if(vt>=W[St-1])return at[St-1].evaluate(R);var Pt=vl(W,vt),te=W[Pt],ye=W[Pt+1],_e=Da.interpolationFactor(this.interpolation,vt,te,ye),Fe=at[Pt].evaluate(R),je=at[Pt+1].evaluate(R);return this.operator==="interpolate"?mu[this.type.kind.toLowerCase()](Fe,je,_e):this.operator==="interpolate-hcl"?Ps.reverse(Ps.interpolate(Ps.forward(Fe),Ps.forward(je),_e)):js.reverse(js.interpolate(js.forward(Fe),js.forward(je),_e))},Da.prototype.eachChild=function(R){R(this.input);for(var W=0,at=this.outputs;W=at.length)throw new Ua("Array index out of bounds: "+W+" > "+(at.length-1)+".");if(W!==Math.floor(W))throw new Ua("Array index must be an integer, but found "+W+" instead.");return at[W]},Ks.prototype.eachChild=function(R){R(this.index),R(this.input)},Ks.prototype.outputDefined=function(){return!1},Ks.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Rs=function(R,W){this.type=Ln,this.needle=R,this.haystack=W};Rs.parse=function(R,W){if(R.length!==3)return W.error("Expected 2 arguments, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1,On),vt=W.parse(R[2],2,On);return!at||!vt?null:Qa(at.type,[Ln,wn,Qr,Hr,On])?new Rs(at,vt):W.error("Expected first argument to be of type boolean, string, number or null, but found "+ea(at.type)+" instead")},Rs.prototype.evaluate=function(R){var W=this.needle.evaluate(R),at=this.haystack.evaluate(R);if(!at)return!1;if(!sl(W,["boolean","string","number","null"]))throw new Ua("Expected first argument to be of type boolean, string, number or null, but found "+ea(Ra(W))+" instead.");if(!sl(at,["string","array"]))throw new Ua("Expected second argument to be of type array or string, but found "+ea(Ra(at))+" instead.");return at.indexOf(W)>=0},Rs.prototype.eachChild=function(R){R(this.needle),R(this.haystack)},Rs.prototype.outputDefined=function(){return!0},Rs.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Wo=function(R,W,at){this.type=Qr,this.needle=R,this.haystack=W,this.fromIndex=at};Wo.parse=function(R,W){if(R.length<=2||R.length>=5)return W.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1,On),vt=W.parse(R[2],2,On);if(!at||!vt)return null;if(!Qa(at.type,[Ln,wn,Qr,Hr,On]))return W.error("Expected first argument to be of type boolean, string, number or null, but found "+ea(at.type)+" instead");if(R.length===4){var St=W.parse(R[3],3,Qr);return St?new Wo(at,vt,St):null}else return new Wo(at,vt)},Wo.prototype.evaluate=function(R){var W=this.needle.evaluate(R),at=this.haystack.evaluate(R);if(!sl(W,["boolean","string","number","null"]))throw new Ua("Expected first argument to be of type boolean, string, number or null, but found "+ea(Ra(W))+" instead.");if(!sl(at,["string","array"]))throw new Ua("Expected second argument to be of type array or string, but found "+ea(Ra(at))+" instead.");if(this.fromIndex){var vt=this.fromIndex.evaluate(R);return at.indexOf(W,vt)}return at.indexOf(W)},Wo.prototype.eachChild=function(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)},Wo.prototype.outputDefined=function(){return!1},Wo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var R=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),R]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ps=function(R,W,at,vt,St,Pt){this.inputType=R,this.type=W,this.input=at,this.cases=vt,this.outputs=St,this.otherwise=Pt};ps.parse=function(R,W){if(R.length<5)return W.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if(R.length%2!==1)return W.error("Expected an even number of arguments.");var at,vt;W.expectedType&&W.expectedType.kind!=="value"&&(vt=W.expectedType);for(var St={},Pt=[],te=2;teNumber.MAX_SAFE_INTEGER)return Fe.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof tr=="number"&&Math.floor(tr)!==tr)return Fe.error("Numeric branch labels must be integer values.");if(!at)at=Ra(tr);else if(Fe.checkSubtype(at,Ra(tr)))return null;if(typeof St[String(tr)]<"u")return Fe.error("Branch labels must be unique.");St[String(tr)]=Pt.length}var yr=W.parse(_e,te,vt);if(!yr)return null;vt=vt||yr.type,Pt.push(yr)}var zr=W.parse(R[1],1,On);if(!zr)return null;var ln=W.parse(R[R.length-1],R.length-1,vt);return!ln||zr.type.kind!=="value"&&W.concat(1).checkSubtype(at,zr.type)?null:new ps(at,vt,zr,St,Pt,ln)},ps.prototype.evaluate=function(R){var W=this.input.evaluate(R),at=Ra(W)===this.inputType&&this.outputs[this.cases[W]]||this.otherwise;return at.evaluate(R)},ps.prototype.eachChild=function(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)},ps.prototype.outputDefined=function(){return this.outputs.every(function(R){return R.outputDefined()})&&this.otherwise.outputDefined()},ps.prototype.serialize=function(){for(var R=this,W=["match",this.input.serialize()],at=Object.keys(this.cases).sort(),vt=[],St={},Pt=0,te=at;Pt=5)return W.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1,On),vt=W.parse(R[2],2,Qr);if(!at||!vt)return null;if(!Qa(at.type,[pa(On),wn,On]))return W.error("Expected first argument to be of type array or string, but found "+ea(at.type)+" instead");if(R.length===4){var St=W.parse(R[3],3,Qr);return St?new Do(at.type,at,vt,St):null}else return new Do(at.type,at,vt)},Do.prototype.evaluate=function(R){var W=this.input.evaluate(R),at=this.beginIndex.evaluate(R);if(!sl(W,["string","array"]))throw new Ua("Expected first argument to be of type array or string, but found "+ea(Ra(W))+" instead.");if(this.endIndex){var vt=this.endIndex.evaluate(R);return W.slice(at,vt)}return W.slice(at)},Do.prototype.eachChild=function(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)},Do.prototype.outputDefined=function(){return!1},Do.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var R=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),R]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Ul(P,R){return P==="=="||P==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function Cc(P,R,W){return R===W}function Lc(P,R,W){return R!==W}function Pc(P,R,W){return RW}function Ju(P,R,W){return R<=W}function Df(P,R,W){return R>=W}function xl(P,R,W,at){return at.compare(R,W)===0}function ja(P,R,W,at){return!xl(P,R,W,at)}function Co(P,R,W,at){return at.compare(R,W)<0}function bl(P,R,W,at){return at.compare(R,W)>0}function If(P,R,W,at){return at.compare(R,W)<=0}function Hl(P,R,W,at){return at.compare(R,W)>=0}function gs(P,R,W){var at=P!=="=="&&P!=="!=";return function(){function vt(St,Pt,te){this.type=Ln,this.lhs=St,this.rhs=Pt,this.collator=te,this.hasUntypedArgument=St.type.kind==="value"||Pt.type.kind==="value"}return vt.parse=function(Pt,te){if(Pt.length!==3&&Pt.length!==4)return te.error("Expected two or three arguments.");var ye=Pt[0],_e=te.parse(Pt[1],1,On);if(!_e)return null;if(!Ul(ye,_e.type))return te.concat(1).error('"'+ye+`" comparisons are not supported for type '`+ea(_e.type)+"'.");var Fe=te.parse(Pt[2],2,On);if(!Fe)return null;if(!Ul(ye,Fe.type))return te.concat(2).error('"'+ye+`" comparisons are not supported for type '`+ea(Fe.type)+"'.");if(_e.type.kind!==Fe.type.kind&&_e.type.kind!=="value"&&Fe.type.kind!=="value")return te.error("Cannot compare types '"+ea(_e.type)+"' and '"+ea(Fe.type)+"'.");at&&(_e.type.kind==="value"&&Fe.type.kind!=="value"?_e=new $a(Fe.type,[_e]):_e.type.kind!=="value"&&Fe.type.kind==="value"&&(Fe=new $a(_e.type,[Fe])));var je=null;if(Pt.length===4){if(_e.type.kind!=="string"&&Fe.type.kind!=="string"&&_e.type.kind!=="value"&&Fe.type.kind!=="value")return te.error("Cannot use collator to compare non-string types.");if(je=te.parse(Pt[3],3,ai),!je)return null}return new vt(_e,Fe,je)},vt.prototype.evaluate=function(Pt){var te=this.lhs.evaluate(Pt),ye=this.rhs.evaluate(Pt);if(at&&this.hasUntypedArgument){var _e=Ra(te),Fe=Ra(ye);if(_e.kind!==Fe.kind||!(_e.kind==="string"||_e.kind==="number"))throw new Ua('Expected arguments for "'+P+'" to be (string, string) or (number, number), but found ('+_e.kind+", "+Fe.kind+") instead.")}if(this.collator&&!at&&this.hasUntypedArgument){var je=Ra(te),ar=Ra(ye);if(je.kind!=="string"||ar.kind!=="string")return R(Pt,te,ye)}return this.collator?W(Pt,te,ye,this.collator.evaluate(Pt)):R(Pt,te,ye)},vt.prototype.eachChild=function(Pt){Pt(this.lhs),Pt(this.rhs),this.collator&&Pt(this.collator)},vt.prototype.outputDefined=function(){return!0},vt.prototype.serialize=function(){var Pt=[P];return this.eachChild(function(te){Pt.push(te.serialize())}),Pt},vt}()}var Dc=gs("==",Cc,xl),Ff=gs("!=",Lc,ja),zf=gs("<",Pc,Co),Qu=gs(">",Rc,bl),kf=gs("<=",Ju,If),vo=gs(">=",Df,Hl),Xo=function(R,W,at,vt,St){this.type=wn,this.number=R,this.locale=W,this.currency=at,this.minFractionDigits=vt,this.maxFractionDigits=St};Xo.parse=function(R,W){if(R.length!==3)return W.error("Expected two arguments.");var at=W.parse(R[1],1,Qr);if(!at)return null;var vt=R[2];if(typeof vt!="object"||Array.isArray(vt))return W.error("NumberFormat options argument must be an object.");var St=null;if(vt.locale&&(St=W.parse(vt.locale,1,wn),!St))return null;var Pt=null;if(vt.currency&&(Pt=W.parse(vt.currency,1,wn),!Pt))return null;var te=null;if(vt["min-fraction-digits"]&&(te=W.parse(vt["min-fraction-digits"],1,Qr),!te))return null;var ye=null;return vt["max-fraction-digits"]&&(ye=W.parse(vt["max-fraction-digits"],1,Qr),!ye)?null:new Xo(at,St,Pt,te,ye)},Xo.prototype.evaluate=function(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))},Xo.prototype.eachChild=function(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)},Xo.prototype.outputDefined=function(){return!1},Xo.prototype.serialize=function(){var R={};return this.locale&&(R.locale=this.locale.serialize()),this.currency&&(R.currency=this.currency.serialize()),this.minFractionDigits&&(R["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(R["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),R]};var Ds=function(R){this.type=Qr,this.input=R};Ds.parse=function(R,W){if(R.length!==2)return W.error("Expected 1 argument, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1);return at?at.type.kind!=="array"&&at.type.kind!=="string"&&at.type.kind!=="value"?W.error("Expected argument of type string or array, but found "+ea(at.type)+" instead."):new Ds(at):null},Ds.prototype.evaluate=function(R){var W=this.input.evaluate(R);if(typeof W=="string")return W.length;if(Array.isArray(W))return W.length;throw new Ua("Expected value to be of type string or array, but found "+ea(Ra(W))+" instead.")},Ds.prototype.eachChild=function(R){R(this.input)},Ds.prototype.outputDefined=function(){return!1},Ds.prototype.serialize=function(){var R=["length"];return this.eachChild(function(W){R.push(W.serialize())}),R};var wl={"==":Dc,"!=":Ff,">":Qu,"<":zf,">=":vo,"<=":kf,array:$a,at:Ks,boolean:$a,case:Yo,coalesce:Go,collator:Cs,format:qa,image:_o,in:Rs,"index-of":Wo,interpolate:Da,"interpolate-hcl":Da,"interpolate-lab":Da,length:Ds,let:ds,literal:za,match:ps,number:$a,"number-format":Xo,object:$a,slice:Do,step:Ho,string:$a,"to-boolean":bo,"to-color":bo,"to-number":bo,"to-string":bo,var:Ls,within:Uo};function Au(P,R){var W=R[0],at=R[1],vt=R[2],St=R[3];W=W.evaluate(P),at=at.evaluate(P),vt=vt.evaluate(P);var Pt=St?St.evaluate(P):1,te=ll(W,at,vt,Pt);if(te)throw new Ua(te);return new $i(W/255*Pt,at/255*Pt,vt/255*Pt,Pt)}function Js(P,R){return P in R}function Qs(P,R){var W=R[P];return typeof W>"u"?null:W}function Of(P,R,W,at){for(;W<=at;){var vt=W+at>>1;if(R[vt]===P)return!0;R[vt]>P?at=vt-1:W=vt+1}return!1}function ms(P){return{type:P}}Za.register(wl,{error:[mi,[wn],function(P,R){var W=R[0];throw new Ua(W.evaluate(P))}],typeof:[wn,[On],function(P,R){var W=R[0];return ea(Ra(W.evaluate(P)))}],"to-rgba":[pa(Qr,4),[Pn],function(P,R){var W=R[0];return W.evaluate(P).toArray()}],rgb:[Pn,[Qr,Qr,Qr],Au],rgba:[Pn,[Qr,Qr,Qr,Qr],Au],has:{type:Ln,overloads:[[[wn],function(P,R){var W=R[0];return Js(W.evaluate(P),P.properties())}],[[wn,Un],function(P,R){var W=R[0],at=R[1];return Js(W.evaluate(P),at.evaluate(P))}]]},get:{type:On,overloads:[[[wn],function(P,R){var W=R[0];return Qs(W.evaluate(P),P.properties())}],[[wn,Un],function(P,R){var W=R[0],at=R[1];return Qs(W.evaluate(P),at.evaluate(P))}]]},"feature-state":[On,[wn],function(P,R){var W=R[0];return Qs(W.evaluate(P),P.featureState||{})}],properties:[Un,[],function(P){return P.properties()}],"geometry-type":[wn,[],function(P){return P.geometryType()}],id:[On,[],function(P){return P.id()}],zoom:[Qr,[],function(P){return P.globals.zoom}],"heatmap-density":[Qr,[],function(P){return P.globals.heatmapDensity||0}],"line-progress":[Qr,[],function(P){return P.globals.lineProgress||0}],accumulated:[On,[],function(P){return P.globals.accumulated===void 0?null:P.globals.accumulated}],"+":[Qr,ms(Qr),function(P,R){for(var W=0,at=0,vt=R;at":[Ln,[wn,On],function(P,R){var W=R[0],at=R[1],vt=P.properties()[W.value],St=at.value;return typeof vt==typeof St&&vt>St}],"filter-id->":[Ln,[On],function(P,R){var W=R[0],at=P.id(),vt=W.value;return typeof at==typeof vt&&at>vt}],"filter-<=":[Ln,[wn,On],function(P,R){var W=R[0],at=R[1],vt=P.properties()[W.value],St=at.value;return typeof vt==typeof St&&vt<=St}],"filter-id-<=":[Ln,[On],function(P,R){var W=R[0],at=P.id(),vt=W.value;return typeof at==typeof vt&&at<=vt}],"filter->=":[Ln,[wn,On],function(P,R){var W=R[0],at=R[1],vt=P.properties()[W.value],St=at.value;return typeof vt==typeof St&&vt>=St}],"filter-id->=":[Ln,[On],function(P,R){var W=R[0],at=P.id(),vt=W.value;return typeof at==typeof vt&&at>=vt}],"filter-has":[Ln,[On],function(P,R){var W=R[0];return W.value in P.properties()}],"filter-has-id":[Ln,[],function(P){return P.id()!==null&&P.id()!==void 0}],"filter-type-in":[Ln,[pa(wn)],function(P,R){var W=R[0];return W.value.indexOf(P.geometryType())>=0}],"filter-id-in":[Ln,[pa(On)],function(P,R){var W=R[0];return W.value.indexOf(P.id())>=0}],"filter-in-small":[Ln,[wn,pa(On)],function(P,R){var W=R[0],at=R[1];return at.value.indexOf(P.properties()[W.value])>=0}],"filter-in-large":[Ln,[wn,pa(On)],function(P,R){var W=R[0],at=R[1];return Of(P.properties()[W.value],at.value,0,at.value.length-1)}],all:{type:Ln,overloads:[[[Ln,Ln],function(P,R){var W=R[0],at=R[1];return W.evaluate(P)&&at.evaluate(P)}],[ms(Ln),function(P,R){for(var W=0,at=R;W-1}function Al(P){return!!P.expression&&P.expression.interpolated}function va(P){return P instanceof Number?"number":P instanceof String?"string":P instanceof Boolean?"boolean":Array.isArray(P)?"array":P===null?"null":typeof P}function Ml(P){return typeof P=="object"&&P!==null&&!Array.isArray(P)}function Mu(P){return P}function Nf(P,R){var W=R.type==="color",at=P.stops&&typeof P.stops[0][0]=="object",vt=at||P.property!==void 0,St=at||!vt,Pt=P.type||(Al(R)?"exponential":"interval");if(W&&(P=In({},P),P.stops&&(P.stops=P.stops.map(function($n){return[$n[0],$i.parse($n[1])]})),P.default?P.default=$i.parse(P.default):P.default=$i.parse(R.default)),P.colorSpace&&P.colorSpace!=="rgb"&&!Tu[P.colorSpace])throw new Error("Unknown color space: "+P.colorSpace);var te,ye,_e;if(Pt==="exponential")te=$u;else if(Pt==="interval")te=Su;else if(Pt==="categorical"){te=Gl,ye=Object.create(null);for(var Fe=0,je=P.stops;Fe=P.stops[at-1][0])return P.stops[at-1][1];var vt=vl(P.stops.map(function(St){return St[0]}),W);return P.stops[vt][1]}function $u(P,R,W){var at=P.base!==void 0?P.base:1;if(va(W)!=="number")return Sl(P.default,R.default);var vt=P.stops.length;if(vt===1||W<=P.stops[0][0])return P.stops[0][1];if(W>=P.stops[vt-1][0])return P.stops[vt-1][1];var St=vl(P.stops.map(function(je){return je[0]}),W),Pt=Yl(W,at,P.stops[St][0],P.stops[St+1][0]),te=P.stops[St][1],ye=P.stops[St+1][1],_e=mu[R.type]||Mu;if(P.colorSpace&&P.colorSpace!=="rgb"){var Fe=Tu[P.colorSpace];_e=function(je,ar){return Fe.reverse(Fe.interpolate(Fe.forward(je),Fe.forward(ar),Pt))}}return typeof te.evaluate=="function"?{evaluate:function(){for(var ar=[],tr=arguments.length;tr--;)ar[tr]=arguments[tr];var yr=te.evaluate.apply(void 0,ar),zr=ye.evaluate.apply(void 0,ar);if(!(yr===void 0||zr===void 0))return _e(yr,zr,Pt)}}:_e(te,ye,Pt)}function Wl(P,R,W){return R.type==="color"?W=$i.parse(W):R.type==="formatted"?W=Xa.fromString(W.toString()):R.type==="resolvedImage"?W=ho.fromString(W.toString()):va(W)!==R.type&&(R.type!=="enum"||!R.values[W])&&(W=void 0),Sl(W,P.default,R.default)}function Yl(P,R,W,at){var vt=at-W,St=P-W;return vt===0?0:R===1?St/vt:(Math.pow(R,St)-1)/(Math.pow(R,vt)-1)}var Fs=function(R,W){this.expression=R,this._warningHistory={},this._evaluator=new ts,this._defaultValue=W?Bf(W):null,this._enumValues=W&&W.type==="enum"?W.values:null};Fs.prototype.evaluateWithoutErrorHandling=function(R,W,at,vt,St,Pt){return this._evaluator.globals=R,this._evaluator.feature=W,this._evaluator.featureState=at,this._evaluator.canonical=vt,this._evaluator.availableImages=St||null,this._evaluator.formattedSection=Pt,this.expression.evaluate(this._evaluator)},Fs.prototype.evaluate=function(R,W,at,vt,St,Pt){this._evaluator.globals=R,this._evaluator.feature=W||null,this._evaluator.featureState=at||null,this._evaluator.canonical=vt,this._evaluator.availableImages=St||null,this._evaluator.formattedSection=Pt||null;try{var te=this.expression.evaluate(this._evaluator);if(te==null||typeof te=="number"&&te!==te)return this._defaultValue;if(this._enumValues&&!(te in this._enumValues))throw new Ua("Expected value to be one of "+Object.keys(this._enumValues).map(function(ye){return JSON.stringify(ye)}).join(", ")+", but found "+JSON.stringify(te)+" instead.");return te}catch(ye){return this._warningHistory[ye.message]||(this._warningHistory[ye.message]=!0,typeof console<"u"&&console.warn(ye.message)),this._defaultValue}};function Xl(P){return Array.isArray(P)&&P.length>0&&typeof P[0]=="string"&&P[0]in wl}function zs(P,R){var W=new rs(wl,[],R?Ic(R):void 0),at=W.parse(P,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return at?Tl(new Fs(at,R)):Is(W.errors)}var Ha=function(R,W){this.kind=R,this._styleExpression=W,this.isStateDependent=R!=="constant"&&!Zs(W.expression)};Ha.prototype.evaluateWithoutErrorHandling=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluateWithoutErrorHandling(R,W,at,vt,St,Pt)},Ha.prototype.evaluate=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluate(R,W,at,vt,St,Pt)};var ns=function(R,W,at,vt){this.kind=R,this.zoomStops=at,this._styleExpression=W,this.isStateDependent=R!=="camera"&&!Zs(W.expression),this.interpolationType=vt};ns.prototype.evaluateWithoutErrorHandling=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluateWithoutErrorHandling(R,W,at,vt,St,Pt)},ns.prototype.evaluate=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluate(R,W,at,vt,St,Pt)},ns.prototype.interpolationFactor=function(R,W,at){return this.interpolationType?Da.interpolationFactor(this.interpolationType,R,W,at):0};function qu(P,R){if(P=zs(P,R),P.result==="error")return P;var W=P.value.expression,at=hl(W);if(!at&&!ys(R))return Is([new Er("","data expressions not supported")]);var vt=Ol(W,["zoom"]);if(!vt&&!Vl(R))return Is([new Er("","zoom expressions not supported")]);var St=Zl(W);if(!St&&!vt)return Is([new Er("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(St instanceof Er)return Is([St]);if(St instanceof Da&&!Al(R))return Is([new Er("",'"interpolate" expressions cannot be used with this property')]);if(!St)return Tl(at?new Ha("constant",P.value):new Ha("source",P.value));var Pt=St instanceof Da?St.interpolation:void 0;return Tl(at?new ns("camera",P.value,St.labels,Pt):new ns("composite",P.value,St.labels,Pt))}var $s=function(R,W){this._parameters=R,this._specification=W,In(this,Nf(this._parameters,this._specification))};$s.deserialize=function(R){return new $s(R._parameters,R._specification)},$s.serialize=function(R){return{_parameters:R._parameters,_specification:R._specification}};function Eu(P,R){if(Ml(P))return new $s(P,R);if(Xl(P)){var W=qu(P,R);if(W.result==="error")throw new Error(W.value.map(function(vt){return vt.key+": "+vt.message}).join(", "));return W.value}else{var at=P;return typeof P=="string"&&R.type==="color"&&(at=$i.parse(P)),{kind:"constant",evaluate:function(){return at}}}}function Zl(P){var R=null;if(P instanceof ds)R=Zl(P.result);else if(P instanceof Go)for(var W=0,at=P.args;Wat.maximum?[new Or(R,W,W+" is greater than the maximum value "+at.maximum)]:[]}function Uf(P){var R=P.valueSpec,W=hn(P.value.type),at,vt={},St,Pt,te=W!=="categorical"&&P.value.property===void 0,ye=!te,_e=va(P.value.stops)==="array"&&va(P.value.stops[0])==="array"&&va(P.value.stops[0][0])==="object",Fe=lo({key:P.key,value:P.value,valueSpec:P.styleSpec.function,style:P.style,styleSpec:P.styleSpec,objectElementValidators:{stops:je,default:yr}});return W==="identity"&&te&&Fe.push(new Or(P.key,P.value,'missing required property "property"')),W!=="identity"&&!P.value.stops&&Fe.push(new Or(P.key,P.value,'missing required property "stops"')),W==="exponential"&&P.valueSpec.expression&&!Al(P.valueSpec)&&Fe.push(new Or(P.key,P.value,"exponential functions not supported")),P.styleSpec.$version>=8&&(ye&&!ys(P.valueSpec)?Fe.push(new Or(P.key,P.value,"property functions not supported")):te&&!Vl(P.valueSpec)&&Fe.push(new Or(P.key,P.value,"zoom functions not supported"))),(W==="categorical"||_e)&&P.value.property===void 0&&Fe.push(new Or(P.key,P.value,'"property" property is required')),Fe;function je(zr){if(W==="identity")return[new Or(zr.key,zr.value,'identity function may not have a "stops" property')];var ln=[],tn=zr.value;return ln=ln.concat(jl({key:zr.key,value:tn,valueSpec:zr.valueSpec,style:zr.style,styleSpec:zr.styleSpec,arrayElementValidator:ar})),va(tn)==="array"&&tn.length===0&&ln.push(new Or(zr.key,tn,"array must have at least one stop")),ln}function ar(zr){var ln=[],tn=zr.value,Sn=zr.key;if(va(tn)!=="array")return[new Or(Sn,tn,"array expected, "+va(tn)+" found")];if(tn.length!==2)return[new Or(Sn,tn,"array length 2 expected, length "+tn.length+" found")];if(_e){if(va(tn[0])!=="object")return[new Or(Sn,tn,"object expected, "+va(tn[0])+" found")];if(tn[0].zoom===void 0)return[new Or(Sn,tn,"object stop key must have zoom")];if(tn[0].value===void 0)return[new Or(Sn,tn,"object stop key must have value")];if(Pt&&Pt>hn(tn[0].zoom))return[new Or(Sn,tn[0].zoom,"stop zoom values must appear in ascending order")];hn(tn[0].zoom)!==Pt&&(Pt=hn(tn[0].zoom),St=void 0,vt={}),ln=ln.concat(lo({key:Sn+"[0]",value:tn[0],valueSpec:{zoom:{}},style:zr.style,styleSpec:zr.styleSpec,objectElementValidators:{zoom:El,value:tr}}))}else ln=ln.concat(tr({key:Sn+"[0]",value:tn[0],valueSpec:{},style:zr.style,styleSpec:zr.styleSpec},tn));return Xl(sn(tn[1]))?ln.concat([new Or(Sn+"[1]",tn[1],"expressions are not allowed in function stops.")]):ln.concat(Ir({key:Sn+"[1]",value:tn[1],valueSpec:R,style:zr.style,styleSpec:zr.styleSpec}))}function tr(zr,ln){var tn=va(zr.value),Sn=hn(zr.value),mn=zr.value!==null?zr.value:ln;if(!at)at=tn;else if(tn!==at)return[new Or(zr.key,mn,tn+" stop domain type must match previous stop domain type "+at)];if(tn!=="number"&&tn!=="string"&&tn!=="boolean")return[new Or(zr.key,mn,"stop domain value must be a number, string, or boolean")];if(tn!=="number"&&W!=="categorical"){var Mn="number expected, "+tn+" found";return ys(R)&&W===void 0&&(Mn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Or(zr.key,mn,Mn)]}return W==="categorical"&&tn==="number"&&(!isFinite(Sn)||Math.floor(Sn)!==Sn)?[new Or(zr.key,mn,"integer expected, found "+Sn)]:W!=="categorical"&&tn==="number"&&St!==void 0&&Sn=2&&P[1]!=="$id"&&P[1]!=="$type";case"in":return P.length>=3&&(typeof P[1]!="string"||Array.isArray(P[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return P.length!==3||Array.isArray(P[1])||Array.isArray(P[2]);case"any":case"all":for(var R=0,W=P.slice(1);RR?1:0}function Jl(P){if(!Array.isArray(P))return!1;if(P[0]==="within")return!0;for(var R=1;R"||R==="<="||R===">="?Cu(P[1],P[2],R):R==="any"?Hf(P.slice(1)):R==="all"?["all"].concat(P.slice(1).map(Ql)):R==="none"?["all"].concat(P.slice(1).map(Ql).map(qs)):R==="in"?$l(P[1],P.slice(2)):R==="!in"?qs($l(P[1],P.slice(2))):R==="has"?ef(P[1]):R==="!has"?qs(ef(P[1])):R==="within"?P:!0;return W}function Cu(P,R,W){switch(P){case"$type":return["filter-type-"+W,R];case"$id":return["filter-id-"+W,R];default:return["filter-"+W,P,R]}}function Hf(P){return["any"].concat(P.map(Ql))}function $l(P,R){if(R.length===0)return!1;switch(P){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(function(W){return typeof W!=typeof R[0]})?["filter-in-large",P,["literal",R.sort(tf)]]:["filter-in-small",P,["literal",R]]}}function ef(P){switch(P){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",P]}}function qs(P){return["!",P]}function rf(P){return _u(sn(P.value))?ks(In({},P,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ql(P)}function ql(P){var R=P.value,W=P.key;if(va(R)!=="array")return[new Or(W,R,"array expected, "+va(R)+" found")];var at=P.styleSpec,vt,St=[];if(R.length<1)return[new Or(W,R,"filter array must have at least 1 element")];switch(St=St.concat(Kl({key:W+"[0]",value:R[0],valueSpec:at.filter_operator,style:P.style,styleSpec:P.styleSpec})),hn(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&hn(R[1])==="$type"&&St.push(new Or(W,R,'"$type" cannot be use with operator "'+R[0]+'"'));case"==":case"!=":R.length!==3&&St.push(new Or(W,R,'filter array for operator "'+R[0]+'" must have 3 elements'));case"in":case"!in":R.length>=2&&(vt=va(R[1]),vt!=="string"&&St.push(new Or(W+"[1]",R[1],"string expected, "+vt+" found")));for(var Pt=2;Pt=Fe[tr+0]&&at>=Fe[tr+1])?(Pt[ar]=!0,St.push(_e[ar])):Pt[ar]=!1}}},da.prototype._forEachCell=function(P,R,W,at,vt,St,Pt,te){for(var ye=this._convertToCellCoord(P),_e=this._convertToCellCoord(R),Fe=this._convertToCellCoord(W),je=this._convertToCellCoord(at),ar=ye;ar<=Fe;ar++)for(var tr=_e;tr<=je;tr++){var yr=this.d*tr+ar;if(!(te&&!te(this._convertFromCellCoord(ar),this._convertFromCellCoord(tr),this._convertFromCellCoord(ar+1),this._convertFromCellCoord(tr+1)))&&vt.call(this,P,R,W,at,yr,St,Pt,te))return}},da.prototype._convertFromCellCoord=function(P){return(P-this.padding)/this.scale},da.prototype._convertToCellCoord=function(P){return Math.max(0,Math.min(this.d-1,Math.floor(P*this.scale)+this.padding))},da.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var P=this.cells,R=Xi+this.cells.length+1+1,W=0,at=0;at=0)){var je=P[Fe];_e[Fe]=Ct[ye].shallow.indexOf(Fe)>=0?je:De(je,R)}P instanceof Error&&(_e.message=P.message)}if(_e.$name)throw new Error("$name property is reserved for worker serialization logic.");return ye!=="Object"&&(_e.$name=ye),_e}throw new Error("can't serialize object of type "+typeof P)}function Ee(P){if(P==null||typeof P=="boolean"||typeof P=="number"||typeof P=="string"||P instanceof Boolean||P instanceof Number||P instanceof String||P instanceof Date||P instanceof RegExp||ae(P)||fe(P)||ArrayBuffer.isView(P)||P instanceof Ia)return P;if(Array.isArray(P))return P.map(Ee);if(typeof P=="object"){var R=P.$name||"Object",W=Ct[R],at=W.klass;if(!at)throw new Error("can't deserialize unregistered class "+R);if(at.deserialize)return at.deserialize(P);for(var vt=Object.create(at.prototype),St=0,Pt=Object.keys(P);St=0?ye:Ee(ye)}}return vt}throw new Error("can't deserialize object of type "+typeof P)}var Ye=function(){this.first=!0};Ye.prototype.update=function(R,W){var at=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=at,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=at,!0):(this.lastFloorZoom>at?(this.lastIntegerZoom=at+1,this.lastIntegerZoomTime=W):this.lastFloorZoom=128&&P<=255},Arabic:function(P){return P>=1536&&P<=1791},"Arabic Supplement":function(P){return P>=1872&&P<=1919},"Arabic Extended-A":function(P){return P>=2208&&P<=2303},"Hangul Jamo":function(P){return P>=4352&&P<=4607},"Unified Canadian Aboriginal Syllabics":function(P){return P>=5120&&P<=5759},Khmer:function(P){return P>=6016&&P<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(P){return P>=6320&&P<=6399},"General Punctuation":function(P){return P>=8192&&P<=8303},"Letterlike Symbols":function(P){return P>=8448&&P<=8527},"Number Forms":function(P){return P>=8528&&P<=8591},"Miscellaneous Technical":function(P){return P>=8960&&P<=9215},"Control Pictures":function(P){return P>=9216&&P<=9279},"Optical Character Recognition":function(P){return P>=9280&&P<=9311},"Enclosed Alphanumerics":function(P){return P>=9312&&P<=9471},"Geometric Shapes":function(P){return P>=9632&&P<=9727},"Miscellaneous Symbols":function(P){return P>=9728&&P<=9983},"Miscellaneous Symbols and Arrows":function(P){return P>=11008&&P<=11263},"CJK Radicals Supplement":function(P){return P>=11904&&P<=12031},"Kangxi Radicals":function(P){return P>=12032&&P<=12255},"Ideographic Description Characters":function(P){return P>=12272&&P<=12287},"CJK Symbols and Punctuation":function(P){return P>=12288&&P<=12351},Hiragana:function(P){return P>=12352&&P<=12447},Katakana:function(P){return P>=12448&&P<=12543},Bopomofo:function(P){return P>=12544&&P<=12591},"Hangul Compatibility Jamo":function(P){return P>=12592&&P<=12687},Kanbun:function(P){return P>=12688&&P<=12703},"Bopomofo Extended":function(P){return P>=12704&&P<=12735},"CJK Strokes":function(P){return P>=12736&&P<=12783},"Katakana Phonetic Extensions":function(P){return P>=12784&&P<=12799},"Enclosed CJK Letters and Months":function(P){return P>=12800&&P<=13055},"CJK Compatibility":function(P){return P>=13056&&P<=13311},"CJK Unified Ideographs Extension A":function(P){return P>=13312&&P<=19903},"Yijing Hexagram Symbols":function(P){return P>=19904&&P<=19967},"CJK Unified Ideographs":function(P){return P>=19968&&P<=40959},"Yi Syllables":function(P){return P>=40960&&P<=42127},"Yi Radicals":function(P){return P>=42128&&P<=42191},"Hangul Jamo Extended-A":function(P){return P>=43360&&P<=43391},"Hangul Syllables":function(P){return P>=44032&&P<=55215},"Hangul Jamo Extended-B":function(P){return P>=55216&&P<=55295},"Private Use Area":function(P){return P>=57344&&P<=63743},"CJK Compatibility Ideographs":function(P){return P>=63744&&P<=64255},"Arabic Presentation Forms-A":function(P){return P>=64336&&P<=65023},"Vertical Forms":function(P){return P>=65040&&P<=65055},"CJK Compatibility Forms":function(P){return P>=65072&&P<=65103},"Small Form Variants":function(P){return P>=65104&&P<=65135},"Arabic Presentation Forms-B":function(P){return P>=65136&&P<=65279},"Halfwidth and Fullwidth Forms":function(P){return P>=65280&&P<=65519}};function nr(P){for(var R=0,W=P;R=65097&&P<=65103)||Ze["CJK Compatibility Ideographs"](P)||Ze["CJK Compatibility"](P)||Ze["CJK Radicals Supplement"](P)||Ze["CJK Strokes"](P)||Ze["CJK Symbols and Punctuation"](P)&&!(P>=12296&&P<=12305)&&!(P>=12308&&P<=12319)&&P!==12336||Ze["CJK Unified Ideographs Extension A"](P)||Ze["CJK Unified Ideographs"](P)||Ze["Enclosed CJK Letters and Months"](P)||Ze["Hangul Compatibility Jamo"](P)||Ze["Hangul Jamo Extended-A"](P)||Ze["Hangul Jamo Extended-B"](P)||Ze["Hangul Jamo"](P)||Ze["Hangul Syllables"](P)||Ze.Hiragana(P)||Ze["Ideographic Description Characters"](P)||Ze.Kanbun(P)||Ze["Kangxi Radicals"](P)||Ze["Katakana Phonetic Extensions"](P)||Ze.Katakana(P)&&P!==12540||Ze["Halfwidth and Fullwidth Forms"](P)&&P!==65288&&P!==65289&&P!==65293&&!(P>=65306&&P<=65310)&&P!==65339&&P!==65341&&P!==65343&&!(P>=65371&&P<=65503)&&P!==65507&&!(P>=65512&&P<=65519)||Ze["Small Form Variants"](P)&&!(P>=65112&&P<=65118)&&!(P>=65123&&P<=65126)||Ze["Unified Canadian Aboriginal Syllabics"](P)||Ze["Unified Canadian Aboriginal Syllabics Extended"](P)||Ze["Vertical Forms"](P)||Ze["Yijing Hexagram Symbols"](P)||Ze["Yi Syllables"](P)||Ze["Yi Radicals"](P))}function Rr(P){return!!(Ze["Latin-1 Supplement"](P)&&(P===167||P===169||P===174||P===177||P===188||P===189||P===190||P===215||P===247)||Ze["General Punctuation"](P)&&(P===8214||P===8224||P===8225||P===8240||P===8241||P===8251||P===8252||P===8258||P===8263||P===8264||P===8265||P===8273)||Ze["Letterlike Symbols"](P)||Ze["Number Forms"](P)||Ze["Miscellaneous Technical"](P)&&(P>=8960&&P<=8967||P>=8972&&P<=8991||P>=8996&&P<=9e3||P===9003||P>=9085&&P<=9114||P>=9150&&P<=9165||P===9167||P>=9169&&P<=9179||P>=9186&&P<=9215)||Ze["Control Pictures"](P)&&P!==9251||Ze["Optical Character Recognition"](P)||Ze["Enclosed Alphanumerics"](P)||Ze["Geometric Shapes"](P)||Ze["Miscellaneous Symbols"](P)&&!(P>=9754&&P<=9759)||Ze["Miscellaneous Symbols and Arrows"](P)&&(P>=11026&&P<=11055||P>=11088&&P<=11097||P>=11192&&P<=11243)||Ze["CJK Symbols and Punctuation"](P)||Ze.Katakana(P)||Ze["Private Use Area"](P)||Ze["CJK Compatibility Forms"](P)||Ze["Small Form Variants"](P)||Ze["Halfwidth and Fullwidth Forms"](P)||P===8734||P===8756||P===8757||P>=9984&&P<=10087||P>=10102&&P<=10131||P===65532||P===65533)}function Br(P){return!(on(P)||Rr(P))}function jr(P){return Ze.Arabic(P)||Ze["Arabic Supplement"](P)||Ze["Arabic Extended-A"](P)||Ze["Arabic Presentation Forms-A"](P)||Ze["Arabic Presentation Forms-B"](P)}function un(P){return P>=1424&&P<=2303||Ze["Arabic Presentation Forms-A"](P)||Ze["Arabic Presentation Forms-B"](P)}function vn(P,R){return!(!R&&un(P)||P>=2304&&P<=3583||P>=3840&&P<=4255||Ze.Khmer(P))}function qr(P){for(var R=0,W=P;R-1&&(Qn=qn.error),ui&&ui(P)};function Oi(){Mi.fire(new rr("pluginStateChange",{pluginStatus:Qn,pluginURL:ii}))}var Mi=new dr,Ii=function(){return Qn},ra=function(P){return P({pluginStatus:Qn,pluginURL:ii}),Mi.on("pluginStateChange",P),P},ka=function(P,R,W){if(W===void 0&&(W=!1),Qn===qn.deferred||Qn===qn.loading||Qn===qn.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");ii=st.resolveURL(P),Qn=qn.deferred,ui=R,Oi(),W||la()},la=function(){if(Qn!==qn.deferred||!ii)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Qn=qn.loading,Oi(),ii&&ke({url:ii},function(P){P?fi(P):(Qn=qn.loaded,Oi())})},Kn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Qn===qn.loaded||Kn.applyArabicShaping!=null},isLoading:function(){return Qn===qn.loading},setState:function(R){Qn=R.pluginStatus,ii=R.pluginURL},isParsed:function(){return Kn.applyArabicShaping!=null&&Kn.processBidirectionalText!=null&&Kn.processStyledBidirectionalText!=null},getPluginURL:function(){return ii}},Bi=function(){!Kn.isLoading()&&!Kn.isLoaded()&&Ii()==="deferred"&&la()},Ti=function(R,W){this.zoom=R,W?(this.now=W.now,this.fadeDuration=W.fadeDuration,this.zoomHistory=W.zoomHistory,this.transition=W.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ye,this.transition={})};Ti.prototype.isSupportedScript=function(R){return Hn(R,Kn.isLoaded())},Ti.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ti.prototype.getCrossfadeParameters=function(){var R=this.zoom,W=R-Math.floor(R),at=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:W+(1-W)*at}:{fromScale:.5,toScale:1,t:1-(1-at)*W}};var Zi=function(R,W){this.property=R,this.value=W,this.expression=Eu(W===void 0?R.specification.default:W,R.specification)};Zi.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Zi.prototype.possiblyEvaluate=function(R,W,at){return this.property.possiblyEvaluate(this,R,W,at)};var ba=function(R){this.property=R,this.value=new Zi(R,void 0)};ba.prototype.transitioned=function(R,W){return new Ka(this.property,this.value,W,w({},R.transition,this.transition),R.now)},ba.prototype.untransitioned=function(){return new Ka(this.property,this.value,null,{},0)};var na=function(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)};na.prototype.getValue=function(R){return N(this._values[R].value.value)},na.prototype.setValue=function(R,W){this._values.hasOwnProperty(R)||(this._values[R]=new ba(this._values[R].property)),this._values[R].value=new Zi(this._values[R].property,W===null?void 0:N(W))},na.prototype.getTransition=function(R){return N(this._values[R].transition)},na.prototype.setTransition=function(R,W){this._values.hasOwnProperty(R)||(this._values[R]=new ba(this._values[R].property)),this._values[R].transition=N(W)||void 0},na.prototype.serialize=function(){for(var R={},W=0,at=Object.keys(this._values);Wthis.end)return this.prior=null,St;if(this.value.isDataDriven())return this.prior=null,St;if(vtPt.zoomHistory.lastIntegerZoom?{from:at,to:vt}:{from:St,to:vt}},R.prototype.interpolate=function(at){return at},R}(Ei),Lo=function(R){this.specification=R};Lo.prototype.possiblyEvaluate=function(R,W,at,vt){if(R.value!==void 0)if(R.expression.kind==="constant"){var St=R.expression.evaluate(W,null,{},at,vt);return this._calculate(St,St,St,W)}else return this._calculate(R.expression.evaluate(new Ti(Math.floor(W.zoom-1),W)),R.expression.evaluate(new Ti(Math.floor(W.zoom),W)),R.expression.evaluate(new Ti(Math.floor(W.zoom+1),W)),W)},Lo.prototype._calculate=function(R,W,at,vt){var St=vt.zoom;return St>vt.zoomHistory.lastIntegerZoom?{from:R,to:W}:{from:at,to:W}},Lo.prototype.interpolate=function(R){return R};var eo=function(R){this.specification=R};eo.prototype.possiblyEvaluate=function(R,W,at,vt){return!!R.expression.evaluate(W,null,{},at,vt)},eo.prototype.interpolate=function(){return!1};var ca=function(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var W in R){var at=R[W];at.specification.overridable&&this.overridableProperties.push(W);var vt=this.defaultPropertyValues[W]=new Zi(at,void 0),St=this.defaultTransitionablePropertyValues[W]=new ba(at);this.defaultTransitioningPropertyValues[W]=St.untransitioned(),this.defaultPossiblyEvaluatedValues[W]=vt.possiblyEvaluate({})}};Bt("DataDrivenProperty",Ei),Bt("DataConstantProperty",oi),Bt("CrossFadedDataDrivenProperty",Ao),Bt("CrossFadedProperty",Lo),Bt("ColorRampProperty",eo);var Va="-transition",Oa=function(P){function R(W,at){if(P.call(this),this.id=W.id,this.type=W.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},W.type!=="custom"&&(W=W,this.metadata=W.metadata,this.minzoom=W.minzoom,this.maxzoom=W.maxzoom,W.type!=="background"&&(this.source=W.source,this.sourceLayer=W["source-layer"],this.filter=W.filter),at.layout&&(this._unevaluatedLayout=new to(at.layout)),at.paint)){this._transitionablePaint=new na(at.paint);for(var vt in W.paint)this.setPaintProperty(vt,W.paint[vt],{validate:!1});for(var St in W.layout)this.setLayoutProperty(St,W.layout[St],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new uo(at.paint)}}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},R.prototype.getLayoutProperty=function(at){return at==="visibility"?this.visibility:this._unevaluatedLayout.getValue(at)},R.prototype.setLayoutProperty=function(at,vt,St){if(St===void 0&&(St={}),vt!=null){var Pt="layers."+this.id+".layout."+at;if(this._validate(Pi,Pt,at,vt,St))return}if(at==="visibility"){this.visibility=vt;return}this._unevaluatedLayout.setValue(at,vt)},R.prototype.getPaintProperty=function(at){return M(at,Va)?this._transitionablePaint.getTransition(at.slice(0,-Va.length)):this._transitionablePaint.getValue(at)},R.prototype.setPaintProperty=function(at,vt,St){if(St===void 0&&(St={}),vt!=null){var Pt="layers."+this.id+".paint."+at;if(this._validate(Li,Pt,at,vt,St))return!1}if(M(at,Va))return this._transitionablePaint.setTransition(at.slice(0,-Va.length),vt||void 0),!1;var te=this._transitionablePaint._values[at],ye=te.property.specification["property-type"]==="cross-faded-data-driven",_e=te.value.isDataDriven(),Fe=te.value;this._transitionablePaint.setValue(at,vt),this._handleSpecialPaintPropertyUpdate(at);var je=this._transitionablePaint._values[at].value,ar=je.isDataDriven();return ar||_e||ye||this._handleOverridablePaintPropertyUpdate(at,Fe,je)},R.prototype._handleSpecialPaintPropertyUpdate=function(at){},R.prototype._handleOverridablePaintPropertyUpdate=function(at,vt,St){return!1},R.prototype.isHidden=function(at){return this.minzoom&&at=this.maxzoom?!0:this.visibility==="none"},R.prototype.updateTransitions=function(at){this._transitioningPaint=this._transitionablePaint.transitioned(at,this._transitioningPaint)},R.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},R.prototype.recalculate=function(at,vt){at.getCrossfadeParameters&&(this._crossfadeParameters=at.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(at,void 0,vt)),this.paint=this._transitioningPaint.possiblyEvaluate(at,void 0,vt)},R.prototype.serialize=function(){var at={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(at.layout=at.layout||{},at.layout.visibility=this.visibility),D(at,function(vt,St){return vt!==void 0&&!(St==="layout"&&!Object.keys(vt).length)&&!(St==="paint"&&!Object.keys(vt).length)})},R.prototype._validate=function(at,vt,St,Pt,te){return te===void 0&&(te={}),te&&te.validate===!1?!1:Ri(this,at.call(Dn,{key:vt,layerType:this.type,objectKey:St,value:Pt,styleSpec:Ar,style:{glyphs:!0,sprite:!0}}))},R.prototype.is3D=function(){return!1},R.prototype.isTileClipped=function(){return!1},R.prototype.hasOffscreenPass=function(){return!1},R.prototype.resize=function(){},R.prototype.isStateDependent=function(){for(var at in this.paint._values){var vt=this.paint.get(at);if(!(!(vt instanceof wa)||!ys(vt.property.specification))&&(vt.value.kind==="source"||vt.value.kind==="composite")&&vt.value.isStateDependent)return!0}return!1},R}(dr),is={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bs=function(R,W){this._structArray=R,this._pos1=W*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ea=128,_l=5,ji=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};ji.serialize=function(R,W){return R._trim(),W&&(R.isTransferred=!0,W.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}},ji.deserialize=function(R){var W=Object.create(this.prototype);return W.arrayBuffer=R.arrayBuffer,W.length=R.length,W.capacity=R.arrayBuffer.byteLength/W.bytesPerElement,W._refreshViews(),W},ji.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ji.prototype.clear=function(){this.length=0},ji.prototype.resize=function(R){this.reserve(R),this.length=R},ji.prototype.reserve=function(R){if(R>this.capacity){this.capacity=Math.max(R,Math.floor(this.capacity*_l),Ea),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var W=this.uint8;this._refreshViews(),W&&this.uint8.set(W)}},ji.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function _a(P,R){R===void 0&&(R=1);var W=0,at=0,vt=P.map(function(Pt){var te=zc(Pt.type),ye=W=ed(W,Math.max(R,te)),_e=Pt.components||1;return at=Math.max(at,te),W+=te*_e,{name:Pt.name,type:Pt.type,components:_e,offset:ye}}),St=ed(W,Math.max(at,R));return{members:vt,size:St,alignment:R}}function zc(P){return is[P].BYTES_PER_ELEMENT}function ed(P,R){return Math.ceil(P/R)*R}var nf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt){var St=this.length;return this.resize(St+1),this.emplace(St,at,vt)},R.prototype.emplace=function(at,vt,St){var Pt=at*2;return this.int16[Pt+0]=vt,this.int16[Pt+1]=St,at},R}(ji);nf.prototype.bytesPerElement=4,Bt("StructArrayLayout2i4",nf);var pv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt){var te=this.length;return this.resize(te+1),this.emplace(te,at,vt,St,Pt)},R.prototype.emplace=function(at,vt,St,Pt,te){var ye=at*4;return this.int16[ye+0]=vt,this.int16[ye+1]=St,this.int16[ye+2]=Pt,this.int16[ye+3]=te,at},R}(ji);pv.prototype.bytesPerElement=8,Bt("StructArrayLayout4i8",pv);var Lu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye){var _e=this.length;return this.resize(_e+1),this.emplace(_e,at,vt,St,Pt,te,ye)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e){var Fe=at*6;return this.int16[Fe+0]=vt,this.int16[Fe+1]=St,this.int16[Fe+2]=Pt,this.int16[Fe+3]=te,this.int16[Fe+4]=ye,this.int16[Fe+5]=_e,at},R}(ji);Lu.prototype.bytesPerElement=12,Bt("StructArrayLayout2i4i12",Lu);var Gf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye){var _e=this.length;return this.resize(_e+1),this.emplace(_e,at,vt,St,Pt,te,ye)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e){var Fe=at*4,je=at*8;return this.int16[Fe+0]=vt,this.int16[Fe+1]=St,this.uint8[je+4]=Pt,this.uint8[je+5]=te,this.uint8[je+6]=ye,this.uint8[je+7]=_e,at},R}(ji);Gf.prototype.bytesPerElement=8,Bt("StructArrayLayout2i4ub8",Gf);var Wf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt){var St=this.length;return this.resize(St+1),this.emplace(St,at,vt)},R.prototype.emplace=function(at,vt,St){var Pt=at*2;return this.float32[Pt+0]=vt,this.float32[Pt+1]=St,at},R}(ji);Wf.prototype.bytesPerElement=8,Bt("StructArrayLayout2f8",Wf);var Zo=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar){var tr=this.length;return this.resize(tr+1),this.emplace(tr,at,vt,St,Pt,te,ye,_e,Fe,je,ar)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr){var yr=at*10;return this.uint16[yr+0]=vt,this.uint16[yr+1]=St,this.uint16[yr+2]=Pt,this.uint16[yr+3]=te,this.uint16[yr+4]=ye,this.uint16[yr+5]=_e,this.uint16[yr+6]=Fe,this.uint16[yr+7]=je,this.uint16[yr+8]=ar,this.uint16[yr+9]=tr,at},R}(ji);Zo.prototype.bytesPerElement=20,Bt("StructArrayLayout10ui20",Zo);var Pu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr){var zr=this.length;return this.resize(zr+1),this.emplace(zr,at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr){var ln=at*12;return this.int16[ln+0]=vt,this.int16[ln+1]=St,this.int16[ln+2]=Pt,this.int16[ln+3]=te,this.uint16[ln+4]=ye,this.uint16[ln+5]=_e,this.uint16[ln+6]=Fe,this.uint16[ln+7]=je,this.int16[ln+8]=ar,this.int16[ln+9]=tr,this.int16[ln+10]=yr,this.int16[ln+11]=zr,at},R}(ji);Pu.prototype.bytesPerElement=24,Bt("StructArrayLayout4i4ui4i24",Pu);var gv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*3;return this.float32[te+0]=vt,this.float32[te+1]=St,this.float32[te+2]=Pt,at},R}(ji);gv.prototype.bytesPerElement=12,Bt("StructArrayLayout3f12",gv);var mv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at){var vt=this.length;return this.resize(vt+1),this.emplace(vt,at)},R.prototype.emplace=function(at,vt){var St=at*1;return this.uint32[St+0]=vt,at},R}(ji);mv.prototype.bytesPerElement=4,Bt("StructArrayLayout1ul4",mv);var kc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je){var ar=this.length;return this.resize(ar+1),this.emplace(ar,at,vt,St,Pt,te,ye,_e,Fe,je)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar){var tr=at*10,yr=at*5;return this.int16[tr+0]=vt,this.int16[tr+1]=St,this.int16[tr+2]=Pt,this.int16[tr+3]=te,this.int16[tr+4]=ye,this.int16[tr+5]=_e,this.uint32[yr+3]=Fe,this.uint16[tr+8]=je,this.uint16[tr+9]=ar,at},R}(ji);kc.prototype.bytesPerElement=20,Bt("StructArrayLayout6i1ul2ui20",kc);var ah=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye){var _e=this.length;return this.resize(_e+1),this.emplace(_e,at,vt,St,Pt,te,ye)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e){var Fe=at*6;return this.int16[Fe+0]=vt,this.int16[Fe+1]=St,this.int16[Fe+2]=Pt,this.int16[Fe+3]=te,this.int16[Fe+4]=ye,this.int16[Fe+5]=_e,at},R}(ji);ah.prototype.bytesPerElement=12,Bt("StructArrayLayout2i2i2i12",ah);var tu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te){var ye=this.length;return this.resize(ye+1),this.emplace(ye,at,vt,St,Pt,te)},R.prototype.emplace=function(at,vt,St,Pt,te,ye){var _e=at*4,Fe=at*8;return this.float32[_e+0]=vt,this.float32[_e+1]=St,this.float32[_e+2]=Pt,this.int16[Fe+6]=te,this.int16[Fe+7]=ye,at},R}(ji);tu.prototype.bytesPerElement=16,Bt("StructArrayLayout2f1f2i16",tu);var as=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt){var te=this.length;return this.resize(te+1),this.emplace(te,at,vt,St,Pt)},R.prototype.emplace=function(at,vt,St,Pt,te){var ye=at*12,_e=at*3;return this.uint8[ye+0]=vt,this.uint8[ye+1]=St,this.float32[_e+1]=Pt,this.float32[_e+2]=te,at},R}(ji);as.prototype.bytesPerElement=12,Bt("StructArrayLayout2ub2f12",as);var eu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*3;return this.uint16[te+0]=vt,this.uint16[te+1]=St,this.uint16[te+2]=Pt,at},R}(ji);eu.prototype.bytesPerElement=6,Bt("StructArrayLayout3ui6",eu);var Oc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn){var Mn=this.length;return this.resize(Mn+1),this.emplace(Mn,at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn){var zn=at*24,Wn=at*12,ei=at*48;return this.int16[zn+0]=vt,this.int16[zn+1]=St,this.uint16[zn+2]=Pt,this.uint16[zn+3]=te,this.uint32[Wn+2]=ye,this.uint32[Wn+3]=_e,this.uint32[Wn+4]=Fe,this.uint16[zn+10]=je,this.uint16[zn+11]=ar,this.uint16[zn+12]=tr,this.float32[Wn+7]=yr,this.float32[Wn+8]=zr,this.uint8[ei+36]=ln,this.uint8[ei+37]=tn,this.uint8[ei+38]=Sn,this.uint32[Wn+10]=mn,this.int16[zn+22]=Mn,at},R}(ji);Oc.prototype.bytesPerElement=48,Bt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Oc);var oh=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn,zn,Wn,ei,$n,bi,vi,xi,Ni,wi,Si){var Vi=this.length;return this.resize(Vi+1),this.emplace(Vi,at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn,zn,Wn,ei,$n,bi,vi,xi,Ni,wi,Si)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn,zn,Wn,ei,$n,bi,vi,xi,Ni,wi,Si,Vi){var ki=at*34,aa=at*17;return this.int16[ki+0]=vt,this.int16[ki+1]=St,this.int16[ki+2]=Pt,this.int16[ki+3]=te,this.int16[ki+4]=ye,this.int16[ki+5]=_e,this.int16[ki+6]=Fe,this.int16[ki+7]=je,this.uint16[ki+8]=ar,this.uint16[ki+9]=tr,this.uint16[ki+10]=yr,this.uint16[ki+11]=zr,this.uint16[ki+12]=ln,this.uint16[ki+13]=tn,this.uint16[ki+14]=Sn,this.uint16[ki+15]=mn,this.uint16[ki+16]=Mn,this.uint16[ki+17]=zn,this.uint16[ki+18]=Wn,this.uint16[ki+19]=ei,this.uint16[ki+20]=$n,this.uint16[ki+21]=bi,this.uint16[ki+22]=vi,this.uint32[aa+12]=xi,this.float32[aa+13]=Ni,this.float32[aa+14]=wi,this.float32[aa+15]=Si,this.float32[aa+16]=Vi,at},R}(ji);oh.prototype.bytesPerElement=68,Bt("StructArrayLayout8i15ui1ul4f68",oh);var Yf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at){var vt=this.length;return this.resize(vt+1),this.emplace(vt,at)},R.prototype.emplace=function(at,vt){var St=at*1;return this.float32[St+0]=vt,at},R}(ji);Yf.prototype.bytesPerElement=4,Bt("StructArrayLayout1f4",Yf);var yv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*3;return this.int16[te+0]=vt,this.int16[te+1]=St,this.int16[te+2]=Pt,at},R}(ji);yv.prototype.bytesPerElement=6,Bt("StructArrayLayout3i6",yv);var Ru=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*2,ye=at*4;return this.uint32[te+0]=vt,this.uint16[ye+2]=St,this.uint16[ye+3]=Pt,at},R}(ji);Ru.prototype.bytesPerElement=8,Bt("StructArrayLayout1ul2ui8",Ru);var Nc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt){var St=this.length;return this.resize(St+1),this.emplace(St,at,vt)},R.prototype.emplace=function(at,vt,St){var Pt=at*2;return this.uint16[Pt+0]=vt,this.uint16[Pt+1]=St,at},R}(ji);Nc.prototype.bytesPerElement=4,Bt("StructArrayLayout2ui4",Nc);var Xf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at){var vt=this.length;return this.resize(vt+1),this.emplace(vt,at)},R.prototype.emplace=function(at,vt){var St=at*1;return this.uint16[St+0]=vt,at},R}(ji);Xf.prototype.bytesPerElement=2,Bt("StructArrayLayout1ui2",Xf);var af=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt){var te=this.length;return this.resize(te+1),this.emplace(te,at,vt,St,Pt)},R.prototype.emplace=function(at,vt,St,Pt,te){var ye=at*4;return this.float32[ye+0]=vt,this.float32[ye+1]=St,this.float32[ye+2]=Pt,this.float32[ye+3]=te,at},R}(ji);af.prototype.bytesPerElement=16,Bt("StructArrayLayout4f16",af);var rd=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return W.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},W.x1.get=function(){return this._structArray.int16[this._pos2+2]},W.y1.get=function(){return this._structArray.int16[this._pos2+3]},W.x2.get=function(){return this._structArray.int16[this._pos2+4]},W.y2.get=function(){return this._structArray.int16[this._pos2+5]},W.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},W.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},W.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},W.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(R.prototype,W),R}(bs);rd.prototype.size=20;var xv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new rd(this,at)},R}(kc);Bt("CollisionBoxArray",xv);var of=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return W.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},W.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},W.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},W.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},W.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},W.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},W.segment.get=function(){return this._structArray.uint16[this._pos2+10]},W.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},W.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},W.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},W.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},W.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},W.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},W.placedOrientation.set=function(at){this._structArray.uint8[this._pos1+37]=at},W.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},W.hidden.set=function(at){this._structArray.uint8[this._pos1+38]=at},W.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},W.crossTileID.set=function(at){this._structArray.uint32[this._pos4+10]=at},W.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(R.prototype,W),R}(bs);of.prototype.size=48;var bv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new of(this,at)},R}(Oc);Bt("PlacedSymbolArray",bv);var Zf=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return W.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},W.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},W.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},W.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},W.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},W.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},W.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},W.key.get=function(){return this._structArray.uint16[this._pos2+8]},W.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},W.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},W.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},W.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},W.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},W.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},W.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},W.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},W.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},W.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},W.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},W.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},W.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},W.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},W.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},W.crossTileID.set=function(at){this._structArray.uint32[this._pos4+12]=at},W.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},W.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},W.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},W.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(R.prototype,W),R}(bs);Zf.prototype.size=68;var nd=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new Zf(this,at)},R}(oh);Bt("SymbolInstanceArray",nd);var id=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getoffsetX=function(at){return this.float32[at*1+0]},R}(Yf);Bt("GlyphOffsetArray",id);var tl=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getx=function(at){return this.int16[at*3+0]},R.prototype.gety=function(at){return this.int16[at*3+1]},R.prototype.gettileUnitDistanceFromAnchor=function(at){return this.int16[at*3+2]},R}(yv);Bt("SymbolLineVertexArray",tl);var ad=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return W.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},W.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},W.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(R.prototype,W),R}(bs);ad.prototype.size=8;var od=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new ad(this,at)},R}(Ru);Bt("FeatureIndexArray",od);var Tp=_a([{name:"a_pos",components:2,type:"Int16"}],4),sd=Tp.members,ro=function(R){R===void 0&&(R=[]),this.segments=R};ro.prototype.prepareSegment=function(R,W,at,vt){var St=this.segments[this.segments.length-1];return R>ro.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+ro.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+R),(!St||St.vertexLength+R>ro.MAX_VERTEX_ARRAY_LENGTH||St.sortKey!==vt)&&(St={vertexOffset:W.length,primitiveOffset:at.length,vertexLength:0,primitiveLength:0},vt!==void 0&&(St.sortKey=vt),this.segments.push(St)),St},ro.prototype.get=function(){return this.segments},ro.prototype.destroy=function(){for(var R=0,W=this.segments;R>>16)*ye&65535)<<16)&4294967295,Fe=Fe<<15|Fe>>>17,Fe=(Fe&65535)*_e+(((Fe>>>16)*_e&65535)<<16)&4294967295,Pt^=Fe,Pt=Pt<<13|Pt>>>19,te=(Pt&65535)*5+(((Pt>>>16)*5&65535)<<16)&4294967295,Pt=(te&65535)+27492+(((te>>>16)+58964&65535)<<16);switch(Fe=0,vt){case 3:Fe^=(W.charCodeAt(je+2)&255)<<16;case 2:Fe^=(W.charCodeAt(je+1)&255)<<8;case 1:Fe^=W.charCodeAt(je)&255,Fe=(Fe&65535)*ye+(((Fe>>>16)*ye&65535)<<16)&4294967295,Fe=Fe<<15|Fe>>>17,Fe=(Fe&65535)*_e+(((Fe>>>16)*_e&65535)<<16)&4294967295,Pt^=Fe}return Pt^=W.length,Pt^=Pt>>>16,Pt=(Pt&65535)*2246822507+(((Pt>>>16)*2246822507&65535)<<16)&4294967295,Pt^=Pt>>>13,Pt=(Pt&65535)*3266489909+(((Pt>>>16)*3266489909&65535)<<16)&4294967295,Pt^=Pt>>>16,Pt>>>0}P.exports=R}),rt=S(function(P){function R(W,at){for(var vt=W.length,St=at^vt,Pt=0,te;vt>=4;)te=W.charCodeAt(Pt)&255|(W.charCodeAt(++Pt)&255)<<8|(W.charCodeAt(++Pt)&255)<<16|(W.charCodeAt(++Pt)&255)<<24,te=(te&65535)*1540483477+(((te>>>16)*1540483477&65535)<<16),te^=te>>>24,te=(te&65535)*1540483477+(((te>>>16)*1540483477&65535)<<16),St=(St&65535)*1540483477+(((St>>>16)*1540483477&65535)<<16)^te,vt-=4,++Pt;switch(vt){case 3:St^=(W.charCodeAt(Pt+2)&255)<<16;case 2:St^=(W.charCodeAt(Pt+1)&255)<<8;case 1:St^=W.charCodeAt(Pt)&255,St=(St&65535)*1540483477+(((St>>>16)*1540483477&65535)<<16)}return St^=St>>>13,St=(St&65535)*1540483477+(((St>>>16)*1540483477&65535)<<16),St^=St>>>15,St>>>0}P.exports=R}),pt=dt,Ot=dt,Qt=rt;pt.murmur3=Ot,pt.murmur2=Qt;var ue=function(){this.ids=[],this.positions=[],this.indexed=!1};ue.prototype.add=function(R,W,at,vt){this.ids.push(We(R)),this.positions.push(W,at,vt)},ue.prototype.getPositions=function(R){for(var W=We(R),at=0,vt=this.ids.length-1;at>1;this.ids[St]>=W?vt=St:at=St+1}for(var Pt=[];this.ids[at]===W;){var te=this.positions[3*at],ye=this.positions[3*at+1],_e=this.positions[3*at+2];Pt.push({index:te,start:ye,end:_e}),at++}return Pt},ue.serialize=function(R,W){var at=new Float64Array(R.ids),vt=new Uint32Array(R.positions);return qe(at,vt,0,at.length-1),W&&W.push(at.buffer,vt.buffer),{ids:at,positions:vt}},ue.deserialize=function(R){var W=new ue;return W.ids=R.ids,W.positions=R.positions,W.indexed=!0,W};var Re=Math.pow(2,53)-1;function We(P){var R=+P;return!isNaN(R)&&R<=Re?R:pt(String(P))}function qe(P,R,W,at){for(;W>1],St=W-1,Pt=at+1;;){do St++;while(P[St]vt);if(St>=Pt)break;cr(P,St,Pt),cr(R,3*St,3*Pt),cr(R,3*St+1,3*Pt+1),cr(R,3*St+2,3*Pt+2)}Pt-WPt.x+1||yePt.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return W}function Ta(P,R){return{type:P.type,id:P.id,properties:P.properties,geometry:R?qi(P):[]}}function Ki(P,R,W,at,vt){P.emplaceBack(R*2+(at+1)/2,W*2+(vt+1)/2)}var ma=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(W){return W.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new nf,this.indexArray=new eu,this.segments=new ro,this.programConfigurations=new hi(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(function(W){return W.isStateDependent()}).map(function(W){return W.id})};ma.prototype.populate=function(R,W,at){var vt=this.layers[0],St=[],Pt=null;vt.type==="circle"&&(Pt=vt.layout.get("circle-sort-key"));for(var te=0,ye=R;te=Ai||ar<0||ar>=Ai)){var tr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),yr=tr.vertexLength;Ki(this.layoutVertexArray,je,ar,-1,-1),Ki(this.layoutVertexArray,je,ar,1,-1),Ki(this.layoutVertexArray,je,ar,1,1),Ki(this.layoutVertexArray,je,ar,-1,1),this.indexArray.emplaceBack(yr,yr+1,yr+2),this.indexArray.emplaceBack(yr,yr+3,yr+2),tr.vertexLength+=4,tr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,at,{},vt)},Bt("CircleBucket",ma,{omit:["layers"]});function Hi(P,R){for(var W=0;W=3){for(var St=0;St1){if(Bs(P,R))return!0;for(var at=0;at1?P.distSqr(W):P.distSqr(W.sub(R)._mult(vt)._add(R))}function Ll(P,R){for(var W=!1,at,vt,St,Pt=0;PtR.y!=St.y>R.y&&R.x<(St.x-vt.x)*(R.y-vt.y)/(St.y-vt.y)+vt.x&&(W=!W)}return W}function jo(P,R){for(var W=!1,at=0,vt=P.length-1;atR.y!=Pt.y>R.y&&R.x<(Pt.x-St.x)*(R.y-St.y)/(Pt.y-St.y)+St.x&&(W=!W)}return W}function Pl(P,R,W,at,vt){for(var St=0,Pt=P;St=te.x&&vt>=te.y)return!0}var ye=[new r(R,W),new r(R,vt),new r(at,vt),new r(at,W)];if(P.length>2)for(var _e=0,Fe=ye;_evt.x&&R.x>vt.x||P.yvt.y&&R.y>vt.y)return!1;var St=O(P,R,W[0]);return St!==O(P,R,W[1])||St!==O(P,R,W[2])||St!==O(P,R,W[3])}function Ko(P,R,W){var at=R.paint.get(P).value;return at.kind==="constant"?at.value:W.programConfigurations.get(R.id).getMaxValue(P)}function rl(P){return Math.sqrt(P[0]*P[0]+P[1]*P[1])}function ru(P,R,W,at,vt){if(!R[0]&&!R[1])return P;var St=r.convert(R)._mult(vt);W==="viewport"&&St._rotate(-at);for(var Pt=[],te=0;te0&&(St=1/Math.sqrt(St)),P[0]=R[0]*St,P[1]=R[1]*St,P[2]=R[2]*St,P}function I1(P,R){return P[0]*R[0]+P[1]*R[1]+P[2]*R[2]}function F1(P,R,W){var at=R[0],vt=R[1],St=R[2],Pt=W[0],te=W[1],ye=W[2];return P[0]=vt*ye-St*te,P[1]=St*Pt-at*ye,P[2]=at*te-vt*Pt,P}function z1(P,R,W){var at=R[0],vt=R[1],St=R[2];return P[0]=at*W[0]+vt*W[3]+St*W[6],P[1]=at*W[1]+vt*W[4]+St*W[7],P[2]=at*W[2]+vt*W[5]+St*W[8],P}var k1=Ep;(function(){var P=Uc();return function(R,W,at,vt,St,Pt){var te,ye;for(W||(W=3),at||(at=0),vt?ye=Math.min(vt*W+at,R.length):ye=R.length,te=at;teP.width||vt.height>P.height||W.x>P.width-vt.width||W.y>P.height-vt.height)throw new RangeError("out of range source coordinates for image copy");if(vt.width>R.width||vt.height>R.height||at.x>R.width-vt.width||at.y>R.height-vt.height)throw new RangeError("out of range destination coordinates for image copy");for(var Pt=P.data,te=R.data,ye=0;ye80*W){te=_e=P[0],ye=Fe=P[1];for(var yr=W;yr_e&&(_e=je),ar>Fe&&(Fe=ar);tr=Math.max(_e-te,Fe-ye),tr=tr!==0?1/tr:0}return Av(St,Pt,W,te,ye,tr),Pt}function tg(P,R,W,at,vt){var St,Pt;if(vt===Ip(P,R,W,at)>0)for(St=R;St=R;St-=at)Pt=ng(St,P[St],P[St+1],Pt);return Pt&&fd(Pt,Pt.next)&&(Sv(Pt),Pt=Pt.next),Pt}function $f(P,R){if(!P)return P;R||(R=P);var W=P,at;do if(at=!1,!W.steiner&&(fd(W,W.next)||no(W.prev,W,W.next)===0)){if(Sv(W),W=R=W.prev,W===W.next)break;at=!0}else W=W.next;while(at||W!==R);return R}function Av(P,R,W,at,vt,St,Pt){if(P){!Pt&&St&&ux(P,at,vt,St);for(var te=P,ye,_e;P.prev!==P.next;){if(ye=P.prev,_e=P.next,St?ex(P,at,vt,St):tx(P)){R.push(ye.i/W),R.push(P.i/W),R.push(_e.i/W),Sv(P),P=_e.next,te=_e.next;continue}if(P=_e,P===te){Pt?Pt===1?(P=rx($f(P),R,W),Av(P,R,W,at,vt,St,2)):Pt===2&&nx(P,R,W,at,vt,St):Av($f(P),R,W,at,vt,St,1);break}}}}function tx(P){var R=P.prev,W=P,at=P.next;if(no(R,W,at)>=0)return!1;for(var vt=P.next.next;vt!==P.prev;){if(dh(R.x,R.y,W.x,W.y,at.x,at.y,vt.x,vt.y)&&no(vt.prev,vt,vt.next)>=0)return!1;vt=vt.next}return!0}function ex(P,R,W,at){var vt=P.prev,St=P,Pt=P.next;if(no(vt,St,Pt)>=0)return!1;for(var te=vt.xSt.x?vt.x>Pt.x?vt.x:Pt.x:St.x>Pt.x?St.x:Pt.x,Fe=vt.y>St.y?vt.y>Pt.y?vt.y:Pt.y:St.y>Pt.y?St.y:Pt.y,je=Rp(te,ye,R,W,at),ar=Rp(_e,Fe,R,W,at),tr=P.prevZ,yr=P.nextZ;tr&&tr.z>=je&&yr&&yr.z<=ar;){if(tr!==P.prev&&tr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,tr.x,tr.y)&&no(tr.prev,tr,tr.next)>=0||(tr=tr.prevZ,yr!==P.prev&&yr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,yr.x,yr.y)&&no(yr.prev,yr,yr.next)>=0))return!1;yr=yr.nextZ}for(;tr&&tr.z>=je;){if(tr!==P.prev&&tr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,tr.x,tr.y)&&no(tr.prev,tr,tr.next)>=0)return!1;tr=tr.prevZ}for(;yr&&yr.z<=ar;){if(yr!==P.prev&&yr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,yr.x,yr.y)&&no(yr.prev,yr,yr.next)>=0)return!1;yr=yr.nextZ}return!0}function rx(P,R,W){var at=P;do{var vt=at.prev,St=at.next.next;!fd(vt,St)&&eg(vt,at,at.next,St)&&Mv(vt,St)&&Mv(St,vt)&&(R.push(vt.i/W),R.push(at.i/W),R.push(St.i/W),Sv(at),Sv(at.next),at=P=St),at=at.next}while(at!==P);return $f(at)}function nx(P,R,W,at,vt,St){var Pt=P;do{for(var te=Pt.next.next;te!==Pt.prev;){if(Pt.i!==te.i&&hx(Pt,te)){var ye=rg(Pt,te);Pt=$f(Pt,Pt.next),ye=$f(ye,ye.next),Av(Pt,R,W,at,vt,St),Av(ye,R,W,at,vt,St);return}te=te.next}Pt=Pt.next}while(Pt!==P)}function ix(P,R,W,at){var vt=[],St,Pt,te,ye,_e;for(St=0,Pt=R.length;St=W.next.y&&W.next.y!==W.y){var te=W.x+(vt-W.y)*(W.next.x-W.x)/(W.next.y-W.y);if(te<=at&&te>St){if(St=te,te===at){if(vt===W.y)return W;if(vt===W.next.y)return W.next}Pt=W.x=W.x&&W.x>=_e&&at!==W.x&&dh(vtPt.x||W.x===Pt.x&&lx(Pt,W)))&&(Pt=W,je=ar)),W=W.next;while(W!==ye);return Pt}function lx(P,R){return no(P.prev,P,R.prev)<0&&no(R.next,P,P.next)<0}function ux(P,R,W,at){var vt=P;do vt.z===null&&(vt.z=Rp(vt.x,vt.y,R,W,at)),vt.prevZ=vt.prev,vt.nextZ=vt.next,vt=vt.next;while(vt!==P);vt.prevZ.nextZ=null,vt.prevZ=null,fx(vt)}function fx(P){var R,W,at,vt,St,Pt,te,ye,_e=1;do{for(W=P,P=null,St=null,Pt=0;W;){for(Pt++,at=W,te=0,R=0;R<_e&&(te++,at=at.nextZ,!!at);R++);for(ye=_e;te>0||ye>0&&at;)te!==0&&(ye===0||!at||W.z<=at.z)?(vt=W,W=W.nextZ,te--):(vt=at,at=at.nextZ,ye--),St?St.nextZ=vt:P=vt,vt.prevZ=St,St=vt;W=at}St.nextZ=null,_e*=2}while(Pt>1);return P}function Rp(P,R,W,at,vt){return P=32767*(P-W)*vt,R=32767*(R-at)*vt,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,P|R<<1}function cx(P){var R=P,W=P;do(R.x=0&&(P-Pt)*(at-te)-(W-Pt)*(R-te)>=0&&(W-Pt)*(St-te)-(vt-Pt)*(at-te)>=0}function hx(P,R){return P.next.i!==R.i&&P.prev.i!==R.i&&!vx(P,R)&&(Mv(P,R)&&Mv(R,P)&&dx(P,R)&&(no(P.prev,P,R.prev)||no(P,R.prev,R))||fd(P,R)&&no(P.prev,P,P.next)>0&&no(R.prev,R,R.next)>0)}function no(P,R,W){return(R.y-P.y)*(W.x-R.x)-(R.x-P.x)*(W.y-R.y)}function fd(P,R){return P.x===R.x&&P.y===R.y}function eg(P,R,W,at){var vt=hd(no(P,R,W)),St=hd(no(P,R,at)),Pt=hd(no(W,at,P)),te=hd(no(W,at,R));return!!(vt!==St&&Pt!==te||vt===0&&cd(P,W,R)||St===0&&cd(P,at,R)||Pt===0&&cd(W,P,at)||te===0&&cd(W,R,at))}function cd(P,R,W){return R.x<=Math.max(P.x,W.x)&&R.x>=Math.min(P.x,W.x)&&R.y<=Math.max(P.y,W.y)&&R.y>=Math.min(P.y,W.y)}function hd(P){return P>0?1:P<0?-1:0}function vx(P,R){var W=P;do{if(W.i!==P.i&&W.next.i!==P.i&&W.i!==R.i&&W.next.i!==R.i&&eg(W,W.next,P,R))return!0;W=W.next}while(W!==P);return!1}function Mv(P,R){return no(P.prev,P,P.next)<0?no(P,R,P.next)>=0&&no(P,P.prev,R)>=0:no(P,R,P.prev)<0||no(P,P.next,R)<0}function dx(P,R){var W=P,at=!1,vt=(P.x+R.x)/2,St=(P.y+R.y)/2;do W.y>St!=W.next.y>St&&W.next.y!==W.y&&vt<(W.next.x-W.x)*(St-W.y)/(W.next.y-W.y)+W.x&&(at=!at),W=W.next;while(W!==P);return at}function rg(P,R){var W=new Dp(P.i,P.x,P.y),at=new Dp(R.i,R.x,R.y),vt=P.next,St=R.prev;return P.next=R,R.prev=P,W.next=vt,vt.prev=W,at.next=W,W.prev=at,St.next=at,at.prev=St,at}function ng(P,R,W,at){var vt=new Dp(P,R,W);return at?(vt.next=at.next,vt.prev=at,at.next.prev=vt,at.next=vt):(vt.prev=vt,vt.next=vt),vt}function Sv(P){P.next.prev=P.prev,P.prev.next=P.next,P.prevZ&&(P.prevZ.nextZ=P.nextZ),P.nextZ&&(P.nextZ.prevZ=P.prevZ)}function Dp(P,R,W){this.i=P,this.x=R,this.y=W,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}ud.deviation=function(P,R,W,at){var vt=R&&R.length,St=vt?R[0]*W:P.length,Pt=Math.abs(Ip(P,0,St,W));if(vt)for(var te=0,ye=R.length;te0&&(at+=P[vt-1].length,W.holes.push(at))}return W},Pp.default=q1;function px(P,R,W,at,vt){ig(P,R,W||0,at||P.length-1,vt||gx)}function ig(P,R,W,at,vt){for(;at>W;){if(at-W>600){var St=at-W+1,Pt=R-W+1,te=Math.log(St),ye=.5*Math.exp(2*te/3),_e=.5*Math.sqrt(te*ye*(St-ye)/St)*(Pt-St/2<0?-1:1),Fe=Math.max(W,Math.floor(R-Pt*ye/St+_e)),je=Math.min(at,Math.floor(R+(St-Pt)*ye/St+_e));ig(P,R,Fe,je,vt)}var ar=P[R],tr=W,yr=at;for(Ev(P,W,R),vt(P[at],ar)>0&&Ev(P,W,at);tr0;)yr--}vt(P[W],ar)===0?Ev(P,W,yr):(yr++,Ev(P,yr,at)),yr<=R&&(W=yr+1),R<=yr&&(at=yr-1)}}function Ev(P,R,W){var at=P[R];P[R]=P[W],P[W]=at}function gx(P,R){return PR?1:0}function Fp(P,R){var W=P.length;if(W<=1)return[P];for(var at=[],vt,St,Pt=0;Pt1)for(var ye=0;ye>3}if(at--,W===1||W===2)vt+=P.readSVarint(),St+=P.readSVarint(),W===1&&(te&&Pt.push(te),te=[]),te.push(new r(vt,St));else if(W===7)te&&te.push(te[0].clone());else throw new Error("unknown command "+W)}return te&&Pt.push(te),Pt},ph.prototype.bbox=function(){var P=this._pbf;P.pos=this._geometry;for(var R=P.readVarint()+P.pos,W=1,at=0,vt=0,St=0,Pt=1/0,te=-1/0,ye=1/0,_e=-1/0;P.pos>3}if(at--,W===1||W===2)vt+=P.readSVarint(),St+=P.readSVarint(),vtte&&(te=vt),St_e&&(_e=St);else if(W!==7)throw new Error("unknown command "+W)}return[Pt,ye,te,_e]},ph.prototype.toGeoJSON=function(P,R,W){var at=this.extent*Math.pow(2,W),vt=this.extent*P,St=this.extent*R,Pt=this.loadGeometry(),te=ph.types[this.type],ye,_e;function Fe(tr){for(var yr=0;yr>3;R=at===1?P.readString():at===2?P.readFloat():at===3?P.readDouble():at===4?P.readVarint64():at===5?P.readVarint():at===6?P.readSVarint():at===7?P.readBoolean():null}return R}sg.prototype.feature=function(P){if(P<0||P>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[P];var R=this._pbf.readVarint()+this._pbf.pos;return new ag(this._pbf,R,this.extent,this._keys,this._values)};var Rx=Dx;function Dx(P,R){this.layers=P.readFields(Ix,{},R)}function Ix(P,R,W){if(P===3){var at=new og(W,W.readVarint()+W.pos);at.length&&(R[at.name]=at)}}var Fx=Rx,zx=ag,kx=og,gh={VectorTile:Fx,VectorTileFeature:zx,VectorTileLayer:kx},Ox=gh.VectorTileFeature.types,Nx=500,Op=Math.pow(2,13);function _v(P,R,W,at,vt,St,Pt,te){P.emplaceBack(R,W,Math.floor(at*Op)*2+Pt,vt*Op*2,St*Op*2,Math.round(te))}var iu=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(W){return W.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new Lu,this.indexArray=new eu,this.programConfigurations=new hi(R.layers,R.zoom),this.segments=new ro,this.stateDependentLayerIds=this.layers.filter(function(W){return W.isStateDependent()}).map(function(W){return W.id})};iu.prototype.populate=function(R,W,at){this.features=[],this.hasPattern=zp("fill-extrusion",this.layers,W);for(var vt=0,St=R;vt=1){var Mn=ln[Sn-1];if(!Bx(mn,Mn)){tr.vertexLength+4>ro.MAX_VERTEX_ARRAY_LENGTH&&(tr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var zn=mn.sub(Mn)._perp()._unit(),Wn=Mn.dist(mn);tn+Wn>32768&&(tn=0),_v(this.layoutVertexArray,mn.x,mn.y,zn.x,zn.y,0,0,tn),_v(this.layoutVertexArray,mn.x,mn.y,zn.x,zn.y,0,1,tn),tn+=Wn,_v(this.layoutVertexArray,Mn.x,Mn.y,zn.x,zn.y,0,0,tn),_v(this.layoutVertexArray,Mn.x,Mn.y,zn.x,zn.y,0,1,tn);var ei=tr.vertexLength;this.indexArray.emplaceBack(ei,ei+2,ei+1),this.indexArray.emplaceBack(ei+1,ei+2,ei+3),tr.vertexLength+=4,tr.primitiveLength+=2}}}}if(tr.vertexLength+_e>ro.MAX_VERTEX_ARRAY_LENGTH&&(tr=this.segments.prepareSegment(_e,this.layoutVertexArray,this.indexArray)),Ox[R.type]==="Polygon"){for(var $n=[],bi=[],vi=tr.vertexLength,xi=0,Ni=ye;xiAi)||P.y===R.y&&(P.y<0||P.y>Ai)}function Ux(P){return P.every(function(R){return R.x<0})||P.every(function(R){return R.x>Ai})||P.every(function(R){return R.y<0})||P.every(function(R){return R.y>Ai})}var Hx=new ca({"fill-extrusion-opacity":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ao(Ar["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),Vx={paint:Hx},Gx=function(P){function R(W){P.call(this,W,Vx)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.createBucket=function(at){return new iu(at)},R.prototype.queryRadius=function(){return rl(this.paint.get("fill-extrusion-translate"))},R.prototype.is3D=function(){return!0},R.prototype.queryIntersectsFeature=function(at,vt,St,Pt,te,ye,_e,Fe){var je=ru(at,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),ye.angle,_e),ar=this.paint.get("fill-extrusion-height").evaluate(vt,St),tr=this.paint.get("fill-extrusion-base").evaluate(vt,St),yr=Xx(je,Fe,ye,0),zr=Yx(Pt,tr,ar,Fe),ln=zr[0],tn=zr[1];return Wx(ln,tn,yr)},R}(Oa);function Cv(P,R){return P.x*R.x+P.y*R.y}function lg(P,R){if(P.length===1){for(var W=0,at=R[W++],vt;!vt||at.equals(vt);)if(vt=R[W++],!vt)return 1/0;for(;W=2&&R[_e-1].equals(R[_e-2]);)_e--;for(var Fe=0;Fe<_e-1&&R[Fe].equals(R[Fe+1]);)Fe++;if(!(_e<(ye?3:2))){at==="bevel"&&(St=1.05);var je=this.overscaling<=16?qx*Ai/(512*this.overscaling):0,ar=this.segments.prepareSegment(_e*10,this.layoutVertexArray,this.indexArray),tr,yr=void 0,zr=void 0,ln=void 0,tn=void 0;this.e1=this.e2=-1,ye&&(tr=R[_e-2],tn=R[Fe].sub(tr)._unit()._perp());for(var Sn=Fe;Sn<_e;Sn++)if(zr=Sn===_e-1?ye?R[Fe+1]:void 0:R[Sn+1],!(zr&&R[Sn].equals(zr))){tn&&(ln=tn),tr&&(yr=tr),tr=R[Sn],tn=zr?zr.sub(tr)._unit()._perp():ln,ln=ln||tn;var mn=ln.add(tn);(mn.x!==0||mn.y!==0)&&mn._unit();var Mn=ln.x*tn.x+ln.y*tn.y,zn=mn.x*tn.x+mn.y*tn.y,Wn=zn!==0?1/zn:1/0,ei=2*Math.sqrt(2-2*zn),$n=zn<$x&&yr&&zr,bi=ln.x*tn.y-ln.y*tn.x>0;if($n&&Sn>Fe){var vi=tr.dist(yr);if(vi>2*je){var xi=tr.sub(tr.sub(yr)._mult(je/vi)._round());this.updateDistance(yr,xi),this.addCurrentVertex(xi,ln,0,0,ar),yr=xi}}var Ni=yr&&zr,wi=Ni?at:ye?"butt":vt;if(Ni&&wi==="round"&&(WnSt&&(wi="bevel"),wi==="bevel"&&(Wn>2&&(wi="flipbevel"),Wn100)mn=tn.mult(-1);else{var Si=Wn*ln.add(tn).mag()/ln.sub(tn).mag();mn._perp()._mult(Si*(bi?-1:1))}this.addCurrentVertex(tr,mn,0,0,ar),this.addCurrentVertex(tr,mn.mult(-1),0,0,ar)}else if(wi==="bevel"||wi==="fakeround"){var Vi=-Math.sqrt(Wn*Wn-1),ki=bi?Vi:0,aa=bi?0:Vi;if(yr&&this.addCurrentVertex(tr,ln,ki,aa,ar),wi==="fakeround")for(var xa=Math.round(ei*180/Math.PI/tb),oa=1;oa2*je){var oo=tr.add(zr.sub(tr)._mult(je/mo)._round());this.updateDistance(tr,oo),this.addCurrentVertex(oo,tn,0,0,ar),tr=oo}}}}},Jo.prototype.addCurrentVertex=function(R,W,at,vt,St,Pt){Pt===void 0&&(Pt=!1);var te=W.x+W.y*at,ye=W.y-W.x*at,_e=-W.x+W.y*vt,Fe=-W.y-W.x*vt;this.addHalfVertex(R,te,ye,Pt,!1,at,St),this.addHalfVertex(R,_e,Fe,Pt,!0,-vt,St),this.distance>cg/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(R,W,at,vt,St,Pt))},Jo.prototype.addHalfVertex=function(R,W,at,vt,St,Pt,te){var ye=R.x,_e=R.y,Fe=this.lineClips?this.scaledDistance*(cg-1):this.scaledDistance,je=Fe*fg;if(this.layoutVertexArray.emplaceBack((ye<<1)+(vt?1:0),(_e<<1)+(St?1:0),Math.round(ug*W)+128,Math.round(ug*at)+128,(Pt===0?0:Pt<0?-1:1)+1|(je&63)<<2,je>>6),this.lineClips){var ar=this.scaledDistance-this.lineClips.start,tr=this.lineClips.end-this.lineClips.start,yr=ar/tr;this.layoutVertexArray2.emplaceBack(yr,this.lineClipsArray.length)}var zr=te.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,zr),te.primitiveLength++),St?this.e2=zr:this.e1=zr},Jo.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Jo.prototype.updateDistance=function(R,W){this.distance+=R.dist(W),this.updateScaledDistance()},Bt("LineBucket",Jo,{omit:["layers","patternFeatures"]});var rb=new ca({"line-cap":new oi(Ar.layout_line["line-cap"]),"line-join":new Ei(Ar.layout_line["line-join"]),"line-miter-limit":new oi(Ar.layout_line["line-miter-limit"]),"line-round-limit":new oi(Ar.layout_line["line-round-limit"]),"line-sort-key":new Ei(Ar.layout_line["line-sort-key"])}),nb=new ca({"line-opacity":new Ei(Ar.paint_line["line-opacity"]),"line-color":new Ei(Ar.paint_line["line-color"]),"line-translate":new oi(Ar.paint_line["line-translate"]),"line-translate-anchor":new oi(Ar.paint_line["line-translate-anchor"]),"line-width":new Ei(Ar.paint_line["line-width"]),"line-gap-width":new Ei(Ar.paint_line["line-gap-width"]),"line-offset":new Ei(Ar.paint_line["line-offset"]),"line-blur":new Ei(Ar.paint_line["line-blur"]),"line-dasharray":new Lo(Ar.paint_line["line-dasharray"]),"line-pattern":new Ao(Ar.paint_line["line-pattern"]),"line-gradient":new eo(Ar.paint_line["line-gradient"])}),hg={paint:nb,layout:rb},ib=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.possiblyEvaluate=function(at,vt){return vt=new Ti(Math.floor(vt.zoom),{now:vt.now,fadeDuration:vt.fadeDuration,zoomHistory:vt.zoomHistory,transition:vt.transition}),P.prototype.possiblyEvaluate.call(this,at,vt)},R.prototype.evaluate=function(at,vt,St,Pt){return vt=w({},vt,{zoom:Math.floor(vt.zoom)}),P.prototype.evaluate.call(this,at,vt,St,Pt)},R}(Ei),vg=new ib(hg.paint.properties["line-width"].specification);vg.useIntegerZoom=!0;var ab=function(P){function R(W){P.call(this,W,hg),this.gradientVersion=0}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._handleSpecialPaintPropertyUpdate=function(at){if(at==="line-gradient"){var vt=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=vt._styleExpression.expression instanceof Ho,this.gradientVersion=(this.gradientVersion+1)%f}},R.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},R.prototype.recalculate=function(at,vt){P.prototype.recalculate.call(this,at,vt),this.paint._values["line-floorwidth"]=vg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,at)},R.prototype.createBucket=function(at){return new Jo(at)},R.prototype.queryRadius=function(at){var vt=at,St=dg(Ko("line-width",this,vt),Ko("line-gap-width",this,vt)),Pt=Ko("line-offset",this,vt);return St/2+Math.abs(Pt)+rl(this.paint.get("line-translate"))},R.prototype.queryIntersectsFeature=function(at,vt,St,Pt,te,ye,_e){var Fe=ru(at,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ye.angle,_e),je=_e/2*dg(this.paint.get("line-width").evaluate(vt,St),this.paint.get("line-gap-width").evaluate(vt,St)),ar=this.paint.get("line-offset").evaluate(vt,St);return ar&&(Pt=ob(Pt,ar*_e)),fo(Fe,Pt,je)},R.prototype.isTileClipped=function(){return!0},R}(Oa);function dg(P,R){return R>0?R+2*P:P}function ob(P,R){for(var W=[],at=new r(0,0),vt=0;vt":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function db(P){for(var R="",W=0;W>1,Fe=-7,je=W?vt-1:0,ar=W?-1:1,tr=P[R+je];for(je+=ar,St=tr&(1<<-Fe)-1,tr>>=-Fe,Fe+=te;Fe>0;St=St*256+P[R+je],je+=ar,Fe-=8);for(Pt=St&(1<<-Fe)-1,St>>=-Fe,Fe+=at;Fe>0;Pt=Pt*256+P[R+je],je+=ar,Fe-=8);if(St===0)St=1-_e;else{if(St===ye)return Pt?NaN:(tr?-1:1)*(1/0);Pt=Pt+Math.pow(2,at),St=St-_e}return(tr?-1:1)*Pt*Math.pow(2,St-at)},gb=function(P,R,W,at,vt,St){var Pt,te,ye,_e=St*8-vt-1,Fe=(1<<_e)-1,je=Fe>>1,ar=vt===23?Math.pow(2,-24)-Math.pow(2,-77):0,tr=at?0:St-1,yr=at?1:-1,zr=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(te=isNaN(R)?1:0,Pt=Fe):(Pt=Math.floor(Math.log(R)/Math.LN2),R*(ye=Math.pow(2,-Pt))<1&&(Pt--,ye*=2),Pt+je>=1?R+=ar/ye:R+=ar*Math.pow(2,1-je),R*ye>=2&&(Pt++,ye/=2),Pt+je>=Fe?(te=0,Pt=Fe):Pt+je>=1?(te=(R*ye-1)*Math.pow(2,vt),Pt=Pt+je):(te=R*Math.pow(2,je-1)*Math.pow(2,vt),Pt=0));vt>=8;P[W+tr]=te&255,tr+=yr,te/=256,vt-=8);for(Pt=Pt<0;P[W+tr]=Pt&255,tr+=yr,Pt/=256,_e-=8);P[W+tr-yr]|=zr*128},vd={read:pb,write:gb},dd=Ma;function Ma(P){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(P)?P:new Uint8Array(P||0),this.pos=0,this.type=0,this.length=this.buf.length}Ma.Varint=0,Ma.Fixed64=1,Ma.Bytes=2,Ma.Fixed32=5;var Np=65536*65536,gg=1/Np,mb=12,mg=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Ma.prototype={destroy:function(){this.buf=null},readFields:function(P,R,W){for(W=W||this.length;this.pos>3,St=this.pos;this.type=at&7,P(vt,R,this),this.pos===St&&this.skip(at)}return R},readMessage:function(P,R){return this.readFields(P,R,this.readVarint()+this.pos)},readFixed32:function(){var P=pd(this.buf,this.pos);return this.pos+=4,P},readSFixed32:function(){var P=xg(this.buf,this.pos);return this.pos+=4,P},readFixed64:function(){var P=pd(this.buf,this.pos)+pd(this.buf,this.pos+4)*Np;return this.pos+=8,P},readSFixed64:function(){var P=pd(this.buf,this.pos)+xg(this.buf,this.pos+4)*Np;return this.pos+=8,P},readFloat:function(){var P=vd.read(this.buf,this.pos,!0,23,4);return this.pos+=4,P},readDouble:function(){var P=vd.read(this.buf,this.pos,!0,52,8);return this.pos+=8,P},readVarint:function(P){var R=this.buf,W,at;return at=R[this.pos++],W=at&127,at<128||(at=R[this.pos++],W|=(at&127)<<7,at<128)||(at=R[this.pos++],W|=(at&127)<<14,at<128)||(at=R[this.pos++],W|=(at&127)<<21,at<128)?W:(at=R[this.pos],W|=(at&15)<<28,yb(W,P,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var P=this.readVarint();return P%2===1?(P+1)/-2:P/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var P=this.readVarint()+this.pos,R=this.pos;return this.pos=P,P-R>=mb&&mg?Db(this.buf,R,P):Rb(this.buf,R,P)},readBytes:function(){var P=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,P);return this.pos=P,R},readPackedVarint:function(P,R){if(this.type!==Ma.Bytes)return P.push(this.readVarint(R));var W=lf(this);for(P=P||[];this.pos127;);else if(R===Ma.Bytes)this.pos=this.readVarint()+this.pos;else if(R===Ma.Fixed32)this.pos+=4;else if(R===Ma.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+R)},writeTag:function(P,R){this.writeVarint(P<<3|R)},realloc:function(P){for(var R=this.length||16;R268435455||P<0){xb(P,this);return}this.realloc(4),this.buf[this.pos++]=P&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=(P>>>=7)&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=(P>>>=7)&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=P>>>7&127)))},writeSVarint:function(P){this.writeVarint(P<0?-P*2-1:P*2)},writeBoolean:function(P){this.writeVarint(!!P)},writeString:function(P){P=String(P),this.realloc(P.length*4),this.pos++;var R=this.pos;this.pos=Ib(this.buf,P,this.pos);var W=this.pos-R;W>=128&&yg(R,W,this),this.pos=R-1,this.writeVarint(W),this.pos+=W},writeFloat:function(P){this.realloc(4),vd.write(this.buf,P,this.pos,!0,23,4),this.pos+=4},writeDouble:function(P){this.realloc(8),vd.write(this.buf,P,this.pos,!0,52,8),this.pos+=8},writeBytes:function(P){var R=P.length;this.writeVarint(R),this.realloc(R);for(var W=0;W=128&&yg(W,at,this),this.pos=W-1,this.writeVarint(at),this.pos+=at},writeMessage:function(P,R,W){this.writeTag(P,Ma.Bytes),this.writeRawMessage(R,W)},writePackedVarint:function(P,R){R.length&&this.writeMessage(P,Tb,R)},writePackedSVarint:function(P,R){R.length&&this.writeMessage(P,Ab,R)},writePackedBoolean:function(P,R){R.length&&this.writeMessage(P,Eb,R)},writePackedFloat:function(P,R){R.length&&this.writeMessage(P,Mb,R)},writePackedDouble:function(P,R){R.length&&this.writeMessage(P,Sb,R)},writePackedFixed32:function(P,R){R.length&&this.writeMessage(P,_b,R)},writePackedSFixed32:function(P,R){R.length&&this.writeMessage(P,Cb,R)},writePackedFixed64:function(P,R){R.length&&this.writeMessage(P,Lb,R)},writePackedSFixed64:function(P,R){R.length&&this.writeMessage(P,Pb,R)},writeBytesField:function(P,R){this.writeTag(P,Ma.Bytes),this.writeBytes(R)},writeFixed32Field:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeSFixed64(R)},writeVarintField:function(P,R){this.writeTag(P,Ma.Varint),this.writeVarint(R)},writeSVarintField:function(P,R){this.writeTag(P,Ma.Varint),this.writeSVarint(R)},writeStringField:function(P,R){this.writeTag(P,Ma.Bytes),this.writeString(R)},writeFloatField:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeFloat(R)},writeDoubleField:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeDouble(R)},writeBooleanField:function(P,R){this.writeVarintField(P,!!R)}};function yb(P,R,W){var at=W.buf,vt,St;if(St=at[W.pos++],vt=(St&112)>>4,St<128||(St=at[W.pos++],vt|=(St&127)<<3,St<128)||(St=at[W.pos++],vt|=(St&127)<<10,St<128)||(St=at[W.pos++],vt|=(St&127)<<17,St<128)||(St=at[W.pos++],vt|=(St&127)<<24,St<128)||(St=at[W.pos++],vt|=(St&1)<<31,St<128))return mh(P,vt,R);throw new Error("Expected varint not more than 10 bytes")}function lf(P){return P.type===Ma.Bytes?P.readVarint()+P.pos:P.pos+1}function mh(P,R,W){return W?R*4294967296+(P>>>0):(R>>>0)*4294967296+(P>>>0)}function xb(P,R){var W,at;if(P>=0?(W=P%4294967296|0,at=P/4294967296|0):(W=~(-P%4294967296),at=~(-P/4294967296),W^4294967295?W=W+1|0:(W=0,at=at+1|0)),P>=18446744073709552e3||P<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");R.realloc(10),bb(W,at,R),wb(at,R)}function bb(P,R,W){W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos]=P&127}function wb(P,R){var W=(P&7)<<4;R.buf[R.pos++]|=W|((P>>>=3)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127)))))}function yg(P,R,W){var at=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(Math.LN2*7));W.realloc(at);for(var vt=W.pos-1;vt>=P;vt--)W.buf[vt+at]=W.buf[vt]}function Tb(P,R){for(var W=0;W>>8,P[W+2]=R>>>16,P[W+3]=R>>>24}function xg(P,R){return(P[R]|P[R+1]<<8|P[R+2]<<16)+(P[R+3]<<24)}function Rb(P,R,W){for(var at="",vt=R;vt239?4:St>223?3:St>191?2:1;if(vt+te>W)break;var ye,_e,Fe;te===1?St<128&&(Pt=St):te===2?(ye=P[vt+1],(ye&192)===128&&(Pt=(St&31)<<6|ye&63,Pt<=127&&(Pt=null))):te===3?(ye=P[vt+1],_e=P[vt+2],(ye&192)===128&&(_e&192)===128&&(Pt=(St&15)<<12|(ye&63)<<6|_e&63,(Pt<=2047||Pt>=55296&&Pt<=57343)&&(Pt=null))):te===4&&(ye=P[vt+1],_e=P[vt+2],Fe=P[vt+3],(ye&192)===128&&(_e&192)===128&&(Fe&192)===128&&(Pt=(St&15)<<18|(ye&63)<<12|(_e&63)<<6|Fe&63,(Pt<=65535||Pt>=1114112)&&(Pt=null))),Pt===null?(Pt=65533,te=1):Pt>65535&&(Pt-=65536,at+=String.fromCharCode(Pt>>>10&1023|55296),Pt=56320|Pt&1023),at+=String.fromCharCode(Pt),vt+=te}return at}function Db(P,R,W){return mg.decode(P.subarray(R,W))}function Ib(P,R,W){for(var at=0,vt,St;at55295&&vt<57344)if(St)if(vt<56320){P[W++]=239,P[W++]=191,P[W++]=189,St=vt;continue}else vt=St-55296<<10|vt-56320|65536,St=null;else{vt>56319||at+1===R.length?(P[W++]=239,P[W++]=191,P[W++]=189):St=vt;continue}else St&&(P[W++]=239,P[W++]=191,P[W++]=189,St=null);vt<128?P[W++]=vt:(vt<2048?P[W++]=vt>>6|192:(vt<65536?P[W++]=vt>>12|224:(P[W++]=vt>>18|240,P[W++]=vt>>12&63|128),P[W++]=vt>>6&63|128),P[W++]=vt&63|128)}return W}var Bp=3;function Fb(P,R,W){P===1&&W.readMessage(zb,R)}function zb(P,R,W){if(P===3){var at=W.readMessage(kb,{}),vt=at.id,St=at.bitmap,Pt=at.width,te=at.height,ye=at.left,_e=at.top,Fe=at.advance;R.push({id:vt,bitmap:new Hc({width:Pt+2*Bp,height:te+2*Bp},St),metrics:{width:Pt,height:te,left:ye,top:_e,advance:Fe}})}}function kb(P,R,W){P===1?R.id=W.readVarint():P===2?R.bitmap=W.readBytes():P===3?R.width=W.readVarint():P===4?R.height=W.readVarint():P===5?R.left=W.readSVarint():P===6?R.top=W.readSVarint():P===7&&(R.advance=W.readVarint())}function Ob(P){return new dd(P).readFields(Fb,[])}var bg=Bp;function wg(P){for(var R=0,W=0,at=0,vt=P;at=0;tr--){var yr=te[tr];if(!(ar.w>yr.w||ar.h>yr.h)){if(ar.x=yr.x,ar.y=yr.y,_e=Math.max(_e,ar.y+ar.h),ye=Math.max(ye,ar.x+ar.w),ar.w===yr.w&&ar.h===yr.h){var zr=te.pop();tr=0&&vt>=R&&Du[this.text.charCodeAt(vt)];vt--)at--;this.text=this.text.substring(R,at),this.sectionIndex=this.sectionIndex.slice(R,at)},Fo.prototype.substring=function(R,W){var at=new Fo;return at.text=this.text.substring(R,W),at.sectionIndex=this.sectionIndex.slice(R,W),at.sections=this.sections,at},Fo.prototype.toString=function(){return this.text},Fo.prototype.getMaxScale=function(){var R=this;return this.sectionIndex.reduce(function(W,at){return Math.max(W,R.sections[at].scale)},0)},Fo.prototype.addTextSection=function(R,W){this.text+=R.text,this.sections.push(xh.forText(R.scale,R.fontStack||W));for(var at=this.sections.length-1,vt=0;vt=Ag?null:++this.imageSectionID:(this.imageSectionID=Tg,this.imageSectionID)};function Bb(P,R){for(var W=[],at=P.text,vt=0,St=0,Pt=R;St=0,Fe=0,je=0;je0&&oo>bi&&(bi=oo)}else{var sa=W[xi.fontStack],ta=sa&&sa[wi];if(ta&&ta.rect)ki=ta.rect,Vi=ta.metrics;else{var Aa=R[xi.fontStack],Sa=Aa&&Aa[wi];if(!Sa)continue;Vi=Sa.metrics}Si=(zn-xi.scale)*Mo}oa?(P.verticalizable=!0,$n.push({glyph:wi,imageName:aa,x:ar,y:tr+Si,vertical:oa,scale:xi.scale,fontStack:xi.fontStack,sectionIndex:Ni,metrics:Vi,rect:ki}),ar+=xa*xi.scale+_e):($n.push({glyph:wi,imageName:aa,x:ar,y:tr+Si,vertical:oa,scale:xi.scale,fontStack:xi.fontStack,sectionIndex:Ni,metrics:Vi,rect:ki}),ar+=Vi.advance*xi.scale+_e)}if($n.length!==0){var zo=ar-_e;yr=Math.max(zo,yr),Gb($n,0,$n.length-1,ln,bi)}ar=0;var ko=St*zn+bi;ei.lineOffset=Math.max(bi,Wn),tr+=ko,zr=Math.max(ko,zr),++tn}var yo=tr-Dv,Qo=Hp(Pt),$o=Qo.horizontalAlign,co=Qo.verticalAlign;Wb(P.positionedLines,ln,$o,co,yr,zr,St,yo,vt.length),P.top+=-co*yo,P.bottom=P.top+yo,P.left+=-$o*yr,P.right=P.left+yr}function Gb(P,R,W,at,vt){if(!(!at&&!vt))for(var St=P[W],Pt=St.metrics.advance*St.scale,te=(P[W].x+Pt)*at,ye=R;ye<=W;ye++)P[ye].x-=te,P[ye].y+=vt}function Wb(P,R,W,at,vt,St,Pt,te,ye){var _e=(R-W)*vt,Fe=0;St!==Pt?Fe=-te*at-Dv:Fe=(-at*ye+.5)*Pt;for(var je=0,ar=P;je-W/2;){if(Pt--,Pt<0)return!1;te-=P[Pt].dist(St),St=P[Pt]}te+=P[Pt].dist(P[Pt+1]),Pt++;for(var ye=[],_e=0;teat;)_e-=ye.shift().angleDelta;if(_e>vt)return!1;Pt++,te+=je.dist(ar)}return!0}function Dg(P){for(var R=0,W=0;W_e){var yr=(_e-ye)/tr,zr=Ca(je.x,ar.x,yr),ln=Ca(je.y,ar.y,yr),tn=new bh(zr,ln,ar.angleTo(je),Fe);return tn._round(),!Pt||Rg(P,tn,te,Pt,R)?tn:void 0}ye+=tr}}function jb(P,R,W,at,vt,St,Pt,te,ye){var _e=Ig(at,St,Pt),Fe=Fg(at,vt),je=Fe*Pt,ar=P[0].x===0||P[0].x===ye||P[0].y===0||P[0].y===ye;R-je=0&&Mn=0&&zn=0&&ar+_e<=Fe){var Wn=new bh(Mn,zn,Sn,yr);Wn._round(),(!at||Rg(P,Wn,St,at,vt))&&tr.push(Wn)}}je+=tn}return!te&&!tr.length&&!Pt&&(tr=zg(P,je/2,W,at,vt,St,Pt,!0,ye)),tr}function kg(P,R,W,at,vt){for(var St=[],Pt=0;Pt=at&&je.x>=at)&&(Fe.x>=at?Fe=new r(at,Fe.y+(je.y-Fe.y)*((at-Fe.x)/(je.x-Fe.x)))._round():je.x>=at&&(je=new r(at,Fe.y+(je.y-Fe.y)*((at-Fe.x)/(je.x-Fe.x)))._round()),!(Fe.y>=vt&&je.y>=vt)&&(Fe.y>=vt?Fe=new r(Fe.x+(je.x-Fe.x)*((vt-Fe.y)/(je.y-Fe.y)),vt)._round():je.y>=vt&&(je=new r(Fe.x+(je.x-Fe.x)*((vt-Fe.y)/(je.y-Fe.y)),vt)._round()),(!ye||!Fe.equals(ye[ye.length-1]))&&(ye=[Fe],St.push(ye)),ye.push(je)))))}return St}var wh=ws;function Og(P,R,W,at){var vt=[],St=P.image,Pt=St.pixelRatio,te=St.paddedRect.w-2*wh,ye=St.paddedRect.h-2*wh,_e=P.right-P.left,Fe=P.bottom-P.top,je=St.stretchX||[[0,te]],ar=St.stretchY||[[0,ye]],tr=function(sa,ta){return sa+ta[1]-ta[0]},yr=je.reduce(tr,0),zr=ar.reduce(tr,0),ln=te-yr,tn=ye-zr,Sn=0,mn=yr,Mn=0,zn=zr,Wn=0,ei=ln,$n=0,bi=tn;if(St.content&&at){var vi=St.content;Sn=yd(je,0,vi[0]),Mn=yd(ar,0,vi[1]),mn=yd(je,vi[0],vi[2]),zn=yd(ar,vi[1],vi[3]),Wn=vi[0]-Sn,$n=vi[1]-Mn,ei=vi[2]-vi[0]-mn,bi=vi[3]-vi[1]-zn}var xi=function(sa,ta,Aa,Sa){var Ba=xd(sa.stretch-Sn,mn,_e,P.left),Wa=bd(sa.fixed-Wn,ei,sa.stretch,yr),mo=xd(ta.stretch-Mn,zn,Fe,P.top),oo=bd(ta.fixed-$n,bi,ta.stretch,zr),zo=xd(Aa.stretch-Sn,mn,_e,P.left),ko=bd(Aa.fixed-Wn,ei,Aa.stretch,yr),yo=xd(Sa.stretch-Mn,zn,Fe,P.top),Qo=bd(Sa.fixed-$n,bi,Sa.stretch,zr),$o=new r(Ba,mo),co=new r(zo,mo),qo=new r(zo,yo),Hs=new r(Ba,yo),cf=new r(Wa/Pt,oo/Pt),ec=new r(ko/Pt,Qo/Pt),rc=R*Math.PI/180;if(rc){var nc=Math.sin(rc),Lh=Math.cos(rc),Rl=[Lh,-nc,nc,Lh];$o._matMult(Rl),co._matMult(Rl),Hs._matMult(Rl),qo._matMult(Rl)}var Ed=sa.stretch+sa.fixed,Jp=Aa.stretch+Aa.fixed,_d=ta.stretch+ta.fixed,Qp=Sa.stretch+Sa.fixed,il={x:St.paddedRect.x+wh+Ed,y:St.paddedRect.y+wh+_d,w:Jp-Ed,h:Qp-_d},Ph=ei/Pt/_e,Cd=bi/Pt/Fe;return{tl:$o,tr:co,bl:Hs,br:qo,tex:il,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:cf,pixelOffsetBR:ec,minFontScaleX:Ph,minFontScaleY:Cd,isSDF:W}};if(!at||!St.stretchX&&!St.stretchY)vt.push(xi({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:te+1},{fixed:0,stretch:ye+1}));else for(var Ni=Ng(je,ln,yr),wi=Ng(ar,tn,zr),Si=0;Si0&&(yr=Math.max(10,yr),this.circleDiameter=yr)}else{var zr=Pt.top*te-ye,ln=Pt.bottom*te+ye,tn=Pt.left*te-ye,Sn=Pt.right*te+ye,mn=Pt.collisionPadding;if(mn&&(tn-=mn[0]*te,zr-=mn[1]*te,Sn+=mn[2]*te,ln+=mn[3]*te),Fe){var Mn=new r(tn,zr),zn=new r(Sn,zr),Wn=new r(tn,ln),ei=new r(Sn,ln),$n=Fe*Math.PI/180;Mn._rotate($n),zn._rotate($n),Wn._rotate($n),ei._rotate($n),tn=Math.min(Mn.x,zn.x,Wn.x,ei.x),Sn=Math.max(Mn.x,zn.x,Wn.x,ei.x),zr=Math.min(Mn.y,zn.y,Wn.y,ei.y),ln=Math.max(Mn.y,zn.y,Wn.y,ei.y)}R.emplaceBack(W.x,W.y,tn,zr,Sn,ln,at,vt,St)}this.boxEndIndex=R.length},Th=function(R,W){if(R===void 0&&(R=[]),W===void 0&&(W=Jb),this.data=R,this.length=this.data.length,this.compare=W,this.length>0)for(var at=(this.length>>1)-1;at>=0;at--)this._down(at)};Th.prototype.push=function(R){this.data.push(R),this.length++,this._up(this.length-1)},Th.prototype.pop=function(){if(this.length!==0){var R=this.data[0],W=this.data.pop();return this.length--,this.length>0&&(this.data[0]=W,this._down(0)),R}},Th.prototype.peek=function(){return this.data[0]},Th.prototype._up=function(R){for(var W=this,at=W.data,vt=W.compare,St=at[R];R>0;){var Pt=R-1>>1,te=at[Pt];if(vt(St,te)>=0)break;at[R]=te,R=Pt}at[R]=St},Th.prototype._down=function(R){for(var W=this,at=W.data,vt=W.compare,St=this.length>>1,Pt=at[R];R=0)break;at[R]=ye,R=te}at[R]=Pt};function Jb(P,R){return PR?1:0}function Qb(P,R,W){R===void 0&&(R=1),W===void 0&&(W=!1);for(var at=1/0,vt=1/0,St=-1/0,Pt=-1/0,te=P[0],ye=0;yeSt)&&(St=_e.x),(!ye||_e.y>Pt)&&(Pt=_e.y)}var Fe=St-at,je=Pt-vt,ar=Math.min(Fe,je),tr=ar/2,yr=new Th([],$b);if(ar===0)return new r(at,vt);for(var zr=at;zrtn.d||!tn.d)&&(tn=mn,W&&console.log("found best %d after %d probes",Math.round(1e4*mn.d)/1e4,Sn)),!(mn.max-tn.d<=R)&&(tr=mn.h/2,yr.push(new Ah(mn.p.x-tr,mn.p.y-tr,tr,P)),yr.push(new Ah(mn.p.x+tr,mn.p.y-tr,tr,P)),yr.push(new Ah(mn.p.x-tr,mn.p.y+tr,tr,P)),yr.push(new Ah(mn.p.x+tr,mn.p.y+tr,tr,P)),Sn+=4)}return W&&(console.log("num probes: "+Sn),console.log("best distance: "+tn.d)),tn.p}function $b(P,R){return R.max-P.max}function Ah(P,R,W,at){this.p=new r(P,R),this.h=W,this.d=qb(this.p,at),this.max=this.d+this.h*Math.SQRT2}function qb(P,R){for(var W=!1,at=1/0,vt=0;vtP.y!=Fe.y>P.y&&P.x<(Fe.x-_e.x)*(P.y-_e.y)/(Fe.y-_e.y)+_e.x&&(W=!W),at=Math.min(at,sf(P,_e,Fe))}return(W?1:-1)*Math.sqrt(at)}function t3(P){for(var R=0,W=0,at=0,vt=P[0],St=0,Pt=vt.length,te=Pt-1;St=Ai||Rl.y<0||Rl.y>=Ai||n3(P,Rl,Lh,W,at,vt,wi,P.layers[0],P.collisionBoxArray,R.index,R.sourceLayerIndex,P.index,tn,zn,$n,ye,mn,Wn,bi,tr,R,St,_e,Fe,Pt)};if(vi==="line")for(var Vi=0,ki=kg(R.geometry,0,0,Ai,Ai);Vi1){var mo=Zb(Wa,ei,W.vertical||yr,at,zr,Sn);mo&&Si(Wa,mo)}}else if(R.type==="Polygon")for(var oo=0,zo=Fp(R.geometry,0);ooqf&&B(P.layerIds[0]+': Value for "text-size" is >= '+Iv+'. Reduce your "text-size".')):ln.kind==="composite"&&(tn=[au*tr.compositeTextSizes[0].evaluate(Pt,{},yr),au*tr.compositeTextSizes[1].evaluate(Pt,{},yr)],(tn[0]>qf||tn[1]>qf)&&B(P.layerIds[0]+': Value for "text-size" is >= '+Iv+'. Reduce your "text-size".')),P.addSymbols(P.text,zr,tn,te,St,Pt,_e,R,ye.lineStartIndex,ye.lineLength,ar,yr);for(var Sn=0,mn=Fe;Snqf&&B(P.layerIds[0]+': Value for "icon-size" is >= '+Iv+'. Reduce your "icon-size".')):$o.kind==="composite"&&(co=[au*zn.compositeIconSizes[0].evaluate(Mn,{},ei),au*zn.compositeIconSizes[1].evaluate(Mn,{},ei)],(co[0]>qf||co[1]>qf)&&B(P.layerIds[0]+': Value for "icon-size" is >= '+Iv+'. Reduce your "icon-size".')),P.addSymbols(P.icon,yo,co,mn,Sn,Mn,!1,R,vi.lineStartIndex,vi.lineLength,-1,ei),oa=P.icon.placedSymbolArray.length-1,Qo&&(ki=Qo.length*4,P.addSymbols(P.icon,Qo,co,mn,Sn,Mn,Us.vertical,R,vi.lineStartIndex,vi.lineLength,-1,ei),sa=P.icon.placedSymbolArray.length-1)}for(var qo in at.horizontal){var Hs=at.horizontal[qo];if(!xi){Aa=pt(Hs.text);var cf=te.layout.get("text-rotate").evaluate(Mn,{},ei);xi=new wd(ye,R,_e,Fe,je,Hs,ar,tr,yr,cf)}var ec=Hs.positionedLines.length===1;if(aa+=Ug(P,R,Hs,St,te,yr,Mn,zr,vi,at.vertical?Us.horizontal:Us.horizontalOnly,ec?Object.keys(at.horizontal):[qo],ta,oa,zn,ei),ec)break}at.vertical&&(xa+=Ug(P,R,at.vertical,St,te,yr,Mn,zr,vi,Us.vertical,["vertical"],ta,sa,zn,ei));var rc=xi?xi.boxStartIndex:P.collisionBoxArray.length,nc=xi?xi.boxEndIndex:P.collisionBoxArray.length,Lh=wi?wi.boxStartIndex:P.collisionBoxArray.length,Rl=wi?wi.boxEndIndex:P.collisionBoxArray.length,Ed=Ni?Ni.boxStartIndex:P.collisionBoxArray.length,Jp=Ni?Ni.boxEndIndex:P.collisionBoxArray.length,_d=Si?Si.boxStartIndex:P.collisionBoxArray.length,Qp=Si?Si.boxEndIndex:P.collisionBoxArray.length,il=-1,Ph=function(kv,nm){return kv&&kv.circleDiameter?Math.max(kv.circleDiameter,nm):nm};il=Ph(xi,il),il=Ph(wi,il),il=Ph(Ni,il),il=Ph(Si,il);var Cd=il>-1?1:0;Cd&&(il*=$n/Mo),P.glyphOffsetArray.length>=ya.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Mn.sortKey!==void 0&&P.addToSortKeyRanges(P.symbolInstances.length,Mn.sortKey),P.symbolInstances.emplaceBack(R.x,R.y,ta.right>=0?ta.right:-1,ta.center>=0?ta.center:-1,ta.left>=0?ta.left:-1,ta.vertical||-1,oa,sa,Aa,rc,nc,Lh,Rl,Ed,Jp,_d,Qp,_e,aa,xa,Vi,ki,Cd,0,ar,Sa,Ba,il)}function i3(P,R,W,at){var vt=P.compareText;if(!(R in vt))vt[R]=[];else for(var St=vt[R],Pt=St.length-1;Pt>=0;Pt--)if(at.dist(St[Pt])0)&&(Pt.value.kind!=="constant"||Pt.value.value.length>0),Fe=ye.value.kind!=="constant"||!!ye.value.value||Object.keys(ye.parameters).length>0,je=St.get("symbol-sort-key");if(this.features=[],!(!_e&&!Fe)){for(var ar=W.iconDependencies,tr=W.glyphDependencies,yr=W.availableImages,zr=new Ti(this.zoom),ln=0,tn=R;ln=0;for(var xa=0,oa=bi.sections;xa=0;ye--)Pt[ye]={x:W[ye].x,y:W[ye].y,tileUnitDistanceFromAnchor:St},ye>0&&(St+=W[ye-1].dist(W[ye]));for(var _e=0;_e0},ya.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ya.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ya.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ya.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ya.prototype.addIndicesForPlacedSymbol=function(R,W){for(var at=R.placedSymbolArray.get(W),vt=at.vertexStartIndex+at.numGlyphs*4,St=at.vertexStartIndex;St1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var at=0,vt=this.symbolInstanceIndexes;at=0&&_e.indexOf(te)===ye&&W.addIndicesForPlacedSymbol(W.text,te)}),Pt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Pt.verticalPlacedTextSymbolIndex),Pt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Pt.placedIconSymbolIndex),Pt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Pt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Bt("SymbolBucket",ya,{omit:["layers","collisionBoxArray","features","compareText"]}),ya.MAX_GLYPHS=65535,ya.addDynamicAttributes=Yp;function l3(P,R){return R.replace(/{([^{}]+)}/g,function(W,at){return at in P?String(P[at]):""})}var u3=new ca({"symbol-placement":new oi(Ar.layout_symbol["symbol-placement"]),"symbol-spacing":new oi(Ar.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new oi(Ar.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ei(Ar.layout_symbol["symbol-sort-key"]),"symbol-z-order":new oi(Ar.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new oi(Ar.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new oi(Ar.layout_symbol["icon-ignore-placement"]),"icon-optional":new oi(Ar.layout_symbol["icon-optional"]),"icon-rotation-alignment":new oi(Ar.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ei(Ar.layout_symbol["icon-size"]),"icon-text-fit":new oi(Ar.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new oi(Ar.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ei(Ar.layout_symbol["icon-image"]),"icon-rotate":new Ei(Ar.layout_symbol["icon-rotate"]),"icon-padding":new oi(Ar.layout_symbol["icon-padding"]),"icon-keep-upright":new oi(Ar.layout_symbol["icon-keep-upright"]),"icon-offset":new Ei(Ar.layout_symbol["icon-offset"]),"icon-anchor":new Ei(Ar.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new oi(Ar.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new oi(Ar.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new oi(Ar.layout_symbol["text-rotation-alignment"]),"text-field":new Ei(Ar.layout_symbol["text-field"]),"text-font":new Ei(Ar.layout_symbol["text-font"]),"text-size":new Ei(Ar.layout_symbol["text-size"]),"text-max-width":new Ei(Ar.layout_symbol["text-max-width"]),"text-line-height":new oi(Ar.layout_symbol["text-line-height"]),"text-letter-spacing":new Ei(Ar.layout_symbol["text-letter-spacing"]),"text-justify":new Ei(Ar.layout_symbol["text-justify"]),"text-radial-offset":new Ei(Ar.layout_symbol["text-radial-offset"]),"text-variable-anchor":new oi(Ar.layout_symbol["text-variable-anchor"]),"text-anchor":new Ei(Ar.layout_symbol["text-anchor"]),"text-max-angle":new oi(Ar.layout_symbol["text-max-angle"]),"text-writing-mode":new oi(Ar.layout_symbol["text-writing-mode"]),"text-rotate":new Ei(Ar.layout_symbol["text-rotate"]),"text-padding":new oi(Ar.layout_symbol["text-padding"]),"text-keep-upright":new oi(Ar.layout_symbol["text-keep-upright"]),"text-transform":new Ei(Ar.layout_symbol["text-transform"]),"text-offset":new Ei(Ar.layout_symbol["text-offset"]),"text-allow-overlap":new oi(Ar.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new oi(Ar.layout_symbol["text-ignore-placement"]),"text-optional":new oi(Ar.layout_symbol["text-optional"])}),f3=new ca({"icon-opacity":new Ei(Ar.paint_symbol["icon-opacity"]),"icon-color":new Ei(Ar.paint_symbol["icon-color"]),"icon-halo-color":new Ei(Ar.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ei(Ar.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ei(Ar.paint_symbol["icon-halo-blur"]),"icon-translate":new oi(Ar.paint_symbol["icon-translate"]),"icon-translate-anchor":new oi(Ar.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ei(Ar.paint_symbol["text-opacity"]),"text-color":new Ei(Ar.paint_symbol["text-color"],{runtimeType:Pn,getOverride:function(P){return P.textColor},hasOverride:function(P){return!!P.textColor}}),"text-halo-color":new Ei(Ar.paint_symbol["text-halo-color"]),"text-halo-width":new Ei(Ar.paint_symbol["text-halo-width"]),"text-halo-blur":new Ei(Ar.paint_symbol["text-halo-blur"]),"text-translate":new oi(Ar.paint_symbol["text-translate"]),"text-translate-anchor":new oi(Ar.paint_symbol["text-translate-anchor"])}),Xp={paint:f3,layout:u3},Eh=function(R){this.type=R.property.overrides?R.property.overrides.runtimeType:Hr,this.defaultValue=R};Eh.prototype.evaluate=function(R){if(R.formattedSection){var W=this.defaultValue.property.overrides;if(W&&W.hasOverride(R.formattedSection))return W.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default},Eh.prototype.eachChild=function(R){if(!this.defaultValue.isConstant()){var W=this.defaultValue.value;R(W._styleExpression.expression)}},Eh.prototype.outputDefined=function(){return!1},Eh.prototype.serialize=function(){return null},Bt("FormatSectionOverride",Eh,{omit:["defaultValue"]});var c3=function(P){function R(W){P.call(this,W,Xp)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.recalculate=function(at,vt){if(P.prototype.recalculate.call(this,at,vt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var St=this.layout.get("text-writing-mode");if(St){for(var Pt=[],te=0,ye=St;te",targetMapId:vt,sourceMapId:Pt.mapId})}}},_h.prototype.receive=function(R){var W=R.data,at=W.id;if(at&&!(W.targetMapId&&this.mapId!==W.targetMapId))if(W.type===""){delete this.tasks[at];var vt=this.cancelCallbacks[at];delete this.cancelCallbacks[at],vt&&vt()}else j()||W.mustQueue?(this.tasks[at]=W,this.taskQueue.push(at),this.invoker.trigger()):this.processTask(at,W)},_h.prototype.process=function(){if(this.taskQueue.length){var R=this.taskQueue.shift(),W=this.tasks[R];delete this.tasks[R],this.taskQueue.length&&this.invoker.trigger(),W&&this.processTask(R,W)}},_h.prototype.processTask=function(R,W){var at=this;if(W.type===""){var vt=this.callbacks[R];delete this.callbacks[R],vt&&(W.error?vt(Ee(W.error)):vt(null,Ee(W.data)))}else{var St=!1,Pt=ut(this.globalScope)?void 0:[],te=W.hasCallback?function(ar,tr){St=!0,delete at.cancelCallbacks[R],at.target.postMessage({id:R,type:"",sourceMapId:at.mapId,error:ar?De(ar):null,data:De(tr,Pt)},Pt)}:function(ar){St=!0},ye=null,_e=Ee(W.data);if(this.parent[W.type])ye=this.parent[W.type](W.sourceMapId,_e,te);else if(this.parent.getWorkerSource){var Fe=W.type.split("."),je=this.parent.getWorkerSource(W.sourceMapId,Fe[0],_e.source);ye=je[Fe[1]](_e,te)}else te(new Error("Could not find function "+W.type));!St&&ye&&ye.cancel&&(this.cancelCallbacks[R]=ye.cancel)}},_h.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function T3(P,R,W){R=Math.pow(2,W)-R-1;var at=Xg(P*256,R*256,W),vt=Xg((P+1)*256,(R+1)*256,W);return at[0]+","+at[1]+","+vt[0]+","+vt[1]}function Xg(P,R,W){var at=2*Math.PI*6378137/256/Math.pow(2,W),vt=P*at-2*Math.PI*6378137/2,St=R*at-2*Math.PI*6378137/2;return[vt,St]}var io=function(R,W){R&&(W?this.setSouthWest(R).setNorthEast(W):R.length===4?this.setSouthWest([R[0],R[1]]).setNorthEast([R[2],R[3]]):this.setSouthWest(R[0]).setNorthEast(R[1]))};io.prototype.setNorthEast=function(R){return this._ne=R instanceof La?new La(R.lng,R.lat):La.convert(R),this},io.prototype.setSouthWest=function(R){return this._sw=R instanceof La?new La(R.lng,R.lat):La.convert(R),this},io.prototype.extend=function(R){var W=this._sw,at=this._ne,vt,St;if(R instanceof La)vt=R,St=R;else if(R instanceof io){if(vt=R._sw,St=R._ne,!vt||!St)return this}else{if(Array.isArray(R))if(R.length===4||R.every(Array.isArray)){var Pt=R;return this.extend(io.convert(Pt))}else{var te=R;return this.extend(La.convert(te))}return this}return!W&&!at?(this._sw=new La(vt.lng,vt.lat),this._ne=new La(St.lng,St.lat)):(W.lng=Math.min(vt.lng,W.lng),W.lat=Math.min(vt.lat,W.lat),at.lng=Math.max(St.lng,at.lng),at.lat=Math.max(St.lat,at.lat)),this},io.prototype.getCenter=function(){return new La((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},io.prototype.getSouthWest=function(){return this._sw},io.prototype.getNorthEast=function(){return this._ne},io.prototype.getNorthWest=function(){return new La(this.getWest(),this.getNorth())},io.prototype.getSouthEast=function(){return new La(this.getEast(),this.getSouth())},io.prototype.getWest=function(){return this._sw.lng},io.prototype.getSouth=function(){return this._sw.lat},io.prototype.getEast=function(){return this._ne.lng},io.prototype.getNorth=function(){return this._ne.lat},io.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},io.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},io.prototype.isEmpty=function(){return!(this._sw&&this._ne)},io.prototype.contains=function(R){var W=La.convert(R),at=W.lng,vt=W.lat,St=this._sw.lat<=vt&&vt<=this._ne.lat,Pt=this._sw.lng<=at&&at<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Pt=this._sw.lng>=at&&at>=this._ne.lng),St&&Pt},io.convert=function(R){return!R||R instanceof io?R:new io(R)};var Zg=63710088e-1,La=function(R,W){if(isNaN(R)||isNaN(W))throw new Error("Invalid LngLat object: ("+R+", "+W+")");if(this.lng=+R,this.lat=+W,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};La.prototype.wrap=function(){return new La(b(this.lng,-180,180),this.lat)},La.prototype.toArray=function(){return[this.lng,this.lat]},La.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},La.prototype.distanceTo=function(R){var W=Math.PI/180,at=this.lat*W,vt=R.lat*W,St=Math.sin(at)*Math.sin(vt)+Math.cos(at)*Math.cos(vt)*Math.cos((R.lng-this.lng)*W),Pt=Zg*Math.acos(Math.min(St,1));return Pt},La.prototype.toBounds=function(R){R===void 0&&(R=0);var W=40075017,at=360*R/W,vt=at/Math.cos(Math.PI/180*this.lat);return new io(new La(this.lng-vt,this.lat-at),new La(this.lng+vt,this.lat+at))},La.convert=function(R){if(R instanceof La)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new La(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new La(Number("lng"in R?R.lng:R.lon),Number(R.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var jg=2*Math.PI*Zg;function Kg(P){return jg*Math.cos(P*Math.PI/180)}function Jg(P){return(180+P)/360}function Qg(P){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+P*Math.PI/360)))/360}function $g(P,R){return P/Kg(R)}function A3(P){return P*360-180}function jp(P){var R=180-P*360;return 360/Math.PI*Math.atan(Math.exp(R*Math.PI/180))-90}function M3(P,R){return P*Kg(jp(R))}function S3(P){return 1/Math.cos(P*Math.PI/180)}var Gc=function(R,W,at){at===void 0&&(at=0),this.x=+R,this.y=+W,this.z=+at};Gc.fromLngLat=function(R,W){W===void 0&&(W=0);var at=La.convert(R);return new Gc(Jg(at.lng),Qg(at.lat),$g(W,at.lat))},Gc.prototype.toLngLat=function(){return new La(A3(this.x),jp(this.y))},Gc.prototype.toAltitude=function(){return M3(this.z,this.y)},Gc.prototype.meterInMercatorCoordinateUnits=function(){return 1/jg*S3(jp(this.y))};var Wc=function(R,W,at){this.z=R,this.x=W,this.y=at,this.key=zv(0,R,R,W,at)};Wc.prototype.equals=function(R){return this.z===R.z&&this.x===R.x&&this.y===R.y},Wc.prototype.url=function(R,W){var at=T3(this.x,this.y,this.z),vt=E3(this.z,this.x,this.y);return R[(this.x+this.y)%R.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(W==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",vt).replace("{bbox-epsg-3857}",at)},Wc.prototype.getTilePoint=function(R){var W=Math.pow(2,this.z);return new r((R.x*W-this.x)*Ai,(R.y*W-this.y)*Ai)},Wc.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var qg=function(R,W){this.wrap=R,this.canonical=W,this.key=zv(R,W.z,W.z,W.x,W.y)},ao=function(R,W,at,vt,St){this.overscaledZ=R,this.wrap=W,this.canonical=new Wc(at,+vt,+St),this.key=zv(W,R,at,vt,St)};ao.prototype.equals=function(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)},ao.prototype.scaledTo=function(R){var W=this.canonical.z-R;return R>this.canonical.z?new ao(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ao(R,this.wrap,R,this.canonical.x>>W,this.canonical.y>>W)},ao.prototype.calculateScaledKey=function(R,W){var at=this.canonical.z-R;return R>this.canonical.z?zv(this.wrap*+W,R,this.canonical.z,this.canonical.x,this.canonical.y):zv(this.wrap*+W,R,R,this.canonical.x>>at,this.canonical.y>>at)},ao.prototype.isChildOf=function(R){if(R.wrap!==this.wrap)return!1;var W=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ>W&&R.canonical.y===this.canonical.y>>W},ao.prototype.children=function(R){if(this.overscaledZ>=R)return[new ao(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var W=this.canonical.z+1,at=this.canonical.x*2,vt=this.canonical.y*2;return[new ao(W,this.wrap,W,at,vt),new ao(W,this.wrap,W,at+1,vt),new ao(W,this.wrap,W,at,vt+1),new ao(W,this.wrap,W,at+1,vt+1)]},ao.prototype.isLessThan=function(R){return this.wrapR.wrap?!1:this.overscaledZR.overscaledZ?!1:this.canonical.xR.canonical.x?!1:this.canonical.y0;St--)vt=1<=this.dim+1||W<-1||W>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(W+1)*this.stride+(R+1)},uf.prototype._unpackMapbox=function(R,W,at){return(R*256*256+W*256+at)/10-1e4},uf.prototype._unpackTerrarium=function(R,W,at){return R*256+W+at/256-32768},uf.prototype.getPixels=function(){return new us({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},uf.prototype.backfillBorder=function(R,W,at){if(this.dim!==R.dim)throw new Error("dem dimension mismatch");var vt=W*this.dim,St=W*this.dim+this.dim,Pt=at*this.dim,te=at*this.dim+this.dim;switch(W){case-1:vt=St-1;break;case 1:St=vt+1;break}switch(at){case-1:Pt=te-1;break;case 1:te=Pt+1;break}for(var ye=-W*this.dim,_e=-at*this.dim,Fe=Pt;Fe=0&&je[3]>=0&&ye.insert(te,je[0],je[1],je[2],je[3])}},ff.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new gh.VectorTile(new dd(this.rawTileData)).layers,this.sourceLayerCoder=new Md(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ff.prototype.query=function(R,W,at,vt){var St=this;this.loadVTLayers();for(var Pt=R.params||{},te=Ai/R.tileSize/R.scale,ye=Os(Pt.filter),_e=R.queryGeometry,Fe=R.queryPadding*te,je=em(_e),ar=this.grid.query(je.minX-Fe,je.minY-Fe,je.maxX+Fe,je.maxY+Fe),tr=em(R.cameraQueryGeometry),yr=this.grid3D.query(tr.minX-Fe,tr.minY-Fe,tr.maxX+Fe,tr.maxY+Fe,function(Wn,ei,$n,bi){return Pl(R.cameraQueryGeometry,Wn-Fe,ei-Fe,$n+Fe,bi+Fe)}),zr=0,ln=yr;zrvt)St=!1;else if(!W)St=!0;else if(this.expirationTime=mr.maxzoom)&&mr.visibility!=="none"){n(dr,this.zoom,Ce);var xr=ur[mr.id]=mr.createBucket({index:Je.bucketLayerIDs.length,layers:dr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ne,sourceID:this.source});xr.populate(Oe,hr,this.tileID.canonical),Je.bucketLayerIDs.push(dr.map(function(Tr){return Tr.id}))}}}}var pr,Gr,Pr,Dr,cn=i.mapObject(hr.glyphDependencies,function(Tr){return Object.keys(Tr).map(Number)});Object.keys(cn).length?Ie.send("getGlyphs",{uid:this.uid,stacks:cn},function(Tr,Cr){pr||(pr=Tr,Gr=Cr,En.call(ke))}):Gr={};var rn=Object.keys(hr.iconDependencies);rn.length?Ie.send("getImages",{icons:rn,source:this.source,tileID:this.tileID,type:"icons"},function(Tr,Cr){pr||(pr=Tr,Pr=Cr,En.call(ke))}):Pr={};var Cn=Object.keys(hr.patternDependencies);Cn.length?Ie.send("getImages",{icons:Cn,source:this.source,tileID:this.tileID,type:"patterns"},function(Tr,Cr){pr||(pr=Tr,Dr=Cr,En.call(ke))}):Dr={},En.call(this);function En(){if(pr)return Pe(pr);if(Gr&&Pr&&Dr){var Tr=new e(Gr),Cr=new i.ImageAtlas(Pr,Dr);for(var Wr in ur){var Ur=ur[Wr];Ur instanceof i.SymbolBucket?(n(Ur.layers,this.zoom,Ce),i.performSymbolLayout(Ur,Gr,Tr.positions,Pr,Cr.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Ur.hasPattern&&(Ur instanceof i.LineBucket||Ur instanceof i.FillBucket||Ur instanceof i.FillExtrusionBucket)&&(n(Ur.layers,this.zoom,Ce),Ur.addFeatures(hr,this.tileID.canonical,Cr.patternPositions))}this.status="done",Pe(null,{buckets:i.values(ur).filter(function(an){return!an.isEmpty()}),featureIndex:Je,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Tr.image,imageAtlas:Cr,glyphMap:this.returnDependencies?Gr:null,iconMap:this.returnDependencies?Pr:null,glyphPositions:this.returnDependencies?Tr.positions:null})}}};function n(ge,se,Ae){for(var Ce=new i.EvaluationParameters(se),Ie=0,Pe=ge;Ie=0!=!!se&&ge.reverse()}var d=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=function(se){this._feature=se,this.extent=i.EXTENT,this.type=se.type,this.properties=se.tags,"id"in se&&!isNaN(se.id)&&(this.id=parseInt(se.id,10))};w.prototype.loadGeometry=function(){if(this._feature.type===1){for(var se=[],Ae=0,Ce=this._feature.geometry;Ae"u"&&(Ce.push(Ve),Je=Ce.length-1,Pe[Ve]=Je),se.writeVarint(Je);var ur=Ae.properties[Ve],hr=typeof ur;hr!=="string"&&hr!=="boolean"&&hr!=="number"&&(ur=JSON.stringify(ur));var vr=hr+":"+ur,Yt=ke[vr];typeof Yt>"u"&&(Ie.push(ur),Yt=Ie.length-1,ke[vr]=Yt),se.writeVarint(Yt)}}function H(ge,se){return(se<<3)+(ge&7)}function Y(ge){return ge<<1^ge>>31}function j(ge,se){for(var Ae=ge.loadGeometry(),Ce=ge.type,Ie=0,Pe=0,ke=Ae.length,Ve=0;Ve>1;ut(ge,se,ke,Ce,Ie,Pe%2),it(ge,se,Ae,Ce,ke-1,Pe+1),it(ge,se,Ae,ke+1,Ie,Pe+1)}}function ut(ge,se,Ae,Ce,Ie,Pe){for(;Ie>Ce;){if(Ie-Ce>600){var ke=Ie-Ce+1,Ve=Ae-Ce+1,Je=Math.log(ke),ur=.5*Math.exp(2*Je/3),hr=.5*Math.sqrt(Je*ur*(ke-ur)/ke)*(Ve-ke/2<0?-1:1),vr=Math.max(Ce,Math.floor(Ae-Ve*ur/ke+hr)),Yt=Math.min(Ie,Math.floor(Ae+(ke-Ve)*ur/ke+hr));ut(ge,se,Ae,vr,Yt,Pe)}var Gt=se[2*Ae+Pe],Ne=Ce,Oe=Ie;for(J(ge,se,Ce,Ae),se[2*Ie+Pe]>Gt&&J(ge,se,Ce,Ie);NeGt;)Oe--}se[2*Ce+Pe]===Gt?J(ge,se,Ce,Oe):(Oe++,J(ge,se,Oe,Ie)),Oe<=Ae&&(Ce=Oe+1),Ae<=Oe&&(Ie=Oe-1)}}function J(ge,se,Ae,Ce){X(ge,Ae,Ce),X(se,2*Ae,2*Ce),X(se,2*Ae+1,2*Ce+1)}function X(ge,se,Ae){var Ce=ge[se];ge[se]=ge[Ae],ge[Ae]=Ce}function tt(ge,se,Ae,Ce,Ie,Pe,ke){for(var Ve=[0,ge.length-1,0],Je=[],ur,hr;Ve.length;){var vr=Ve.pop(),Yt=Ve.pop(),Gt=Ve.pop();if(Yt-Gt<=ke){for(var Ne=Gt;Ne<=Yt;Ne++)ur=se[2*Ne],hr=se[2*Ne+1],ur>=Ae&&ur<=Ie&&hr>=Ce&&hr<=Pe&&Je.push(ge[Ne]);continue}var Oe=Math.floor((Gt+Yt)/2);ur=se[2*Oe],hr=se[2*Oe+1],ur>=Ae&&ur<=Ie&&hr>=Ce&&hr<=Pe&&Je.push(ge[Oe]);var Qe=(vr+1)%2;(vr===0?Ae<=ur:Ce<=hr)&&(Ve.push(Gt),Ve.push(Oe-1),Ve.push(Qe)),(vr===0?Ie>=ur:Pe>=hr)&&(Ve.push(Oe+1),Ve.push(Yt),Ve.push(Qe))}return Je}function V(ge,se,Ae,Ce,Ie,Pe){for(var ke=[0,ge.length-1,0],Ve=[],Je=Ie*Ie;ke.length;){var ur=ke.pop(),hr=ke.pop(),vr=ke.pop();if(hr-vr<=Pe){for(var Yt=vr;Yt<=hr;Yt++)Q(se[2*Yt],se[2*Yt+1],Ae,Ce)<=Je&&Ve.push(ge[Yt]);continue}var Gt=Math.floor((vr+hr)/2),Ne=se[2*Gt],Oe=se[2*Gt+1];Q(Ne,Oe,Ae,Ce)<=Je&&Ve.push(ge[Gt]);var Qe=(ur+1)%2;(ur===0?Ae-Ie<=Ne:Ce-Ie<=Oe)&&(ke.push(vr),ke.push(Gt-1),ke.push(Qe)),(ur===0?Ae+Ie>=Ne:Ce+Ie>=Oe)&&(ke.push(Gt+1),ke.push(hr),ke.push(Qe))}return Ve}function Q(ge,se,Ae,Ce){var Ie=ge-Ae,Pe=se-Ce;return Ie*Ie+Pe*Pe}var ot=function(ge){return ge[0]},$=function(ge){return ge[1]},Z=function(se,Ae,Ce,Ie,Pe){Ae===void 0&&(Ae=ot),Ce===void 0&&(Ce=$),Ie===void 0&&(Ie=64),Pe===void 0&&(Pe=Float64Array),this.nodeSize=Ie,this.points=se;for(var ke=se.length<65536?Uint16Array:Uint32Array,Ve=this.ids=new ke(se.length),Je=this.coords=new Pe(se.length*2),ur=0;ur=Ie;hr--){var vr=+Date.now();Je=this._cluster(Je,hr),this.trees[hr]=new Z(Je,Ht,Ut,ke,Float32Array),Ce&&console.log("z%d: %d clusters in %dms",hr,Je.length,+Date.now()-vr)}return Ce&&console.timeEnd("total time"),this},nt.prototype.getClusters=function(se,Ae){var Ce=((se[0]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,se[1])),Pe=se[2]===180?180:((se[2]+180)%360+360)%360-180,ke=Math.max(-90,Math.min(90,se[3]));if(se[2]-se[0]>=360)Ce=-180,Pe=180;else if(Ce>Pe){var Ve=this.getClusters([Ce,Ie,180,ke],Ae),Je=this.getClusters([-180,Ie,Pe,ke],Ae);return Ve.concat(Je)}for(var ur=this.trees[this._limitZoom(Ae)],hr=ur.range(Rt(Ce),bt(ke),Rt(Pe),bt(Ie)),vr=[],Yt=0,Gt=hr;YtAe&&(Oe+=rr.numPoints||1)}if(Oe>=Je){for(var He=vr.x*Ne,dr=vr.y*Ne,mr=Ve&&Ne>1?this._map(vr,!0):null,xr=(hr<<5)+(Ae+1)+this.points.length,pr=0,Gr=Gt;pr1)for(var rn=0,Cn=Gt;rn>5},nt.prototype._getOriginZoom=function(se){return(se-this.points.length)%32},nt.prototype._map=function(se,Ae){if(se.numPoints)return Ae?Lt({},se.properties):se.properties;var Ce=this.points[se.index].properties,Ie=this.options.map(Ce);return Ae&&Ie===Ce?Lt({},Ie):Ie};function ct(ge,se,Ae,Ce,Ie){return{x:ge,y:se,zoom:1/0,id:Ae,parentId:-1,numPoints:Ce,properties:Ie}}function gt(ge,se){var Ae=ge.geometry.coordinates,Ce=Ae[0],Ie=Ae[1];return{x:Rt(Ce),y:bt(Ie),zoom:1/0,index:se,parentId:-1}}function Tt(ge){return{type:"Feature",id:ge.id,properties:wt(ge),geometry:{type:"Point",coordinates:[At(ge.x),mt(ge.y)]}}}function wt(ge){var se=ge.numPoints,Ae=se>=1e4?Math.round(se/1e3)+"k":se>=1e3?Math.round(se/100)/10+"k":se;return Lt(Lt({},ge.properties),{cluster:!0,cluster_id:ge.id,point_count:se,point_count_abbreviated:Ae})}function Rt(ge){return ge/360+.5}function bt(ge){var se=Math.sin(ge*Math.PI/180),Ae=.5-.25*Math.log((1+se)/(1-se))/Math.PI;return Ae<0?0:Ae>1?1:Ae}function At(ge){return(ge-.5)*360}function mt(ge){var se=(180-ge*360)*Math.PI/180;return 360*Math.atan(Math.exp(se))/Math.PI-90}function Lt(ge,se){for(var Ae in se)ge[Ae]=se[Ae];return ge}function Ht(ge){return ge.x}function Ut(ge){return ge.y}function kt(ge,se,Ae,Ce){for(var Ie=Ce,Pe=Ae-se>>1,ke=Ae-se,Ve,Je=ge[se],ur=ge[se+1],hr=ge[Ae],vr=ge[Ae+1],Yt=se+3;YtIe)Ve=Yt,Ie=Gt;else if(Gt===Ie){var Ne=Math.abs(Yt-Pe);NeCe&&(Ve-se>3&&kt(ge,se,Ve,Ce),ge[Ve+2]=Ie,Ae-Ve>3&&kt(ge,Ve,Ae,Ce))}function Vt(ge,se,Ae,Ce,Ie,Pe){var ke=Ie-Ae,Ve=Pe-Ce;if(ke!==0||Ve!==0){var Je=((ge-Ae)*ke+(se-Ce)*Ve)/(ke*ke+Ve*Ve);Je>1?(Ae=Ie,Ce=Pe):Je>0&&(Ae+=ke*Je,Ce+=Ve*Je)}return ke=ge-Ae,Ve=se-Ce,ke*ke+Ve*Ve}function It(ge,se,Ae,Ce){var Ie={id:typeof ge>"u"?null:ge,type:se,geometry:Ae,tags:Ce,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return re(Ie),Ie}function re(ge){var se=ge.geometry,Ae=ge.type;if(Ae==="Point"||Ae==="MultiPoint"||Ae==="LineString")Kt(ge,se);else if(Ae==="Polygon"||Ae==="MultiLineString")for(var Ce=0;Ce0&&(Ce?ke+=(Ie*ur-Je*Pe)/2:ke+=Math.sqrt(Math.pow(Je-Ie,2)+Math.pow(ur-Pe,2))),Ie=Je,Pe=ur}var hr=se.length-3;se[2]=1,kt(se,0,hr,Ae),se[hr+2]=1,se.size=Math.abs(ke),se.start=0,se.end=se.size}function xe(ge,se,Ae,Ce){for(var Ie=0;Ie1?1:Ae}function zt(ge,se,Ae,Ce,Ie,Pe,ke,Ve){if(Ae/=se,Ce/=se,Pe>=Ae&&ke=Ce)return null;for(var Je=[],ur=0;ur=Ae&&Ne=Ce)continue;var Oe=[];if(Yt==="Point"||Yt==="MultiPoint")Xt(vr,Oe,Ae,Ce,Ie);else if(Yt==="LineString")Jt(vr,Oe,Ae,Ce,Ie,!1,Ve.lineMetrics);else if(Yt==="MultiLineString")Ft(vr,Oe,Ae,Ce,Ie,!1);else if(Yt==="Polygon")Ft(vr,Oe,Ae,Ce,Ie,!0);else if(Yt==="MultiPolygon")for(var Qe=0;Qe=Ae&&ke<=Ce&&(se.push(ge[Pe]),se.push(ge[Pe+1]),se.push(ge[Pe+2]))}}function Jt(ge,se,Ae,Ce,Ie,Pe,ke){for(var Ve=Wt(ge),Je=Ie===0?yt:Et,ur=ge.start,hr,vr,Yt=0;YtAe&&(vr=Je(Ve,Gt,Ne,Qe,er,Ae),ke&&(Ve.start=ur+hr*vr)):fr>Ce?rr=Ae&&(vr=Je(Ve,Gt,Ne,Qe,er,Ae),He=!0),rr>Ce&&fr<=Ce&&(vr=Je(Ve,Gt,Ne,Qe,er,Ce),He=!0),!Pe&&He&&(ke&&(Ve.end=ur+hr*vr),se.push(Ve),Ve=Wt(ge)),ke&&(ur+=hr)}var dr=ge.length-3;Gt=ge[dr],Ne=ge[dr+1],Oe=ge[dr+2],fr=Ie===0?Gt:Ne,fr>=Ae&&fr<=Ce&&xt(Ve,Gt,Ne,Oe),dr=Ve.length-3,Pe&&dr>=3&&(Ve[dr]!==Ve[0]||Ve[dr+1]!==Ve[1])&&xt(Ve,Ve[0],Ve[1],Ve[2]),Ve.length&&se.push(Ve)}function Wt(ge){var se=[];return se.size=ge.size,se.start=ge.start,se.end=ge.end,se}function Ft(ge,se,Ae,Ce,Ie,Pe){for(var ke=0;keke.maxX&&(ke.maxX=hr),vr>ke.maxY&&(ke.maxY=vr)}return ke}function ve(ge,se,Ae,Ce){var Ie=se.geometry,Pe=se.type,ke=[];if(Pe==="Point"||Pe==="MultiPoint")for(var Ve=0;Ve0&&se.size<(Ie?ke:Ce)){Ae.numPoints+=se.length/3;return}for(var Ve=[],Je=0;Jeke)&&(Ae.numSimplified++,Ve.push(se[Je]),Ve.push(se[Je+1])),Ae.numPoints++;Ie&&ce(Ve,Pe),ge.push(Ve)}function ce(ge,se){for(var Ae=0,Ce=0,Ie=ge.length,Pe=Ie-2;Ce0===se)for(Ce=0,Ie=ge.length;Ce24)throw new Error("maxZoom should be in the 0-24 range");if(se.promoteId&&se.generateId)throw new Error("promoteId and generateId cannot be used together.");var Ce=$t(ge,se);this.tiles={},this.tileCoords=[],Ae&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",se.indexMaxZoom,se.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ce=Mt(Ce,se),Ce.length&&this.splitTile(Ce,0,0,0),Ae&&(Ce.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Be.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Be.prototype.splitTile=function(ge,se,Ae,Ce,Ie,Pe,ke){for(var Ve=[ge,se,Ae,Ce],Je=this.options,ur=Je.debug;Ve.length;){Ce=Ve.pop(),Ae=Ve.pop(),se=Ve.pop(),ge=Ve.pop();var hr=1<1&&console.time("creation"),Yt=this.tiles[vr]=be(ge,se,Ae,Ce,Je),this.tileCoords.push({z:se,x:Ae,y:Ce}),ur)){ur>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",se,Ae,Ce,Yt.numFeatures,Yt.numPoints,Yt.numSimplified),console.timeEnd("creation"));var Gt="z"+se;this.stats[Gt]=(this.stats[Gt]||0)+1,this.total++}if(Yt.source=ge,Ie){if(se===Je.maxZoom||se===Ie)continue;var Ne=1<1&&console.time("clipping");var Oe=.5*Je.buffer/Je.extent,Qe=.5-Oe,er=.5+Oe,fr=1+Oe,rr,He,dr,mr,xr,pr;rr=He=dr=mr=null,xr=zt(ge,hr,Ae-Oe,Ae+er,0,Yt.minX,Yt.maxX,Je),pr=zt(ge,hr,Ae+Qe,Ae+fr,0,Yt.minX,Yt.maxX,Je),ge=null,xr&&(rr=zt(xr,hr,Ce-Oe,Ce+er,1,Yt.minY,Yt.maxY,Je),He=zt(xr,hr,Ce+Qe,Ce+fr,1,Yt.minY,Yt.maxY,Je),xr=null),pr&&(dr=zt(pr,hr,Ce-Oe,Ce+er,1,Yt.minY,Yt.maxY,Je),mr=zt(pr,hr,Ce+Qe,Ce+fr,1,Yt.minY,Yt.maxY,Je),pr=null),ur>1&&console.timeEnd("clipping"),Ve.push(rr||[],se+1,Ae*2,Ce*2),Ve.push(He||[],se+1,Ae*2,Ce*2+1),Ve.push(dr||[],se+1,Ae*2+1,Ce*2),Ve.push(mr||[],se+1,Ae*2+1,Ce*2+1)}}},Be.prototype.getTile=function(ge,se,Ae){var Ce=this.options,Ie=Ce.extent,Pe=Ce.debug;if(ge<0||ge>24)return null;var ke=1<1&&console.log("drilling down to z%d-%d-%d",ge,se,Ae);for(var Je=ge,ur=se,hr=Ae,vr;!vr&&Je>0;)Je--,ur=Math.floor(ur/2),hr=Math.floor(hr/2),vr=this.tiles[ir(Je,ur,hr)];return!vr||!vr.source?null:(Pe>1&&console.log("found parent tile z%d-%d-%d",Je,ur,hr),Pe>1&&console.time("drilling down"),this.splitTile(vr.source,Je,ur,hr,ge,se,Ae),Pe>1&&console.timeEnd("drilling down"),this.tiles[Ve]?ie(this.tiles[Ve],Ie):null)};function ir(ge,se,Ae){return((1<=0?0:ht.button},x.remove=function(ht){ht.parentNode&&ht.parentNode.removeChild(ht)};function l(ht,K,dt){var rt,pt,Ot,Qt=i.browser.devicePixelRatio>1?"@2x":"",ue=i.getJSON(K.transformRequest(K.normalizeSpriteURL(ht,Qt,".json"),i.ResourceType.SpriteJSON),function(qe,cr){ue=null,Ot||(Ot=qe,rt=cr,We())}),Re=i.getImage(K.transformRequest(K.normalizeSpriteURL(ht,Qt,".png"),i.ResourceType.SpriteImage),function(qe,cr){Re=null,Ot||(Ot=qe,pt=cr,We())});function We(){if(Ot)dt(Ot);else if(rt&&pt){var qe=i.browser.getImageData(pt),cr={};for(var lr in rt){var Fr=rt[lr],Xr=Fr.width,Yr=Fr.height,Vr=Fr.x,Kr=Fr.y,fn=Fr.sdf,Fn=Fr.pixelRatio,Nn=Fr.stretchX,Yn=Fr.stretchY,Xn=Fr.content,Gn=new i.RGBAImage({width:Xr,height:Yr});i.RGBAImage.copy(qe,Gn,{x:Vr,y:Kr},{x:0,y:0},{width:Xr,height:Yr}),cr[lr]={data:Gn,pixelRatio:Fn,sdf:fn,stretchX:Nn,stretchY:Yn,content:Xn}}dt(null,cr)}}return{cancel:function(){ue&&(ue.cancel(),ue=null),Re&&(Re.cancel(),Re=null)}}}function m(ht){var K=ht.userImage;if(K&&K.render){var dt=K.render();if(dt)return ht.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var h=1,b=function(ht){function K(){ht.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.isLoaded=function(){return this.loaded},K.prototype.setLoaded=function(rt){if(this.loaded!==rt&&(this.loaded=rt,rt)){for(var pt=0,Ot=this.requestors;pt=0?1.2:1))}A.prototype.draw=function(ht){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ht,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),dt=new Uint8ClampedArray(this.size*this.size),rt=0;rt65535){qe(new Error("glyphs > 65535 not supported"));return}if(Fr.ranges[Yr]){qe(null,{stack:cr,id:lr,glyph:Xr});return}var Vr=Fr.requests[Yr];Vr||(Vr=Fr.requests[Yr]=[],E.loadGlyphRange(cr,Yr,rt.url,rt.requestManager,function(Kr,fn){if(fn){for(var Fn in fn)rt._doesCharSupportLocalGlyph(+Fn)||(Fr.glyphs[+Fn]=fn[+Fn]);Fr.ranges[Yr]=!0}for(var Nn=0,Yn=Vr;Nn1&&(We=K[++Re]);var cr=Math.abs(qe-We.left),lr=Math.abs(qe-We.right),Fr=Math.min(cr,lr),Xr=void 0,Yr=Ot/rt*(pt+1);if(We.isDash){var Vr=pt-Math.abs(Yr);Xr=Math.sqrt(Fr*Fr+Vr*Vr)}else Xr=pt-Math.sqrt(Fr*Fr+Yr*Yr);this.data[ue+qe]=Math.max(0,Math.min(255,Xr+128))}},z.prototype.addRegularDash=function(K){for(var dt=K.length-1;dt>=0;--dt){var rt=K[dt],pt=K[dt+1];rt.zeroLength?K.splice(dt,1):pt&&pt.isDash===rt.isDash&&(pt.left=rt.left,K.splice(dt,1))}var Ot=K[0],Qt=K[K.length-1];Ot.isDash===Qt.isDash&&(Ot.left=Qt.left-this.width,Qt.right=Ot.right+this.width);for(var ue=this.width*this.nextRow,Re=0,We=K[Re],qe=0;qe1&&(We=K[++Re]);var cr=Math.abs(qe-We.left),lr=Math.abs(qe-We.right),Fr=Math.min(cr,lr),Xr=We.isDash?Fr:-Fr;this.data[ue+qe]=Math.max(0,Math.min(255,Xr+128))}},z.prototype.addDash=function(K,dt){var rt=dt?7:0,pt=2*rt+1;if(this.nextRow+pt>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var Ot=0,Qt=0;Qt=rt.minX&&K.x=rt.minY&&K.y0&&(qe[new i.OverscaledTileID(rt.overscaledZ,ue,pt.z,Qt,pt.y-1).key]={backfilled:!1},qe[new i.OverscaledTileID(rt.overscaledZ,rt.wrap,pt.z,pt.x,pt.y-1).key]={backfilled:!1},qe[new i.OverscaledTileID(rt.overscaledZ,We,pt.z,Re,pt.y-1).key]={backfilled:!1}),pt.y+10&&(Ot.resourceTiming=rt._resourceTiming,rt._resourceTiming=[]),rt.fire(new i.Event("data",Ot))})},K.prototype.onAdd=function(rt){this.map=rt,this.load()},K.prototype.setData=function(rt){var pt=this;return this._data=rt,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ot){if(Ot){pt.fire(new i.ErrorEvent(Ot));return}var Qt={dataType:"source",sourceDataType:"content"};pt._collectResourceTiming&&pt._resourceTiming&&pt._resourceTiming.length>0&&(Qt.resourceTiming=pt._resourceTiming,pt._resourceTiming=[]),pt.fire(new i.Event("data",Qt))}),this},K.prototype.getClusterExpansionZoom=function(rt,pt){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:rt,source:this.id},pt),this},K.prototype.getClusterChildren=function(rt,pt){return this.actor.send("geojson.getClusterChildren",{clusterId:rt,source:this.id},pt),this},K.prototype.getClusterLeaves=function(rt,pt,Ot,Qt){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:rt,limit:pt,offset:Ot},Qt),this},K.prototype._updateWorkerData=function(rt){var pt=this;this._loaded=!1;var Ot=i.extend({},this.workerOptions),Qt=this._data;typeof Qt=="string"?(Ot.request=this.map._requestManager.transformRequest(i.browser.resolveURL(Qt),i.ResourceType.Source),Ot.request.collectResourceTiming=this._collectResourceTiming):Ot.data=JSON.stringify(Qt),this.actor.send(this.type+".loadData",Ot,function(ue,Re){pt._removed||Re&&Re.abandoned||(pt._loaded=!0,Re&&Re.resourceTiming&&Re.resourceTiming[pt.id]&&(pt._resourceTiming=Re.resourceTiming[pt.id].slice(0)),pt.actor.send(pt.type+".coalesce",{source:Ot.source},null),rt(ue))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(rt,pt){var Ot=this,Qt=rt.actor?"reloadTile":"loadTile";rt.actor=this.actor;var ue={type:this.type,uid:rt.uid,tileID:rt.tileID,zoom:rt.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};rt.request=this.actor.send(Qt,ue,function(Re,We){return delete rt.request,rt.unloadVectorData(),rt.aborted?pt(null):Re?pt(Re):(rt.loadVectorData(We,Ot.map.painter,Qt==="reloadTile"),pt(null))})},K.prototype.abortTile=function(rt){rt.request&&(rt.request.cancel(),delete rt.request),rt.aborted=!0},K.prototype.unloadTile=function(rt){rt.unloadVectorData(),this.actor.send("removeTile",{uid:rt.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K}(i.Evented),Y=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(ht){function K(dt,rt,pt,Ot){ht.call(this),this.id=dt,this.dispatcher=pt,this.coordinates=rt.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ot),this.options=rt}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.load=function(rt,pt){var Ot=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(Qt,ue){Ot._loaded=!0,Qt?Ot.fire(new i.ErrorEvent(Qt)):ue&&(Ot.image=ue,rt&&(Ot.coordinates=rt),pt&&pt(),Ot._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(rt){var pt=this;return!this.image||!rt.url?this:(this.options.url=rt.url,this.load(rt.coordinates,function(){pt.texture=null}),this)},K.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},K.prototype.onAdd=function(rt){this.map=rt,this.load()},K.prototype.setCoordinates=function(rt){var pt=this;this.coordinates=rt;var Ot=rt.map(i.MercatorCoordinate.fromLngLat);this.tileID=et(Ot),this.minzoom=this.maxzoom=this.tileID.z;var Qt=Ot.map(function(ue){return pt.tileID.getTilePoint(ue)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(Qt[0].x,Qt[0].y,0,0),this._boundsArray.emplaceBack(Qt[1].x,Qt[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(Qt[3].x,Qt[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(Qt[2].x,Qt[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})),this},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var rt=this.map.painter.context,pt=rt.gl;this.boundsBuffer||(this.boundsBuffer=rt.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(rt,this.image,pt.RGBA),this.texture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE));for(var Ot in this.tiles){var Qt=this.tiles[Ot];Qt.state!=="loaded"&&(Qt.state="loaded",Qt.texture=this.texture)}}},K.prototype.loadTile=function(rt,pt){this.tileID&&this.tileID.equals(rt.tileID.canonical)?(this.tiles[String(rt.tileID.wrap)]=rt,rt.buckets={},pt(null)):(rt.state="errored",pt(null))},K.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return!1},K}(i.Evented);function et(ht){for(var K=1/0,dt=1/0,rt=-1/0,pt=-1/0,Ot=0,Qt=ht;Otpt.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+pt.start(0)+" and "+pt.end(0)+"-second mark."))):this.video.currentTime=rt}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(rt){this.map||(this.map=rt,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var rt=this.map.painter.context,pt=rt.gl;this.boundsBuffer||(this.boundsBuffer=rt.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE),pt.texSubImage2D(pt.TEXTURE_2D,0,0,0,pt.RGBA,pt.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(rt,this.video,pt.RGBA),this.texture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE));for(var Ot in this.tiles){var Qt=this.tiles[Ot];Qt.state!=="loaded"&&(Qt.state="loaded",Qt.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this.video&&!this.video.paused},K}(j),ut=function(ht){function K(dt,rt,pt,Ot){ht.call(this,dt,rt,pt,Ot),rt.coordinates?(!Array.isArray(rt.coordinates)||rt.coordinates.length!==4||rt.coordinates.some(function(Qt){return!Array.isArray(Qt)||Qt.length!==2||Qt.some(function(ue){return typeof ue!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'missing required property "coordinates"'))),rt.animate&&typeof rt.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'optional "animate" property must be a boolean value'))),rt.canvas?typeof rt.canvas!="string"&&!(rt.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'missing required property "canvas"'))),this.options=rt,this.animate=rt.animate!==void 0?rt.animate:!0}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},K.prototype.getCanvas=function(){return this.canvas},K.prototype.onAdd=function(rt){this.map=rt,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var rt=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,rt=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,rt=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var pt=this.map.painter.context,Ot=pt.gl;this.boundsBuffer||(this.boundsBuffer=pt.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(rt||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(pt,this.canvas,Ot.RGBA,{premultiply:!0});for(var Qt in this.tiles){var ue=this.tiles[Qt];ue.state!=="loaded"&&(ue.state="loaded",ue.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this._playing},K.prototype._hasInvalidDimensions=function(){for(var rt=0,pt=[this.canvas.width,this.canvas.height];rtthis.max){var ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}return this},gt.prototype.has=function(K){return K.wrapped().key in this.data},gt.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},gt.prototype._getAndRemoveByKey=function(K){var dt=this.data[K].shift();return dt.timeout&&clearTimeout(dt.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),dt.value},gt.prototype.getByKey=function(K){var dt=this.data[K];return dt?dt[0].value:null},gt.prototype.get=function(K){if(!this.has(K))return null;var dt=this.data[K.wrapped().key][0];return dt.value},gt.prototype.remove=function(K,dt){if(!this.has(K))return this;var rt=K.wrapped().key,pt=dt===void 0?0:this.data[rt].indexOf(dt),Ot=this.data[rt][pt];return this.data[rt].splice(pt,1),Ot.timeout&&clearTimeout(Ot.timeout),this.data[rt].length===0&&delete this.data[rt],this.onRemove(Ot.value),this.order.splice(this.order.indexOf(rt),1),this},gt.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var dt=this._getAndRemoveByKey(this.order[0]);dt&&this.onRemove(dt)}return this},gt.prototype.filter=function(K){var dt=[];for(var rt in this.data)for(var pt=0,Ot=this.data[rt];pt1||(Math.abs(cr)>1&&(Math.abs(cr+Fr)===1?cr+=Fr:Math.abs(cr-Fr)===1&&(cr-=Fr)),!(!qe.dem||!We.dem)&&(We.dem.backfillBorder(qe.dem,cr,lr),We.neighboringTiles&&We.neighboringTiles[Xr]&&(We.neighboringTiles[Xr].backfilled=!0)))}},K.prototype.getTile=function(rt){return this.getTileByID(rt.key)},K.prototype.getTileByID=function(rt){return this._tiles[rt]},K.prototype._retainLoadedChildren=function(rt,pt,Ot,Qt){for(var ue in this._tiles){var Re=this._tiles[ue];if(!(Qt[ue]||!Re.hasData()||Re.tileID.overscaledZ<=pt||Re.tileID.overscaledZ>Ot)){for(var We=Re.tileID;Re&&Re.tileID.overscaledZ>pt+1;){var qe=Re.tileID.scaledTo(Re.tileID.overscaledZ-1);Re=this._tiles[qe.key],Re&&Re.hasData()&&(We=qe)}for(var cr=We;cr.overscaledZ>pt;)if(cr=cr.scaledTo(cr.overscaledZ-1),rt[cr.key]){Qt[We.key]=We;break}}}},K.prototype.findLoadedParent=function(rt,pt){if(rt.key in this._loadedParentTiles){var Ot=this._loadedParentTiles[rt.key];return Ot&&Ot.tileID.overscaledZ>=pt?Ot:null}for(var Qt=rt.overscaledZ-1;Qt>=pt;Qt--){var ue=rt.scaledTo(Qt),Re=this._getLoadedTile(ue);if(Re)return Re}},K.prototype._getLoadedTile=function(rt){var pt=this._tiles[rt.key];if(pt&&pt.hasData())return pt;var Ot=this._cache.getByKey(rt.wrapped().key);return Ot},K.prototype.updateCacheSize=function(rt){var pt=Math.ceil(rt.width/this._source.tileSize)+1,Ot=Math.ceil(rt.height/this._source.tileSize)+1,Qt=pt*Ot,ue=5,Re=Math.floor(Qt*ue),We=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Re):Re;this._cache.setMaxSize(We)},K.prototype.handleWrapJump=function(rt){var pt=this._prevLng===void 0?rt:this._prevLng,Ot=rt-pt,Qt=Ot/360,ue=Math.round(Qt);if(this._prevLng=rt,ue){var Re={};for(var We in this._tiles){var qe=this._tiles[We];qe.tileID=qe.tileID.unwrapTo(qe.tileID.wrap+ue),Re[qe.tileID.key]=qe}this._tiles=Re;for(var cr in this._timers)clearTimeout(this._timers[cr]),delete this._timers[cr];for(var lr in this._tiles){var Fr=this._tiles[lr];this._setTileReloadTimer(lr,Fr)}}},K.prototype.update=function(rt){var pt=this;if(this.transform=rt,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(rt),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ot;this.used?this._source.tileID?Ot=rt.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(si){return new i.OverscaledTileID(si.canonical.z,si.wrap,si.canonical.z,si.canonical.x,si.canonical.y)}):(Ot=rt.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ot=Ot.filter(function(si){return pt._source.hasTile(si)}))):Ot=[];var Qt=rt.coveringZoomLevel(this._source),ue=Math.max(Qt-K.maxOverzooming,this._source.minzoom),Re=Math.max(Qt+K.maxUnderzooming,this._source.minzoom),We=this._updateRetainedTiles(Ot,Qt);if(Je(this._source.type)){for(var qe={},cr={},lr=Object.keys(We),Fr=0,Xr=lr;Frthis._source.maxzoom){var fn=Vr.children(this._source.maxzoom)[0],Fn=this.getTile(fn);if(Fn&&Fn.hasData()){Ot[fn.key]=fn;continue}}else{var Nn=Vr.children(this._source.maxzoom);if(Ot[Nn[0].key]&&Ot[Nn[1].key]&&Ot[Nn[2].key]&&Ot[Nn[3].key])continue}for(var Yn=Kr.wasRequested(),Xn=Vr.overscaledZ-1;Xn>=ue;--Xn){var Gn=Vr.scaledTo(Xn);if(Qt[Gn.key]||(Qt[Gn.key]=!0,Kr=this.getTile(Gn),!Kr&&Yn&&(Kr=this._addTile(Gn)),Kr&&(Ot[Gn.key]=Gn,Yn=Kr.wasRequested(),Kr.hasData())))break}}}return Ot},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var rt in this._tiles){for(var pt=[],Ot=void 0,Qt=this._tiles[rt].tileID;Qt.overscaledZ>0;){if(Qt.key in this._loadedParentTiles){Ot=this._loadedParentTiles[Qt.key];break}pt.push(Qt.key);var ue=Qt.scaledTo(Qt.overscaledZ-1);if(Ot=this._getLoadedTile(ue),Ot)break;Qt=ue}for(var Re=0,We=pt;Re0)&&(pt.hasData()&&pt.state!=="reloading"?this._cache.add(pt.tileID,pt,pt.getExpiryTimeout()):(pt.aborted=!0,this._abortTile(pt),this._unloadTile(pt))))},K.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var rt in this._tiles)this._removeTile(rt);this._cache.reset()},K.prototype.tilesIn=function(rt,pt,Ot){var Qt=this,ue=[],Re=this.transform;if(!Re)return ue;for(var We=Ot?Re.getCameraQueryGeometry(rt):rt,qe=rt.map(function(Xn){return Re.pointCoordinate(Xn)}),cr=We.map(function(Xn){return Re.pointCoordinate(Xn)}),lr=this.getIds(),Fr=1/0,Xr=1/0,Yr=-1/0,Vr=-1/0,Kr=0,fn=cr;Kr=0&&yi[1].y+si>=0){var hi=qe.map(function(Ji){return jn.getTilePoint(Ji)}),Fi=cr.map(function(Ji){return jn.getTilePoint(Ji)});ue.push({tile:Gn,tileID:jn,queryGeometry:hi,cameraQueryGeometry:Fi,scale:ti})}}},Yn=0;Yn=i.browser.now())return!0}return!1},K.prototype.setFeatureState=function(rt,pt,Ot){rt=rt||"_geojsonTileLayer",this._state.updateState(rt,pt,Ot)},K.prototype.removeFeatureState=function(rt,pt,Ot){rt=rt||"_geojsonTileLayer",this._state.removeFeatureState(rt,pt,Ot)},K.prototype.getFeatureState=function(rt,pt){return rt=rt||"_geojsonTileLayer",this._state.getState(rt,pt)},K.prototype.setDependencies=function(rt,pt,Ot){var Qt=this._tiles[rt];Qt&&Qt.setDependencies(pt,Ot)},K.prototype.reloadTilesForDependencies=function(rt,pt){for(var Ot in this._tiles){var Qt=this._tiles[Ot];Qt.hasDependency(rt,pt)&&this._reloadTile(Ot,"reloading")}this._cache.filter(function(ue){return!ue.hasDependency(rt,pt)})},K}(i.Evented);ke.maxOverzooming=10,ke.maxUnderzooming=3;function Ve(ht,K){var dt=Math.abs(ht.wrap*2)-+(ht.wrap<0),rt=Math.abs(K.wrap*2)-+(K.wrap<0);return ht.overscaledZ-K.overscaledZ||rt-dt||K.canonical.y-ht.canonical.y||K.canonical.x-ht.canonical.x}function Je(ht){return ht==="raster"||ht==="image"||ht==="video"}function ur(){return new i.window.Worker(ro.workerUrl)}var hr="mapboxgl_preloaded_worker_pool",vr=function(){this.active={}};vr.prototype.acquire=function(K){if(!this.workers)for(this.workers=[];this.workers.length0?(pt-Qt)/ue:0;return this.points[Ot].mult(1-Re).add(this.points[dt].mult(Re))};var Tr=function(K,dt,rt){var pt=this.boxCells=[],Ot=this.circleCells=[];this.xCellCount=Math.ceil(K/rt),this.yCellCount=Math.ceil(dt/rt);for(var Qt=0;Qtthis.width||pt<0||dt>this.height)return Ot?!1:[];var ue=[];if(K<=0&&dt<=0&&this.width<=rt&&this.height<=pt){if(Ot)return!0;for(var Re=0;Re0:ue}},Tr.prototype._queryCircle=function(K,dt,rt,pt,Ot){var Qt=K-rt,ue=K+rt,Re=dt-rt,We=dt+rt;if(ue<0||Qt>this.width||We<0||Re>this.height)return pt?!1:[];var qe=[],cr={hitTest:pt,circle:{x:K,y:dt,radius:rt},seenUids:{box:{},circle:{}}};return this._forEachCell(Qt,Re,ue,We,this._queryCellCircle,qe,cr,Ot),pt?qe.length>0:qe},Tr.prototype.query=function(K,dt,rt,pt,Ot){return this._query(K,dt,rt,pt,!1,Ot)},Tr.prototype.hitTest=function(K,dt,rt,pt,Ot){return this._query(K,dt,rt,pt,!0,Ot)},Tr.prototype.hitTestCircle=function(K,dt,rt,pt){return this._queryCircle(K,dt,rt,!0,pt)},Tr.prototype._queryCell=function(K,dt,rt,pt,Ot,Qt,ue,Re){var We=ue.seenUids,qe=this.boxCells[Ot];if(qe!==null)for(var cr=this.bboxes,lr=0,Fr=qe;lr=cr[Yr+0]&&pt>=cr[Yr+1]&&(!Re||Re(this.boxKeys[Xr]))){if(ue.hitTest)return Qt.push(!0),!0;Qt.push({key:this.boxKeys[Xr],x1:cr[Yr],y1:cr[Yr+1],x2:cr[Yr+2],y2:cr[Yr+3]})}}}var Vr=this.circleCells[Ot];if(Vr!==null)for(var Kr=this.circles,fn=0,Fn=Vr;fnue*ue+Re*Re},Tr.prototype._circleAndRectCollide=function(K,dt,rt,pt,Ot,Qt,ue){var Re=(Qt-pt)/2,We=Math.abs(K-(pt+Re));if(We>Re+rt)return!1;var qe=(ue-Ot)/2,cr=Math.abs(dt-(Ot+qe));if(cr>qe+rt)return!1;if(We<=Re||cr<=qe)return!0;var lr=We-Re,Fr=cr-qe;return lr*lr+Fr*Fr<=rt*rt};function Cr(ht,K,dt,rt,pt){var Ot=i.create();return K?(i.scale(Ot,Ot,[1/pt,1/pt,1]),dt||i.rotateZ(Ot,Ot,rt.angle)):i.multiply(Ot,rt.labelPlaneMatrix,ht),Ot}function Wr(ht,K,dt,rt,pt){if(K){var Ot=i.clone(ht);return i.scale(Ot,Ot,[pt,pt,1]),dt||i.rotateZ(Ot,Ot,-rt.angle),Ot}else return rt.glCoordMatrix}function Ur(ht,K){var dt=[ht.x,ht.y,0,1];wr(dt,dt,K);var rt=dt[3];return{point:new i.Point(dt[0]/rt,dt[1]/rt),signedDistanceFromCamera:rt}}function an(ht,K){return .5+.5*(ht/K)}function pn(ht,K){var dt=ht[0]/ht[3],rt=ht[1]/ht[3],pt=dt>=-K[0]&&dt<=K[0]&&rt>=-K[1]&&rt<=K[1];return pt}function gn(ht,K,dt,rt,pt,Ot,Qt,ue){var Re=rt?ht.textSizeData:ht.iconSizeData,We=i.evaluateSizeForZoom(Re,dt.transform.zoom),qe=[256/dt.width*2+1,256/dt.height*2+1],cr=rt?ht.text.dynamicLayoutVertexArray:ht.icon.dynamicLayoutVertexArray;cr.clear();for(var lr=ht.lineVertexArray,Fr=rt?ht.text.placedSymbolArray:ht.icon.placedSymbolArray,Xr=dt.transform.width/dt.transform.height,Yr=!1,Vr=0;VrOt)return{useVertical:!0}}return(ht===i.WritingMode.vertical?K.ydt.x)?{needsFlipping:!0}:null}function ni(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We,qe,cr,lr,Fr){var Xr=K/24,Yr=ht.lineOffsetX*Xr,Vr=ht.lineOffsetY*Xr,Kr;if(ht.numGlyphs>1){var fn=ht.glyphStartIndex+ht.numGlyphs,Fn=ht.lineStartIndex,Nn=ht.lineStartIndex+ht.lineLength,Yn=_n(Xr,ue,Yr,Vr,dt,qe,cr,ht,Re,Ot,lr);if(!Yn)return{notEnoughRoom:!0};var Xn=Ur(Yn.first.point,Qt).point,Gn=Ur(Yn.last.point,Qt).point;if(rt&&!dt){var jn=kn(ht.writingMode,Xn,Gn,Fr);if(jn)return jn}Kr=[Yn.first];for(var ti=ht.glyphStartIndex+1;ti0?Fi.point:ci(cr,hi,si,1,pt),Gi=kn(ht.writingMode,si,Ji,Fr);if(Gi)return Gi}var Ai=di(Xr*ue.getoffsetX(ht.glyphStartIndex),Yr,Vr,dt,qe,cr,ht.segment,ht.lineStartIndex,ht.lineStartIndex+ht.lineLength,Re,Ot,lr);if(!Ai)return{notEnoughRoom:!0};Kr=[Ai]}for(var Yi=0,Ui=Kr;Yi0?1:-1,Xr=0;rt&&(Fr*=-1,Xr=Math.PI),Fr<0&&(Xr+=Math.PI);for(var Yr=Fr>0?ue+Qt:ue+Qt+1,Vr=pt,Kr=pt,fn=0,Fn=0,Nn=Math.abs(lr),Yn=[];fn+Fn<=Nn;){if(Yr+=Fr,Yr=Re)return null;if(Kr=Vr,Yn.push(Vr),Vr=cr[Yr],Vr===void 0){var Xn=new i.Point(We.getx(Yr),We.gety(Yr)),Gn=Ur(Xn,qe);if(Gn.signedDistanceFromCamera>0)Vr=cr[Yr]=Gn.point;else{var jn=Yr-Fr,ti=fn===0?Ot:new i.Point(We.getx(jn),We.gety(jn));Vr=ci(ti,Xn,Kr,Nn-fn+1,qe)}}fn+=Fn,Fn=Kr.dist(Vr)}var si=(Nn-fn)/Fn,yi=Vr.sub(Kr),hi=yi.mult(si)._add(Kr);hi._add(yi._unit()._perp()._mult(dt*Fr));var Fi=Xr+Math.atan2(Vr.y-Kr.y,Vr.x-Kr.x);return Yn.push(hi),{point:hi,angle:Fi,path:Yn}}var li=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ri(ht,K){for(var dt=0;dt=1;ia--)Ui.push(Ai.path[ia]);for(var qi=1;qi0){for(var Hi=Ui[0].clone(),Qi=Ui[0].clone(),Na=1;Na=Fi.x&&Qi.x<=Ji.x&&Hi.y>=Fi.y&&Qi.y<=Ji.y?ma=[Ui]:Qi.xJi.x||Qi.yJi.y?ma=[]:ma=i.clipLine([Ui],Fi.x,Fi.y,Ji.x,Ji.y)}for(var fo=0,Ns=ma;fo=this.screenRightBoundary||ptthis.screenBottomBoundary},$r.prototype.isInsideGrid=function(K,dt,rt,pt){return rt>=0&&K=0&&dt0){var Nn;return this.prevPlacement&&this.prevPlacement.variableOffsets[lr.crossTileID]&&this.prevPlacement.placements[lr.crossTileID]&&this.prevPlacement.placements[lr.crossTileID].text&&(Nn=this.prevPlacement.variableOffsets[lr.crossTileID].anchor),this.variableOffsets[lr.crossTileID]={textOffset:Vr,width:rt,height:pt,anchor:K,textBoxScale:Ot,prevAnchor:Nn},this.markUsedJustification(Fr,K,lr,Xr),Fr.allowVerticalPlacement&&(this.markUsedOrientation(Fr,Xr,lr),this.placedOrientations[lr.crossTileID]=Xr),{shift:Kr,placedGlyphBoxes:fn}}},kr.prototype.placeLayerBucketPart=function(K,dt,rt){var pt=this,Ot=K.parameters,Qt=Ot.bucket,ue=Ot.layout,Re=Ot.posMatrix,We=Ot.textLabelPlaneMatrix,qe=Ot.labelToScreenMatrix,cr=Ot.textPixelRatio,lr=Ot.holdingForFade,Fr=Ot.collisionBoxArray,Xr=Ot.partiallyEvaluatedTextSize,Yr=Ot.collisionGroup,Vr=ue.get("text-optional"),Kr=ue.get("icon-optional"),fn=ue.get("text-allow-overlap"),Fn=ue.get("icon-allow-overlap"),Nn=ue.get("text-rotation-alignment")==="map",Yn=ue.get("text-pitch-alignment")==="map",Xn=ue.get("icon-text-fit")!=="none",Gn=ue.get("symbol-z-order")==="viewport-y",jn=fn&&(Fn||!Qt.hasIconData()||Kr),ti=Fn&&(fn||!Qt.hasTextData()||Vr);!Qt.collisionArrays&&Fr&&Qt.deserializeCollisionBoxes(Fr);var si=function(Ai,Yi){if(!dt[Ai.crossTileID]){if(lr){pt.placements[Ai.crossTileID]=new An(!1,!1,!1);return}var Ui=!1,ia=!1,qi=!0,Ta=null,Ki={box:null,offscreen:null},ma={box:null,offscreen:null},Hi=null,Qi=null,Na=null,fo=0,Ns=0,Bs=0;Yi.textFeatureIndex?fo=Yi.textFeatureIndex:Ai.useRuntimeCollisionCircles&&(fo=Ai.featureIndex),Yi.verticalTextFeatureIndex&&(Ns=Yi.verticalTextFeatureIndex);var el=Yi.textBox;if(el){var Cl=function(Ga){var ss=i.WritingMode.horizontal;if(Qt.allowVerticalPlacement&&!Ga&&pt.prevPlacement){var ls=pt.prevPlacement.placedOrientations[Ai.crossTileID];ls&&(pt.placedOrientations[Ai.crossTileID]=ls,ss=ls,pt.markUsedOrientation(Qt,ss,Ai))}return ss},sf=function(Ga,ss){if(Qt.allowVerticalPlacement&&Ai.numVerticalGlyphVertices>0&&Yi.verticalTextBox)for(var ls=0,hh=Qt.writingModes;ls0&&(os=os.filter(function(Ga){return Ga!==Ko.anchor}),os.unshift(Ko.anchor))}var rl=function(Ga,ss,ls){for(var hh=Ga.x2-Ga.x1,wv=Ga.y2-Ga.y1,Ap=Ai.textBoxScale,Mp=Xn&&!Fn?ss:null,Uc={box:[],offscreen:!1},Sp=fn?os.length*2:os.length,vh=0;vh=os.length,Tv=pt.attemptAnchorPlacement(Ep,Ga,hh,wv,Ap,Nn,Yn,cr,Re,Yr,_p,Ai,Qt,ls,Mp);if(Tv&&(Uc=Tv.placedGlyphBoxes,Uc&&Uc.box&&Uc.box.length)){Ui=!0,Ta=Tv.shift;break}}return Uc},ru=function(){return rl(el,Yi.iconBox,i.WritingMode.horizontal)},nl=function(){var Ga=Yi.verticalTextBox,ss=Ki&&Ki.box&&Ki.box.length;return Qt.allowVerticalPlacement&&!ss&&Ai.numVerticalGlyphVertices>0&&Ga?rl(Ga,Yi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};sf(ru,nl),Ki&&(Ui=Ki.box,qi=Ki.offscreen);var sh=Cl(Ki&&Ki.box);if(!Ui&&pt.prevPlacement){var jf=pt.prevPlacement.variableOffsets[Ai.crossTileID];jf&&(pt.variableOffsets[Ai.crossTileID]=jf,pt.markUsedJustification(Qt,jf.anchor,Ai,sh))}}else{var Ll=function(Ga,ss){var ls=pt.collisionIndex.placeCollisionBox(Ga,fn,cr,Re,Yr.predicate);return ls&&ls.box&&ls.box.length&&(pt.markUsedOrientation(Qt,ss,Ai),pt.placedOrientations[Ai.crossTileID]=ss),ls},jo=function(){return Ll(el,i.WritingMode.horizontal)},Pl=function(){var Ga=Yi.verticalTextBox;return Qt.allowVerticalPlacement&&Ai.numVerticalGlyphVertices>0&&Ga?Ll(Ga,i.WritingMode.vertical):{box:null,offscreen:null}};sf(jo,Pl),Cl(Ki&&Ki.box&&Ki.box.length)}}if(Hi=Ki,Ui=Hi&&Hi.box&&Hi.box.length>0,qi=Hi&&Hi.offscreen,Ai.useRuntimeCollisionCircles){var po=Qt.text.placedSymbolArray.get(Ai.centerJustifiedTextSymbolIndex),lh=i.evaluateSizeForFeature(Qt.textSizeData,Xr,po),Bc=ue.get("text-padding"),Io=Ai.collisionCircleDiameter;Qi=pt.collisionIndex.placeCollisionCircles(fn,po,Qt.lineVertexArray,Qt.glyphOffsetArray,lh,Re,We,qe,rt,Yn,Yr.predicate,Io,Bc),Ui=fn||Qi.circles.length>0&&!Qi.collisionDetected,qi=qi&&Qi.offscreen}if(Yi.iconFeatureIndex&&(Bs=Yi.iconFeatureIndex),Yi.iconBox){var Kf=function(Ga){var ss=Xn&&Ta?Sr(Ga,Ta.x,Ta.y,Nn,Yn,pt.transform.angle):Ga;return pt.collisionIndex.placeCollisionBox(ss,Fn,cr,Re,Yr.predicate)};ma&&ma.box&&ma.box.length&&Yi.verticalIconBox?(Na=Kf(Yi.verticalIconBox),ia=Na.box.length>0):(Na=Kf(Yi.iconBox),ia=Na.box.length>0),qi=qi&&Na.offscreen}var uh=Vr||Ai.numHorizontalGlyphVertices===0&&Ai.numVerticalGlyphVertices===0,fh=Kr||Ai.numIconVertices===0;if(!uh&&!fh?ia=Ui=ia&&Ui:fh?uh||(ia=ia&&Ui):Ui=ia&&Ui,Ui&&Hi&&Hi.box&&(ma&&ma.box&&Ns?pt.collisionIndex.insertCollisionBox(Hi.box,ue.get("text-ignore-placement"),Qt.bucketInstanceId,Ns,Yr.ID):pt.collisionIndex.insertCollisionBox(Hi.box,ue.get("text-ignore-placement"),Qt.bucketInstanceId,fo,Yr.ID)),ia&&Na&&pt.collisionIndex.insertCollisionBox(Na.box,ue.get("icon-ignore-placement"),Qt.bucketInstanceId,Bs,Yr.ID),Qi&&(Ui&&pt.collisionIndex.insertCollisionCircles(Qi.circles,ue.get("text-ignore-placement"),Qt.bucketInstanceId,fo,Yr.ID),rt)){var ch=Qt.bucketInstanceId,Jf=pt.collisionCircleArrays[ch];Jf===void 0&&(Jf=pt.collisionCircleArrays[ch]=new Bn);for(var Qf=0;Qf=0;--hi){var Fi=yi[hi];si(Qt.symbolInstances.get(Fi),Qt.collisionArrays[Fi])}else for(var Ji=K.symbolInstanceStart;Ji=0&&(Qt>=0&&qe!==Qt?K.text.placedSymbolArray.get(qe).crossTileID=0:K.text.placedSymbolArray.get(qe).crossTileID=rt.crossTileID)}},kr.prototype.markUsedOrientation=function(K,dt,rt){for(var pt=dt===i.WritingMode.horizontal||dt===i.WritingMode.horizontalOnly?dt:0,Ot=dt===i.WritingMode.vertical?dt:0,Qt=[rt.leftJustifiedTextSymbolIndex,rt.centerJustifiedTextSymbolIndex,rt.rightJustifiedTextSymbolIndex],ue=0,Re=Qt;ue0||Yn>0,si=Fn.numIconVertices>0,yi=pt.placedOrientations[Fn.crossTileID],hi=yi===i.WritingMode.vertical,Fi=yi===i.WritingMode.horizontal||yi===i.WritingMode.horizontalOnly;if(ti){var Ji=Hr(jn.text),Gi=hi?Qr:Ji;Xr(K.text,Nn,Gi);var Ai=Fi?Qr:Ji;Xr(K.text,Yn,Ai);var Yi=jn.text.isHidden();[Fn.rightJustifiedTextSymbolIndex,Fn.centerJustifiedTextSymbolIndex,Fn.leftJustifiedTextSymbolIndex].forEach(function(Bs){Bs>=0&&(K.text.placedSymbolArray.get(Bs).hidden=Yi||hi?1:0)}),Fn.verticalPlacedTextSymbolIndex>=0&&(K.text.placedSymbolArray.get(Fn.verticalPlacedTextSymbolIndex).hidden=Yi||Fi?1:0);var Ui=pt.variableOffsets[Fn.crossTileID];Ui&&pt.markUsedJustification(K,Ui.anchor,Fn,yi);var ia=pt.placedOrientations[Fn.crossTileID];ia&&(pt.markUsedJustification(K,"left",Fn,ia),pt.markUsedOrientation(K,ia,Fn))}if(si){var qi=Hr(jn.icon),Ta=!(lr&&Fn.verticalPlacedIconSymbolIndex&&hi);if(Fn.placedIconSymbolIndex>=0){var Ki=Ta?qi:Qr;Xr(K.icon,Fn.numIconVertices,Ki),K.icon.placedSymbolArray.get(Fn.placedIconSymbolIndex).hidden=jn.icon.isHidden()}if(Fn.verticalPlacedIconSymbolIndex>=0){var ma=Ta?Qr:qi;Xr(K.icon,Fn.numVerticalIconVertices,ma),K.icon.placedSymbolArray.get(Fn.verticalPlacedIconSymbolIndex).hidden=jn.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Hi=K.collisionArrays[fn];if(Hi){var Qi=new i.Point(0,0);if(Hi.textBox||Hi.verticalTextBox){var Na=!0;if(We){var fo=pt.variableOffsets[Xn];fo?(Qi=Di(fo.anchor,fo.width,fo.height,fo.textOffset,fo.textBoxScale),qe&&Qi._rotate(cr?pt.transform.angle:-pt.transform.angle)):Na=!1}Hi.textBox&&Ar(K.textCollisionBox.collisionVertexArray,jn.text.placed,!Na||hi,Qi.x,Qi.y),Hi.verticalTextBox&&Ar(K.textCollisionBox.collisionVertexArray,jn.text.placed,!Na||Fi,Qi.x,Qi.y)}var Ns=!!(!Fi&&Hi.verticalIconBox);Hi.iconBox&&Ar(K.iconCollisionBox.collisionVertexArray,jn.icon.placed,Ns,lr?Qi.x:0,lr?Qi.y:0),Hi.verticalIconBox&&Ar(K.iconCollisionBox.collisionVertexArray,jn.icon.placed,!Ns,lr?Qi.x:0,lr?Qi.y:0)}}},Vr=0;VrK},kr.prototype.setStale=function(){this.stale=!0};function Ar(ht,K,dt,rt,pt){ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0),ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0),ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0),ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0)}var Or=Math.pow(2,25),xn=Math.pow(2,24),In=Math.pow(2,17),hn=Math.pow(2,16),sn=Math.pow(2,9),Er=Math.pow(2,8),Zr=Math.pow(2,1);function Hr(ht){if(ht.opacity===0&&!ht.placed)return 0;if(ht.opacity===1&&ht.placed)return 4294967295;var K=ht.placed?1:0,dt=Math.floor(ht.opacity*127);return dt*Or+K*xn+dt*In+K*hn+dt*sn+K*Er+dt*Zr+K}var Qr=0,wn=function(K){this._sortAcrossTiles=K.layout.get("symbol-z-order")!=="viewport-y"&&K.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};wn.prototype.continuePlacement=function(K,dt,rt,pt,Ot){for(var Qt=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var ue=K[this._currentPlacementIndex],Re=dt[ue],We=this.placement.collisionIndex.transform.zoom;if(Re.type==="symbol"&&(!Re.minzoom||Re.minzoom<=We)&&(!Re.maxzoom||Re.maxzoom>We)){this._inProgressLayer||(this._inProgressLayer=new wn(Re));var qe=this._inProgressLayer.continuePlacement(rt[Re.source],this.placement,this._showCollisionBoxes,Re,Qt);if(qe)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ln.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Pn=512/i.EXTENT/2,Un=function(K,dt,rt){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=rt;for(var pt=0;ptK.overscaledZ)for(var We in Re){var qe=Re[We];qe.tileID.isChildOf(K)&&qe.findMatches(dt.symbolInstances,K,Qt)}else{var cr=K.scaledTo(Number(ue)),lr=Re[cr.key];lr&&lr.findMatches(dt.symbolInstances,K,Qt)}}for(var Fr=0;Fr0)throw new Error("Unimplemented: "+Qt.map(function(ue){return ue.command}).join(", ")+".");return Ot.forEach(function(ue){ue.command!=="setTransition"&&pt[ue.command].apply(pt,ue.args)}),this.stylesheet=rt,!0},K.prototype.addImage=function(rt,pt){if(this.getImage(rt))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(rt,pt),this._afterImageUpdated(rt)},K.prototype.updateImage=function(rt,pt){this.imageManager.updateImage(rt,pt)},K.prototype.getImage=function(rt){return this.imageManager.getImage(rt)},K.prototype.removeImage=function(rt){if(!this.getImage(rt))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(rt),this._afterImageUpdated(rt)},K.prototype._afterImageUpdated=function(rt){this._availableImages=this.imageManager.listImages(),this._changedImages[rt]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},K.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},K.prototype.addSource=function(rt,pt,Ot){var Qt=this;if(Ot===void 0&&(Ot={}),this._checkLoaded(),this.sourceCaches[rt]!==void 0)throw new Error("There is already a source with this ID");if(!pt.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(pt).join(", ")+".");var ue=["vector","raster","geojson","video","image"],Re=ue.indexOf(pt.type)>=0;if(!(Re&&this._validate(i.validateStyle.source,"sources."+rt,pt,null,Ot))){this.map&&this.map._collectResourceTiming&&(pt.collectResourceTiming=!0);var We=this.sourceCaches[rt]=new ke(rt,pt,this.dispatcher);We.style=this,We.setEventedParent(this,function(){return{isSourceLoaded:Qt.loaded(),source:We.serialize(),sourceId:rt}}),We.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(rt){if(this._checkLoaded(),this.sourceCaches[rt]===void 0)throw new Error("There is no source with this ID");for(var pt in this._layers)if(this._layers[pt].source===rt)return this.fire(new i.ErrorEvent(new Error('Source "'+rt+'" cannot be removed while layer "'+pt+'" is using it.')));var Ot=this.sourceCaches[rt];delete this.sourceCaches[rt],delete this._updatedSources[rt],Ot.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:rt})),Ot.setEventedParent(null),Ot.clearTiles(),Ot.onRemove&&Ot.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(rt,pt){this._checkLoaded();var Ot=this.sourceCaches[rt].getSource();Ot.setData(pt),this._changed=!0},K.prototype.getSource=function(rt){return this.sourceCaches[rt]&&this.sourceCaches[rt].getSource()},K.prototype.addLayer=function(rt,pt,Ot){Ot===void 0&&(Ot={}),this._checkLoaded();var Qt=rt.id;if(this.getLayer(Qt)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+Qt+'" already exists on this map')));return}var ue;if(rt.type==="custom"){if(pi(this,i.validateCustomStyleLayer(rt)))return;ue=i.createStyleLayer(rt)}else{if(typeof rt.source=="object"&&(this.addSource(Qt,rt.source),rt=i.clone$1(rt),rt=i.extend(rt,{source:Qt})),this._validate(i.validateStyle.layer,"layers."+Qt,rt,{arrayIndex:-1},Ot))return;ue=i.createStyleLayer(rt),this._validateLayer(ue),ue.setEventedParent(this,{layer:{id:Qt}}),this._serializedLayers[ue.id]=ue.serialize()}var Re=pt?this._order.indexOf(pt):this._order.length;if(pt&&Re===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+pt+'" does not exist on this map.')));return}if(this._order.splice(Re,0,Qt),this._layerOrderChanged=!0,this._layers[Qt]=ue,this._removedLayers[Qt]&&ue.source&&ue.type!=="custom"){var We=this._removedLayers[Qt];delete this._removedLayers[Qt],We.type!==ue.type?this._updatedSources[ue.source]="clear":(this._updatedSources[ue.source]="reload",this.sourceCaches[ue.source].pause())}this._updateLayer(ue),ue.onAdd&&ue.onAdd(this.map)},K.prototype.moveLayer=function(rt,pt){this._checkLoaded(),this._changed=!0;var Ot=this._layers[rt];if(!Ot){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be moved.")));return}if(rt!==pt){var Qt=this._order.indexOf(rt);this._order.splice(Qt,1);var ue=pt?this._order.indexOf(pt):this._order.length;if(pt&&ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+pt+'" does not exist on this map.')));return}this._order.splice(ue,0,rt),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(rt){this._checkLoaded();var pt=this._layers[rt];if(!pt){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be removed.")));return}pt.setEventedParent(null);var Ot=this._order.indexOf(rt);this._order.splice(Ot,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[rt]=pt,delete this._layers[rt],delete this._serializedLayers[rt],delete this._updatedLayers[rt],delete this._updatedPaintProps[rt],pt.onRemove&&pt.onRemove(this.map)},K.prototype.getLayer=function(rt){return this._layers[rt]},K.prototype.hasLayer=function(rt){return rt in this._layers},K.prototype.setLayerZoomRange=function(rt,pt,Ot){this._checkLoaded();var Qt=this.getLayer(rt);if(!Qt){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot have zoom extent.")));return}Qt.minzoom===pt&&Qt.maxzoom===Ot||(pt!=null&&(Qt.minzoom=pt),Ot!=null&&(Qt.maxzoom=Ot),this._updateLayer(Qt))},K.prototype.setFilter=function(rt,pt,Ot){Ot===void 0&&(Ot={}),this._checkLoaded();var Qt=this.getLayer(rt);if(!Qt){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(Qt.filter,pt)){if(pt==null){Qt.filter=void 0,this._updateLayer(Qt);return}this._validate(i.validateStyle.filter,"layers."+Qt.id+".filter",pt,null,Ot)||(Qt.filter=i.clone$1(pt),this._updateLayer(Qt))}},K.prototype.getFilter=function(rt){return i.clone$1(this.getLayer(rt).filter)},K.prototype.setLayoutProperty=function(rt,pt,Ot,Qt){Qt===void 0&&(Qt={}),this._checkLoaded();var ue=this.getLayer(rt);if(!ue){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(ue.getLayoutProperty(pt),Ot)||(ue.setLayoutProperty(pt,Ot,Qt),this._updateLayer(ue))},K.prototype.getLayoutProperty=function(rt,pt){var Ot=this.getLayer(rt);if(!Ot){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style.")));return}return Ot.getLayoutProperty(pt)},K.prototype.setPaintProperty=function(rt,pt,Ot,Qt){Qt===void 0&&(Qt={}),this._checkLoaded();var ue=this.getLayer(rt);if(!ue){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(ue.getPaintProperty(pt),Ot)){var Re=ue.setPaintProperty(pt,Ot,Qt);Re&&this._updateLayer(ue),this._changed=!0,this._updatedPaintProps[rt]=!0}},K.prototype.getPaintProperty=function(rt,pt){return this.getLayer(rt).getPaintProperty(pt)},K.prototype.setFeatureState=function(rt,pt){this._checkLoaded();var Ot=rt.source,Qt=rt.sourceLayer,ue=this.sourceCaches[Ot];if(ue===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+Ot+"' does not exist in the map's style.")));return}var Re=ue.getSource().type;if(Re==="geojson"&&Qt){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Re==="vector"&&!Qt){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}rt.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ue.setFeatureState(Qt,rt.id,pt)},K.prototype.removeFeatureState=function(rt,pt){this._checkLoaded();var Ot=rt.source,Qt=this.sourceCaches[Ot];if(Qt===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+Ot+"' does not exist in the map's style.")));return}var ue=Qt.getSource().type,Re=ue==="vector"?rt.sourceLayer:void 0;if(ue==="vector"&&!Re){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(pt&&typeof rt.id!="string"&&typeof rt.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}Qt.removeFeatureState(Re,rt.id,pt)},K.prototype.getFeatureState=function(rt){this._checkLoaded();var pt=rt.source,Ot=rt.sourceLayer,Qt=this.sourceCaches[pt];if(Qt===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+pt+"' does not exist in the map's style.")));return}var ue=Qt.getSource().type;if(ue==="vector"&&!Ot){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return rt.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Qt.getFeatureState(Ot,rt.id)},K.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},K.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(rt){return rt.serialize()}),layers:this._serializeLayers(this._order)},function(rt){return rt!==void 0})},K.prototype._updateLayer=function(rt){this._updatedLayers[rt.id]=!0,rt.source&&!this._updatedSources[rt.source]&&this.sourceCaches[rt.source].getSource().type!=="raster"&&(this._updatedSources[rt.source]="reload",this.sourceCaches[rt.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(rt){for(var pt=this,Ot=function(Fi){return pt._layers[Fi].type==="fill-extrusion"},Qt={},ue=[],Re=this._order.length-1;Re>=0;Re--){var We=this._order[Re];if(Ot(We)){Qt[We]=Re;for(var qe=0,cr=rt;qe=0;fn--){var Fn=this._order[fn];if(Ot(Fn))for(var Nn=ue.length-1;Nn>=0;Nn--){var Yn=ue[Nn].feature;if(Qt[Yn.layer.id]24?(isFinite(Ct)&&(clearTimeout(pn),pn=setTimeout(kn,Ct)),an=0):(an=1,gn(kn))}i.timer.flush=function(){ni(),ci()};function ni(){for(var ft=Date.now(),Ct=Wr;Ct;)ft>=Ct.t&&Ct.c(ft-Ct.t)&&(Ct.c=null),Ct=Ct.n;return ft}function ci(){for(var ft,Ct=Wr,Bt=1/0;Ct;)Ct.c?(Ct.t=0;--Ee)Rr.push(ae[Ze[_r[Ee]][2]]);for(Ee=+Jr;Ee1&&ve(ft[Bt[ee-2]],ft[Bt[ee-1]],ft[ae])<=0;)--ee;Bt[ee++]=ae}return Bt.slice(0,ee)}function wr(ft,Ct){return ft[0]-Ct[0]||ft[1]-Ct[1]}i.geom.polygon=function(ft){return tt(ft,nn),ft};var nn=i.geom.polygon.prototype=[];nn.area=function(){for(var ft=-1,Ct=this.length,Bt,ee=this[Ct-1],ae=0;++ftyt)Ee=Ee.L;else if(De=Ct-sn(Ee,Bt),De>yt){if(!Ee.R){ee=Ee;break}Ee=Ee.R}else{fe>-yt?(ee=Ee.P,ae=Ee):De>-yt?(ee=Ee,ae=Ee.N):ee=ae=Ee;break}var Ye=Ar(ft);if(Bn.insert(ee,Ye),!(!ee&&!ae)){if(ee===ae){Ln(ee),ae=Ar(ee.site),Bn.insert(Ye,ae),Ye.edge=ae.edge=ai(ee.site,Ye.site),wn(ee),wn(ae);return}if(!ae){Ye.edge=ai(ee.site,Ye.site);return}Ln(ee),Ln(ae);var Ze=ee.site,nr=Ze.x,_r=Ze.y,Lr=ft.x-nr,Jr=ft.y-_r,on=ae.site,Rr=on.x-nr,Br=on.y-_r,jr=2*(Lr*Br-Jr*Rr),un=Lr*Lr+Jr*Jr,vn=Rr*Rr+Br*Br,qr={x:(Br*un-Jr*vn)/jr+nr,y:(Lr*vn-Rr*un)/jr+_r};Ci(ae.edge,Ze,on,qr),Ye.edge=ai(Ze,ft,null,qr),ae.edge=ai(ft,on,null,qr),wn(ee),wn(ae)}}function hn(ft,Ct){var Bt=ft.site,ee=Bt.x,ae=Bt.y,fe=ae-Ct;if(!fe)return ee;var De=ft.P;if(!De)return-1/0;Bt=De.site;var Ee=Bt.x,Ye=Bt.y,Ze=Ye-Ct;if(!Ze)return Ee;var nr=Ee-ee,_r=1/fe-1/Ze,Lr=nr/Ze;return _r?(-Lr+Math.sqrt(Lr*Lr-2*_r*(nr*nr/(-2*Ze)-Ye+Ze/2+ae-fe/2)))/_r+ee:(ee+Ee)/2}function sn(ft,Ct){var Bt=ft.N;if(Bt)return hn(Bt,Ct);var ee=ft.site;return ee.y===Ct?ee.x:1/0}function Er(ft){this.site=ft,this.edges=[]}Er.prototype.prepare=function(){for(var ft=this.edges,Ct=ft.length,Bt;Ct--;)Bt=ft[Ct].edge,(!Bt.b||!Bt.a)&&ft.splice(Ct,1);return ft.sort(Hr),ft.length};function Zr(ft){for(var Ct=ft[0][0],Bt=ft[1][0],ee=ft[0][1],ae=ft[1][1],fe,De,Ee,Ye,Ze=An,nr=Ze.length,_r,Lr,Jr,on,Rr,Br;nr--;)if(_r=Ze[nr],!(!_r||!_r.prepare()))for(Jr=_r.edges,on=Jr.length,Lr=0;Lryt||d(Ye-De)>yt)&&(Jr.splice(Lr,0,new pa(pi(_r.site,Br,d(Ee-Ct)yt?{x:Ct,y:d(fe-Ct)yt?{x:d(De-ae)yt?{x:Bt,y:d(fe-Bt)yt?{x:d(De-ee)=-Et)){var Lr=Ye*Ye+Ze*Ze,Jr=nr*nr+Br*Br,on=(Br*Lr-Ze*Jr)/_r,Rr=(Ye*Jr-nr*Lr)/_r,Br=Rr+Ee,jr=Sr.pop()||new Qr;jr.arc=ft,jr.site=ae,jr.x=on+De,jr.y=Br+Math.sqrt(on*on+Rr*Rr),jr.cy=Br,ft.circle=jr;for(var un=null,vn=Di._;vn;)if(jr.y0)){if(Rr/=Jr,Jr<0){if(Rr<_r)return;Rr0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}if(Rr=Bt-Ee,!(!Jr&&Rr<0)){if(Rr/=Jr,Jr<0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}else if(Jr>0){if(Rr<_r)return;Rr0)){if(Rr/=on,on<0){if(Rr<_r)return;Rr0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}if(Rr=ee-Ye,!(!on&&Rr<0)){if(Rr/=on,on<0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}else if(on>0){if(Rr<_r)return;Rr0&&(ae.a={x:Ee+_r*Jr,y:Ye+_r*on}),Lr<1&&(ae.b={x:Ee+Lr*Jr,y:Ye+Lr*on}),ae}}}}}}function Un(ft){for(var Ct=Tn,Bt=Pn(ft[0][0],ft[0][1],ft[1][0],ft[1][1]),ee=Ct.length,ae;ee--;)ae=Ct[ee],(!On(ae,ft)||!Bt(ae)||d(ae.a.x-ae.b.x)=fe)return;if(nr>Lr){if(!ee)ee={x:on,y:De};else if(ee.y>=Ee)return;Bt={x:on,y:Ee}}else{if(!ee)ee={x:on,y:Ee};else if(ee.y1)if(nr>Lr){if(!ee)ee={x:(De-jr)/Br,y:De};else if(ee.y>=Ee)return;Bt={x:(Ee-jr)/Br,y:Ee}}else{if(!ee)ee={x:(Ee-jr)/Br,y:Ee};else if(ee.y=fe)return;Bt={x:fe,y:Br*fe+jr}}else{if(!ee)ee={x:fe,y:Br*fe+jr};else if(ee.x=nr&&jr.x<=Lr&&jr.y>=_r&&jr.y<=Jr?[[nr,Jr],[Lr,Jr],[Lr,_r],[nr,_r]]:[];un.point=Ye[Rr]}),Ze}function Ee(Ye){return Ye.map(function(Ze,nr){return{x:Math.round(ee(Ze,nr)/yt)*yt,y:Math.round(ae(Ze,nr)/yt)*yt,i:nr}})}return De.links=function(Ye){return Bu(Ee(Ye)).edges.filter(function(Ze){return Ze.l&&Ze.r}).map(function(Ze){return{source:Ye[Ze.l.i],target:Ye[Ze.r.i]}})},De.triangles=function(Ye){var Ze=[];return Bu(Ee(Ye)).cells.forEach(function(nr,_r){for(var Lr=nr.site,Jr=nr.edges.sort(Hr),on=-1,Rr=Jr.length,Br,jr=Jr[Rr-1].edge,un=jr.l===Lr?jr.r:jr.l;++onvn&&(vn=nr.x),nr.y>qr&&(qr=nr.y),Jr.push(nr.x),on.push(nr.y);else for(Rr=0;Rrvn&&(vn=Hn),qn>qr&&(qr=qn),Jr.push(Hn),on.push(qn)}var ui=vn-jr,Qn=qr-un;ui>Qn?qr=un+ui:vn=jr+Qn;function ii(Mi,Ii,ra,ka,la,Kn,Bi,Ti){if(!(isNaN(ra)||isNaN(ka)))if(Mi.leaf){var Zi=Mi.x,ba=Mi.y;if(Zi!=null)if(d(Zi-ra)+d(ba-ka)<.01)fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti);else{var na=Mi.point;Mi.x=Mi.y=Mi.point=null,fi(Mi,na,Zi,ba,la,Kn,Bi,Ti),fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}else Mi.x=ra,Mi.y=ka,Mi.point=Ii}else fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}function fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti){var Zi=(la+Bi)*.5,ba=(Kn+Ti)*.5,na=ra>=Zi,Ka=ka>=ba,Ja=Ka<<1|na;Mi.leaf=!1,Mi=Mi.nodes[Ja]||(Mi.nodes[Ja]=ho()),na?la=Zi:Bi=Zi,Ka?Kn=ba:Ti=ba,ii(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}var Oi=ho();if(Oi.add=function(Mi){ii(Oi,Mi,+_r(Mi,++Rr),+Lr(Mi,Rr),jr,un,vn,qr)},Oi.visit=function(Mi){ll(Mi,Oi,jr,un,vn,qr)},Oi.find=function(Mi){return vu(Oi,Mi[0],Mi[1],jr,un,vn,qr)},Rr=-1,Ct==null){for(;++Rrfe||Lr>De||Jr=Hn,Qn=Bt>=qn,ii=Qn<<1|ui,fi=ii+4;iiBt&&(fe=Ct.slice(Bt,fe),Ee[De]?Ee[De]+=fe:Ee[++De]=fe),(ee=ee[0])===(ae=ae[0])?Ee[De]?Ee[De]+=ae:Ee[++De]=ae:(Ee[++De]=null,Ye.push({i:De,x:za(ee,ae)})),Bt=$a.lastIndex;return Bt=0&&!(ee=i.interpolators[Bt](ft,Ct)););return ee}i.interpolators=[function(ft,Ct){var Bt=typeof Ct;return(Bt==="string"?cn.has(Ct.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ct)?Ra:Ua:Ct instanceof ge?Ra:Array.isArray(Ct)?_o:Bt==="object"&&isNaN(Ct)?ul:za)(ft,Ct)}],i.interpolateArray=_o;function _o(ft,Ct){var Bt=[],ee=[],ae=ft.length,fe=Ct.length,De=Math.min(ft.length,Ct.length),Ee;for(Ee=0;Ee=0?ft.slice(0,Ct):ft,ee=Ct>=0?ft.slice(Ct+1):"in";return Bt=bo.get(Bt)||Tf,ee=yc.get(ee)||k,ts(ee(Bt.apply(null,S.call(arguments,1))))};function ts(ft){return function(Ct){return Ct<=0?0:Ct>=1?1:ft(Ct)}}function Za(ft){return function(Ct){return 1-ft(1-Ct)}}function Hu(ft){return function(Ct){return .5*(Ct<.5?ft(2*Ct):2-ft(2-2*Ct))}}function Cs(ft){return ft*ft}function es(ft){return ft*ft*ft}function Vu(ft){if(ft<=0)return 0;if(ft>=1)return 1;var Ct=ft*ft,Bt=Ct*ft;return 4*(ft<.5?Bt:3*(ft-Ct)+Bt-.75)}function Af(ft){return function(Ct){return Math.pow(Ct,ft)}}function xc(ft){return 1-Math.cos(ft*ie)}function du(ft){return Math.pow(2,10*(ft-1))}function bc(ft){return 1-Math.sqrt(1-ft*ft)}function wc(ft,Ct){var Bt;return arguments.length<2&&(Ct=.45),arguments.length?Bt=Ct/Nt*Math.asin(1/ft):(ft=1,Bt=Ct/4),function(ee){return 1+ft*Math.pow(2,-10*ee)*Math.sin((ee-Bt)*Nt/Ct)}}function Tc(ft){return ft||(ft=1.70158),function(Ct){return Ct*Ct*((ft+1)*Ct-ft)}}function Gu(ft){return ft<.36363636363636365?7.5625*ft*ft:ft<.7272727272727273?7.5625*(ft-=.5454545454545454)*ft+.75:ft<.9090909090909091?7.5625*(ft-=.8181818181818182)*ft+.9375:7.5625*(ft-=.9545454545454546)*ft+.984375}i.interpolateHcl=Ac;function Ac(ft,Ct){ft=i.hcl(ft),Ct=i.hcl(Ct);var Bt=ft.h,ee=ft.c,ae=ft.l,fe=Ct.h-Bt,De=Ct.c-ee,Ee=Ct.l-ae;return isNaN(De)&&(De=0,ee=isNaN(ee)?Ct.c:ee),isNaN(fe)?(fe=0,Bt=isNaN(Bt)?Ct.h:Bt):fe>180?fe-=360:fe<-180&&(fe+=360),function(Ye){return ke(Bt+fe*Ye,ee+De*Ye,ae+Ee*Ye)+""}}i.interpolateHsl=Mc;function Mc(ft,Ct){ft=i.hsl(ft),Ct=i.hsl(Ct);var Bt=ft.h,ee=ft.s,ae=ft.l,fe=Ct.h-Bt,De=Ct.s-ee,Ee=Ct.l-ae;return isNaN(De)&&(De=0,ee=isNaN(ee)?Ct.s:ee),isNaN(fe)?(fe=0,Bt=isNaN(Bt)?Ct.h:Bt):fe>180?fe-=360:fe<-180&&(fe+=360),function(Ye){return Ce(Bt+fe*Ye,ee+De*Ye,ae+Ee*Ye)+""}}i.interpolateLab=Mf;function Mf(ft,Ct){ft=i.lab(ft),Ct=i.lab(Ct);var Bt=ft.l,ee=ft.a,ae=ft.b,fe=Ct.l-Bt,De=Ct.a-ee,Ee=Ct.b-ae;return function(Ye){return Gt(Bt+fe*Ye,ee+De*Ye,ae+Ee*Ye)+""}}i.interpolateRound=Sf;function Sf(ft,Ct){return Ct-=ft,function(Bt){return Math.round(ft+Ct*Bt)}}i.transform=function(ft){var Ct=h.createElementNS(i.ns.prefix.svg,"g");return(i.transform=function(Bt){if(Bt!=null){Ct.setAttribute("transform",Bt);var ee=Ct.transform.baseVal.consolidate()}return new Xs(ee?ee.matrix:Ef)})(ft)};function Xs(ft){var Ct=[ft.a,ft.b],Bt=[ft.c,ft.d],ee=zl(Ct),ae=cl(Ct,Bt),fe=zl(kl(Bt,Ct,-ae))||0;Ct[0]*Bt[1]180?Ct+=360:Ct-ft>180&&(ft+=360),ee.push({i:Bt.push(vs(Bt)+"rotate(",null,")")-2,x:za(ft,Ct)})):Ct&&Bt.push(vs(Bt)+"rotate("+Ct+")")}function _f(ft,Ct,Bt,ee){ft!==Ct?ee.push({i:Bt.push(vs(Bt)+"skewX(",null,")")-2,x:za(ft,Ct)}):Ct&&Bt.push(vs(Bt)+"skewX("+Ct+")")}function Cf(ft,Ct,Bt,ee){if(ft[0]!==Ct[0]||ft[1]!==Ct[1]){var ae=Bt.push(vs(Bt)+"scale(",null,",",null,")");ee.push({i:ae-4,x:za(ft[0],Ct[0])},{i:ae-2,x:za(ft[1],Ct[1])})}else(Ct[0]!==1||Ct[1]!==1)&&Bt.push(vs(Bt)+"scale("+Ct+")")}function gu(ft,Ct){var Bt=[],ee=[];return ft=i.transform(ft),Ct=i.transform(Ct),Sc(ft.translate,Ct.translate,Bt,ee),pu(ft.rotate,Ct.rotate,Bt,ee),_f(ft.skew,Ct.skew,Bt,ee),Cf(ft.scale,Ct.scale,Bt,ee),ft=Ct=null,function(ae){for(var fe=-1,De=ee.length,Ee;++fe0?fe=qr:(Bt.c=null,Bt.t=NaN,Bt=null,Ct.end({type:"end",alpha:fe=0})):qr>0&&(Ct.start({type:"start",alpha:fe=qr}),Bt=_n(ft.tick)),ft):fe},ft.start=function(){var qr,Hn=Jr.length,qn=on.length,ui=ee[0],Qn=ee[1],ii,fi;for(qr=0;qr=0;)fe.push(nr=Ze[Ye]),nr.parent=Ee,nr.depth=Ee.depth+1;Bt&&(Ee.value=0),Ee.children=Ze}else Bt&&(Ee.value=+Bt.call(ee,Ee,Ee.depth)||0),delete Ee.children;return wo(ae,function(_r){var Lr,Jr;ft&&(Lr=_r.children)&&Lr.sort(ft),Bt&&(Jr=_r.parent)&&(Jr.value+=_r.value)}),De}return ee.sort=function(ae){return arguments.length?(ft=ae,ee):ft},ee.children=function(ae){return arguments.length?(Ct=ae,ee):Ct},ee.value=function(ae){return arguments.length?(Bt=ae,ee):Bt},ee.revalue=function(ae){return Bt&&(pl(ae,function(fe){fe.children&&(fe.value=0)}),wo(ae,function(fe){var De;fe.children||(fe.value=+Bt.call(ee,fe,fe.depth)||0),(De=fe.parent)&&(De.value+=fe.value)})),ae},ee};function dl(ft,Ct){return i.rebind(ft,Ct,"sort","children","value"),ft.nodes=ft,ft.links=_c,ft}function pl(ft,Ct){for(var Bt=[ft];(ft=Bt.pop())!=null;)if(Ct(ft),(ae=ft.children)&&(ee=ae.length))for(var ee,ae;--ee>=0;)Bt.push(ae[ee])}function wo(ft,Ct){for(var Bt=[ft],ee=[];(ft=Bt.pop())!=null;)if(ee.push(ft),(De=ft.children)&&(fe=De.length))for(var ae=-1,fe,De;++aeae&&(ae=Ee),ee.push(Ee)}for(De=0;Deee&&(Bt=Ct,ee=ae);return Bt}function Pf(ft){return ft.reduce(Vo,0)}function Vo(ft,Ct){return ft+Ct[1]}i.layout.histogram=function(){var ft=!0,Ct=Number,Bt=js,ee=Rf;function ae(fe,Lr){for(var Ee=[],Ye=fe.map(Ct,this),Ze=Bt.call(this,Ye,Lr),nr=ee.call(this,Ze,Ye,Lr),_r,Lr=-1,Jr=Ye.length,on=nr.length-1,Rr=ft?1:1/Jr,Br;++Lr0)for(Lr=-1;++Lr=Ze[0]&&Br<=Ze[1]&&(_r=Ee[i.bisect(nr,Br,1,on)-1],_r.y+=Rr,_r.push(fe[Lr]));return Ee}return ae.value=function(fe){return arguments.length?(Ct=fe,ae):Ct},ae.range=function(fe){return arguments.length?(Bt=rn(fe),ae):Bt},ae.bins=function(fe){return arguments.length?(ee=typeof fe=="number"?function(De){return Ku(De,fe)}:rn(fe),ae):ee},ae.frequency=function(fe){return arguments.length?(ft=!!fe,ae):ft},ae};function Rf(ft,Ct){return Ku(ft,Math.ceil(Math.log(Ct.length)/Math.LN2+1))}function Ku(ft,Ct){for(var Bt=-1,ee=+ft[0],ae=(ft[1]-ee)/Ct,fe=[];++Bt<=Ct;)fe[Bt]=ae*Bt+ee;return fe}function js(ft){return[i.min(ft),i.max(ft)]}i.layout.pack=function(){var ft=i.layout.hierarchy().sort(Ps),Ct=0,Bt=[1,1],ee;function ae(fe,De){var Ee=ft.call(this,fe,De),Ye=Ee[0],Ze=Bt[0],nr=Bt[1],_r=ee==null?Math.sqrt:typeof ee=="function"?ee:function(){return ee};if(Ye.x=Ye.y=0,wo(Ye,function(Jr){Jr.r=+_r(Jr.value)}),wo(Ye,Go),Ct){var Lr=Ct*(ee?1:Math.max(2*Ye.r/Ze,2*Ye.r/nr))/2;wo(Ye,function(Jr){Jr.r+=Lr}),wo(Ye,Go),wo(Ye,function(Jr){Jr.r-=Lr})}return Rs(Ye,Ze/2,nr/2,ee?1:1/Math.max(2*Ye.r/Ze,2*Ye.r/nr)),Ee}return ae.size=function(fe){return arguments.length?(Bt=fe,ae):Bt},ae.radius=function(fe){return arguments.length?(ee=fe==null||typeof fe=="function"?fe:+fe,ae):ee},ae.padding=function(fe){return arguments.length?(Ct=+fe,ae):Ct},dl(ae,ft)};function Ps(ft,Ct){return ft.value-Ct.value}function Tu(ft,Ct){var Bt=ft._pack_next;ft._pack_next=Ct,Ct._pack_prev=ft,Ct._pack_next=Bt,Bt._pack_prev=Ct}function Da(ft,Ct){ft._pack_next=Ct,Ct._pack_prev=ft}function Bl(ft,Ct){var Bt=Ct.x-ft.x,ee=Ct.y-ft.y,ae=ft.r+Ct.r;return .999*ae*ae>Bt*Bt+ee*ee}function Go(ft){if(!(Ct=ft.children)||!(Lr=Ct.length))return;var Ct,Bt=1/0,ee=-1/0,ae=1/0,fe=-1/0,De,Ee,Ye,Ze,nr,_r,Lr;function Jr(qr){Bt=Math.min(qr.x-qr.r,Bt),ee=Math.max(qr.x+qr.r,ee),ae=Math.min(qr.y-qr.r,ae),fe=Math.max(qr.y+qr.r,fe)}if(Ct.forEach(ds),De=Ct[0],De.x=-De.r,De.y=0,Jr(De),Lr>1&&(Ee=Ct[1],Ee.x=Ee.r,Ee.y=0,Jr(Ee),Lr>2))for(Ye=Ct[2],Wo(De,Ee,Ye),Jr(Ye),Tu(De,Ye),De._pack_prev=Ye,Tu(Ye,Ee),Ee=De._pack_next,Ze=3;ZeBr.x&&(Br=Hn),Hn.depth>jr.depth&&(jr=Hn)});var un=Ct(Rr,Br)/2-Rr.x,vn=Bt[0]/(Br.x+Ct(Br,Rr)/2+un),qr=Bt[1]/(jr.depth||1);pl(Jr,function(Hn){Hn.x=(Hn.x+un)*vn,Hn.y=Hn.depth*qr})}return Lr}function fe(nr){for(var _r={A:null,children:[nr]},Lr=[_r],Jr;(Jr=Lr.pop())!=null;)for(var on=Jr.children,Rr,Br=0,jr=on.length;Br0&&(Ul(Lc(Rr,nr,Lr),nr,Hn),jr+=Hn,un+=Hn),vn+=Rr.m,jr+=Jr.m,qr+=Br.m,un+=on.m;Rr&&!Do(on)&&(on.t=Rr,on.m+=vn-un),Jr&&!Yo(Br)&&(Br.t=Jr,Br.m+=jr-qr,Lr=nr)}return Lr}function Ze(nr){nr.x*=Bt[0],nr.y=nr.depth*Bt[1]}return ae.separation=function(nr){return arguments.length?(Ct=nr,ae):Ct},ae.size=function(nr){return arguments.length?(ee=(Bt=nr)==null?Ze:null,ae):ee?null:Bt},ae.nodeSize=function(nr){return arguments.length?(ee=(Bt=nr)==null?null:Ze,ae):ee?Bt:null},dl(ae,ft)};function ps(ft,Ct){return ft.parent==Ct.parent?1:2}function Yo(ft){var Ct=ft.children;return Ct.length?Ct[0]:ft.t}function Do(ft){var Ct=ft.children,Bt;return(Bt=Ct.length)?Ct[Bt-1]:ft.t}function Ul(ft,Ct,Bt){var ee=Bt/(Ct.i-ft.i);Ct.c-=ee,Ct.s+=Bt,ft.c+=ee,Ct.z+=Bt,Ct.m+=Bt}function Cc(ft){for(var Ct=0,Bt=0,ee=ft.children,ae=ee.length,fe;--ae>=0;)fe=ee[ae],fe.z+=Ct,fe.m+=Ct,Ct+=fe.s+(Bt+=fe.c)}function Lc(ft,Ct,Bt){return ft.a.parent===Ct.parent?ft.a:Bt}i.layout.cluster=function(){var ft=i.layout.hierarchy().sort(null).value(null),Ct=ps,Bt=[1,1],ee=!1;function ae(fe,De){var Ee=ft.call(this,fe,De),Ye=Ee[0],Ze,nr=0;wo(Ye,function(Rr){var Br=Rr.children;Br&&Br.length?(Rr.x=Rc(Br),Rr.y=Pc(Br)):(Rr.x=Ze?nr+=Ct(Rr,Ze):0,Rr.y=0,Ze=Rr)});var _r=Ju(Ye),Lr=Df(Ye),Jr=_r.x-Ct(_r,Lr)/2,on=Lr.x+Ct(Lr,_r)/2;return wo(Ye,ee?function(Rr){Rr.x=(Rr.x-Ye.x)*Bt[0],Rr.y=(Ye.y-Rr.y)*Bt[1]}:function(Rr){Rr.x=(Rr.x-Jr)/(on-Jr)*Bt[0],Rr.y=(1-(Ye.y?Rr.y/Ye.y:1))*Bt[1]}),Ee}return ae.separation=function(fe){return arguments.length?(Ct=fe,ae):Ct},ae.size=function(fe){return arguments.length?(ee=(Bt=fe)==null,ae):ee?null:Bt},ae.nodeSize=function(fe){return arguments.length?(ee=(Bt=fe)!=null,ae):ee?Bt:null},dl(ae,ft)};function Pc(ft){return 1+i.max(ft,function(Ct){return Ct.y})}function Rc(ft){return ft.reduce(function(Ct,Bt){return Ct+Bt.x},0)/ft.length}function Ju(ft){var Ct=ft.children;return Ct&&Ct.length?Ju(Ct[0]):ft}function Df(ft){var Ct=ft.children,Bt;return Ct&&(Bt=Ct.length)?Df(Ct[Bt-1]):ft}i.layout.treemap=function(){var ft=i.layout.hierarchy(),Ct=Math.round,Bt=[1,1],ee=null,ae=xl,fe=!1,De,Ee="squarify",Ye=.5*(1+Math.sqrt(5));function Ze(Rr,Br){for(var jr=-1,un=Rr.length,vn,qr;++jr0;)un.push(qr=vn[Qn-1]),un.area+=qr.area,Ee!=="squarify"||(qn=Lr(un,ui))<=Hn?(vn.pop(),Hn=qn):(un.area-=un.pop().area,Jr(un,ui,jr,!1),ui=Math.min(jr.dx,jr.dy),un.length=un.area=0,Hn=1/0);un.length&&(Jr(un,ui,jr,!0),un.length=un.area=0),Br.forEach(nr)}}function _r(Rr){var Br=Rr.children;if(Br&&Br.length){var jr=ae(Rr),un=Br.slice(),vn,qr=[];for(Ze(un,jr.dx*jr.dy/Rr.value),qr.area=0;vn=un.pop();)qr.push(vn),qr.area+=vn.area,vn.z!=null&&(Jr(qr,vn.z?jr.dx:jr.dy,jr,!un.length),qr.length=qr.area=0);Br.forEach(_r)}}function Lr(Rr,Br){for(var jr=Rr.area,un,vn=0,qr=1/0,Hn=-1,qn=Rr.length;++Hnvn&&(vn=un));return jr*=jr,Br*=Br,jr?Math.max(Br*vn*Ye/jr,jr/(Br*qr*Ye)):1/0}function Jr(Rr,Br,jr,un){var vn=-1,qr=Rr.length,Hn=jr.x,qn=jr.y,ui=Br?Ct(Rr.area/Br):0,Qn;if(Br==jr.dx){for((un||ui>jr.dy)&&(ui=jr.dy);++vnjr.dx)&&(ui=jr.dx);++vn1);return ft+Ct*ee*Math.sqrt(-2*Math.log(fe)/fe)}},logNormal:function(){var ft=i.random.normal.apply(i,arguments);return function(){return Math.exp(ft())}},bates:function(ft){var Ct=i.random.irwinHall(ft);return function(){return Ct()/ft}},irwinHall:function(ft){return function(){for(var Ct=0,Bt=0;Bt2?Ff:If,Ze=ee?hl:Uo;return ae=Ye(ft,Ct,Ze,Bt),fe=Ye(Ct,ft,Ze,qa),Ee}function Ee(Ye){return ae(Ye)}return Ee.invert=function(Ye){return fe(Ye)},Ee.domain=function(Ye){return arguments.length?(ft=Ye.map(Number),De()):ft},Ee.range=function(Ye){return arguments.length?(Ct=Ye,De()):Ct},Ee.rangeRound=function(Ye){return Ee.range(Ye).interpolate(Sf)},Ee.clamp=function(Ye){return arguments.length?(ee=Ye,De()):ee},Ee.interpolate=function(Ye){return arguments.length?(Bt=Ye,De()):Bt},Ee.ticks=function(Ye){return Xo(ft,Ye)},Ee.tickFormat=function(Ye,Ze){return d3_scale_linearTickFormat(ft,Ye,Ze)},Ee.nice=function(Ye){return kf(ft,Ye),De()},Ee.copy=function(){return zf(ft,Ct,Bt,ee)},De()}function Qu(ft,Ct){return i.rebind(ft,Ct,"range","rangeRound","interpolate","clamp")}function kf(ft,Ct){return Hl(ft,gs(vo(ft,Ct)[2])),Hl(ft,gs(vo(ft,Ct)[2])),ft}function vo(ft,Ct){Ct==null&&(Ct=10);var Bt=Co(ft),ee=Bt[1]-Bt[0],ae=Math.pow(10,Math.floor(Math.log(ee/Ct)/Math.LN10)),fe=Ct/ee*ae;return fe<=.15?ae*=10:fe<=.35?ae*=5:fe<=.75&&(ae*=2),Bt[0]=Math.ceil(Bt[0]/ae)*ae,Bt[1]=Math.floor(Bt[1]/ae)*ae+ae*.5,Bt[2]=ae,Bt}function Xo(ft,Ct){return i.range.apply(i,vo(ft,Ct))}i.scale.log=function(){return Ds(i.scale.linear().domain([0,1]),10,!0,[1,10])};function Ds(ft,Ct,Bt,ee){function ae(Ee){return(Bt?Math.log(Ee<0?0:Ee):-Math.log(Ee>0?0:-Ee))/Math.log(Ct)}function fe(Ee){return Bt?Math.pow(Ct,Ee):-Math.pow(Ct,-Ee)}function De(Ee){return ft(ae(Ee))}return De.invert=function(Ee){return fe(ft.invert(Ee))},De.domain=function(Ee){return arguments.length?(Bt=Ee[0]>=0,ft.domain((ee=Ee.map(Number)).map(ae)),De):ee},De.base=function(Ee){return arguments.length?(Ct=+Ee,ft.domain(ee.map(ae)),De):Ct},De.nice=function(){var Ee=Hl(ee.map(ae),Bt?Math:wl);return ft.domain(Ee),ee=Ee.map(fe),De},De.ticks=function(){var Ee=Co(ee),Ye=[],Ze=Ee[0],nr=Ee[1],_r=Math.floor(ae(Ze)),Lr=Math.ceil(ae(nr)),Jr=Ct%1?2:Ct;if(isFinite(Lr-_r)){if(Bt){for(;_r0;on--)Ye.push(fe(_r)*on);for(_r=0;Ye[_r]nr;Lr--);Ye=Ye.slice(_r,Lr)}return Ye},De.copy=function(){return Ds(ft.copy(),Ct,Bt,ee)},Qu(De,ft)}var wl={floor:function(ft){return-Math.ceil(-ft)},ceil:function(ft){return-Math.floor(-ft)}};i.scale.pow=function(){return Au(i.scale.linear(),1,[0,1])};function Au(ft,Ct,Bt){var ee=Js(Ct),ae=Js(1/Ct);function fe(De){return ft(ee(De))}return fe.invert=function(De){return ae(ft.invert(De))},fe.domain=function(De){return arguments.length?(ft.domain((Bt=De.map(Number)).map(ee)),fe):Bt},fe.ticks=function(De){return Xo(Bt,De)},fe.tickFormat=function(De,Ee){return d3_scale_linearTickFormat(Bt,De,Ee)},fe.nice=function(De){return fe.domain(kf(Bt,De))},fe.exponent=function(De){return arguments.length?(ee=Js(Ct=De),ae=Js(1/Ct),ft.domain(Bt.map(ee)),fe):Ct},fe.copy=function(){return Au(ft.copy(),Ct,Bt)},Qu(fe,ft)}function Js(ft){return function(Ct){return Ct<0?-Math.pow(-Ct,ft):Math.pow(Ct,ft)}}i.scale.sqrt=function(){return i.scale.pow().exponent(.5)},i.scale.ordinal=function(){return Qs([],{t:"range",a:[[]]})};function Qs(ft,Ct){var Bt,ee,ae;function fe(Ee){return ee[((Bt.get(Ee)||(Ct.t==="range"?Bt.set(Ee,ft.push(Ee)):NaN))-1)%ee.length]}function De(Ee,Ye){return i.range(ft.length).map(function(Ze){return Ee+Ye*Ze})}return fe.domain=function(Ee){if(!arguments.length)return ft;ft=[],Bt=new _;for(var Ye=-1,Ze=Ee.length,nr;++Ye0?Bt[fe-1]:ft[0],feLr?0:1;if(nr=jt)return Ye(nr,on)+(Ze?Ye(Ze,1-on):"")+"Z";var Rr,Br,jr,un,vn=0,qr=0,Hn,qn,ui,Qn,ii,fi,Oi,Mi,Ii=[];if((un=(+De.apply(this,arguments)||0)/2)&&(jr=ee===Mu?Math.sqrt(Ze*Ze+nr*nr):+ee.apply(this,arguments),on||(qr*=-1),nr&&(qr=Le(jr/nr*Math.sin(un))),Ze&&(vn=Le(jr/Ze*Math.sin(un)))),nr){Hn=nr*Math.cos(_r+qr),qn=nr*Math.sin(_r+qr),ui=nr*Math.cos(Lr-qr),Qn=nr*Math.sin(Lr-qr);var ra=Math.abs(Lr-_r-2*qr)<=Mt?0:1;if(qr&&Wl(Hn,qn,ui,Qn)===on^ra){var ka=(_r+Lr)/2;Hn=nr*Math.cos(ka),qn=nr*Math.sin(ka),ui=Qn=null}}else Hn=qn=0;if(Ze){ii=Ze*Math.cos(Lr-vn),fi=Ze*Math.sin(Lr-vn),Oi=Ze*Math.cos(_r+vn),Mi=Ze*Math.sin(_r+vn);var la=Math.abs(_r-Lr+2*vn)<=Mt?0:1;if(vn&&Wl(ii,fi,Oi,Mi)===1-on^la){var Kn=(_r+Lr)/2;ii=Ze*Math.cos(Kn),fi=Ze*Math.sin(Kn),Oi=Mi=null}}else ii=fi=0;if(Jr>yt&&(Rr=Math.min(Math.abs(nr-Ze)/2,+Bt.apply(this,arguments)))>.001){Br=Ze0?0:1}function Yl(ft,Ct,Bt,ee,ae){var fe=ft[0]-Ct[0],De=ft[1]-Ct[1],Ee=(ae?ee:-ee)/Math.sqrt(fe*fe+De*De),Ye=Ee*De,Ze=-Ee*fe,nr=ft[0]+Ye,_r=ft[1]+Ze,Lr=Ct[0]+Ye,Jr=Ct[1]+Ze,on=(nr+Lr)/2,Rr=(_r+Jr)/2,Br=Lr-nr,jr=Jr-_r,un=Br*Br+jr*jr,vn=Bt-ee,qr=nr*Jr-Lr*_r,Hn=(jr<0?-1:1)*Math.sqrt(Math.max(0,vn*vn*un-qr*qr)),qn=(qr*jr-Br*Hn)/un,ui=(-qr*Br-jr*Hn)/un,Qn=(qr*jr+Br*Hn)/un,ii=(-qr*Br+jr*Hn)/un,fi=qn-on,Oi=ui-Rr,Mi=Qn-on,Ii=ii-Rr;return fi*fi+Oi*Oi>Mi*Mi+Ii*Ii&&(qn=Qn,ui=ii),[[qn-Ye,ui-Ze],[qn*Bt/vn,ui*Bt/vn]]}function Fs(){return!0}function Xl(ft){var Ct=di,Bt=li,ee=Fs,ae=Ha,fe=ae.key,De=.7;function Ee(Ye){var Ze=[],nr=[],_r=-1,Lr=Ye.length,Jr,on=rn(Ct),Rr=rn(Bt);function Br(){Ze.push("M",ae(ft(nr),De))}for(;++_r1?ft.join("L"):ft+"Z"}function ns(ft){return ft.join("L")+"Z"}function qu(ft){for(var Ct=0,Bt=ft.length,ee=ft[0],ae=[ee[0],",",ee[1]];++Ct1&&ae.push("H",ee[0]),ae.join("")}function $s(ft){for(var Ct=0,Bt=ft.length,ee=ft[0],ae=[ee[0],",",ee[1]];++Ct1){Ee=Ct[1],fe=ft[Ye],Ye++,ee+="C"+(ae[0]+De[0])+","+(ae[1]+De[1])+","+(fe[0]-Ee[0])+","+(fe[1]-Ee[1])+","+fe[0]+","+fe[1];for(var Ze=2;Ze9&&(fe=Bt*3/Math.sqrt(fe),De[Ee]=fe*ee,De[Ee+1]=fe*ae));for(Ee=-1;++Ee<=Ye;)fe=(ft[Math.min(Ye,Ee+1)][0]-ft[Math.max(0,Ee-1)][0])/(6*(1+De[Ee]*De[Ee])),Ct.push([fe||0,De[Ee]*fe||0]);return Ct}function Cu(ft){return ft.length<3?Ha(ft):ft[0]+lo(ft,Ql(ft))}i.svg.line.radial=function(){var ft=Xl(Hf);return ft.radius=ft.x,delete ft.x,ft.angle=ft.y,delete ft.y,ft};function Hf(ft){for(var Ct,Bt=-1,ee=ft.length,ae,fe;++BtMt)+",1 "+_r}function Ze(nr,_r,Lr,Jr){return"Q 0,0 "+Jr}return fe.radius=function(nr){return arguments.length?(Bt=rn(nr),fe):Bt},fe.source=function(nr){return arguments.length?(ft=rn(nr),fe):ft},fe.target=function(nr){return arguments.length?(Ct=rn(nr),fe):Ct},fe.startAngle=function(nr){return arguments.length?(ee=rn(nr),fe):ee},fe.endAngle=function(nr){return arguments.length?(ae=rn(nr),fe):ae},fe};function rf(ft){return ft.radius}i.svg.diagonal=function(){var ft=ef,Ct=qs,Bt=ql;function ee(ae,fe){var De=ft.call(this,ae,fe),Ee=Ct.call(this,ae,fe),Ye=(De.y+Ee.y)/2,Ze=[De,{x:De.x,y:Ye},{x:Ee.x,y:Ye},Ee];return Ze=Ze.map(Bt),"M"+Ze[0]+"C"+Ze[1]+" "+Ze[2]+" "+Ze[3]}return ee.source=function(ae){return arguments.length?(ft=rn(ae),ee):ft},ee.target=function(ae){return arguments.length?(Ct=rn(ae),ee):Ct},ee.projection=function(ae){return arguments.length?(Bt=ae,ee):Bt},ee};function ql(ft){return[ft.x,ft.y]}i.svg.diagonal.radial=function(){var ft=i.svg.diagonal(),Ct=ql,Bt=ft.projection;return ft.projection=function(ee){return arguments.length?Bt(Vf(Ct=ee)):Ct},ft};function Vf(ft){return function(){var Ct=ft.apply(this,arguments),Bt=Ct[0],ee=Ct[1]-ie;return[Bt*Math.cos(ee),Bt*Math.sin(ee)]}}i.svg.symbol=function(){var ft=oe,Ct=qt;function Bt(ee,ae){return(Me.get(ft.call(this,ee,ae))||we)(Ct.call(this,ee,ae))}return Bt.type=function(ee){return arguments.length?(ft=rn(ee),Bt):ft},Bt.size=function(ee){return arguments.length?(Ct=rn(ee),Bt):Ct},Bt};function qt(){return 64}function oe(){return"circle"}function we(ft){var Ct=Math.sqrt(ft/Mt);return"M0,"+Ct+"A"+Ct+","+Ct+" 0 1,1 0,"+-Ct+"A"+Ct+","+Ct+" 0 1,1 0,"+Ct+"Z"}var Me=i.map({circle:we,cross:function(ft){var Ct=Math.sqrt(ft/5)/2;return"M"+-3*Ct+","+-Ct+"H"+-Ct+"V"+-3*Ct+"H"+Ct+"V"+-Ct+"H"+3*Ct+"V"+Ct+"H"+Ct+"V"+3*Ct+"H"+-Ct+"V"+Ct+"H"+-3*Ct+"Z"},diamond:function(ft){var Ct=Math.sqrt(ft/(2*ze)),Bt=Ct*ze;return"M0,"+-Ct+"L"+Bt+",0 0,"+Ct+" "+-Bt+",0Z"},square:function(ft){var Ct=Math.sqrt(ft)/2;return"M"+-Ct+","+-Ct+"L"+Ct+","+-Ct+" "+Ct+","+Ct+" "+-Ct+","+Ct+"Z"},"triangle-down":function(ft){var Ct=Math.sqrt(ft/Ue),Bt=Ct*Ue/2;return"M0,"+Bt+"L"+Ct+","+-Bt+" "+-Ct+","+-Bt+"Z"},"triangle-up":function(ft){var Ct=Math.sqrt(ft/Ue),Bt=Ct*Ue/2;return"M0,"+-Bt+"L"+Ct+","+Bt+" "+-Ct+","+Bt+"Z"}});i.svg.symbolTypes=Me.keys();var Ue=Math.sqrt(3),ze=Math.tan(30*me);Z.transition=function(ft){for(var Ct=Ir||++Mr,Bt=Rn(ft),ee=[],ae,fe,De=Nr||{time:Date.now(),ease:Vu,delay:0,duration:250},Ee=-1,Ye=this.length;++Ee0;)_r[--un].call(ft,jr);if(Br>=1)return De.event&&De.event.end.call(ft,ft.__data__,Ct),--fe.count?delete fe[ee]:delete ft[Bt],1}De||(Ee=ae.time,Ye=_n(Lr,0,Ee),De=fe[ee]={tween:new _,time:Ee,timer:Ye,delay:ae.delay,duration:ae.duration,ease:ae.ease,index:Ct},ae=null,++fe.count)}i.svg.axis=function(){var ft=i.scale.linear(),Ct=Zn,Bt=6,ee=6,ae=3,fe=[10],De=null,Ee;function Ye(Ze){Ze.each(function(){var nr=i.select(this),_r=this.__chart__||ft,Lr=this.__chart__=ft.copy(),Jr=De??(Lr.ticks?Lr.ticks.apply(Lr,fe):Lr.domain()),on=Ee??(Lr.tickFormat?Lr.tickFormat.apply(Lr,fe):k),Rr=nr.selectAll(".tick").data(Jr,Lr),Br=Rr.enter().insert("g",".domain").attr("class","tick").style("opacity",yt),jr=i.transition(Rr.exit()).style("opacity",yt).remove(),un=i.transition(Rr.order()).style("opacity",1),vn=Math.max(Bt,0)+ae,qr,Hn=bl(Lr),qn=nr.selectAll(".domain").data([0]),ui=(qn.enter().append("path").attr("class","domain"),i.transition(qn));Br.append("line"),Br.append("text");var Qn=Br.select("line"),ii=un.select("line"),fi=Rr.select("text").text(on),Oi=Br.select("text"),Mi=un.select("text"),Ii=Ct==="top"||Ct==="left"?-1:1,ra,ka,la,Kn;if(Ct==="bottom"||Ct==="top"?(qr=Pi,ra="x",la="y",ka="x2",Kn="y2",fi.attr("dy",Ii<0?"0em":".71em").style("text-anchor","middle"),ui.attr("d","M"+Hn[0]+","+Ii*ee+"V0H"+Hn[1]+"V"+Ii*ee)):(qr=Ri,ra="y",la="x",ka="y2",Kn="x2",fi.attr("dy",".32em").style("text-anchor",Ii<0?"end":"start"),ui.attr("d","M"+Ii*ee+","+Hn[0]+"H0V"+Hn[1]+"H"+Ii*ee)),Qn.attr(Kn,Ii*Bt),Oi.attr(la,Ii*vn),ii.attr(ka,0).attr(Kn,Ii*Bt),Mi.attr(ra,0).attr(la,Ii*vn),Lr.rangeBand){var Bi=Lr,Ti=Bi.rangeBand()/2;_r=Lr=function(Zi){return Bi(Zi)+Ti}}else _r.rangeBand?_r=Lr:jr.call(qr,Lr,_r);Br.call(qr,_r,Lr),un.call(qr,Lr,Lr)})}return Ye.scale=function(Ze){return arguments.length?(ft=Ze,Ye):ft},Ye.orient=function(Ze){return arguments.length?(Ct=Ze in Li?Ze+"":Zn,Ye):Ct},Ye.ticks=function(){return arguments.length?(fe=x(arguments),Ye):fe},Ye.tickValues=function(Ze){return arguments.length?(De=Ze,Ye):De},Ye.tickFormat=function(Ze){return arguments.length?(Ee=Ze,Ye):Ee},Ye.tickSize=function(Ze){var nr=arguments.length;return nr?(Bt=+Ze,ee=+arguments[nr-1],Ye):Bt},Ye.innerTickSize=function(Ze){return arguments.length?(Bt=+Ze,Ye):Bt},Ye.outerTickSize=function(Ze){return arguments.length?(ee=+Ze,Ye):ee},Ye.tickPadding=function(Ze){return arguments.length?(ae=+Ze,Ye):ae},Ye.tickSubdivide=function(){return arguments.length&&Ye},Ye};var Zn="bottom",Li={top:1,right:1,bottom:1,left:1};function Pi(ft,Ct,Bt){ft.attr("transform",function(ee){var ae=Ct(ee);return"translate("+(isFinite(ae)?ae:Bt(ee))+",0)"})}function Ri(ft,Ct,Bt){ft.attr("transform",function(ee){var ae=Ct(ee);return"translate(0,"+(isFinite(ae)?ae:Bt(ee))+")"})}i.svg.brush=function(){var ft=J(nr,"brushstart","brush","brushend"),Ct=null,Bt=null,ee=[0,0],ae=[0,0],fe,De,Ee=!0,Ye=!0,Ze=Xi[0];function nr(Rr){Rr.each(function(){var Br=i.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",on).on("touchstart.brush",on),jr=Br.selectAll(".background").data([0]);jr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Br.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var un=Br.selectAll(".resize").data(Ze,k);un.exit().remove(),un.enter().append("g").attr("class",function(qn){return"resize "+qn}).style("cursor",function(qn){return zi[qn]}).append("rect").attr("x",function(qn){return/[ew]$/.test(qn)?-3:null}).attr("y",function(qn){return/^[ns]/.test(qn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),un.style("display",nr.empty()?"none":null);var vn=i.transition(Br),qr=i.transition(jr),Hn;Ct&&(Hn=bl(Ct),qr.attr("x",Hn[0]).attr("width",Hn[1]-Hn[0]),Lr(vn)),Bt&&(Hn=bl(Bt),qr.attr("y",Hn[0]).attr("height",Hn[1]-Hn[0]),Jr(vn)),_r(vn)})}nr.event=function(Rr){Rr.each(function(){var Br=ft.of(this,arguments),jr={x:ee,y:ae,i:fe,j:De},un=this.__chart__||jr;this.__chart__=jr,Ir?i.select(this).transition().each("start.brush",function(){fe=un.i,De=un.j,ee=un.x,ae=un.y,Br({type:"brushstart"})}).tween("brush:brush",function(){var vn=_o(ee,jr.x),qr=_o(ae,jr.y);return fe=De=null,function(Hn){ee=jr.x=vn(Hn),ae=jr.y=qr(Hn),Br({type:"brush",mode:"resize"})}}).each("end.brush",function(){fe=jr.i,De=jr.j,Br({type:"brush",mode:"resize"}),Br({type:"brushend"})}):(Br({type:"brushstart"}),Br({type:"brush",mode:"resize"}),Br({type:"brushend"}))})};function _r(Rr){Rr.selectAll(".resize").attr("transform",function(Br){return"translate("+ee[+/e$/.test(Br)]+","+ae[+/^s/.test(Br)]+")"})}function Lr(Rr){Rr.select(".extent").attr("x",ee[0]),Rr.selectAll(".extent,.n>rect,.s>rect").attr("width",ee[1]-ee[0])}function Jr(Rr){Rr.select(".extent").attr("y",ae[0]),Rr.selectAll(".extent,.e>rect,.w>rect").attr("height",ae[1]-ae[0])}function on(){var Rr=this,Br=i.select(i.event.target),jr=ft.of(Rr,arguments),un=i.select(Rr),vn=Br.datum(),qr=!/^(n|s)$/.test(vn)&&Ct,Hn=!/^(e|w)$/.test(vn)&&Bt,qn=Br.classed("extent"),ui=Jt(Rr),Qn,ii=i.mouse(Rr),fi,Oi=i.select(r(Rr)).on("keydown.brush",ra).on("keyup.brush",ka);if(i.event.changedTouches?Oi.on("touchmove.brush",la).on("touchend.brush",Bi):Oi.on("mousemove.brush",la).on("mouseup.brush",Bi),un.interrupt().selectAll("*").interrupt(),qn)ii[0]=ee[0]-ii[0],ii[1]=ae[0]-ii[1];else if(vn){var Mi=+/w$/.test(vn),Ii=+/^n/.test(vn);fi=[ee[1-Mi]-ii[0],ae[1-Ii]-ii[1]],ii[0]=ee[Mi],ii[1]=ae[Ii]}else i.event.altKey&&(Qn=ii.slice());un.style("pointer-events","none").selectAll(".resize").style("display",null),i.select("body").style("cursor",Br.style("cursor")),jr({type:"brushstart"}),la();function ra(){i.event.keyCode==32&&(qn||(Qn=null,ii[0]-=ee[1],ii[1]-=ae[1],qn=2),it())}function ka(){i.event.keyCode==32&&qn==2&&(ii[0]+=ee[1],ii[1]+=ae[1],qn=0,it())}function la(){var Ti=i.mouse(Rr),Zi=!1;fi&&(Ti[0]+=fi[0],Ti[1]+=fi[1]),qn||(i.event.altKey?(Qn||(Qn=[(ee[0]+ee[1])/2,(ae[0]+ae[1])/2]),ii[0]=ee[+(Ti[0]"u"&&(R=1e-6);var W,at,vt,St,Pt;for(vt=P,Pt=0;Pt<8;Pt++){if(St=this.sampleCurveX(vt)-P,Math.abs(St)at)return at;for(;WSt?W=vt:at=vt,vt=(at-W)*.5+W}return vt},p.prototype.solve=function(P,R){return this.sampleCurveY(this.solveCurveX(P,R))};var r=e;function e(P,R){this.x=P,this.y=R}e.prototype={clone:function(){return new e(this.x,this.y)},add:function(P){return this.clone()._add(P)},sub:function(P){return this.clone()._sub(P)},multByPoint:function(P){return this.clone()._multByPoint(P)},divByPoint:function(P){return this.clone()._divByPoint(P)},mult:function(P){return this.clone()._mult(P)},div:function(P){return this.clone()._div(P)},rotate:function(P){return this.clone()._rotate(P)},rotateAround:function(P,R){return this.clone()._rotateAround(P,R)},matMult:function(P){return this.clone()._matMult(P)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(P){return this.x===P.x&&this.y===P.y},dist:function(P){return Math.sqrt(this.distSqr(P))},distSqr:function(P){var R=P.x-this.x,W=P.y-this.y;return R*R+W*W},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(P){return Math.atan2(this.y-P.y,this.x-P.x)},angleWith:function(P){return this.angleWithSep(P.x,P.y)},angleWithSep:function(P,R){return Math.atan2(this.x*R-this.y*P,this.x*P+this.y*R)},_matMult:function(P){var R=P[0]*this.x+P[1]*this.y,W=P[2]*this.x+P[3]*this.y;return this.x=R,this.y=W,this},_add:function(P){return this.x+=P.x,this.y+=P.y,this},_sub:function(P){return this.x-=P.x,this.y-=P.y,this},_mult:function(P){return this.x*=P,this.y*=P,this},_div:function(P){return this.x/=P,this.y/=P,this},_multByPoint:function(P){return this.x*=P.x,this.y*=P.y,this},_divByPoint:function(P){return this.x/=P.x,this.y/=P.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var P=this.y;return this.y=this.x,this.x=-P,this},_rotate:function(P){var R=Math.cos(P),W=Math.sin(P),at=R*this.x-W*this.y,vt=W*this.x+R*this.y;return this.x=at,this.y=vt,this},_rotateAround:function(P,R){var W=Math.cos(P),at=Math.sin(P),vt=R.x+W*(this.x-R.x)-at*(this.y-R.y),St=R.y+at*(this.x-R.x)+W*(this.y-R.y);return this.x=vt,this.y=St,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},e.convert=function(P){return P instanceof e?P:Array.isArray(P)?new e(P[0],P[1]):P};var a=typeof self<"u"?self:{};function n(P,R){if(Array.isArray(P)){if(!Array.isArray(R)||P.length!==R.length)return!1;for(var W=0;W=1)return 1;var R=P*P,W=R*P;return 4*(P<.5?W:3*(P-R)+W-.75)}function l(P,R,W,at){var vt=new h(P,R,W,at);return function(St){return vt.solve(St)}}var m=l(.25,.1,.25,1);function v(P,R,W){return Math.min(W,Math.max(R,P))}function b(P,R,W){var at=W-R,vt=((P-R)%at+at)%at+R;return vt===R?W:vt}function u(P,R,W){if(!P.length)return W(null,[]);var at=P.length,vt=new Array(P.length),St=null;P.forEach(function(Pt,te){R(Pt,function(ye,_e){ye&&(St=ye),vt[te]=_e,--at===0&&W(St,vt)})})}function o(P){var R=[];for(var W in P)R.push(P[W]);return R}function d(P,R){var W=[];for(var at in P)at in R||W.push(at);return W}function w(P){for(var R=[],W=arguments.length-1;W-- >0;)R[W]=arguments[W+1];for(var at=0,vt=R;at>R/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,P)}return P()}function T(P){return P<=1?1:Math.pow(2,Math.ceil(Math.log(P)/Math.LN2))}function s(P){return P?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(P):!1}function L(P,R){P.forEach(function(W){R[W]&&(R[W]=R[W].bind(R))})}function M(P,R){return P.indexOf(R,P.length-R.length)!==-1}function z(P,R,W){var at={};for(var vt in P)at[vt]=R.call(W||this,P[vt],vt,P);return at}function D(P,R,W){var at={};for(var vt in P)R.call(W||this,P[vt],vt,P)&&(at[vt]=P[vt]);return at}function N(P){return Array.isArray(P)?P.map(N):typeof P=="object"&&P?z(P,N):P}function I(P,R){for(var W=0;W=0)return!0;return!1}var k={};function B(P){k[P]||(typeof console<"u"&&console.warn(P),k[P]=!0)}function O(P,R,W){return(W.y-P.y)*(R.x-P.x)>(R.y-P.y)*(W.x-P.x)}function H(P){for(var R=0,W=0,at=P.length,vt=at-1,St=void 0,Pt=void 0;W@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,W={};if(P.replace(R,function(vt,St,Pt,te){var ye=Pt||te;return W[St]=ye?ye.toLowerCase():!0,""}),W["max-age"]){var at=parseInt(W["max-age"],10);isNaN(at)?delete W["max-age"]:W["max-age"]=at}return W}var it=null;function ut(P){if(it==null){var R=P.navigator?P.navigator.userAgent:null;it=!!P.safari||!!(R&&(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return it}function J(P){try{var R=a[P];return R.setItem("_mapbox_test_",1),R.removeItem("_mapbox_test_"),!0}catch{return!1}}function X(P){return a.btoa(encodeURIComponent(P).replace(/%([0-9A-F]{2})/g,function(R,W){return String.fromCharCode(+("0x"+W))}))}function tt(P){return decodeURIComponent(a.atob(P).split("").map(function(R){return"%"+("00"+R.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var V=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now.bind(Date),Q=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,ot=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,$,Z,st={now:V,frame:function(R){var W=Q(R);return{cancel:function(){return ot(W)}}},getImageData:function(R,W){W===void 0&&(W=0);var at=a.document.createElement("canvas"),vt=at.getContext("2d");if(!vt)throw new Error("failed to create canvas 2d context");return at.width=R.width,at.height=R.height,vt.drawImage(R,0,0,R.width,R.height),vt.getImageData(-W,-W,R.width+2*W,R.height+2*W)},resolveURL:function(R){return $||($=a.document.createElement("a")),$.href=R,$.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return a.matchMedia?(Z==null&&(Z=a.matchMedia("(prefers-reduced-motion: reduce)")),Z.matches):!1}},nt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},ct={supported:!1,testSupport:bt},gt,Tt=!1,wt,Rt=!1;a.document&&(wt=a.document.createElement("img"),wt.onload=function(){gt&&At(gt),gt=null,Rt=!0},wt.onerror=function(){Tt=!0,gt=null},wt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function bt(P){Tt||!wt||(Rt?At(P):gt=P)}function At(P){var R=P.createTexture();P.bindTexture(P.TEXTURE_2D,R);try{if(P.texImage2D(P.TEXTURE_2D,0,P.RGBA,P.RGBA,P.UNSIGNED_BYTE,wt),P.isContextLost())return;ct.supported=!0}catch{}P.deleteTexture(R),Tt=!0}var mt="01";function Lt(){for(var P="1",R="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",W="",at=0;at<10;at++)W+=R[Math.floor(Math.random()*62)];var vt=12*60*60*1e3,St=[P,mt,W].join(""),Pt=Date.now()+vt;return{token:St,tokenExpiresAt:Pt}}var Ht=function(R,W){this._transformRequestFn=R,this._customAccessToken=W,this._createSkuToken()};Ht.prototype._createSkuToken=function(){var R=Lt();this._skuToken=R.token,this._skuTokenExpiresAt=R.tokenExpiresAt},Ht.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ht.prototype.transformRequest=function(R,W){return this._transformRequestFn?this._transformRequestFn(R,W)||{url:R}:{url:R}},Ht.prototype.normalizeStyleURL=function(R,W){if(!Ut(R))return R;var at=$t(R);return at.path="/styles/v1"+at.path,this._makeAPIURL(at,this._customAccessToken||W)},Ht.prototype.normalizeGlyphsURL=function(R,W){if(!Ut(R))return R;var at=$t(R);return at.path="/fonts/v1"+at.path,this._makeAPIURL(at,this._customAccessToken||W)},Ht.prototype.normalizeSourceURL=function(R,W){if(!Ut(R))return R;var at=$t(R);return at.path="/v4/"+at.authority+".json",at.params.push("secure"),this._makeAPIURL(at,this._customAccessToken||W)},Ht.prototype.normalizeSpriteURL=function(R,W,at,vt){var St=$t(R);return Ut(R)?(St.path="/styles/v1"+St.path+"/sprite"+W+at,this._makeAPIURL(St,this._customAccessToken||vt)):(St.path+=""+W+at,le(St))},Ht.prototype.normalizeTileURL=function(R,W){if(this._isSkuTokenExpired()&&this._createSkuToken(),R&&!Ut(R))return R;var at=$t(R),vt=/(\.(png|jpg)\d*)(?=$)/,St=/^.+\/v4\//,Pt=st.devicePixelRatio>=2||W===512?"@2x":"",te=ct.supported?".webp":"$1";at.path=at.path.replace(vt,""+Pt+te),at.path=at.path.replace(St,"/"),at.path="/v4"+at.path;var ye=this._customAccessToken||re(at.params)||nt.ACCESS_TOKEN;return nt.REQUIRE_ACCESS_TOKEN&&ye&&this._skuToken&&at.params.push("sku="+this._skuToken),this._makeAPIURL(at,ye)},Ht.prototype.canonicalizeTileURL=function(R,W){var at="/v4/",vt=/\.[\w]+$/,St=$t(R);if(!St.path.match(/(^\/v4\/)/)||!St.path.match(vt))return R;var Pt="mapbox://tiles/";Pt+=St.path.replace(at,"");var te=St.params;return W&&(te=te.filter(function(ye){return!ye.match(/^access_token=/)})),te.length&&(Pt+="?"+te.join("&")),Pt},Ht.prototype.canonicalizeTileset=function(R,W){for(var at=W?Ut(W):!1,vt=[],St=0,Pt=R.tiles||[];St=0&&R.params.splice(St,1)}if(vt.path!=="/"&&(R.path=""+vt.path+R.path),!nt.REQUIRE_ACCESS_TOKEN)return le(R);if(W=W||nt.ACCESS_TOKEN,!W)throw new Error("An API access token is required to use Mapbox GL. "+at);if(W[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+at);return R.params=R.params.filter(function(Pt){return Pt.indexOf("access_token")===-1}),R.params.push("access_token="+W),le(R)};function Ut(P){return P.indexOf("mapbox:")===0}var kt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Vt(P){return kt.test(P)}function It(P){return P.indexOf("sku=")>0&&Vt(P)}function re(P){for(var R=0,W=P;R=1&&a.localStorage.setItem(W,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},xe.prototype.processRequests=function(R){},xe.prototype.postEvent=function(R,W,at,vt){var St=this;if(nt.EVENTS_URL){var Pt=$t(nt.EVENTS_URL);Pt.params.push("access_token="+(vt||nt.ACCESS_TOKEN||""));var te={event:this.type,created:new Date(R).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:x,skuId:mt,userId:this.anonId},ye=W?w(te,W):te,_e={url:le(Pt),headers:{"Content-Type":"text/plain"},body:JSON.stringify([ye])};this.pendingRequest=Ve(_e,function(Fe){St.pendingRequest=null,at(Fe),St.saveEventData(),St.processRequests(vt)})}},xe.prototype.queueRequest=function(R,W){this.queue.push(R),this.processRequests(W)};var Se=function(P){function R(){P.call(this,"map.load"),this.success={},this.skuToken=""}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.postMapLoadEvent=function(at,vt,St,Pt){this.skuToken=St,(nt.EVENTS_URL&&Pt||nt.ACCESS_TOKEN&&Array.isArray(at)&&at.some(function(te){return Ut(te)||Vt(te)}))&&this.queueRequest({id:vt,timestamp:Date.now()},Pt)},R.prototype.processRequests=function(at){var vt=this;if(!(this.pendingRequest||this.queue.length===0)){var St=this.queue.shift(),Pt=St.id,te=St.timestamp;Pt&&this.success[Pt]||(this.anonId||this.fetchEventData(),s(this.anonId)||(this.anonId=E()),this.postEvent(te,{skuToken:this.skuToken},function(ye){ye||Pt&&(vt.success[Pt]=!0)},at))}},R}(xe),ne=function(P){function R(W){P.call(this,"appUserTurnstile"),this._customAccessToken=W}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.postTurnstileEvent=function(at,vt){nt.EVENTS_URL&&nt.ACCESS_TOKEN&&Array.isArray(at)&&at.some(function(St){return Ut(St)||Vt(St)})&&this.queueRequest(Date.now(),vt)},R.prototype.processRequests=function(at){var vt=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var St=de(nt.ACCESS_TOKEN),Pt=St?St.u:nt.ACCESS_TOKEN,te=Pt!==this.eventData.tokenU;s(this.anonId)||(this.anonId=E(),te=!0);var ye=this.queue.shift();if(this.eventData.lastSuccess){var _e=new Date(this.eventData.lastSuccess),Fe=new Date(ye),je=(ye-this.eventData.lastSuccess)/(24*60*60*1e3);te=te||je>=1||je<-1||_e.getDate()!==Fe.getDate()}else te=!0;if(!te)return this.processRequests();this.postEvent(ye,{"enabled.telemetry":!1},function(ar){ar||(vt.eventData.lastSuccess=ye,vt.eventData.tokenU=Pt)},at)}},R}(xe),zt=new ne,Xt=zt.postTurnstileEvent.bind(zt),Jt=new Se,Wt=Jt.postMapLoadEvent.bind(Jt),Ft="mapbox-tiles",xt=500,yt=50,Et=1e3*60*7,Mt;function Nt(){a.caches&&!Mt&&(Mt=a.caches.open(Ft))}var jt;function ie(P,R){if(jt===void 0)try{new Response(new ReadableStream),jt=!0}catch{jt=!1}jt?R(P.body):P.blob().then(R)}function me(P,R,W){if(Nt(),!!Mt){var at={status:R.status,statusText:R.statusText,headers:new a.Headers};R.headers.forEach(function(Pt,te){return at.headers.set(te,Pt)});var vt=et(R.headers.get("Cache-Control")||"");if(!vt["no-store"]){vt["max-age"]&&at.headers.set("Expires",new Date(W+vt["max-age"]*1e3).toUTCString());var St=new Date(at.headers.get("Expires")).getTime()-W;StDate.now()&&!W["no-cache"]}var ce=1/0;function Te(P){ce++,ce>yt&&(P.getActor().send("enforceCacheSizeLimit",xt),ce=0)}function Be(P){Nt(),Mt&&Mt.then(function(R){R.keys().then(function(W){for(var at=0;at=200&&W.status<300||W.status===0)&&W.response!==null){var vt=W.response;if(P.type==="json")try{vt=JSON.parse(W.response)}catch(St){return R(St)}R(null,vt,W.getResponseHeader("Cache-Control"),W.getResponseHeader("Expires"))}else R(new $e(W.statusText,W.status,P.url))},W.send(P.body),{cancel:function(){return W.abort()}}}var Ie=function(P,R){if(!se(P.url)){if(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return Ae(P,R);if(j()&&self.worker&&self.worker.actor){var W=!0;return self.worker.actor.send("getResource",P,R,void 0,W)}}return Ce(P,R)},Pe=function(P,R){return Ie(w(P,{type:"json"}),R)},ke=function(P,R){return Ie(w(P,{type:"arrayBuffer"}),R)},Ve=function(P,R){return Ie(w(P,{method:"POST"}),R)};function Je(P){var R=a.document.createElement("a");return R.href=P,R.protocol===a.document.location.protocol&&R.host===a.document.location.host}var ur="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function hr(P,R,W,at){var vt=new a.Image,St=a.URL;vt.onload=function(){R(null,vt),St.revokeObjectURL(vt.src),vt.onload=null,a.requestAnimationFrame(function(){vt.src=ur})},vt.onerror=function(){return R(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Pt=new a.Blob([new Uint8Array(P)],{type:"image/png"});vt.cacheControl=W,vt.expires=at,vt.src=P.byteLength?St.createObjectURL(Pt):ur}function vr(P,R){var W=new a.Blob([new Uint8Array(P)],{type:"image/png"});a.createImageBitmap(W).then(function(at){R(null,at)}).catch(function(at){R(new Error("Could not load image because of "+at.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Yt,Gt,Ne=function(){Yt=[],Gt=0};Ne();var Oe=function(P,R){if(ct.supported&&(P.headers||(P.headers={}),P.headers.accept="image/webp,*/*"),Gt>=nt.MAX_PARALLEL_IMAGE_REQUESTS){var W={requestParameters:P,callback:R,cancelled:!1,cancel:function(){this.cancelled=!0}};return Yt.push(W),W}Gt++;var at=!1,vt=function(){if(!at)for(at=!0,Gt--;Yt.length&&Gt0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)},dr.prototype.setEventedParent=function(R,W){return this._eventedParent=R,this._eventedParentData=W,this};var mr=8,xr={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},pr={"*":{type:"source"}},Gr=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Pr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Dr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},cn={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},rn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Cn={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},En={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Tr={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Cr=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Wr={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ur={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},an={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},pn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},gn={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_n={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ni={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ci={type:"array",value:"*"},di={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},li={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ri={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wr={type:"array",value:"*",minimum:1},nn={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},$r=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],dn={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Vn={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Tn={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},An={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Bn={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Jn={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},gi={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Di={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Sr={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},kr={"*":{type:"string"}},Ar={$version:mr,$root:xr,sources:pr,source:Gr,source_vector:Pr,source_raster:Dr,source_raster_dem:cn,source_geojson:rn,source_video:Cn,source_image:En,layer:Tr,layout:Cr,layout_background:Wr,layout_fill:Ur,layout_circle:an,layout_heatmap:pn,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:gn,layout_symbol:_n,layout_raster:kn,layout_hillshade:ni,filter:ci,filter_operator:di,geometry_type:li,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:ri,expression:wr,light:nn,paint:$r,paint_fill:dn,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Vn,paint_circle:Tn,paint_heatmap:An,paint_symbol:Bn,paint_raster:Jn,paint_hillshade:gi,paint_background:Di,transition:Sr,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:kr},Or=function(R,W,at,vt){this.message=(R?R+": ":"")+at,vt&&(this.identifier=vt),W!=null&&W.__line__&&(this.line=W.__line__)};function xn(P){var R=P.key,W=P.value;return W?[new Or(R,W,"constants have been deprecated as of v8")]:[]}function In(P){for(var R=[],W=arguments.length-1;W-- >0;)R[W]=arguments[W+1];for(var at=0,vt=R;at":P.itemType.kind==="value"?"array":"array<"+R+">"}else return P.kind}var Eo=[Hr,Qr,wn,Ln,Pn,pi,Un,pa(On),Ci];function xo(P,R){if(R.kind==="error")return null;if(P.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!xo(P.itemType,R.itemType))&&(typeof P.N!="number"||P.N===R.N))return null}else{if(P.kind===R.kind)return null;if(P.kind==="value")for(var W=0,at=Eo;W255?255:_e}function vt(_e){return _e<0?0:_e>1?1:_e}function St(_e){return _e[_e.length-1]==="%"?at(parseFloat(_e)/100*255):at(parseInt(_e))}function Pt(_e){return _e[_e.length-1]==="%"?vt(parseFloat(_e)/100):vt(parseFloat(_e))}function te(_e,Fe,je){return je<0?je+=1:je>1&&(je-=1),je*6<1?_e+(Fe-_e)*je*6:je*2<1?Fe:je*3<2?_e+(Fe-_e)*(2/3-je)*6:_e}function ye(_e){var Fe=_e.replace(/ /g,"").toLowerCase();if(Fe in W)return W[Fe].slice();if(Fe[0]==="#"){if(Fe.length===4){var je=parseInt(Fe.substr(1),16);return je>=0&&je<=4095?[(je&3840)>>4|(je&3840)>>8,je&240|(je&240)>>4,je&15|(je&15)<<4,1]:null}else if(Fe.length===7){var je=parseInt(Fe.substr(1),16);return je>=0&&je<=16777215?[(je&16711680)>>16,(je&65280)>>8,je&255,1]:null}return null}var ar=Fe.indexOf("("),tr=Fe.indexOf(")");if(ar!==-1&&tr+1===Fe.length){var yr=Fe.substr(0,ar),zr=Fe.substr(ar+1,tr-(ar+1)).split(","),ln=1;switch(yr){case"rgba":if(zr.length!==4)return null;ln=Pt(zr.pop());case"rgb":return zr.length!==3?null:[St(zr[0]),St(zr[1]),St(zr[2]),ln];case"hsla":if(zr.length!==4)return null;ln=Pt(zr.pop());case"hsl":if(zr.length!==3)return null;var tn=(parseFloat(zr[0])%360+360)%360/360,Sn=Pt(zr[1]),mn=Pt(zr[2]),Mn=mn<=.5?mn*(Sn+1):mn+Sn-mn*Sn,zn=mn*2-Mn;return[at(te(zn,Mn,tn+1/3)*255),at(te(zn,Mn,tn)*255),at(te(zn,Mn,tn-1/3)*255),ln];default:return null}}return null}try{R.parseCSSColor=ye}catch{}}),wf=Bu.parseCSSColor,$i=function(R,W,at,vt){vt===void 0&&(vt=1),this.r=R,this.g=W,this.b=at,this.a=vt};$i.parse=function(R){if(R){if(R instanceof $i)return R;if(typeof R=="string"){var W=wf(R);if(W)return new $i(W[0]/255*W[3],W[1]/255*W[3],W[2]/255*W[3],W[3])}}},$i.prototype.toString=function(){var R=this.toArray(),W=R[0],at=R[1],vt=R[2],St=R[3];return"rgba("+Math.round(W)+","+Math.round(at)+","+Math.round(vt)+","+St+")"},$i.prototype.toArray=function(){var R=this,W=R.r,at=R.g,vt=R.b,St=R.a;return St===0?[0,0,0,0]:[W*255/St,at*255/St,vt*255/St,St]},$i.black=new $i(0,0,0,1),$i.white=new $i(1,1,1,1),$i.transparent=new $i(0,0,0,0),$i.red=new $i(1,0,0,1);var Fl=function(R,W,at){R?this.sensitivity=W?"variant":"case":this.sensitivity=W?"accent":"base",this.locale=at,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Fl.prototype.compare=function(R,W){return this.collator.compare(R,W)},Fl.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Uu=function(R,W,at,vt,St){this.text=R,this.image=W,this.scale=at,this.fontStack=vt,this.textColor=St},Xa=function(R){this.sections=R};Xa.fromString=function(R){return new Xa([new Uu(R,null,null,null,null)])},Xa.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(R){return R.text.length!==0||R.image&&R.image.name.length!==0})},Xa.factory=function(R){return R instanceof Xa?R:Xa.fromString(R)},Xa.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(R){return R.text}).join("")},Xa.prototype.serialize=function(){for(var R=["format"],W=0,at=this.sections;W=0&&P<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof W=="number"&&W>=0&&W<=255)){var vt=typeof at=="number"?[P,R,W,at]:[P,R,W];return"Invalid rgba value ["+vt.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof at>"u"||typeof at=="number"&&at>=0&&at<=1?null:"Invalid rgba value ["+[P,R,W,at].join(", ")+"]: 'a' must be between 0 and 1."}function vu(P){if(P===null)return!0;if(typeof P=="string")return!0;if(typeof P=="boolean")return!0;if(typeof P=="number")return!0;if(P instanceof $i)return!0;if(P instanceof Fl)return!0;if(P instanceof Xa)return!0;if(P instanceof ho)return!0;if(Array.isArray(P)){for(var R=0,W=P;R2){var te=R[1];if(typeof te!="string"||!(te in fl)||te==="object")return W.error('The item type argument of "array" must be one of string, number, boolean',1);Pt=fl[te],at++}else Pt=On;var ye;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return W.error('The length argument to "array" must be a positive integer literal',2);ye=R[2],at++}vt=pa(Pt,ye)}else vt=fl[St];for(var _e=[];at1)&&W.push(vt)}}return W.concat(this.args.map(function(St){return St.serialize()}))};var qa=function(R){this.type=pi,this.sections=R};qa.parse=function(R,W){if(R.length<2)return W.error("Expected at least one argument.");var at=R[1];if(!Array.isArray(at)&&typeof at=="object")return W.error("First argument must be an image or text section.");for(var vt=[],St=!1,Pt=1;Pt<=R.length-1;++Pt){var te=R[Pt];if(St&&typeof te=="object"&&!Array.isArray(te)){St=!1;var ye=null;if(te["font-scale"]&&(ye=W.parse(te["font-scale"],1,Qr),!ye))return null;var _e=null;if(te["text-font"]&&(_e=W.parse(te["text-font"],1,pa(wn)),!_e))return null;var Fe=null;if(te["text-color"]&&(Fe=W.parse(te["text-color"],1,Pn),!Fe))return null;var je=vt[vt.length-1];je.scale=ye,je.font=_e,je.textColor=Fe}else{var ar=W.parse(R[Pt],1,On);if(!ar)return null;var tr=ar.type.kind;if(tr!=="string"&&tr!=="value"&&tr!=="null"&&tr!=="resolvedImage")return W.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");St=!0,vt.push({content:ar,scale:null,font:null,textColor:null})}}return new qa(vt)},qa.prototype.evaluate=function(R){var W=function(at){var vt=at.content.evaluate(R);return Ra(vt)===Ci?new Uu("",vt,null,null,null):new Uu(ul(vt),null,at.scale?at.scale.evaluate(R):null,at.font?at.font.evaluate(R).join(","):null,at.textColor?at.textColor.evaluate(R):null)};return new Xa(this.sections.map(W))},qa.prototype.eachChild=function(R){for(var W=0,at=this.sections;W-1),at},_o.prototype.eachChild=function(R){R(this.input)},_o.prototype.outputDefined=function(){return!1},_o.prototype.serialize=function(){return["image",this.input.serialize()]};var Tf={"to-boolean":Ln,"to-color":Pn,"to-number":Qr,"to-string":wn},bo=function(R,W){this.type=R,this.args=W};bo.parse=function(R,W){if(R.length<2)return W.error("Expected at least one argument.");var at=R[0];if((at==="to-boolean"||at==="to-string")&&R.length!==2)return W.error("Expected one argument.");for(var vt=Tf[at],St=[],Pt=1;Pt4?at="Invalid rbga value "+JSON.stringify(W)+": expected an array containing either three or four numeric values.":at=ll(W[0],W[1],W[2],W[3]),!at))return new $i(W[0]/255,W[1]/255,W[2]/255,W[3])}throw new Ua(at||"Could not parse color from value '"+(typeof W=="string"?W:String(JSON.stringify(W)))+"'")}else if(this.type.kind==="number"){for(var ye=null,_e=0,Fe=this.args;_e=R[2]||P[1]<=R[1]||P[3]>=R[3])}function bc(P,R){var W=Af(P[0]),at=xc(P[1]),vt=Math.pow(2,R.z);return[Math.round(W*vt*es),Math.round(at*vt*es)]}function wc(P,R,W){var at=P[0]-R[0],vt=P[1]-R[1],St=P[0]-W[0],Pt=P[1]-W[1];return at*Pt-St*vt===0&&at*St<=0&&vt*Pt<=0}function Tc(P,R,W){return R[1]>P[1]!=W[1]>P[1]&&P[0]<(W[0]-R[0])*(P[1]-R[1])/(W[1]-R[1])+R[0]}function Gu(P,R){for(var W=!1,at=0,vt=R.length;at0&&je<0||Fe<0&&je>0}function Sf(P,R,W,at){var vt=[R[0]-P[0],R[1]-P[1]],St=[at[0]-W[0],at[1]-W[1]];return Mc(St,vt)===0?!1:!!(Mf(P,R,W,at)&&Mf(W,at,P,R))}function Xs(P,R,W){for(var at=0,vt=W;atW[2]){var vt=at*.5,St=P[0]-W[0]>vt?-at:W[0]-P[0]>vt?at:0;St===0&&(St=P[0]-W[2]>vt?-at:W[2]-P[0]>vt?at:0),P[0]+=St}Vu(R,P)}function Sc(P){P[0]=P[1]=1/0,P[2]=P[3]=-1/0}function pu(P,R,W,at){for(var vt=Math.pow(2,at.z)*es,St=[at.x*es,at.y*es],Pt=[],te=0,ye=P;te=0)return!1;var W=!0;return P.eachChild(function(at){W&&!Ol(at,R)&&(W=!1)}),W}var Ls=function(R,W){this.type=W.type,this.name=R,this.boundExpression=W};Ls.parse=function(R,W){if(R.length!==2||typeof R[1]!="string")return W.error("'var' expression requires exactly one string literal argument.");var at=R[1];return W.scope.has(at)?new Ls(at,W.scope.get(at)):W.error('Unknown variable "'+at+'". Make sure "'+at+'" has been bound in an enclosing "let" expression before using it.',1)},Ls.prototype.evaluate=function(R){return this.boundExpression.evaluate(R)},Ls.prototype.eachChild=function(){},Ls.prototype.outputDefined=function(){return!1},Ls.prototype.serialize=function(){return["var",this.name]};var rs=function(R,W,at,vt,St){W===void 0&&(W=[]),vt===void 0&&(vt=new Zr),St===void 0&&(St=[]),this.registry=R,this.path=W,this.key=W.map(function(Pt){return"["+Pt+"]"}).join(""),this.scope=vt,this.errors=St,this.expectedType=at};rs.prototype.parse=function(R,W,at,vt,St){return St===void 0&&(St={}),W?this.concat(W,at,vt)._parse(R,St):this._parse(R,St)},rs.prototype._parse=function(R,W){(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number")&&(R=["literal",R]);function at(Fe,je,ar){return ar==="assert"?new $a(je,[Fe]):ar==="coerce"?new bo(je,[Fe]):Fe}if(Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var vt=R[0];if(typeof vt!="string")return this.error("Expression name must be a string, but found "+typeof vt+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var St=this.registry[vt];if(St){var Pt=St.parse(R,this);if(!Pt)return null;if(this.expectedType){var te=this.expectedType,ye=Pt.type;if((te.kind==="string"||te.kind==="number"||te.kind==="boolean"||te.kind==="object"||te.kind==="array")&&ye.kind==="value")Pt=at(Pt,te,W.typeAnnotation||"assert");else if((te.kind==="color"||te.kind==="formatted"||te.kind==="resolvedImage")&&(ye.kind==="value"||ye.kind==="string"))Pt=at(Pt,te,W.typeAnnotation||"coerce");else if(this.checkSubtype(te,ye))return null}if(!(Pt instanceof za)&&Pt.type.kind!=="resolvedImage"&&Wu(Pt)){var _e=new ts;try{Pt=new za(Pt.type,Pt.evaluate(_e))}catch(Fe){return this.error(Fe.message),null}}return Pt}return this.error('Unknown expression "'+vt+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof R>"u"?this.error("'undefined' value invalid. Use null instead."):typeof R=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof R+" instead.")},rs.prototype.concat=function(R,W,at){var vt=typeof R=="number"?this.path.concat(R):this.path,St=at?this.scope.concat(at):this.scope;return new rs(this.registry,vt,W||null,St,this.errors)},rs.prototype.error=function(R){for(var W=[],at=arguments.length-1;at-- >0;)W[at]=arguments[at+1];var vt=""+this.key+W.map(function(St){return"["+St+"]"}).join("");this.errors.push(new Er(vt,R))},rs.prototype.checkSubtype=function(R,W){var at=xo(R,W);return at&&this.error(at),at};function Wu(P){if(P instanceof Ls)return Wu(P.boundExpression);if(P instanceof Za&&P.name==="error")return!1;if(P instanceof Cs)return!1;if(P instanceof Uo)return!1;var R=P instanceof bo||P instanceof $a,W=!0;return P.eachChild(function(at){R?W=W&&Wu(at):W=W&&at instanceof za}),W?hl(P)&&Ol(P,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function vl(P,R){for(var W=P.length-1,at=0,vt=W,St=0,Pt,te;at<=vt;)if(St=Math.floor((at+vt)/2),Pt=P[St],te=P[St+1],Pt<=R){if(St===W||RR)vt=St-1;else throw new Ua("Input is not a number.");return 0}var Ho=function(R,W,at){this.type=R,this.input=W,this.labels=[],this.outputs=[];for(var vt=0,St=at;vt=te)return W.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',_e);var je=W.parse(ye,Fe,St);if(!je)return null;St=St||je.type,vt.push([te,je])}return new Ho(St,at,vt)},Ho.prototype.evaluate=function(R){var W=this.labels,at=this.outputs;if(W.length===1)return at[0].evaluate(R);var vt=this.input.evaluate(R);if(vt<=W[0])return at[0].evaluate(R);var St=W.length;if(vt>=W[St-1])return at[St-1].evaluate(R);var Pt=vl(W,vt);return at[Pt].evaluate(R)},Ho.prototype.eachChild=function(R){R(this.input);for(var W=0,at=this.outputs;W0&&R.push(this.labels[W]),R.push(this.outputs[W].serialize());return R};function Ca(P,R,W){return P*(1-W)+R*W}function Yu(P,R,W){return new $i(Ca(P.r,R.r,W),Ca(P.g,R.g,W),Ca(P.b,R.b,W),Ca(P.a,R.a,W))}function Ec(P,R,W){return P.map(function(at,vt){return Ca(at,R[vt],W)})}var mu=Object.freeze({__proto__:null,number:Ca,color:Yu,array:Ec}),dl=.95047,pl=1,wo=1.08883,yu=4/29,ml=6/29,xu=3*ml*ml,_c=ml*ml*ml,Lf=Math.PI/180,Xu=180/Math.PI;function Zu(P){return P>_c?Math.pow(P,.3333333333333333):P/xu+yu}function ju(P){return P>ml?P*P*P:xu*(P-yu)}function yl(P){return 255*(P<=.0031308?12.92*P:1.055*Math.pow(P,.4166666666666667)-.055)}function bu(P){return P/=255,P<=.04045?P/12.92:Math.pow((P+.055)/1.055,2.4)}function Nl(P){var R=bu(P.r),W=bu(P.g),at=bu(P.b),vt=Zu((.4124564*R+.3575761*W+.1804375*at)/dl),St=Zu((.2126729*R+.7151522*W+.072175*at)/pl),Pt=Zu((.0193339*R+.119192*W+.9503041*at)/wo);return{l:116*St-16,a:500*(vt-St),b:200*(St-Pt),alpha:P.a}}function wu(P){var R=(P.l+16)/116,W=isNaN(P.a)?R:R+P.a/500,at=isNaN(P.b)?R:R-P.b/200;return R=pl*ju(R),W=dl*ju(W),at=wo*ju(at),new $i(yl(3.2404542*W-1.5371385*R-.4985314*at),yl(-.969266*W+1.8760108*R+.041556*at),yl(.0556434*W-.2040259*R+1.0572252*at),P.alpha)}function ga(P,R,W){return{l:Ca(P.l,R.l,W),a:Ca(P.a,R.a,W),b:Ca(P.b,R.b,W),alpha:Ca(P.alpha,R.alpha,W)}}function Pf(P){var R=Nl(P),W=R.l,at=R.a,vt=R.b,St=Math.atan2(vt,at)*Xu;return{h:St<0?St+360:St,c:Math.sqrt(at*at+vt*vt),l:W,alpha:P.a}}function Vo(P){var R=P.h*Lf,W=P.c,at=P.l;return wu({l:at,a:Math.cos(R)*W,b:Math.sin(R)*W,alpha:P.alpha})}function Rf(P,R,W){var at=R-P;return P+W*(at>180||at<-180?at-360*Math.round(at/360):at)}function Ku(P,R,W){return{h:Rf(P.h,R.h,W),c:Ca(P.c,R.c,W),l:Ca(P.l,R.l,W),alpha:Ca(P.alpha,R.alpha,W)}}var js={forward:Nl,reverse:wu,interpolate:ga},Ps={forward:Pf,reverse:Vo,interpolate:Ku},Tu=Object.freeze({__proto__:null,lab:js,hcl:Ps}),Da=function(R,W,at,vt,St){this.type=R,this.operator=W,this.interpolation=at,this.input=vt,this.labels=[],this.outputs=[];for(var Pt=0,te=St;Pt1}))return W.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);vt={name:"cubic-bezier",controlPoints:ye}}else return W.error("Unknown interpolation type "+String(vt[0]),1,0);if(R.length-1<4)return W.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if((R.length-1)%2!==0)return W.error("Expected an even number of arguments.");if(St=W.parse(St,2,Qr),!St)return null;var _e=[],Fe=null;at==="interpolate-hcl"||at==="interpolate-lab"?Fe=Pn:W.expectedType&&W.expectedType.kind!=="value"&&(Fe=W.expectedType);for(var je=0;je=ar)return W.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',yr);var ln=W.parse(tr,zr,Fe);if(!ln)return null;Fe=Fe||ln.type,_e.push([ar,ln])}return Fe.kind!=="number"&&Fe.kind!=="color"&&!(Fe.kind==="array"&&Fe.itemType.kind==="number"&&typeof Fe.N=="number")?W.error("Type "+ea(Fe)+" is not interpolatable."):new Da(Fe,at,vt,St,_e)},Da.prototype.evaluate=function(R){var W=this.labels,at=this.outputs;if(W.length===1)return at[0].evaluate(R);var vt=this.input.evaluate(R);if(vt<=W[0])return at[0].evaluate(R);var St=W.length;if(vt>=W[St-1])return at[St-1].evaluate(R);var Pt=vl(W,vt),te=W[Pt],ye=W[Pt+1],_e=Da.interpolationFactor(this.interpolation,vt,te,ye),Fe=at[Pt].evaluate(R),je=at[Pt+1].evaluate(R);return this.operator==="interpolate"?mu[this.type.kind.toLowerCase()](Fe,je,_e):this.operator==="interpolate-hcl"?Ps.reverse(Ps.interpolate(Ps.forward(Fe),Ps.forward(je),_e)):js.reverse(js.interpolate(js.forward(Fe),js.forward(je),_e))},Da.prototype.eachChild=function(R){R(this.input);for(var W=0,at=this.outputs;W=at.length)throw new Ua("Array index out of bounds: "+W+" > "+(at.length-1)+".");if(W!==Math.floor(W))throw new Ua("Array index must be an integer, but found "+W+" instead.");return at[W]},Ks.prototype.eachChild=function(R){R(this.index),R(this.input)},Ks.prototype.outputDefined=function(){return!1},Ks.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Rs=function(R,W){this.type=Ln,this.needle=R,this.haystack=W};Rs.parse=function(R,W){if(R.length!==3)return W.error("Expected 2 arguments, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1,On),vt=W.parse(R[2],2,On);return!at||!vt?null:Qa(at.type,[Ln,wn,Qr,Hr,On])?new Rs(at,vt):W.error("Expected first argument to be of type boolean, string, number or null, but found "+ea(at.type)+" instead")},Rs.prototype.evaluate=function(R){var W=this.needle.evaluate(R),at=this.haystack.evaluate(R);if(!at)return!1;if(!sl(W,["boolean","string","number","null"]))throw new Ua("Expected first argument to be of type boolean, string, number or null, but found "+ea(Ra(W))+" instead.");if(!sl(at,["string","array"]))throw new Ua("Expected second argument to be of type array or string, but found "+ea(Ra(at))+" instead.");return at.indexOf(W)>=0},Rs.prototype.eachChild=function(R){R(this.needle),R(this.haystack)},Rs.prototype.outputDefined=function(){return!0},Rs.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Wo=function(R,W,at){this.type=Qr,this.needle=R,this.haystack=W,this.fromIndex=at};Wo.parse=function(R,W){if(R.length<=2||R.length>=5)return W.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1,On),vt=W.parse(R[2],2,On);if(!at||!vt)return null;if(!Qa(at.type,[Ln,wn,Qr,Hr,On]))return W.error("Expected first argument to be of type boolean, string, number or null, but found "+ea(at.type)+" instead");if(R.length===4){var St=W.parse(R[3],3,Qr);return St?new Wo(at,vt,St):null}else return new Wo(at,vt)},Wo.prototype.evaluate=function(R){var W=this.needle.evaluate(R),at=this.haystack.evaluate(R);if(!sl(W,["boolean","string","number","null"]))throw new Ua("Expected first argument to be of type boolean, string, number or null, but found "+ea(Ra(W))+" instead.");if(!sl(at,["string","array"]))throw new Ua("Expected second argument to be of type array or string, but found "+ea(Ra(at))+" instead.");if(this.fromIndex){var vt=this.fromIndex.evaluate(R);return at.indexOf(W,vt)}return at.indexOf(W)},Wo.prototype.eachChild=function(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)},Wo.prototype.outputDefined=function(){return!1},Wo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var R=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),R]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ps=function(R,W,at,vt,St,Pt){this.inputType=R,this.type=W,this.input=at,this.cases=vt,this.outputs=St,this.otherwise=Pt};ps.parse=function(R,W){if(R.length<5)return W.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if(R.length%2!==1)return W.error("Expected an even number of arguments.");var at,vt;W.expectedType&&W.expectedType.kind!=="value"&&(vt=W.expectedType);for(var St={},Pt=[],te=2;teNumber.MAX_SAFE_INTEGER)return Fe.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof tr=="number"&&Math.floor(tr)!==tr)return Fe.error("Numeric branch labels must be integer values.");if(!at)at=Ra(tr);else if(Fe.checkSubtype(at,Ra(tr)))return null;if(typeof St[String(tr)]<"u")return Fe.error("Branch labels must be unique.");St[String(tr)]=Pt.length}var yr=W.parse(_e,te,vt);if(!yr)return null;vt=vt||yr.type,Pt.push(yr)}var zr=W.parse(R[1],1,On);if(!zr)return null;var ln=W.parse(R[R.length-1],R.length-1,vt);return!ln||zr.type.kind!=="value"&&W.concat(1).checkSubtype(at,zr.type)?null:new ps(at,vt,zr,St,Pt,ln)},ps.prototype.evaluate=function(R){var W=this.input.evaluate(R),at=Ra(W)===this.inputType&&this.outputs[this.cases[W]]||this.otherwise;return at.evaluate(R)},ps.prototype.eachChild=function(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)},ps.prototype.outputDefined=function(){return this.outputs.every(function(R){return R.outputDefined()})&&this.otherwise.outputDefined()},ps.prototype.serialize=function(){for(var R=this,W=["match",this.input.serialize()],at=Object.keys(this.cases).sort(),vt=[],St={},Pt=0,te=at;Pt=5)return W.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1,On),vt=W.parse(R[2],2,Qr);if(!at||!vt)return null;if(!Qa(at.type,[pa(On),wn,On]))return W.error("Expected first argument to be of type array or string, but found "+ea(at.type)+" instead");if(R.length===4){var St=W.parse(R[3],3,Qr);return St?new Do(at.type,at,vt,St):null}else return new Do(at.type,at,vt)},Do.prototype.evaluate=function(R){var W=this.input.evaluate(R),at=this.beginIndex.evaluate(R);if(!sl(W,["string","array"]))throw new Ua("Expected first argument to be of type array or string, but found "+ea(Ra(W))+" instead.");if(this.endIndex){var vt=this.endIndex.evaluate(R);return W.slice(at,vt)}return W.slice(at)},Do.prototype.eachChild=function(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)},Do.prototype.outputDefined=function(){return!1},Do.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var R=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),R]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Ul(P,R){return P==="=="||P==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function Cc(P,R,W){return R===W}function Lc(P,R,W){return R!==W}function Pc(P,R,W){return RW}function Ju(P,R,W){return R<=W}function Df(P,R,W){return R>=W}function xl(P,R,W,at){return at.compare(R,W)===0}function ja(P,R,W,at){return!xl(P,R,W,at)}function Co(P,R,W,at){return at.compare(R,W)<0}function bl(P,R,W,at){return at.compare(R,W)>0}function If(P,R,W,at){return at.compare(R,W)<=0}function Hl(P,R,W,at){return at.compare(R,W)>=0}function gs(P,R,W){var at=P!=="=="&&P!=="!=";return function(){function vt(St,Pt,te){this.type=Ln,this.lhs=St,this.rhs=Pt,this.collator=te,this.hasUntypedArgument=St.type.kind==="value"||Pt.type.kind==="value"}return vt.parse=function(Pt,te){if(Pt.length!==3&&Pt.length!==4)return te.error("Expected two or three arguments.");var ye=Pt[0],_e=te.parse(Pt[1],1,On);if(!_e)return null;if(!Ul(ye,_e.type))return te.concat(1).error('"'+ye+`" comparisons are not supported for type '`+ea(_e.type)+"'.");var Fe=te.parse(Pt[2],2,On);if(!Fe)return null;if(!Ul(ye,Fe.type))return te.concat(2).error('"'+ye+`" comparisons are not supported for type '`+ea(Fe.type)+"'.");if(_e.type.kind!==Fe.type.kind&&_e.type.kind!=="value"&&Fe.type.kind!=="value")return te.error("Cannot compare types '"+ea(_e.type)+"' and '"+ea(Fe.type)+"'.");at&&(_e.type.kind==="value"&&Fe.type.kind!=="value"?_e=new $a(Fe.type,[_e]):_e.type.kind!=="value"&&Fe.type.kind==="value"&&(Fe=new $a(_e.type,[Fe])));var je=null;if(Pt.length===4){if(_e.type.kind!=="string"&&Fe.type.kind!=="string"&&_e.type.kind!=="value"&&Fe.type.kind!=="value")return te.error("Cannot use collator to compare non-string types.");if(je=te.parse(Pt[3],3,ai),!je)return null}return new vt(_e,Fe,je)},vt.prototype.evaluate=function(Pt){var te=this.lhs.evaluate(Pt),ye=this.rhs.evaluate(Pt);if(at&&this.hasUntypedArgument){var _e=Ra(te),Fe=Ra(ye);if(_e.kind!==Fe.kind||!(_e.kind==="string"||_e.kind==="number"))throw new Ua('Expected arguments for "'+P+'" to be (string, string) or (number, number), but found ('+_e.kind+", "+Fe.kind+") instead.")}if(this.collator&&!at&&this.hasUntypedArgument){var je=Ra(te),ar=Ra(ye);if(je.kind!=="string"||ar.kind!=="string")return R(Pt,te,ye)}return this.collator?W(Pt,te,ye,this.collator.evaluate(Pt)):R(Pt,te,ye)},vt.prototype.eachChild=function(Pt){Pt(this.lhs),Pt(this.rhs),this.collator&&Pt(this.collator)},vt.prototype.outputDefined=function(){return!0},vt.prototype.serialize=function(){var Pt=[P];return this.eachChild(function(te){Pt.push(te.serialize())}),Pt},vt}()}var Dc=gs("==",Cc,xl),Ff=gs("!=",Lc,ja),zf=gs("<",Pc,Co),Qu=gs(">",Rc,bl),kf=gs("<=",Ju,If),vo=gs(">=",Df,Hl),Xo=function(R,W,at,vt,St){this.type=wn,this.number=R,this.locale=W,this.currency=at,this.minFractionDigits=vt,this.maxFractionDigits=St};Xo.parse=function(R,W){if(R.length!==3)return W.error("Expected two arguments.");var at=W.parse(R[1],1,Qr);if(!at)return null;var vt=R[2];if(typeof vt!="object"||Array.isArray(vt))return W.error("NumberFormat options argument must be an object.");var St=null;if(vt.locale&&(St=W.parse(vt.locale,1,wn),!St))return null;var Pt=null;if(vt.currency&&(Pt=W.parse(vt.currency,1,wn),!Pt))return null;var te=null;if(vt["min-fraction-digits"]&&(te=W.parse(vt["min-fraction-digits"],1,Qr),!te))return null;var ye=null;return vt["max-fraction-digits"]&&(ye=W.parse(vt["max-fraction-digits"],1,Qr),!ye)?null:new Xo(at,St,Pt,te,ye)},Xo.prototype.evaluate=function(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))},Xo.prototype.eachChild=function(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)},Xo.prototype.outputDefined=function(){return!1},Xo.prototype.serialize=function(){var R={};return this.locale&&(R.locale=this.locale.serialize()),this.currency&&(R.currency=this.currency.serialize()),this.minFractionDigits&&(R["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(R["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),R]};var Ds=function(R){this.type=Qr,this.input=R};Ds.parse=function(R,W){if(R.length!==2)return W.error("Expected 1 argument, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1);return at?at.type.kind!=="array"&&at.type.kind!=="string"&&at.type.kind!=="value"?W.error("Expected argument of type string or array, but found "+ea(at.type)+" instead."):new Ds(at):null},Ds.prototype.evaluate=function(R){var W=this.input.evaluate(R);if(typeof W=="string")return W.length;if(Array.isArray(W))return W.length;throw new Ua("Expected value to be of type string or array, but found "+ea(Ra(W))+" instead.")},Ds.prototype.eachChild=function(R){R(this.input)},Ds.prototype.outputDefined=function(){return!1},Ds.prototype.serialize=function(){var R=["length"];return this.eachChild(function(W){R.push(W.serialize())}),R};var wl={"==":Dc,"!=":Ff,">":Qu,"<":zf,">=":vo,"<=":kf,array:$a,at:Ks,boolean:$a,case:Yo,coalesce:Go,collator:Cs,format:qa,image:_o,in:Rs,"index-of":Wo,interpolate:Da,"interpolate-hcl":Da,"interpolate-lab":Da,length:Ds,let:ds,literal:za,match:ps,number:$a,"number-format":Xo,object:$a,slice:Do,step:Ho,string:$a,"to-boolean":bo,"to-color":bo,"to-number":bo,"to-string":bo,var:Ls,within:Uo};function Au(P,R){var W=R[0],at=R[1],vt=R[2],St=R[3];W=W.evaluate(P),at=at.evaluate(P),vt=vt.evaluate(P);var Pt=St?St.evaluate(P):1,te=ll(W,at,vt,Pt);if(te)throw new Ua(te);return new $i(W/255*Pt,at/255*Pt,vt/255*Pt,Pt)}function Js(P,R){return P in R}function Qs(P,R){var W=R[P];return typeof W>"u"?null:W}function Of(P,R,W,at){for(;W<=at;){var vt=W+at>>1;if(R[vt]===P)return!0;R[vt]>P?at=vt-1:W=vt+1}return!1}function ms(P){return{type:P}}Za.register(wl,{error:[mi,[wn],function(P,R){var W=R[0];throw new Ua(W.evaluate(P))}],typeof:[wn,[On],function(P,R){var W=R[0];return ea(Ra(W.evaluate(P)))}],"to-rgba":[pa(Qr,4),[Pn],function(P,R){var W=R[0];return W.evaluate(P).toArray()}],rgb:[Pn,[Qr,Qr,Qr],Au],rgba:[Pn,[Qr,Qr,Qr,Qr],Au],has:{type:Ln,overloads:[[[wn],function(P,R){var W=R[0];return Js(W.evaluate(P),P.properties())}],[[wn,Un],function(P,R){var W=R[0],at=R[1];return Js(W.evaluate(P),at.evaluate(P))}]]},get:{type:On,overloads:[[[wn],function(P,R){var W=R[0];return Qs(W.evaluate(P),P.properties())}],[[wn,Un],function(P,R){var W=R[0],at=R[1];return Qs(W.evaluate(P),at.evaluate(P))}]]},"feature-state":[On,[wn],function(P,R){var W=R[0];return Qs(W.evaluate(P),P.featureState||{})}],properties:[Un,[],function(P){return P.properties()}],"geometry-type":[wn,[],function(P){return P.geometryType()}],id:[On,[],function(P){return P.id()}],zoom:[Qr,[],function(P){return P.globals.zoom}],"heatmap-density":[Qr,[],function(P){return P.globals.heatmapDensity||0}],"line-progress":[Qr,[],function(P){return P.globals.lineProgress||0}],accumulated:[On,[],function(P){return P.globals.accumulated===void 0?null:P.globals.accumulated}],"+":[Qr,ms(Qr),function(P,R){for(var W=0,at=0,vt=R;at":[Ln,[wn,On],function(P,R){var W=R[0],at=R[1],vt=P.properties()[W.value],St=at.value;return typeof vt==typeof St&&vt>St}],"filter-id->":[Ln,[On],function(P,R){var W=R[0],at=P.id(),vt=W.value;return typeof at==typeof vt&&at>vt}],"filter-<=":[Ln,[wn,On],function(P,R){var W=R[0],at=R[1],vt=P.properties()[W.value],St=at.value;return typeof vt==typeof St&&vt<=St}],"filter-id-<=":[Ln,[On],function(P,R){var W=R[0],at=P.id(),vt=W.value;return typeof at==typeof vt&&at<=vt}],"filter->=":[Ln,[wn,On],function(P,R){var W=R[0],at=R[1],vt=P.properties()[W.value],St=at.value;return typeof vt==typeof St&&vt>=St}],"filter-id->=":[Ln,[On],function(P,R){var W=R[0],at=P.id(),vt=W.value;return typeof at==typeof vt&&at>=vt}],"filter-has":[Ln,[On],function(P,R){var W=R[0];return W.value in P.properties()}],"filter-has-id":[Ln,[],function(P){return P.id()!==null&&P.id()!==void 0}],"filter-type-in":[Ln,[pa(wn)],function(P,R){var W=R[0];return W.value.indexOf(P.geometryType())>=0}],"filter-id-in":[Ln,[pa(On)],function(P,R){var W=R[0];return W.value.indexOf(P.id())>=0}],"filter-in-small":[Ln,[wn,pa(On)],function(P,R){var W=R[0],at=R[1];return at.value.indexOf(P.properties()[W.value])>=0}],"filter-in-large":[Ln,[wn,pa(On)],function(P,R){var W=R[0],at=R[1];return Of(P.properties()[W.value],at.value,0,at.value.length-1)}],all:{type:Ln,overloads:[[[Ln,Ln],function(P,R){var W=R[0],at=R[1];return W.evaluate(P)&&at.evaluate(P)}],[ms(Ln),function(P,R){for(var W=0,at=R;W-1}function Al(P){return!!P.expression&&P.expression.interpolated}function va(P){return P instanceof Number?"number":P instanceof String?"string":P instanceof Boolean?"boolean":Array.isArray(P)?"array":P===null?"null":typeof P}function Ml(P){return typeof P=="object"&&P!==null&&!Array.isArray(P)}function Mu(P){return P}function Nf(P,R){var W=R.type==="color",at=P.stops&&typeof P.stops[0][0]=="object",vt=at||P.property!==void 0,St=at||!vt,Pt=P.type||(Al(R)?"exponential":"interval");if(W&&(P=In({},P),P.stops&&(P.stops=P.stops.map(function($n){return[$n[0],$i.parse($n[1])]})),P.default?P.default=$i.parse(P.default):P.default=$i.parse(R.default)),P.colorSpace&&P.colorSpace!=="rgb"&&!Tu[P.colorSpace])throw new Error("Unknown color space: "+P.colorSpace);var te,ye,_e;if(Pt==="exponential")te=$u;else if(Pt==="interval")te=Su;else if(Pt==="categorical"){te=Gl,ye=Object.create(null);for(var Fe=0,je=P.stops;Fe=P.stops[at-1][0])return P.stops[at-1][1];var vt=vl(P.stops.map(function(St){return St[0]}),W);return P.stops[vt][1]}function $u(P,R,W){var at=P.base!==void 0?P.base:1;if(va(W)!=="number")return Sl(P.default,R.default);var vt=P.stops.length;if(vt===1||W<=P.stops[0][0])return P.stops[0][1];if(W>=P.stops[vt-1][0])return P.stops[vt-1][1];var St=vl(P.stops.map(function(je){return je[0]}),W),Pt=Yl(W,at,P.stops[St][0],P.stops[St+1][0]),te=P.stops[St][1],ye=P.stops[St+1][1],_e=mu[R.type]||Mu;if(P.colorSpace&&P.colorSpace!=="rgb"){var Fe=Tu[P.colorSpace];_e=function(je,ar){return Fe.reverse(Fe.interpolate(Fe.forward(je),Fe.forward(ar),Pt))}}return typeof te.evaluate=="function"?{evaluate:function(){for(var ar=[],tr=arguments.length;tr--;)ar[tr]=arguments[tr];var yr=te.evaluate.apply(void 0,ar),zr=ye.evaluate.apply(void 0,ar);if(!(yr===void 0||zr===void 0))return _e(yr,zr,Pt)}}:_e(te,ye,Pt)}function Wl(P,R,W){return R.type==="color"?W=$i.parse(W):R.type==="formatted"?W=Xa.fromString(W.toString()):R.type==="resolvedImage"?W=ho.fromString(W.toString()):va(W)!==R.type&&(R.type!=="enum"||!R.values[W])&&(W=void 0),Sl(W,P.default,R.default)}function Yl(P,R,W,at){var vt=at-W,St=P-W;return vt===0?0:R===1?St/vt:(Math.pow(R,St)-1)/(Math.pow(R,vt)-1)}var Fs=function(R,W){this.expression=R,this._warningHistory={},this._evaluator=new ts,this._defaultValue=W?Bf(W):null,this._enumValues=W&&W.type==="enum"?W.values:null};Fs.prototype.evaluateWithoutErrorHandling=function(R,W,at,vt,St,Pt){return this._evaluator.globals=R,this._evaluator.feature=W,this._evaluator.featureState=at,this._evaluator.canonical=vt,this._evaluator.availableImages=St||null,this._evaluator.formattedSection=Pt,this.expression.evaluate(this._evaluator)},Fs.prototype.evaluate=function(R,W,at,vt,St,Pt){this._evaluator.globals=R,this._evaluator.feature=W||null,this._evaluator.featureState=at||null,this._evaluator.canonical=vt,this._evaluator.availableImages=St||null,this._evaluator.formattedSection=Pt||null;try{var te=this.expression.evaluate(this._evaluator);if(te==null||typeof te=="number"&&te!==te)return this._defaultValue;if(this._enumValues&&!(te in this._enumValues))throw new Ua("Expected value to be one of "+Object.keys(this._enumValues).map(function(ye){return JSON.stringify(ye)}).join(", ")+", but found "+JSON.stringify(te)+" instead.");return te}catch(ye){return this._warningHistory[ye.message]||(this._warningHistory[ye.message]=!0,typeof console<"u"&&console.warn(ye.message)),this._defaultValue}};function Xl(P){return Array.isArray(P)&&P.length>0&&typeof P[0]=="string"&&P[0]in wl}function zs(P,R){var W=new rs(wl,[],R?Ic(R):void 0),at=W.parse(P,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return at?Tl(new Fs(at,R)):Is(W.errors)}var Ha=function(R,W){this.kind=R,this._styleExpression=W,this.isStateDependent=R!=="constant"&&!Zs(W.expression)};Ha.prototype.evaluateWithoutErrorHandling=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluateWithoutErrorHandling(R,W,at,vt,St,Pt)},Ha.prototype.evaluate=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluate(R,W,at,vt,St,Pt)};var ns=function(R,W,at,vt){this.kind=R,this.zoomStops=at,this._styleExpression=W,this.isStateDependent=R!=="camera"&&!Zs(W.expression),this.interpolationType=vt};ns.prototype.evaluateWithoutErrorHandling=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluateWithoutErrorHandling(R,W,at,vt,St,Pt)},ns.prototype.evaluate=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluate(R,W,at,vt,St,Pt)},ns.prototype.interpolationFactor=function(R,W,at){return this.interpolationType?Da.interpolationFactor(this.interpolationType,R,W,at):0};function qu(P,R){if(P=zs(P,R),P.result==="error")return P;var W=P.value.expression,at=hl(W);if(!at&&!ys(R))return Is([new Er("","data expressions not supported")]);var vt=Ol(W,["zoom"]);if(!vt&&!Vl(R))return Is([new Er("","zoom expressions not supported")]);var St=Zl(W);if(!St&&!vt)return Is([new Er("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(St instanceof Er)return Is([St]);if(St instanceof Da&&!Al(R))return Is([new Er("",'"interpolate" expressions cannot be used with this property')]);if(!St)return Tl(at?new Ha("constant",P.value):new Ha("source",P.value));var Pt=St instanceof Da?St.interpolation:void 0;return Tl(at?new ns("camera",P.value,St.labels,Pt):new ns("composite",P.value,St.labels,Pt))}var $s=function(R,W){this._parameters=R,this._specification=W,In(this,Nf(this._parameters,this._specification))};$s.deserialize=function(R){return new $s(R._parameters,R._specification)},$s.serialize=function(R){return{_parameters:R._parameters,_specification:R._specification}};function Eu(P,R){if(Ml(P))return new $s(P,R);if(Xl(P)){var W=qu(P,R);if(W.result==="error")throw new Error(W.value.map(function(vt){return vt.key+": "+vt.message}).join(", "));return W.value}else{var at=P;return typeof P=="string"&&R.type==="color"&&(at=$i.parse(P)),{kind:"constant",evaluate:function(){return at}}}}function Zl(P){var R=null;if(P instanceof ds)R=Zl(P.result);else if(P instanceof Go)for(var W=0,at=P.args;Wat.maximum?[new Or(R,W,W+" is greater than the maximum value "+at.maximum)]:[]}function Uf(P){var R=P.valueSpec,W=hn(P.value.type),at,vt={},St,Pt,te=W!=="categorical"&&P.value.property===void 0,ye=!te,_e=va(P.value.stops)==="array"&&va(P.value.stops[0])==="array"&&va(P.value.stops[0][0])==="object",Fe=lo({key:P.key,value:P.value,valueSpec:P.styleSpec.function,style:P.style,styleSpec:P.styleSpec,objectElementValidators:{stops:je,default:yr}});return W==="identity"&&te&&Fe.push(new Or(P.key,P.value,'missing required property "property"')),W!=="identity"&&!P.value.stops&&Fe.push(new Or(P.key,P.value,'missing required property "stops"')),W==="exponential"&&P.valueSpec.expression&&!Al(P.valueSpec)&&Fe.push(new Or(P.key,P.value,"exponential functions not supported")),P.styleSpec.$version>=8&&(ye&&!ys(P.valueSpec)?Fe.push(new Or(P.key,P.value,"property functions not supported")):te&&!Vl(P.valueSpec)&&Fe.push(new Or(P.key,P.value,"zoom functions not supported"))),(W==="categorical"||_e)&&P.value.property===void 0&&Fe.push(new Or(P.key,P.value,'"property" property is required')),Fe;function je(zr){if(W==="identity")return[new Or(zr.key,zr.value,'identity function may not have a "stops" property')];var ln=[],tn=zr.value;return ln=ln.concat(jl({key:zr.key,value:tn,valueSpec:zr.valueSpec,style:zr.style,styleSpec:zr.styleSpec,arrayElementValidator:ar})),va(tn)==="array"&&tn.length===0&&ln.push(new Or(zr.key,tn,"array must have at least one stop")),ln}function ar(zr){var ln=[],tn=zr.value,Sn=zr.key;if(va(tn)!=="array")return[new Or(Sn,tn,"array expected, "+va(tn)+" found")];if(tn.length!==2)return[new Or(Sn,tn,"array length 2 expected, length "+tn.length+" found")];if(_e){if(va(tn[0])!=="object")return[new Or(Sn,tn,"object expected, "+va(tn[0])+" found")];if(tn[0].zoom===void 0)return[new Or(Sn,tn,"object stop key must have zoom")];if(tn[0].value===void 0)return[new Or(Sn,tn,"object stop key must have value")];if(Pt&&Pt>hn(tn[0].zoom))return[new Or(Sn,tn[0].zoom,"stop zoom values must appear in ascending order")];hn(tn[0].zoom)!==Pt&&(Pt=hn(tn[0].zoom),St=void 0,vt={}),ln=ln.concat(lo({key:Sn+"[0]",value:tn[0],valueSpec:{zoom:{}},style:zr.style,styleSpec:zr.styleSpec,objectElementValidators:{zoom:El,value:tr}}))}else ln=ln.concat(tr({key:Sn+"[0]",value:tn[0],valueSpec:{},style:zr.style,styleSpec:zr.styleSpec},tn));return Xl(sn(tn[1]))?ln.concat([new Or(Sn+"[1]",tn[1],"expressions are not allowed in function stops.")]):ln.concat(Ir({key:Sn+"[1]",value:tn[1],valueSpec:R,style:zr.style,styleSpec:zr.styleSpec}))}function tr(zr,ln){var tn=va(zr.value),Sn=hn(zr.value),mn=zr.value!==null?zr.value:ln;if(!at)at=tn;else if(tn!==at)return[new Or(zr.key,mn,tn+" stop domain type must match previous stop domain type "+at)];if(tn!=="number"&&tn!=="string"&&tn!=="boolean")return[new Or(zr.key,mn,"stop domain value must be a number, string, or boolean")];if(tn!=="number"&&W!=="categorical"){var Mn="number expected, "+tn+" found";return ys(R)&&W===void 0&&(Mn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Or(zr.key,mn,Mn)]}return W==="categorical"&&tn==="number"&&(!isFinite(Sn)||Math.floor(Sn)!==Sn)?[new Or(zr.key,mn,"integer expected, found "+Sn)]:W!=="categorical"&&tn==="number"&&St!==void 0&&Sn=2&&P[1]!=="$id"&&P[1]!=="$type";case"in":return P.length>=3&&(typeof P[1]!="string"||Array.isArray(P[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return P.length!==3||Array.isArray(P[1])||Array.isArray(P[2]);case"any":case"all":for(var R=0,W=P.slice(1);RR?1:0}function Jl(P){if(!Array.isArray(P))return!1;if(P[0]==="within")return!0;for(var R=1;R"||R==="<="||R===">="?Cu(P[1],P[2],R):R==="any"?Hf(P.slice(1)):R==="all"?["all"].concat(P.slice(1).map(Ql)):R==="none"?["all"].concat(P.slice(1).map(Ql).map(qs)):R==="in"?$l(P[1],P.slice(2)):R==="!in"?qs($l(P[1],P.slice(2))):R==="has"?ef(P[1]):R==="!has"?qs(ef(P[1])):R==="within"?P:!0;return W}function Cu(P,R,W){switch(P){case"$type":return["filter-type-"+W,R];case"$id":return["filter-id-"+W,R];default:return["filter-"+W,P,R]}}function Hf(P){return["any"].concat(P.map(Ql))}function $l(P,R){if(R.length===0)return!1;switch(P){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(function(W){return typeof W!=typeof R[0]})?["filter-in-large",P,["literal",R.sort(tf)]]:["filter-in-small",P,["literal",R]]}}function ef(P){switch(P){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",P]}}function qs(P){return["!",P]}function rf(P){return _u(sn(P.value))?ks(In({},P,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ql(P)}function ql(P){var R=P.value,W=P.key;if(va(R)!=="array")return[new Or(W,R,"array expected, "+va(R)+" found")];var at=P.styleSpec,vt,St=[];if(R.length<1)return[new Or(W,R,"filter array must have at least 1 element")];switch(St=St.concat(Kl({key:W+"[0]",value:R[0],valueSpec:at.filter_operator,style:P.style,styleSpec:P.styleSpec})),hn(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&hn(R[1])==="$type"&&St.push(new Or(W,R,'"$type" cannot be use with operator "'+R[0]+'"'));case"==":case"!=":R.length!==3&&St.push(new Or(W,R,'filter array for operator "'+R[0]+'" must have 3 elements'));case"in":case"!in":R.length>=2&&(vt=va(R[1]),vt!=="string"&&St.push(new Or(W+"[1]",R[1],"string expected, "+vt+" found")));for(var Pt=2;Pt=Fe[tr+0]&&at>=Fe[tr+1])?(Pt[ar]=!0,St.push(_e[ar])):Pt[ar]=!1}}},da.prototype._forEachCell=function(P,R,W,at,vt,St,Pt,te){for(var ye=this._convertToCellCoord(P),_e=this._convertToCellCoord(R),Fe=this._convertToCellCoord(W),je=this._convertToCellCoord(at),ar=ye;ar<=Fe;ar++)for(var tr=_e;tr<=je;tr++){var yr=this.d*tr+ar;if(!(te&&!te(this._convertFromCellCoord(ar),this._convertFromCellCoord(tr),this._convertFromCellCoord(ar+1),this._convertFromCellCoord(tr+1)))&&vt.call(this,P,R,W,at,yr,St,Pt,te))return}},da.prototype._convertFromCellCoord=function(P){return(P-this.padding)/this.scale},da.prototype._convertToCellCoord=function(P){return Math.max(0,Math.min(this.d-1,Math.floor(P*this.scale)+this.padding))},da.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var P=this.cells,R=Xi+this.cells.length+1+1,W=0,at=0;at=0)){var je=P[Fe];_e[Fe]=Ct[ye].shallow.indexOf(Fe)>=0?je:De(je,R)}P instanceof Error&&(_e.message=P.message)}if(_e.$name)throw new Error("$name property is reserved for worker serialization logic.");return ye!=="Object"&&(_e.$name=ye),_e}throw new Error("can't serialize object of type "+typeof P)}function Ee(P){if(P==null||typeof P=="boolean"||typeof P=="number"||typeof P=="string"||P instanceof Boolean||P instanceof Number||P instanceof String||P instanceof Date||P instanceof RegExp||ae(P)||fe(P)||ArrayBuffer.isView(P)||P instanceof Ia)return P;if(Array.isArray(P))return P.map(Ee);if(typeof P=="object"){var R=P.$name||"Object",W=Ct[R],at=W.klass;if(!at)throw new Error("can't deserialize unregistered class "+R);if(at.deserialize)return at.deserialize(P);for(var vt=Object.create(at.prototype),St=0,Pt=Object.keys(P);St=0?ye:Ee(ye)}}return vt}throw new Error("can't deserialize object of type "+typeof P)}var Ye=function(){this.first=!0};Ye.prototype.update=function(R,W){var at=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=at,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=at,!0):(this.lastFloorZoom>at?(this.lastIntegerZoom=at+1,this.lastIntegerZoomTime=W):this.lastFloorZoom=128&&P<=255},Arabic:function(P){return P>=1536&&P<=1791},"Arabic Supplement":function(P){return P>=1872&&P<=1919},"Arabic Extended-A":function(P){return P>=2208&&P<=2303},"Hangul Jamo":function(P){return P>=4352&&P<=4607},"Unified Canadian Aboriginal Syllabics":function(P){return P>=5120&&P<=5759},Khmer:function(P){return P>=6016&&P<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(P){return P>=6320&&P<=6399},"General Punctuation":function(P){return P>=8192&&P<=8303},"Letterlike Symbols":function(P){return P>=8448&&P<=8527},"Number Forms":function(P){return P>=8528&&P<=8591},"Miscellaneous Technical":function(P){return P>=8960&&P<=9215},"Control Pictures":function(P){return P>=9216&&P<=9279},"Optical Character Recognition":function(P){return P>=9280&&P<=9311},"Enclosed Alphanumerics":function(P){return P>=9312&&P<=9471},"Geometric Shapes":function(P){return P>=9632&&P<=9727},"Miscellaneous Symbols":function(P){return P>=9728&&P<=9983},"Miscellaneous Symbols and Arrows":function(P){return P>=11008&&P<=11263},"CJK Radicals Supplement":function(P){return P>=11904&&P<=12031},"Kangxi Radicals":function(P){return P>=12032&&P<=12255},"Ideographic Description Characters":function(P){return P>=12272&&P<=12287},"CJK Symbols and Punctuation":function(P){return P>=12288&&P<=12351},Hiragana:function(P){return P>=12352&&P<=12447},Katakana:function(P){return P>=12448&&P<=12543},Bopomofo:function(P){return P>=12544&&P<=12591},"Hangul Compatibility Jamo":function(P){return P>=12592&&P<=12687},Kanbun:function(P){return P>=12688&&P<=12703},"Bopomofo Extended":function(P){return P>=12704&&P<=12735},"CJK Strokes":function(P){return P>=12736&&P<=12783},"Katakana Phonetic Extensions":function(P){return P>=12784&&P<=12799},"Enclosed CJK Letters and Months":function(P){return P>=12800&&P<=13055},"CJK Compatibility":function(P){return P>=13056&&P<=13311},"CJK Unified Ideographs Extension A":function(P){return P>=13312&&P<=19903},"Yijing Hexagram Symbols":function(P){return P>=19904&&P<=19967},"CJK Unified Ideographs":function(P){return P>=19968&&P<=40959},"Yi Syllables":function(P){return P>=40960&&P<=42127},"Yi Radicals":function(P){return P>=42128&&P<=42191},"Hangul Jamo Extended-A":function(P){return P>=43360&&P<=43391},"Hangul Syllables":function(P){return P>=44032&&P<=55215},"Hangul Jamo Extended-B":function(P){return P>=55216&&P<=55295},"Private Use Area":function(P){return P>=57344&&P<=63743},"CJK Compatibility Ideographs":function(P){return P>=63744&&P<=64255},"Arabic Presentation Forms-A":function(P){return P>=64336&&P<=65023},"Vertical Forms":function(P){return P>=65040&&P<=65055},"CJK Compatibility Forms":function(P){return P>=65072&&P<=65103},"Small Form Variants":function(P){return P>=65104&&P<=65135},"Arabic Presentation Forms-B":function(P){return P>=65136&&P<=65279},"Halfwidth and Fullwidth Forms":function(P){return P>=65280&&P<=65519}};function nr(P){for(var R=0,W=P;R=65097&&P<=65103)||Ze["CJK Compatibility Ideographs"](P)||Ze["CJK Compatibility"](P)||Ze["CJK Radicals Supplement"](P)||Ze["CJK Strokes"](P)||Ze["CJK Symbols and Punctuation"](P)&&!(P>=12296&&P<=12305)&&!(P>=12308&&P<=12319)&&P!==12336||Ze["CJK Unified Ideographs Extension A"](P)||Ze["CJK Unified Ideographs"](P)||Ze["Enclosed CJK Letters and Months"](P)||Ze["Hangul Compatibility Jamo"](P)||Ze["Hangul Jamo Extended-A"](P)||Ze["Hangul Jamo Extended-B"](P)||Ze["Hangul Jamo"](P)||Ze["Hangul Syllables"](P)||Ze.Hiragana(P)||Ze["Ideographic Description Characters"](P)||Ze.Kanbun(P)||Ze["Kangxi Radicals"](P)||Ze["Katakana Phonetic Extensions"](P)||Ze.Katakana(P)&&P!==12540||Ze["Halfwidth and Fullwidth Forms"](P)&&P!==65288&&P!==65289&&P!==65293&&!(P>=65306&&P<=65310)&&P!==65339&&P!==65341&&P!==65343&&!(P>=65371&&P<=65503)&&P!==65507&&!(P>=65512&&P<=65519)||Ze["Small Form Variants"](P)&&!(P>=65112&&P<=65118)&&!(P>=65123&&P<=65126)||Ze["Unified Canadian Aboriginal Syllabics"](P)||Ze["Unified Canadian Aboriginal Syllabics Extended"](P)||Ze["Vertical Forms"](P)||Ze["Yijing Hexagram Symbols"](P)||Ze["Yi Syllables"](P)||Ze["Yi Radicals"](P))}function Rr(P){return!!(Ze["Latin-1 Supplement"](P)&&(P===167||P===169||P===174||P===177||P===188||P===189||P===190||P===215||P===247)||Ze["General Punctuation"](P)&&(P===8214||P===8224||P===8225||P===8240||P===8241||P===8251||P===8252||P===8258||P===8263||P===8264||P===8265||P===8273)||Ze["Letterlike Symbols"](P)||Ze["Number Forms"](P)||Ze["Miscellaneous Technical"](P)&&(P>=8960&&P<=8967||P>=8972&&P<=8991||P>=8996&&P<=9e3||P===9003||P>=9085&&P<=9114||P>=9150&&P<=9165||P===9167||P>=9169&&P<=9179||P>=9186&&P<=9215)||Ze["Control Pictures"](P)&&P!==9251||Ze["Optical Character Recognition"](P)||Ze["Enclosed Alphanumerics"](P)||Ze["Geometric Shapes"](P)||Ze["Miscellaneous Symbols"](P)&&!(P>=9754&&P<=9759)||Ze["Miscellaneous Symbols and Arrows"](P)&&(P>=11026&&P<=11055||P>=11088&&P<=11097||P>=11192&&P<=11243)||Ze["CJK Symbols and Punctuation"](P)||Ze.Katakana(P)||Ze["Private Use Area"](P)||Ze["CJK Compatibility Forms"](P)||Ze["Small Form Variants"](P)||Ze["Halfwidth and Fullwidth Forms"](P)||P===8734||P===8756||P===8757||P>=9984&&P<=10087||P>=10102&&P<=10131||P===65532||P===65533)}function Br(P){return!(on(P)||Rr(P))}function jr(P){return Ze.Arabic(P)||Ze["Arabic Supplement"](P)||Ze["Arabic Extended-A"](P)||Ze["Arabic Presentation Forms-A"](P)||Ze["Arabic Presentation Forms-B"](P)}function un(P){return P>=1424&&P<=2303||Ze["Arabic Presentation Forms-A"](P)||Ze["Arabic Presentation Forms-B"](P)}function vn(P,R){return!(!R&&un(P)||P>=2304&&P<=3583||P>=3840&&P<=4255||Ze.Khmer(P))}function qr(P){for(var R=0,W=P;R-1&&(Qn=qn.error),ui&&ui(P)};function Oi(){Mi.fire(new rr("pluginStateChange",{pluginStatus:Qn,pluginURL:ii}))}var Mi=new dr,Ii=function(){return Qn},ra=function(P){return P({pluginStatus:Qn,pluginURL:ii}),Mi.on("pluginStateChange",P),P},ka=function(P,R,W){if(W===void 0&&(W=!1),Qn===qn.deferred||Qn===qn.loading||Qn===qn.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");ii=st.resolveURL(P),Qn=qn.deferred,ui=R,Oi(),W||la()},la=function(){if(Qn!==qn.deferred||!ii)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Qn=qn.loading,Oi(),ii&&ke({url:ii},function(P){P?fi(P):(Qn=qn.loaded,Oi())})},Kn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Qn===qn.loaded||Kn.applyArabicShaping!=null},isLoading:function(){return Qn===qn.loading},setState:function(R){Qn=R.pluginStatus,ii=R.pluginURL},isParsed:function(){return Kn.applyArabicShaping!=null&&Kn.processBidirectionalText!=null&&Kn.processStyledBidirectionalText!=null},getPluginURL:function(){return ii}},Bi=function(){!Kn.isLoading()&&!Kn.isLoaded()&&Ii()==="deferred"&&la()},Ti=function(R,W){this.zoom=R,W?(this.now=W.now,this.fadeDuration=W.fadeDuration,this.zoomHistory=W.zoomHistory,this.transition=W.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ye,this.transition={})};Ti.prototype.isSupportedScript=function(R){return Hn(R,Kn.isLoaded())},Ti.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ti.prototype.getCrossfadeParameters=function(){var R=this.zoom,W=R-Math.floor(R),at=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:W+(1-W)*at}:{fromScale:.5,toScale:1,t:1-(1-at)*W}};var Zi=function(R,W){this.property=R,this.value=W,this.expression=Eu(W===void 0?R.specification.default:W,R.specification)};Zi.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Zi.prototype.possiblyEvaluate=function(R,W,at){return this.property.possiblyEvaluate(this,R,W,at)};var ba=function(R){this.property=R,this.value=new Zi(R,void 0)};ba.prototype.transitioned=function(R,W){return new Ka(this.property,this.value,W,w({},R.transition,this.transition),R.now)},ba.prototype.untransitioned=function(){return new Ka(this.property,this.value,null,{},0)};var na=function(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)};na.prototype.getValue=function(R){return N(this._values[R].value.value)},na.prototype.setValue=function(R,W){this._values.hasOwnProperty(R)||(this._values[R]=new ba(this._values[R].property)),this._values[R].value=new Zi(this._values[R].property,W===null?void 0:N(W))},na.prototype.getTransition=function(R){return N(this._values[R].transition)},na.prototype.setTransition=function(R,W){this._values.hasOwnProperty(R)||(this._values[R]=new ba(this._values[R].property)),this._values[R].transition=N(W)||void 0},na.prototype.serialize=function(){for(var R={},W=0,at=Object.keys(this._values);Wthis.end)return this.prior=null,St;if(this.value.isDataDriven())return this.prior=null,St;if(vtPt.zoomHistory.lastIntegerZoom?{from:at,to:vt}:{from:St,to:vt}},R.prototype.interpolate=function(at){return at},R}(Ei),Lo=function(R){this.specification=R};Lo.prototype.possiblyEvaluate=function(R,W,at,vt){if(R.value!==void 0)if(R.expression.kind==="constant"){var St=R.expression.evaluate(W,null,{},at,vt);return this._calculate(St,St,St,W)}else return this._calculate(R.expression.evaluate(new Ti(Math.floor(W.zoom-1),W)),R.expression.evaluate(new Ti(Math.floor(W.zoom),W)),R.expression.evaluate(new Ti(Math.floor(W.zoom+1),W)),W)},Lo.prototype._calculate=function(R,W,at,vt){var St=vt.zoom;return St>vt.zoomHistory.lastIntegerZoom?{from:R,to:W}:{from:at,to:W}},Lo.prototype.interpolate=function(R){return R};var eo=function(R){this.specification=R};eo.prototype.possiblyEvaluate=function(R,W,at,vt){return!!R.expression.evaluate(W,null,{},at,vt)},eo.prototype.interpolate=function(){return!1};var ca=function(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var W in R){var at=R[W];at.specification.overridable&&this.overridableProperties.push(W);var vt=this.defaultPropertyValues[W]=new Zi(at,void 0),St=this.defaultTransitionablePropertyValues[W]=new ba(at);this.defaultTransitioningPropertyValues[W]=St.untransitioned(),this.defaultPossiblyEvaluatedValues[W]=vt.possiblyEvaluate({})}};Bt("DataDrivenProperty",Ei),Bt("DataConstantProperty",oi),Bt("CrossFadedDataDrivenProperty",Ao),Bt("CrossFadedProperty",Lo),Bt("ColorRampProperty",eo);var Va="-transition",Oa=function(P){function R(W,at){if(P.call(this),this.id=W.id,this.type=W.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},W.type!=="custom"&&(W=W,this.metadata=W.metadata,this.minzoom=W.minzoom,this.maxzoom=W.maxzoom,W.type!=="background"&&(this.source=W.source,this.sourceLayer=W["source-layer"],this.filter=W.filter),at.layout&&(this._unevaluatedLayout=new to(at.layout)),at.paint)){this._transitionablePaint=new na(at.paint);for(var vt in W.paint)this.setPaintProperty(vt,W.paint[vt],{validate:!1});for(var St in W.layout)this.setLayoutProperty(St,W.layout[St],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new uo(at.paint)}}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},R.prototype.getLayoutProperty=function(at){return at==="visibility"?this.visibility:this._unevaluatedLayout.getValue(at)},R.prototype.setLayoutProperty=function(at,vt,St){if(St===void 0&&(St={}),vt!=null){var Pt="layers."+this.id+".layout."+at;if(this._validate(Pi,Pt,at,vt,St))return}if(at==="visibility"){this.visibility=vt;return}this._unevaluatedLayout.setValue(at,vt)},R.prototype.getPaintProperty=function(at){return M(at,Va)?this._transitionablePaint.getTransition(at.slice(0,-Va.length)):this._transitionablePaint.getValue(at)},R.prototype.setPaintProperty=function(at,vt,St){if(St===void 0&&(St={}),vt!=null){var Pt="layers."+this.id+".paint."+at;if(this._validate(Li,Pt,at,vt,St))return!1}if(M(at,Va))return this._transitionablePaint.setTransition(at.slice(0,-Va.length),vt||void 0),!1;var te=this._transitionablePaint._values[at],ye=te.property.specification["property-type"]==="cross-faded-data-driven",_e=te.value.isDataDriven(),Fe=te.value;this._transitionablePaint.setValue(at,vt),this._handleSpecialPaintPropertyUpdate(at);var je=this._transitionablePaint._values[at].value,ar=je.isDataDriven();return ar||_e||ye||this._handleOverridablePaintPropertyUpdate(at,Fe,je)},R.prototype._handleSpecialPaintPropertyUpdate=function(at){},R.prototype._handleOverridablePaintPropertyUpdate=function(at,vt,St){return!1},R.prototype.isHidden=function(at){return this.minzoom&&at=this.maxzoom?!0:this.visibility==="none"},R.prototype.updateTransitions=function(at){this._transitioningPaint=this._transitionablePaint.transitioned(at,this._transitioningPaint)},R.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},R.prototype.recalculate=function(at,vt){at.getCrossfadeParameters&&(this._crossfadeParameters=at.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(at,void 0,vt)),this.paint=this._transitioningPaint.possiblyEvaluate(at,void 0,vt)},R.prototype.serialize=function(){var at={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(at.layout=at.layout||{},at.layout.visibility=this.visibility),D(at,function(vt,St){return vt!==void 0&&!(St==="layout"&&!Object.keys(vt).length)&&!(St==="paint"&&!Object.keys(vt).length)})},R.prototype._validate=function(at,vt,St,Pt,te){return te===void 0&&(te={}),te&&te.validate===!1?!1:Ri(this,at.call(Dn,{key:vt,layerType:this.type,objectKey:St,value:Pt,styleSpec:Ar,style:{glyphs:!0,sprite:!0}}))},R.prototype.is3D=function(){return!1},R.prototype.isTileClipped=function(){return!1},R.prototype.hasOffscreenPass=function(){return!1},R.prototype.resize=function(){},R.prototype.isStateDependent=function(){for(var at in this.paint._values){var vt=this.paint.get(at);if(!(!(vt instanceof wa)||!ys(vt.property.specification))&&(vt.value.kind==="source"||vt.value.kind==="composite")&&vt.value.isStateDependent)return!0}return!1},R}(dr),is={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bs=function(R,W){this._structArray=R,this._pos1=W*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ea=128,_l=5,ji=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};ji.serialize=function(R,W){return R._trim(),W&&(R.isTransferred=!0,W.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}},ji.deserialize=function(R){var W=Object.create(this.prototype);return W.arrayBuffer=R.arrayBuffer,W.length=R.length,W.capacity=R.arrayBuffer.byteLength/W.bytesPerElement,W._refreshViews(),W},ji.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ji.prototype.clear=function(){this.length=0},ji.prototype.resize=function(R){this.reserve(R),this.length=R},ji.prototype.reserve=function(R){if(R>this.capacity){this.capacity=Math.max(R,Math.floor(this.capacity*_l),Ea),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var W=this.uint8;this._refreshViews(),W&&this.uint8.set(W)}},ji.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function _a(P,R){R===void 0&&(R=1);var W=0,at=0,vt=P.map(function(Pt){var te=zc(Pt.type),ye=W=td(W,Math.max(R,te)),_e=Pt.components||1;return at=Math.max(at,te),W+=te*_e,{name:Pt.name,type:Pt.type,components:_e,offset:ye}}),St=td(W,Math.max(at,R));return{members:vt,size:St,alignment:R}}function zc(P){return is[P].BYTES_PER_ELEMENT}function td(P,R){return Math.ceil(P/R)*R}var nf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt){var St=this.length;return this.resize(St+1),this.emplace(St,at,vt)},R.prototype.emplace=function(at,vt,St){var Pt=at*2;return this.int16[Pt+0]=vt,this.int16[Pt+1]=St,at},R}(ji);nf.prototype.bytesPerElement=4,Bt("StructArrayLayout2i4",nf);var dv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt){var te=this.length;return this.resize(te+1),this.emplace(te,at,vt,St,Pt)},R.prototype.emplace=function(at,vt,St,Pt,te){var ye=at*4;return this.int16[ye+0]=vt,this.int16[ye+1]=St,this.int16[ye+2]=Pt,this.int16[ye+3]=te,at},R}(ji);dv.prototype.bytesPerElement=8,Bt("StructArrayLayout4i8",dv);var Lu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye){var _e=this.length;return this.resize(_e+1),this.emplace(_e,at,vt,St,Pt,te,ye)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e){var Fe=at*6;return this.int16[Fe+0]=vt,this.int16[Fe+1]=St,this.int16[Fe+2]=Pt,this.int16[Fe+3]=te,this.int16[Fe+4]=ye,this.int16[Fe+5]=_e,at},R}(ji);Lu.prototype.bytesPerElement=12,Bt("StructArrayLayout2i4i12",Lu);var Gf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye){var _e=this.length;return this.resize(_e+1),this.emplace(_e,at,vt,St,Pt,te,ye)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e){var Fe=at*4,je=at*8;return this.int16[Fe+0]=vt,this.int16[Fe+1]=St,this.uint8[je+4]=Pt,this.uint8[je+5]=te,this.uint8[je+6]=ye,this.uint8[je+7]=_e,at},R}(ji);Gf.prototype.bytesPerElement=8,Bt("StructArrayLayout2i4ub8",Gf);var Wf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt){var St=this.length;return this.resize(St+1),this.emplace(St,at,vt)},R.prototype.emplace=function(at,vt,St){var Pt=at*2;return this.float32[Pt+0]=vt,this.float32[Pt+1]=St,at},R}(ji);Wf.prototype.bytesPerElement=8,Bt("StructArrayLayout2f8",Wf);var Zo=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar){var tr=this.length;return this.resize(tr+1),this.emplace(tr,at,vt,St,Pt,te,ye,_e,Fe,je,ar)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr){var yr=at*10;return this.uint16[yr+0]=vt,this.uint16[yr+1]=St,this.uint16[yr+2]=Pt,this.uint16[yr+3]=te,this.uint16[yr+4]=ye,this.uint16[yr+5]=_e,this.uint16[yr+6]=Fe,this.uint16[yr+7]=je,this.uint16[yr+8]=ar,this.uint16[yr+9]=tr,at},R}(ji);Zo.prototype.bytesPerElement=20,Bt("StructArrayLayout10ui20",Zo);var Pu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr){var zr=this.length;return this.resize(zr+1),this.emplace(zr,at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr){var ln=at*12;return this.int16[ln+0]=vt,this.int16[ln+1]=St,this.int16[ln+2]=Pt,this.int16[ln+3]=te,this.uint16[ln+4]=ye,this.uint16[ln+5]=_e,this.uint16[ln+6]=Fe,this.uint16[ln+7]=je,this.int16[ln+8]=ar,this.int16[ln+9]=tr,this.int16[ln+10]=yr,this.int16[ln+11]=zr,at},R}(ji);Pu.prototype.bytesPerElement=24,Bt("StructArrayLayout4i4ui4i24",Pu);var pv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*3;return this.float32[te+0]=vt,this.float32[te+1]=St,this.float32[te+2]=Pt,at},R}(ji);pv.prototype.bytesPerElement=12,Bt("StructArrayLayout3f12",pv);var gv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at){var vt=this.length;return this.resize(vt+1),this.emplace(vt,at)},R.prototype.emplace=function(at,vt){var St=at*1;return this.uint32[St+0]=vt,at},R}(ji);gv.prototype.bytesPerElement=4,Bt("StructArrayLayout1ul4",gv);var kc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je){var ar=this.length;return this.resize(ar+1),this.emplace(ar,at,vt,St,Pt,te,ye,_e,Fe,je)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar){var tr=at*10,yr=at*5;return this.int16[tr+0]=vt,this.int16[tr+1]=St,this.int16[tr+2]=Pt,this.int16[tr+3]=te,this.int16[tr+4]=ye,this.int16[tr+5]=_e,this.uint32[yr+3]=Fe,this.uint16[tr+8]=je,this.uint16[tr+9]=ar,at},R}(ji);kc.prototype.bytesPerElement=20,Bt("StructArrayLayout6i1ul2ui20",kc);var ah=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye){var _e=this.length;return this.resize(_e+1),this.emplace(_e,at,vt,St,Pt,te,ye)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e){var Fe=at*6;return this.int16[Fe+0]=vt,this.int16[Fe+1]=St,this.int16[Fe+2]=Pt,this.int16[Fe+3]=te,this.int16[Fe+4]=ye,this.int16[Fe+5]=_e,at},R}(ji);ah.prototype.bytesPerElement=12,Bt("StructArrayLayout2i2i2i12",ah);var tu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te){var ye=this.length;return this.resize(ye+1),this.emplace(ye,at,vt,St,Pt,te)},R.prototype.emplace=function(at,vt,St,Pt,te,ye){var _e=at*4,Fe=at*8;return this.float32[_e+0]=vt,this.float32[_e+1]=St,this.float32[_e+2]=Pt,this.int16[Fe+6]=te,this.int16[Fe+7]=ye,at},R}(ji);tu.prototype.bytesPerElement=16,Bt("StructArrayLayout2f1f2i16",tu);var as=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt){var te=this.length;return this.resize(te+1),this.emplace(te,at,vt,St,Pt)},R.prototype.emplace=function(at,vt,St,Pt,te){var ye=at*12,_e=at*3;return this.uint8[ye+0]=vt,this.uint8[ye+1]=St,this.float32[_e+1]=Pt,this.float32[_e+2]=te,at},R}(ji);as.prototype.bytesPerElement=12,Bt("StructArrayLayout2ub2f12",as);var eu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*3;return this.uint16[te+0]=vt,this.uint16[te+1]=St,this.uint16[te+2]=Pt,at},R}(ji);eu.prototype.bytesPerElement=6,Bt("StructArrayLayout3ui6",eu);var Oc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn){var Mn=this.length;return this.resize(Mn+1),this.emplace(Mn,at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn){var zn=at*24,Wn=at*12,ei=at*48;return this.int16[zn+0]=vt,this.int16[zn+1]=St,this.uint16[zn+2]=Pt,this.uint16[zn+3]=te,this.uint32[Wn+2]=ye,this.uint32[Wn+3]=_e,this.uint32[Wn+4]=Fe,this.uint16[zn+10]=je,this.uint16[zn+11]=ar,this.uint16[zn+12]=tr,this.float32[Wn+7]=yr,this.float32[Wn+8]=zr,this.uint8[ei+36]=ln,this.uint8[ei+37]=tn,this.uint8[ei+38]=Sn,this.uint32[Wn+10]=mn,this.int16[zn+22]=Mn,at},R}(ji);Oc.prototype.bytesPerElement=48,Bt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Oc);var oh=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn,zn,Wn,ei,$n,bi,vi,xi,Ni,wi,Si){var Vi=this.length;return this.resize(Vi+1),this.emplace(Vi,at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn,zn,Wn,ei,$n,bi,vi,xi,Ni,wi,Si)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn,zn,Wn,ei,$n,bi,vi,xi,Ni,wi,Si,Vi){var ki=at*34,aa=at*17;return this.int16[ki+0]=vt,this.int16[ki+1]=St,this.int16[ki+2]=Pt,this.int16[ki+3]=te,this.int16[ki+4]=ye,this.int16[ki+5]=_e,this.int16[ki+6]=Fe,this.int16[ki+7]=je,this.uint16[ki+8]=ar,this.uint16[ki+9]=tr,this.uint16[ki+10]=yr,this.uint16[ki+11]=zr,this.uint16[ki+12]=ln,this.uint16[ki+13]=tn,this.uint16[ki+14]=Sn,this.uint16[ki+15]=mn,this.uint16[ki+16]=Mn,this.uint16[ki+17]=zn,this.uint16[ki+18]=Wn,this.uint16[ki+19]=ei,this.uint16[ki+20]=$n,this.uint16[ki+21]=bi,this.uint16[ki+22]=vi,this.uint32[aa+12]=xi,this.float32[aa+13]=Ni,this.float32[aa+14]=wi,this.float32[aa+15]=Si,this.float32[aa+16]=Vi,at},R}(ji);oh.prototype.bytesPerElement=68,Bt("StructArrayLayout8i15ui1ul4f68",oh);var Yf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at){var vt=this.length;return this.resize(vt+1),this.emplace(vt,at)},R.prototype.emplace=function(at,vt){var St=at*1;return this.float32[St+0]=vt,at},R}(ji);Yf.prototype.bytesPerElement=4,Bt("StructArrayLayout1f4",Yf);var mv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*3;return this.int16[te+0]=vt,this.int16[te+1]=St,this.int16[te+2]=Pt,at},R}(ji);mv.prototype.bytesPerElement=6,Bt("StructArrayLayout3i6",mv);var Ru=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*2,ye=at*4;return this.uint32[te+0]=vt,this.uint16[ye+2]=St,this.uint16[ye+3]=Pt,at},R}(ji);Ru.prototype.bytesPerElement=8,Bt("StructArrayLayout1ul2ui8",Ru);var Nc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt){var St=this.length;return this.resize(St+1),this.emplace(St,at,vt)},R.prototype.emplace=function(at,vt,St){var Pt=at*2;return this.uint16[Pt+0]=vt,this.uint16[Pt+1]=St,at},R}(ji);Nc.prototype.bytesPerElement=4,Bt("StructArrayLayout2ui4",Nc);var Xf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at){var vt=this.length;return this.resize(vt+1),this.emplace(vt,at)},R.prototype.emplace=function(at,vt){var St=at*1;return this.uint16[St+0]=vt,at},R}(ji);Xf.prototype.bytesPerElement=2,Bt("StructArrayLayout1ui2",Xf);var af=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt){var te=this.length;return this.resize(te+1),this.emplace(te,at,vt,St,Pt)},R.prototype.emplace=function(at,vt,St,Pt,te){var ye=at*4;return this.float32[ye+0]=vt,this.float32[ye+1]=St,this.float32[ye+2]=Pt,this.float32[ye+3]=te,at},R}(ji);af.prototype.bytesPerElement=16,Bt("StructArrayLayout4f16",af);var ed=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return W.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},W.x1.get=function(){return this._structArray.int16[this._pos2+2]},W.y1.get=function(){return this._structArray.int16[this._pos2+3]},W.x2.get=function(){return this._structArray.int16[this._pos2+4]},W.y2.get=function(){return this._structArray.int16[this._pos2+5]},W.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},W.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},W.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},W.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(R.prototype,W),R}(bs);ed.prototype.size=20;var yv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new ed(this,at)},R}(kc);Bt("CollisionBoxArray",yv);var of=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return W.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},W.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},W.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},W.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},W.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},W.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},W.segment.get=function(){return this._structArray.uint16[this._pos2+10]},W.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},W.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},W.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},W.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},W.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},W.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},W.placedOrientation.set=function(at){this._structArray.uint8[this._pos1+37]=at},W.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},W.hidden.set=function(at){this._structArray.uint8[this._pos1+38]=at},W.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},W.crossTileID.set=function(at){this._structArray.uint32[this._pos4+10]=at},W.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(R.prototype,W),R}(bs);of.prototype.size=48;var xv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new of(this,at)},R}(Oc);Bt("PlacedSymbolArray",xv);var Zf=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return W.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},W.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},W.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},W.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},W.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},W.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},W.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},W.key.get=function(){return this._structArray.uint16[this._pos2+8]},W.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},W.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},W.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},W.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},W.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},W.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},W.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},W.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},W.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},W.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},W.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},W.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},W.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},W.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},W.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},W.crossTileID.set=function(at){this._structArray.uint32[this._pos4+12]=at},W.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},W.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},W.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},W.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(R.prototype,W),R}(bs);Zf.prototype.size=68;var rd=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new Zf(this,at)},R}(oh);Bt("SymbolInstanceArray",rd);var nd=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getoffsetX=function(at){return this.float32[at*1+0]},R}(Yf);Bt("GlyphOffsetArray",nd);var tl=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getx=function(at){return this.int16[at*3+0]},R.prototype.gety=function(at){return this.int16[at*3+1]},R.prototype.gettileUnitDistanceFromAnchor=function(at){return this.int16[at*3+2]},R}(mv);Bt("SymbolLineVertexArray",tl);var id=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return W.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},W.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},W.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(R.prototype,W),R}(bs);id.prototype.size=8;var ad=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new id(this,at)},R}(Ru);Bt("FeatureIndexArray",ad);var wp=_a([{name:"a_pos",components:2,type:"Int16"}],4),od=wp.members,ro=function(R){R===void 0&&(R=[]),this.segments=R};ro.prototype.prepareSegment=function(R,W,at,vt){var St=this.segments[this.segments.length-1];return R>ro.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+ro.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+R),(!St||St.vertexLength+R>ro.MAX_VERTEX_ARRAY_LENGTH||St.sortKey!==vt)&&(St={vertexOffset:W.length,primitiveOffset:at.length,vertexLength:0,primitiveLength:0},vt!==void 0&&(St.sortKey=vt),this.segments.push(St)),St},ro.prototype.get=function(){return this.segments},ro.prototype.destroy=function(){for(var R=0,W=this.segments;R>>16)*ye&65535)<<16)&4294967295,Fe=Fe<<15|Fe>>>17,Fe=(Fe&65535)*_e+(((Fe>>>16)*_e&65535)<<16)&4294967295,Pt^=Fe,Pt=Pt<<13|Pt>>>19,te=(Pt&65535)*5+(((Pt>>>16)*5&65535)<<16)&4294967295,Pt=(te&65535)+27492+(((te>>>16)+58964&65535)<<16);switch(Fe=0,vt){case 3:Fe^=(W.charCodeAt(je+2)&255)<<16;case 2:Fe^=(W.charCodeAt(je+1)&255)<<8;case 1:Fe^=W.charCodeAt(je)&255,Fe=(Fe&65535)*ye+(((Fe>>>16)*ye&65535)<<16)&4294967295,Fe=Fe<<15|Fe>>>17,Fe=(Fe&65535)*_e+(((Fe>>>16)*_e&65535)<<16)&4294967295,Pt^=Fe}return Pt^=W.length,Pt^=Pt>>>16,Pt=(Pt&65535)*2246822507+(((Pt>>>16)*2246822507&65535)<<16)&4294967295,Pt^=Pt>>>13,Pt=(Pt&65535)*3266489909+(((Pt>>>16)*3266489909&65535)<<16)&4294967295,Pt^=Pt>>>16,Pt>>>0}P.exports=R}),rt=S(function(P){function R(W,at){for(var vt=W.length,St=at^vt,Pt=0,te;vt>=4;)te=W.charCodeAt(Pt)&255|(W.charCodeAt(++Pt)&255)<<8|(W.charCodeAt(++Pt)&255)<<16|(W.charCodeAt(++Pt)&255)<<24,te=(te&65535)*1540483477+(((te>>>16)*1540483477&65535)<<16),te^=te>>>24,te=(te&65535)*1540483477+(((te>>>16)*1540483477&65535)<<16),St=(St&65535)*1540483477+(((St>>>16)*1540483477&65535)<<16)^te,vt-=4,++Pt;switch(vt){case 3:St^=(W.charCodeAt(Pt+2)&255)<<16;case 2:St^=(W.charCodeAt(Pt+1)&255)<<8;case 1:St^=W.charCodeAt(Pt)&255,St=(St&65535)*1540483477+(((St>>>16)*1540483477&65535)<<16)}return St^=St>>>13,St=(St&65535)*1540483477+(((St>>>16)*1540483477&65535)<<16),St^=St>>>15,St>>>0}P.exports=R}),pt=dt,Ot=dt,Qt=rt;pt.murmur3=Ot,pt.murmur2=Qt;var ue=function(){this.ids=[],this.positions=[],this.indexed=!1};ue.prototype.add=function(R,W,at,vt){this.ids.push(We(R)),this.positions.push(W,at,vt)},ue.prototype.getPositions=function(R){for(var W=We(R),at=0,vt=this.ids.length-1;at>1;this.ids[St]>=W?vt=St:at=St+1}for(var Pt=[];this.ids[at]===W;){var te=this.positions[3*at],ye=this.positions[3*at+1],_e=this.positions[3*at+2];Pt.push({index:te,start:ye,end:_e}),at++}return Pt},ue.serialize=function(R,W){var at=new Float64Array(R.ids),vt=new Uint32Array(R.positions);return qe(at,vt,0,at.length-1),W&&W.push(at.buffer,vt.buffer),{ids:at,positions:vt}},ue.deserialize=function(R){var W=new ue;return W.ids=R.ids,W.positions=R.positions,W.indexed=!0,W};var Re=Math.pow(2,53)-1;function We(P){var R=+P;return!isNaN(R)&&R<=Re?R:pt(String(P))}function qe(P,R,W,at){for(;W>1],St=W-1,Pt=at+1;;){do St++;while(P[St]vt);if(St>=Pt)break;cr(P,St,Pt),cr(R,3*St,3*Pt),cr(R,3*St+1,3*Pt+1),cr(R,3*St+2,3*Pt+2)}Pt-WPt.x+1||yePt.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return W}function Ta(P,R){return{type:P.type,id:P.id,properties:P.properties,geometry:R?qi(P):[]}}function Ki(P,R,W,at,vt){P.emplaceBack(R*2+(at+1)/2,W*2+(vt+1)/2)}var ma=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(W){return W.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new nf,this.indexArray=new eu,this.segments=new ro,this.programConfigurations=new hi(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(function(W){return W.isStateDependent()}).map(function(W){return W.id})};ma.prototype.populate=function(R,W,at){var vt=this.layers[0],St=[],Pt=null;vt.type==="circle"&&(Pt=vt.layout.get("circle-sort-key"));for(var te=0,ye=R;te=Ai||ar<0||ar>=Ai)){var tr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),yr=tr.vertexLength;Ki(this.layoutVertexArray,je,ar,-1,-1),Ki(this.layoutVertexArray,je,ar,1,-1),Ki(this.layoutVertexArray,je,ar,1,1),Ki(this.layoutVertexArray,je,ar,-1,1),this.indexArray.emplaceBack(yr,yr+1,yr+2),this.indexArray.emplaceBack(yr,yr+3,yr+2),tr.vertexLength+=4,tr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,at,{},vt)},Bt("CircleBucket",ma,{omit:["layers"]});function Hi(P,R){for(var W=0;W=3){for(var St=0;St1){if(Bs(P,R))return!0;for(var at=0;at1?P.distSqr(W):P.distSqr(W.sub(R)._mult(vt)._add(R))}function Ll(P,R){for(var W=!1,at,vt,St,Pt=0;PtR.y!=St.y>R.y&&R.x<(St.x-vt.x)*(R.y-vt.y)/(St.y-vt.y)+vt.x&&(W=!W)}return W}function jo(P,R){for(var W=!1,at=0,vt=P.length-1;atR.y!=Pt.y>R.y&&R.x<(Pt.x-St.x)*(R.y-St.y)/(Pt.y-St.y)+St.x&&(W=!W)}return W}function Pl(P,R,W,at,vt){for(var St=0,Pt=P;St=te.x&&vt>=te.y)return!0}var ye=[new r(R,W),new r(R,vt),new r(at,vt),new r(at,W)];if(P.length>2)for(var _e=0,Fe=ye;_evt.x&&R.x>vt.x||P.yvt.y&&R.y>vt.y)return!1;var St=O(P,R,W[0]);return St!==O(P,R,W[1])||St!==O(P,R,W[2])||St!==O(P,R,W[3])}function Ko(P,R,W){var at=R.paint.get(P).value;return at.kind==="constant"?at.value:W.programConfigurations.get(R.id).getMaxValue(P)}function rl(P){return Math.sqrt(P[0]*P[0]+P[1]*P[1])}function ru(P,R,W,at,vt){if(!R[0]&&!R[1])return P;var St=r.convert(R)._mult(vt);W==="viewport"&&St._rotate(-at);for(var Pt=[],te=0;te0&&(St=1/Math.sqrt(St)),P[0]=R[0]*St,P[1]=R[1]*St,P[2]=R[2]*St,P}function D1(P,R){return P[0]*R[0]+P[1]*R[1]+P[2]*R[2]}function I1(P,R,W){var at=R[0],vt=R[1],St=R[2],Pt=W[0],te=W[1],ye=W[2];return P[0]=vt*ye-St*te,P[1]=St*Pt-at*ye,P[2]=at*te-vt*Pt,P}function F1(P,R,W){var at=R[0],vt=R[1],St=R[2];return P[0]=at*W[0]+vt*W[3]+St*W[6],P[1]=at*W[1]+vt*W[4]+St*W[7],P[2]=at*W[2]+vt*W[5]+St*W[8],P}var z1=Sp;(function(){var P=Uc();return function(R,W,at,vt,St,Pt){var te,ye;for(W||(W=3),at||(at=0),vt?ye=Math.min(vt*W+at,R.length):ye=R.length,te=at;teP.width||vt.height>P.height||W.x>P.width-vt.width||W.y>P.height-vt.height)throw new RangeError("out of range source coordinates for image copy");if(vt.width>R.width||vt.height>R.height||at.x>R.width-vt.width||at.y>R.height-vt.height)throw new RangeError("out of range destination coordinates for image copy");for(var Pt=P.data,te=R.data,ye=0;ye80*W){te=_e=P[0],ye=Fe=P[1];for(var yr=W;yr_e&&(_e=je),ar>Fe&&(Fe=ar);tr=Math.max(_e-te,Fe-ye),tr=tr!==0?1/tr:0}return Tv(St,Pt,W,te,ye,tr),Pt}function q0(P,R,W,at,vt){var St,Pt;if(vt===Dp(P,R,W,at)>0)for(St=R;St=R;St-=at)Pt=rg(St,P[St],P[St+1],Pt);return Pt&&ud(Pt,Pt.next)&&(Mv(Pt),Pt=Pt.next),Pt}function $f(P,R){if(!P)return P;R||(R=P);var W=P,at;do if(at=!1,!W.steiner&&(ud(W,W.next)||no(W.prev,W,W.next)===0)){if(Mv(W),W=R=W.prev,W===W.next)break;at=!0}else W=W.next;while(at||W!==R);return R}function Tv(P,R,W,at,vt,St,Pt){if(P){!Pt&&St&&lx(P,at,vt,St);for(var te=P,ye,_e;P.prev!==P.next;){if(ye=P.prev,_e=P.next,St?tx(P,at,vt,St):q1(P)){R.push(ye.i/W),R.push(P.i/W),R.push(_e.i/W),Mv(P),P=_e.next,te=_e.next;continue}if(P=_e,P===te){Pt?Pt===1?(P=ex($f(P),R,W),Tv(P,R,W,at,vt,St,2)):Pt===2&&rx(P,R,W,at,vt,St):Tv($f(P),R,W,at,vt,St,1);break}}}}function q1(P){var R=P.prev,W=P,at=P.next;if(no(R,W,at)>=0)return!1;for(var vt=P.next.next;vt!==P.prev;){if(dh(R.x,R.y,W.x,W.y,at.x,at.y,vt.x,vt.y)&&no(vt.prev,vt,vt.next)>=0)return!1;vt=vt.next}return!0}function tx(P,R,W,at){var vt=P.prev,St=P,Pt=P.next;if(no(vt,St,Pt)>=0)return!1;for(var te=vt.xSt.x?vt.x>Pt.x?vt.x:Pt.x:St.x>Pt.x?St.x:Pt.x,Fe=vt.y>St.y?vt.y>Pt.y?vt.y:Pt.y:St.y>Pt.y?St.y:Pt.y,je=Pp(te,ye,R,W,at),ar=Pp(_e,Fe,R,W,at),tr=P.prevZ,yr=P.nextZ;tr&&tr.z>=je&&yr&&yr.z<=ar;){if(tr!==P.prev&&tr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,tr.x,tr.y)&&no(tr.prev,tr,tr.next)>=0||(tr=tr.prevZ,yr!==P.prev&&yr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,yr.x,yr.y)&&no(yr.prev,yr,yr.next)>=0))return!1;yr=yr.nextZ}for(;tr&&tr.z>=je;){if(tr!==P.prev&&tr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,tr.x,tr.y)&&no(tr.prev,tr,tr.next)>=0)return!1;tr=tr.prevZ}for(;yr&&yr.z<=ar;){if(yr!==P.prev&&yr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,yr.x,yr.y)&&no(yr.prev,yr,yr.next)>=0)return!1;yr=yr.nextZ}return!0}function ex(P,R,W){var at=P;do{var vt=at.prev,St=at.next.next;!ud(vt,St)&&tg(vt,at,at.next,St)&&Av(vt,St)&&Av(St,vt)&&(R.push(vt.i/W),R.push(at.i/W),R.push(St.i/W),Mv(at),Mv(at.next),at=P=St),at=at.next}while(at!==P);return $f(at)}function rx(P,R,W,at,vt,St){var Pt=P;do{for(var te=Pt.next.next;te!==Pt.prev;){if(Pt.i!==te.i&&cx(Pt,te)){var ye=eg(Pt,te);Pt=$f(Pt,Pt.next),ye=$f(ye,ye.next),Tv(Pt,R,W,at,vt,St),Tv(ye,R,W,at,vt,St);return}te=te.next}Pt=Pt.next}while(Pt!==P)}function nx(P,R,W,at){var vt=[],St,Pt,te,ye,_e;for(St=0,Pt=R.length;St=W.next.y&&W.next.y!==W.y){var te=W.x+(vt-W.y)*(W.next.x-W.x)/(W.next.y-W.y);if(te<=at&&te>St){if(St=te,te===at){if(vt===W.y)return W;if(vt===W.next.y)return W.next}Pt=W.x=W.x&&W.x>=_e&&at!==W.x&&dh(vtPt.x||W.x===Pt.x&&sx(Pt,W)))&&(Pt=W,je=ar)),W=W.next;while(W!==ye);return Pt}function sx(P,R){return no(P.prev,P,R.prev)<0&&no(R.next,P,P.next)<0}function lx(P,R,W,at){var vt=P;do vt.z===null&&(vt.z=Pp(vt.x,vt.y,R,W,at)),vt.prevZ=vt.prev,vt.nextZ=vt.next,vt=vt.next;while(vt!==P);vt.prevZ.nextZ=null,vt.prevZ=null,ux(vt)}function ux(P){var R,W,at,vt,St,Pt,te,ye,_e=1;do{for(W=P,P=null,St=null,Pt=0;W;){for(Pt++,at=W,te=0,R=0;R<_e&&(te++,at=at.nextZ,!!at);R++);for(ye=_e;te>0||ye>0&&at;)te!==0&&(ye===0||!at||W.z<=at.z)?(vt=W,W=W.nextZ,te--):(vt=at,at=at.nextZ,ye--),St?St.nextZ=vt:P=vt,vt.prevZ=St,St=vt;W=at}St.nextZ=null,_e*=2}while(Pt>1);return P}function Pp(P,R,W,at,vt){return P=32767*(P-W)*vt,R=32767*(R-at)*vt,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,P|R<<1}function fx(P){var R=P,W=P;do(R.x=0&&(P-Pt)*(at-te)-(W-Pt)*(R-te)>=0&&(W-Pt)*(St-te)-(vt-Pt)*(at-te)>=0}function cx(P,R){return P.next.i!==R.i&&P.prev.i!==R.i&&!hx(P,R)&&(Av(P,R)&&Av(R,P)&&vx(P,R)&&(no(P.prev,P,R.prev)||no(P,R.prev,R))||ud(P,R)&&no(P.prev,P,P.next)>0&&no(R.prev,R,R.next)>0)}function no(P,R,W){return(R.y-P.y)*(W.x-R.x)-(R.x-P.x)*(W.y-R.y)}function ud(P,R){return P.x===R.x&&P.y===R.y}function tg(P,R,W,at){var vt=cd(no(P,R,W)),St=cd(no(P,R,at)),Pt=cd(no(W,at,P)),te=cd(no(W,at,R));return!!(vt!==St&&Pt!==te||vt===0&&fd(P,W,R)||St===0&&fd(P,at,R)||Pt===0&&fd(W,P,at)||te===0&&fd(W,R,at))}function fd(P,R,W){return R.x<=Math.max(P.x,W.x)&&R.x>=Math.min(P.x,W.x)&&R.y<=Math.max(P.y,W.y)&&R.y>=Math.min(P.y,W.y)}function cd(P){return P>0?1:P<0?-1:0}function hx(P,R){var W=P;do{if(W.i!==P.i&&W.next.i!==P.i&&W.i!==R.i&&W.next.i!==R.i&&tg(W,W.next,P,R))return!0;W=W.next}while(W!==P);return!1}function Av(P,R){return no(P.prev,P,P.next)<0?no(P,R,P.next)>=0&&no(P,P.prev,R)>=0:no(P,R,P.prev)<0||no(P,P.next,R)<0}function vx(P,R){var W=P,at=!1,vt=(P.x+R.x)/2,St=(P.y+R.y)/2;do W.y>St!=W.next.y>St&&W.next.y!==W.y&&vt<(W.next.x-W.x)*(St-W.y)/(W.next.y-W.y)+W.x&&(at=!at),W=W.next;while(W!==P);return at}function eg(P,R){var W=new Rp(P.i,P.x,P.y),at=new Rp(R.i,R.x,R.y),vt=P.next,St=R.prev;return P.next=R,R.prev=P,W.next=vt,vt.prev=W,at.next=W,W.prev=at,St.next=at,at.prev=St,at}function rg(P,R,W,at){var vt=new Rp(P,R,W);return at?(vt.next=at.next,vt.prev=at,at.next.prev=vt,at.next=vt):(vt.prev=vt,vt.next=vt),vt}function Mv(P){P.next.prev=P.prev,P.prev.next=P.next,P.prevZ&&(P.prevZ.nextZ=P.nextZ),P.nextZ&&(P.nextZ.prevZ=P.prevZ)}function Rp(P,R,W){this.i=P,this.x=R,this.y=W,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}ld.deviation=function(P,R,W,at){var vt=R&&R.length,St=vt?R[0]*W:P.length,Pt=Math.abs(Dp(P,0,St,W));if(vt)for(var te=0,ye=R.length;te0&&(at+=P[vt-1].length,W.holes.push(at))}return W},Lp.default=$1;function dx(P,R,W,at,vt){ng(P,R,W||0,at||P.length-1,vt||px)}function ng(P,R,W,at,vt){for(;at>W;){if(at-W>600){var St=at-W+1,Pt=R-W+1,te=Math.log(St),ye=.5*Math.exp(2*te/3),_e=.5*Math.sqrt(te*ye*(St-ye)/St)*(Pt-St/2<0?-1:1),Fe=Math.max(W,Math.floor(R-Pt*ye/St+_e)),je=Math.min(at,Math.floor(R+(St-Pt)*ye/St+_e));ng(P,R,Fe,je,vt)}var ar=P[R],tr=W,yr=at;for(Sv(P,W,R),vt(P[at],ar)>0&&Sv(P,W,at);tr0;)yr--}vt(P[W],ar)===0?Sv(P,W,yr):(yr++,Sv(P,yr,at)),yr<=R&&(W=yr+1),R<=yr&&(at=yr-1)}}function Sv(P,R,W){var at=P[R];P[R]=P[W],P[W]=at}function px(P,R){return PR?1:0}function Ip(P,R){var W=P.length;if(W<=1)return[P];for(var at=[],vt,St,Pt=0;Pt1)for(var ye=0;ye>3}if(at--,W===1||W===2)vt+=P.readSVarint(),St+=P.readSVarint(),W===1&&(te&&Pt.push(te),te=[]),te.push(new r(vt,St));else if(W===7)te&&te.push(te[0].clone());else throw new Error("unknown command "+W)}return te&&Pt.push(te),Pt},ph.prototype.bbox=function(){var P=this._pbf;P.pos=this._geometry;for(var R=P.readVarint()+P.pos,W=1,at=0,vt=0,St=0,Pt=1/0,te=-1/0,ye=1/0,_e=-1/0;P.pos>3}if(at--,W===1||W===2)vt+=P.readSVarint(),St+=P.readSVarint(),vtte&&(te=vt),St_e&&(_e=St);else if(W!==7)throw new Error("unknown command "+W)}return[Pt,ye,te,_e]},ph.prototype.toGeoJSON=function(P,R,W){var at=this.extent*Math.pow(2,W),vt=this.extent*P,St=this.extent*R,Pt=this.loadGeometry(),te=ph.types[this.type],ye,_e;function Fe(tr){for(var yr=0;yr>3;R=at===1?P.readString():at===2?P.readFloat():at===3?P.readDouble():at===4?P.readVarint64():at===5?P.readVarint():at===6?P.readSVarint():at===7?P.readBoolean():null}return R}og.prototype.feature=function(P){if(P<0||P>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[P];var R=this._pbf.readVarint()+this._pbf.pos;return new ig(this._pbf,R,this.extent,this._keys,this._values)};var Px=Rx;function Rx(P,R){this.layers=P.readFields(Dx,{},R)}function Dx(P,R,W){if(P===3){var at=new ag(W,W.readVarint()+W.pos);at.length&&(R[at.name]=at)}}var Ix=Px,Fx=ig,zx=ag,gh={VectorTile:Ix,VectorTileFeature:Fx,VectorTileLayer:zx},kx=gh.VectorTileFeature.types,Ox=500,kp=Math.pow(2,13);function Ev(P,R,W,at,vt,St,Pt,te){P.emplaceBack(R,W,Math.floor(at*kp)*2+Pt,vt*kp*2,St*kp*2,Math.round(te))}var iu=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(W){return W.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new Lu,this.indexArray=new eu,this.programConfigurations=new hi(R.layers,R.zoom),this.segments=new ro,this.stateDependentLayerIds=this.layers.filter(function(W){return W.isStateDependent()}).map(function(W){return W.id})};iu.prototype.populate=function(R,W,at){this.features=[],this.hasPattern=Fp("fill-extrusion",this.layers,W);for(var vt=0,St=R;vt=1){var Mn=ln[Sn-1];if(!Nx(mn,Mn)){tr.vertexLength+4>ro.MAX_VERTEX_ARRAY_LENGTH&&(tr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var zn=mn.sub(Mn)._perp()._unit(),Wn=Mn.dist(mn);tn+Wn>32768&&(tn=0),Ev(this.layoutVertexArray,mn.x,mn.y,zn.x,zn.y,0,0,tn),Ev(this.layoutVertexArray,mn.x,mn.y,zn.x,zn.y,0,1,tn),tn+=Wn,Ev(this.layoutVertexArray,Mn.x,Mn.y,zn.x,zn.y,0,0,tn),Ev(this.layoutVertexArray,Mn.x,Mn.y,zn.x,zn.y,0,1,tn);var ei=tr.vertexLength;this.indexArray.emplaceBack(ei,ei+2,ei+1),this.indexArray.emplaceBack(ei+1,ei+2,ei+3),tr.vertexLength+=4,tr.primitiveLength+=2}}}}if(tr.vertexLength+_e>ro.MAX_VERTEX_ARRAY_LENGTH&&(tr=this.segments.prepareSegment(_e,this.layoutVertexArray,this.indexArray)),kx[R.type]==="Polygon"){for(var $n=[],bi=[],vi=tr.vertexLength,xi=0,Ni=ye;xiAi)||P.y===R.y&&(P.y<0||P.y>Ai)}function Bx(P){return P.every(function(R){return R.x<0})||P.every(function(R){return R.x>Ai})||P.every(function(R){return R.y<0})||P.every(function(R){return R.y>Ai})}var Ux=new ca({"fill-extrusion-opacity":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ao(Ar["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),Hx={paint:Ux},Vx=function(P){function R(W){P.call(this,W,Hx)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.createBucket=function(at){return new iu(at)},R.prototype.queryRadius=function(){return rl(this.paint.get("fill-extrusion-translate"))},R.prototype.is3D=function(){return!0},R.prototype.queryIntersectsFeature=function(at,vt,St,Pt,te,ye,_e,Fe){var je=ru(at,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),ye.angle,_e),ar=this.paint.get("fill-extrusion-height").evaluate(vt,St),tr=this.paint.get("fill-extrusion-base").evaluate(vt,St),yr=Yx(je,Fe,ye,0),zr=Wx(Pt,tr,ar,Fe),ln=zr[0],tn=zr[1];return Gx(ln,tn,yr)},R}(Oa);function _v(P,R){return P.x*R.x+P.y*R.y}function sg(P,R){if(P.length===1){for(var W=0,at=R[W++],vt;!vt||at.equals(vt);)if(vt=R[W++],!vt)return 1/0;for(;W=2&&R[_e-1].equals(R[_e-2]);)_e--;for(var Fe=0;Fe<_e-1&&R[Fe].equals(R[Fe+1]);)Fe++;if(!(_e<(ye?3:2))){at==="bevel"&&(St=1.05);var je=this.overscaling<=16?$x*Ai/(512*this.overscaling):0,ar=this.segments.prepareSegment(_e*10,this.layoutVertexArray,this.indexArray),tr,yr=void 0,zr=void 0,ln=void 0,tn=void 0;this.e1=this.e2=-1,ye&&(tr=R[_e-2],tn=R[Fe].sub(tr)._unit()._perp());for(var Sn=Fe;Sn<_e;Sn++)if(zr=Sn===_e-1?ye?R[Fe+1]:void 0:R[Sn+1],!(zr&&R[Sn].equals(zr))){tn&&(ln=tn),tr&&(yr=tr),tr=R[Sn],tn=zr?zr.sub(tr)._unit()._perp():ln,ln=ln||tn;var mn=ln.add(tn);(mn.x!==0||mn.y!==0)&&mn._unit();var Mn=ln.x*tn.x+ln.y*tn.y,zn=mn.x*tn.x+mn.y*tn.y,Wn=zn!==0?1/zn:1/0,ei=2*Math.sqrt(2-2*zn),$n=zn0;if($n&&Sn>Fe){var vi=tr.dist(yr);if(vi>2*je){var xi=tr.sub(tr.sub(yr)._mult(je/vi)._round());this.updateDistance(yr,xi),this.addCurrentVertex(xi,ln,0,0,ar),yr=xi}}var Ni=yr&&zr,wi=Ni?at:ye?"butt":vt;if(Ni&&wi==="round"&&(WnSt&&(wi="bevel"),wi==="bevel"&&(Wn>2&&(wi="flipbevel"),Wn100)mn=tn.mult(-1);else{var Si=Wn*ln.add(tn).mag()/ln.sub(tn).mag();mn._perp()._mult(Si*(bi?-1:1))}this.addCurrentVertex(tr,mn,0,0,ar),this.addCurrentVertex(tr,mn.mult(-1),0,0,ar)}else if(wi==="bevel"||wi==="fakeround"){var Vi=-Math.sqrt(Wn*Wn-1),ki=bi?Vi:0,aa=bi?0:Vi;if(yr&&this.addCurrentVertex(tr,ln,ki,aa,ar),wi==="fakeround")for(var xa=Math.round(ei*180/Math.PI/qx),oa=1;oa2*je){var oo=tr.add(zr.sub(tr)._mult(je/mo)._round());this.updateDistance(tr,oo),this.addCurrentVertex(oo,tn,0,0,ar),tr=oo}}}}},Jo.prototype.addCurrentVertex=function(R,W,at,vt,St,Pt){Pt===void 0&&(Pt=!1);var te=W.x+W.y*at,ye=W.y-W.x*at,_e=-W.x+W.y*vt,Fe=-W.y-W.x*vt;this.addHalfVertex(R,te,ye,Pt,!1,at,St),this.addHalfVertex(R,_e,Fe,Pt,!0,-vt,St),this.distance>fg/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(R,W,at,vt,St,Pt))},Jo.prototype.addHalfVertex=function(R,W,at,vt,St,Pt,te){var ye=R.x,_e=R.y,Fe=this.lineClips?this.scaledDistance*(fg-1):this.scaledDistance,je=Fe*ug;if(this.layoutVertexArray.emplaceBack((ye<<1)+(vt?1:0),(_e<<1)+(St?1:0),Math.round(lg*W)+128,Math.round(lg*at)+128,(Pt===0?0:Pt<0?-1:1)+1|(je&63)<<2,je>>6),this.lineClips){var ar=this.scaledDistance-this.lineClips.start,tr=this.lineClips.end-this.lineClips.start,yr=ar/tr;this.layoutVertexArray2.emplaceBack(yr,this.lineClipsArray.length)}var zr=te.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,zr),te.primitiveLength++),St?this.e2=zr:this.e1=zr},Jo.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Jo.prototype.updateDistance=function(R,W){this.distance+=R.dist(W),this.updateScaledDistance()},Bt("LineBucket",Jo,{omit:["layers","patternFeatures"]});var eb=new ca({"line-cap":new oi(Ar.layout_line["line-cap"]),"line-join":new Ei(Ar.layout_line["line-join"]),"line-miter-limit":new oi(Ar.layout_line["line-miter-limit"]),"line-round-limit":new oi(Ar.layout_line["line-round-limit"]),"line-sort-key":new Ei(Ar.layout_line["line-sort-key"])}),rb=new ca({"line-opacity":new Ei(Ar.paint_line["line-opacity"]),"line-color":new Ei(Ar.paint_line["line-color"]),"line-translate":new oi(Ar.paint_line["line-translate"]),"line-translate-anchor":new oi(Ar.paint_line["line-translate-anchor"]),"line-width":new Ei(Ar.paint_line["line-width"]),"line-gap-width":new Ei(Ar.paint_line["line-gap-width"]),"line-offset":new Ei(Ar.paint_line["line-offset"]),"line-blur":new Ei(Ar.paint_line["line-blur"]),"line-dasharray":new Lo(Ar.paint_line["line-dasharray"]),"line-pattern":new Ao(Ar.paint_line["line-pattern"]),"line-gradient":new eo(Ar.paint_line["line-gradient"])}),cg={paint:rb,layout:eb},nb=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.possiblyEvaluate=function(at,vt){return vt=new Ti(Math.floor(vt.zoom),{now:vt.now,fadeDuration:vt.fadeDuration,zoomHistory:vt.zoomHistory,transition:vt.transition}),P.prototype.possiblyEvaluate.call(this,at,vt)},R.prototype.evaluate=function(at,vt,St,Pt){return vt=w({},vt,{zoom:Math.floor(vt.zoom)}),P.prototype.evaluate.call(this,at,vt,St,Pt)},R}(Ei),hg=new nb(cg.paint.properties["line-width"].specification);hg.useIntegerZoom=!0;var ib=function(P){function R(W){P.call(this,W,cg),this.gradientVersion=0}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._handleSpecialPaintPropertyUpdate=function(at){if(at==="line-gradient"){var vt=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=vt._styleExpression.expression instanceof Ho,this.gradientVersion=(this.gradientVersion+1)%f}},R.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},R.prototype.recalculate=function(at,vt){P.prototype.recalculate.call(this,at,vt),this.paint._values["line-floorwidth"]=hg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,at)},R.prototype.createBucket=function(at){return new Jo(at)},R.prototype.queryRadius=function(at){var vt=at,St=vg(Ko("line-width",this,vt),Ko("line-gap-width",this,vt)),Pt=Ko("line-offset",this,vt);return St/2+Math.abs(Pt)+rl(this.paint.get("line-translate"))},R.prototype.queryIntersectsFeature=function(at,vt,St,Pt,te,ye,_e){var Fe=ru(at,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ye.angle,_e),je=_e/2*vg(this.paint.get("line-width").evaluate(vt,St),this.paint.get("line-gap-width").evaluate(vt,St)),ar=this.paint.get("line-offset").evaluate(vt,St);return ar&&(Pt=ab(Pt,ar*_e)),fo(Fe,Pt,je)},R.prototype.isTileClipped=function(){return!0},R}(Oa);function vg(P,R){return R>0?R+2*P:P}function ab(P,R){for(var W=[],at=new r(0,0),vt=0;vt":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function vb(P){for(var R="",W=0;W>1,Fe=-7,je=W?vt-1:0,ar=W?-1:1,tr=P[R+je];for(je+=ar,St=tr&(1<<-Fe)-1,tr>>=-Fe,Fe+=te;Fe>0;St=St*256+P[R+je],je+=ar,Fe-=8);for(Pt=St&(1<<-Fe)-1,St>>=-Fe,Fe+=at;Fe>0;Pt=Pt*256+P[R+je],je+=ar,Fe-=8);if(St===0)St=1-_e;else{if(St===ye)return Pt?NaN:(tr?-1:1)*(1/0);Pt=Pt+Math.pow(2,at),St=St-_e}return(tr?-1:1)*Pt*Math.pow(2,St-at)},pb=function(P,R,W,at,vt,St){var Pt,te,ye,_e=St*8-vt-1,Fe=(1<<_e)-1,je=Fe>>1,ar=vt===23?Math.pow(2,-24)-Math.pow(2,-77):0,tr=at?0:St-1,yr=at?1:-1,zr=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(te=isNaN(R)?1:0,Pt=Fe):(Pt=Math.floor(Math.log(R)/Math.LN2),R*(ye=Math.pow(2,-Pt))<1&&(Pt--,ye*=2),Pt+je>=1?R+=ar/ye:R+=ar*Math.pow(2,1-je),R*ye>=2&&(Pt++,ye/=2),Pt+je>=Fe?(te=0,Pt=Fe):Pt+je>=1?(te=(R*ye-1)*Math.pow(2,vt),Pt=Pt+je):(te=R*Math.pow(2,je-1)*Math.pow(2,vt),Pt=0));vt>=8;P[W+tr]=te&255,tr+=yr,te/=256,vt-=8);for(Pt=Pt<0;P[W+tr]=Pt&255,tr+=yr,Pt/=256,_e-=8);P[W+tr-yr]|=zr*128},hd={read:db,write:pb},vd=Ma;function Ma(P){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(P)?P:new Uint8Array(P||0),this.pos=0,this.type=0,this.length=this.buf.length}Ma.Varint=0,Ma.Fixed64=1,Ma.Bytes=2,Ma.Fixed32=5;var Op=65536*65536,pg=1/Op,gb=12,gg=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Ma.prototype={destroy:function(){this.buf=null},readFields:function(P,R,W){for(W=W||this.length;this.pos>3,St=this.pos;this.type=at&7,P(vt,R,this),this.pos===St&&this.skip(at)}return R},readMessage:function(P,R){return this.readFields(P,R,this.readVarint()+this.pos)},readFixed32:function(){var P=dd(this.buf,this.pos);return this.pos+=4,P},readSFixed32:function(){var P=yg(this.buf,this.pos);return this.pos+=4,P},readFixed64:function(){var P=dd(this.buf,this.pos)+dd(this.buf,this.pos+4)*Op;return this.pos+=8,P},readSFixed64:function(){var P=dd(this.buf,this.pos)+yg(this.buf,this.pos+4)*Op;return this.pos+=8,P},readFloat:function(){var P=hd.read(this.buf,this.pos,!0,23,4);return this.pos+=4,P},readDouble:function(){var P=hd.read(this.buf,this.pos,!0,52,8);return this.pos+=8,P},readVarint:function(P){var R=this.buf,W,at;return at=R[this.pos++],W=at&127,at<128||(at=R[this.pos++],W|=(at&127)<<7,at<128)||(at=R[this.pos++],W|=(at&127)<<14,at<128)||(at=R[this.pos++],W|=(at&127)<<21,at<128)?W:(at=R[this.pos],W|=(at&15)<<28,mb(W,P,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var P=this.readVarint();return P%2===1?(P+1)/-2:P/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var P=this.readVarint()+this.pos,R=this.pos;return this.pos=P,P-R>=gb&&gg?Rb(this.buf,R,P):Pb(this.buf,R,P)},readBytes:function(){var P=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,P);return this.pos=P,R},readPackedVarint:function(P,R){if(this.type!==Ma.Bytes)return P.push(this.readVarint(R));var W=lf(this);for(P=P||[];this.pos127;);else if(R===Ma.Bytes)this.pos=this.readVarint()+this.pos;else if(R===Ma.Fixed32)this.pos+=4;else if(R===Ma.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+R)},writeTag:function(P,R){this.writeVarint(P<<3|R)},realloc:function(P){for(var R=this.length||16;R268435455||P<0){yb(P,this);return}this.realloc(4),this.buf[this.pos++]=P&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=(P>>>=7)&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=(P>>>=7)&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=P>>>7&127)))},writeSVarint:function(P){this.writeVarint(P<0?-P*2-1:P*2)},writeBoolean:function(P){this.writeVarint(!!P)},writeString:function(P){P=String(P),this.realloc(P.length*4),this.pos++;var R=this.pos;this.pos=Db(this.buf,P,this.pos);var W=this.pos-R;W>=128&&mg(R,W,this),this.pos=R-1,this.writeVarint(W),this.pos+=W},writeFloat:function(P){this.realloc(4),hd.write(this.buf,P,this.pos,!0,23,4),this.pos+=4},writeDouble:function(P){this.realloc(8),hd.write(this.buf,P,this.pos,!0,52,8),this.pos+=8},writeBytes:function(P){var R=P.length;this.writeVarint(R),this.realloc(R);for(var W=0;W=128&&mg(W,at,this),this.pos=W-1,this.writeVarint(at),this.pos+=at},writeMessage:function(P,R,W){this.writeTag(P,Ma.Bytes),this.writeRawMessage(R,W)},writePackedVarint:function(P,R){R.length&&this.writeMessage(P,wb,R)},writePackedSVarint:function(P,R){R.length&&this.writeMessage(P,Tb,R)},writePackedBoolean:function(P,R){R.length&&this.writeMessage(P,Sb,R)},writePackedFloat:function(P,R){R.length&&this.writeMessage(P,Ab,R)},writePackedDouble:function(P,R){R.length&&this.writeMessage(P,Mb,R)},writePackedFixed32:function(P,R){R.length&&this.writeMessage(P,Eb,R)},writePackedSFixed32:function(P,R){R.length&&this.writeMessage(P,_b,R)},writePackedFixed64:function(P,R){R.length&&this.writeMessage(P,Cb,R)},writePackedSFixed64:function(P,R){R.length&&this.writeMessage(P,Lb,R)},writeBytesField:function(P,R){this.writeTag(P,Ma.Bytes),this.writeBytes(R)},writeFixed32Field:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeSFixed64(R)},writeVarintField:function(P,R){this.writeTag(P,Ma.Varint),this.writeVarint(R)},writeSVarintField:function(P,R){this.writeTag(P,Ma.Varint),this.writeSVarint(R)},writeStringField:function(P,R){this.writeTag(P,Ma.Bytes),this.writeString(R)},writeFloatField:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeFloat(R)},writeDoubleField:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeDouble(R)},writeBooleanField:function(P,R){this.writeVarintField(P,!!R)}};function mb(P,R,W){var at=W.buf,vt,St;if(St=at[W.pos++],vt=(St&112)>>4,St<128||(St=at[W.pos++],vt|=(St&127)<<3,St<128)||(St=at[W.pos++],vt|=(St&127)<<10,St<128)||(St=at[W.pos++],vt|=(St&127)<<17,St<128)||(St=at[W.pos++],vt|=(St&127)<<24,St<128)||(St=at[W.pos++],vt|=(St&1)<<31,St<128))return mh(P,vt,R);throw new Error("Expected varint not more than 10 bytes")}function lf(P){return P.type===Ma.Bytes?P.readVarint()+P.pos:P.pos+1}function mh(P,R,W){return W?R*4294967296+(P>>>0):(R>>>0)*4294967296+(P>>>0)}function yb(P,R){var W,at;if(P>=0?(W=P%4294967296|0,at=P/4294967296|0):(W=~(-P%4294967296),at=~(-P/4294967296),W^4294967295?W=W+1|0:(W=0,at=at+1|0)),P>=18446744073709552e3||P<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");R.realloc(10),xb(W,at,R),bb(at,R)}function xb(P,R,W){W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos]=P&127}function bb(P,R){var W=(P&7)<<4;R.buf[R.pos++]|=W|((P>>>=3)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127)))))}function mg(P,R,W){var at=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(Math.LN2*7));W.realloc(at);for(var vt=W.pos-1;vt>=P;vt--)W.buf[vt+at]=W.buf[vt]}function wb(P,R){for(var W=0;W>>8,P[W+2]=R>>>16,P[W+3]=R>>>24}function yg(P,R){return(P[R]|P[R+1]<<8|P[R+2]<<16)+(P[R+3]<<24)}function Pb(P,R,W){for(var at="",vt=R;vt239?4:St>223?3:St>191?2:1;if(vt+te>W)break;var ye,_e,Fe;te===1?St<128&&(Pt=St):te===2?(ye=P[vt+1],(ye&192)===128&&(Pt=(St&31)<<6|ye&63,Pt<=127&&(Pt=null))):te===3?(ye=P[vt+1],_e=P[vt+2],(ye&192)===128&&(_e&192)===128&&(Pt=(St&15)<<12|(ye&63)<<6|_e&63,(Pt<=2047||Pt>=55296&&Pt<=57343)&&(Pt=null))):te===4&&(ye=P[vt+1],_e=P[vt+2],Fe=P[vt+3],(ye&192)===128&&(_e&192)===128&&(Fe&192)===128&&(Pt=(St&15)<<18|(ye&63)<<12|(_e&63)<<6|Fe&63,(Pt<=65535||Pt>=1114112)&&(Pt=null))),Pt===null?(Pt=65533,te=1):Pt>65535&&(Pt-=65536,at+=String.fromCharCode(Pt>>>10&1023|55296),Pt=56320|Pt&1023),at+=String.fromCharCode(Pt),vt+=te}return at}function Rb(P,R,W){return gg.decode(P.subarray(R,W))}function Db(P,R,W){for(var at=0,vt,St;at55295&&vt<57344)if(St)if(vt<56320){P[W++]=239,P[W++]=191,P[W++]=189,St=vt;continue}else vt=St-55296<<10|vt-56320|65536,St=null;else{vt>56319||at+1===R.length?(P[W++]=239,P[W++]=191,P[W++]=189):St=vt;continue}else St&&(P[W++]=239,P[W++]=191,P[W++]=189,St=null);vt<128?P[W++]=vt:(vt<2048?P[W++]=vt>>6|192:(vt<65536?P[W++]=vt>>12|224:(P[W++]=vt>>18|240,P[W++]=vt>>12&63|128),P[W++]=vt>>6&63|128),P[W++]=vt&63|128)}return W}var Np=3;function Ib(P,R,W){P===1&&W.readMessage(Fb,R)}function Fb(P,R,W){if(P===3){var at=W.readMessage(zb,{}),vt=at.id,St=at.bitmap,Pt=at.width,te=at.height,ye=at.left,_e=at.top,Fe=at.advance;R.push({id:vt,bitmap:new Hc({width:Pt+2*Np,height:te+2*Np},St),metrics:{width:Pt,height:te,left:ye,top:_e,advance:Fe}})}}function zb(P,R,W){P===1?R.id=W.readVarint():P===2?R.bitmap=W.readBytes():P===3?R.width=W.readVarint():P===4?R.height=W.readVarint():P===5?R.left=W.readSVarint():P===6?R.top=W.readSVarint():P===7&&(R.advance=W.readVarint())}function kb(P){return new vd(P).readFields(Ib,[])}var xg=Np;function bg(P){for(var R=0,W=0,at=0,vt=P;at=0;tr--){var yr=te[tr];if(!(ar.w>yr.w||ar.h>yr.h)){if(ar.x=yr.x,ar.y=yr.y,_e=Math.max(_e,ar.y+ar.h),ye=Math.max(ye,ar.x+ar.w),ar.w===yr.w&&ar.h===yr.h){var zr=te.pop();tr=0&&vt>=R&&Du[this.text.charCodeAt(vt)];vt--)at--;this.text=this.text.substring(R,at),this.sectionIndex=this.sectionIndex.slice(R,at)},Fo.prototype.substring=function(R,W){var at=new Fo;return at.text=this.text.substring(R,W),at.sectionIndex=this.sectionIndex.slice(R,W),at.sections=this.sections,at},Fo.prototype.toString=function(){return this.text},Fo.prototype.getMaxScale=function(){var R=this;return this.sectionIndex.reduce(function(W,at){return Math.max(W,R.sections[at].scale)},0)},Fo.prototype.addTextSection=function(R,W){this.text+=R.text,this.sections.push(xh.forText(R.scale,R.fontStack||W));for(var at=this.sections.length-1,vt=0;vt=Tg?null:++this.imageSectionID:(this.imageSectionID=wg,this.imageSectionID)};function Nb(P,R){for(var W=[],at=P.text,vt=0,St=0,Pt=R;St=0,Fe=0,je=0;je0&&oo>bi&&(bi=oo)}else{var sa=W[xi.fontStack],ta=sa&&sa[wi];if(ta&&ta.rect)ki=ta.rect,Vi=ta.metrics;else{var Aa=R[xi.fontStack],Sa=Aa&&Aa[wi];if(!Sa)continue;Vi=Sa.metrics}Si=(zn-xi.scale)*Mo}oa?(P.verticalizable=!0,$n.push({glyph:wi,imageName:aa,x:ar,y:tr+Si,vertical:oa,scale:xi.scale,fontStack:xi.fontStack,sectionIndex:Ni,metrics:Vi,rect:ki}),ar+=xa*xi.scale+_e):($n.push({glyph:wi,imageName:aa,x:ar,y:tr+Si,vertical:oa,scale:xi.scale,fontStack:xi.fontStack,sectionIndex:Ni,metrics:Vi,rect:ki}),ar+=Vi.advance*xi.scale+_e)}if($n.length!==0){var zo=ar-_e;yr=Math.max(zo,yr),Vb($n,0,$n.length-1,ln,bi)}ar=0;var ko=St*zn+bi;ei.lineOffset=Math.max(bi,Wn),tr+=ko,zr=Math.max(ko,zr),++tn}var yo=tr-Rv,Qo=Up(Pt),$o=Qo.horizontalAlign,co=Qo.verticalAlign;Gb(P.positionedLines,ln,$o,co,yr,zr,St,yo,vt.length),P.top+=-co*yo,P.bottom=P.top+yo,P.left+=-$o*yr,P.right=P.left+yr}function Vb(P,R,W,at,vt){if(!(!at&&!vt))for(var St=P[W],Pt=St.metrics.advance*St.scale,te=(P[W].x+Pt)*at,ye=R;ye<=W;ye++)P[ye].x-=te,P[ye].y+=vt}function Gb(P,R,W,at,vt,St,Pt,te,ye){var _e=(R-W)*vt,Fe=0;St!==Pt?Fe=-te*at-Rv:Fe=(-at*ye+.5)*Pt;for(var je=0,ar=P;je-W/2;){if(Pt--,Pt<0)return!1;te-=P[Pt].dist(St),St=P[Pt]}te+=P[Pt].dist(P[Pt+1]),Pt++;for(var ye=[],_e=0;teat;)_e-=ye.shift().angleDelta;if(_e>vt)return!1;Pt++,te+=je.dist(ar)}return!0}function Rg(P){for(var R=0,W=0;W_e){var yr=(_e-ye)/tr,zr=Ca(je.x,ar.x,yr),ln=Ca(je.y,ar.y,yr),tn=new bh(zr,ln,ar.angleTo(je),Fe);return tn._round(),!Pt||Pg(P,tn,te,Pt,R)?tn:void 0}ye+=tr}}function Zb(P,R,W,at,vt,St,Pt,te,ye){var _e=Dg(at,St,Pt),Fe=Ig(at,vt),je=Fe*Pt,ar=P[0].x===0||P[0].x===ye||P[0].y===0||P[0].y===ye;R-je=0&&Mn=0&&zn=0&&ar+_e<=Fe){var Wn=new bh(Mn,zn,Sn,yr);Wn._round(),(!at||Pg(P,Wn,St,at,vt))&&tr.push(Wn)}}je+=tn}return!te&&!tr.length&&!Pt&&(tr=Fg(P,je/2,W,at,vt,St,Pt,!0,ye)),tr}function zg(P,R,W,at,vt){for(var St=[],Pt=0;Pt=at&&je.x>=at)&&(Fe.x>=at?Fe=new r(at,Fe.y+(je.y-Fe.y)*((at-Fe.x)/(je.x-Fe.x)))._round():je.x>=at&&(je=new r(at,Fe.y+(je.y-Fe.y)*((at-Fe.x)/(je.x-Fe.x)))._round()),!(Fe.y>=vt&&je.y>=vt)&&(Fe.y>=vt?Fe=new r(Fe.x+(je.x-Fe.x)*((vt-Fe.y)/(je.y-Fe.y)),vt)._round():je.y>=vt&&(je=new r(Fe.x+(je.x-Fe.x)*((vt-Fe.y)/(je.y-Fe.y)),vt)._round()),(!ye||!Fe.equals(ye[ye.length-1]))&&(ye=[Fe],St.push(ye)),ye.push(je)))))}return St}var wh=ws;function kg(P,R,W,at){var vt=[],St=P.image,Pt=St.pixelRatio,te=St.paddedRect.w-2*wh,ye=St.paddedRect.h-2*wh,_e=P.right-P.left,Fe=P.bottom-P.top,je=St.stretchX||[[0,te]],ar=St.stretchY||[[0,ye]],tr=function(sa,ta){return sa+ta[1]-ta[0]},yr=je.reduce(tr,0),zr=ar.reduce(tr,0),ln=te-yr,tn=ye-zr,Sn=0,mn=yr,Mn=0,zn=zr,Wn=0,ei=ln,$n=0,bi=tn;if(St.content&&at){var vi=St.content;Sn=md(je,0,vi[0]),Mn=md(ar,0,vi[1]),mn=md(je,vi[0],vi[2]),zn=md(ar,vi[1],vi[3]),Wn=vi[0]-Sn,$n=vi[1]-Mn,ei=vi[2]-vi[0]-mn,bi=vi[3]-vi[1]-zn}var xi=function(sa,ta,Aa,Sa){var Ba=yd(sa.stretch-Sn,mn,_e,P.left),Wa=xd(sa.fixed-Wn,ei,sa.stretch,yr),mo=yd(ta.stretch-Mn,zn,Fe,P.top),oo=xd(ta.fixed-$n,bi,ta.stretch,zr),zo=yd(Aa.stretch-Sn,mn,_e,P.left),ko=xd(Aa.fixed-Wn,ei,Aa.stretch,yr),yo=yd(Sa.stretch-Mn,zn,Fe,P.top),Qo=xd(Sa.fixed-$n,bi,Sa.stretch,zr),$o=new r(Ba,mo),co=new r(zo,mo),qo=new r(zo,yo),Hs=new r(Ba,yo),cf=new r(Wa/Pt,oo/Pt),ec=new r(ko/Pt,Qo/Pt),rc=R*Math.PI/180;if(rc){var nc=Math.sin(rc),Lh=Math.cos(rc),Rl=[Lh,-nc,nc,Lh];$o._matMult(Rl),co._matMult(Rl),Hs._matMult(Rl),qo._matMult(Rl)}var Sd=sa.stretch+sa.fixed,Kp=Aa.stretch+Aa.fixed,Ed=ta.stretch+ta.fixed,Jp=Sa.stretch+Sa.fixed,il={x:St.paddedRect.x+wh+Sd,y:St.paddedRect.y+wh+Ed,w:Kp-Sd,h:Jp-Ed},Ph=ei/Pt/_e,_d=bi/Pt/Fe;return{tl:$o,tr:co,bl:Hs,br:qo,tex:il,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:cf,pixelOffsetBR:ec,minFontScaleX:Ph,minFontScaleY:_d,isSDF:W}};if(!at||!St.stretchX&&!St.stretchY)vt.push(xi({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:te+1},{fixed:0,stretch:ye+1}));else for(var Ni=Og(je,ln,yr),wi=Og(ar,tn,zr),Si=0;Si0&&(yr=Math.max(10,yr),this.circleDiameter=yr)}else{var zr=Pt.top*te-ye,ln=Pt.bottom*te+ye,tn=Pt.left*te-ye,Sn=Pt.right*te+ye,mn=Pt.collisionPadding;if(mn&&(tn-=mn[0]*te,zr-=mn[1]*te,Sn+=mn[2]*te,ln+=mn[3]*te),Fe){var Mn=new r(tn,zr),zn=new r(Sn,zr),Wn=new r(tn,ln),ei=new r(Sn,ln),$n=Fe*Math.PI/180;Mn._rotate($n),zn._rotate($n),Wn._rotate($n),ei._rotate($n),tn=Math.min(Mn.x,zn.x,Wn.x,ei.x),Sn=Math.max(Mn.x,zn.x,Wn.x,ei.x),zr=Math.min(Mn.y,zn.y,Wn.y,ei.y),ln=Math.max(Mn.y,zn.y,Wn.y,ei.y)}R.emplaceBack(W.x,W.y,tn,zr,Sn,ln,at,vt,St)}this.boxEndIndex=R.length},Th=function(R,W){if(R===void 0&&(R=[]),W===void 0&&(W=Kb),this.data=R,this.length=this.data.length,this.compare=W,this.length>0)for(var at=(this.length>>1)-1;at>=0;at--)this._down(at)};Th.prototype.push=function(R){this.data.push(R),this.length++,this._up(this.length-1)},Th.prototype.pop=function(){if(this.length!==0){var R=this.data[0],W=this.data.pop();return this.length--,this.length>0&&(this.data[0]=W,this._down(0)),R}},Th.prototype.peek=function(){return this.data[0]},Th.prototype._up=function(R){for(var W=this,at=W.data,vt=W.compare,St=at[R];R>0;){var Pt=R-1>>1,te=at[Pt];if(vt(St,te)>=0)break;at[R]=te,R=Pt}at[R]=St},Th.prototype._down=function(R){for(var W=this,at=W.data,vt=W.compare,St=this.length>>1,Pt=at[R];R=0)break;at[R]=ye,R=te}at[R]=Pt};function Kb(P,R){return PR?1:0}function Jb(P,R,W){R===void 0&&(R=1),W===void 0&&(W=!1);for(var at=1/0,vt=1/0,St=-1/0,Pt=-1/0,te=P[0],ye=0;yeSt)&&(St=_e.x),(!ye||_e.y>Pt)&&(Pt=_e.y)}var Fe=St-at,je=Pt-vt,ar=Math.min(Fe,je),tr=ar/2,yr=new Th([],Qb);if(ar===0)return new r(at,vt);for(var zr=at;zrtn.d||!tn.d)&&(tn=mn,W&&console.log("found best %d after %d probes",Math.round(1e4*mn.d)/1e4,Sn)),!(mn.max-tn.d<=R)&&(tr=mn.h/2,yr.push(new Ah(mn.p.x-tr,mn.p.y-tr,tr,P)),yr.push(new Ah(mn.p.x+tr,mn.p.y-tr,tr,P)),yr.push(new Ah(mn.p.x-tr,mn.p.y+tr,tr,P)),yr.push(new Ah(mn.p.x+tr,mn.p.y+tr,tr,P)),Sn+=4)}return W&&(console.log("num probes: "+Sn),console.log("best distance: "+tn.d)),tn.p}function Qb(P,R){return R.max-P.max}function Ah(P,R,W,at){this.p=new r(P,R),this.h=W,this.d=$b(this.p,at),this.max=this.d+this.h*Math.SQRT2}function $b(P,R){for(var W=!1,at=1/0,vt=0;vtP.y!=Fe.y>P.y&&P.x<(Fe.x-_e.x)*(P.y-_e.y)/(Fe.y-_e.y)+_e.x&&(W=!W),at=Math.min(at,sf(P,_e,Fe))}return(W?1:-1)*Math.sqrt(at)}function qb(P){for(var R=0,W=0,at=0,vt=P[0],St=0,Pt=vt.length,te=Pt-1;St=Ai||Rl.y<0||Rl.y>=Ai||r3(P,Rl,Lh,W,at,vt,wi,P.layers[0],P.collisionBoxArray,R.index,R.sourceLayerIndex,P.index,tn,zn,$n,ye,mn,Wn,bi,tr,R,St,_e,Fe,Pt)};if(vi==="line")for(var Vi=0,ki=zg(R.geometry,0,0,Ai,Ai);Vi1){var mo=Xb(Wa,ei,W.vertical||yr,at,zr,Sn);mo&&Si(Wa,mo)}}else if(R.type==="Polygon")for(var oo=0,zo=Ip(R.geometry,0);ooqf&&B(P.layerIds[0]+': Value for "text-size" is >= '+Dv+'. Reduce your "text-size".')):ln.kind==="composite"&&(tn=[au*tr.compositeTextSizes[0].evaluate(Pt,{},yr),au*tr.compositeTextSizes[1].evaluate(Pt,{},yr)],(tn[0]>qf||tn[1]>qf)&&B(P.layerIds[0]+': Value for "text-size" is >= '+Dv+'. Reduce your "text-size".')),P.addSymbols(P.text,zr,tn,te,St,Pt,_e,R,ye.lineStartIndex,ye.lineLength,ar,yr);for(var Sn=0,mn=Fe;Snqf&&B(P.layerIds[0]+': Value for "icon-size" is >= '+Dv+'. Reduce your "icon-size".')):$o.kind==="composite"&&(co=[au*zn.compositeIconSizes[0].evaluate(Mn,{},ei),au*zn.compositeIconSizes[1].evaluate(Mn,{},ei)],(co[0]>qf||co[1]>qf)&&B(P.layerIds[0]+': Value for "icon-size" is >= '+Dv+'. Reduce your "icon-size".')),P.addSymbols(P.icon,yo,co,mn,Sn,Mn,!1,R,vi.lineStartIndex,vi.lineLength,-1,ei),oa=P.icon.placedSymbolArray.length-1,Qo&&(ki=Qo.length*4,P.addSymbols(P.icon,Qo,co,mn,Sn,Mn,Us.vertical,R,vi.lineStartIndex,vi.lineLength,-1,ei),sa=P.icon.placedSymbolArray.length-1)}for(var qo in at.horizontal){var Hs=at.horizontal[qo];if(!xi){Aa=pt(Hs.text);var cf=te.layout.get("text-rotate").evaluate(Mn,{},ei);xi=new bd(ye,R,_e,Fe,je,Hs,ar,tr,yr,cf)}var ec=Hs.positionedLines.length===1;if(aa+=Bg(P,R,Hs,St,te,yr,Mn,zr,vi,at.vertical?Us.horizontal:Us.horizontalOnly,ec?Object.keys(at.horizontal):[qo],ta,oa,zn,ei),ec)break}at.vertical&&(xa+=Bg(P,R,at.vertical,St,te,yr,Mn,zr,vi,Us.vertical,["vertical"],ta,sa,zn,ei));var rc=xi?xi.boxStartIndex:P.collisionBoxArray.length,nc=xi?xi.boxEndIndex:P.collisionBoxArray.length,Lh=wi?wi.boxStartIndex:P.collisionBoxArray.length,Rl=wi?wi.boxEndIndex:P.collisionBoxArray.length,Sd=Ni?Ni.boxStartIndex:P.collisionBoxArray.length,Kp=Ni?Ni.boxEndIndex:P.collisionBoxArray.length,Ed=Si?Si.boxStartIndex:P.collisionBoxArray.length,Jp=Si?Si.boxEndIndex:P.collisionBoxArray.length,il=-1,Ph=function(zv,rm){return zv&&zv.circleDiameter?Math.max(zv.circleDiameter,rm):rm};il=Ph(xi,il),il=Ph(wi,il),il=Ph(Ni,il),il=Ph(Si,il);var _d=il>-1?1:0;_d&&(il*=$n/Mo),P.glyphOffsetArray.length>=ya.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Mn.sortKey!==void 0&&P.addToSortKeyRanges(P.symbolInstances.length,Mn.sortKey),P.symbolInstances.emplaceBack(R.x,R.y,ta.right>=0?ta.right:-1,ta.center>=0?ta.center:-1,ta.left>=0?ta.left:-1,ta.vertical||-1,oa,sa,Aa,rc,nc,Lh,Rl,Sd,Kp,Ed,Jp,_e,aa,xa,Vi,ki,_d,0,ar,Sa,Ba,il)}function n3(P,R,W,at){var vt=P.compareText;if(!(R in vt))vt[R]=[];else for(var St=vt[R],Pt=St.length-1;Pt>=0;Pt--)if(at.dist(St[Pt])0)&&(Pt.value.kind!=="constant"||Pt.value.value.length>0),Fe=ye.value.kind!=="constant"||!!ye.value.value||Object.keys(ye.parameters).length>0,je=St.get("symbol-sort-key");if(this.features=[],!(!_e&&!Fe)){for(var ar=W.iconDependencies,tr=W.glyphDependencies,yr=W.availableImages,zr=new Ti(this.zoom),ln=0,tn=R;ln=0;for(var xa=0,oa=bi.sections;xa=0;ye--)Pt[ye]={x:W[ye].x,y:W[ye].y,tileUnitDistanceFromAnchor:St},ye>0&&(St+=W[ye-1].dist(W[ye]));for(var _e=0;_e0},ya.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ya.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ya.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ya.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ya.prototype.addIndicesForPlacedSymbol=function(R,W){for(var at=R.placedSymbolArray.get(W),vt=at.vertexStartIndex+at.numGlyphs*4,St=at.vertexStartIndex;St1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var at=0,vt=this.symbolInstanceIndexes;at=0&&_e.indexOf(te)===ye&&W.addIndicesForPlacedSymbol(W.text,te)}),Pt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Pt.verticalPlacedTextSymbolIndex),Pt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Pt.placedIconSymbolIndex),Pt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Pt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Bt("SymbolBucket",ya,{omit:["layers","collisionBoxArray","features","compareText"]}),ya.MAX_GLYPHS=65535,ya.addDynamicAttributes=Wp;function s3(P,R){return R.replace(/{([^{}]+)}/g,function(W,at){return at in P?String(P[at]):""})}var l3=new ca({"symbol-placement":new oi(Ar.layout_symbol["symbol-placement"]),"symbol-spacing":new oi(Ar.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new oi(Ar.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ei(Ar.layout_symbol["symbol-sort-key"]),"symbol-z-order":new oi(Ar.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new oi(Ar.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new oi(Ar.layout_symbol["icon-ignore-placement"]),"icon-optional":new oi(Ar.layout_symbol["icon-optional"]),"icon-rotation-alignment":new oi(Ar.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ei(Ar.layout_symbol["icon-size"]),"icon-text-fit":new oi(Ar.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new oi(Ar.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ei(Ar.layout_symbol["icon-image"]),"icon-rotate":new Ei(Ar.layout_symbol["icon-rotate"]),"icon-padding":new oi(Ar.layout_symbol["icon-padding"]),"icon-keep-upright":new oi(Ar.layout_symbol["icon-keep-upright"]),"icon-offset":new Ei(Ar.layout_symbol["icon-offset"]),"icon-anchor":new Ei(Ar.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new oi(Ar.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new oi(Ar.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new oi(Ar.layout_symbol["text-rotation-alignment"]),"text-field":new Ei(Ar.layout_symbol["text-field"]),"text-font":new Ei(Ar.layout_symbol["text-font"]),"text-size":new Ei(Ar.layout_symbol["text-size"]),"text-max-width":new Ei(Ar.layout_symbol["text-max-width"]),"text-line-height":new oi(Ar.layout_symbol["text-line-height"]),"text-letter-spacing":new Ei(Ar.layout_symbol["text-letter-spacing"]),"text-justify":new Ei(Ar.layout_symbol["text-justify"]),"text-radial-offset":new Ei(Ar.layout_symbol["text-radial-offset"]),"text-variable-anchor":new oi(Ar.layout_symbol["text-variable-anchor"]),"text-anchor":new Ei(Ar.layout_symbol["text-anchor"]),"text-max-angle":new oi(Ar.layout_symbol["text-max-angle"]),"text-writing-mode":new oi(Ar.layout_symbol["text-writing-mode"]),"text-rotate":new Ei(Ar.layout_symbol["text-rotate"]),"text-padding":new oi(Ar.layout_symbol["text-padding"]),"text-keep-upright":new oi(Ar.layout_symbol["text-keep-upright"]),"text-transform":new Ei(Ar.layout_symbol["text-transform"]),"text-offset":new Ei(Ar.layout_symbol["text-offset"]),"text-allow-overlap":new oi(Ar.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new oi(Ar.layout_symbol["text-ignore-placement"]),"text-optional":new oi(Ar.layout_symbol["text-optional"])}),u3=new ca({"icon-opacity":new Ei(Ar.paint_symbol["icon-opacity"]),"icon-color":new Ei(Ar.paint_symbol["icon-color"]),"icon-halo-color":new Ei(Ar.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ei(Ar.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ei(Ar.paint_symbol["icon-halo-blur"]),"icon-translate":new oi(Ar.paint_symbol["icon-translate"]),"icon-translate-anchor":new oi(Ar.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ei(Ar.paint_symbol["text-opacity"]),"text-color":new Ei(Ar.paint_symbol["text-color"],{runtimeType:Pn,getOverride:function(P){return P.textColor},hasOverride:function(P){return!!P.textColor}}),"text-halo-color":new Ei(Ar.paint_symbol["text-halo-color"]),"text-halo-width":new Ei(Ar.paint_symbol["text-halo-width"]),"text-halo-blur":new Ei(Ar.paint_symbol["text-halo-blur"]),"text-translate":new oi(Ar.paint_symbol["text-translate"]),"text-translate-anchor":new oi(Ar.paint_symbol["text-translate-anchor"])}),Yp={paint:u3,layout:l3},Eh=function(R){this.type=R.property.overrides?R.property.overrides.runtimeType:Hr,this.defaultValue=R};Eh.prototype.evaluate=function(R){if(R.formattedSection){var W=this.defaultValue.property.overrides;if(W&&W.hasOverride(R.formattedSection))return W.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default},Eh.prototype.eachChild=function(R){if(!this.defaultValue.isConstant()){var W=this.defaultValue.value;R(W._styleExpression.expression)}},Eh.prototype.outputDefined=function(){return!1},Eh.prototype.serialize=function(){return null},Bt("FormatSectionOverride",Eh,{omit:["defaultValue"]});var f3=function(P){function R(W){P.call(this,W,Yp)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.recalculate=function(at,vt){if(P.prototype.recalculate.call(this,at,vt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var St=this.layout.get("text-writing-mode");if(St){for(var Pt=[],te=0,ye=St;te",targetMapId:vt,sourceMapId:Pt.mapId})}}},_h.prototype.receive=function(R){var W=R.data,at=W.id;if(at&&!(W.targetMapId&&this.mapId!==W.targetMapId))if(W.type===""){delete this.tasks[at];var vt=this.cancelCallbacks[at];delete this.cancelCallbacks[at],vt&&vt()}else j()||W.mustQueue?(this.tasks[at]=W,this.taskQueue.push(at),this.invoker.trigger()):this.processTask(at,W)},_h.prototype.process=function(){if(this.taskQueue.length){var R=this.taskQueue.shift(),W=this.tasks[R];delete this.tasks[R],this.taskQueue.length&&this.invoker.trigger(),W&&this.processTask(R,W)}},_h.prototype.processTask=function(R,W){var at=this;if(W.type===""){var vt=this.callbacks[R];delete this.callbacks[R],vt&&(W.error?vt(Ee(W.error)):vt(null,Ee(W.data)))}else{var St=!1,Pt=ut(this.globalScope)?void 0:[],te=W.hasCallback?function(ar,tr){St=!0,delete at.cancelCallbacks[R],at.target.postMessage({id:R,type:"",sourceMapId:at.mapId,error:ar?De(ar):null,data:De(tr,Pt)},Pt)}:function(ar){St=!0},ye=null,_e=Ee(W.data);if(this.parent[W.type])ye=this.parent[W.type](W.sourceMapId,_e,te);else if(this.parent.getWorkerSource){var Fe=W.type.split("."),je=this.parent.getWorkerSource(W.sourceMapId,Fe[0],_e.source);ye=je[Fe[1]](_e,te)}else te(new Error("Could not find function "+W.type));!St&&ye&&ye.cancel&&(this.cancelCallbacks[R]=ye.cancel)}},_h.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function w3(P,R,W){R=Math.pow(2,W)-R-1;var at=Yg(P*256,R*256,W),vt=Yg((P+1)*256,(R+1)*256,W);return at[0]+","+at[1]+","+vt[0]+","+vt[1]}function Yg(P,R,W){var at=2*Math.PI*6378137/256/Math.pow(2,W),vt=P*at-2*Math.PI*6378137/2,St=R*at-2*Math.PI*6378137/2;return[vt,St]}var io=function(R,W){R&&(W?this.setSouthWest(R).setNorthEast(W):R.length===4?this.setSouthWest([R[0],R[1]]).setNorthEast([R[2],R[3]]):this.setSouthWest(R[0]).setNorthEast(R[1]))};io.prototype.setNorthEast=function(R){return this._ne=R instanceof La?new La(R.lng,R.lat):La.convert(R),this},io.prototype.setSouthWest=function(R){return this._sw=R instanceof La?new La(R.lng,R.lat):La.convert(R),this},io.prototype.extend=function(R){var W=this._sw,at=this._ne,vt,St;if(R instanceof La)vt=R,St=R;else if(R instanceof io){if(vt=R._sw,St=R._ne,!vt||!St)return this}else{if(Array.isArray(R))if(R.length===4||R.every(Array.isArray)){var Pt=R;return this.extend(io.convert(Pt))}else{var te=R;return this.extend(La.convert(te))}return this}return!W&&!at?(this._sw=new La(vt.lng,vt.lat),this._ne=new La(St.lng,St.lat)):(W.lng=Math.min(vt.lng,W.lng),W.lat=Math.min(vt.lat,W.lat),at.lng=Math.max(St.lng,at.lng),at.lat=Math.max(St.lat,at.lat)),this},io.prototype.getCenter=function(){return new La((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},io.prototype.getSouthWest=function(){return this._sw},io.prototype.getNorthEast=function(){return this._ne},io.prototype.getNorthWest=function(){return new La(this.getWest(),this.getNorth())},io.prototype.getSouthEast=function(){return new La(this.getEast(),this.getSouth())},io.prototype.getWest=function(){return this._sw.lng},io.prototype.getSouth=function(){return this._sw.lat},io.prototype.getEast=function(){return this._ne.lng},io.prototype.getNorth=function(){return this._ne.lat},io.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},io.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},io.prototype.isEmpty=function(){return!(this._sw&&this._ne)},io.prototype.contains=function(R){var W=La.convert(R),at=W.lng,vt=W.lat,St=this._sw.lat<=vt&&vt<=this._ne.lat,Pt=this._sw.lng<=at&&at<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Pt=this._sw.lng>=at&&at>=this._ne.lng),St&&Pt},io.convert=function(R){return!R||R instanceof io?R:new io(R)};var Xg=63710088e-1,La=function(R,W){if(isNaN(R)||isNaN(W))throw new Error("Invalid LngLat object: ("+R+", "+W+")");if(this.lng=+R,this.lat=+W,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};La.prototype.wrap=function(){return new La(b(this.lng,-180,180),this.lat)},La.prototype.toArray=function(){return[this.lng,this.lat]},La.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},La.prototype.distanceTo=function(R){var W=Math.PI/180,at=this.lat*W,vt=R.lat*W,St=Math.sin(at)*Math.sin(vt)+Math.cos(at)*Math.cos(vt)*Math.cos((R.lng-this.lng)*W),Pt=Xg*Math.acos(Math.min(St,1));return Pt},La.prototype.toBounds=function(R){R===void 0&&(R=0);var W=40075017,at=360*R/W,vt=at/Math.cos(Math.PI/180*this.lat);return new io(new La(this.lng-vt,this.lat-at),new La(this.lng+vt,this.lat+at))},La.convert=function(R){if(R instanceof La)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new La(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new La(Number("lng"in R?R.lng:R.lon),Number(R.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Zg=2*Math.PI*Xg;function jg(P){return Zg*Math.cos(P*Math.PI/180)}function Kg(P){return(180+P)/360}function Jg(P){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+P*Math.PI/360)))/360}function Qg(P,R){return P/jg(R)}function T3(P){return P*360-180}function Zp(P){var R=180-P*360;return 360/Math.PI*Math.atan(Math.exp(R*Math.PI/180))-90}function A3(P,R){return P*jg(Zp(R))}function M3(P){return 1/Math.cos(P*Math.PI/180)}var Gc=function(R,W,at){at===void 0&&(at=0),this.x=+R,this.y=+W,this.z=+at};Gc.fromLngLat=function(R,W){W===void 0&&(W=0);var at=La.convert(R);return new Gc(Kg(at.lng),Jg(at.lat),Qg(W,at.lat))},Gc.prototype.toLngLat=function(){return new La(T3(this.x),Zp(this.y))},Gc.prototype.toAltitude=function(){return A3(this.z,this.y)},Gc.prototype.meterInMercatorCoordinateUnits=function(){return 1/Zg*M3(Zp(this.y))};var Wc=function(R,W,at){this.z=R,this.x=W,this.y=at,this.key=Fv(0,R,R,W,at)};Wc.prototype.equals=function(R){return this.z===R.z&&this.x===R.x&&this.y===R.y},Wc.prototype.url=function(R,W){var at=w3(this.x,this.y,this.z),vt=S3(this.z,this.x,this.y);return R[(this.x+this.y)%R.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(W==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",vt).replace("{bbox-epsg-3857}",at)},Wc.prototype.getTilePoint=function(R){var W=Math.pow(2,this.z);return new r((R.x*W-this.x)*Ai,(R.y*W-this.y)*Ai)},Wc.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var $g=function(R,W){this.wrap=R,this.canonical=W,this.key=Fv(R,W.z,W.z,W.x,W.y)},ao=function(R,W,at,vt,St){this.overscaledZ=R,this.wrap=W,this.canonical=new Wc(at,+vt,+St),this.key=Fv(W,R,at,vt,St)};ao.prototype.equals=function(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)},ao.prototype.scaledTo=function(R){var W=this.canonical.z-R;return R>this.canonical.z?new ao(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ao(R,this.wrap,R,this.canonical.x>>W,this.canonical.y>>W)},ao.prototype.calculateScaledKey=function(R,W){var at=this.canonical.z-R;return R>this.canonical.z?Fv(this.wrap*+W,R,this.canonical.z,this.canonical.x,this.canonical.y):Fv(this.wrap*+W,R,R,this.canonical.x>>at,this.canonical.y>>at)},ao.prototype.isChildOf=function(R){if(R.wrap!==this.wrap)return!1;var W=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ>W&&R.canonical.y===this.canonical.y>>W},ao.prototype.children=function(R){if(this.overscaledZ>=R)return[new ao(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var W=this.canonical.z+1,at=this.canonical.x*2,vt=this.canonical.y*2;return[new ao(W,this.wrap,W,at,vt),new ao(W,this.wrap,W,at+1,vt),new ao(W,this.wrap,W,at,vt+1),new ao(W,this.wrap,W,at+1,vt+1)]},ao.prototype.isLessThan=function(R){return this.wrapR.wrap?!1:this.overscaledZR.overscaledZ?!1:this.canonical.xR.canonical.x?!1:this.canonical.y0;St--)vt=1<=this.dim+1||W<-1||W>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(W+1)*this.stride+(R+1)},uf.prototype._unpackMapbox=function(R,W,at){return(R*256*256+W*256+at)/10-1e4},uf.prototype._unpackTerrarium=function(R,W,at){return R*256+W+at/256-32768},uf.prototype.getPixels=function(){return new us({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},uf.prototype.backfillBorder=function(R,W,at){if(this.dim!==R.dim)throw new Error("dem dimension mismatch");var vt=W*this.dim,St=W*this.dim+this.dim,Pt=at*this.dim,te=at*this.dim+this.dim;switch(W){case-1:vt=St-1;break;case 1:St=vt+1;break}switch(at){case-1:Pt=te-1;break;case 1:te=Pt+1;break}for(var ye=-W*this.dim,_e=-at*this.dim,Fe=Pt;Fe=0&&je[3]>=0&&ye.insert(te,je[0],je[1],je[2],je[3])}},ff.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new gh.VectorTile(new vd(this.rawTileData)).layers,this.sourceLayerCoder=new Ad(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ff.prototype.query=function(R,W,at,vt){var St=this;this.loadVTLayers();for(var Pt=R.params||{},te=Ai/R.tileSize/R.scale,ye=Os(Pt.filter),_e=R.queryGeometry,Fe=R.queryPadding*te,je=tm(_e),ar=this.grid.query(je.minX-Fe,je.minY-Fe,je.maxX+Fe,je.maxY+Fe),tr=tm(R.cameraQueryGeometry),yr=this.grid3D.query(tr.minX-Fe,tr.minY-Fe,tr.maxX+Fe,tr.maxY+Fe,function(Wn,ei,$n,bi){return Pl(R.cameraQueryGeometry,Wn-Fe,ei-Fe,$n+Fe,bi+Fe)}),zr=0,ln=yr;zrvt)St=!1;else if(!W)St=!0;else if(this.expirationTime=mr.maxzoom)&&mr.visibility!=="none"){n(dr,this.zoom,Ce);var xr=ur[mr.id]=mr.createBucket({index:Je.bucketLayerIDs.length,layers:dr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ne,sourceID:this.source});xr.populate(Oe,hr,this.tileID.canonical),Je.bucketLayerIDs.push(dr.map(function(Tr){return Tr.id}))}}}}var pr,Gr,Pr,Dr,cn=i.mapObject(hr.glyphDependencies,function(Tr){return Object.keys(Tr).map(Number)});Object.keys(cn).length?Ie.send("getGlyphs",{uid:this.uid,stacks:cn},function(Tr,Cr){pr||(pr=Tr,Gr=Cr,En.call(ke))}):Gr={};var rn=Object.keys(hr.iconDependencies);rn.length?Ie.send("getImages",{icons:rn,source:this.source,tileID:this.tileID,type:"icons"},function(Tr,Cr){pr||(pr=Tr,Pr=Cr,En.call(ke))}):Pr={};var Cn=Object.keys(hr.patternDependencies);Cn.length?Ie.send("getImages",{icons:Cn,source:this.source,tileID:this.tileID,type:"patterns"},function(Tr,Cr){pr||(pr=Tr,Dr=Cr,En.call(ke))}):Dr={},En.call(this);function En(){if(pr)return Pe(pr);if(Gr&&Pr&&Dr){var Tr=new e(Gr),Cr=new i.ImageAtlas(Pr,Dr);for(var Wr in ur){var Ur=ur[Wr];Ur instanceof i.SymbolBucket?(n(Ur.layers,this.zoom,Ce),i.performSymbolLayout(Ur,Gr,Tr.positions,Pr,Cr.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Ur.hasPattern&&(Ur instanceof i.LineBucket||Ur instanceof i.FillBucket||Ur instanceof i.FillExtrusionBucket)&&(n(Ur.layers,this.zoom,Ce),Ur.addFeatures(hr,this.tileID.canonical,Cr.patternPositions))}this.status="done",Pe(null,{buckets:i.values(ur).filter(function(an){return!an.isEmpty()}),featureIndex:Je,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Tr.image,imageAtlas:Cr,glyphMap:this.returnDependencies?Gr:null,iconMap:this.returnDependencies?Pr:null,glyphPositions:this.returnDependencies?Tr.positions:null})}}};function n(ge,se,Ae){for(var Ce=new i.EvaluationParameters(se),Ie=0,Pe=ge;Ie=0!=!!se&&ge.reverse()}var d=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=function(se){this._feature=se,this.extent=i.EXTENT,this.type=se.type,this.properties=se.tags,"id"in se&&!isNaN(se.id)&&(this.id=parseInt(se.id,10))};w.prototype.loadGeometry=function(){if(this._feature.type===1){for(var se=[],Ae=0,Ce=this._feature.geometry;Ae"u"&&(Ce.push(Ve),Je=Ce.length-1,Pe[Ve]=Je),se.writeVarint(Je);var ur=Ae.properties[Ve],hr=typeof ur;hr!=="string"&&hr!=="boolean"&&hr!=="number"&&(ur=JSON.stringify(ur));var vr=hr+":"+ur,Yt=ke[vr];typeof Yt>"u"&&(Ie.push(ur),Yt=Ie.length-1,ke[vr]=Yt),se.writeVarint(Yt)}}function H(ge,se){return(se<<3)+(ge&7)}function Y(ge){return ge<<1^ge>>31}function j(ge,se){for(var Ae=ge.loadGeometry(),Ce=ge.type,Ie=0,Pe=0,ke=Ae.length,Ve=0;Ve>1;ut(ge,se,ke,Ce,Ie,Pe%2),it(ge,se,Ae,Ce,ke-1,Pe+1),it(ge,se,Ae,ke+1,Ie,Pe+1)}}function ut(ge,se,Ae,Ce,Ie,Pe){for(;Ie>Ce;){if(Ie-Ce>600){var ke=Ie-Ce+1,Ve=Ae-Ce+1,Je=Math.log(ke),ur=.5*Math.exp(2*Je/3),hr=.5*Math.sqrt(Je*ur*(ke-ur)/ke)*(Ve-ke/2<0?-1:1),vr=Math.max(Ce,Math.floor(Ae-Ve*ur/ke+hr)),Yt=Math.min(Ie,Math.floor(Ae+(ke-Ve)*ur/ke+hr));ut(ge,se,Ae,vr,Yt,Pe)}var Gt=se[2*Ae+Pe],Ne=Ce,Oe=Ie;for(J(ge,se,Ce,Ae),se[2*Ie+Pe]>Gt&&J(ge,se,Ce,Ie);NeGt;)Oe--}se[2*Ce+Pe]===Gt?J(ge,se,Ce,Oe):(Oe++,J(ge,se,Oe,Ie)),Oe<=Ae&&(Ce=Oe+1),Ae<=Oe&&(Ie=Oe-1)}}function J(ge,se,Ae,Ce){X(ge,Ae,Ce),X(se,2*Ae,2*Ce),X(se,2*Ae+1,2*Ce+1)}function X(ge,se,Ae){var Ce=ge[se];ge[se]=ge[Ae],ge[Ae]=Ce}function tt(ge,se,Ae,Ce,Ie,Pe,ke){for(var Ve=[0,ge.length-1,0],Je=[],ur,hr;Ve.length;){var vr=Ve.pop(),Yt=Ve.pop(),Gt=Ve.pop();if(Yt-Gt<=ke){for(var Ne=Gt;Ne<=Yt;Ne++)ur=se[2*Ne],hr=se[2*Ne+1],ur>=Ae&&ur<=Ie&&hr>=Ce&&hr<=Pe&&Je.push(ge[Ne]);continue}var Oe=Math.floor((Gt+Yt)/2);ur=se[2*Oe],hr=se[2*Oe+1],ur>=Ae&&ur<=Ie&&hr>=Ce&&hr<=Pe&&Je.push(ge[Oe]);var Qe=(vr+1)%2;(vr===0?Ae<=ur:Ce<=hr)&&(Ve.push(Gt),Ve.push(Oe-1),Ve.push(Qe)),(vr===0?Ie>=ur:Pe>=hr)&&(Ve.push(Oe+1),Ve.push(Yt),Ve.push(Qe))}return Je}function V(ge,se,Ae,Ce,Ie,Pe){for(var ke=[0,ge.length-1,0],Ve=[],Je=Ie*Ie;ke.length;){var ur=ke.pop(),hr=ke.pop(),vr=ke.pop();if(hr-vr<=Pe){for(var Yt=vr;Yt<=hr;Yt++)Q(se[2*Yt],se[2*Yt+1],Ae,Ce)<=Je&&Ve.push(ge[Yt]);continue}var Gt=Math.floor((vr+hr)/2),Ne=se[2*Gt],Oe=se[2*Gt+1];Q(Ne,Oe,Ae,Ce)<=Je&&Ve.push(ge[Gt]);var Qe=(ur+1)%2;(ur===0?Ae-Ie<=Ne:Ce-Ie<=Oe)&&(ke.push(vr),ke.push(Gt-1),ke.push(Qe)),(ur===0?Ae+Ie>=Ne:Ce+Ie>=Oe)&&(ke.push(Gt+1),ke.push(hr),ke.push(Qe))}return Ve}function Q(ge,se,Ae,Ce){var Ie=ge-Ae,Pe=se-Ce;return Ie*Ie+Pe*Pe}var ot=function(ge){return ge[0]},$=function(ge){return ge[1]},Z=function(se,Ae,Ce,Ie,Pe){Ae===void 0&&(Ae=ot),Ce===void 0&&(Ce=$),Ie===void 0&&(Ie=64),Pe===void 0&&(Pe=Float64Array),this.nodeSize=Ie,this.points=se;for(var ke=se.length<65536?Uint16Array:Uint32Array,Ve=this.ids=new ke(se.length),Je=this.coords=new Pe(se.length*2),ur=0;ur=Ie;hr--){var vr=+Date.now();Je=this._cluster(Je,hr),this.trees[hr]=new Z(Je,Ht,Ut,ke,Float32Array),Ce&&console.log("z%d: %d clusters in %dms",hr,Je.length,+Date.now()-vr)}return Ce&&console.timeEnd("total time"),this},nt.prototype.getClusters=function(se,Ae){var Ce=((se[0]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,se[1])),Pe=se[2]===180?180:((se[2]+180)%360+360)%360-180,ke=Math.max(-90,Math.min(90,se[3]));if(se[2]-se[0]>=360)Ce=-180,Pe=180;else if(Ce>Pe){var Ve=this.getClusters([Ce,Ie,180,ke],Ae),Je=this.getClusters([-180,Ie,Pe,ke],Ae);return Ve.concat(Je)}for(var ur=this.trees[this._limitZoom(Ae)],hr=ur.range(Rt(Ce),bt(ke),Rt(Pe),bt(Ie)),vr=[],Yt=0,Gt=hr;YtAe&&(Oe+=rr.numPoints||1)}if(Oe>=Je){for(var He=vr.x*Ne,dr=vr.y*Ne,mr=Ve&&Ne>1?this._map(vr,!0):null,xr=(hr<<5)+(Ae+1)+this.points.length,pr=0,Gr=Gt;pr1)for(var rn=0,Cn=Gt;rn>5},nt.prototype._getOriginZoom=function(se){return(se-this.points.length)%32},nt.prototype._map=function(se,Ae){if(se.numPoints)return Ae?Lt({},se.properties):se.properties;var Ce=this.points[se.index].properties,Ie=this.options.map(Ce);return Ae&&Ie===Ce?Lt({},Ie):Ie};function ct(ge,se,Ae,Ce,Ie){return{x:ge,y:se,zoom:1/0,id:Ae,parentId:-1,numPoints:Ce,properties:Ie}}function gt(ge,se){var Ae=ge.geometry.coordinates,Ce=Ae[0],Ie=Ae[1];return{x:Rt(Ce),y:bt(Ie),zoom:1/0,index:se,parentId:-1}}function Tt(ge){return{type:"Feature",id:ge.id,properties:wt(ge),geometry:{type:"Point",coordinates:[At(ge.x),mt(ge.y)]}}}function wt(ge){var se=ge.numPoints,Ae=se>=1e4?Math.round(se/1e3)+"k":se>=1e3?Math.round(se/100)/10+"k":se;return Lt(Lt({},ge.properties),{cluster:!0,cluster_id:ge.id,point_count:se,point_count_abbreviated:Ae})}function Rt(ge){return ge/360+.5}function bt(ge){var se=Math.sin(ge*Math.PI/180),Ae=.5-.25*Math.log((1+se)/(1-se))/Math.PI;return Ae<0?0:Ae>1?1:Ae}function At(ge){return(ge-.5)*360}function mt(ge){var se=(180-ge*360)*Math.PI/180;return 360*Math.atan(Math.exp(se))/Math.PI-90}function Lt(ge,se){for(var Ae in se)ge[Ae]=se[Ae];return ge}function Ht(ge){return ge.x}function Ut(ge){return ge.y}function kt(ge,se,Ae,Ce){for(var Ie=Ce,Pe=Ae-se>>1,ke=Ae-se,Ve,Je=ge[se],ur=ge[se+1],hr=ge[Ae],vr=ge[Ae+1],Yt=se+3;YtIe)Ve=Yt,Ie=Gt;else if(Gt===Ie){var Ne=Math.abs(Yt-Pe);NeCe&&(Ve-se>3&&kt(ge,se,Ve,Ce),ge[Ve+2]=Ie,Ae-Ve>3&&kt(ge,Ve,Ae,Ce))}function Vt(ge,se,Ae,Ce,Ie,Pe){var ke=Ie-Ae,Ve=Pe-Ce;if(ke!==0||Ve!==0){var Je=((ge-Ae)*ke+(se-Ce)*Ve)/(ke*ke+Ve*Ve);Je>1?(Ae=Ie,Ce=Pe):Je>0&&(Ae+=ke*Je,Ce+=Ve*Je)}return ke=ge-Ae,Ve=se-Ce,ke*ke+Ve*Ve}function It(ge,se,Ae,Ce){var Ie={id:typeof ge>"u"?null:ge,type:se,geometry:Ae,tags:Ce,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return re(Ie),Ie}function re(ge){var se=ge.geometry,Ae=ge.type;if(Ae==="Point"||Ae==="MultiPoint"||Ae==="LineString")Kt(ge,se);else if(Ae==="Polygon"||Ae==="MultiLineString")for(var Ce=0;Ce0&&(Ce?ke+=(Ie*ur-Je*Pe)/2:ke+=Math.sqrt(Math.pow(Je-Ie,2)+Math.pow(ur-Pe,2))),Ie=Je,Pe=ur}var hr=se.length-3;se[2]=1,kt(se,0,hr,Ae),se[hr+2]=1,se.size=Math.abs(ke),se.start=0,se.end=se.size}function xe(ge,se,Ae,Ce){for(var Ie=0;Ie1?1:Ae}function zt(ge,se,Ae,Ce,Ie,Pe,ke,Ve){if(Ae/=se,Ce/=se,Pe>=Ae&&ke=Ce)return null;for(var Je=[],ur=0;ur=Ae&&Ne=Ce)continue;var Oe=[];if(Yt==="Point"||Yt==="MultiPoint")Xt(vr,Oe,Ae,Ce,Ie);else if(Yt==="LineString")Jt(vr,Oe,Ae,Ce,Ie,!1,Ve.lineMetrics);else if(Yt==="MultiLineString")Ft(vr,Oe,Ae,Ce,Ie,!1);else if(Yt==="Polygon")Ft(vr,Oe,Ae,Ce,Ie,!0);else if(Yt==="MultiPolygon")for(var Qe=0;Qe=Ae&&ke<=Ce&&(se.push(ge[Pe]),se.push(ge[Pe+1]),se.push(ge[Pe+2]))}}function Jt(ge,se,Ae,Ce,Ie,Pe,ke){for(var Ve=Wt(ge),Je=Ie===0?yt:Et,ur=ge.start,hr,vr,Yt=0;YtAe&&(vr=Je(Ve,Gt,Ne,Qe,er,Ae),ke&&(Ve.start=ur+hr*vr)):fr>Ce?rr=Ae&&(vr=Je(Ve,Gt,Ne,Qe,er,Ae),He=!0),rr>Ce&&fr<=Ce&&(vr=Je(Ve,Gt,Ne,Qe,er,Ce),He=!0),!Pe&&He&&(ke&&(Ve.end=ur+hr*vr),se.push(Ve),Ve=Wt(ge)),ke&&(ur+=hr)}var dr=ge.length-3;Gt=ge[dr],Ne=ge[dr+1],Oe=ge[dr+2],fr=Ie===0?Gt:Ne,fr>=Ae&&fr<=Ce&&xt(Ve,Gt,Ne,Oe),dr=Ve.length-3,Pe&&dr>=3&&(Ve[dr]!==Ve[0]||Ve[dr+1]!==Ve[1])&&xt(Ve,Ve[0],Ve[1],Ve[2]),Ve.length&&se.push(Ve)}function Wt(ge){var se=[];return se.size=ge.size,se.start=ge.start,se.end=ge.end,se}function Ft(ge,se,Ae,Ce,Ie,Pe){for(var ke=0;keke.maxX&&(ke.maxX=hr),vr>ke.maxY&&(ke.maxY=vr)}return ke}function ve(ge,se,Ae,Ce){var Ie=se.geometry,Pe=se.type,ke=[];if(Pe==="Point"||Pe==="MultiPoint")for(var Ve=0;Ve0&&se.size<(Ie?ke:Ce)){Ae.numPoints+=se.length/3;return}for(var Ve=[],Je=0;Jeke)&&(Ae.numSimplified++,Ve.push(se[Je]),Ve.push(se[Je+1])),Ae.numPoints++;Ie&&ce(Ve,Pe),ge.push(Ve)}function ce(ge,se){for(var Ae=0,Ce=0,Ie=ge.length,Pe=Ie-2;Ce0===se)for(Ce=0,Ie=ge.length;Ce24)throw new Error("maxZoom should be in the 0-24 range");if(se.promoteId&&se.generateId)throw new Error("promoteId and generateId cannot be used together.");var Ce=$t(ge,se);this.tiles={},this.tileCoords=[],Ae&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",se.indexMaxZoom,se.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ce=Mt(Ce,se),Ce.length&&this.splitTile(Ce,0,0,0),Ae&&(Ce.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Be.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Be.prototype.splitTile=function(ge,se,Ae,Ce,Ie,Pe,ke){for(var Ve=[ge,se,Ae,Ce],Je=this.options,ur=Je.debug;Ve.length;){Ce=Ve.pop(),Ae=Ve.pop(),se=Ve.pop(),ge=Ve.pop();var hr=1<1&&console.time("creation"),Yt=this.tiles[vr]=be(ge,se,Ae,Ce,Je),this.tileCoords.push({z:se,x:Ae,y:Ce}),ur)){ur>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",se,Ae,Ce,Yt.numFeatures,Yt.numPoints,Yt.numSimplified),console.timeEnd("creation"));var Gt="z"+se;this.stats[Gt]=(this.stats[Gt]||0)+1,this.total++}if(Yt.source=ge,Ie){if(se===Je.maxZoom||se===Ie)continue;var Ne=1<1&&console.time("clipping");var Oe=.5*Je.buffer/Je.extent,Qe=.5-Oe,er=.5+Oe,fr=1+Oe,rr,He,dr,mr,xr,pr;rr=He=dr=mr=null,xr=zt(ge,hr,Ae-Oe,Ae+er,0,Yt.minX,Yt.maxX,Je),pr=zt(ge,hr,Ae+Qe,Ae+fr,0,Yt.minX,Yt.maxX,Je),ge=null,xr&&(rr=zt(xr,hr,Ce-Oe,Ce+er,1,Yt.minY,Yt.maxY,Je),He=zt(xr,hr,Ce+Qe,Ce+fr,1,Yt.minY,Yt.maxY,Je),xr=null),pr&&(dr=zt(pr,hr,Ce-Oe,Ce+er,1,Yt.minY,Yt.maxY,Je),mr=zt(pr,hr,Ce+Qe,Ce+fr,1,Yt.minY,Yt.maxY,Je),pr=null),ur>1&&console.timeEnd("clipping"),Ve.push(rr||[],se+1,Ae*2,Ce*2),Ve.push(He||[],se+1,Ae*2,Ce*2+1),Ve.push(dr||[],se+1,Ae*2+1,Ce*2),Ve.push(mr||[],se+1,Ae*2+1,Ce*2+1)}}},Be.prototype.getTile=function(ge,se,Ae){var Ce=this.options,Ie=Ce.extent,Pe=Ce.debug;if(ge<0||ge>24)return null;var ke=1<1&&console.log("drilling down to z%d-%d-%d",ge,se,Ae);for(var Je=ge,ur=se,hr=Ae,vr;!vr&&Je>0;)Je--,ur=Math.floor(ur/2),hr=Math.floor(hr/2),vr=this.tiles[ir(Je,ur,hr)];return!vr||!vr.source?null:(Pe>1&&console.log("found parent tile z%d-%d-%d",Je,ur,hr),Pe>1&&console.time("drilling down"),this.splitTile(vr.source,Je,ur,hr,ge,se,Ae),Pe>1&&console.timeEnd("drilling down"),this.tiles[Ve]?ie(this.tiles[Ve],Ie):null)};function ir(ge,se,Ae){return((1<=0?0:ht.button},x.remove=function(ht){ht.parentNode&&ht.parentNode.removeChild(ht)};function l(ht,K,dt){var rt,pt,Ot,Qt=i.browser.devicePixelRatio>1?"@2x":"",ue=i.getJSON(K.transformRequest(K.normalizeSpriteURL(ht,Qt,".json"),i.ResourceType.SpriteJSON),function(qe,cr){ue=null,Ot||(Ot=qe,rt=cr,We())}),Re=i.getImage(K.transformRequest(K.normalizeSpriteURL(ht,Qt,".png"),i.ResourceType.SpriteImage),function(qe,cr){Re=null,Ot||(Ot=qe,pt=cr,We())});function We(){if(Ot)dt(Ot);else if(rt&&pt){var qe=i.browser.getImageData(pt),cr={};for(var lr in rt){var Fr=rt[lr],Xr=Fr.width,Yr=Fr.height,Vr=Fr.x,Kr=Fr.y,fn=Fr.sdf,Fn=Fr.pixelRatio,Nn=Fr.stretchX,Yn=Fr.stretchY,Xn=Fr.content,Gn=new i.RGBAImage({width:Xr,height:Yr});i.RGBAImage.copy(qe,Gn,{x:Vr,y:Kr},{x:0,y:0},{width:Xr,height:Yr}),cr[lr]={data:Gn,pixelRatio:Fn,sdf:fn,stretchX:Nn,stretchY:Yn,content:Xn}}dt(null,cr)}}return{cancel:function(){ue&&(ue.cancel(),ue=null),Re&&(Re.cancel(),Re=null)}}}function m(ht){var K=ht.userImage;if(K&&K.render){var dt=K.render();if(dt)return ht.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var v=1,b=function(ht){function K(){ht.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.isLoaded=function(){return this.loaded},K.prototype.setLoaded=function(rt){if(this.loaded!==rt&&(this.loaded=rt,rt)){for(var pt=0,Ot=this.requestors;pt=0?1.2:1))}A.prototype.draw=function(ht){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ht,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),dt=new Uint8ClampedArray(this.size*this.size),rt=0;rt65535){qe(new Error("glyphs > 65535 not supported"));return}if(Fr.ranges[Yr]){qe(null,{stack:cr,id:lr,glyph:Xr});return}var Vr=Fr.requests[Yr];Vr||(Vr=Fr.requests[Yr]=[],E.loadGlyphRange(cr,Yr,rt.url,rt.requestManager,function(Kr,fn){if(fn){for(var Fn in fn)rt._doesCharSupportLocalGlyph(+Fn)||(Fr.glyphs[+Fn]=fn[+Fn]);Fr.ranges[Yr]=!0}for(var Nn=0,Yn=Vr;Nn1&&(We=K[++Re]);var cr=Math.abs(qe-We.left),lr=Math.abs(qe-We.right),Fr=Math.min(cr,lr),Xr=void 0,Yr=Ot/rt*(pt+1);if(We.isDash){var Vr=pt-Math.abs(Yr);Xr=Math.sqrt(Fr*Fr+Vr*Vr)}else Xr=pt-Math.sqrt(Fr*Fr+Yr*Yr);this.data[ue+qe]=Math.max(0,Math.min(255,Xr+128))}},z.prototype.addRegularDash=function(K){for(var dt=K.length-1;dt>=0;--dt){var rt=K[dt],pt=K[dt+1];rt.zeroLength?K.splice(dt,1):pt&&pt.isDash===rt.isDash&&(pt.left=rt.left,K.splice(dt,1))}var Ot=K[0],Qt=K[K.length-1];Ot.isDash===Qt.isDash&&(Ot.left=Qt.left-this.width,Qt.right=Ot.right+this.width);for(var ue=this.width*this.nextRow,Re=0,We=K[Re],qe=0;qe1&&(We=K[++Re]);var cr=Math.abs(qe-We.left),lr=Math.abs(qe-We.right),Fr=Math.min(cr,lr),Xr=We.isDash?Fr:-Fr;this.data[ue+qe]=Math.max(0,Math.min(255,Xr+128))}},z.prototype.addDash=function(K,dt){var rt=dt?7:0,pt=2*rt+1;if(this.nextRow+pt>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var Ot=0,Qt=0;Qt=rt.minX&&K.x=rt.minY&&K.y0&&(qe[new i.OverscaledTileID(rt.overscaledZ,ue,pt.z,Qt,pt.y-1).key]={backfilled:!1},qe[new i.OverscaledTileID(rt.overscaledZ,rt.wrap,pt.z,pt.x,pt.y-1).key]={backfilled:!1},qe[new i.OverscaledTileID(rt.overscaledZ,We,pt.z,Re,pt.y-1).key]={backfilled:!1}),pt.y+10&&(Ot.resourceTiming=rt._resourceTiming,rt._resourceTiming=[]),rt.fire(new i.Event("data",Ot))})},K.prototype.onAdd=function(rt){this.map=rt,this.load()},K.prototype.setData=function(rt){var pt=this;return this._data=rt,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ot){if(Ot){pt.fire(new i.ErrorEvent(Ot));return}var Qt={dataType:"source",sourceDataType:"content"};pt._collectResourceTiming&&pt._resourceTiming&&pt._resourceTiming.length>0&&(Qt.resourceTiming=pt._resourceTiming,pt._resourceTiming=[]),pt.fire(new i.Event("data",Qt))}),this},K.prototype.getClusterExpansionZoom=function(rt,pt){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:rt,source:this.id},pt),this},K.prototype.getClusterChildren=function(rt,pt){return this.actor.send("geojson.getClusterChildren",{clusterId:rt,source:this.id},pt),this},K.prototype.getClusterLeaves=function(rt,pt,Ot,Qt){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:rt,limit:pt,offset:Ot},Qt),this},K.prototype._updateWorkerData=function(rt){var pt=this;this._loaded=!1;var Ot=i.extend({},this.workerOptions),Qt=this._data;typeof Qt=="string"?(Ot.request=this.map._requestManager.transformRequest(i.browser.resolveURL(Qt),i.ResourceType.Source),Ot.request.collectResourceTiming=this._collectResourceTiming):Ot.data=JSON.stringify(Qt),this.actor.send(this.type+".loadData",Ot,function(ue,Re){pt._removed||Re&&Re.abandoned||(pt._loaded=!0,Re&&Re.resourceTiming&&Re.resourceTiming[pt.id]&&(pt._resourceTiming=Re.resourceTiming[pt.id].slice(0)),pt.actor.send(pt.type+".coalesce",{source:Ot.source},null),rt(ue))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(rt,pt){var Ot=this,Qt=rt.actor?"reloadTile":"loadTile";rt.actor=this.actor;var ue={type:this.type,uid:rt.uid,tileID:rt.tileID,zoom:rt.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};rt.request=this.actor.send(Qt,ue,function(Re,We){return delete rt.request,rt.unloadVectorData(),rt.aborted?pt(null):Re?pt(Re):(rt.loadVectorData(We,Ot.map.painter,Qt==="reloadTile"),pt(null))})},K.prototype.abortTile=function(rt){rt.request&&(rt.request.cancel(),delete rt.request),rt.aborted=!0},K.prototype.unloadTile=function(rt){rt.unloadVectorData(),this.actor.send("removeTile",{uid:rt.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K}(i.Evented),Y=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(ht){function K(dt,rt,pt,Ot){ht.call(this),this.id=dt,this.dispatcher=pt,this.coordinates=rt.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ot),this.options=rt}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.load=function(rt,pt){var Ot=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(Qt,ue){Ot._loaded=!0,Qt?Ot.fire(new i.ErrorEvent(Qt)):ue&&(Ot.image=ue,rt&&(Ot.coordinates=rt),pt&&pt(),Ot._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(rt){var pt=this;return!this.image||!rt.url?this:(this.options.url=rt.url,this.load(rt.coordinates,function(){pt.texture=null}),this)},K.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},K.prototype.onAdd=function(rt){this.map=rt,this.load()},K.prototype.setCoordinates=function(rt){var pt=this;this.coordinates=rt;var Ot=rt.map(i.MercatorCoordinate.fromLngLat);this.tileID=et(Ot),this.minzoom=this.maxzoom=this.tileID.z;var Qt=Ot.map(function(ue){return pt.tileID.getTilePoint(ue)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(Qt[0].x,Qt[0].y,0,0),this._boundsArray.emplaceBack(Qt[1].x,Qt[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(Qt[3].x,Qt[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(Qt[2].x,Qt[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})),this},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var rt=this.map.painter.context,pt=rt.gl;this.boundsBuffer||(this.boundsBuffer=rt.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(rt,this.image,pt.RGBA),this.texture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE));for(var Ot in this.tiles){var Qt=this.tiles[Ot];Qt.state!=="loaded"&&(Qt.state="loaded",Qt.texture=this.texture)}}},K.prototype.loadTile=function(rt,pt){this.tileID&&this.tileID.equals(rt.tileID.canonical)?(this.tiles[String(rt.tileID.wrap)]=rt,rt.buckets={},pt(null)):(rt.state="errored",pt(null))},K.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return!1},K}(i.Evented);function et(ht){for(var K=1/0,dt=1/0,rt=-1/0,pt=-1/0,Ot=0,Qt=ht;Otpt.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+pt.start(0)+" and "+pt.end(0)+"-second mark."))):this.video.currentTime=rt}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(rt){this.map||(this.map=rt,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var rt=this.map.painter.context,pt=rt.gl;this.boundsBuffer||(this.boundsBuffer=rt.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE),pt.texSubImage2D(pt.TEXTURE_2D,0,0,0,pt.RGBA,pt.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(rt,this.video,pt.RGBA),this.texture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE));for(var Ot in this.tiles){var Qt=this.tiles[Ot];Qt.state!=="loaded"&&(Qt.state="loaded",Qt.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this.video&&!this.video.paused},K}(j),ut=function(ht){function K(dt,rt,pt,Ot){ht.call(this,dt,rt,pt,Ot),rt.coordinates?(!Array.isArray(rt.coordinates)||rt.coordinates.length!==4||rt.coordinates.some(function(Qt){return!Array.isArray(Qt)||Qt.length!==2||Qt.some(function(ue){return typeof ue!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'missing required property "coordinates"'))),rt.animate&&typeof rt.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'optional "animate" property must be a boolean value'))),rt.canvas?typeof rt.canvas!="string"&&!(rt.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'missing required property "canvas"'))),this.options=rt,this.animate=rt.animate!==void 0?rt.animate:!0}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},K.prototype.getCanvas=function(){return this.canvas},K.prototype.onAdd=function(rt){this.map=rt,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var rt=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,rt=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,rt=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var pt=this.map.painter.context,Ot=pt.gl;this.boundsBuffer||(this.boundsBuffer=pt.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(rt||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(pt,this.canvas,Ot.RGBA,{premultiply:!0});for(var Qt in this.tiles){var ue=this.tiles[Qt];ue.state!=="loaded"&&(ue.state="loaded",ue.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this._playing},K.prototype._hasInvalidDimensions=function(){for(var rt=0,pt=[this.canvas.width,this.canvas.height];rtthis.max){var ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}return this},gt.prototype.has=function(K){return K.wrapped().key in this.data},gt.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},gt.prototype._getAndRemoveByKey=function(K){var dt=this.data[K].shift();return dt.timeout&&clearTimeout(dt.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),dt.value},gt.prototype.getByKey=function(K){var dt=this.data[K];return dt?dt[0].value:null},gt.prototype.get=function(K){if(!this.has(K))return null;var dt=this.data[K.wrapped().key][0];return dt.value},gt.prototype.remove=function(K,dt){if(!this.has(K))return this;var rt=K.wrapped().key,pt=dt===void 0?0:this.data[rt].indexOf(dt),Ot=this.data[rt][pt];return this.data[rt].splice(pt,1),Ot.timeout&&clearTimeout(Ot.timeout),this.data[rt].length===0&&delete this.data[rt],this.onRemove(Ot.value),this.order.splice(this.order.indexOf(rt),1),this},gt.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var dt=this._getAndRemoveByKey(this.order[0]);dt&&this.onRemove(dt)}return this},gt.prototype.filter=function(K){var dt=[];for(var rt in this.data)for(var pt=0,Ot=this.data[rt];pt1||(Math.abs(cr)>1&&(Math.abs(cr+Fr)===1?cr+=Fr:Math.abs(cr-Fr)===1&&(cr-=Fr)),!(!qe.dem||!We.dem)&&(We.dem.backfillBorder(qe.dem,cr,lr),We.neighboringTiles&&We.neighboringTiles[Xr]&&(We.neighboringTiles[Xr].backfilled=!0)))}},K.prototype.getTile=function(rt){return this.getTileByID(rt.key)},K.prototype.getTileByID=function(rt){return this._tiles[rt]},K.prototype._retainLoadedChildren=function(rt,pt,Ot,Qt){for(var ue in this._tiles){var Re=this._tiles[ue];if(!(Qt[ue]||!Re.hasData()||Re.tileID.overscaledZ<=pt||Re.tileID.overscaledZ>Ot)){for(var We=Re.tileID;Re&&Re.tileID.overscaledZ>pt+1;){var qe=Re.tileID.scaledTo(Re.tileID.overscaledZ-1);Re=this._tiles[qe.key],Re&&Re.hasData()&&(We=qe)}for(var cr=We;cr.overscaledZ>pt;)if(cr=cr.scaledTo(cr.overscaledZ-1),rt[cr.key]){Qt[We.key]=We;break}}}},K.prototype.findLoadedParent=function(rt,pt){if(rt.key in this._loadedParentTiles){var Ot=this._loadedParentTiles[rt.key];return Ot&&Ot.tileID.overscaledZ>=pt?Ot:null}for(var Qt=rt.overscaledZ-1;Qt>=pt;Qt--){var ue=rt.scaledTo(Qt),Re=this._getLoadedTile(ue);if(Re)return Re}},K.prototype._getLoadedTile=function(rt){var pt=this._tiles[rt.key];if(pt&&pt.hasData())return pt;var Ot=this._cache.getByKey(rt.wrapped().key);return Ot},K.prototype.updateCacheSize=function(rt){var pt=Math.ceil(rt.width/this._source.tileSize)+1,Ot=Math.ceil(rt.height/this._source.tileSize)+1,Qt=pt*Ot,ue=5,Re=Math.floor(Qt*ue),We=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Re):Re;this._cache.setMaxSize(We)},K.prototype.handleWrapJump=function(rt){var pt=this._prevLng===void 0?rt:this._prevLng,Ot=rt-pt,Qt=Ot/360,ue=Math.round(Qt);if(this._prevLng=rt,ue){var Re={};for(var We in this._tiles){var qe=this._tiles[We];qe.tileID=qe.tileID.unwrapTo(qe.tileID.wrap+ue),Re[qe.tileID.key]=qe}this._tiles=Re;for(var cr in this._timers)clearTimeout(this._timers[cr]),delete this._timers[cr];for(var lr in this._tiles){var Fr=this._tiles[lr];this._setTileReloadTimer(lr,Fr)}}},K.prototype.update=function(rt){var pt=this;if(this.transform=rt,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(rt),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ot;this.used?this._source.tileID?Ot=rt.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(si){return new i.OverscaledTileID(si.canonical.z,si.wrap,si.canonical.z,si.canonical.x,si.canonical.y)}):(Ot=rt.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ot=Ot.filter(function(si){return pt._source.hasTile(si)}))):Ot=[];var Qt=rt.coveringZoomLevel(this._source),ue=Math.max(Qt-K.maxOverzooming,this._source.minzoom),Re=Math.max(Qt+K.maxUnderzooming,this._source.minzoom),We=this._updateRetainedTiles(Ot,Qt);if(Je(this._source.type)){for(var qe={},cr={},lr=Object.keys(We),Fr=0,Xr=lr;Frthis._source.maxzoom){var fn=Vr.children(this._source.maxzoom)[0],Fn=this.getTile(fn);if(Fn&&Fn.hasData()){Ot[fn.key]=fn;continue}}else{var Nn=Vr.children(this._source.maxzoom);if(Ot[Nn[0].key]&&Ot[Nn[1].key]&&Ot[Nn[2].key]&&Ot[Nn[3].key])continue}for(var Yn=Kr.wasRequested(),Xn=Vr.overscaledZ-1;Xn>=ue;--Xn){var Gn=Vr.scaledTo(Xn);if(Qt[Gn.key]||(Qt[Gn.key]=!0,Kr=this.getTile(Gn),!Kr&&Yn&&(Kr=this._addTile(Gn)),Kr&&(Ot[Gn.key]=Gn,Yn=Kr.wasRequested(),Kr.hasData())))break}}}return Ot},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var rt in this._tiles){for(var pt=[],Ot=void 0,Qt=this._tiles[rt].tileID;Qt.overscaledZ>0;){if(Qt.key in this._loadedParentTiles){Ot=this._loadedParentTiles[Qt.key];break}pt.push(Qt.key);var ue=Qt.scaledTo(Qt.overscaledZ-1);if(Ot=this._getLoadedTile(ue),Ot)break;Qt=ue}for(var Re=0,We=pt;Re0)&&(pt.hasData()&&pt.state!=="reloading"?this._cache.add(pt.tileID,pt,pt.getExpiryTimeout()):(pt.aborted=!0,this._abortTile(pt),this._unloadTile(pt))))},K.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var rt in this._tiles)this._removeTile(rt);this._cache.reset()},K.prototype.tilesIn=function(rt,pt,Ot){var Qt=this,ue=[],Re=this.transform;if(!Re)return ue;for(var We=Ot?Re.getCameraQueryGeometry(rt):rt,qe=rt.map(function(Xn){return Re.pointCoordinate(Xn)}),cr=We.map(function(Xn){return Re.pointCoordinate(Xn)}),lr=this.getIds(),Fr=1/0,Xr=1/0,Yr=-1/0,Vr=-1/0,Kr=0,fn=cr;Kr=0&&yi[1].y+si>=0){var hi=qe.map(function(Ji){return jn.getTilePoint(Ji)}),Fi=cr.map(function(Ji){return jn.getTilePoint(Ji)});ue.push({tile:Gn,tileID:jn,queryGeometry:hi,cameraQueryGeometry:Fi,scale:ti})}}},Yn=0;Yn=i.browser.now())return!0}return!1},K.prototype.setFeatureState=function(rt,pt,Ot){rt=rt||"_geojsonTileLayer",this._state.updateState(rt,pt,Ot)},K.prototype.removeFeatureState=function(rt,pt,Ot){rt=rt||"_geojsonTileLayer",this._state.removeFeatureState(rt,pt,Ot)},K.prototype.getFeatureState=function(rt,pt){return rt=rt||"_geojsonTileLayer",this._state.getState(rt,pt)},K.prototype.setDependencies=function(rt,pt,Ot){var Qt=this._tiles[rt];Qt&&Qt.setDependencies(pt,Ot)},K.prototype.reloadTilesForDependencies=function(rt,pt){for(var Ot in this._tiles){var Qt=this._tiles[Ot];Qt.hasDependency(rt,pt)&&this._reloadTile(Ot,"reloading")}this._cache.filter(function(ue){return!ue.hasDependency(rt,pt)})},K}(i.Evented);ke.maxOverzooming=10,ke.maxUnderzooming=3;function Ve(ht,K){var dt=Math.abs(ht.wrap*2)-+(ht.wrap<0),rt=Math.abs(K.wrap*2)-+(K.wrap<0);return ht.overscaledZ-K.overscaledZ||rt-dt||K.canonical.y-ht.canonical.y||K.canonical.x-ht.canonical.x}function Je(ht){return ht==="raster"||ht==="image"||ht==="video"}function ur(){return new i.window.Worker(ro.workerUrl)}var hr="mapboxgl_preloaded_worker_pool",vr=function(){this.active={}};vr.prototype.acquire=function(K){if(!this.workers)for(this.workers=[];this.workers.length0?(pt-Qt)/ue:0;return this.points[Ot].mult(1-Re).add(this.points[dt].mult(Re))};var Tr=function(K,dt,rt){var pt=this.boxCells=[],Ot=this.circleCells=[];this.xCellCount=Math.ceil(K/rt),this.yCellCount=Math.ceil(dt/rt);for(var Qt=0;Qtthis.width||pt<0||dt>this.height)return Ot?!1:[];var ue=[];if(K<=0&&dt<=0&&this.width<=rt&&this.height<=pt){if(Ot)return!0;for(var Re=0;Re0:ue}},Tr.prototype._queryCircle=function(K,dt,rt,pt,Ot){var Qt=K-rt,ue=K+rt,Re=dt-rt,We=dt+rt;if(ue<0||Qt>this.width||We<0||Re>this.height)return pt?!1:[];var qe=[],cr={hitTest:pt,circle:{x:K,y:dt,radius:rt},seenUids:{box:{},circle:{}}};return this._forEachCell(Qt,Re,ue,We,this._queryCellCircle,qe,cr,Ot),pt?qe.length>0:qe},Tr.prototype.query=function(K,dt,rt,pt,Ot){return this._query(K,dt,rt,pt,!1,Ot)},Tr.prototype.hitTest=function(K,dt,rt,pt,Ot){return this._query(K,dt,rt,pt,!0,Ot)},Tr.prototype.hitTestCircle=function(K,dt,rt,pt){return this._queryCircle(K,dt,rt,!0,pt)},Tr.prototype._queryCell=function(K,dt,rt,pt,Ot,Qt,ue,Re){var We=ue.seenUids,qe=this.boxCells[Ot];if(qe!==null)for(var cr=this.bboxes,lr=0,Fr=qe;lr=cr[Yr+0]&&pt>=cr[Yr+1]&&(!Re||Re(this.boxKeys[Xr]))){if(ue.hitTest)return Qt.push(!0),!0;Qt.push({key:this.boxKeys[Xr],x1:cr[Yr],y1:cr[Yr+1],x2:cr[Yr+2],y2:cr[Yr+3]})}}}var Vr=this.circleCells[Ot];if(Vr!==null)for(var Kr=this.circles,fn=0,Fn=Vr;fnue*ue+Re*Re},Tr.prototype._circleAndRectCollide=function(K,dt,rt,pt,Ot,Qt,ue){var Re=(Qt-pt)/2,We=Math.abs(K-(pt+Re));if(We>Re+rt)return!1;var qe=(ue-Ot)/2,cr=Math.abs(dt-(Ot+qe));if(cr>qe+rt)return!1;if(We<=Re||cr<=qe)return!0;var lr=We-Re,Fr=cr-qe;return lr*lr+Fr*Fr<=rt*rt};function Cr(ht,K,dt,rt,pt){var Ot=i.create();return K?(i.scale(Ot,Ot,[1/pt,1/pt,1]),dt||i.rotateZ(Ot,Ot,rt.angle)):i.multiply(Ot,rt.labelPlaneMatrix,ht),Ot}function Wr(ht,K,dt,rt,pt){if(K){var Ot=i.clone(ht);return i.scale(Ot,Ot,[pt,pt,1]),dt||i.rotateZ(Ot,Ot,-rt.angle),Ot}else return rt.glCoordMatrix}function Ur(ht,K){var dt=[ht.x,ht.y,0,1];wr(dt,dt,K);var rt=dt[3];return{point:new i.Point(dt[0]/rt,dt[1]/rt),signedDistanceFromCamera:rt}}function an(ht,K){return .5+.5*(ht/K)}function pn(ht,K){var dt=ht[0]/ht[3],rt=ht[1]/ht[3],pt=dt>=-K[0]&&dt<=K[0]&&rt>=-K[1]&&rt<=K[1];return pt}function gn(ht,K,dt,rt,pt,Ot,Qt,ue){var Re=rt?ht.textSizeData:ht.iconSizeData,We=i.evaluateSizeForZoom(Re,dt.transform.zoom),qe=[256/dt.width*2+1,256/dt.height*2+1],cr=rt?ht.text.dynamicLayoutVertexArray:ht.icon.dynamicLayoutVertexArray;cr.clear();for(var lr=ht.lineVertexArray,Fr=rt?ht.text.placedSymbolArray:ht.icon.placedSymbolArray,Xr=dt.transform.width/dt.transform.height,Yr=!1,Vr=0;VrOt)return{useVertical:!0}}return(ht===i.WritingMode.vertical?K.ydt.x)?{needsFlipping:!0}:null}function ni(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We,qe,cr,lr,Fr){var Xr=K/24,Yr=ht.lineOffsetX*Xr,Vr=ht.lineOffsetY*Xr,Kr;if(ht.numGlyphs>1){var fn=ht.glyphStartIndex+ht.numGlyphs,Fn=ht.lineStartIndex,Nn=ht.lineStartIndex+ht.lineLength,Yn=_n(Xr,ue,Yr,Vr,dt,qe,cr,ht,Re,Ot,lr);if(!Yn)return{notEnoughRoom:!0};var Xn=Ur(Yn.first.point,Qt).point,Gn=Ur(Yn.last.point,Qt).point;if(rt&&!dt){var jn=kn(ht.writingMode,Xn,Gn,Fr);if(jn)return jn}Kr=[Yn.first];for(var ti=ht.glyphStartIndex+1;ti0?Fi.point:ci(cr,hi,si,1,pt),Gi=kn(ht.writingMode,si,Ji,Fr);if(Gi)return Gi}var Ai=di(Xr*ue.getoffsetX(ht.glyphStartIndex),Yr,Vr,dt,qe,cr,ht.segment,ht.lineStartIndex,ht.lineStartIndex+ht.lineLength,Re,Ot,lr);if(!Ai)return{notEnoughRoom:!0};Kr=[Ai]}for(var Yi=0,Ui=Kr;Yi0?1:-1,Xr=0;rt&&(Fr*=-1,Xr=Math.PI),Fr<0&&(Xr+=Math.PI);for(var Yr=Fr>0?ue+Qt:ue+Qt+1,Vr=pt,Kr=pt,fn=0,Fn=0,Nn=Math.abs(lr),Yn=[];fn+Fn<=Nn;){if(Yr+=Fr,Yr=Re)return null;if(Kr=Vr,Yn.push(Vr),Vr=cr[Yr],Vr===void 0){var Xn=new i.Point(We.getx(Yr),We.gety(Yr)),Gn=Ur(Xn,qe);if(Gn.signedDistanceFromCamera>0)Vr=cr[Yr]=Gn.point;else{var jn=Yr-Fr,ti=fn===0?Ot:new i.Point(We.getx(jn),We.gety(jn));Vr=ci(ti,Xn,Kr,Nn-fn+1,qe)}}fn+=Fn,Fn=Kr.dist(Vr)}var si=(Nn-fn)/Fn,yi=Vr.sub(Kr),hi=yi.mult(si)._add(Kr);hi._add(yi._unit()._perp()._mult(dt*Fr));var Fi=Xr+Math.atan2(Vr.y-Kr.y,Vr.x-Kr.x);return Yn.push(hi),{point:hi,angle:Fi,path:Yn}}var li=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ri(ht,K){for(var dt=0;dt=1;ia--)Ui.push(Ai.path[ia]);for(var qi=1;qi0){for(var Hi=Ui[0].clone(),Qi=Ui[0].clone(),Na=1;Na=Fi.x&&Qi.x<=Ji.x&&Hi.y>=Fi.y&&Qi.y<=Ji.y?ma=[Ui]:Qi.xJi.x||Qi.yJi.y?ma=[]:ma=i.clipLine([Ui],Fi.x,Fi.y,Ji.x,Ji.y)}for(var fo=0,Ns=ma;fo=this.screenRightBoundary||ptthis.screenBottomBoundary},$r.prototype.isInsideGrid=function(K,dt,rt,pt){return rt>=0&&K=0&&dt0){var Nn;return this.prevPlacement&&this.prevPlacement.variableOffsets[lr.crossTileID]&&this.prevPlacement.placements[lr.crossTileID]&&this.prevPlacement.placements[lr.crossTileID].text&&(Nn=this.prevPlacement.variableOffsets[lr.crossTileID].anchor),this.variableOffsets[lr.crossTileID]={textOffset:Vr,width:rt,height:pt,anchor:K,textBoxScale:Ot,prevAnchor:Nn},this.markUsedJustification(Fr,K,lr,Xr),Fr.allowVerticalPlacement&&(this.markUsedOrientation(Fr,Xr,lr),this.placedOrientations[lr.crossTileID]=Xr),{shift:Kr,placedGlyphBoxes:fn}}},kr.prototype.placeLayerBucketPart=function(K,dt,rt){var pt=this,Ot=K.parameters,Qt=Ot.bucket,ue=Ot.layout,Re=Ot.posMatrix,We=Ot.textLabelPlaneMatrix,qe=Ot.labelToScreenMatrix,cr=Ot.textPixelRatio,lr=Ot.holdingForFade,Fr=Ot.collisionBoxArray,Xr=Ot.partiallyEvaluatedTextSize,Yr=Ot.collisionGroup,Vr=ue.get("text-optional"),Kr=ue.get("icon-optional"),fn=ue.get("text-allow-overlap"),Fn=ue.get("icon-allow-overlap"),Nn=ue.get("text-rotation-alignment")==="map",Yn=ue.get("text-pitch-alignment")==="map",Xn=ue.get("icon-text-fit")!=="none",Gn=ue.get("symbol-z-order")==="viewport-y",jn=fn&&(Fn||!Qt.hasIconData()||Kr),ti=Fn&&(fn||!Qt.hasTextData()||Vr);!Qt.collisionArrays&&Fr&&Qt.deserializeCollisionBoxes(Fr);var si=function(Ai,Yi){if(!dt[Ai.crossTileID]){if(lr){pt.placements[Ai.crossTileID]=new An(!1,!1,!1);return}var Ui=!1,ia=!1,qi=!0,Ta=null,Ki={box:null,offscreen:null},ma={box:null,offscreen:null},Hi=null,Qi=null,Na=null,fo=0,Ns=0,Bs=0;Yi.textFeatureIndex?fo=Yi.textFeatureIndex:Ai.useRuntimeCollisionCircles&&(fo=Ai.featureIndex),Yi.verticalTextFeatureIndex&&(Ns=Yi.verticalTextFeatureIndex);var el=Yi.textBox;if(el){var Cl=function(Ga){var ss=i.WritingMode.horizontal;if(Qt.allowVerticalPlacement&&!Ga&&pt.prevPlacement){var ls=pt.prevPlacement.placedOrientations[Ai.crossTileID];ls&&(pt.placedOrientations[Ai.crossTileID]=ls,ss=ls,pt.markUsedOrientation(Qt,ss,Ai))}return ss},sf=function(Ga,ss){if(Qt.allowVerticalPlacement&&Ai.numVerticalGlyphVertices>0&&Yi.verticalTextBox)for(var ls=0,hh=Qt.writingModes;ls0&&(os=os.filter(function(Ga){return Ga!==Ko.anchor}),os.unshift(Ko.anchor))}var rl=function(Ga,ss,ls){for(var hh=Ga.x2-Ga.x1,bv=Ga.y2-Ga.y1,Tp=Ai.textBoxScale,Ap=Xn&&!Fn?ss:null,Uc={box:[],offscreen:!1},Mp=fn?os.length*2:os.length,vh=0;vh=os.length,wv=pt.attemptAnchorPlacement(Sp,Ga,hh,bv,Tp,Nn,Yn,cr,Re,Yr,Ep,Ai,Qt,ls,Ap);if(wv&&(Uc=wv.placedGlyphBoxes,Uc&&Uc.box&&Uc.box.length)){Ui=!0,Ta=wv.shift;break}}return Uc},ru=function(){return rl(el,Yi.iconBox,i.WritingMode.horizontal)},nl=function(){var Ga=Yi.verticalTextBox,ss=Ki&&Ki.box&&Ki.box.length;return Qt.allowVerticalPlacement&&!ss&&Ai.numVerticalGlyphVertices>0&&Ga?rl(Ga,Yi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};sf(ru,nl),Ki&&(Ui=Ki.box,qi=Ki.offscreen);var sh=Cl(Ki&&Ki.box);if(!Ui&&pt.prevPlacement){var jf=pt.prevPlacement.variableOffsets[Ai.crossTileID];jf&&(pt.variableOffsets[Ai.crossTileID]=jf,pt.markUsedJustification(Qt,jf.anchor,Ai,sh))}}else{var Ll=function(Ga,ss){var ls=pt.collisionIndex.placeCollisionBox(Ga,fn,cr,Re,Yr.predicate);return ls&&ls.box&&ls.box.length&&(pt.markUsedOrientation(Qt,ss,Ai),pt.placedOrientations[Ai.crossTileID]=ss),ls},jo=function(){return Ll(el,i.WritingMode.horizontal)},Pl=function(){var Ga=Yi.verticalTextBox;return Qt.allowVerticalPlacement&&Ai.numVerticalGlyphVertices>0&&Ga?Ll(Ga,i.WritingMode.vertical):{box:null,offscreen:null}};sf(jo,Pl),Cl(Ki&&Ki.box&&Ki.box.length)}}if(Hi=Ki,Ui=Hi&&Hi.box&&Hi.box.length>0,qi=Hi&&Hi.offscreen,Ai.useRuntimeCollisionCircles){var po=Qt.text.placedSymbolArray.get(Ai.centerJustifiedTextSymbolIndex),lh=i.evaluateSizeForFeature(Qt.textSizeData,Xr,po),Bc=ue.get("text-padding"),Io=Ai.collisionCircleDiameter;Qi=pt.collisionIndex.placeCollisionCircles(fn,po,Qt.lineVertexArray,Qt.glyphOffsetArray,lh,Re,We,qe,rt,Yn,Yr.predicate,Io,Bc),Ui=fn||Qi.circles.length>0&&!Qi.collisionDetected,qi=qi&&Qi.offscreen}if(Yi.iconFeatureIndex&&(Bs=Yi.iconFeatureIndex),Yi.iconBox){var Kf=function(Ga){var ss=Xn&&Ta?Sr(Ga,Ta.x,Ta.y,Nn,Yn,pt.transform.angle):Ga;return pt.collisionIndex.placeCollisionBox(ss,Fn,cr,Re,Yr.predicate)};ma&&ma.box&&ma.box.length&&Yi.verticalIconBox?(Na=Kf(Yi.verticalIconBox),ia=Na.box.length>0):(Na=Kf(Yi.iconBox),ia=Na.box.length>0),qi=qi&&Na.offscreen}var uh=Vr||Ai.numHorizontalGlyphVertices===0&&Ai.numVerticalGlyphVertices===0,fh=Kr||Ai.numIconVertices===0;if(!uh&&!fh?ia=Ui=ia&&Ui:fh?uh||(ia=ia&&Ui):Ui=ia&&Ui,Ui&&Hi&&Hi.box&&(ma&&ma.box&&Ns?pt.collisionIndex.insertCollisionBox(Hi.box,ue.get("text-ignore-placement"),Qt.bucketInstanceId,Ns,Yr.ID):pt.collisionIndex.insertCollisionBox(Hi.box,ue.get("text-ignore-placement"),Qt.bucketInstanceId,fo,Yr.ID)),ia&&Na&&pt.collisionIndex.insertCollisionBox(Na.box,ue.get("icon-ignore-placement"),Qt.bucketInstanceId,Bs,Yr.ID),Qi&&(Ui&&pt.collisionIndex.insertCollisionCircles(Qi.circles,ue.get("text-ignore-placement"),Qt.bucketInstanceId,fo,Yr.ID),rt)){var ch=Qt.bucketInstanceId,Jf=pt.collisionCircleArrays[ch];Jf===void 0&&(Jf=pt.collisionCircleArrays[ch]=new Bn);for(var Qf=0;Qf=0;--hi){var Fi=yi[hi];si(Qt.symbolInstances.get(Fi),Qt.collisionArrays[Fi])}else for(var Ji=K.symbolInstanceStart;Ji=0&&(Qt>=0&&qe!==Qt?K.text.placedSymbolArray.get(qe).crossTileID=0:K.text.placedSymbolArray.get(qe).crossTileID=rt.crossTileID)}},kr.prototype.markUsedOrientation=function(K,dt,rt){for(var pt=dt===i.WritingMode.horizontal||dt===i.WritingMode.horizontalOnly?dt:0,Ot=dt===i.WritingMode.vertical?dt:0,Qt=[rt.leftJustifiedTextSymbolIndex,rt.centerJustifiedTextSymbolIndex,rt.rightJustifiedTextSymbolIndex],ue=0,Re=Qt;ue0||Yn>0,si=Fn.numIconVertices>0,yi=pt.placedOrientations[Fn.crossTileID],hi=yi===i.WritingMode.vertical,Fi=yi===i.WritingMode.horizontal||yi===i.WritingMode.horizontalOnly;if(ti){var Ji=Hr(jn.text),Gi=hi?Qr:Ji;Xr(K.text,Nn,Gi);var Ai=Fi?Qr:Ji;Xr(K.text,Yn,Ai);var Yi=jn.text.isHidden();[Fn.rightJustifiedTextSymbolIndex,Fn.centerJustifiedTextSymbolIndex,Fn.leftJustifiedTextSymbolIndex].forEach(function(Bs){Bs>=0&&(K.text.placedSymbolArray.get(Bs).hidden=Yi||hi?1:0)}),Fn.verticalPlacedTextSymbolIndex>=0&&(K.text.placedSymbolArray.get(Fn.verticalPlacedTextSymbolIndex).hidden=Yi||Fi?1:0);var Ui=pt.variableOffsets[Fn.crossTileID];Ui&&pt.markUsedJustification(K,Ui.anchor,Fn,yi);var ia=pt.placedOrientations[Fn.crossTileID];ia&&(pt.markUsedJustification(K,"left",Fn,ia),pt.markUsedOrientation(K,ia,Fn))}if(si){var qi=Hr(jn.icon),Ta=!(lr&&Fn.verticalPlacedIconSymbolIndex&&hi);if(Fn.placedIconSymbolIndex>=0){var Ki=Ta?qi:Qr;Xr(K.icon,Fn.numIconVertices,Ki),K.icon.placedSymbolArray.get(Fn.placedIconSymbolIndex).hidden=jn.icon.isHidden()}if(Fn.verticalPlacedIconSymbolIndex>=0){var ma=Ta?Qr:qi;Xr(K.icon,Fn.numVerticalIconVertices,ma),K.icon.placedSymbolArray.get(Fn.verticalPlacedIconSymbolIndex).hidden=jn.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Hi=K.collisionArrays[fn];if(Hi){var Qi=new i.Point(0,0);if(Hi.textBox||Hi.verticalTextBox){var Na=!0;if(We){var fo=pt.variableOffsets[Xn];fo?(Qi=Di(fo.anchor,fo.width,fo.height,fo.textOffset,fo.textBoxScale),qe&&Qi._rotate(cr?pt.transform.angle:-pt.transform.angle)):Na=!1}Hi.textBox&&Ar(K.textCollisionBox.collisionVertexArray,jn.text.placed,!Na||hi,Qi.x,Qi.y),Hi.verticalTextBox&&Ar(K.textCollisionBox.collisionVertexArray,jn.text.placed,!Na||Fi,Qi.x,Qi.y)}var Ns=!!(!Fi&&Hi.verticalIconBox);Hi.iconBox&&Ar(K.iconCollisionBox.collisionVertexArray,jn.icon.placed,Ns,lr?Qi.x:0,lr?Qi.y:0),Hi.verticalIconBox&&Ar(K.iconCollisionBox.collisionVertexArray,jn.icon.placed,!Ns,lr?Qi.x:0,lr?Qi.y:0)}}},Vr=0;VrK},kr.prototype.setStale=function(){this.stale=!0};function Ar(ht,K,dt,rt,pt){ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0),ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0),ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0),ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0)}var Or=Math.pow(2,25),xn=Math.pow(2,24),In=Math.pow(2,17),hn=Math.pow(2,16),sn=Math.pow(2,9),Er=Math.pow(2,8),Zr=Math.pow(2,1);function Hr(ht){if(ht.opacity===0&&!ht.placed)return 0;if(ht.opacity===1&&ht.placed)return 4294967295;var K=ht.placed?1:0,dt=Math.floor(ht.opacity*127);return dt*Or+K*xn+dt*In+K*hn+dt*sn+K*Er+dt*Zr+K}var Qr=0,wn=function(K){this._sortAcrossTiles=K.layout.get("symbol-z-order")!=="viewport-y"&&K.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};wn.prototype.continuePlacement=function(K,dt,rt,pt,Ot){for(var Qt=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var ue=K[this._currentPlacementIndex],Re=dt[ue],We=this.placement.collisionIndex.transform.zoom;if(Re.type==="symbol"&&(!Re.minzoom||Re.minzoom<=We)&&(!Re.maxzoom||Re.maxzoom>We)){this._inProgressLayer||(this._inProgressLayer=new wn(Re));var qe=this._inProgressLayer.continuePlacement(rt[Re.source],this.placement,this._showCollisionBoxes,Re,Qt);if(qe)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ln.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Pn=512/i.EXTENT/2,Un=function(K,dt,rt){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=rt;for(var pt=0;ptK.overscaledZ)for(var We in Re){var qe=Re[We];qe.tileID.isChildOf(K)&&qe.findMatches(dt.symbolInstances,K,Qt)}else{var cr=K.scaledTo(Number(ue)),lr=Re[cr.key];lr&&lr.findMatches(dt.symbolInstances,K,Qt)}}for(var Fr=0;Fr0)throw new Error("Unimplemented: "+Qt.map(function(ue){return ue.command}).join(", ")+".");return Ot.forEach(function(ue){ue.command!=="setTransition"&&pt[ue.command].apply(pt,ue.args)}),this.stylesheet=rt,!0},K.prototype.addImage=function(rt,pt){if(this.getImage(rt))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(rt,pt),this._afterImageUpdated(rt)},K.prototype.updateImage=function(rt,pt){this.imageManager.updateImage(rt,pt)},K.prototype.getImage=function(rt){return this.imageManager.getImage(rt)},K.prototype.removeImage=function(rt){if(!this.getImage(rt))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(rt),this._afterImageUpdated(rt)},K.prototype._afterImageUpdated=function(rt){this._availableImages=this.imageManager.listImages(),this._changedImages[rt]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},K.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},K.prototype.addSource=function(rt,pt,Ot){var Qt=this;if(Ot===void 0&&(Ot={}),this._checkLoaded(),this.sourceCaches[rt]!==void 0)throw new Error("There is already a source with this ID");if(!pt.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(pt).join(", ")+".");var ue=["vector","raster","geojson","video","image"],Re=ue.indexOf(pt.type)>=0;if(!(Re&&this._validate(i.validateStyle.source,"sources."+rt,pt,null,Ot))){this.map&&this.map._collectResourceTiming&&(pt.collectResourceTiming=!0);var We=this.sourceCaches[rt]=new ke(rt,pt,this.dispatcher);We.style=this,We.setEventedParent(this,function(){return{isSourceLoaded:Qt.loaded(),source:We.serialize(),sourceId:rt}}),We.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(rt){if(this._checkLoaded(),this.sourceCaches[rt]===void 0)throw new Error("There is no source with this ID");for(var pt in this._layers)if(this._layers[pt].source===rt)return this.fire(new i.ErrorEvent(new Error('Source "'+rt+'" cannot be removed while layer "'+pt+'" is using it.')));var Ot=this.sourceCaches[rt];delete this.sourceCaches[rt],delete this._updatedSources[rt],Ot.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:rt})),Ot.setEventedParent(null),Ot.clearTiles(),Ot.onRemove&&Ot.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(rt,pt){this._checkLoaded();var Ot=this.sourceCaches[rt].getSource();Ot.setData(pt),this._changed=!0},K.prototype.getSource=function(rt){return this.sourceCaches[rt]&&this.sourceCaches[rt].getSource()},K.prototype.addLayer=function(rt,pt,Ot){Ot===void 0&&(Ot={}),this._checkLoaded();var Qt=rt.id;if(this.getLayer(Qt)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+Qt+'" already exists on this map')));return}var ue;if(rt.type==="custom"){if(pi(this,i.validateCustomStyleLayer(rt)))return;ue=i.createStyleLayer(rt)}else{if(typeof rt.source=="object"&&(this.addSource(Qt,rt.source),rt=i.clone$1(rt),rt=i.extend(rt,{source:Qt})),this._validate(i.validateStyle.layer,"layers."+Qt,rt,{arrayIndex:-1},Ot))return;ue=i.createStyleLayer(rt),this._validateLayer(ue),ue.setEventedParent(this,{layer:{id:Qt}}),this._serializedLayers[ue.id]=ue.serialize()}var Re=pt?this._order.indexOf(pt):this._order.length;if(pt&&Re===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+pt+'" does not exist on this map.')));return}if(this._order.splice(Re,0,Qt),this._layerOrderChanged=!0,this._layers[Qt]=ue,this._removedLayers[Qt]&&ue.source&&ue.type!=="custom"){var We=this._removedLayers[Qt];delete this._removedLayers[Qt],We.type!==ue.type?this._updatedSources[ue.source]="clear":(this._updatedSources[ue.source]="reload",this.sourceCaches[ue.source].pause())}this._updateLayer(ue),ue.onAdd&&ue.onAdd(this.map)},K.prototype.moveLayer=function(rt,pt){this._checkLoaded(),this._changed=!0;var Ot=this._layers[rt];if(!Ot){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be moved.")));return}if(rt!==pt){var Qt=this._order.indexOf(rt);this._order.splice(Qt,1);var ue=pt?this._order.indexOf(pt):this._order.length;if(pt&&ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+pt+'" does not exist on this map.')));return}this._order.splice(ue,0,rt),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(rt){this._checkLoaded();var pt=this._layers[rt];if(!pt){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be removed.")));return}pt.setEventedParent(null);var Ot=this._order.indexOf(rt);this._order.splice(Ot,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[rt]=pt,delete this._layers[rt],delete this._serializedLayers[rt],delete this._updatedLayers[rt],delete this._updatedPaintProps[rt],pt.onRemove&&pt.onRemove(this.map)},K.prototype.getLayer=function(rt){return this._layers[rt]},K.prototype.hasLayer=function(rt){return rt in this._layers},K.prototype.setLayerZoomRange=function(rt,pt,Ot){this._checkLoaded();var Qt=this.getLayer(rt);if(!Qt){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot have zoom extent.")));return}Qt.minzoom===pt&&Qt.maxzoom===Ot||(pt!=null&&(Qt.minzoom=pt),Ot!=null&&(Qt.maxzoom=Ot),this._updateLayer(Qt))},K.prototype.setFilter=function(rt,pt,Ot){Ot===void 0&&(Ot={}),this._checkLoaded();var Qt=this.getLayer(rt);if(!Qt){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(Qt.filter,pt)){if(pt==null){Qt.filter=void 0,this._updateLayer(Qt);return}this._validate(i.validateStyle.filter,"layers."+Qt.id+".filter",pt,null,Ot)||(Qt.filter=i.clone$1(pt),this._updateLayer(Qt))}},K.prototype.getFilter=function(rt){return i.clone$1(this.getLayer(rt).filter)},K.prototype.setLayoutProperty=function(rt,pt,Ot,Qt){Qt===void 0&&(Qt={}),this._checkLoaded();var ue=this.getLayer(rt);if(!ue){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(ue.getLayoutProperty(pt),Ot)||(ue.setLayoutProperty(pt,Ot,Qt),this._updateLayer(ue))},K.prototype.getLayoutProperty=function(rt,pt){var Ot=this.getLayer(rt);if(!Ot){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style.")));return}return Ot.getLayoutProperty(pt)},K.prototype.setPaintProperty=function(rt,pt,Ot,Qt){Qt===void 0&&(Qt={}),this._checkLoaded();var ue=this.getLayer(rt);if(!ue){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(ue.getPaintProperty(pt),Ot)){var Re=ue.setPaintProperty(pt,Ot,Qt);Re&&this._updateLayer(ue),this._changed=!0,this._updatedPaintProps[rt]=!0}},K.prototype.getPaintProperty=function(rt,pt){return this.getLayer(rt).getPaintProperty(pt)},K.prototype.setFeatureState=function(rt,pt){this._checkLoaded();var Ot=rt.source,Qt=rt.sourceLayer,ue=this.sourceCaches[Ot];if(ue===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+Ot+"' does not exist in the map's style.")));return}var Re=ue.getSource().type;if(Re==="geojson"&&Qt){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Re==="vector"&&!Qt){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}rt.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ue.setFeatureState(Qt,rt.id,pt)},K.prototype.removeFeatureState=function(rt,pt){this._checkLoaded();var Ot=rt.source,Qt=this.sourceCaches[Ot];if(Qt===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+Ot+"' does not exist in the map's style.")));return}var ue=Qt.getSource().type,Re=ue==="vector"?rt.sourceLayer:void 0;if(ue==="vector"&&!Re){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(pt&&typeof rt.id!="string"&&typeof rt.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}Qt.removeFeatureState(Re,rt.id,pt)},K.prototype.getFeatureState=function(rt){this._checkLoaded();var pt=rt.source,Ot=rt.sourceLayer,Qt=this.sourceCaches[pt];if(Qt===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+pt+"' does not exist in the map's style.")));return}var ue=Qt.getSource().type;if(ue==="vector"&&!Ot){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return rt.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Qt.getFeatureState(Ot,rt.id)},K.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},K.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(rt){return rt.serialize()}),layers:this._serializeLayers(this._order)},function(rt){return rt!==void 0})},K.prototype._updateLayer=function(rt){this._updatedLayers[rt.id]=!0,rt.source&&!this._updatedSources[rt.source]&&this.sourceCaches[rt.source].getSource().type!=="raster"&&(this._updatedSources[rt.source]="reload",this.sourceCaches[rt.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(rt){for(var pt=this,Ot=function(Fi){return pt._layers[Fi].type==="fill-extrusion"},Qt={},ue=[],Re=this._order.length-1;Re>=0;Re--){var We=this._order[Re];if(Ot(We)){Qt[We]=Re;for(var qe=0,cr=rt;qe=0;fn--){var Fn=this._order[fn];if(Ot(Fn))for(var Nn=ue.length-1;Nn>=0;Nn--){var Yn=ue[Nn].feature;if(Qt[Yn.layer.id]>16,ue>>16],u_pixel_coord_lower:[Qt&65535,ue&65535]}}function Ps(ht,K,dt,rt){var pt=dt.imageManager.getPattern(ht.from.toString()),Ot=dt.imageManager.getPattern(ht.to.toString()),Qt=dt.imageManager.getPixelSize(),ue=Qt.width,Re=Qt.height,We=Math.pow(2,rt.tileID.overscaledZ),qe=rt.tileSize*Math.pow(2,dt.transform.tileZoom)/We,cr=qe*(rt.tileID.canonical.x+rt.tileID.wrap*We),lr=qe*rt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:pt.tl,u_pattern_br_a:pt.br,u_pattern_tl_b:Ot.tl,u_pattern_br_b:Ot.br,u_texsize:[ue,Re],u_mix:K.t,u_pattern_size_a:pt.displaySize,u_pattern_size_b:Ot.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/dn(rt,1,dt.transform.tileZoom),u_pixel_coord_upper:[cr>>16,lr>>16],u_pixel_coord_lower:[cr&65535,lr&65535]}}var Tu=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_lightpos:new i.Uniform3f(ht,K.u_lightpos),u_lightintensity:new i.Uniform1f(ht,K.u_lightintensity),u_lightcolor:new i.Uniform3f(ht,K.u_lightcolor),u_vertical_gradient:new i.Uniform1f(ht,K.u_vertical_gradient),u_opacity:new i.Uniform1f(ht,K.u_opacity)}},Da=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_lightpos:new i.Uniform3f(ht,K.u_lightpos),u_lightintensity:new i.Uniform1f(ht,K.u_lightintensity),u_lightcolor:new i.Uniform3f(ht,K.u_lightcolor),u_vertical_gradient:new i.Uniform1f(ht,K.u_vertical_gradient),u_height_factor:new i.Uniform1f(ht,K.u_height_factor),u_image:new i.Uniform1i(ht,K.u_image),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade),u_opacity:new i.Uniform1f(ht,K.u_opacity)}},Bl=function(ht,K,dt,rt){var pt=K.style.light,Ot=pt.properties.get("position"),Qt=[Ot.x,Ot.y,Ot.z],ue=i.create$1();pt.properties.get("anchor")==="viewport"&&i.fromRotation(ue,-K.transform.angle),i.transformMat3(Qt,Qt,ue);var Re=pt.properties.get("color");return{u_matrix:ht,u_lightpos:Qt,u_lightintensity:pt.properties.get("intensity"),u_lightcolor:[Re.r,Re.g,Re.b],u_vertical_gradient:+dt,u_opacity:rt}},Go=function(ht,K,dt,rt,pt,Ot,Qt){return i.extend(Bl(ht,K,dt,rt),js(Ot,K,Qt),{u_height_factor:-Math.pow(2,pt.overscaledZ)/Qt.tileSize/8})},ds=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},Ks=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_image:new i.Uniform1i(ht,K.u_image),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade)}},Rs=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_world:new i.Uniform2f(ht,K.u_world)}},Wo=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_world:new i.Uniform2f(ht,K.u_world),u_image:new i.Uniform1i(ht,K.u_image),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade)}},ps=function(ht){return{u_matrix:ht}},Yo=function(ht,K,dt,rt){return i.extend(ps(ht),js(dt,K,rt))},Do=function(ht,K){return{u_matrix:ht,u_world:K}},Ul=function(ht,K,dt,rt,pt){return i.extend(Yo(ht,K,dt,rt),{u_world:pt})},Cc=function(ht,K){return{u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(ht,K.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(ht,K.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},Lc=function(ht,K,dt,rt){var pt=ht.transform,Ot,Qt;if(rt.paint.get("circle-pitch-alignment")==="map"){var ue=dn(dt,1,pt.zoom);Ot=!0,Qt=[ue,ue]}else Ot=!1,Qt=pt.pixelsToGLUnits;return{u_camera_to_center_distance:pt.cameraToCenterDistance,u_scale_with_map:+(rt.paint.get("circle-pitch-scale")==="map"),u_matrix:ht.translatePosMatrix(K.posMatrix,dt,rt.paint.get("circle-translate"),rt.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ot,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:Qt}},Pc=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(ht,K.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(ht,K.u_extrude_scale),u_overscale_factor:new i.Uniform1f(ht,K.u_overscale_factor)}},Rc=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_inv_matrix:new i.UniformMatrix4f(ht,K.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(ht,K.u_viewport_size)}},Ju=function(ht,K,dt){var rt=dn(dt,1,K.zoom),pt=Math.pow(2,K.zoom-dt.tileID.overscaledZ),Ot=dt.tileID.overscaleFactor();return{u_matrix:ht,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:rt,u_extrude_scale:[K.pixelsToGLUnits[0]/(rt*pt),K.pixelsToGLUnits[1]/(rt*pt)],u_overscale_factor:Ot}},Df=function(ht,K,dt){return{u_matrix:ht,u_inv_matrix:K,u_camera_to_center_distance:dt.cameraToCenterDistance,u_viewport_size:[dt.width,dt.height]}},xl=function(ht,K){return{u_color:new i.UniformColor(ht,K.u_color),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_overlay:new i.Uniform1i(ht,K.u_overlay),u_overlay_scale:new i.Uniform1f(ht,K.u_overlay_scale)}},ja=function(ht,K,dt){return dt===void 0&&(dt=1),{u_matrix:ht,u_color:K,u_overlay:0,u_overlay_scale:dt}},Co=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},bl=function(ht){return{u_matrix:ht}},If=function(ht,K){return{u_extrude_scale:new i.Uniform1f(ht,K.u_extrude_scale),u_intensity:new i.Uniform1f(ht,K.u_intensity),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},Hl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_world:new i.Uniform2f(ht,K.u_world),u_image:new i.Uniform1i(ht,K.u_image),u_color_ramp:new i.Uniform1i(ht,K.u_color_ramp),u_opacity:new i.Uniform1f(ht,K.u_opacity)}},gs=function(ht,K,dt,rt){return{u_matrix:ht,u_extrude_scale:dn(K,1,dt),u_intensity:rt}},Dc=function(ht,K,dt,rt){var pt=i.create();i.ortho(pt,0,ht.width,ht.height,0,0,1);var Ot=ht.context.gl;return{u_matrix:pt,u_world:[Ot.drawingBufferWidth,Ot.drawingBufferHeight],u_image:dt,u_color_ramp:rt,u_opacity:K.paint.get("heatmap-opacity")}},Ff=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_image:new i.Uniform1i(ht,K.u_image),u_latrange:new i.Uniform2f(ht,K.u_latrange),u_light:new i.Uniform2f(ht,K.u_light),u_shadow:new i.UniformColor(ht,K.u_shadow),u_highlight:new i.UniformColor(ht,K.u_highlight),u_accent:new i.UniformColor(ht,K.u_accent)}},zf=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_image:new i.Uniform1i(ht,K.u_image),u_dimension:new i.Uniform2f(ht,K.u_dimension),u_zoom:new i.Uniform1f(ht,K.u_zoom),u_unpack:new i.Uniform4f(ht,K.u_unpack)}},Qu=function(ht,K,dt){var rt=dt.paint.get("hillshade-shadow-color"),pt=dt.paint.get("hillshade-highlight-color"),Ot=dt.paint.get("hillshade-accent-color"),Qt=dt.paint.get("hillshade-illumination-direction")*(Math.PI/180);dt.paint.get("hillshade-illumination-anchor")==="viewport"&&(Qt-=ht.transform.angle);var ue=!ht.options.moving;return{u_matrix:ht.transform.calculatePosMatrix(K.tileID.toUnwrapped(),ue),u_image:0,u_latrange:vo(ht,K.tileID),u_light:[dt.paint.get("hillshade-exaggeration"),Qt],u_shadow:rt,u_highlight:pt,u_accent:Ot}},kf=function(ht,K){var dt=K.stride,rt=i.create();return i.ortho(rt,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(rt,rt,[0,-i.EXTENT,0]),{u_matrix:rt,u_image:1,u_dimension:[dt,dt],u_zoom:ht.overscaledZ,u_unpack:K.getUnpackVector()}};function vo(ht,K){var dt=Math.pow(2,K.canonical.z),rt=K.canonical.y;return[new i.MercatorCoordinate(0,rt/dt).toLngLat().lat,new i.MercatorCoordinate(0,(rt+1)/dt).toLngLat().lat]}var Xo=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels)}},Ds=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels),u_image:new i.Uniform1i(ht,K.u_image),u_image_height:new i.Uniform1f(ht,K.u_image_height)}},wl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_image:new i.Uniform1i(ht,K.u_image),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade)}},Au=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(ht,K.u_patternscale_a),u_patternscale_b:new i.Uniform2f(ht,K.u_patternscale_b),u_sdfgamma:new i.Uniform1f(ht,K.u_sdfgamma),u_image:new i.Uniform1i(ht,K.u_image),u_tex_y_a:new i.Uniform1f(ht,K.u_tex_y_a),u_tex_y_b:new i.Uniform1f(ht,K.u_tex_y_b),u_mix:new i.Uniform1f(ht,K.u_mix)}},Js=function(ht,K,dt){var rt=ht.transform;return{u_matrix:Is(ht,K,dt),u_ratio:1/dn(K,1,rt.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/rt.pixelsToGLUnits[0],1/rt.pixelsToGLUnits[1]]}},Qs=function(ht,K,dt,rt){return i.extend(Js(ht,K,dt),{u_image:0,u_image_height:rt})},Of=function(ht,K,dt,rt){var pt=ht.transform,Ot=Tl(K,pt);return{u_matrix:Is(ht,K,dt),u_texsize:K.imageAtlasTexture.size,u_ratio:1/dn(K,1,pt.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[Ot,rt.fromScale,rt.toScale],u_fade:rt.t,u_units_to_pixels:[1/pt.pixelsToGLUnits[0],1/pt.pixelsToGLUnits[1]]}},ms=function(ht,K,dt,rt,pt){var Ot=ht.transform,Qt=ht.lineAtlas,ue=Tl(K,Ot),Re=dt.layout.get("line-cap")==="round",We=Qt.getDash(rt.from,Re),qe=Qt.getDash(rt.to,Re),cr=We.width*pt.fromScale,lr=qe.width*pt.toScale;return i.extend(Js(ht,K,dt),{u_patternscale_a:[ue/cr,-We.height/2],u_patternscale_b:[ue/lr,-qe.height/2],u_sdfgamma:Qt.width/(Math.min(cr,lr)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:We.y,u_tex_y_b:qe.y,u_mix:pt.t})};function Tl(ht,K){return 1/dn(ht,1,K.tileZoom)}function Is(ht,K,dt){return ht.translatePosMatrix(K.tileID.posMatrix,K,dt.paint.get("line-translate"),dt.paint.get("line-translate-anchor"))}var ys=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_tl_parent:new i.Uniform2f(ht,K.u_tl_parent),u_scale_parent:new i.Uniform1f(ht,K.u_scale_parent),u_buffer_scale:new i.Uniform1f(ht,K.u_buffer_scale),u_fade_t:new i.Uniform1f(ht,K.u_fade_t),u_opacity:new i.Uniform1f(ht,K.u_opacity),u_image0:new i.Uniform1i(ht,K.u_image0),u_image1:new i.Uniform1i(ht,K.u_image1),u_brightness_low:new i.Uniform1f(ht,K.u_brightness_low),u_brightness_high:new i.Uniform1f(ht,K.u_brightness_high),u_saturation_factor:new i.Uniform1f(ht,K.u_saturation_factor),u_contrast_factor:new i.Uniform1f(ht,K.u_contrast_factor),u_spin_weights:new i.Uniform3f(ht,K.u_spin_weights)}},Vl=function(ht,K,dt,rt,pt){return{u_matrix:ht,u_tl_parent:K,u_scale_parent:dt,u_buffer_scale:1,u_fade_t:rt.mix,u_opacity:rt.opacity*pt.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:pt.paint.get("raster-brightness-min"),u_brightness_high:pt.paint.get("raster-brightness-max"),u_saturation_factor:Ml(pt.paint.get("raster-saturation")),u_contrast_factor:va(pt.paint.get("raster-contrast")),u_spin_weights:Al(pt.paint.get("raster-hue-rotate"))}};function Al(ht){ht*=Math.PI/180;var K=Math.sin(ht),dt=Math.cos(ht);return[(2*dt+1)/3,(-Math.sqrt(3)*K-dt+1)/3,(Math.sqrt(3)*K-dt+1)/3]}function va(ht){return ht>0?1/(1-ht):1+ht}function Ml(ht){return ht>0?1-1/(1.001-ht):-ht}var Mu=function(ht,K){return{u_is_size_zoom_constant:new i.Uniform1i(ht,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ht,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ht,K.u_size_t),u_size:new i.Uniform1f(ht,K.u_size),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ht,K.u_pitch),u_rotate_symbol:new i.Uniform1i(ht,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ht,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(ht,K.u_fade_change),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ht,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ht,K.u_coord_matrix),u_is_text:new i.Uniform1i(ht,K.u_is_text),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_texture:new i.Uniform1i(ht,K.u_texture)}},Nf=function(ht,K){return{u_is_size_zoom_constant:new i.Uniform1i(ht,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ht,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ht,K.u_size_t),u_size:new i.Uniform1f(ht,K.u_size),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ht,K.u_pitch),u_rotate_symbol:new i.Uniform1i(ht,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ht,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(ht,K.u_fade_change),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ht,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ht,K.u_coord_matrix),u_is_text:new i.Uniform1i(ht,K.u_is_text),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_texture:new i.Uniform1i(ht,K.u_texture),u_gamma_scale:new i.Uniform1f(ht,K.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(ht,K.u_is_halo)}},Sl=function(ht,K){return{u_is_size_zoom_constant:new i.Uniform1i(ht,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ht,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ht,K.u_size_t),u_size:new i.Uniform1f(ht,K.u_size),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ht,K.u_pitch),u_rotate_symbol:new i.Uniform1i(ht,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ht,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(ht,K.u_fade_change),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ht,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ht,K.u_coord_matrix),u_is_text:new i.Uniform1i(ht,K.u_is_text),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_texsize_icon:new i.Uniform2f(ht,K.u_texsize_icon),u_texture:new i.Uniform1i(ht,K.u_texture),u_texture_icon:new i.Uniform1i(ht,K.u_texture_icon),u_gamma_scale:new i.Uniform1f(ht,K.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(ht,K.u_is_halo)}},Gl=function(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We){var qe=pt.transform;return{u_is_size_zoom_constant:+(ht==="constant"||ht==="source"),u_is_size_feature_constant:+(ht==="constant"||ht==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:qe.cameraToCenterDistance,u_pitch:qe.pitch/360*2*Math.PI,u_rotate_symbol:+dt,u_aspect_ratio:qe.width/qe.height,u_fade_change:pt.options.fadeDuration?pt.symbolFadeChange:1,u_matrix:Ot,u_label_plane_matrix:Qt,u_coord_matrix:ue,u_is_text:+Re,u_pitch_with_map:+rt,u_texsize:We,u_texture:0}},Su=function(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We,qe){var cr=pt.transform;return i.extend(Gl(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We),{u_gamma_scale:rt?Math.cos(cr._pitch)*cr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+qe})},$u=function(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We){return i.extend(Su(ht,K,dt,rt,pt,Ot,Qt,ue,!0,Re,!0),{u_texsize_icon:We,u_texture_icon:1})},Wl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_opacity:new i.Uniform1f(ht,K.u_opacity),u_color:new i.UniformColor(ht,K.u_color)}},Yl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_opacity:new i.Uniform1f(ht,K.u_opacity),u_image:new i.Uniform1i(ht,K.u_image),u_pattern_tl_a:new i.Uniform2f(ht,K.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(ht,K.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(ht,K.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(ht,K.u_pattern_br_b),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_mix:new i.Uniform1f(ht,K.u_mix),u_pattern_size_a:new i.Uniform2f(ht,K.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(ht,K.u_pattern_size_b),u_scale_a:new i.Uniform1f(ht,K.u_scale_a),u_scale_b:new i.Uniform1f(ht,K.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(ht,K.u_tile_units_to_pixels)}},Fs=function(ht,K,dt){return{u_matrix:ht,u_opacity:K,u_color:dt}},Xl=function(ht,K,dt,rt,pt,Ot){return i.extend(Ps(rt,Ot,dt,pt),{u_matrix:ht,u_opacity:K})},zs={fillExtrusion:Tu,fillExtrusionPattern:Da,fill:ds,fillPattern:Ks,fillOutline:Rs,fillOutlinePattern:Wo,circle:Cc,collisionBox:Pc,collisionCircle:Rc,debug:xl,clippingMask:Co,heatmap:If,heatmapTexture:Hl,hillshade:Ff,hillshadePrepare:zf,line:Xo,lineGradient:Ds,linePattern:wl,lineSDF:Au,raster:ys,symbolIcon:Mu,symbolSDF:Nf,symbolTextAndIcon:Sl,background:Wl,backgroundPattern:Yl},Ha;function ns(ht,K,dt,rt,pt,Ot,Qt){for(var ue=ht.context,Re=ue.gl,We=ht.useProgram("collisionBox"),qe=[],cr=0,lr=0,Fr=0;Fr0){var Nn=i.create(),Yn=Kr;i.mul(Nn,Vr.placementInvProjMatrix,ht.transform.glCoordMatrix),i.mul(Nn,Nn,Vr.placementViewportMatrix),qe.push({circleArray:Fn,circleOffset:lr,transform:Yn,invTransform:Nn}),cr+=Fn.length/4,lr=cr}fn&&We.draw(ue,Re.LINES,ir.disabled,Ke.disabled,ht.colorModeForRenderPass(),Ie.disabled,Ju(Kr,ht.transform,Yr),dt.id,fn.layoutVertexBuffer,fn.indexBuffer,fn.segments,null,ht.transform.zoom,null,null,fn.collisionVertexBuffer)}}if(!(!Qt||!qe.length)){var Xn=ht.useProgram("collisionCircle"),Gn=new i.StructArrayLayout2f1f2i16;Gn.resize(cr*4),Gn._trim();for(var jn=0,ti=0,si=qe;ti=0&&(Xr[Vr.associatedIconIndex]={shiftedAnchor:Fi,angle:Ji})}}if(qe){Fr.clear();for(var Ai=ht.icon.placedSymbolArray,Yi=0;Yi0){var Qt=i.browser.now(),ue=(Qt-ht.timeAdded)/Ot,Re=K?(Qt-K.timeAdded)/Ot:-1,We=dt.getSource(),qe=pt.coveringZoomLevel({tileSize:We.tileSize,roundZoom:We.roundZoom}),cr=!K||Math.abs(K.tileID.overscaledZ-qe)>Math.abs(ht.tileID.overscaledZ-qe),lr=cr&&ht.refreshedUponExpiration?1:i.clamp(cr?ue:1-Re,0,1);return ht.refreshedUponExpiration&&ue>=1&&(ht.refreshedUponExpiration=!1),K?{opacity:1,mix:1-lr}:{opacity:lr,mix:0}}else return{opacity:1,mix:0}}function qs(ht,K,dt){var rt=dt.paint.get("background-color"),pt=dt.paint.get("background-opacity");if(pt!==0){var Ot=ht.context,Qt=Ot.gl,ue=ht.transform,Re=ue.tileSize,We=dt.paint.get("background-pattern");if(!ht.isPatternMissing(We)){var qe=!We&&rt.a===1&&pt===1&&ht.opaquePassEnabledForLayer()?"opaque":"translucent";if(ht.renderPass===qe){var cr=Ke.disabled,lr=ht.depthModeForSublayer(0,qe==="opaque"?ir.ReadWrite:ir.ReadOnly),Fr=ht.colorModeForRenderPass(),Xr=ht.useProgram(We?"backgroundPattern":"background"),Yr=ue.coveringTiles({tileSize:Re});We&&(Ot.activeTexture.set(Qt.TEXTURE0),ht.imageManager.bind(ht.context));for(var Vr=dt.getCrossfadeParameters(),Kr=0,fn=Yr;Kr "+dt.overscaledZ);var Kr=Vr+" "+Fr+"kb";sr(ht,Kr),Qt.draw(rt,pt.TRIANGLES,ue,Re,se.alphaBlended,Ie.disabled,ja(Ot,i.Color.transparent,Yr),qe,ht.debugBuffer,ht.quadTriangleIndexBuffer,ht.debugSegments)}function sr(ht,K){ht.initDebugOverlayCanvas();var dt=ht.debugOverlayCanvas,rt=ht.context.gl,pt=ht.debugOverlayCanvas.getContext("2d");pt.clearRect(0,0,dt.width,dt.height),pt.shadowColor="white",pt.shadowBlur=2,pt.lineWidth=1.5,pt.strokeStyle="white",pt.textBaseline="top",pt.font="bold 36px Open Sans, sans-serif",pt.fillText(K,5,5),pt.strokeText(K,5,5),ht.debugOverlayTexture.update(dt),ht.debugOverlayTexture.bind(rt.LINEAR,rt.CLAMP_TO_EDGE)}function Mr(ht,K,dt){var rt=ht.context,pt=dt.implementation;if(ht.renderPass==="offscreen"){var Ot=pt.prerender;Ot&&(ht.setCustomLayerDefaults(),rt.setColorMode(ht.colorModeForRenderPass()),Ot.call(pt,rt.gl,ht.transform.customLayerMatrix()),rt.setDirty(),ht.setBaseState())}else if(ht.renderPass==="translucent"){ht.setCustomLayerDefaults(),rt.setColorMode(ht.colorModeForRenderPass()),rt.setStencilMode(Ke.disabled);var Qt=pt.renderingMode==="3d"?new ir(ht.context.gl.LEQUAL,ir.ReadWrite,ht.depthRangeFor3D):ht.depthModeForSublayer(0,ir.ReadOnly);rt.setDepthMode(Qt),pt.render(rt.gl,ht.transform.customLayerMatrix()),rt.setDirty(),ht.setBaseState(),rt.bindFramebuffer.set(null)}}var Ir={symbol:Eu,circle:Uf,heatmap:ks,line:_u,fill:xs,"fill-extrusion":tf,hillshade:Ql,raster:$l,background:qs,debug:gr,custom:Mr},Nr=function(K,dt){this.context=new Pe(K),this.transform=dt,this._tileTextures={},this.setup(),this.numSublayers=ke.maxUnderzooming+ke.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ai,this.gpuTimers={}};Nr.prototype.resize=function(K,dt){if(this.width=K*i.browser.devicePixelRatio,this.height=dt*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var rt=0,pt=this.style._order;rt256&&this.clearStencil(),rt.setColorMode(se.disabled),rt.setDepthMode(ir.disabled);var Ot=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Qt=0,ue=dt;Qt256&&this.clearStencil();var K=this.nextStencilID++,dt=this.context.gl;return new Ke({func:dt.NOTEQUAL,mask:255},K,255,dt.KEEP,dt.KEEP,dt.REPLACE)},Nr.prototype.stencilModeForClipping=function(K){var dt=this.context.gl;return new Ke({func:dt.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,dt.KEEP,dt.KEEP,dt.REPLACE)},Nr.prototype.stencilConfigForOverlap=function(K){var dt,rt=this.context.gl,pt=K.sort(function(We,qe){return qe.overscaledZ-We.overscaledZ}),Ot=pt[pt.length-1].overscaledZ,Qt=pt[0].overscaledZ-Ot+1;if(Qt>1){this.currentStencilSource=void 0,this.nextStencilID+Qt>256&&this.clearStencil();for(var ue={},Re=0;Re=0;this.currentLayer--){var Nn=this.style._layers[pt[this.currentLayer]],Yn=Ot[Nn.source],Xn=Re[Nn.source];this._renderTileClippingMasks(Nn,Xn),this.renderLayer(this,Yn,Nn,Xn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?dt.pop():null},Nr.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var dt=this.imageManager.getPattern(K.from.toString()),rt=this.imageManager.getPattern(K.to.toString());return!dt||!rt},Nr.prototype.useProgram=function(K,dt){this.cache=this.cache||{};var rt=""+K+(dt?dt.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[rt]||(this.cache[rt]=new Ku(this.context,K,Pf[K],dt,zs[K],this._showOverdrawInspector)),this.cache[rt]},Nr.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Nr.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},Nr.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},Nr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var en=function(K,dt){this.points=K,this.planes=dt};en.fromInvProjectionMatrix=function(K,dt,rt){var pt=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],Ot=Math.pow(2,rt),Qt=pt.map(function(We){return i.transformMat4([],We,K)}).map(function(We){return i.scale$1([],We,1/We[3]/dt*Ot)}),ue=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Re=ue.map(function(We){var qe=i.sub([],Qt[We[0]],Qt[We[1]]),cr=i.sub([],Qt[We[2]],Qt[We[1]]),lr=i.normalize([],i.cross([],qe,cr)),Fr=-i.dot(lr,Qt[We[1]]);return lr.concat(Fr)});return new en(Qt,Re)};var yn=function(K,dt){this.min=K,this.max=dt,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};yn.prototype.quadrant=function(K){for(var dt=[K%2===0,K<2],rt=i.clone$2(this.min),pt=i.clone$2(this.max),Ot=0;Ot=0;if(Qt===0)return 0;Qt!==dt.length&&(rt=!1)}if(rt)return 2;for(var Re=0;Re<3;Re++){for(var We=Number.MAX_VALUE,qe=-Number.MAX_VALUE,cr=0;crthis.max[Re]-this.min[Re])return 0}return 1};var Rn=function(K,dt,rt,pt){if(K===void 0&&(K=0),dt===void 0&&(dt=0),rt===void 0&&(rt=0),pt===void 0&&(pt=0),isNaN(K)||K<0||isNaN(dt)||dt<0||isNaN(rt)||rt<0||isNaN(pt)||pt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=K,this.bottom=dt,this.left=rt,this.right=pt};Rn.prototype.interpolate=function(K,dt,rt){return dt.top!=null&&K.top!=null&&(this.top=i.number(K.top,dt.top,rt)),dt.bottom!=null&&K.bottom!=null&&(this.bottom=i.number(K.bottom,dt.bottom,rt)),dt.left!=null&&K.left!=null&&(this.left=i.number(K.left,dt.left,rt)),dt.right!=null&&K.right!=null&&(this.right=i.number(K.right,dt.right,rt)),this},Rn.prototype.getCenter=function(K,dt){var rt=i.clamp((this.left+K-this.right)/2,0,K),pt=i.clamp((this.top+dt-this.bottom)/2,0,dt);return new i.Point(rt,pt)},Rn.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},Rn.prototype.clone=function(){return new Rn(this.top,this.bottom,this.left,this.right)},Rn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Dn=function(K,dt,rt,pt,Ot){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ot===void 0?!0:Ot,this._minZoom=K||0,this._maxZoom=dt||22,this._minPitch=rt??0,this._maxPitch=pt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Rn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Zn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Dn.prototype.clone=function(){var K=new Dn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},Zn.minZoom.get=function(){return this._minZoom},Zn.minZoom.set=function(ht){this._minZoom!==ht&&(this._minZoom=ht,this.zoom=Math.max(this.zoom,ht))},Zn.maxZoom.get=function(){return this._maxZoom},Zn.maxZoom.set=function(ht){this._maxZoom!==ht&&(this._maxZoom=ht,this.zoom=Math.min(this.zoom,ht))},Zn.minPitch.get=function(){return this._minPitch},Zn.minPitch.set=function(ht){this._minPitch!==ht&&(this._minPitch=ht,this.pitch=Math.max(this.pitch,ht))},Zn.maxPitch.get=function(){return this._maxPitch},Zn.maxPitch.set=function(ht){this._maxPitch!==ht&&(this._maxPitch=ht,this.pitch=Math.min(this.pitch,ht))},Zn.renderWorldCopies.get=function(){return this._renderWorldCopies},Zn.renderWorldCopies.set=function(ht){ht===void 0?ht=!0:ht===null&&(ht=!1),this._renderWorldCopies=ht},Zn.worldSize.get=function(){return this.tileSize*this.scale},Zn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Zn.size.get=function(){return new i.Point(this.width,this.height)},Zn.bearing.get=function(){return-this.angle/Math.PI*180},Zn.bearing.set=function(ht){var K=-i.wrap(ht,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Zn.pitch.get=function(){return this._pitch/Math.PI*180},Zn.pitch.set=function(ht){var K=i.clamp(ht,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},Zn.fov.get=function(){return this._fov/Math.PI*180},Zn.fov.set=function(ht){ht=Math.max(.01,Math.min(60,ht)),this._fov!==ht&&(this._unmodified=!1,this._fov=ht/180*Math.PI,this._calcMatrices())},Zn.zoom.get=function(){return this._zoom},Zn.zoom.set=function(ht){var K=Math.min(Math.max(ht,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},Zn.center.get=function(){return this._center},Zn.center.set=function(ht){ht.lat===this._center.lat&&ht.lng===this._center.lng||(this._unmodified=!1,this._center=ht,this._constrain(),this._calcMatrices())},Zn.padding.get=function(){return this._edgeInsets.toJSON()},Zn.padding.set=function(ht){this._edgeInsets.equals(ht)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ht,1),this._calcMatrices())},Zn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Dn.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},Dn.prototype.interpolatePadding=function(K,dt,rt){this._unmodified=!1,this._edgeInsets.interpolate(K,dt,rt),this._constrain(),this._calcMatrices()},Dn.prototype.coveringZoomLevel=function(K){var dt=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,dt)},Dn.prototype.getVisibleUnwrappedCoordinates=function(K){var dt=[new i.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var rt=this.pointCoordinate(new i.Point(0,0)),pt=this.pointCoordinate(new i.Point(this.width,0)),Ot=this.pointCoordinate(new i.Point(this.width,this.height)),Qt=this.pointCoordinate(new i.Point(0,this.height)),ue=Math.floor(Math.min(rt.x,pt.x,Ot.x,Qt.x)),Re=Math.floor(Math.max(rt.x,pt.x,Ot.x,Qt.x)),We=1,qe=ue-We;qe<=Re+We;qe++)qe!==0&&dt.push(new i.UnwrappedTileID(qe,K));return dt},Dn.prototype.coveringTiles=function(K){var dt=this.coveringZoomLevel(K),rt=dt;if(K.minzoom!==void 0&&dtK.maxzoom&&(dt=K.maxzoom);var pt=i.MercatorCoordinate.fromLngLat(this.center),Ot=Math.pow(2,dt),Qt=[Ot*pt.x,Ot*pt.y,0],ue=en.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,dt),Re=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Re=dt);var We=3,qe=function(hi){return{aabb:new yn([hi*Ot,0,0],[(hi+1)*Ot,Ot,0]),zoom:0,x:0,y:0,wrap:hi,fullyVisible:!1}},cr=[],lr=[],Fr=dt,Xr=K.reparseOverscaled?rt:dt;if(this._renderWorldCopies)for(var Yr=1;Yr<=3;Yr++)cr.push(qe(-Yr)),cr.push(qe(Yr));for(cr.push(qe(0));cr.length>0;){var Vr=cr.pop(),Kr=Vr.x,fn=Vr.y,Fn=Vr.fullyVisible;if(!Fn){var Nn=Vr.aabb.intersects(ue);if(Nn===0)continue;Fn=Nn===2}var Yn=Vr.aabb.distanceX(Qt),Xn=Vr.aabb.distanceY(Qt),Gn=Math.max(Math.abs(Yn),Math.abs(Xn)),jn=We+(1<jn&&Vr.zoom>=Re){lr.push({tileID:new i.OverscaledTileID(Vr.zoom===Fr?Xr:Vr.zoom,Vr.wrap,Vr.zoom,Kr,fn),distanceSq:i.sqrLen([Qt[0]-.5-Kr,Qt[1]-.5-fn])});continue}for(var ti=0;ti<4;ti++){var si=(Kr<<1)+ti%2,yi=(fn<<1)+(ti>>1);cr.push({aabb:Vr.aabb.quadrant(ti),zoom:Vr.zoom+1,x:si,y:yi,wrap:Vr.wrap,fullyVisible:Fn})}}return lr.sort(function(hi,Fi){return hi.distanceSq-Fi.distanceSq}).map(function(hi){return hi.tileID})},Dn.prototype.resize=function(K,dt){this.width=K,this.height=dt,this.pixelsToGLUnits=[2/K,-2/dt],this._constrain(),this._calcMatrices()},Zn.unmodified.get=function(){return this._unmodified},Dn.prototype.zoomScale=function(K){return Math.pow(2,K)},Dn.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},Dn.prototype.project=function(K){var dt=i.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(K.lng)*this.worldSize,i.mercatorYfromLat(dt)*this.worldSize)},Dn.prototype.unproject=function(K){return new i.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},Zn.point.get=function(){return this.project(this.center)},Dn.prototype.setLocationAtPoint=function(K,dt){var rt=this.pointCoordinate(dt),pt=this.pointCoordinate(this.centerPoint),Ot=this.locationCoordinate(K),Qt=new i.MercatorCoordinate(Ot.x-(rt.x-pt.x),Ot.y-(rt.y-pt.y));this.center=this.coordinateLocation(Qt),this._renderWorldCopies&&(this.center=this.center.wrap())},Dn.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},Dn.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},Dn.prototype.locationCoordinate=function(K){return i.MercatorCoordinate.fromLngLat(K)},Dn.prototype.coordinateLocation=function(K){return K.toLngLat()},Dn.prototype.pointCoordinate=function(K){var dt=0,rt=[K.x,K.y,0,1],pt=[K.x,K.y,1,1];i.transformMat4(rt,rt,this.pixelMatrixInverse),i.transformMat4(pt,pt,this.pixelMatrixInverse);var Ot=rt[3],Qt=pt[3],ue=rt[0]/Ot,Re=pt[0]/Qt,We=rt[1]/Ot,qe=pt[1]/Qt,cr=rt[2]/Ot,lr=pt[2]/Qt,Fr=cr===lr?0:(dt-cr)/(lr-cr);return new i.MercatorCoordinate(i.number(ue,Re,Fr)/this.worldSize,i.number(We,qe,Fr)/this.worldSize)},Dn.prototype.coordinatePoint=function(K){var dt=[K.x*this.worldSize,K.y*this.worldSize,0,1];return i.transformMat4(dt,dt,this.pixelMatrix),new i.Point(dt[0]/dt[3],dt[1]/dt[3])},Dn.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},Dn.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Dn.prototype.setMaxBounds=function(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Dn.prototype.calculatePosMatrix=function(K,dt){dt===void 0&&(dt=!1);var rt=K.key,pt=dt?this._alignedPosMatrixCache:this._posMatrixCache;if(pt[rt])return pt[rt];var Ot=K.canonical,Qt=this.worldSize/this.zoomScale(Ot.z),ue=Ot.x+Math.pow(2,Ot.z)*K.wrap,Re=i.identity(new Float64Array(16));return i.translate(Re,Re,[ue*Qt,Ot.y*Qt,0]),i.scale(Re,Re,[Qt/i.EXTENT,Qt/i.EXTENT,1]),i.multiply(Re,dt?this.alignedProjMatrix:this.projMatrix,Re),pt[rt]=new Float32Array(Re),pt[rt]},Dn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Dn.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,dt=90,rt=-180,pt=180,Ot,Qt,ue,Re,We=this.size,qe=this._unmodified;if(this.latRange){var cr=this.latRange;K=i.mercatorYfromLat(cr[1])*this.worldSize,dt=i.mercatorYfromLat(cr[0])*this.worldSize,Ot=dt-Kdt&&(Re=dt-Vr)}if(this.lngRange){var Kr=Fr.x,fn=We.x/2;Kr-fnpt&&(ue=pt-fn)}(ue!==void 0||Re!==void 0)&&(this.center=this.unproject(new i.Point(ue!==void 0?ue:Fr.x,Re!==void 0?Re:Fr.y))),this._unmodified=qe,this._constraining=!1}},Dn.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,dt=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var rt=Math.PI/2+this._pitch,pt=this._fov*(.5+dt.y/this.height),Ot=Math.sin(pt)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-rt-pt,.01,Math.PI-.01)),Qt=this.point,ue=Qt.x,Re=Qt.y,We=Math.cos(Math.PI/2-this._pitch)*Ot+this.cameraToCenterDistance,qe=We*1.01,cr=this.height/50,lr=new Float64Array(16);i.perspective(lr,this._fov,this.width/this.height,cr,qe),lr[8]=-dt.x*2/this.width,lr[9]=dt.y*2/this.height,i.scale(lr,lr,[1,-1,1]),i.translate(lr,lr,[0,0,-this.cameraToCenterDistance]),i.rotateX(lr,lr,this._pitch),i.rotateZ(lr,lr,this.angle),i.translate(lr,lr,[-ue,-Re,0]),this.mercatorMatrix=i.scale([],lr,[this.worldSize,this.worldSize,this.worldSize]),i.scale(lr,lr,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=lr,this.invProjMatrix=i.invert([],this.projMatrix);var Fr=this.width%2/2,Xr=this.height%2/2,Yr=Math.cos(this.angle),Vr=Math.sin(this.angle),Kr=ue-Math.round(ue)+Yr*Fr+Vr*Xr,fn=Re-Math.round(Re)+Yr*Xr+Vr*Fr,Fn=new Float64Array(lr);if(i.translate(Fn,Fn,[Kr>.5?Kr-1:Kr,fn>.5?fn-1:fn,0]),this.alignedProjMatrix=Fn,lr=i.create(),i.scale(lr,lr,[this.width/2,-this.height/2,1]),i.translate(lr,lr,[1,-1,0]),this.labelPlaneMatrix=lr,lr=i.create(),i.scale(lr,lr,[1,-1,1]),i.translate(lr,lr,[-1,-1,0]),i.scale(lr,lr,[2/this.width,2/this.height,1]),this.glCoordMatrix=lr,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),lr=i.invert(new Float64Array(16),this.pixelMatrix),!lr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=lr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Dn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new i.Point(0,0)),dt=[K.x*this.worldSize,K.y*this.worldSize,0,1],rt=i.transformMat4(dt,dt,this.pixelMatrix);return rt[3]/this.cameraToCenterDistance},Dn.prototype.getCameraPoint=function(){var K=this._pitch,dt=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,dt))},Dn.prototype.getCameraQueryGeometry=function(K){var dt=this.getCameraPoint();if(K.length===1)return[K[0],dt];for(var rt=dt.x,pt=dt.y,Ot=dt.x,Qt=dt.y,ue=0,Re=K;ue=3&&!K.some(function(rt){return isNaN(rt)})){var dt=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(K[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+K[2],+K[1]],zoom:+K[0],bearing:dt,pitch:+(K[4]||0)}),!0}return!1},Pi.prototype._updateHashUnthrottled=function(){var K=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,K)}catch{}};var Ri={linearity:.3,easing:i.bezier(0,0,.3,1)},zi=i.extend({deceleration:2500,maxSpeed:1400},Ri),Xi=i.extend({deceleration:20,maxSpeed:1400},Ri),da=i.extend({deceleration:1e3,maxSpeed:360},Ri),Ia=i.extend({deceleration:1e3,maxSpeed:90},Ri),ft=function(K){this._map=K,this.clear()};ft.prototype.clear=function(){this._inertiaBuffer=[]},ft.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:K})},ft.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,dt=i.browser.now(),rt=160;K.length>0&&dt-K[0].time>rt;)K.shift()},ft.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var dt={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},rt=0,pt=this._inertiaBuffer;rt=this._clickTolerance||this._map.fire(new ee(K.type,this._map,K))},De.prototype.dblclick=function(K){return this._firePreventable(new ee(K.type,this._map,K))},De.prototype.mouseover=function(K){this._map.fire(new ee(K.type,this._map,K))},De.prototype.mouseout=function(K){this._map.fire(new ee(K.type,this._map,K))},De.prototype.touchstart=function(K){return this._firePreventable(new ae(K.type,this._map,K))},De.prototype.touchmove=function(K){this._map.fire(new ae(K.type,this._map,K))},De.prototype.touchend=function(K){this._map.fire(new ae(K.type,this._map,K))},De.prototype.touchcancel=function(K){this._map.fire(new ae(K.type,this._map,K))},De.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},De.prototype.isEnabled=function(){return!0},De.prototype.isActive=function(){return!1},De.prototype.enable=function(){},De.prototype.disable=function(){};var Ee=function(K){this._map=K};Ee.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ee.prototype.mousemove=function(K){this._map.fire(new ee(K.type,this._map,K))},Ee.prototype.mousedown=function(){this._delayContextMenu=!0},Ee.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ee("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ee.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new ee(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Ee.prototype.isEnabled=function(){return!0},Ee.prototype.isActive=function(){return!1},Ee.prototype.enable=function(){},Ee.prototype.disable=function(){};var Ye=function(K,dt){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=dt.clickTolerance||1};Ye.prototype.isEnabled=function(){return!!this._enabled},Ye.prototype.isActive=function(){return!!this._active},Ye.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ye.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ye.prototype.mousedown=function(K,dt){this.isEnabled()&&K.shiftKey&&K.button===0&&(x.disableDrag(),this._startPos=this._lastPos=dt,this._active=!0)},Ye.prototype.mousemoveWindow=function(K,dt){if(this._active){var rt=dt;if(!(this._lastPos.equals(rt)||!this._box&&rt.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),rt.length===this.numTouches&&(this.centroid=nr(dt),this.touches=Ze(rt,dt)))},on.prototype.touchmove=function(K,dt,rt){if(!(this.aborted||!this.centroid)){var pt=Ze(rt,dt);for(var Ot in this.touches){var Qt=this.touches[Ot],ue=pt[Ot];(!ue||ue.dist(Qt)>Jr)&&(this.aborted=!0)}}},on.prototype.touchend=function(K,dt,rt){if((!this.centroid||K.timeStamp-this.startTime>Lr)&&(this.aborted=!0),rt.length===0){var pt=!this.aborted&&this.centroid;if(this.reset(),pt)return pt}};var Rr=function(K){this.singleTap=new on(K),this.numTaps=K.numTaps,this.reset()};Rr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Rr.prototype.touchstart=function(K,dt,rt){this.singleTap.touchstart(K,dt,rt)},Rr.prototype.touchmove=function(K,dt,rt){this.singleTap.touchmove(K,dt,rt)},Rr.prototype.touchend=function(K,dt,rt){var pt=this.singleTap.touchend(K,dt,rt);if(pt){var Ot=K.timeStamp-this.lastTime<_r,Qt=!this.lastTap||this.lastTap.dist(pt)0&&(this._active=!0);var pt=Ze(rt,dt),Ot=new i.Point(0,0),Qt=new i.Point(0,0),ue=0;for(var Re in pt){var We=pt[Re],qe=this._touches[Re];qe&&(Ot._add(We),Qt._add(We.sub(qe)),ue++,pt[Re]=We)}if(this._touches=pt,!(ueMath.abs(ht.x)}var Ti=100,Zi=function(ht){function K(){ht.apply(this,arguments)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ht.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(rt){this._lastPoints=rt,Bi(rt[0].sub(rt[1]))&&(this._valid=!1)},K.prototype._move=function(rt,pt,Ot){var Qt=rt[0].sub(this._lastPoints[0]),ue=rt[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Qt,ue,Ot.timeStamp),!!this._valid){this._lastPoints=rt,this._active=!0;var Re=(Qt.y+ue.y)/2,We=-.5;return{pitchDelta:Re*We}}},K.prototype.gestureBeginsVertically=function(rt,pt,Ot){if(this._valid!==void 0)return this._valid;var Qt=2,ue=rt.mag()>=Qt,Re=pt.mag()>=Qt;if(!(!ue&&!Re)){if(!ue||!Re)return this._firstMove===void 0&&(this._firstMove=Ot),Ot-this._firstMove0==pt.y>0;return Bi(rt)&&Bi(pt)&&We}},K}(fi),ba={panStep:100,bearingStep:15,pitchStep:10},na=function(){var K=ba;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};na.prototype.reset=function(){this._active=!1},na.prototype.keydown=function(K){var dt=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var rt=0,pt=0,Ot=0,Qt=0,ue=0;switch(K.keyCode){case 61:case 107:case 171:case 187:rt=1;break;case 189:case 109:case 173:rt=-1;break;case 37:K.shiftKey?pt=-1:(K.preventDefault(),Qt=-1);break;case 39:K.shiftKey?pt=1:(K.preventDefault(),Qt=1);break;case 38:K.shiftKey?Ot=1:(K.preventDefault(),ue=-1);break;case 40:K.shiftKey?Ot=-1:(K.preventDefault(),ue=1);break;default:return}return this._rotationDisabled&&(pt=0,Ot=0),{cameraAnimation:function(Re){var We=Re.getZoom();Re.easeTo({duration:300,easeId:"keyboardHandler",easing:Ka,zoom:rt?Math.round(We)+rt*(K.shiftKey?2:1):We,bearing:Re.getBearing()+pt*dt._bearingStep,pitch:Re.getPitch()+Ot*dt._pitchStep,offset:[-Qt*dt._panStep,-ue*dt._panStep],center:Re.getCenter()},{originalEvent:K})}}}},na.prototype.enable=function(){this._enabled=!0},na.prototype.disable=function(){this._enabled=!1,this.reset()},na.prototype.isEnabled=function(){return this._enabled},na.prototype.isActive=function(){return this._active},na.prototype.disableRotation=function(){this._rotationDisabled=!0},na.prototype.enableRotation=function(){this._rotationDisabled=!1};function Ka(ht){return ht*(2-ht)}var Ja=4.000244140625,to=1/100,wa=1/450,uo=2,oi=function(K,dt){this._map=K,this._el=K.getCanvasContainer(),this._handler=dt,this._delta=0,this._defaultZoomRate=to,this._wheelZoomRate=wa,i.bindAll(["_onTimeout"],this)};oi.prototype.setZoomRate=function(K){this._defaultZoomRate=K},oi.prototype.setWheelZoomRate=function(K){this._wheelZoomRate=K},oi.prototype.isEnabled=function(){return!!this._enabled},oi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},oi.prototype.isZooming=function(){return!!this._zooming},oi.prototype.enable=function(K){this.isEnabled()||(this._enabled=!0,this._aroundCenter=K&&K.around==="center")},oi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},oi.prototype.wheel=function(K){if(this.isEnabled()){var dt=K.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,rt=i.browser.now(),pt=rt-(this._lastWheelEventTime||0);this._lastWheelEventTime=rt,dt!==0&&dt%Ja===0?this._type="wheel":dt!==0&&Math.abs(dt)<4?this._type="trackpad":pt>400?(this._type=null,this._lastValue=dt,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(pt*dt)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,dt+=this._lastValue)),K.shiftKey&&dt&&(dt=dt/4),this._type&&(this._lastWheelEvent=K,this._delta-=dt,this._active||this._start(K)),K.preventDefault()}},oi.prototype._onTimeout=function(K){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(K)},oi.prototype._start=function(K){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var dt=x.mousePos(this._el,K);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(dt)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},oi.prototype.renderFrame=function(){var K=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var dt=this._map.transform;if(this._delta!==0){var rt=this._type==="wheel"&&Math.abs(this._delta)>Ja?this._wheelZoomRate:this._defaultZoomRate,pt=uo/(1+Math.exp(-Math.abs(this._delta*rt)));this._delta<0&&pt!==0&&(pt=1/pt);var Ot=typeof this._targetZoom=="number"?dt.zoomScale(this._targetZoom):dt.scale;this._targetZoom=Math.min(dt.maxZoom,Math.max(dt.minZoom,dt.scaleZoom(Ot*pt))),this._type==="wheel"&&(this._startZoom=dt.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Qt=typeof this._targetZoom=="number"?this._targetZoom:dt.zoom,ue=this._startZoom,Re=this._easing,We=!1,qe;if(this._type==="wheel"&&ue&&Re){var cr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),lr=Re(cr);qe=i.number(ue,Qt,lr),cr<1?this._frameId||(this._frameId=!0):We=!0}else qe=Qt,We=!0;return this._active=!0,We&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!We,zoomDelta:qe-dt.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},oi.prototype._smoothOutEasing=function(K){var dt=i.ease;if(this._prevEase){var rt=this._prevEase,pt=(i.browser.now()-rt.start)/rt.duration,Ot=rt.easing(pt+.01)-rt.easing(pt),Qt=.27/Math.sqrt(Ot*Ot+1e-4)*.01,ue=Math.sqrt(.27*.27-Qt*Qt);dt=i.bezier(Qt,ue,.25,1)}return this._prevEase={start:i.browser.now(),duration:K,easing:dt},dt},oi.prototype.reset=function(){this._active=!1};var Ei=function(K,dt){this._clickZoom=K,this._tapZoom=dt};Ei.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Ei.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Ei.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Ei.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ao=function(){this.reset()};Ao.prototype.reset=function(){this._active=!1},Ao.prototype.dblclick=function(K,dt){return K.preventDefault(),{cameraAnimation:function(rt){rt.easeTo({duration:300,zoom:rt.getZoom()+(K.shiftKey?-1:1),around:rt.unproject(dt)},{originalEvent:K})}}},Ao.prototype.enable=function(){this._enabled=!0},Ao.prototype.disable=function(){this._enabled=!1,this.reset()},Ao.prototype.isEnabled=function(){return this._enabled},Ao.prototype.isActive=function(){return this._active};var Lo=function(){this._tap=new Rr({numTouches:1,numTaps:1}),this.reset()};Lo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Lo.prototype.touchstart=function(K,dt,rt){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>_r&&this.reset(),this._tapTime?rt.length>0&&(this._swipePoint=dt[0],this._swipeTouch=rt[0].identifier):this._tap.touchstart(K,dt,rt))},Lo.prototype.touchmove=function(K,dt,rt){if(!this._tapTime)this._tap.touchmove(K,dt,rt);else if(this._swipePoint){if(rt[0].identifier!==this._swipeTouch)return;var pt=dt[0],Ot=pt.y-this._swipePoint.y;return this._swipePoint=pt,K.preventDefault(),this._active=!0,{zoomDelta:Ot/128}}},Lo.prototype.touchend=function(K,dt,rt){if(this._tapTime)this._swipePoint&&rt.length===0&&this.reset();else{var pt=this._tap.touchend(K,dt,rt);pt&&(this._tapTime=K.timeStamp)}},Lo.prototype.touchcancel=function(){this.reset()},Lo.prototype.enable=function(){this._enabled=!0},Lo.prototype.disable=function(){this._enabled=!1,this.reset()},Lo.prototype.isEnabled=function(){return this._enabled},Lo.prototype.isActive=function(){return this._active};var eo=function(K,dt,rt){this._el=K,this._mousePan=dt,this._touchPan=rt};eo.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},eo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},eo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},eo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ca=function(K,dt,rt){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=dt,this._mousePitch=rt};ca.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ca.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ca.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ca.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Va=function(K,dt,rt,pt){this._el=K,this._touchZoom=dt,this._touchRotate=rt,this._tapDragZoom=pt,this._rotationDisabled=!1,this._enabled=!0};Va.prototype.enable=function(K){this._touchZoom.enable(K),this._rotationDisabled||this._touchRotate.enable(K),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Va.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Va.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Va.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Va.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Va.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Oa=function(ht){return ht.zoom||ht.drag||ht.pitch||ht.rotate},is=function(ht){function K(){ht.apply(this,arguments)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K}(i.Event);function bs(ht){return ht.panDelta&&ht.panDelta.mag()||ht.zoomDelta||ht.bearingDelta||ht.pitchDelta}var Ea=function(K,dt){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ft(K),this._bearingSnap=dt.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(dt),i.bindAll(["handleEvent","handleWindowEvent"],this);var rt=this._el;this._listeners=[[rt,"touchstart",{passive:!0}],[rt,"touchmove",{passive:!1}],[rt,"touchend",void 0],[rt,"touchcancel",void 0],[rt,"mousedown",void 0],[rt,"mousemove",void 0],[rt,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[rt,"mouseover",void 0],[rt,"mouseout",void 0],[rt,"dblclick",void 0],[rt,"click",void 0],[rt,"keydown",{capture:!1}],[rt,"keyup",void 0],[rt,"wheel",{passive:!1}],[rt,"contextmenu",void 0],[i.window,"blur",void 0]];for(var pt=0,Ot=this._listeners;ptue?Math.min(2,Yn):Math.max(.5,Yn),hi=Math.pow(yi,1-ti),Fi=Qt.unproject(Fn.add(Nn.mult(ti*hi)).mult(si));Qt.setLocationAtPoint(Qt.renderWorldCopies?Fi.wrap():Fi,Vr)}Ot._fireMoveEvents(pt)},function(ti){Ot._afterEase(pt,ti)},rt),this},K.prototype._prepareEase=function(rt,pt,Ot){Ot===void 0&&(Ot={}),this._moving=!0,!pt&&!Ot.moving&&this.fire(new i.Event("movestart",rt)),this._zooming&&!Ot.zooming&&this.fire(new i.Event("zoomstart",rt)),this._rotating&&!Ot.rotating&&this.fire(new i.Event("rotatestart",rt)),this._pitching&&!Ot.pitching&&this.fire(new i.Event("pitchstart",rt))},K.prototype._fireMoveEvents=function(rt){this.fire(new i.Event("move",rt)),this._zooming&&this.fire(new i.Event("zoom",rt)),this._rotating&&this.fire(new i.Event("rotate",rt)),this._pitching&&this.fire(new i.Event("pitch",rt))},K.prototype._afterEase=function(rt,pt){if(!(this._easeId&&pt&&this._easeId===pt)){delete this._easeId;var Ot=this._zooming,Qt=this._rotating,ue=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ot&&this.fire(new i.Event("zoomend",rt)),Qt&&this.fire(new i.Event("rotateend",rt)),ue&&this.fire(new i.Event("pitchend",rt)),this.fire(new i.Event("moveend",rt))}},K.prototype.flyTo=function(rt,pt){var Ot=this;if(!rt.essential&&i.browser.prefersReducedMotion){var Qt=i.pick(rt,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Qt,pt)}this.stop(),rt=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},rt);var ue=this.transform,Re=this.getZoom(),We=this.getBearing(),qe=this.getPitch(),cr=this.getPadding(),lr="zoom"in rt?i.clamp(+rt.zoom,ue.minZoom,ue.maxZoom):Re,Fr="bearing"in rt?this._normalizeBearing(rt.bearing,We):We,Xr="pitch"in rt?+rt.pitch:qe,Yr="padding"in rt?rt.padding:ue.padding,Vr=ue.zoomScale(lr-Re),Kr=i.Point.convert(rt.offset),fn=ue.centerPoint.add(Kr),Fn=ue.pointLocation(fn),Nn=i.LngLat.convert(rt.center||Fn);this._normalizeCenter(Nn);var Yn=ue.project(Fn),Xn=ue.project(Nn).sub(Yn),Gn=rt.curve,jn=Math.max(ue.width,ue.height),ti=jn/Vr,si=Xn.mag();if("minZoom"in rt){var yi=i.clamp(Math.min(rt.minZoom,Re,lr),ue.minZoom,ue.maxZoom),hi=jn/ue.zoomScale(yi-Re);Gn=Math.sqrt(hi/si*2)}var Fi=Gn*Gn;function Ji(Hi){var Qi=(ti*ti-jn*jn+(Hi?-1:1)*Fi*Fi*si*si)/(2*(Hi?ti:jn)*Fi*si);return Math.log(Math.sqrt(Qi*Qi+1)-Qi)}function Gi(Hi){return(Math.exp(Hi)-Math.exp(-Hi))/2}function Ai(Hi){return(Math.exp(Hi)+Math.exp(-Hi))/2}function Yi(Hi){return Gi(Hi)/Ai(Hi)}var Ui=Ji(0),ia=function(Hi){return Ai(Ui)/Ai(Ui+Gn*Hi)},qi=function(Hi){return jn*((Ai(Ui)*Yi(Ui+Gn*Hi)-Gi(Ui))/Fi)/si},Ta=(Ji(1)-Ui)/Gn;if(Math.abs(si)<1e-6||!isFinite(Ta)){if(Math.abs(jn-ti)<1e-6)return this.easeTo(rt,pt);var Ki=tirt.maxDuration&&(rt.duration=0),this._zooming=!0,this._rotating=We!==Fr,this._pitching=Xr!==qe,this._padding=!ue.isPaddingEqual(Yr),this._prepareEase(pt,!1),this._ease(function(Hi){var Qi=Hi*Ta,Na=1/ia(Qi);ue.zoom=Hi===1?lr:Re+ue.scaleZoom(Na),Ot._rotating&&(ue.bearing=i.number(We,Fr,Hi)),Ot._pitching&&(ue.pitch=i.number(qe,Xr,Hi)),Ot._padding&&(ue.interpolatePadding(cr,Yr,Hi),fn=ue.centerPoint.add(Kr));var fo=Hi===1?Nn:ue.unproject(Yn.add(Xn.mult(qi(Qi))).mult(Na));ue.setLocationAtPoint(ue.renderWorldCopies?fo.wrap():fo,fn),Ot._fireMoveEvents(pt)},function(){return Ot._afterEase(pt)},rt),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(rt,pt){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ot=this._onEaseEnd;delete this._onEaseEnd,Ot.call(this,pt)}if(!rt){var Qt=this.handlers;Qt&&Qt.stop(!1)}return this},K.prototype._ease=function(rt,pt,Ot){Ot.animate===!1||Ot.duration===0?(rt(1),pt()):(this._easeStart=i.browser.now(),this._easeOptions=Ot,this._onEaseFrame=rt,this._onEaseEnd=pt,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var rt=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(rt)),rt<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(rt,pt){rt=i.wrap(rt,-180,180);var Ot=Math.abs(rt-pt);return Math.abs(rt-360-pt)180?-360:Ot<-180?360:0}},K}(i.Evented),ji=function(K){K===void 0&&(K={}),this.options=K,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};ji.prototype.getDefaultPosition=function(){return"bottom-right"},ji.prototype.onAdd=function(K){var dt=this.options&&this.options.compact;return this._map=K,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=x.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),dt&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),dt===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},ji.prototype.onRemove=function(){x.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},ji.prototype._setElementTitle=function(K,dt){var rt=this._map._getUIString("AttributionControl."+dt);K.title=rt,K.setAttribute("aria-label",rt)},ji.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},ji.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var dt=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(K){var rt=dt.reduce(function(pt,Ot,Qt){return Ot.value&&(pt+=Ot.key+"="+Ot.value+(Qt=0)return!1;return!0});var ue=K.join(" | ");ue!==this._attribHTML&&(this._attribHTML=ue,K.length?(this._innerContainer.innerHTML=ue,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},ji.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var _a=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};_a.prototype.onAdd=function(K){this._map=K,this._container=x.create("div","mapboxgl-ctrl");var dt=x.create("a","mapboxgl-ctrl-logo");return dt.target="_blank",dt.rel="noopener nofollow",dt.href="https://www.mapbox.com/",dt.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),dt.setAttribute("rel","noopener nofollow"),this._container.appendChild(dt),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},_a.prototype.onRemove=function(){x.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},_a.prototype.getDefaultPosition=function(){return"bottom-left"},_a.prototype._updateLogo=function(K){(!K||K.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},_a.prototype._logoRequired=function(){if(this._map.style){var K=this._map.style.sourceCaches;for(var dt in K){var rt=K[dt].getSource();if(rt.mapbox_logo)return!0}return!1}},_a.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var dt=K[0];this._map.getCanvasContainer().offsetWidth<250?dt.classList.add("mapboxgl-compact"):dt.classList.remove("mapboxgl-compact")}};var zc=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};zc.prototype.add=function(K){var dt=++this._id,rt=this._queue;return rt.push({callback:K,id:dt,cancelled:!1}),dt},zc.prototype.remove=function(K){for(var dt=this._currentlyRunning,rt=dt?this._queue.concat(dt):this._queue,pt=0,Ot=rt;ptrt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(rt.minPitch!=null&&rt.maxPitch!=null&&rt.minPitch>rt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(rt.minPitch!=null&&rt.minPitchPu)throw new Error("maxPitch must be less than or equal to "+Pu);var Ot=new Dn(rt.minZoom,rt.maxZoom,rt.minPitch,rt.maxPitch,rt.renderWorldCopies);if(ht.call(this,Ot,rt),this._interactive=rt.interactive,this._maxTileCacheSize=rt.maxTileCacheSize,this._failIfMajorPerformanceCaveat=rt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=rt.preserveDrawingBuffer,this._antialias=rt.antialias,this._trackResize=rt.trackResize,this._bearingSnap=rt.bearingSnap,this._refreshExpiredTiles=rt.refreshExpiredTiles,this._fadeDuration=rt.fadeDuration,this._crossSourceCollisions=rt.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=rt.collectResourceTiming,this._renderTaskQueue=new zc,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},ed,rt.locale),this._clickTolerance=rt.clickTolerance,this._requestManager=new i.RequestManager(rt.transformRequest,rt.accessToken),typeof rt.container=="string"){if(this._container=i.window.document.getElementById(rt.container),!this._container)throw new Error("Container '"+rt.container+"' not found.")}else if(rt.container instanceof pv)this._container=rt.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(rt.maxBounds&&this.setMaxBounds(rt.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return pt._update(!1)}),this.on("moveend",function(){return pt._update(!1)}),this.on("zoom",function(){return pt._update(!0)}),typeof i.window<"u"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ea(this,rt);var Qt=typeof rt.hash=="string"&&rt.hash||void 0;this._hash=rt.hash&&new Pi(Qt).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:rt.center,zoom:rt.zoom,bearing:rt.bearing,pitch:rt.pitch}),rt.bounds&&(this.resize(),this.fitBounds(rt.bounds,i.extend({},rt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=rt.localIdeographFontFamily,rt.style&&this.setStyle(rt.style,{localIdeographFontFamily:rt.localIdeographFontFamily}),rt.attributionControl&&this.addControl(new ji({customAttribution:rt.customAttribution})),this.addControl(new _a,rt.logoPosition),this.on("style.load",function(){pt.transform.unmodified&&pt.jumpTo(pt.style.stylesheet)}),this.on("data",function(ue){pt._update(ue.dataType==="style"),pt.fire(new i.Event(ue.dataType+"data",ue))}),this.on("dataloading",function(ue){pt.fire(new i.Event(ue.dataType+"dataloading",ue))})}ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K;var dt={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return K.prototype._getMapId=function(){return this._mapId},K.prototype.addControl=function(pt,Ot){if(Ot===void 0&&(pt.getDefaultPosition?Ot=pt.getDefaultPosition():Ot="top-right"),!pt||!pt.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Qt=pt.onAdd(this);this._controls.push(pt);var ue=this._controlPositions[Ot];return Ot.indexOf("bottom")!==-1?ue.insertBefore(Qt,ue.firstChild):ue.appendChild(Qt),this},K.prototype.removeControl=function(pt){if(!pt||!pt.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Ot=this._controls.indexOf(pt);return Ot>-1&&this._controls.splice(Ot,1),pt.onRemove(this),this},K.prototype.hasControl=function(pt){return this._controls.indexOf(pt)>-1},K.prototype.resize=function(pt){var Ot=this._containerDimensions(),Qt=Ot[0],ue=Ot[1];this._resizeCanvas(Qt,ue),this.transform.resize(Qt,ue),this.painter.resize(Qt,ue);var Re=!this._moving;return Re&&(this.stop(),this.fire(new i.Event("movestart",pt)).fire(new i.Event("move",pt))),this.fire(new i.Event("resize",pt)),Re&&this.fire(new i.Event("moveend",pt)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(pt){return this.transform.setMaxBounds(i.LngLatBounds.convert(pt)),this._update()},K.prototype.setMinZoom=function(pt){if(pt=pt??Gf,pt>=Gf&&pt<=this.transform.maxZoom)return this.transform.minZoom=pt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=pt,this._update(),this.getZoom()>pt&&this.setZoom(pt),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(pt){if(pt=pt??Zo,pt=Zo&&pt<=this.transform.maxPitch)return this.transform.minPitch=pt,this._update(),this.getPitch()Pu)throw new Error("maxPitch must be less than or equal to "+Pu);if(pt>=this.transform.minPitch)return this.transform.maxPitch=pt,this._update(),this.getPitch()>pt&&this.setPitch(pt),this;throw new Error("maxPitch must be greater than the current minPitch")},K.prototype.getMaxPitch=function(){return this.transform.maxPitch},K.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},K.prototype.setRenderWorldCopies=function(pt){return this.transform.renderWorldCopies=pt,this._update()},K.prototype.project=function(pt){return this.transform.locationPoint(i.LngLat.convert(pt))},K.prototype.unproject=function(pt){return this.transform.pointLocation(i.Point.convert(pt))},K.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},K.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},K.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},K.prototype._createDelegatedListener=function(pt,Ot,Qt){var ue=this,Re;if(pt==="mouseenter"||pt==="mouseover"){var We=!1,qe=function(Vr){var Kr=ue.getLayer(Ot)?ue.queryRenderedFeatures(Vr.point,{layers:[Ot]}):[];Kr.length?We||(We=!0,Qt.call(ue,new ee(pt,ue,Vr.originalEvent,{features:Kr}))):We=!1},cr=function(){We=!1};return{layer:Ot,listener:Qt,delegates:{mousemove:qe,mouseout:cr}}}else if(pt==="mouseleave"||pt==="mouseout"){var lr=!1,Fr=function(Vr){var Kr=ue.getLayer(Ot)?ue.queryRenderedFeatures(Vr.point,{layers:[Ot]}):[];Kr.length?lr=!0:lr&&(lr=!1,Qt.call(ue,new ee(pt,ue,Vr.originalEvent)))},Xr=function(Vr){lr&&(lr=!1,Qt.call(ue,new ee(pt,ue,Vr.originalEvent)))};return{layer:Ot,listener:Qt,delegates:{mousemove:Fr,mouseout:Xr}}}else{var Yr=function(Vr){var Kr=ue.getLayer(Ot)?ue.queryRenderedFeatures(Vr.point,{layers:[Ot]}):[];Kr.length&&(Vr.features=Kr,Qt.call(ue,Vr),delete Vr.features)};return{layer:Ot,listener:Qt,delegates:(Re={},Re[pt]=Yr,Re)}}},K.prototype.on=function(pt,Ot,Qt){if(Qt===void 0)return ht.prototype.on.call(this,pt,Ot);var ue=this._createDelegatedListener(pt,Ot,Qt);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[pt]=this._delegatedListeners[pt]||[],this._delegatedListeners[pt].push(ue);for(var Re in ue.delegates)this.on(Re,ue.delegates[Re]);return this},K.prototype.once=function(pt,Ot,Qt){if(Qt===void 0)return ht.prototype.once.call(this,pt,Ot);var ue=this._createDelegatedListener(pt,Ot,Qt);for(var Re in ue.delegates)this.once(Re,ue.delegates[Re]);return this},K.prototype.off=function(pt,Ot,Qt){var ue=this;if(Qt===void 0)return ht.prototype.off.call(this,pt,Ot);var Re=function(We){for(var qe=We[pt],cr=0;cr180;){var Qt=dt.locationPoint(ht);if(Qt.x>=0&&Qt.y>=0&&Qt.x<=dt.width&&Qt.y<=dt.height)break;ht.lng>dt.center.lng?ht.lng-=360:ht.lng+=360}return ht}var Oc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function oh(ht,K,dt){var rt=ht.classList;for(var pt in Oc)rt.remove("mapboxgl-"+dt+"-anchor-"+pt);rt.add("mapboxgl-"+dt+"-anchor-"+K)}var Yf=function(ht){function K(dt,rt){if(ht.call(this),(dt instanceof i.window.HTMLElement||rt)&&(dt=i.extend({element:dt},rt)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=dt&&dt.anchor||"center",this._color=dt&&dt.color||"#3FB1CE",this._scale=dt&&dt.scale||1,this._draggable=dt&&dt.draggable||!1,this._clickTolerance=dt&&dt.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=dt&&dt.rotation||0,this._rotationAlignment=dt&&dt.rotationAlignment||"auto",this._pitchAlignment=dt&&dt.pitchAlignment&&dt.pitchAlignment!=="auto"?dt.pitchAlignment:this._rotationAlignment,!dt||!dt.element){this._defaultMarker=!0,this._element=x.create("div"),this._element.setAttribute("aria-label","Map marker");var pt=x.createNS("http://www.w3.org/2000/svg","svg"),Ot=41,Qt=27;pt.setAttributeNS(null,"display","block"),pt.setAttributeNS(null,"height",Ot+"px"),pt.setAttributeNS(null,"width",Qt+"px"),pt.setAttributeNS(null,"viewBox","0 0 "+Qt+" "+Ot);var ue=x.createNS("http://www.w3.org/2000/svg","g");ue.setAttributeNS(null,"stroke","none"),ue.setAttributeNS(null,"stroke-width","1"),ue.setAttributeNS(null,"fill","none"),ue.setAttributeNS(null,"fill-rule","evenodd");var Re=x.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");var We=x.createNS("http://www.w3.org/2000/svg","g");We.setAttributeNS(null,"transform","translate(3.0, 29.0)"),We.setAttributeNS(null,"fill","#000000");for(var qe=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],cr=0,lr=qe;cr=pt}this._isDragging&&(this._pos=rt.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},K.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},K.prototype._addDragHandler=function(rt){this._element.contains(rt.originalEvent.target)&&(rt.preventDefault(),this._positionDelta=rt.point.sub(this._pos).add(this._offset),this._pointerdownPos=rt.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},K.prototype.setDraggable=function(rt){return this._draggable=!!rt,this._map&&(rt?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(rt){return this._rotation=rt||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(rt){return this._rotationAlignment=rt||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(rt){return this._pitchAlignment=rt&&rt!=="auto"?rt:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(i.Evented),yv={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ru;function Nc(ht){Ru!==void 0?ht(Ru):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(K){Ru=K.state!=="denied",ht(Ru)}):(Ru=!!i.window.navigator.geolocation,ht(Ru))}var Xf=0,af=!1,rd=function(ht){function K(dt){ht.call(this),this.options=i.extend({},yv,dt),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(rt){return this._map=rt,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Nc(this._setupUI),this._container},K.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),x.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xf=0,af=!1},K.prototype._isOutOfMapMaxBounds=function(rt){var pt=this._map.getMaxBounds(),Ot=rt.coords;return pt&&(Ot.longitudept.getEast()||Ot.latitudept.getNorth())},K.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},K.prototype._onSuccess=function(rt){if(this._map){if(this._isOutOfMapMaxBounds(rt)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",rt)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=rt,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(rt),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(rt),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",rt)),this._finish()}},K.prototype._updateCamera=function(rt){var pt=new i.LngLat(rt.coords.longitude,rt.coords.latitude),Ot=rt.coords.accuracy,Qt=this._map.getBearing(),ue=i.extend({bearing:Qt},this.options.fitBoundsOptions);this._map.fitBounds(pt.toBounds(Ot),ue,{geolocateSource:!0})},K.prototype._updateMarker=function(rt){if(rt){var pt=new i.LngLat(rt.coords.longitude,rt.coords.latitude);this._accuracyCircleMarker.setLngLat(pt).addTo(this._map),this._userLocationDotMarker.setLngLat(pt).addTo(this._map),this._accuracy=rt.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var rt=this._map._container.clientHeight/2,pt=this._map.unproject([0,rt]),Ot=this._map.unproject([1,rt]),Qt=pt.distanceTo(Ot),ue=Math.ceil(2*this._accuracy/Qt);this._circleElement.style.width=ue+"px",this._circleElement.style.height=ue+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(rt){if(this._map){if(this.options.trackUserLocation)if(rt.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var pt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=pt,this._geolocateButton.setAttribute("aria-label",pt),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(rt.code===3&&af)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",rt)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(rt){var pt=this;if(this._container.addEventListener("contextmenu",function(ue){return ue.preventDefault()}),this._geolocateButton=x.create("button","mapboxgl-ctrl-geolocate",this._container),x.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",rt===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ot=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ot,this._geolocateButton.setAttribute("aria-label",Ot)}else{var Qt=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Qt,this._geolocateButton.setAttribute("aria-label",Qt)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Yf(this._dotElement),this._circleElement=x.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Yf({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ue){var Re=ue.originalEvent&&ue.originalEvent.type==="resize";!ue.geolocateSource&&pt._watchState==="ACTIVE_LOCK"&&!Re&&(pt._watchState="BACKGROUND",pt._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),pt._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),pt.fire(new i.Event("trackuserlocationend")))})},K.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xf--,af=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xf++;var rt;Xf>1?(rt={maximumAge:6e5,timeout:0},af=!0):(rt=this.options.positionOptions,af=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,rt)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},K}(i.Evented),xv={maxWidth:100,unit:"metric"},of=function(K){this.options=i.extend({},xv,K),i.bindAll(["_onMove","setUnit"],this)};of.prototype.getDefaultPosition=function(){return"bottom-left"},of.prototype._onMove=function(){bv(this._map,this._container,this.options)},of.prototype.onAdd=function(K){return this._map=K,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},of.prototype.onRemove=function(){x.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},of.prototype.setUnit=function(K){this.options.unit=K,bv(this._map,this._container,this.options)};function bv(ht,K,dt){var rt=dt&&dt.maxWidth||100,pt=ht._container.clientHeight/2,Ot=ht.unproject([0,pt]),Qt=ht.unproject([rt,pt]),ue=Ot.distanceTo(Qt);if(dt&&dt.unit==="imperial"){var Re=3.2808*ue;if(Re>5280){var We=Re/5280;Zf(K,rt,We,ht._getUIString("ScaleControl.Miles"))}else Zf(K,rt,Re,ht._getUIString("ScaleControl.Feet"))}else if(dt&&dt.unit==="nautical"){var qe=ue/1852;Zf(K,rt,qe,ht._getUIString("ScaleControl.NauticalMiles"))}else ue>=1e3?Zf(K,rt,ue/1e3,ht._getUIString("ScaleControl.Kilometers")):Zf(K,rt,ue,ht._getUIString("ScaleControl.Meters"))}function Zf(ht,K,dt,rt){var pt=id(dt),Ot=pt/dt;ht.style.width=K*Ot+"px",ht.innerHTML=pt+" "+rt}function nd(ht){var K=Math.pow(10,Math.ceil(-Math.log(ht)/Math.LN10));return Math.round(ht*K)/K}function id(ht){var K=Math.pow(10,(""+Math.floor(ht)).length-1),dt=ht/K;return dt=dt>=10?10:dt>=5?5:dt>=3?3:dt>=2?2:dt>=1?1:nd(dt),K*dt}var tl=function(K){this._fullscreen=!1,K&&K.container&&(K.container instanceof i.window.HTMLElement?this._container=K.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};tl.prototype.onAdd=function(K){return this._map=K,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},tl.prototype.onRemove=function(){x.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},tl.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},tl.prototype._setupUI=function(){var K=this._fullscreenButton=x.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);x.create("span","mapboxgl-ctrl-icon",K).setAttribute("aria-hidden",!0),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},tl.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},tl.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},tl.prototype._isFullscreen=function(){return this._fullscreen},tl.prototype._changeIcon=function(){var K=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;K===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},tl.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var ad={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},od=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Tp=function(ht){function K(dt){ht.call(this),this.options=i.extend(Object.create(ad),dt),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.addTo=function(rt){return this._map&&this.remove(),this._map=rt,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},K.prototype.isOpen=function(){return!!this._map},K.prototype.remove=function(){return this._content&&x.remove(this._content),this._container&&(x.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(rt){return this._lngLat=i.LngLat.convert(rt),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},K.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(rt){return this.setDOMContent(i.window.document.createTextNode(rt))},K.prototype.setHTML=function(rt){var pt=i.window.document.createDocumentFragment(),Ot=i.window.document.createElement("body"),Qt;for(Ot.innerHTML=rt;Qt=Ot.firstChild,!!Qt;)pt.appendChild(Qt);return this.setDOMContent(pt)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(rt){return this.options.maxWidth=rt,this._update(),this},K.prototype.setDOMContent=function(rt){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=x.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(rt),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(rt){this._container&&this._container.classList.add(rt)},K.prototype.removeClassName=function(rt){this._container&&this._container.classList.remove(rt)},K.prototype.setOffset=function(rt){return this.options.offset=rt,this._update(),this},K.prototype.toggleClassName=function(rt){if(this._container)return this._container.classList.toggle(rt)},K.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=x.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},K.prototype._onMouseUp=function(rt){this._update(rt.point)},K.prototype._onMouseMove=function(rt){this._update(rt.point)},K.prototype._onDrag=function(rt){this._update(rt.point)},K.prototype._update=function(rt){var pt=this,Ot=this._lngLat||this._trackPointer;if(!(!this._map||!Ot||!this._content)&&(this._container||(this._container=x.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=x.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Fr){return pt._container.classList.add(Fr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=eu(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!rt))){var Qt=this._pos=this._trackPointer&&rt?rt:this._map.project(this._lngLat),ue=this.options.anchor,Re=sd(this.options.offset);if(!ue){var We=this._container.offsetWidth,qe=this._container.offsetHeight,cr;Qt.y+Re.bottom.ythis._map.transform.height-qe?cr=["bottom"]:cr=[],Qt.xthis._map.transform.width-We/2&&cr.push("right"),cr.length===0?ue="bottom":ue=cr.join("-")}var lr=Qt.add(Re[ue]).round();x.setTransform(this._container,Oc[ue]+" translate("+lr.x+"px,"+lr.y+"px)"),oh(this._container,ue,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var rt=this._container.querySelector(od);rt&&rt.focus()}},K.prototype._onClose=function(){this.remove()},K}(i.Evented);function sd(ht){if(ht)if(typeof ht=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ht,2)));return{center:new i.Point(0,0),top:new i.Point(0,ht),"top-left":new i.Point(K,K),"top-right":new i.Point(-K,K),bottom:new i.Point(0,-ht),"bottom-left":new i.Point(K,-K),"bottom-right":new i.Point(-K,-K),left:new i.Point(ht,0),right:new i.Point(-ht,0)}}else if(ht instanceof i.Point||Array.isArray(ht)){var dt=i.Point.convert(ht);return{center:dt,top:dt,"top-left":dt,"top-right":dt,bottom:dt,"bottom-left":dt,"bottom-right":dt,left:dt,right:dt}}else return{center:i.Point.convert(ht.center||[0,0]),top:i.Point.convert(ht.top||[0,0]),"top-left":i.Point.convert(ht["top-left"]||[0,0]),"top-right":i.Point.convert(ht["top-right"]||[0,0]),bottom:i.Point.convert(ht.bottom||[0,0]),"bottom-left":i.Point.convert(ht["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(ht["bottom-right"]||[0,0]),left:i.Point.convert(ht.left||[0,0]),right:i.Point.convert(ht.right||[0,0])};else return sd(new i.Point(0,0))}var ro={version:i.version,supported:S,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:mv,NavigationControl:tu,GeolocateControl:rd,AttributionControl:ji,ScaleControl:of,FullscreenControl:tl,Popup:Tp,Marker:Yf,Style:Eo,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:Oe,clearPrewarmedResources:Qe,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(ht){i.config.ACCESS_TOKEN=ht},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(ht){i.config.API_URL=ht},get workerCount(){return vr.workerCount},set workerCount(ht){vr.workerCount=ht},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ht){i.config.MAX_PARALLEL_IMAGE_REQUESTS=ht},clearStorage:function(K){i.clearTileCache(K)},workerUrl:""};return ro}),g})},3108:function(G,U,t){G.exports=t(26099)},26099:function(G,U,t){var g=t(64928),C=t(32420),i=t(51160),S=t(76752),x=t(55616),v=t(31264),p=t(47520),r=t(18400),e=t(72512),a=t(76244),n=1073741824;G.exports=function(l,m){m||(m={}),l=p(l,"float64"),m=x(m,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var h=v(m.maxDepth,255),b=v(m.bounds,S(l,2));b[0]===b[2]&&b[2]++,b[1]===b[3]&&b[3]++;var u=f(l,b),o=l.length>>>1,d;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?d=new(e(m.dtype))(o):m.dtype&&(d=m.dtype,Array.isArray(d)&&(d.length=o));for(var w=0;wh||it>n){for(var V=0;VHt||ot>Ut||$=st)&&mt!==Lt){var kt=A[At];Lt===void 0&&(Lt=kt.length);for(var Vt=mt;Vt=ut&&re<=X&&Kt>=J&&Kt<=tt&&ct.push(It)}var $t=_[At],le=$t[mt*4+0],he=$t[mt*4+1],de=$t[mt*4+2],xe=$t[mt*4+3],Se=Tt($t,mt+1),ne=bt*.5,zt=At+1;gt(wt,Rt,ne,zt,le,he||de||xe||Se),gt(wt,Rt+ne,ne,zt,he,de||xe||Se),gt(wt+ne,Rt,ne,zt,de,xe||Se),gt(wt+ne,Rt+ne,ne,zt,xe,Se)}}}function Tt(wt,Rt){for(var bt=null,At=0;bt===null;)if(bt=wt[Rt*4+At],At++,At>wt.length)return null;return bt}return ct}function k(O,H,Y,j,et){for(var it=[],ut=0;ut0){e+=Math.abs(v(r[0]));for(var a=1;a2){for(m=0;m=0))throw new Error("precision must be a positive number");var L=Math.pow(10,s||0);return Math.round(T*L)/L}U.round=c;function l(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T*L}U.radiansToLength=l;function m(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T/L}U.lengthToRadians=m;function h(T,s){return u(m(T,s))}U.lengthToDegrees=h;function b(T){var s=T%360;return s<0&&(s+=360),s}U.bearingToAzimuth=b;function u(T){var s=T%(2*Math.PI);return s*180/Math.PI}U.radiansToDegrees=u;function o(T){var s=T%360;return s*Math.PI/180}U.degreesToRadians=o;function d(T,s,L){if(s===void 0&&(s="kilometers"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("length must be a positive number");return l(m(T,s),L)}U.convertLength=d;function w(T,s,L){if(s===void 0&&(s="meters"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("area must be a positive number");var M=U.areaFactors[s];if(!M)throw new Error("invalid original units");var z=U.areaFactors[L];if(!z)throw new Error("invalid final units");return T/M*z}U.convertArea=w;function A(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}U.isNumber=A;function _(T){return!!T&&T.constructor===Object}U.isObject=_;function y(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(s){if(!A(s))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}U.validateId=E},3256:function(G,U,t){Object.defineProperty(U,"__esModule",{value:!0});var g=t(46284);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;Tx[0]&&(S[0]=x[0]),S[1]>x[1]&&(S[1]=x[1]),S[2]=0))throw new Error("precision must be a positive number");var L=Math.pow(10,s||0);return Math.round(T*L)/L}U.round=c;function l(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T*L}U.radiansToLength=l;function m(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T/L}U.lengthToRadians=m;function h(T,s){return u(m(T,s))}U.lengthToDegrees=h;function b(T){var s=T%360;return s<0&&(s+=360),s}U.bearingToAzimuth=b;function u(T){var s=T%(2*Math.PI);return s*180/Math.PI}U.radiansToDegrees=u;function o(T){var s=T%360;return s*Math.PI/180}U.degreesToRadians=o;function d(T,s,L){if(s===void 0&&(s="kilometers"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("length must be a positive number");return l(m(T,s),L)}U.convertLength=d;function w(T,s,L){if(s===void 0&&(s="meters"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("area must be a positive number");var M=U.areaFactors[s];if(!M)throw new Error("invalid original units");var z=U.areaFactors[L];if(!z)throw new Error("invalid final units");return T/M*z}U.convertArea=w;function A(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}U.isNumber=A;function _(T){return!!T&&T.constructor===Object}U.isObject=_;function y(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(s){if(!A(s))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}U.validateId=E},84880:function(G,U,t){Object.defineProperty(U,"__esModule",{value:!0});var g=t(76796);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;T=0))throw new Error("precision must be a positive number");var B=Math.pow(10,k||0);return Math.round(I*B)/B}U.round=c;function l(I,k){k===void 0&&(k="kilometers");var B=U.factors[k];if(!B)throw new Error(k+" units is invalid");return I*B}U.radiansToLength=l;function m(I,k){k===void 0&&(k="kilometers");var B=U.factors[k];if(!B)throw new Error(k+" units is invalid");return I/B}U.lengthToRadians=m;function h(I,k){return u(m(I,k))}U.lengthToDegrees=h;function b(I){var k=I%360;return k<0&&(k+=360),k}U.bearingToAzimuth=b;function u(I){var k=I%(2*Math.PI);return k*180/Math.PI}U.radiansToDegrees=u;function o(I){var k=I%360;return k*Math.PI/180}U.degreesToRadians=o;function d(I,k,B){if(k===void 0&&(k="kilometers"),B===void 0&&(B="kilometers"),!(I>=0))throw new Error("length must be a positive number");return l(m(I,k),B)}U.convertLength=d;function w(I,k,B){if(k===void 0&&(k="meters"),B===void 0&&(B="kilometers"),!(I>=0))throw new Error("area must be a positive number");var O=U.areaFactors[k];if(!O)throw new Error("invalid original units");var H=U.areaFactors[B];if(!H)throw new Error("invalid final units");return I/O*H}U.convertArea=w;function A(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)&&!/^\s*$/.test(I)}U.isNumber=A;function _(I){return!!I&&I.constructor===Object}U.isObject=_;function y(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(function(k){if(!A(k))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}U.validateId=E;function T(){throw new Error("method has been renamed to `radiansToDegrees`")}U.radians2degrees=T;function s(){throw new Error("method has been renamed to `degreesToRadians`")}U.degrees2radians=s;function L(){throw new Error("method has been renamed to `lengthToDegrees`")}U.distanceToDegrees=L;function M(){throw new Error("method has been renamed to `lengthToRadians`")}U.distanceToRadians=M;function z(){throw new Error("method has been renamed to `radiansToLength`")}U.radiansToDistance=z;function D(){throw new Error("method has been renamed to `bearingToAzimuth`")}U.bearingToAngle=D;function N(){throw new Error("method has been renamed to `convertLength`")}U.convertDistance=N},43752:function(G,U,t){Object.defineProperty(U,"__esModule",{value:!0});var g=t(49840);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;TS&&(S=t[v]),t[v]>16,ue>>16],u_pixel_coord_lower:[Qt&65535,ue&65535]}}function Ps(ht,K,dt,rt){var pt=dt.imageManager.getPattern(ht.from.toString()),Ot=dt.imageManager.getPattern(ht.to.toString()),Qt=dt.imageManager.getPixelSize(),ue=Qt.width,Re=Qt.height,We=Math.pow(2,rt.tileID.overscaledZ),qe=rt.tileSize*Math.pow(2,dt.transform.tileZoom)/We,cr=qe*(rt.tileID.canonical.x+rt.tileID.wrap*We),lr=qe*rt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:pt.tl,u_pattern_br_a:pt.br,u_pattern_tl_b:Ot.tl,u_pattern_br_b:Ot.br,u_texsize:[ue,Re],u_mix:K.t,u_pattern_size_a:pt.displaySize,u_pattern_size_b:Ot.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/dn(rt,1,dt.transform.tileZoom),u_pixel_coord_upper:[cr>>16,lr>>16],u_pixel_coord_lower:[cr&65535,lr&65535]}}var Tu=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_lightpos:new i.Uniform3f(ht,K.u_lightpos),u_lightintensity:new i.Uniform1f(ht,K.u_lightintensity),u_lightcolor:new i.Uniform3f(ht,K.u_lightcolor),u_vertical_gradient:new i.Uniform1f(ht,K.u_vertical_gradient),u_opacity:new i.Uniform1f(ht,K.u_opacity)}},Da=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_lightpos:new i.Uniform3f(ht,K.u_lightpos),u_lightintensity:new i.Uniform1f(ht,K.u_lightintensity),u_lightcolor:new i.Uniform3f(ht,K.u_lightcolor),u_vertical_gradient:new i.Uniform1f(ht,K.u_vertical_gradient),u_height_factor:new i.Uniform1f(ht,K.u_height_factor),u_image:new i.Uniform1i(ht,K.u_image),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade),u_opacity:new i.Uniform1f(ht,K.u_opacity)}},Bl=function(ht,K,dt,rt){var pt=K.style.light,Ot=pt.properties.get("position"),Qt=[Ot.x,Ot.y,Ot.z],ue=i.create$1();pt.properties.get("anchor")==="viewport"&&i.fromRotation(ue,-K.transform.angle),i.transformMat3(Qt,Qt,ue);var Re=pt.properties.get("color");return{u_matrix:ht,u_lightpos:Qt,u_lightintensity:pt.properties.get("intensity"),u_lightcolor:[Re.r,Re.g,Re.b],u_vertical_gradient:+dt,u_opacity:rt}},Go=function(ht,K,dt,rt,pt,Ot,Qt){return i.extend(Bl(ht,K,dt,rt),js(Ot,K,Qt),{u_height_factor:-Math.pow(2,pt.overscaledZ)/Qt.tileSize/8})},ds=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},Ks=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_image:new i.Uniform1i(ht,K.u_image),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade)}},Rs=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_world:new i.Uniform2f(ht,K.u_world)}},Wo=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_world:new i.Uniform2f(ht,K.u_world),u_image:new i.Uniform1i(ht,K.u_image),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade)}},ps=function(ht){return{u_matrix:ht}},Yo=function(ht,K,dt,rt){return i.extend(ps(ht),js(dt,K,rt))},Do=function(ht,K){return{u_matrix:ht,u_world:K}},Ul=function(ht,K,dt,rt,pt){return i.extend(Yo(ht,K,dt,rt),{u_world:pt})},Cc=function(ht,K){return{u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(ht,K.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(ht,K.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},Lc=function(ht,K,dt,rt){var pt=ht.transform,Ot,Qt;if(rt.paint.get("circle-pitch-alignment")==="map"){var ue=dn(dt,1,pt.zoom);Ot=!0,Qt=[ue,ue]}else Ot=!1,Qt=pt.pixelsToGLUnits;return{u_camera_to_center_distance:pt.cameraToCenterDistance,u_scale_with_map:+(rt.paint.get("circle-pitch-scale")==="map"),u_matrix:ht.translatePosMatrix(K.posMatrix,dt,rt.paint.get("circle-translate"),rt.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ot,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:Qt}},Pc=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(ht,K.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(ht,K.u_extrude_scale),u_overscale_factor:new i.Uniform1f(ht,K.u_overscale_factor)}},Rc=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_inv_matrix:new i.UniformMatrix4f(ht,K.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(ht,K.u_viewport_size)}},Ju=function(ht,K,dt){var rt=dn(dt,1,K.zoom),pt=Math.pow(2,K.zoom-dt.tileID.overscaledZ),Ot=dt.tileID.overscaleFactor();return{u_matrix:ht,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:rt,u_extrude_scale:[K.pixelsToGLUnits[0]/(rt*pt),K.pixelsToGLUnits[1]/(rt*pt)],u_overscale_factor:Ot}},Df=function(ht,K,dt){return{u_matrix:ht,u_inv_matrix:K,u_camera_to_center_distance:dt.cameraToCenterDistance,u_viewport_size:[dt.width,dt.height]}},xl=function(ht,K){return{u_color:new i.UniformColor(ht,K.u_color),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_overlay:new i.Uniform1i(ht,K.u_overlay),u_overlay_scale:new i.Uniform1f(ht,K.u_overlay_scale)}},ja=function(ht,K,dt){return dt===void 0&&(dt=1),{u_matrix:ht,u_color:K,u_overlay:0,u_overlay_scale:dt}},Co=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},bl=function(ht){return{u_matrix:ht}},If=function(ht,K){return{u_extrude_scale:new i.Uniform1f(ht,K.u_extrude_scale),u_intensity:new i.Uniform1f(ht,K.u_intensity),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},Hl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_world:new i.Uniform2f(ht,K.u_world),u_image:new i.Uniform1i(ht,K.u_image),u_color_ramp:new i.Uniform1i(ht,K.u_color_ramp),u_opacity:new i.Uniform1f(ht,K.u_opacity)}},gs=function(ht,K,dt,rt){return{u_matrix:ht,u_extrude_scale:dn(K,1,dt),u_intensity:rt}},Dc=function(ht,K,dt,rt){var pt=i.create();i.ortho(pt,0,ht.width,ht.height,0,0,1);var Ot=ht.context.gl;return{u_matrix:pt,u_world:[Ot.drawingBufferWidth,Ot.drawingBufferHeight],u_image:dt,u_color_ramp:rt,u_opacity:K.paint.get("heatmap-opacity")}},Ff=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_image:new i.Uniform1i(ht,K.u_image),u_latrange:new i.Uniform2f(ht,K.u_latrange),u_light:new i.Uniform2f(ht,K.u_light),u_shadow:new i.UniformColor(ht,K.u_shadow),u_highlight:new i.UniformColor(ht,K.u_highlight),u_accent:new i.UniformColor(ht,K.u_accent)}},zf=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_image:new i.Uniform1i(ht,K.u_image),u_dimension:new i.Uniform2f(ht,K.u_dimension),u_zoom:new i.Uniform1f(ht,K.u_zoom),u_unpack:new i.Uniform4f(ht,K.u_unpack)}},Qu=function(ht,K,dt){var rt=dt.paint.get("hillshade-shadow-color"),pt=dt.paint.get("hillshade-highlight-color"),Ot=dt.paint.get("hillshade-accent-color"),Qt=dt.paint.get("hillshade-illumination-direction")*(Math.PI/180);dt.paint.get("hillshade-illumination-anchor")==="viewport"&&(Qt-=ht.transform.angle);var ue=!ht.options.moving;return{u_matrix:ht.transform.calculatePosMatrix(K.tileID.toUnwrapped(),ue),u_image:0,u_latrange:vo(ht,K.tileID),u_light:[dt.paint.get("hillshade-exaggeration"),Qt],u_shadow:rt,u_highlight:pt,u_accent:Ot}},kf=function(ht,K){var dt=K.stride,rt=i.create();return i.ortho(rt,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(rt,rt,[0,-i.EXTENT,0]),{u_matrix:rt,u_image:1,u_dimension:[dt,dt],u_zoom:ht.overscaledZ,u_unpack:K.getUnpackVector()}};function vo(ht,K){var dt=Math.pow(2,K.canonical.z),rt=K.canonical.y;return[new i.MercatorCoordinate(0,rt/dt).toLngLat().lat,new i.MercatorCoordinate(0,(rt+1)/dt).toLngLat().lat]}var Xo=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels)}},Ds=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels),u_image:new i.Uniform1i(ht,K.u_image),u_image_height:new i.Uniform1f(ht,K.u_image_height)}},wl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_image:new i.Uniform1i(ht,K.u_image),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade)}},Au=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(ht,K.u_patternscale_a),u_patternscale_b:new i.Uniform2f(ht,K.u_patternscale_b),u_sdfgamma:new i.Uniform1f(ht,K.u_sdfgamma),u_image:new i.Uniform1i(ht,K.u_image),u_tex_y_a:new i.Uniform1f(ht,K.u_tex_y_a),u_tex_y_b:new i.Uniform1f(ht,K.u_tex_y_b),u_mix:new i.Uniform1f(ht,K.u_mix)}},Js=function(ht,K,dt){var rt=ht.transform;return{u_matrix:Is(ht,K,dt),u_ratio:1/dn(K,1,rt.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/rt.pixelsToGLUnits[0],1/rt.pixelsToGLUnits[1]]}},Qs=function(ht,K,dt,rt){return i.extend(Js(ht,K,dt),{u_image:0,u_image_height:rt})},Of=function(ht,K,dt,rt){var pt=ht.transform,Ot=Tl(K,pt);return{u_matrix:Is(ht,K,dt),u_texsize:K.imageAtlasTexture.size,u_ratio:1/dn(K,1,pt.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[Ot,rt.fromScale,rt.toScale],u_fade:rt.t,u_units_to_pixels:[1/pt.pixelsToGLUnits[0],1/pt.pixelsToGLUnits[1]]}},ms=function(ht,K,dt,rt,pt){var Ot=ht.transform,Qt=ht.lineAtlas,ue=Tl(K,Ot),Re=dt.layout.get("line-cap")==="round",We=Qt.getDash(rt.from,Re),qe=Qt.getDash(rt.to,Re),cr=We.width*pt.fromScale,lr=qe.width*pt.toScale;return i.extend(Js(ht,K,dt),{u_patternscale_a:[ue/cr,-We.height/2],u_patternscale_b:[ue/lr,-qe.height/2],u_sdfgamma:Qt.width/(Math.min(cr,lr)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:We.y,u_tex_y_b:qe.y,u_mix:pt.t})};function Tl(ht,K){return 1/dn(ht,1,K.tileZoom)}function Is(ht,K,dt){return ht.translatePosMatrix(K.tileID.posMatrix,K,dt.paint.get("line-translate"),dt.paint.get("line-translate-anchor"))}var ys=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_tl_parent:new i.Uniform2f(ht,K.u_tl_parent),u_scale_parent:new i.Uniform1f(ht,K.u_scale_parent),u_buffer_scale:new i.Uniform1f(ht,K.u_buffer_scale),u_fade_t:new i.Uniform1f(ht,K.u_fade_t),u_opacity:new i.Uniform1f(ht,K.u_opacity),u_image0:new i.Uniform1i(ht,K.u_image0),u_image1:new i.Uniform1i(ht,K.u_image1),u_brightness_low:new i.Uniform1f(ht,K.u_brightness_low),u_brightness_high:new i.Uniform1f(ht,K.u_brightness_high),u_saturation_factor:new i.Uniform1f(ht,K.u_saturation_factor),u_contrast_factor:new i.Uniform1f(ht,K.u_contrast_factor),u_spin_weights:new i.Uniform3f(ht,K.u_spin_weights)}},Vl=function(ht,K,dt,rt,pt){return{u_matrix:ht,u_tl_parent:K,u_scale_parent:dt,u_buffer_scale:1,u_fade_t:rt.mix,u_opacity:rt.opacity*pt.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:pt.paint.get("raster-brightness-min"),u_brightness_high:pt.paint.get("raster-brightness-max"),u_saturation_factor:Ml(pt.paint.get("raster-saturation")),u_contrast_factor:va(pt.paint.get("raster-contrast")),u_spin_weights:Al(pt.paint.get("raster-hue-rotate"))}};function Al(ht){ht*=Math.PI/180;var K=Math.sin(ht),dt=Math.cos(ht);return[(2*dt+1)/3,(-Math.sqrt(3)*K-dt+1)/3,(Math.sqrt(3)*K-dt+1)/3]}function va(ht){return ht>0?1/(1-ht):1+ht}function Ml(ht){return ht>0?1-1/(1.001-ht):-ht}var Mu=function(ht,K){return{u_is_size_zoom_constant:new i.Uniform1i(ht,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ht,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ht,K.u_size_t),u_size:new i.Uniform1f(ht,K.u_size),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ht,K.u_pitch),u_rotate_symbol:new i.Uniform1i(ht,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ht,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(ht,K.u_fade_change),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ht,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ht,K.u_coord_matrix),u_is_text:new i.Uniform1i(ht,K.u_is_text),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_texture:new i.Uniform1i(ht,K.u_texture)}},Nf=function(ht,K){return{u_is_size_zoom_constant:new i.Uniform1i(ht,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ht,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ht,K.u_size_t),u_size:new i.Uniform1f(ht,K.u_size),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ht,K.u_pitch),u_rotate_symbol:new i.Uniform1i(ht,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ht,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(ht,K.u_fade_change),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ht,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ht,K.u_coord_matrix),u_is_text:new i.Uniform1i(ht,K.u_is_text),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_texture:new i.Uniform1i(ht,K.u_texture),u_gamma_scale:new i.Uniform1f(ht,K.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(ht,K.u_is_halo)}},Sl=function(ht,K){return{u_is_size_zoom_constant:new i.Uniform1i(ht,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ht,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ht,K.u_size_t),u_size:new i.Uniform1f(ht,K.u_size),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ht,K.u_pitch),u_rotate_symbol:new i.Uniform1i(ht,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ht,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(ht,K.u_fade_change),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ht,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ht,K.u_coord_matrix),u_is_text:new i.Uniform1i(ht,K.u_is_text),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_texsize_icon:new i.Uniform2f(ht,K.u_texsize_icon),u_texture:new i.Uniform1i(ht,K.u_texture),u_texture_icon:new i.Uniform1i(ht,K.u_texture_icon),u_gamma_scale:new i.Uniform1f(ht,K.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(ht,K.u_is_halo)}},Gl=function(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We){var qe=pt.transform;return{u_is_size_zoom_constant:+(ht==="constant"||ht==="source"),u_is_size_feature_constant:+(ht==="constant"||ht==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:qe.cameraToCenterDistance,u_pitch:qe.pitch/360*2*Math.PI,u_rotate_symbol:+dt,u_aspect_ratio:qe.width/qe.height,u_fade_change:pt.options.fadeDuration?pt.symbolFadeChange:1,u_matrix:Ot,u_label_plane_matrix:Qt,u_coord_matrix:ue,u_is_text:+Re,u_pitch_with_map:+rt,u_texsize:We,u_texture:0}},Su=function(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We,qe){var cr=pt.transform;return i.extend(Gl(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We),{u_gamma_scale:rt?Math.cos(cr._pitch)*cr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+qe})},$u=function(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We){return i.extend(Su(ht,K,dt,rt,pt,Ot,Qt,ue,!0,Re,!0),{u_texsize_icon:We,u_texture_icon:1})},Wl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_opacity:new i.Uniform1f(ht,K.u_opacity),u_color:new i.UniformColor(ht,K.u_color)}},Yl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_opacity:new i.Uniform1f(ht,K.u_opacity),u_image:new i.Uniform1i(ht,K.u_image),u_pattern_tl_a:new i.Uniform2f(ht,K.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(ht,K.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(ht,K.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(ht,K.u_pattern_br_b),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_mix:new i.Uniform1f(ht,K.u_mix),u_pattern_size_a:new i.Uniform2f(ht,K.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(ht,K.u_pattern_size_b),u_scale_a:new i.Uniform1f(ht,K.u_scale_a),u_scale_b:new i.Uniform1f(ht,K.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(ht,K.u_tile_units_to_pixels)}},Fs=function(ht,K,dt){return{u_matrix:ht,u_opacity:K,u_color:dt}},Xl=function(ht,K,dt,rt,pt,Ot){return i.extend(Ps(rt,Ot,dt,pt),{u_matrix:ht,u_opacity:K})},zs={fillExtrusion:Tu,fillExtrusionPattern:Da,fill:ds,fillPattern:Ks,fillOutline:Rs,fillOutlinePattern:Wo,circle:Cc,collisionBox:Pc,collisionCircle:Rc,debug:xl,clippingMask:Co,heatmap:If,heatmapTexture:Hl,hillshade:Ff,hillshadePrepare:zf,line:Xo,lineGradient:Ds,linePattern:wl,lineSDF:Au,raster:ys,symbolIcon:Mu,symbolSDF:Nf,symbolTextAndIcon:Sl,background:Wl,backgroundPattern:Yl},Ha;function ns(ht,K,dt,rt,pt,Ot,Qt){for(var ue=ht.context,Re=ue.gl,We=ht.useProgram("collisionBox"),qe=[],cr=0,lr=0,Fr=0;Fr0){var Nn=i.create(),Yn=Kr;i.mul(Nn,Vr.placementInvProjMatrix,ht.transform.glCoordMatrix),i.mul(Nn,Nn,Vr.placementViewportMatrix),qe.push({circleArray:Fn,circleOffset:lr,transform:Yn,invTransform:Nn}),cr+=Fn.length/4,lr=cr}fn&&We.draw(ue,Re.LINES,ir.disabled,Ke.disabled,ht.colorModeForRenderPass(),Ie.disabled,Ju(Kr,ht.transform,Yr),dt.id,fn.layoutVertexBuffer,fn.indexBuffer,fn.segments,null,ht.transform.zoom,null,null,fn.collisionVertexBuffer)}}if(!(!Qt||!qe.length)){var Xn=ht.useProgram("collisionCircle"),Gn=new i.StructArrayLayout2f1f2i16;Gn.resize(cr*4),Gn._trim();for(var jn=0,ti=0,si=qe;ti=0&&(Xr[Vr.associatedIconIndex]={shiftedAnchor:Fi,angle:Ji})}}if(qe){Fr.clear();for(var Ai=ht.icon.placedSymbolArray,Yi=0;Yi0){var Qt=i.browser.now(),ue=(Qt-ht.timeAdded)/Ot,Re=K?(Qt-K.timeAdded)/Ot:-1,We=dt.getSource(),qe=pt.coveringZoomLevel({tileSize:We.tileSize,roundZoom:We.roundZoom}),cr=!K||Math.abs(K.tileID.overscaledZ-qe)>Math.abs(ht.tileID.overscaledZ-qe),lr=cr&&ht.refreshedUponExpiration?1:i.clamp(cr?ue:1-Re,0,1);return ht.refreshedUponExpiration&&ue>=1&&(ht.refreshedUponExpiration=!1),K?{opacity:1,mix:1-lr}:{opacity:lr,mix:0}}else return{opacity:1,mix:0}}function qs(ht,K,dt){var rt=dt.paint.get("background-color"),pt=dt.paint.get("background-opacity");if(pt!==0){var Ot=ht.context,Qt=Ot.gl,ue=ht.transform,Re=ue.tileSize,We=dt.paint.get("background-pattern");if(!ht.isPatternMissing(We)){var qe=!We&&rt.a===1&&pt===1&&ht.opaquePassEnabledForLayer()?"opaque":"translucent";if(ht.renderPass===qe){var cr=Ke.disabled,lr=ht.depthModeForSublayer(0,qe==="opaque"?ir.ReadWrite:ir.ReadOnly),Fr=ht.colorModeForRenderPass(),Xr=ht.useProgram(We?"backgroundPattern":"background"),Yr=ue.coveringTiles({tileSize:Re});We&&(Ot.activeTexture.set(Qt.TEXTURE0),ht.imageManager.bind(ht.context));for(var Vr=dt.getCrossfadeParameters(),Kr=0,fn=Yr;Kr "+dt.overscaledZ);var Kr=Vr+" "+Fr+"kb";sr(ht,Kr),Qt.draw(rt,pt.TRIANGLES,ue,Re,se.alphaBlended,Ie.disabled,ja(Ot,i.Color.transparent,Yr),qe,ht.debugBuffer,ht.quadTriangleIndexBuffer,ht.debugSegments)}function sr(ht,K){ht.initDebugOverlayCanvas();var dt=ht.debugOverlayCanvas,rt=ht.context.gl,pt=ht.debugOverlayCanvas.getContext("2d");pt.clearRect(0,0,dt.width,dt.height),pt.shadowColor="white",pt.shadowBlur=2,pt.lineWidth=1.5,pt.strokeStyle="white",pt.textBaseline="top",pt.font="bold 36px Open Sans, sans-serif",pt.fillText(K,5,5),pt.strokeText(K,5,5),ht.debugOverlayTexture.update(dt),ht.debugOverlayTexture.bind(rt.LINEAR,rt.CLAMP_TO_EDGE)}function Mr(ht,K,dt){var rt=ht.context,pt=dt.implementation;if(ht.renderPass==="offscreen"){var Ot=pt.prerender;Ot&&(ht.setCustomLayerDefaults(),rt.setColorMode(ht.colorModeForRenderPass()),Ot.call(pt,rt.gl,ht.transform.customLayerMatrix()),rt.setDirty(),ht.setBaseState())}else if(ht.renderPass==="translucent"){ht.setCustomLayerDefaults(),rt.setColorMode(ht.colorModeForRenderPass()),rt.setStencilMode(Ke.disabled);var Qt=pt.renderingMode==="3d"?new ir(ht.context.gl.LEQUAL,ir.ReadWrite,ht.depthRangeFor3D):ht.depthModeForSublayer(0,ir.ReadOnly);rt.setDepthMode(Qt),pt.render(rt.gl,ht.transform.customLayerMatrix()),rt.setDirty(),ht.setBaseState(),rt.bindFramebuffer.set(null)}}var Ir={symbol:Eu,circle:Uf,heatmap:ks,line:_u,fill:xs,"fill-extrusion":tf,hillshade:Ql,raster:$l,background:qs,debug:gr,custom:Mr},Nr=function(K,dt){this.context=new Pe(K),this.transform=dt,this._tileTextures={},this.setup(),this.numSublayers=ke.maxUnderzooming+ke.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ai,this.gpuTimers={}};Nr.prototype.resize=function(K,dt){if(this.width=K*i.browser.devicePixelRatio,this.height=dt*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var rt=0,pt=this.style._order;rt256&&this.clearStencil(),rt.setColorMode(se.disabled),rt.setDepthMode(ir.disabled);var Ot=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Qt=0,ue=dt;Qt256&&this.clearStencil();var K=this.nextStencilID++,dt=this.context.gl;return new Ke({func:dt.NOTEQUAL,mask:255},K,255,dt.KEEP,dt.KEEP,dt.REPLACE)},Nr.prototype.stencilModeForClipping=function(K){var dt=this.context.gl;return new Ke({func:dt.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,dt.KEEP,dt.KEEP,dt.REPLACE)},Nr.prototype.stencilConfigForOverlap=function(K){var dt,rt=this.context.gl,pt=K.sort(function(We,qe){return qe.overscaledZ-We.overscaledZ}),Ot=pt[pt.length-1].overscaledZ,Qt=pt[0].overscaledZ-Ot+1;if(Qt>1){this.currentStencilSource=void 0,this.nextStencilID+Qt>256&&this.clearStencil();for(var ue={},Re=0;Re=0;this.currentLayer--){var Nn=this.style._layers[pt[this.currentLayer]],Yn=Ot[Nn.source],Xn=Re[Nn.source];this._renderTileClippingMasks(Nn,Xn),this.renderLayer(this,Yn,Nn,Xn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?dt.pop():null},Nr.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var dt=this.imageManager.getPattern(K.from.toString()),rt=this.imageManager.getPattern(K.to.toString());return!dt||!rt},Nr.prototype.useProgram=function(K,dt){this.cache=this.cache||{};var rt=""+K+(dt?dt.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[rt]||(this.cache[rt]=new Ku(this.context,K,Pf[K],dt,zs[K],this._showOverdrawInspector)),this.cache[rt]},Nr.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Nr.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},Nr.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},Nr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var en=function(K,dt){this.points=K,this.planes=dt};en.fromInvProjectionMatrix=function(K,dt,rt){var pt=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],Ot=Math.pow(2,rt),Qt=pt.map(function(We){return i.transformMat4([],We,K)}).map(function(We){return i.scale$1([],We,1/We[3]/dt*Ot)}),ue=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Re=ue.map(function(We){var qe=i.sub([],Qt[We[0]],Qt[We[1]]),cr=i.sub([],Qt[We[2]],Qt[We[1]]),lr=i.normalize([],i.cross([],qe,cr)),Fr=-i.dot(lr,Qt[We[1]]);return lr.concat(Fr)});return new en(Qt,Re)};var yn=function(K,dt){this.min=K,this.max=dt,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};yn.prototype.quadrant=function(K){for(var dt=[K%2===0,K<2],rt=i.clone$2(this.min),pt=i.clone$2(this.max),Ot=0;Ot=0;if(Qt===0)return 0;Qt!==dt.length&&(rt=!1)}if(rt)return 2;for(var Re=0;Re<3;Re++){for(var We=Number.MAX_VALUE,qe=-Number.MAX_VALUE,cr=0;crthis.max[Re]-this.min[Re])return 0}return 1};var Rn=function(K,dt,rt,pt){if(K===void 0&&(K=0),dt===void 0&&(dt=0),rt===void 0&&(rt=0),pt===void 0&&(pt=0),isNaN(K)||K<0||isNaN(dt)||dt<0||isNaN(rt)||rt<0||isNaN(pt)||pt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=K,this.bottom=dt,this.left=rt,this.right=pt};Rn.prototype.interpolate=function(K,dt,rt){return dt.top!=null&&K.top!=null&&(this.top=i.number(K.top,dt.top,rt)),dt.bottom!=null&&K.bottom!=null&&(this.bottom=i.number(K.bottom,dt.bottom,rt)),dt.left!=null&&K.left!=null&&(this.left=i.number(K.left,dt.left,rt)),dt.right!=null&&K.right!=null&&(this.right=i.number(K.right,dt.right,rt)),this},Rn.prototype.getCenter=function(K,dt){var rt=i.clamp((this.left+K-this.right)/2,0,K),pt=i.clamp((this.top+dt-this.bottom)/2,0,dt);return new i.Point(rt,pt)},Rn.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},Rn.prototype.clone=function(){return new Rn(this.top,this.bottom,this.left,this.right)},Rn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Dn=function(K,dt,rt,pt,Ot){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ot===void 0?!0:Ot,this._minZoom=K||0,this._maxZoom=dt||22,this._minPitch=rt??0,this._maxPitch=pt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Rn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Zn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Dn.prototype.clone=function(){var K=new Dn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},Zn.minZoom.get=function(){return this._minZoom},Zn.minZoom.set=function(ht){this._minZoom!==ht&&(this._minZoom=ht,this.zoom=Math.max(this.zoom,ht))},Zn.maxZoom.get=function(){return this._maxZoom},Zn.maxZoom.set=function(ht){this._maxZoom!==ht&&(this._maxZoom=ht,this.zoom=Math.min(this.zoom,ht))},Zn.minPitch.get=function(){return this._minPitch},Zn.minPitch.set=function(ht){this._minPitch!==ht&&(this._minPitch=ht,this.pitch=Math.max(this.pitch,ht))},Zn.maxPitch.get=function(){return this._maxPitch},Zn.maxPitch.set=function(ht){this._maxPitch!==ht&&(this._maxPitch=ht,this.pitch=Math.min(this.pitch,ht))},Zn.renderWorldCopies.get=function(){return this._renderWorldCopies},Zn.renderWorldCopies.set=function(ht){ht===void 0?ht=!0:ht===null&&(ht=!1),this._renderWorldCopies=ht},Zn.worldSize.get=function(){return this.tileSize*this.scale},Zn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Zn.size.get=function(){return new i.Point(this.width,this.height)},Zn.bearing.get=function(){return-this.angle/Math.PI*180},Zn.bearing.set=function(ht){var K=-i.wrap(ht,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Zn.pitch.get=function(){return this._pitch/Math.PI*180},Zn.pitch.set=function(ht){var K=i.clamp(ht,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},Zn.fov.get=function(){return this._fov/Math.PI*180},Zn.fov.set=function(ht){ht=Math.max(.01,Math.min(60,ht)),this._fov!==ht&&(this._unmodified=!1,this._fov=ht/180*Math.PI,this._calcMatrices())},Zn.zoom.get=function(){return this._zoom},Zn.zoom.set=function(ht){var K=Math.min(Math.max(ht,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},Zn.center.get=function(){return this._center},Zn.center.set=function(ht){ht.lat===this._center.lat&&ht.lng===this._center.lng||(this._unmodified=!1,this._center=ht,this._constrain(),this._calcMatrices())},Zn.padding.get=function(){return this._edgeInsets.toJSON()},Zn.padding.set=function(ht){this._edgeInsets.equals(ht)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ht,1),this._calcMatrices())},Zn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Dn.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},Dn.prototype.interpolatePadding=function(K,dt,rt){this._unmodified=!1,this._edgeInsets.interpolate(K,dt,rt),this._constrain(),this._calcMatrices()},Dn.prototype.coveringZoomLevel=function(K){var dt=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,dt)},Dn.prototype.getVisibleUnwrappedCoordinates=function(K){var dt=[new i.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var rt=this.pointCoordinate(new i.Point(0,0)),pt=this.pointCoordinate(new i.Point(this.width,0)),Ot=this.pointCoordinate(new i.Point(this.width,this.height)),Qt=this.pointCoordinate(new i.Point(0,this.height)),ue=Math.floor(Math.min(rt.x,pt.x,Ot.x,Qt.x)),Re=Math.floor(Math.max(rt.x,pt.x,Ot.x,Qt.x)),We=1,qe=ue-We;qe<=Re+We;qe++)qe!==0&&dt.push(new i.UnwrappedTileID(qe,K));return dt},Dn.prototype.coveringTiles=function(K){var dt=this.coveringZoomLevel(K),rt=dt;if(K.minzoom!==void 0&&dtK.maxzoom&&(dt=K.maxzoom);var pt=i.MercatorCoordinate.fromLngLat(this.center),Ot=Math.pow(2,dt),Qt=[Ot*pt.x,Ot*pt.y,0],ue=en.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,dt),Re=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Re=dt);var We=3,qe=function(hi){return{aabb:new yn([hi*Ot,0,0],[(hi+1)*Ot,Ot,0]),zoom:0,x:0,y:0,wrap:hi,fullyVisible:!1}},cr=[],lr=[],Fr=dt,Xr=K.reparseOverscaled?rt:dt;if(this._renderWorldCopies)for(var Yr=1;Yr<=3;Yr++)cr.push(qe(-Yr)),cr.push(qe(Yr));for(cr.push(qe(0));cr.length>0;){var Vr=cr.pop(),Kr=Vr.x,fn=Vr.y,Fn=Vr.fullyVisible;if(!Fn){var Nn=Vr.aabb.intersects(ue);if(Nn===0)continue;Fn=Nn===2}var Yn=Vr.aabb.distanceX(Qt),Xn=Vr.aabb.distanceY(Qt),Gn=Math.max(Math.abs(Yn),Math.abs(Xn)),jn=We+(1<jn&&Vr.zoom>=Re){lr.push({tileID:new i.OverscaledTileID(Vr.zoom===Fr?Xr:Vr.zoom,Vr.wrap,Vr.zoom,Kr,fn),distanceSq:i.sqrLen([Qt[0]-.5-Kr,Qt[1]-.5-fn])});continue}for(var ti=0;ti<4;ti++){var si=(Kr<<1)+ti%2,yi=(fn<<1)+(ti>>1);cr.push({aabb:Vr.aabb.quadrant(ti),zoom:Vr.zoom+1,x:si,y:yi,wrap:Vr.wrap,fullyVisible:Fn})}}return lr.sort(function(hi,Fi){return hi.distanceSq-Fi.distanceSq}).map(function(hi){return hi.tileID})},Dn.prototype.resize=function(K,dt){this.width=K,this.height=dt,this.pixelsToGLUnits=[2/K,-2/dt],this._constrain(),this._calcMatrices()},Zn.unmodified.get=function(){return this._unmodified},Dn.prototype.zoomScale=function(K){return Math.pow(2,K)},Dn.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},Dn.prototype.project=function(K){var dt=i.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(K.lng)*this.worldSize,i.mercatorYfromLat(dt)*this.worldSize)},Dn.prototype.unproject=function(K){return new i.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},Zn.point.get=function(){return this.project(this.center)},Dn.prototype.setLocationAtPoint=function(K,dt){var rt=this.pointCoordinate(dt),pt=this.pointCoordinate(this.centerPoint),Ot=this.locationCoordinate(K),Qt=new i.MercatorCoordinate(Ot.x-(rt.x-pt.x),Ot.y-(rt.y-pt.y));this.center=this.coordinateLocation(Qt),this._renderWorldCopies&&(this.center=this.center.wrap())},Dn.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},Dn.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},Dn.prototype.locationCoordinate=function(K){return i.MercatorCoordinate.fromLngLat(K)},Dn.prototype.coordinateLocation=function(K){return K.toLngLat()},Dn.prototype.pointCoordinate=function(K){var dt=0,rt=[K.x,K.y,0,1],pt=[K.x,K.y,1,1];i.transformMat4(rt,rt,this.pixelMatrixInverse),i.transformMat4(pt,pt,this.pixelMatrixInverse);var Ot=rt[3],Qt=pt[3],ue=rt[0]/Ot,Re=pt[0]/Qt,We=rt[1]/Ot,qe=pt[1]/Qt,cr=rt[2]/Ot,lr=pt[2]/Qt,Fr=cr===lr?0:(dt-cr)/(lr-cr);return new i.MercatorCoordinate(i.number(ue,Re,Fr)/this.worldSize,i.number(We,qe,Fr)/this.worldSize)},Dn.prototype.coordinatePoint=function(K){var dt=[K.x*this.worldSize,K.y*this.worldSize,0,1];return i.transformMat4(dt,dt,this.pixelMatrix),new i.Point(dt[0]/dt[3],dt[1]/dt[3])},Dn.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},Dn.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Dn.prototype.setMaxBounds=function(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Dn.prototype.calculatePosMatrix=function(K,dt){dt===void 0&&(dt=!1);var rt=K.key,pt=dt?this._alignedPosMatrixCache:this._posMatrixCache;if(pt[rt])return pt[rt];var Ot=K.canonical,Qt=this.worldSize/this.zoomScale(Ot.z),ue=Ot.x+Math.pow(2,Ot.z)*K.wrap,Re=i.identity(new Float64Array(16));return i.translate(Re,Re,[ue*Qt,Ot.y*Qt,0]),i.scale(Re,Re,[Qt/i.EXTENT,Qt/i.EXTENT,1]),i.multiply(Re,dt?this.alignedProjMatrix:this.projMatrix,Re),pt[rt]=new Float32Array(Re),pt[rt]},Dn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Dn.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,dt=90,rt=-180,pt=180,Ot,Qt,ue,Re,We=this.size,qe=this._unmodified;if(this.latRange){var cr=this.latRange;K=i.mercatorYfromLat(cr[1])*this.worldSize,dt=i.mercatorYfromLat(cr[0])*this.worldSize,Ot=dt-Kdt&&(Re=dt-Vr)}if(this.lngRange){var Kr=Fr.x,fn=We.x/2;Kr-fnpt&&(ue=pt-fn)}(ue!==void 0||Re!==void 0)&&(this.center=this.unproject(new i.Point(ue!==void 0?ue:Fr.x,Re!==void 0?Re:Fr.y))),this._unmodified=qe,this._constraining=!1}},Dn.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,dt=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var rt=Math.PI/2+this._pitch,pt=this._fov*(.5+dt.y/this.height),Ot=Math.sin(pt)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-rt-pt,.01,Math.PI-.01)),Qt=this.point,ue=Qt.x,Re=Qt.y,We=Math.cos(Math.PI/2-this._pitch)*Ot+this.cameraToCenterDistance,qe=We*1.01,cr=this.height/50,lr=new Float64Array(16);i.perspective(lr,this._fov,this.width/this.height,cr,qe),lr[8]=-dt.x*2/this.width,lr[9]=dt.y*2/this.height,i.scale(lr,lr,[1,-1,1]),i.translate(lr,lr,[0,0,-this.cameraToCenterDistance]),i.rotateX(lr,lr,this._pitch),i.rotateZ(lr,lr,this.angle),i.translate(lr,lr,[-ue,-Re,0]),this.mercatorMatrix=i.scale([],lr,[this.worldSize,this.worldSize,this.worldSize]),i.scale(lr,lr,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=lr,this.invProjMatrix=i.invert([],this.projMatrix);var Fr=this.width%2/2,Xr=this.height%2/2,Yr=Math.cos(this.angle),Vr=Math.sin(this.angle),Kr=ue-Math.round(ue)+Yr*Fr+Vr*Xr,fn=Re-Math.round(Re)+Yr*Xr+Vr*Fr,Fn=new Float64Array(lr);if(i.translate(Fn,Fn,[Kr>.5?Kr-1:Kr,fn>.5?fn-1:fn,0]),this.alignedProjMatrix=Fn,lr=i.create(),i.scale(lr,lr,[this.width/2,-this.height/2,1]),i.translate(lr,lr,[1,-1,0]),this.labelPlaneMatrix=lr,lr=i.create(),i.scale(lr,lr,[1,-1,1]),i.translate(lr,lr,[-1,-1,0]),i.scale(lr,lr,[2/this.width,2/this.height,1]),this.glCoordMatrix=lr,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),lr=i.invert(new Float64Array(16),this.pixelMatrix),!lr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=lr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Dn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new i.Point(0,0)),dt=[K.x*this.worldSize,K.y*this.worldSize,0,1],rt=i.transformMat4(dt,dt,this.pixelMatrix);return rt[3]/this.cameraToCenterDistance},Dn.prototype.getCameraPoint=function(){var K=this._pitch,dt=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,dt))},Dn.prototype.getCameraQueryGeometry=function(K){var dt=this.getCameraPoint();if(K.length===1)return[K[0],dt];for(var rt=dt.x,pt=dt.y,Ot=dt.x,Qt=dt.y,ue=0,Re=K;ue=3&&!K.some(function(rt){return isNaN(rt)})){var dt=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(K[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+K[2],+K[1]],zoom:+K[0],bearing:dt,pitch:+(K[4]||0)}),!0}return!1},Pi.prototype._updateHashUnthrottled=function(){var K=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,K)}catch{}};var Ri={linearity:.3,easing:i.bezier(0,0,.3,1)},zi=i.extend({deceleration:2500,maxSpeed:1400},Ri),Xi=i.extend({deceleration:20,maxSpeed:1400},Ri),da=i.extend({deceleration:1e3,maxSpeed:360},Ri),Ia=i.extend({deceleration:1e3,maxSpeed:90},Ri),ft=function(K){this._map=K,this.clear()};ft.prototype.clear=function(){this._inertiaBuffer=[]},ft.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:K})},ft.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,dt=i.browser.now(),rt=160;K.length>0&&dt-K[0].time>rt;)K.shift()},ft.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var dt={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},rt=0,pt=this._inertiaBuffer;rt=this._clickTolerance||this._map.fire(new ee(K.type,this._map,K))},De.prototype.dblclick=function(K){return this._firePreventable(new ee(K.type,this._map,K))},De.prototype.mouseover=function(K){this._map.fire(new ee(K.type,this._map,K))},De.prototype.mouseout=function(K){this._map.fire(new ee(K.type,this._map,K))},De.prototype.touchstart=function(K){return this._firePreventable(new ae(K.type,this._map,K))},De.prototype.touchmove=function(K){this._map.fire(new ae(K.type,this._map,K))},De.prototype.touchend=function(K){this._map.fire(new ae(K.type,this._map,K))},De.prototype.touchcancel=function(K){this._map.fire(new ae(K.type,this._map,K))},De.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},De.prototype.isEnabled=function(){return!0},De.prototype.isActive=function(){return!1},De.prototype.enable=function(){},De.prototype.disable=function(){};var Ee=function(K){this._map=K};Ee.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ee.prototype.mousemove=function(K){this._map.fire(new ee(K.type,this._map,K))},Ee.prototype.mousedown=function(){this._delayContextMenu=!0},Ee.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ee("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ee.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new ee(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Ee.prototype.isEnabled=function(){return!0},Ee.prototype.isActive=function(){return!1},Ee.prototype.enable=function(){},Ee.prototype.disable=function(){};var Ye=function(K,dt){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=dt.clickTolerance||1};Ye.prototype.isEnabled=function(){return!!this._enabled},Ye.prototype.isActive=function(){return!!this._active},Ye.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ye.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ye.prototype.mousedown=function(K,dt){this.isEnabled()&&K.shiftKey&&K.button===0&&(x.disableDrag(),this._startPos=this._lastPos=dt,this._active=!0)},Ye.prototype.mousemoveWindow=function(K,dt){if(this._active){var rt=dt;if(!(this._lastPos.equals(rt)||!this._box&&rt.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),rt.length===this.numTouches&&(this.centroid=nr(dt),this.touches=Ze(rt,dt)))},on.prototype.touchmove=function(K,dt,rt){if(!(this.aborted||!this.centroid)){var pt=Ze(rt,dt);for(var Ot in this.touches){var Qt=this.touches[Ot],ue=pt[Ot];(!ue||ue.dist(Qt)>Jr)&&(this.aborted=!0)}}},on.prototype.touchend=function(K,dt,rt){if((!this.centroid||K.timeStamp-this.startTime>Lr)&&(this.aborted=!0),rt.length===0){var pt=!this.aborted&&this.centroid;if(this.reset(),pt)return pt}};var Rr=function(K){this.singleTap=new on(K),this.numTaps=K.numTaps,this.reset()};Rr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Rr.prototype.touchstart=function(K,dt,rt){this.singleTap.touchstart(K,dt,rt)},Rr.prototype.touchmove=function(K,dt,rt){this.singleTap.touchmove(K,dt,rt)},Rr.prototype.touchend=function(K,dt,rt){var pt=this.singleTap.touchend(K,dt,rt);if(pt){var Ot=K.timeStamp-this.lastTime<_r,Qt=!this.lastTap||this.lastTap.dist(pt)0&&(this._active=!0);var pt=Ze(rt,dt),Ot=new i.Point(0,0),Qt=new i.Point(0,0),ue=0;for(var Re in pt){var We=pt[Re],qe=this._touches[Re];qe&&(Ot._add(We),Qt._add(We.sub(qe)),ue++,pt[Re]=We)}if(this._touches=pt,!(ueMath.abs(ht.x)}var Ti=100,Zi=function(ht){function K(){ht.apply(this,arguments)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ht.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(rt){this._lastPoints=rt,Bi(rt[0].sub(rt[1]))&&(this._valid=!1)},K.prototype._move=function(rt,pt,Ot){var Qt=rt[0].sub(this._lastPoints[0]),ue=rt[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Qt,ue,Ot.timeStamp),!!this._valid){this._lastPoints=rt,this._active=!0;var Re=(Qt.y+ue.y)/2,We=-.5;return{pitchDelta:Re*We}}},K.prototype.gestureBeginsVertically=function(rt,pt,Ot){if(this._valid!==void 0)return this._valid;var Qt=2,ue=rt.mag()>=Qt,Re=pt.mag()>=Qt;if(!(!ue&&!Re)){if(!ue||!Re)return this._firstMove===void 0&&(this._firstMove=Ot),Ot-this._firstMove0==pt.y>0;return Bi(rt)&&Bi(pt)&&We}},K}(fi),ba={panStep:100,bearingStep:15,pitchStep:10},na=function(){var K=ba;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};na.prototype.reset=function(){this._active=!1},na.prototype.keydown=function(K){var dt=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var rt=0,pt=0,Ot=0,Qt=0,ue=0;switch(K.keyCode){case 61:case 107:case 171:case 187:rt=1;break;case 189:case 109:case 173:rt=-1;break;case 37:K.shiftKey?pt=-1:(K.preventDefault(),Qt=-1);break;case 39:K.shiftKey?pt=1:(K.preventDefault(),Qt=1);break;case 38:K.shiftKey?Ot=1:(K.preventDefault(),ue=-1);break;case 40:K.shiftKey?Ot=-1:(K.preventDefault(),ue=1);break;default:return}return this._rotationDisabled&&(pt=0,Ot=0),{cameraAnimation:function(Re){var We=Re.getZoom();Re.easeTo({duration:300,easeId:"keyboardHandler",easing:Ka,zoom:rt?Math.round(We)+rt*(K.shiftKey?2:1):We,bearing:Re.getBearing()+pt*dt._bearingStep,pitch:Re.getPitch()+Ot*dt._pitchStep,offset:[-Qt*dt._panStep,-ue*dt._panStep],center:Re.getCenter()},{originalEvent:K})}}}},na.prototype.enable=function(){this._enabled=!0},na.prototype.disable=function(){this._enabled=!1,this.reset()},na.prototype.isEnabled=function(){return this._enabled},na.prototype.isActive=function(){return this._active},na.prototype.disableRotation=function(){this._rotationDisabled=!0},na.prototype.enableRotation=function(){this._rotationDisabled=!1};function Ka(ht){return ht*(2-ht)}var Ja=4.000244140625,to=1/100,wa=1/450,uo=2,oi=function(K,dt){this._map=K,this._el=K.getCanvasContainer(),this._handler=dt,this._delta=0,this._defaultZoomRate=to,this._wheelZoomRate=wa,i.bindAll(["_onTimeout"],this)};oi.prototype.setZoomRate=function(K){this._defaultZoomRate=K},oi.prototype.setWheelZoomRate=function(K){this._wheelZoomRate=K},oi.prototype.isEnabled=function(){return!!this._enabled},oi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},oi.prototype.isZooming=function(){return!!this._zooming},oi.prototype.enable=function(K){this.isEnabled()||(this._enabled=!0,this._aroundCenter=K&&K.around==="center")},oi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},oi.prototype.wheel=function(K){if(this.isEnabled()){var dt=K.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,rt=i.browser.now(),pt=rt-(this._lastWheelEventTime||0);this._lastWheelEventTime=rt,dt!==0&&dt%Ja===0?this._type="wheel":dt!==0&&Math.abs(dt)<4?this._type="trackpad":pt>400?(this._type=null,this._lastValue=dt,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(pt*dt)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,dt+=this._lastValue)),K.shiftKey&&dt&&(dt=dt/4),this._type&&(this._lastWheelEvent=K,this._delta-=dt,this._active||this._start(K)),K.preventDefault()}},oi.prototype._onTimeout=function(K){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(K)},oi.prototype._start=function(K){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var dt=x.mousePos(this._el,K);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(dt)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},oi.prototype.renderFrame=function(){var K=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var dt=this._map.transform;if(this._delta!==0){var rt=this._type==="wheel"&&Math.abs(this._delta)>Ja?this._wheelZoomRate:this._defaultZoomRate,pt=uo/(1+Math.exp(-Math.abs(this._delta*rt)));this._delta<0&&pt!==0&&(pt=1/pt);var Ot=typeof this._targetZoom=="number"?dt.zoomScale(this._targetZoom):dt.scale;this._targetZoom=Math.min(dt.maxZoom,Math.max(dt.minZoom,dt.scaleZoom(Ot*pt))),this._type==="wheel"&&(this._startZoom=dt.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Qt=typeof this._targetZoom=="number"?this._targetZoom:dt.zoom,ue=this._startZoom,Re=this._easing,We=!1,qe;if(this._type==="wheel"&&ue&&Re){var cr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),lr=Re(cr);qe=i.number(ue,Qt,lr),cr<1?this._frameId||(this._frameId=!0):We=!0}else qe=Qt,We=!0;return this._active=!0,We&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!We,zoomDelta:qe-dt.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},oi.prototype._smoothOutEasing=function(K){var dt=i.ease;if(this._prevEase){var rt=this._prevEase,pt=(i.browser.now()-rt.start)/rt.duration,Ot=rt.easing(pt+.01)-rt.easing(pt),Qt=.27/Math.sqrt(Ot*Ot+1e-4)*.01,ue=Math.sqrt(.27*.27-Qt*Qt);dt=i.bezier(Qt,ue,.25,1)}return this._prevEase={start:i.browser.now(),duration:K,easing:dt},dt},oi.prototype.reset=function(){this._active=!1};var Ei=function(K,dt){this._clickZoom=K,this._tapZoom=dt};Ei.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Ei.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Ei.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Ei.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ao=function(){this.reset()};Ao.prototype.reset=function(){this._active=!1},Ao.prototype.dblclick=function(K,dt){return K.preventDefault(),{cameraAnimation:function(rt){rt.easeTo({duration:300,zoom:rt.getZoom()+(K.shiftKey?-1:1),around:rt.unproject(dt)},{originalEvent:K})}}},Ao.prototype.enable=function(){this._enabled=!0},Ao.prototype.disable=function(){this._enabled=!1,this.reset()},Ao.prototype.isEnabled=function(){return this._enabled},Ao.prototype.isActive=function(){return this._active};var Lo=function(){this._tap=new Rr({numTouches:1,numTaps:1}),this.reset()};Lo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Lo.prototype.touchstart=function(K,dt,rt){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>_r&&this.reset(),this._tapTime?rt.length>0&&(this._swipePoint=dt[0],this._swipeTouch=rt[0].identifier):this._tap.touchstart(K,dt,rt))},Lo.prototype.touchmove=function(K,dt,rt){if(!this._tapTime)this._tap.touchmove(K,dt,rt);else if(this._swipePoint){if(rt[0].identifier!==this._swipeTouch)return;var pt=dt[0],Ot=pt.y-this._swipePoint.y;return this._swipePoint=pt,K.preventDefault(),this._active=!0,{zoomDelta:Ot/128}}},Lo.prototype.touchend=function(K,dt,rt){if(this._tapTime)this._swipePoint&&rt.length===0&&this.reset();else{var pt=this._tap.touchend(K,dt,rt);pt&&(this._tapTime=K.timeStamp)}},Lo.prototype.touchcancel=function(){this.reset()},Lo.prototype.enable=function(){this._enabled=!0},Lo.prototype.disable=function(){this._enabled=!1,this.reset()},Lo.prototype.isEnabled=function(){return this._enabled},Lo.prototype.isActive=function(){return this._active};var eo=function(K,dt,rt){this._el=K,this._mousePan=dt,this._touchPan=rt};eo.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},eo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},eo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},eo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ca=function(K,dt,rt){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=dt,this._mousePitch=rt};ca.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ca.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ca.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ca.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Va=function(K,dt,rt,pt){this._el=K,this._touchZoom=dt,this._touchRotate=rt,this._tapDragZoom=pt,this._rotationDisabled=!1,this._enabled=!0};Va.prototype.enable=function(K){this._touchZoom.enable(K),this._rotationDisabled||this._touchRotate.enable(K),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Va.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Va.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Va.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Va.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Va.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Oa=function(ht){return ht.zoom||ht.drag||ht.pitch||ht.rotate},is=function(ht){function K(){ht.apply(this,arguments)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K}(i.Event);function bs(ht){return ht.panDelta&&ht.panDelta.mag()||ht.zoomDelta||ht.bearingDelta||ht.pitchDelta}var Ea=function(K,dt){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ft(K),this._bearingSnap=dt.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(dt),i.bindAll(["handleEvent","handleWindowEvent"],this);var rt=this._el;this._listeners=[[rt,"touchstart",{passive:!0}],[rt,"touchmove",{passive:!1}],[rt,"touchend",void 0],[rt,"touchcancel",void 0],[rt,"mousedown",void 0],[rt,"mousemove",void 0],[rt,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[rt,"mouseover",void 0],[rt,"mouseout",void 0],[rt,"dblclick",void 0],[rt,"click",void 0],[rt,"keydown",{capture:!1}],[rt,"keyup",void 0],[rt,"wheel",{passive:!1}],[rt,"contextmenu",void 0],[i.window,"blur",void 0]];for(var pt=0,Ot=this._listeners;ptue?Math.min(2,Yn):Math.max(.5,Yn),hi=Math.pow(yi,1-ti),Fi=Qt.unproject(Fn.add(Nn.mult(ti*hi)).mult(si));Qt.setLocationAtPoint(Qt.renderWorldCopies?Fi.wrap():Fi,Vr)}Ot._fireMoveEvents(pt)},function(ti){Ot._afterEase(pt,ti)},rt),this},K.prototype._prepareEase=function(rt,pt,Ot){Ot===void 0&&(Ot={}),this._moving=!0,!pt&&!Ot.moving&&this.fire(new i.Event("movestart",rt)),this._zooming&&!Ot.zooming&&this.fire(new i.Event("zoomstart",rt)),this._rotating&&!Ot.rotating&&this.fire(new i.Event("rotatestart",rt)),this._pitching&&!Ot.pitching&&this.fire(new i.Event("pitchstart",rt))},K.prototype._fireMoveEvents=function(rt){this.fire(new i.Event("move",rt)),this._zooming&&this.fire(new i.Event("zoom",rt)),this._rotating&&this.fire(new i.Event("rotate",rt)),this._pitching&&this.fire(new i.Event("pitch",rt))},K.prototype._afterEase=function(rt,pt){if(!(this._easeId&&pt&&this._easeId===pt)){delete this._easeId;var Ot=this._zooming,Qt=this._rotating,ue=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ot&&this.fire(new i.Event("zoomend",rt)),Qt&&this.fire(new i.Event("rotateend",rt)),ue&&this.fire(new i.Event("pitchend",rt)),this.fire(new i.Event("moveend",rt))}},K.prototype.flyTo=function(rt,pt){var Ot=this;if(!rt.essential&&i.browser.prefersReducedMotion){var Qt=i.pick(rt,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Qt,pt)}this.stop(),rt=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},rt);var ue=this.transform,Re=this.getZoom(),We=this.getBearing(),qe=this.getPitch(),cr=this.getPadding(),lr="zoom"in rt?i.clamp(+rt.zoom,ue.minZoom,ue.maxZoom):Re,Fr="bearing"in rt?this._normalizeBearing(rt.bearing,We):We,Xr="pitch"in rt?+rt.pitch:qe,Yr="padding"in rt?rt.padding:ue.padding,Vr=ue.zoomScale(lr-Re),Kr=i.Point.convert(rt.offset),fn=ue.centerPoint.add(Kr),Fn=ue.pointLocation(fn),Nn=i.LngLat.convert(rt.center||Fn);this._normalizeCenter(Nn);var Yn=ue.project(Fn),Xn=ue.project(Nn).sub(Yn),Gn=rt.curve,jn=Math.max(ue.width,ue.height),ti=jn/Vr,si=Xn.mag();if("minZoom"in rt){var yi=i.clamp(Math.min(rt.minZoom,Re,lr),ue.minZoom,ue.maxZoom),hi=jn/ue.zoomScale(yi-Re);Gn=Math.sqrt(hi/si*2)}var Fi=Gn*Gn;function Ji(Hi){var Qi=(ti*ti-jn*jn+(Hi?-1:1)*Fi*Fi*si*si)/(2*(Hi?ti:jn)*Fi*si);return Math.log(Math.sqrt(Qi*Qi+1)-Qi)}function Gi(Hi){return(Math.exp(Hi)-Math.exp(-Hi))/2}function Ai(Hi){return(Math.exp(Hi)+Math.exp(-Hi))/2}function Yi(Hi){return Gi(Hi)/Ai(Hi)}var Ui=Ji(0),ia=function(Hi){return Ai(Ui)/Ai(Ui+Gn*Hi)},qi=function(Hi){return jn*((Ai(Ui)*Yi(Ui+Gn*Hi)-Gi(Ui))/Fi)/si},Ta=(Ji(1)-Ui)/Gn;if(Math.abs(si)<1e-6||!isFinite(Ta)){if(Math.abs(jn-ti)<1e-6)return this.easeTo(rt,pt);var Ki=tirt.maxDuration&&(rt.duration=0),this._zooming=!0,this._rotating=We!==Fr,this._pitching=Xr!==qe,this._padding=!ue.isPaddingEqual(Yr),this._prepareEase(pt,!1),this._ease(function(Hi){var Qi=Hi*Ta,Na=1/ia(Qi);ue.zoom=Hi===1?lr:Re+ue.scaleZoom(Na),Ot._rotating&&(ue.bearing=i.number(We,Fr,Hi)),Ot._pitching&&(ue.pitch=i.number(qe,Xr,Hi)),Ot._padding&&(ue.interpolatePadding(cr,Yr,Hi),fn=ue.centerPoint.add(Kr));var fo=Hi===1?Nn:ue.unproject(Yn.add(Xn.mult(qi(Qi))).mult(Na));ue.setLocationAtPoint(ue.renderWorldCopies?fo.wrap():fo,fn),Ot._fireMoveEvents(pt)},function(){return Ot._afterEase(pt)},rt),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(rt,pt){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ot=this._onEaseEnd;delete this._onEaseEnd,Ot.call(this,pt)}if(!rt){var Qt=this.handlers;Qt&&Qt.stop(!1)}return this},K.prototype._ease=function(rt,pt,Ot){Ot.animate===!1||Ot.duration===0?(rt(1),pt()):(this._easeStart=i.browser.now(),this._easeOptions=Ot,this._onEaseFrame=rt,this._onEaseEnd=pt,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var rt=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(rt)),rt<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(rt,pt){rt=i.wrap(rt,-180,180);var Ot=Math.abs(rt-pt);return Math.abs(rt-360-pt)180?-360:Ot<-180?360:0}},K}(i.Evented),ji=function(K){K===void 0&&(K={}),this.options=K,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};ji.prototype.getDefaultPosition=function(){return"bottom-right"},ji.prototype.onAdd=function(K){var dt=this.options&&this.options.compact;return this._map=K,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=x.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),dt&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),dt===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},ji.prototype.onRemove=function(){x.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},ji.prototype._setElementTitle=function(K,dt){var rt=this._map._getUIString("AttributionControl."+dt);K.title=rt,K.setAttribute("aria-label",rt)},ji.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},ji.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var dt=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(K){var rt=dt.reduce(function(pt,Ot,Qt){return Ot.value&&(pt+=Ot.key+"="+Ot.value+(Qt=0)return!1;return!0});var ue=K.join(" | ");ue!==this._attribHTML&&(this._attribHTML=ue,K.length?(this._innerContainer.innerHTML=ue,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},ji.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var _a=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};_a.prototype.onAdd=function(K){this._map=K,this._container=x.create("div","mapboxgl-ctrl");var dt=x.create("a","mapboxgl-ctrl-logo");return dt.target="_blank",dt.rel="noopener nofollow",dt.href="https://www.mapbox.com/",dt.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),dt.setAttribute("rel","noopener nofollow"),this._container.appendChild(dt),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},_a.prototype.onRemove=function(){x.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},_a.prototype.getDefaultPosition=function(){return"bottom-left"},_a.prototype._updateLogo=function(K){(!K||K.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},_a.prototype._logoRequired=function(){if(this._map.style){var K=this._map.style.sourceCaches;for(var dt in K){var rt=K[dt].getSource();if(rt.mapbox_logo)return!0}return!1}},_a.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var dt=K[0];this._map.getCanvasContainer().offsetWidth<250?dt.classList.add("mapboxgl-compact"):dt.classList.remove("mapboxgl-compact")}};var zc=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};zc.prototype.add=function(K){var dt=++this._id,rt=this._queue;return rt.push({callback:K,id:dt,cancelled:!1}),dt},zc.prototype.remove=function(K){for(var dt=this._currentlyRunning,rt=dt?this._queue.concat(dt):this._queue,pt=0,Ot=rt;ptrt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(rt.minPitch!=null&&rt.maxPitch!=null&&rt.minPitch>rt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(rt.minPitch!=null&&rt.minPitchPu)throw new Error("maxPitch must be less than or equal to "+Pu);var Ot=new Dn(rt.minZoom,rt.maxZoom,rt.minPitch,rt.maxPitch,rt.renderWorldCopies);if(ht.call(this,Ot,rt),this._interactive=rt.interactive,this._maxTileCacheSize=rt.maxTileCacheSize,this._failIfMajorPerformanceCaveat=rt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=rt.preserveDrawingBuffer,this._antialias=rt.antialias,this._trackResize=rt.trackResize,this._bearingSnap=rt.bearingSnap,this._refreshExpiredTiles=rt.refreshExpiredTiles,this._fadeDuration=rt.fadeDuration,this._crossSourceCollisions=rt.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=rt.collectResourceTiming,this._renderTaskQueue=new zc,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},td,rt.locale),this._clickTolerance=rt.clickTolerance,this._requestManager=new i.RequestManager(rt.transformRequest,rt.accessToken),typeof rt.container=="string"){if(this._container=i.window.document.getElementById(rt.container),!this._container)throw new Error("Container '"+rt.container+"' not found.")}else if(rt.container instanceof dv)this._container=rt.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(rt.maxBounds&&this.setMaxBounds(rt.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return pt._update(!1)}),this.on("moveend",function(){return pt._update(!1)}),this.on("zoom",function(){return pt._update(!0)}),typeof i.window<"u"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ea(this,rt);var Qt=typeof rt.hash=="string"&&rt.hash||void 0;this._hash=rt.hash&&new Pi(Qt).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:rt.center,zoom:rt.zoom,bearing:rt.bearing,pitch:rt.pitch}),rt.bounds&&(this.resize(),this.fitBounds(rt.bounds,i.extend({},rt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=rt.localIdeographFontFamily,rt.style&&this.setStyle(rt.style,{localIdeographFontFamily:rt.localIdeographFontFamily}),rt.attributionControl&&this.addControl(new ji({customAttribution:rt.customAttribution})),this.addControl(new _a,rt.logoPosition),this.on("style.load",function(){pt.transform.unmodified&&pt.jumpTo(pt.style.stylesheet)}),this.on("data",function(ue){pt._update(ue.dataType==="style"),pt.fire(new i.Event(ue.dataType+"data",ue))}),this.on("dataloading",function(ue){pt.fire(new i.Event(ue.dataType+"dataloading",ue))})}ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K;var dt={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return K.prototype._getMapId=function(){return this._mapId},K.prototype.addControl=function(pt,Ot){if(Ot===void 0&&(pt.getDefaultPosition?Ot=pt.getDefaultPosition():Ot="top-right"),!pt||!pt.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Qt=pt.onAdd(this);this._controls.push(pt);var ue=this._controlPositions[Ot];return Ot.indexOf("bottom")!==-1?ue.insertBefore(Qt,ue.firstChild):ue.appendChild(Qt),this},K.prototype.removeControl=function(pt){if(!pt||!pt.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Ot=this._controls.indexOf(pt);return Ot>-1&&this._controls.splice(Ot,1),pt.onRemove(this),this},K.prototype.hasControl=function(pt){return this._controls.indexOf(pt)>-1},K.prototype.resize=function(pt){var Ot=this._containerDimensions(),Qt=Ot[0],ue=Ot[1];this._resizeCanvas(Qt,ue),this.transform.resize(Qt,ue),this.painter.resize(Qt,ue);var Re=!this._moving;return Re&&(this.stop(),this.fire(new i.Event("movestart",pt)).fire(new i.Event("move",pt))),this.fire(new i.Event("resize",pt)),Re&&this.fire(new i.Event("moveend",pt)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(pt){return this.transform.setMaxBounds(i.LngLatBounds.convert(pt)),this._update()},K.prototype.setMinZoom=function(pt){if(pt=pt??Gf,pt>=Gf&&pt<=this.transform.maxZoom)return this.transform.minZoom=pt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=pt,this._update(),this.getZoom()>pt&&this.setZoom(pt),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(pt){if(pt=pt??Zo,pt=Zo&&pt<=this.transform.maxPitch)return this.transform.minPitch=pt,this._update(),this.getPitch()Pu)throw new Error("maxPitch must be less than or equal to "+Pu);if(pt>=this.transform.minPitch)return this.transform.maxPitch=pt,this._update(),this.getPitch()>pt&&this.setPitch(pt),this;throw new Error("maxPitch must be greater than the current minPitch")},K.prototype.getMaxPitch=function(){return this.transform.maxPitch},K.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},K.prototype.setRenderWorldCopies=function(pt){return this.transform.renderWorldCopies=pt,this._update()},K.prototype.project=function(pt){return this.transform.locationPoint(i.LngLat.convert(pt))},K.prototype.unproject=function(pt){return this.transform.pointLocation(i.Point.convert(pt))},K.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},K.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},K.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},K.prototype._createDelegatedListener=function(pt,Ot,Qt){var ue=this,Re;if(pt==="mouseenter"||pt==="mouseover"){var We=!1,qe=function(Vr){var Kr=ue.getLayer(Ot)?ue.queryRenderedFeatures(Vr.point,{layers:[Ot]}):[];Kr.length?We||(We=!0,Qt.call(ue,new ee(pt,ue,Vr.originalEvent,{features:Kr}))):We=!1},cr=function(){We=!1};return{layer:Ot,listener:Qt,delegates:{mousemove:qe,mouseout:cr}}}else if(pt==="mouseleave"||pt==="mouseout"){var lr=!1,Fr=function(Vr){var Kr=ue.getLayer(Ot)?ue.queryRenderedFeatures(Vr.point,{layers:[Ot]}):[];Kr.length?lr=!0:lr&&(lr=!1,Qt.call(ue,new ee(pt,ue,Vr.originalEvent)))},Xr=function(Vr){lr&&(lr=!1,Qt.call(ue,new ee(pt,ue,Vr.originalEvent)))};return{layer:Ot,listener:Qt,delegates:{mousemove:Fr,mouseout:Xr}}}else{var Yr=function(Vr){var Kr=ue.getLayer(Ot)?ue.queryRenderedFeatures(Vr.point,{layers:[Ot]}):[];Kr.length&&(Vr.features=Kr,Qt.call(ue,Vr),delete Vr.features)};return{layer:Ot,listener:Qt,delegates:(Re={},Re[pt]=Yr,Re)}}},K.prototype.on=function(pt,Ot,Qt){if(Qt===void 0)return ht.prototype.on.call(this,pt,Ot);var ue=this._createDelegatedListener(pt,Ot,Qt);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[pt]=this._delegatedListeners[pt]||[],this._delegatedListeners[pt].push(ue);for(var Re in ue.delegates)this.on(Re,ue.delegates[Re]);return this},K.prototype.once=function(pt,Ot,Qt){if(Qt===void 0)return ht.prototype.once.call(this,pt,Ot);var ue=this._createDelegatedListener(pt,Ot,Qt);for(var Re in ue.delegates)this.once(Re,ue.delegates[Re]);return this},K.prototype.off=function(pt,Ot,Qt){var ue=this;if(Qt===void 0)return ht.prototype.off.call(this,pt,Ot);var Re=function(We){for(var qe=We[pt],cr=0;cr180;){var Qt=dt.locationPoint(ht);if(Qt.x>=0&&Qt.y>=0&&Qt.x<=dt.width&&Qt.y<=dt.height)break;ht.lng>dt.center.lng?ht.lng-=360:ht.lng+=360}return ht}var Oc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function oh(ht,K,dt){var rt=ht.classList;for(var pt in Oc)rt.remove("mapboxgl-"+dt+"-anchor-"+pt);rt.add("mapboxgl-"+dt+"-anchor-"+K)}var Yf=function(ht){function K(dt,rt){if(ht.call(this),(dt instanceof i.window.HTMLElement||rt)&&(dt=i.extend({element:dt},rt)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=dt&&dt.anchor||"center",this._color=dt&&dt.color||"#3FB1CE",this._scale=dt&&dt.scale||1,this._draggable=dt&&dt.draggable||!1,this._clickTolerance=dt&&dt.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=dt&&dt.rotation||0,this._rotationAlignment=dt&&dt.rotationAlignment||"auto",this._pitchAlignment=dt&&dt.pitchAlignment&&dt.pitchAlignment!=="auto"?dt.pitchAlignment:this._rotationAlignment,!dt||!dt.element){this._defaultMarker=!0,this._element=x.create("div"),this._element.setAttribute("aria-label","Map marker");var pt=x.createNS("http://www.w3.org/2000/svg","svg"),Ot=41,Qt=27;pt.setAttributeNS(null,"display","block"),pt.setAttributeNS(null,"height",Ot+"px"),pt.setAttributeNS(null,"width",Qt+"px"),pt.setAttributeNS(null,"viewBox","0 0 "+Qt+" "+Ot);var ue=x.createNS("http://www.w3.org/2000/svg","g");ue.setAttributeNS(null,"stroke","none"),ue.setAttributeNS(null,"stroke-width","1"),ue.setAttributeNS(null,"fill","none"),ue.setAttributeNS(null,"fill-rule","evenodd");var Re=x.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");var We=x.createNS("http://www.w3.org/2000/svg","g");We.setAttributeNS(null,"transform","translate(3.0, 29.0)"),We.setAttributeNS(null,"fill","#000000");for(var qe=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],cr=0,lr=qe;cr=pt}this._isDragging&&(this._pos=rt.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},K.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},K.prototype._addDragHandler=function(rt){this._element.contains(rt.originalEvent.target)&&(rt.preventDefault(),this._positionDelta=rt.point.sub(this._pos).add(this._offset),this._pointerdownPos=rt.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},K.prototype.setDraggable=function(rt){return this._draggable=!!rt,this._map&&(rt?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(rt){return this._rotation=rt||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(rt){return this._rotationAlignment=rt||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(rt){return this._pitchAlignment=rt&&rt!=="auto"?rt:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(i.Evented),mv={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ru;function Nc(ht){Ru!==void 0?ht(Ru):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(K){Ru=K.state!=="denied",ht(Ru)}):(Ru=!!i.window.navigator.geolocation,ht(Ru))}var Xf=0,af=!1,ed=function(ht){function K(dt){ht.call(this),this.options=i.extend({},mv,dt),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(rt){return this._map=rt,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Nc(this._setupUI),this._container},K.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),x.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xf=0,af=!1},K.prototype._isOutOfMapMaxBounds=function(rt){var pt=this._map.getMaxBounds(),Ot=rt.coords;return pt&&(Ot.longitudept.getEast()||Ot.latitudept.getNorth())},K.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},K.prototype._onSuccess=function(rt){if(this._map){if(this._isOutOfMapMaxBounds(rt)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",rt)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=rt,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(rt),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(rt),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",rt)),this._finish()}},K.prototype._updateCamera=function(rt){var pt=new i.LngLat(rt.coords.longitude,rt.coords.latitude),Ot=rt.coords.accuracy,Qt=this._map.getBearing(),ue=i.extend({bearing:Qt},this.options.fitBoundsOptions);this._map.fitBounds(pt.toBounds(Ot),ue,{geolocateSource:!0})},K.prototype._updateMarker=function(rt){if(rt){var pt=new i.LngLat(rt.coords.longitude,rt.coords.latitude);this._accuracyCircleMarker.setLngLat(pt).addTo(this._map),this._userLocationDotMarker.setLngLat(pt).addTo(this._map),this._accuracy=rt.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var rt=this._map._container.clientHeight/2,pt=this._map.unproject([0,rt]),Ot=this._map.unproject([1,rt]),Qt=pt.distanceTo(Ot),ue=Math.ceil(2*this._accuracy/Qt);this._circleElement.style.width=ue+"px",this._circleElement.style.height=ue+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(rt){if(this._map){if(this.options.trackUserLocation)if(rt.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var pt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=pt,this._geolocateButton.setAttribute("aria-label",pt),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(rt.code===3&&af)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",rt)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(rt){var pt=this;if(this._container.addEventListener("contextmenu",function(ue){return ue.preventDefault()}),this._geolocateButton=x.create("button","mapboxgl-ctrl-geolocate",this._container),x.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",rt===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ot=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ot,this._geolocateButton.setAttribute("aria-label",Ot)}else{var Qt=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Qt,this._geolocateButton.setAttribute("aria-label",Qt)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Yf(this._dotElement),this._circleElement=x.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Yf({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ue){var Re=ue.originalEvent&&ue.originalEvent.type==="resize";!ue.geolocateSource&&pt._watchState==="ACTIVE_LOCK"&&!Re&&(pt._watchState="BACKGROUND",pt._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),pt._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),pt.fire(new i.Event("trackuserlocationend")))})},K.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xf--,af=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xf++;var rt;Xf>1?(rt={maximumAge:6e5,timeout:0},af=!0):(rt=this.options.positionOptions,af=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,rt)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},K}(i.Evented),yv={maxWidth:100,unit:"metric"},of=function(K){this.options=i.extend({},yv,K),i.bindAll(["_onMove","setUnit"],this)};of.prototype.getDefaultPosition=function(){return"bottom-left"},of.prototype._onMove=function(){xv(this._map,this._container,this.options)},of.prototype.onAdd=function(K){return this._map=K,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},of.prototype.onRemove=function(){x.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},of.prototype.setUnit=function(K){this.options.unit=K,xv(this._map,this._container,this.options)};function xv(ht,K,dt){var rt=dt&&dt.maxWidth||100,pt=ht._container.clientHeight/2,Ot=ht.unproject([0,pt]),Qt=ht.unproject([rt,pt]),ue=Ot.distanceTo(Qt);if(dt&&dt.unit==="imperial"){var Re=3.2808*ue;if(Re>5280){var We=Re/5280;Zf(K,rt,We,ht._getUIString("ScaleControl.Miles"))}else Zf(K,rt,Re,ht._getUIString("ScaleControl.Feet"))}else if(dt&&dt.unit==="nautical"){var qe=ue/1852;Zf(K,rt,qe,ht._getUIString("ScaleControl.NauticalMiles"))}else ue>=1e3?Zf(K,rt,ue/1e3,ht._getUIString("ScaleControl.Kilometers")):Zf(K,rt,ue,ht._getUIString("ScaleControl.Meters"))}function Zf(ht,K,dt,rt){var pt=nd(dt),Ot=pt/dt;ht.style.width=K*Ot+"px",ht.innerHTML=pt+" "+rt}function rd(ht){var K=Math.pow(10,Math.ceil(-Math.log(ht)/Math.LN10));return Math.round(ht*K)/K}function nd(ht){var K=Math.pow(10,(""+Math.floor(ht)).length-1),dt=ht/K;return dt=dt>=10?10:dt>=5?5:dt>=3?3:dt>=2?2:dt>=1?1:rd(dt),K*dt}var tl=function(K){this._fullscreen=!1,K&&K.container&&(K.container instanceof i.window.HTMLElement?this._container=K.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};tl.prototype.onAdd=function(K){return this._map=K,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},tl.prototype.onRemove=function(){x.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},tl.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},tl.prototype._setupUI=function(){var K=this._fullscreenButton=x.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);x.create("span","mapboxgl-ctrl-icon",K).setAttribute("aria-hidden",!0),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},tl.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},tl.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},tl.prototype._isFullscreen=function(){return this._fullscreen},tl.prototype._changeIcon=function(){var K=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;K===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},tl.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var id={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},ad=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),wp=function(ht){function K(dt){ht.call(this),this.options=i.extend(Object.create(id),dt),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.addTo=function(rt){return this._map&&this.remove(),this._map=rt,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},K.prototype.isOpen=function(){return!!this._map},K.prototype.remove=function(){return this._content&&x.remove(this._content),this._container&&(x.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(rt){return this._lngLat=i.LngLat.convert(rt),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},K.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(rt){return this.setDOMContent(i.window.document.createTextNode(rt))},K.prototype.setHTML=function(rt){var pt=i.window.document.createDocumentFragment(),Ot=i.window.document.createElement("body"),Qt;for(Ot.innerHTML=rt;Qt=Ot.firstChild,!!Qt;)pt.appendChild(Qt);return this.setDOMContent(pt)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(rt){return this.options.maxWidth=rt,this._update(),this},K.prototype.setDOMContent=function(rt){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=x.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(rt),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(rt){this._container&&this._container.classList.add(rt)},K.prototype.removeClassName=function(rt){this._container&&this._container.classList.remove(rt)},K.prototype.setOffset=function(rt){return this.options.offset=rt,this._update(),this},K.prototype.toggleClassName=function(rt){if(this._container)return this._container.classList.toggle(rt)},K.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=x.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},K.prototype._onMouseUp=function(rt){this._update(rt.point)},K.prototype._onMouseMove=function(rt){this._update(rt.point)},K.prototype._onDrag=function(rt){this._update(rt.point)},K.prototype._update=function(rt){var pt=this,Ot=this._lngLat||this._trackPointer;if(!(!this._map||!Ot||!this._content)&&(this._container||(this._container=x.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=x.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Fr){return pt._container.classList.add(Fr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=eu(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!rt))){var Qt=this._pos=this._trackPointer&&rt?rt:this._map.project(this._lngLat),ue=this.options.anchor,Re=od(this.options.offset);if(!ue){var We=this._container.offsetWidth,qe=this._container.offsetHeight,cr;Qt.y+Re.bottom.ythis._map.transform.height-qe?cr=["bottom"]:cr=[],Qt.xthis._map.transform.width-We/2&&cr.push("right"),cr.length===0?ue="bottom":ue=cr.join("-")}var lr=Qt.add(Re[ue]).round();x.setTransform(this._container,Oc[ue]+" translate("+lr.x+"px,"+lr.y+"px)"),oh(this._container,ue,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var rt=this._container.querySelector(ad);rt&&rt.focus()}},K.prototype._onClose=function(){this.remove()},K}(i.Evented);function od(ht){if(ht)if(typeof ht=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ht,2)));return{center:new i.Point(0,0),top:new i.Point(0,ht),"top-left":new i.Point(K,K),"top-right":new i.Point(-K,K),bottom:new i.Point(0,-ht),"bottom-left":new i.Point(K,-K),"bottom-right":new i.Point(-K,-K),left:new i.Point(ht,0),right:new i.Point(-ht,0)}}else if(ht instanceof i.Point||Array.isArray(ht)){var dt=i.Point.convert(ht);return{center:dt,top:dt,"top-left":dt,"top-right":dt,bottom:dt,"bottom-left":dt,"bottom-right":dt,left:dt,right:dt}}else return{center:i.Point.convert(ht.center||[0,0]),top:i.Point.convert(ht.top||[0,0]),"top-left":i.Point.convert(ht["top-left"]||[0,0]),"top-right":i.Point.convert(ht["top-right"]||[0,0]),bottom:i.Point.convert(ht.bottom||[0,0]),"bottom-left":i.Point.convert(ht["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(ht["bottom-right"]||[0,0]),left:i.Point.convert(ht.left||[0,0]),right:i.Point.convert(ht.right||[0,0])};else return od(new i.Point(0,0))}var ro={version:i.version,supported:S,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:gv,NavigationControl:tu,GeolocateControl:ed,AttributionControl:ji,ScaleControl:of,FullscreenControl:tl,Popup:wp,Marker:Yf,Style:Eo,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:Oe,clearPrewarmedResources:Qe,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(ht){i.config.ACCESS_TOKEN=ht},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(ht){i.config.API_URL=ht},get workerCount(){return vr.workerCount},set workerCount(ht){vr.workerCount=ht},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ht){i.config.MAX_PARALLEL_IMAGE_REQUESTS=ht},clearStorage:function(K){i.clearTileCache(K)},workerUrl:""};return ro}),g})},3108:function(G,U,t){G.exports=t(26099)},26099:function(G,U,t){var g=t(64928),C=t(32420),i=t(51160),S=t(76752),x=t(55616),h=t(31264),p=t(47520),r=t(18400),e=t(72512),a=t(76244),n=1073741824;G.exports=function(l,m){m||(m={}),l=p(l,"float64"),m=x(m,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var v=h(m.maxDepth,255),b=h(m.bounds,S(l,2));b[0]===b[2]&&b[2]++,b[1]===b[3]&&b[3]++;var u=f(l,b),o=l.length>>>1,d;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?d=new(e(m.dtype))(o):m.dtype&&(d=m.dtype,Array.isArray(d)&&(d.length=o));for(var w=0;wv||it>n){for(var V=0;VHt||ot>Ut||$=st)&&mt!==Lt){var kt=A[At];Lt===void 0&&(Lt=kt.length);for(var Vt=mt;Vt=ut&&re<=X&&Kt>=J&&Kt<=tt&&ct.push(It)}var $t=_[At],le=$t[mt*4+0],he=$t[mt*4+1],de=$t[mt*4+2],xe=$t[mt*4+3],Se=Tt($t,mt+1),ne=bt*.5,zt=At+1;gt(wt,Rt,ne,zt,le,he||de||xe||Se),gt(wt,Rt+ne,ne,zt,he,de||xe||Se),gt(wt+ne,Rt,ne,zt,de,xe||Se),gt(wt+ne,Rt+ne,ne,zt,xe,Se)}}}function Tt(wt,Rt){for(var bt=null,At=0;bt===null;)if(bt=wt[Rt*4+At],At++,At>wt.length)return null;return bt}return ct}function k(O,H,Y,j,et){for(var it=[],ut=0;ut0){e+=Math.abs(h(r[0]));for(var a=1;a2){for(m=0;m=0))throw new Error("precision must be a positive number");var L=Math.pow(10,s||0);return Math.round(T*L)/L}U.round=c;function l(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T*L}U.radiansToLength=l;function m(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T/L}U.lengthToRadians=m;function v(T,s){return u(m(T,s))}U.lengthToDegrees=v;function b(T){var s=T%360;return s<0&&(s+=360),s}U.bearingToAzimuth=b;function u(T){var s=T%(2*Math.PI);return s*180/Math.PI}U.radiansToDegrees=u;function o(T){var s=T%360;return s*Math.PI/180}U.degreesToRadians=o;function d(T,s,L){if(s===void 0&&(s="kilometers"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("length must be a positive number");return l(m(T,s),L)}U.convertLength=d;function w(T,s,L){if(s===void 0&&(s="meters"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("area must be a positive number");var M=U.areaFactors[s];if(!M)throw new Error("invalid original units");var z=U.areaFactors[L];if(!z)throw new Error("invalid final units");return T/M*z}U.convertArea=w;function A(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}U.isNumber=A;function _(T){return!!T&&T.constructor===Object}U.isObject=_;function y(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(s){if(!A(s))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}U.validateId=E},3256:function(G,U,t){Object.defineProperty(U,"__esModule",{value:!0});var g=t(46284);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;Tx[0]&&(S[0]=x[0]),S[1]>x[1]&&(S[1]=x[1]),S[2]=0))throw new Error("precision must be a positive number");var L=Math.pow(10,s||0);return Math.round(T*L)/L}U.round=c;function l(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T*L}U.radiansToLength=l;function m(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T/L}U.lengthToRadians=m;function v(T,s){return u(m(T,s))}U.lengthToDegrees=v;function b(T){var s=T%360;return s<0&&(s+=360),s}U.bearingToAzimuth=b;function u(T){var s=T%(2*Math.PI);return s*180/Math.PI}U.radiansToDegrees=u;function o(T){var s=T%360;return s*Math.PI/180}U.degreesToRadians=o;function d(T,s,L){if(s===void 0&&(s="kilometers"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("length must be a positive number");return l(m(T,s),L)}U.convertLength=d;function w(T,s,L){if(s===void 0&&(s="meters"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("area must be a positive number");var M=U.areaFactors[s];if(!M)throw new Error("invalid original units");var z=U.areaFactors[L];if(!z)throw new Error("invalid final units");return T/M*z}U.convertArea=w;function A(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}U.isNumber=A;function _(T){return!!T&&T.constructor===Object}U.isObject=_;function y(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(s){if(!A(s))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}U.validateId=E},84880:function(G,U,t){Object.defineProperty(U,"__esModule",{value:!0});var g=t(76796);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;T=0))throw new Error("precision must be a positive number");var B=Math.pow(10,k||0);return Math.round(I*B)/B}U.round=c;function l(I,k){k===void 0&&(k="kilometers");var B=U.factors[k];if(!B)throw new Error(k+" units is invalid");return I*B}U.radiansToLength=l;function m(I,k){k===void 0&&(k="kilometers");var B=U.factors[k];if(!B)throw new Error(k+" units is invalid");return I/B}U.lengthToRadians=m;function v(I,k){return u(m(I,k))}U.lengthToDegrees=v;function b(I){var k=I%360;return k<0&&(k+=360),k}U.bearingToAzimuth=b;function u(I){var k=I%(2*Math.PI);return k*180/Math.PI}U.radiansToDegrees=u;function o(I){var k=I%360;return k*Math.PI/180}U.degreesToRadians=o;function d(I,k,B){if(k===void 0&&(k="kilometers"),B===void 0&&(B="kilometers"),!(I>=0))throw new Error("length must be a positive number");return l(m(I,k),B)}U.convertLength=d;function w(I,k,B){if(k===void 0&&(k="meters"),B===void 0&&(B="kilometers"),!(I>=0))throw new Error("area must be a positive number");var O=U.areaFactors[k];if(!O)throw new Error("invalid original units");var H=U.areaFactors[B];if(!H)throw new Error("invalid final units");return I/O*H}U.convertArea=w;function A(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)&&!/^\s*$/.test(I)}U.isNumber=A;function _(I){return!!I&&I.constructor===Object}U.isObject=_;function y(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(function(k){if(!A(k))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}U.validateId=E;function T(){throw new Error("method has been renamed to `radiansToDegrees`")}U.radians2degrees=T;function s(){throw new Error("method has been renamed to `degreesToRadians`")}U.degrees2radians=s;function L(){throw new Error("method has been renamed to `lengthToDegrees`")}U.distanceToDegrees=L;function M(){throw new Error("method has been renamed to `lengthToRadians`")}U.distanceToRadians=M;function z(){throw new Error("method has been renamed to `radiansToLength`")}U.radiansToDistance=z;function D(){throw new Error("method has been renamed to `bearingToAzimuth`")}U.bearingToAngle=D;function N(){throw new Error("method has been renamed to `convertLength`")}U.convertDistance=N},43752:function(G,U,t){Object.defineProperty(U,"__esModule",{value:!0});var g=t(49840);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;TS&&(S=t[h]),t[h]1?it-1:0),J=1;J1?it-1:0),J=1;J1?it-1:0),J=1;J1?it-1:0),J=1;J"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function f(I,k,B){return n()?f=Reflect.construct:f=function(H,Y,j){var et=[null];et.push.apply(et,Y);var it=Function.bind.apply(H,et),ut=new it;return j&&l(ut,j.prototype),ut},f.apply(null,arguments)}function c(I){return Function.toString.call(I).indexOf("[native code]")!==-1}function l(I,k){return l=Object.setPrototypeOf||function(O,H){return O.__proto__=H,O},l(I,k)}function m(I){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(B){return B.__proto__||Object.getPrototypeOf(B)},m(I)}function h(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(B){return typeof B}:h=function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},h(I)}var b=t(35840),u=b.inspect,o=t(86832),d=o.codes.ERR_INVALID_ARG_TYPE;function w(I,k,B){return(B===void 0||B>I.length)&&(B=I.length),I.substring(B-k.length,B)===k}function A(I,k){if(k=Math.floor(k),I.length==0||k==0)return"";var B=I.length*k;for(k=Math.floor(Math.log(k)/Math.log(2));k;)I+=I,k--;return I+=I.substring(0,B-I.length),I}var _="",y="",E="",T="",s={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},L=10;function M(I){var k=Object.keys(I),B=Object.create(Object.getPrototypeOf(I));return k.forEach(function(O){B[O]=I[O]}),Object.defineProperty(B,"message",{value:I.message}),B}function z(I){return u(I,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function D(I,k,B){var O="",H="",Y=0,j="",et=!1,it=z(I),ut=it.split(` +`))}throw ut}};function Y(){for(var j=arguments.length,et=new Array(j),it=0;it"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function f(I,k,B){return n()?f=Reflect.construct:f=function(H,Y,j){var et=[null];et.push.apply(et,Y);var it=Function.bind.apply(H,et),ut=new it;return j&&l(ut,j.prototype),ut},f.apply(null,arguments)}function c(I){return Function.toString.call(I).indexOf("[native code]")!==-1}function l(I,k){return l=Object.setPrototypeOf||function(O,H){return O.__proto__=H,O},l(I,k)}function m(I){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(B){return B.__proto__||Object.getPrototypeOf(B)},m(I)}function v(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?v=function(B){return typeof B}:v=function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},v(I)}var b=t(35840),u=b.inspect,o=t(86832),d=o.codes.ERR_INVALID_ARG_TYPE;function w(I,k,B){return(B===void 0||B>I.length)&&(B=I.length),I.substring(B-k.length,B)===k}function A(I,k){if(k=Math.floor(k),I.length==0||k==0)return"";var B=I.length*k;for(k=Math.floor(Math.log(k)/Math.log(2));k;)I+=I,k--;return I+=I.substring(0,B-I.length),I}var _="",y="",E="",T="",s={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},L=10;function M(I){var k=Object.keys(I),B=Object.create(Object.getPrototypeOf(I));return k.forEach(function(O){B[O]=I[O]}),Object.defineProperty(B,"message",{value:I.message}),B}function z(I){return u(I,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function D(I,k,B){var O="",H="",Y=0,j="",et=!1,it=z(I),ut=it.split(` `),J=z(k).split(` -`),X=0,tt="";if(B==="strictEqual"&&h(I)==="object"&&h(k)==="object"&&I!==null&&k!==null&&(B="strictEqualObject"),ut.length===1&&J.length===1&&ut[0]!==J[0]){var V=ut[0].length+J[0].length;if(V<=L){if((h(I)!=="object"||I===null)&&(h(k)!=="object"||k===null)&&(I!==0||k!==0))return"".concat(s[B],` +`),X=0,tt="";if(B==="strictEqual"&&v(I)==="object"&&v(k)==="object"&&I!==null&&k!==null&&(B="strictEqualObject"),ut.length===1&&J.length===1&&ut[0]!==J[0]){var V=ut[0].length+J[0].length;if(V<=L){if((v(I)!=="object"||I===null)&&(v(k)!=="object"||k===null)&&(I!==0||k!==0))return"".concat(s[B],` `)+"".concat(ut[0]," !== ").concat(J[0],` `)}else if(B!=="strictEqualObject"){var Q=g.stderr&&g.stderr.isTTY?g.stderr.columns:80;if(V2&&(tt=` @@ -6967,8 +6967,8 @@ uniform `+qe+" "+cr+" u_"+lr+`; `).concat(H,` `).concat(_,"...").concat(T).concat(O,` `)+"".concat(_,"...").concat(T)}return"".concat(ct).concat(et?gt:"",` -`).concat(H).concat(O).concat(j).concat(tt)}var N=function(I){e(k,I);function k(B){var O;if(S(this,k),h(B)!=="object"||B===null)throw new d("options","Object",B);var H=B.message,Y=B.operator,j=B.stackStartFn,et=B.actual,it=B.expected,ut=Error.stackTraceLimit;if(Error.stackTraceLimit=0,H!=null)O=p(this,m(k).call(this,String(H)));else if(g.stderr&&g.stderr.isTTY&&(g.stderr&&g.stderr.getColorDepth&&g.stderr.getColorDepth()!==1?(_="\x1B[34m",y="\x1B[32m",T="\x1B[39m",E="\x1B[31m"):(_="",y="",T="",E="")),h(et)==="object"&&et!==null&&h(it)==="object"&&it!==null&&"stack"in et&&et instanceof Error&&"stack"in it&&it instanceof Error&&(et=M(et),it=M(it)),Y==="deepStrictEqual"||Y==="strictEqual")O=p(this,m(k).call(this,D(et,it,Y)));else if(Y==="notDeepStrictEqual"||Y==="notStrictEqual"){var J=s[Y],X=z(et).split(` -`);if(Y==="notStrictEqual"&&h(et)==="object"&&et!==null&&(J=s.notStrictEqualObject),X.length>30)for(X[26]="".concat(_,"...").concat(T);X.length>27;)X.pop();X.length===1?O=p(this,m(k).call(this,"".concat(J," ").concat(X[0]))):O=p(this,m(k).call(this,"".concat(J,` +`).concat(H).concat(O).concat(j).concat(tt)}var N=function(I){e(k,I);function k(B){var O;if(S(this,k),v(B)!=="object"||B===null)throw new d("options","Object",B);var H=B.message,Y=B.operator,j=B.stackStartFn,et=B.actual,it=B.expected,ut=Error.stackTraceLimit;if(Error.stackTraceLimit=0,H!=null)O=p(this,m(k).call(this,String(H)));else if(g.stderr&&g.stderr.isTTY&&(g.stderr&&g.stderr.getColorDepth&&g.stderr.getColorDepth()!==1?(_="\x1B[34m",y="\x1B[32m",T="\x1B[39m",E="\x1B[31m"):(_="",y="",T="",E="")),v(et)==="object"&&et!==null&&v(it)==="object"&&it!==null&&"stack"in et&&et instanceof Error&&"stack"in it&&it instanceof Error&&(et=M(et),it=M(it)),Y==="deepStrictEqual"||Y==="strictEqual")O=p(this,m(k).call(this,D(et,it,Y)));else if(Y==="notDeepStrictEqual"||Y==="notStrictEqual"){var J=s[Y],X=z(et).split(` +`);if(Y==="notStrictEqual"&&v(et)==="object"&&et!==null&&(J=s.notStrictEqualObject),X.length>30)for(X[26]="".concat(_,"...").concat(T);X.length>27;)X.pop();X.length===1?O=p(this,m(k).call(this,"".concat(J," ").concat(X[0]))):O=p(this,m(k).call(this,"".concat(J,` `).concat(X.join(` `),` @@ -6980,12 +6980,12 @@ uniform `+qe+" "+cr+" u_"+lr+`; should equal -`):V=" ".concat(Y," ").concat(V)),O=p(this,m(k).call(this,"".concat(tt).concat(V)))}return Error.stackTraceLimit=ut,O.generatedMessage=!H,Object.defineProperty(r(O),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),O.code="ERR_ASSERTION",O.actual=et,O.expected=it,O.operator=Y,Error.captureStackTrace&&Error.captureStackTrace(r(O),j),O.stack,O.name="AssertionError",p(O)}return v(k,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:u.custom,value:function(O,H){return u(this,C({},H,{customInspect:!1,depth:0}))}}]),k}(a(Error));G.exports=N},86832:function(G,U,t){function g(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?g=function(u){return typeof u}:g=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},g(h)}function C(h,b){if(!(h instanceof b))throw new TypeError("Cannot call a class as a function")}function i(h,b){return b&&(g(b)==="object"||typeof b=="function")?b:S(h)}function S(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function x(h){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},x(h)}function v(h,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(b&&b.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),b&&p(h,b)}function p(h,b){return p=Object.setPrototypeOf||function(o,d){return o.__proto__=d,o},p(h,b)}var r={},e,a;function n(h,b,u){u||(u=Error);function o(w,A,_){return typeof b=="string"?b:b(w,A,_)}var d=function(w){v(A,w);function A(_,y,E){var T;return C(this,A),T=i(this,x(A).call(this,o(_,y,E))),T.code=h,T}return A}(u);r[h]=d}function f(h,b){if(Array.isArray(h)){var u=h.length;return h=h.map(function(o){return String(o)}),u>2?"one of ".concat(b," ").concat(h.slice(0,u-1).join(", "),", or ")+h[u-1]:u===2?"one of ".concat(b," ").concat(h[0]," or ").concat(h[1]):"of ".concat(b," ").concat(h[0])}else return"of ".concat(b," ").concat(String(h))}function c(h,b,u){return h.substr(!u||u<0?0:+u,b.length)===b}function l(h,b,u){return(u===void 0||u>h.length)&&(u=h.length),h.substring(u-b.length,u)===b}function m(h,b,u){return typeof u!="number"&&(u=0),u+b.length>h.length?!1:h.indexOf(b,u)!==-1}n("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),n("ERR_INVALID_ARG_TYPE",function(h,b,u){e===void 0&&(e=t(45408)),e(typeof h=="string","'name' must be a string");var o;typeof b=="string"&&c(b,"not ")?(o="must not be",b=b.replace(/^not /,"")):o="must be";var d;if(l(h," argument"))d="The ".concat(h," ").concat(o," ").concat(f(b,"type"));else{var w=m(h,".")?"property":"argument";d='The "'.concat(h,'" ').concat(w," ").concat(o," ").concat(f(b,"type"))}return d+=". Received type ".concat(g(u)),d},TypeError),n("ERR_INVALID_ARG_VALUE",function(h,b){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";a===void 0&&(a=t(35840));var o=a.inspect(b);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(h,"' ").concat(u,". Received ").concat(o)},TypeError),n("ERR_INVALID_RETURN_VALUE",function(h,b,u){var o;return u&&u.constructor&&u.constructor.name?o="instance of ".concat(u.constructor.name):o="type ".concat(g(u)),"Expected ".concat(h,' to be returned from the "').concat(b,'"')+" function but got ".concat(o,".")},TypeError),n("ERR_MISSING_ARGS",function(){for(var h=arguments.length,b=new Array(h),u=0;u0,"At least one arg needs to be specified");var o="The ",d=b.length;switch(b=b.map(function(w){return'"'.concat(w,'"')}),d){case 1:o+="".concat(b[0]," argument");break;case 2:o+="".concat(b[0]," and ").concat(b[1]," arguments");break;default:o+=b.slice(0,d-1).join(", "),o+=", and ".concat(b[d-1]," arguments");break}return"".concat(o," must be specified")},TypeError),G.exports.codes=r},25116:function(G,U,t){function g(At,mt){return S(At)||i(At,mt)||C()}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(At,mt){var Lt=[],Ht=!0,Ut=!1,kt=void 0;try{for(var Vt=At[Symbol.iterator](),It;!(Ht=(It=Vt.next()).done)&&(Lt.push(It.value),!(mt&&Lt.length===mt));Ht=!0);}catch(re){Ut=!0,kt=re}finally{try{!Ht&&Vt.return!=null&&Vt.return()}finally{if(Ut)throw kt}}return Lt}function S(At){if(Array.isArray(At))return At}function x(At){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(Lt){return typeof Lt}:x=function(Lt){return Lt&&typeof Symbol=="function"&&Lt.constructor===Symbol&&Lt!==Symbol.prototype?"symbol":typeof Lt},x(At)}var v=/a/g.flags!==void 0,p=function(mt){var Lt=[];return mt.forEach(function(Ht){return Lt.push(Ht)}),Lt},r=function(mt){var Lt=[];return mt.forEach(function(Ht,Ut){return Lt.push([Ut,Ht])}),Lt},e=Object.is?Object.is:t(39896),a=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},n=Number.isNaN?Number.isNaN:t(1560);function f(At){return At.call.bind(At)}var c=f(Object.prototype.hasOwnProperty),l=f(Object.prototype.propertyIsEnumerable),m=f(Object.prototype.toString),h=t(35840).types,b=h.isAnyArrayBuffer,u=h.isArrayBufferView,o=h.isDate,d=h.isMap,w=h.isRegExp,A=h.isSet,_=h.isNativeError,y=h.isBoxedPrimitive,E=h.isNumberObject,T=h.isStringObject,s=h.isBooleanObject,L=h.isBigIntObject,M=h.isSymbolObject,z=h.isFloat32Array,D=h.isFloat64Array;function N(At){if(At.length===0||At.length>10)return!0;for(var mt=0;mt57)return!0}return At.length===10&&At>=Math.pow(2,32)}function I(At){return Object.keys(At).filter(N).concat(a(At).filter(Object.prototype.propertyIsEnumerable.bind(At)))}/*! +`):V=" ".concat(Y," ").concat(V)),O=p(this,m(k).call(this,"".concat(tt).concat(V)))}return Error.stackTraceLimit=ut,O.generatedMessage=!H,Object.defineProperty(r(O),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),O.code="ERR_ASSERTION",O.actual=et,O.expected=it,O.operator=Y,Error.captureStackTrace&&Error.captureStackTrace(r(O),j),O.stack,O.name="AssertionError",p(O)}return h(k,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:u.custom,value:function(O,H){return u(this,C({},H,{customInspect:!1,depth:0}))}}]),k}(a(Error));G.exports=N},86832:function(G,U,t){function g(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?g=function(u){return typeof u}:g=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},g(v)}function C(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function i(v,b){return b&&(g(b)==="object"||typeof b=="function")?b:S(v)}function S(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function x(v){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},x(v)}function h(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),b&&p(v,b)}function p(v,b){return p=Object.setPrototypeOf||function(o,d){return o.__proto__=d,o},p(v,b)}var r={},e,a;function n(v,b,u){u||(u=Error);function o(w,A,_){return typeof b=="string"?b:b(w,A,_)}var d=function(w){h(A,w);function A(_,y,E){var T;return C(this,A),T=i(this,x(A).call(this,o(_,y,E))),T.code=v,T}return A}(u);r[v]=d}function f(v,b){if(Array.isArray(v)){var u=v.length;return v=v.map(function(o){return String(o)}),u>2?"one of ".concat(b," ").concat(v.slice(0,u-1).join(", "),", or ")+v[u-1]:u===2?"one of ".concat(b," ").concat(v[0]," or ").concat(v[1]):"of ".concat(b," ").concat(v[0])}else return"of ".concat(b," ").concat(String(v))}function c(v,b,u){return v.substr(!u||u<0?0:+u,b.length)===b}function l(v,b,u){return(u===void 0||u>v.length)&&(u=v.length),v.substring(u-b.length,u)===b}function m(v,b,u){return typeof u!="number"&&(u=0),u+b.length>v.length?!1:v.indexOf(b,u)!==-1}n("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),n("ERR_INVALID_ARG_TYPE",function(v,b,u){e===void 0&&(e=t(45408)),e(typeof v=="string","'name' must be a string");var o;typeof b=="string"&&c(b,"not ")?(o="must not be",b=b.replace(/^not /,"")):o="must be";var d;if(l(v," argument"))d="The ".concat(v," ").concat(o," ").concat(f(b,"type"));else{var w=m(v,".")?"property":"argument";d='The "'.concat(v,'" ').concat(w," ").concat(o," ").concat(f(b,"type"))}return d+=". Received type ".concat(g(u)),d},TypeError),n("ERR_INVALID_ARG_VALUE",function(v,b){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";a===void 0&&(a=t(35840));var o=a.inspect(b);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(v,"' ").concat(u,". Received ").concat(o)},TypeError),n("ERR_INVALID_RETURN_VALUE",function(v,b,u){var o;return u&&u.constructor&&u.constructor.name?o="instance of ".concat(u.constructor.name):o="type ".concat(g(u)),"Expected ".concat(v,' to be returned from the "').concat(b,'"')+" function but got ".concat(o,".")},TypeError),n("ERR_MISSING_ARGS",function(){for(var v=arguments.length,b=new Array(v),u=0;u0,"At least one arg needs to be specified");var o="The ",d=b.length;switch(b=b.map(function(w){return'"'.concat(w,'"')}),d){case 1:o+="".concat(b[0]," argument");break;case 2:o+="".concat(b[0]," and ").concat(b[1]," arguments");break;default:o+=b.slice(0,d-1).join(", "),o+=", and ".concat(b[d-1]," arguments");break}return"".concat(o," must be specified")},TypeError),G.exports.codes=r},25116:function(G,U,t){function g(At,mt){return S(At)||i(At,mt)||C()}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(At,mt){var Lt=[],Ht=!0,Ut=!1,kt=void 0;try{for(var Vt=At[Symbol.iterator](),It;!(Ht=(It=Vt.next()).done)&&(Lt.push(It.value),!(mt&&Lt.length===mt));Ht=!0);}catch(re){Ut=!0,kt=re}finally{try{!Ht&&Vt.return!=null&&Vt.return()}finally{if(Ut)throw kt}}return Lt}function S(At){if(Array.isArray(At))return At}function x(At){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(Lt){return typeof Lt}:x=function(Lt){return Lt&&typeof Symbol=="function"&&Lt.constructor===Symbol&&Lt!==Symbol.prototype?"symbol":typeof Lt},x(At)}var h=/a/g.flags!==void 0,p=function(mt){var Lt=[];return mt.forEach(function(Ht){return Lt.push(Ht)}),Lt},r=function(mt){var Lt=[];return mt.forEach(function(Ht,Ut){return Lt.push([Ut,Ht])}),Lt},e=Object.is?Object.is:t(39896),a=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},n=Number.isNaN?Number.isNaN:t(1560);function f(At){return At.call.bind(At)}var c=f(Object.prototype.hasOwnProperty),l=f(Object.prototype.propertyIsEnumerable),m=f(Object.prototype.toString),v=t(35840).types,b=v.isAnyArrayBuffer,u=v.isArrayBufferView,o=v.isDate,d=v.isMap,w=v.isRegExp,A=v.isSet,_=v.isNativeError,y=v.isBoxedPrimitive,E=v.isNumberObject,T=v.isStringObject,s=v.isBooleanObject,L=v.isBigIntObject,M=v.isSymbolObject,z=v.isFloat32Array,D=v.isFloat64Array;function N(At){if(At.length===0||At.length>10)return!0;for(var mt=0;mt57)return!0}return At.length===10&&At>=Math.pow(2,32)}function I(At){return Object.keys(At).filter(N).concat(a(At).filter(Object.prototype.propertyIsEnumerable.bind(At)))}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */function k(At,mt){if(At===mt)return 0;for(var Lt=At.length,Ht=mt.length,Ut=0,kt=Math.min(Lt,Ht);Ut"u"?[]:new Uint8Array(256),i=0;i>2],a+=g[(p[r]&3)<<4|p[r+1]>>4],a+=g[(p[r+1]&15)<<2|p[r+2]>>6],a+=g[p[r+2]&63];return e%3===2?a=a.substring(0,a.length-1)+"=":e%3===1&&(a=a.substring(0,a.length-2)+"=="),a},x=function(v){var p=v.length*.75,r=v.length,e,a=0,n,f,c,l;v[v.length-1]==="="&&(p--,v[v.length-2]==="="&&p--);var m=new ArrayBuffer(p),h=new Uint8Array(m);for(e=0;e>4,h[a++]=(f&15)<<4|c>>2,h[a++]=(c&3)<<6|l&63;return m}},59968:function(G,U){U.byteLength=p,U.toByteArray=e,U.fromByteArray=f;for(var t=[],g=[],C=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=0,x=i.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var m=c.indexOf("=");m===-1&&(m=l);var h=m===l?0:4-m%4;return[m,h]}function p(c){var l=v(c),m=l[0],h=l[1];return(m+h)*3/4-h}function r(c,l,m){return(l+m)*3/4-m}function e(c){var l,m=v(c),h=m[0],b=m[1],u=new C(r(c,h,b)),o=0,d=b>0?h-4:h,w;for(w=0;w>16&255,u[o++]=l>>8&255,u[o++]=l&255;return b===2&&(l=g[c.charCodeAt(w)]<<2|g[c.charCodeAt(w+1)]>>4,u[o++]=l&255),b===1&&(l=g[c.charCodeAt(w)]<<10|g[c.charCodeAt(w+1)]<<4|g[c.charCodeAt(w+2)]>>2,u[o++]=l>>8&255,u[o++]=l&255),u}function a(c){return t[c>>18&63]+t[c>>12&63]+t[c>>6&63]+t[c&63]}function n(c,l,m){for(var h,b=[],u=l;ud?d:o+u));return h===1?(l=c[m-1],b.push(t[l>>2]+t[l<<4&63]+"==")):h===2&&(l=(c[m-2]<<8)+c[m-1],b.push(t[l>>10]+t[l>>4&63]+t[l<<2&63]+"=")),b.join("")}},64928:function(G){function U(x,v,p,r,e){for(var a=e+1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c>=0?(a=n,e=n-1):r=n+1}return a}function t(x,v,p,r,e){for(var a=e+1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c>0?(a=n,e=n-1):r=n+1}return a}function g(x,v,p,r,e){for(var a=r-1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c<0?(a=n,r=n+1):e=n-1}return a}function C(x,v,p,r,e){for(var a=r-1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c<=0?(a=n,r=n+1):e=n-1}return a}function i(x,v,p,r,e){for(;r<=e;){var a=r+e>>>1,n=x[a],f=p!==void 0?p(n,v):n-v;if(f===0)return a;f<=0?r=a+1:e=a-1}return-1}function S(x,v,p,r,e,a){return typeof p=="function"?a(x,v,p,r===void 0?0:r|0,e===void 0?x.length-1:e|0):a(x,v,void 0,p===void 0?0:p|0,r===void 0?x.length-1:r|0)}G.exports={ge:function(x,v,p,r,e){return S(x,v,p,r,e,U)},gt:function(x,v,p,r,e){return S(x,v,p,r,e,t)},lt:function(x,v,p,r,e){return S(x,v,p,r,e,g)},le:function(x,v,p,r,e){return S(x,v,p,r,e,C)},eq:function(x,v,p,r,e){return S(x,v,p,r,e,i)}}},308:function(G,U){"use restrict";var t=32;U.INT_BITS=t,U.INT_MAX=2147483647,U.INT_MIN=-1<0)-(i<0)},U.abs=function(i){var S=i>>t-1;return(i^S)-S},U.min=function(i,S){return S^(i^S)&-(i65535)<<4,i>>>=S,x=(i>255)<<3,i>>>=x,S|=x,x=(i>15)<<2,i>>>=x,S|=x,x=(i>3)<<1,i>>>=x,S|=x,S|i>>1},U.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},U.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function g(i){var S=32;return i&=-i,i&&S--,i&65535&&(S-=16),i&16711935&&(S-=8),i&252645135&&(S-=4),i&858993459&&(S-=2),i&1431655765&&(S-=1),S}U.countTrailingZeros=g,U.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},U.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},U.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var C=new Array(256);(function(i){for(var S=0;S<256;++S){var x=S,v=S,p=7;for(x>>>=1;x;x>>>=1)v<<=1,v|=x&1,--p;i[S]=v<>>8&255]<<16|C[i>>>16&255]<<8|C[i>>>24&255]},U.interleave2=function(i,S){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,i|S<<1},U.deinterleave2=function(i,S){return i=i>>>S&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},U.interleave3=function(i,S,x){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,i|=S<<1,x&=1023,x=(x|x<<16)&4278190335,x=(x|x<<8)&251719695,x=(x|x<<4)&3272356035,x=(x|x<<2)&1227133513,i|x<<2},U.deinterleave3=function(i,S){return i=i>>>S&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},U.nextCombination=function(i){var S=i|i-1;return S+1|(~S&-~S)-1>>>g(i)+1}},29620:function(G,U,t){var g=t(32420);G.exports=i;var C=1e20;function i(v,p){p||(p={});var r=p.cutoff==null?.25:p.cutoff,e=p.radius==null?8:p.radius,a=p.channel||0,n,f,c,l,m,h,b,u,o,d,w;if(ArrayBuffer.isView(v)||Array.isArray(v)){if(!p.width||!p.height)throw Error("For raw data width and height should be provided by options");n=p.width,f=p.height,l=v,p.stride?h=p.stride:h=Math.floor(v.length/n/f)}else window.HTMLCanvasElement&&v instanceof window.HTMLCanvasElement?(u=v,b=u.getContext("2d"),n=u.width,f=u.height,o=b.getImageData(0,0,n,f),l=o.data,h=4):window.CanvasRenderingContext2D&&v instanceof window.CanvasRenderingContext2D?(u=v.canvas,b=v,n=u.width,f=u.height,o=b.getImageData(0,0,n,f),l=o.data,h=4):window.ImageData&&v instanceof window.ImageData&&(o=v,n=v.width,f=v.height,l=o.data,h=4);if(c=Math.max(n,f),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(m=l,l=Array(n*f),d=0,w=m.length;d-1?C(p):p}},57916:function(G,U,t){var g=t(8844),C=t(53664),i=t(14500),S=C("%TypeError%"),x=C("%Function.prototype.apply%"),v=C("%Function.prototype.call%"),p=C("%Reflect.apply%",!0)||g.call(v,x),r=C("%Object.defineProperty%",!0),e=C("%Math.max%");if(r)try{r({},"a",{value:1})}catch{r=null}G.exports=function(f){if(typeof f!="function")throw new S("a function is required");var c=p(g,v,arguments);return i(c,1+e(0,f.length-(arguments.length-1)),!0)};var a=function(){return p(g,x,arguments)};r?r(G.exports,"apply",{value:a}):G.exports.apply=a},32420:function(G){G.exports=U;function U(t,g,C){return gC?C:t:tg?g:t}},3808:function(G,U,t){var g=t(32420);G.exports=C,G.exports.to=C,G.exports.from=i;function C(S,x){x==null&&(x=!0);var v=S[0],p=S[1],r=S[2],e=S[3];e==null&&(e=x?1:255),x&&(v*=255,p*=255,r*=255,e*=255),v=g(v,0,255)&255,p=g(p,0,255)&255,r=g(r,0,255)&255,e=g(e,0,255)&255;var a=v*16777216+(p<<16)+(r<<8)+e;return a}function i(S,x){S=+S;var v=S>>>24,p=(S&16711680)>>>16,r=(S&65280)>>>8,e=S&255;return x===!1?[v,p,r,e]:[v/255,p/255,r/255,e/255]}},17592:function(G){G.exports={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]}},72160:function(G,U,t){var g=t(96824),C=t(32420),i=t(72512);G.exports=function(v,p){(p==="float"||!p)&&(p="array"),p==="uint"&&(p="uint8"),p==="uint_clamped"&&(p="uint8_clamped");var r=i(p),e=new r(4),a=p!=="uint8"&&p!=="uint8_clamped";return(!v.length||typeof v=="string")&&(v=g(v),v[0]/=255,v[1]/=255,v[2]/=255),S(v)?(e[0]=v[0],e[1]=v[1],e[2]=v[2],e[3]=v[3]!=null?v[3]:255,a&&(e[0]/=255,e[1]/=255,e[2]/=255,e[3]/=255),e):(a?(e[0]=v[0],e[1]=v[1],e[2]=v[2],e[3]=v[3]!=null?v[3]:1):(e[0]=C(Math.floor(v[0]*255),0,255),e[1]=C(Math.floor(v[1]*255),0,255),e[2]=C(Math.floor(v[2]*255),0,255),e[3]=v[3]==null?255:C(Math.floor(v[3]*255),0,255)),e)};function S(x){return!!(x instanceof Uint8Array||x instanceof Uint8ClampedArray||Array.isArray(x)&&(x[0]>1||x[0]===0)&&(x[1]>1||x[1]===0)&&(x[2]>1||x[2]===0)&&(!x[3]||x[3]>1))}},96824:function(G,U,t){var g=t(95532),C=t(53576),i=t(32420);G.exports=function(x){var v,p=g(x);return p.space?(v=Array(3),v[0]=i(p.values[0],0,255),v[1]=i(p.values[1],0,255),v[2]=i(p.values[2],0,255),p.space[0]==="h"&&(v=C.rgb(v)),v.push(i(p.alpha,0,1)),v):[]}},95532:function(G,U,t){var g=t(17592);G.exports=i;var C={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function i(S){var x,v=[],p=1,r;if(typeof S=="string")if(S=S.toLowerCase(),g[S])v=g[S].slice(),r="rgb";else if(S==="transparent")p=0,r="rgb",v=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var e=S.slice(1),a=e.length,n=a<=4;p=1,n?(v=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],a===4&&(p=parseInt(e[3]+e[3],16)/255)):(v=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],a===8&&(p=parseInt(e[6]+e[7],16)/255)),v[0]||(v[0]=0),v[1]||(v[1]=0),v[2]||(v[2]=0),r="rgb"}else if(x=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var f=x[1],c=f==="rgb",e=f.replace(/a$/,"");r=e;var a=e==="cmyk"?4:e==="gray"?1:3;v=x[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,b){if(/%$/.test(h))return b===a?parseFloat(h)/100:e==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(e[b]==="h"){if(/deg$/.test(h))return parseFloat(h);if(C[h]!==void 0)return C[h]}return parseFloat(h)}),f===e&&v.push(1),p=c||v[a]===void 0?1:v[a],v=v.slice(0,a)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(v=S.match(/([0-9]+)/g).map(function(l){return parseFloat(l)}),r=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(v=[S[0],S[1],S[2]],r="rgb",p=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(r="rgb",v=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(r="hsl",v=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),p=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(p/=100)):(r="rgb",v=[S>>>16,(S&65280)>>>8,S&255]);return{space:r,values:v,alpha:p}}},53576:function(G,U,t){var g=t(19336);G.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(C){var i=C[0]/360,S=C[1]/100,x=C[2]/100,v,p,r,e,a;if(S===0)return a=x*255,[a,a,a];x<.5?p=x*(1+S):p=x+S-x*S,v=2*x-p,e=[0,0,0];for(var n=0;n<3;n++)r=i+.3333333333333333*-(n-1),r<0?r++:r>1&&r--,6*r<1?a=v+(p-v)*6*r:2*r<1?a=p:3*r<2?a=v+(p-v)*(.6666666666666666-r)*6:a=v,e[n]=a*255;return e}},g.hsl=function(C){var i=C[0]/255,S=C[1]/255,x=C[2]/255,v=Math.min(i,S,x),p=Math.max(i,S,x),r=p-v,e,a,n;return p===v?e=0:i===p?e=(S-x)/r:S===p?e=2+(x-i)/r:x===p&&(e=4+(i-S)/r),e=Math.min(e*60,360),e<0&&(e+=360),n=(v+p)/2,p===v?a=0:n<=.5?a=r/(p+v):a=r/(2-p-v),[e,a*100,n*100]}},19336:function(G){G.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116:function(G){G.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},42771:function(G,U,t){G.exports={parse:t(46416),stringify:t(49395)}},8744:function(G,U,t){var g=t(30584);G.exports={isSize:function(i){return/^[\d\.]/.test(i)||i.indexOf("/")!==-1||g.indexOf(i)!==-1}}},46416:function(G,U,t){var g=t(92384),C=t(68194),i=t(3748),S=t(2904),x=t(47916),v=t(7294),p=t(39956),r=t(8744).isSize;G.exports=a;var e=a.cache={};function a(f){if(typeof f!="string")throw new Error("Font argument must be a string.");if(e[f])return e[f];if(f==="")throw new Error("Cannot parse an empty string.");if(i.indexOf(f)!==-1)return e[f]={system:f};for(var c={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},l=p(f,/\s+/),m;m=l.shift();){if(C.indexOf(m)!==-1)return["style","variant","weight","stretch"].forEach(function(b){c[b]=m}),e[f]=c;if(x.indexOf(m)!==-1){c.style=m;continue}if(m==="normal"||m==="small-caps"){c.variant=m;continue}if(v.indexOf(m)!==-1){c.stretch=m;continue}if(S.indexOf(m)!==-1){c.weight=m;continue}if(r(m)){var h=p(m,"/");if(c.size=h[0],h[1]!=null?c.lineHeight=n(h[1]):l[0]==="/"&&(l.shift(),c.lineHeight=n(l.shift())),!l.length)throw new Error("Missing required font-family.");return c.family=p(l.join(" "),/\s*,\s*/).map(g),e[f]=c}throw new Error("Unknown or unsupported font token: "+m)}throw new Error("Missing required font-size.")}function n(f){var c=parseFloat(f);return c.toString()===f?c:f}},49395:function(G,U,t){var g=t(55616),C=t(8744).isSize,i=f(t(68194)),S=f(t(3748)),x=f(t(2904)),v=f(t(47916)),p=f(t(7294)),r={normal:1,"small-caps":1},e={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},a={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};G.exports=function(l){if(l=g(l,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),l.system)return l.system&&n(l.system,S),l.system;if(n(l.style,v),n(l.variant,r),n(l.weight,x),n(l.stretch,p),l.size==null&&(l.size=a.size),typeof l.size=="number"&&(l.size+="px"),!C)throw Error("Bad size value `"+l.size+"`");l.family||(l.family=a.family),Array.isArray(l.family)&&(l.family.length||(l.family=[a.family]),l.family=l.family.map(function(h){return e[h]?h:'"'+h+'"'}).join(", "));var m=[];return m.push(l.style),l.variant!==l.style&&m.push(l.variant),l.weight!==l.variant&&l.weight!==l.style&&m.push(l.weight),l.stretch!==l.weight&&l.stretch!==l.variant&&l.stretch!==l.style&&m.push(l.stretch),m.push(l.size+(l.lineHeight==null||l.lineHeight==="normal"||l.lineHeight+""=="1"?"":"/"+l.lineHeight)),m.push(l.family),m.filter(Boolean).join(" ")};function n(c,l){if(c&&!l[c]&&!i[c])throw Error("Unknown keyword `"+c+"`");return c}function f(c){for(var l={},m=0;mf?1:n>=f?0:NaN}function C(n){return n.length===1&&(n=i(n)),{left:function(f,c,l,m){for(l==null&&(l=0),m==null&&(m=f.length);l>>1;n(f[h],c)<0?l=h+1:m=h}return l},right:function(f,c,l,m){for(l==null&&(l=0),m==null&&(m=f.length);l>>1;n(f[h],c)>0?m=h:l=h+1}return l}}}function i(n){return function(f,c){return g(n(f),c)}}C(g);function S(n,f){var c=n.length,l=-1,m,h;if(f==null){for(;++l=m)for(h=m;++lh&&(h=m)}else for(;++l=m)for(h=m;++lh&&(h=m);return h}function x(n){return n===null?NaN:+n}function v(n,f){var c=n.length,l=c,m=-1,h,b=0;if(f==null)for(;++m=0;)for(b=n[f],c=b.length;--c>=0;)h[--m]=b[c];return h}function r(n,f){var c=n.length,l=-1,m,h;if(f==null){for(;++l=m)for(h=m;++lm&&(h=m)}else for(;++l=m)for(h=m;++lm&&(h=m);return h}function e(n,f,c){n=+n,f=+f,c=(m=arguments.length)<2?(f=n,n=0,1):m<3?1:+c;for(var l=-1,m=Math.max(0,Math.ceil((f-n)/c))|0,h=new Array(m);++l=f.length)return l!=null&&o.sort(l),m!=null?m(o):o;for(var _=-1,y=o.length,E=f[d++],T,s,L=S(),M,z=w();++_f.length)return o;var w,A=c[d-1];return m!=null&&d>=f.length?w=o.entries():(w=[],o.each(function(_,y){w.push({key:y,values:u(_,d)})})),A!=null?w.sort(function(_,y){return A(_.key,y.key)}):w}return h={object:function(o){return b(o,0,v,p)},map:function(o){return b(o,0,r,e)},entries:function(o){return u(b(o,0,r,e),0)},key:function(o){return f.push(o),h},sortKeys:function(o){return c[f.length-1]=o,h},sortValues:function(o){return l=o,h},rollup:function(o){return m=o,h}}}function v(){return{}}function p(f,c,l){f[c]=l}function r(){return S()}function e(f,c,l){f.set(c,l)}function a(){}var n=S.prototype;a.prototype={constructor:a,has:n.has,add:function(f){return f+="",this[g+f]=f,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49812:function(G,U,t){t.r(U),t.d(U,{forceCenter:function(){return g},forceCollide:function(){return L},forceLink:function(){return N},forceManyBody:function(){return Vt},forceRadial:function(){return It},forceSimulation:function(){return kt},forceX:function(){return re},forceY:function(){return Kt}});function g($t,le){var he;$t==null&&($t=0),le==null&&(le=0);function de(){var xe,Se=he.length,ne,zt=0,Xt=0;for(xe=0;xe=(Ft=(zt+Jt)/2))?zt=Ft:Jt=Ft,(Nt=he>=(xt=(Xt+Wt)/2))?Xt=xt:Wt=xt,xe=Se,!(Se=Se[jt=Nt<<1|Mt]))return xe[jt]=ne,$t;if(yt=+$t._x.call(null,Se.data),Et=+$t._y.call(null,Se.data),le===yt&&he===Et)return ne.next=Se,xe?xe[jt]=ne:$t._root=ne,$t;do xe=xe?xe[jt]=new Array(4):$t._root=new Array(4),(Mt=le>=(Ft=(zt+Jt)/2))?zt=Ft:Jt=Ft,(Nt=he>=(xt=(Xt+Wt)/2))?Xt=xt:Wt=xt;while((jt=Nt<<1|Mt)===(ie=(Et>=xt)<<1|yt>=Ft));return xe[ie]=Se,xe[jt]=ne,$t}function v($t){var le,he,de=$t.length,xe,Se,ne=new Array(de),zt=new Array(de),Xt=1/0,Jt=1/0,Wt=-1/0,Ft=-1/0;for(he=0;heWt&&(Wt=xe),SeFt&&(Ft=Se));if(Xt>Wt||Jt>Ft)return this;for(this.cover(Xt,Jt).cover(Wt,Ft),he=0;he$t||$t>=xe||de>le||le>=Se;)switch(Jt=(leWt||(zt=Et.y0)>Ft||(Xt=Et.x1)=jt)<<1|$t>=Nt)&&(Et=xt[xt.length-1],xt[xt.length-1]=xt[xt.length-1-Mt],xt[xt.length-1-Mt]=Et)}else{var ie=$t-+this._x.call(null,yt.data),me=le-+this._y.call(null,yt.data),be=ie*ie+me*me;if(be=(xt=(ne+Xt)/2))?ne=xt:Xt=xt,(Mt=Ft>=(yt=(zt+Jt)/2))?zt=yt:Jt=yt,le=he,!(he=he[Nt=Mt<<1|Et]))return this;if(!he.length)break;(le[Nt+1&3]||le[Nt+2&3]||le[Nt+3&3])&&(de=le,jt=Nt)}for(;he.data!==$t;)if(xe=he,!(he=he.next))return this;return(Se=he.next)&&delete he.next,xe?(Se?xe.next=Se:delete xe.next,this):le?(Se?le[Nt]=Se:delete le[Nt],(he=le[0]||le[1]||le[2]||le[3])&&he===(le[3]||le[2]||le[1]||le[0])&&!he.length&&(de?de[jt]=he:this._root=he),this):(this._root=Se,this)}function c($t){for(var le=0,he=$t.length;leFt.index){var ir=xt-ce.x-ce.vx,pe=yt-ce.y-ce.vy,Xe=ir*ir+pe*pe;Xext+Be||veyt+Be||LeXt.r&&(Xt.r=Xt[Jt].r)}function zt(){if(le){var Xt,Jt=le.length,Wt;for(he=new Array(Jt),Xt=0;Xt=0&&(de=he.slice(xe+1),he=he.slice(0,xe)),he&&!le.hasOwnProperty(he))throw new Error("unknown type: "+he);return{type:he,name:de}})}B.prototype=k.prototype={constructor:B,on:function($t,le){var he=this._,de=O($t+"",he),xe,Se=-1,ne=de.length;if(arguments.length<2){for(;++Se0)for(var he=new Array(xe),de=0,xe,Se;de=0&&$t._call.call(null,le),$t=$t._next;--et}function wt(){Q=(V=$.now())+ot,et=it=0;try{Tt()}finally{et=0,bt(),Q=0}}function Rt(){var $t=$.now(),le=$t-V;le>J&&(ot-=le,V=$t)}function bt(){for(var $t,le=X,he,de=1/0;le;)le._call?(de>le._time&&(de=le._time),$t=le,le=le._next):(he=le._next,le._next=null,le=$t?$t._next=he:X=he);tt=$t,At(de)}function At($t){if(!et){it&&(it=clearTimeout(it));var le=$t-Q;le>24?($t<1/0&&(it=setTimeout(wt,$t-$.now()-ot)),ut&&(ut=clearInterval(ut))):(ut||(V=$.now(),ut=setInterval(Rt,J)),et=1,Z(wt))}}function mt($t){return $t.x}function Lt($t){return $t.y}var Ht=10,Ut=Math.PI*(3-Math.sqrt(5));function kt($t){var le,he=1,de=.001,xe=1-Math.pow(de,1/300),Se=0,ne=.6,zt=(0,M.kH)(),Xt=gt(Wt),Jt=j("tick","end");$t==null&&($t=[]);function Wt(){Ft(),Jt.call("tick",le),he1?(Mt==null?zt.remove(Et):zt.set(Et,yt(Mt)),le):zt.get(Et)},find:function(Et,Mt,Nt){var jt=0,ie=$t.length,me,be,ve,Le,ce;for(Nt==null?Nt=1/0:Nt*=Nt,jt=0;jt1?(Jt.on(Et,Mt),le):Jt.on(Et)}}}function Vt(){var $t,le,he,de=C(-30),xe,Se=1,ne=1/0,zt=.81;function Xt(xt){var yt,Et=$t.length,Mt=A($t,mt,Lt).visitAfter(Wt);for(he=xt,yt=0;yt=ne)return;(xt.data!==le||xt.next)&&(Nt===0&&(Nt=i(),me+=Nt*Nt),jt===0&&(jt=i(),me+=jt*jt),me=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function C(w,A){if((_=(w=A?w.toExponential(A-1):w.toExponential()).indexOf("e"))<0)return null;var _,y=w.slice(0,_);return[y.length>1?y[0]+y.slice(2):y,+w.slice(_+1)]}function i(w){return w=C(Math.abs(w)),w?w[1]:NaN}function S(w,A){return function(_,y){for(var E=_.length,T=[],s=0,L=w[0],M=0;E>0&&L>0&&(M+L+1>y&&(L=Math.max(1,y-M)),T.push(_.substring(E-=L,E+L)),!((M+=L+1)>y));)L=w[s=(s+1)%w.length];return T.reverse().join(A)}}function x(w){return function(A){return A.replace(/[0-9]/g,function(_){return w[+_]})}}var v=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function p(w){if(!(A=v.exec(w)))throw new Error("invalid format: "+w);var A;return new r({fill:A[1],align:A[2],sign:A[3],symbol:A[4],zero:A[5],width:A[6],comma:A[7],precision:A[8]&&A[8].slice(1),trim:A[9],type:A[10]})}p.prototype=r.prototype;function r(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function e(w){t:for(var A=w.length,_=1,y=-1,E;_0&&(y=0);break}return y>0?w.slice(0,y)+w.slice(E+1):w}var a;function n(w,A){var _=C(w,A);if(!_)return w+"";var y=_[0],E=_[1],T=E-(a=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,s=y.length;return T===s?y:T>s?y+new Array(T-s+1).join("0"):T>0?y.slice(0,T)+"."+y.slice(T):"0."+new Array(1-T).join("0")+C(w,Math.max(0,A+T-1))[0]}function f(w,A){var _=C(w,A);if(!_)return w+"";var y=_[0],E=_[1];return E<0?"0."+new Array(-E).join("0")+y:y.length>E+1?y.slice(0,E+1)+"."+y.slice(E+1):y+new Array(E-y.length+2).join("0")}var c={"%":function(w,A){return(w*100).toFixed(A)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:g,e:function(w,A){return w.toExponential(A)},f:function(w,A){return w.toFixed(A)},g:function(w,A){return w.toPrecision(A)},o:function(w){return Math.round(w).toString(8)},p:function(w,A){return f(w*100,A)},r:f,s:n,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function l(w){return w}var m=Array.prototype.map,h=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function b(w){var A=w.grouping===void 0||w.thousands===void 0?l:S(m.call(w.grouping,Number),w.thousands+""),_=w.currency===void 0?"":w.currency[0]+"",y=w.currency===void 0?"":w.currency[1]+"",E=w.decimal===void 0?".":w.decimal+"",T=w.numerals===void 0?l:x(m.call(w.numerals,String)),s=w.percent===void 0?"%":w.percent+"",L=w.minus===void 0?"-":w.minus+"",M=w.nan===void 0?"NaN":w.nan+"";function z(N){N=p(N);var I=N.fill,k=N.align,B=N.sign,O=N.symbol,H=N.zero,Y=N.width,j=N.comma,et=N.precision,it=N.trim,ut=N.type;ut==="n"?(j=!0,ut="g"):c[ut]||(et===void 0&&(et=12),it=!0,ut="g"),(H||I==="0"&&k==="=")&&(H=!0,I="0",k="=");var J=O==="$"?_:O==="#"&&/[boxX]/.test(ut)?"0"+ut.toLowerCase():"",X=O==="$"?y:/[%p]/.test(ut)?s:"",tt=c[ut],V=/[defgprs%]/.test(ut);et=et===void 0?6:/[gprs]/.test(ut)?Math.max(1,Math.min(21,et)):Math.max(0,Math.min(20,et));function Q(ot){var $=J,Z=X,st,nt,ct;if(ut==="c")Z=tt(ot)+Z,ot="";else{ot=+ot;var gt=ot<0||1/ot<0;if(ot=isNaN(ot)?M:tt(Math.abs(ot),et),it&&(ot=e(ot)),gt&&+ot==0&&B!=="+"&&(gt=!1),$=(gt?B==="("?B:L:B==="-"||B==="("?"":B)+$,Z=(ut==="s"?h[8+a/3]:"")+Z+(gt&&B==="("?")":""),V){for(st=-1,nt=ot.length;++stct||ct>57){Z=(ct===46?E+ot.slice(st+1):ot.slice(st))+Z,ot=ot.slice(0,st);break}}}j&&!H&&(ot=A(ot,1/0));var Tt=$.length+ot.length+Z.length,wt=Tt>1)+$+ot+Z+wt.slice(Tt);break;default:ot=wt+$+ot+Z;break}return T(ot)}return Q.toString=function(){return N+""},Q}function D(N,I){var k=z((N=p(N),N.type="f",N)),B=Math.max(-8,Math.min(8,Math.floor(i(I)/3)))*3,O=Math.pow(10,-B),H=h[8+B/3];return function(Y){return k(O*Y)+H}}return{format:z,formatPrefix:D}}var u,o;d({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function d(w){return u=b(w),o=u.format,u.formatPrefix,u}},87108:function(G,U,t){t.r(U),t.d(U,{geoAiry:function(){return H},geoAiryRaw:function(){return O},geoAitoff:function(){return j},geoAitoffRaw:function(){return Y},geoArmadillo:function(){return it},geoArmadilloRaw:function(){return et},geoAugust:function(){return J},geoAugustRaw:function(){return ut},geoBaker:function(){return Q},geoBakerRaw:function(){return V},geoBerghaus:function(){return Z},geoBerghausRaw:function(){return $},geoBertin1953:function(){return bt},geoBertin1953Raw:function(){return Rt},geoBoggs:function(){return It},geoBoggsRaw:function(){return Vt},geoBonne:function(){return he},geoBonneRaw:function(){return le},geoBottomley:function(){return xe},geoBottomleyRaw:function(){return de},geoBromley:function(){return ne},geoBromleyRaw:function(){return Se},geoChamberlin:function(){return Mt},geoChamberlinAfrica:function(){return Et},geoChamberlinRaw:function(){return xt},geoCollignon:function(){return jt},geoCollignonRaw:function(){return Nt},geoCraig:function(){return me},geoCraigRaw:function(){return ie},geoCraster:function(){return Le},geoCrasterRaw:function(){return ve},geoCylindricalEqualArea:function(){return Te},geoCylindricalEqualAreaRaw:function(){return ce},geoCylindricalStereographic:function(){return ir},geoCylindricalStereographicRaw:function(){return Be},geoEckert1:function(){return Xe},geoEckert1Raw:function(){return pe},geoEckert2:function(){return or},geoEckert2Raw:function(){return Ke},geoEckert3:function(){return ge},geoEckert3Raw:function(){return $e},geoEckert4:function(){return Ae},geoEckert4Raw:function(){return se},geoEckert5:function(){return Ie},geoEckert5Raw:function(){return Ce},geoEckert6:function(){return ke},geoEckert6Raw:function(){return Pe},geoEisenlohr:function(){return ur},geoEisenlohrRaw:function(){return Je},geoFahey:function(){return Yt},geoFaheyRaw:function(){return vr},geoFoucaut:function(){return Ne},geoFoucautRaw:function(){return Gt},geoFoucautSinusoidal:function(){return Qe},geoFoucautSinusoidalRaw:function(){return Oe},geoGilbert:function(){return dr},geoGingery:function(){return Gr},geoGingeryRaw:function(){return mr},geoGinzburg4:function(){return cn},geoGinzburg4Raw:function(){return Dr},geoGinzburg5:function(){return Cn},geoGinzburg5Raw:function(){return rn},geoGinzburg6:function(){return Tr},geoGinzburg6Raw:function(){return En},geoGinzburg8:function(){return Wr},geoGinzburg8Raw:function(){return Cr},geoGinzburg9:function(){return an},geoGinzburg9Raw:function(){return Ur},geoGringorten:function(){return ni},geoGringortenQuincuncial:function(){return Dc},geoGringortenRaw:function(){return gn},geoGuyou:function(){return dn},geoGuyouRaw:function(){return wr},geoHammer:function(){return gt},geoHammerRaw:function(){return nt},geoHammerRetroazimuthal:function(){return Bn},geoHammerRetroazimuthalRaw:function(){return Tn},geoHealpix:function(){return sn},geoHealpixRaw:function(){return Ar},geoHill:function(){return Zr},geoHillRaw:function(){return Er},geoHomolosine:function(){return Un},geoHomolosineRaw:function(){return Pn},geoHufnagel:function(){return mi},geoHufnagelRaw:function(){return On},geoHyperelliptical:function(){return pa},geoHyperellipticalRaw:function(){return Ci},geoInterrupt:function(){return Qa},geoInterruptedBoggs:function(){return Bu},geoInterruptedHomolosine:function(){return $i},geoInterruptedMollweide:function(){return Uu},geoInterruptedMollweideHemispheres:function(){return ho},geoInterruptedQuarticAuthalic:function(){return Ls},geoInterruptedSinuMollweide:function(){return vu},geoInterruptedSinusoidal:function(){return ul},geoKavrayskiy7:function(){return Ua},geoKavrayskiy7Raw:function(){return za},geoLagrange:function(){return $a},geoLagrangeRaw:function(){return fl},geoLarrivee:function(){return Tf},geoLarriveeRaw:function(){return _o},geoLaskowski:function(){return yc},geoLaskowskiRaw:function(){return bo},geoLittrow:function(){return Za},geoLittrowRaw:function(){return ts},geoLoximuthal:function(){return Cs},geoLoximuthalRaw:function(){return Hu},geoMiller:function(){return Vu},geoMillerRaw:function(){return es},geoModifiedStereographic:function(){return Xs},geoModifiedStereographicAlaska:function(){return Gu},geoModifiedStereographicGs48:function(){return Ac},geoModifiedStereographicGs50:function(){return Mc},geoModifiedStereographicLee:function(){return Sf},geoModifiedStereographicMiller:function(){return Mf},geoModifiedStereographicRaw:function(){return Af},geoMollweide:function(){return Ht},geoMollweideRaw:function(){return Lt},geoMtFlatPolarParabolic:function(){return Ef},geoMtFlatPolarParabolicRaw:function(){return kl},geoMtFlatPolarQuartic:function(){return Sc},geoMtFlatPolarQuarticRaw:function(){return vs},geoMtFlatPolarSinusoidal:function(){return _f},geoMtFlatPolarSinusoidalRaw:function(){return pu},geoNaturalEarth:function(){return Cf.c},geoNaturalEarth2:function(){return Uo},geoNaturalEarth2Raw:function(){return gu},geoNaturalEarthRaw:function(){return Cf.g},geoNellHammer:function(){return Zs},geoNellHammerRaw:function(){return hl},geoNicolosi:function(){return Wu},geoNicolosiRaw:function(){return rs},geoPatterson:function(){return ml},geoPattersonRaw:function(){return yu},geoPeirceQuincuncial:function(){return Ff},geoPierceQuincuncial:function(){return Ff},geoPolyconic:function(){return _c},geoPolyconicRaw:function(){return xu},geoPolyhedral:function(){return ga},geoPolyhedralButterfly:function(){return Bl},geoPolyhedralCollignon:function(){return Ks},geoPolyhedralWaterman:function(){return Rs},geoProject:function(){return Pc},geoQuantize:function(){return zf},geoQuincuncial:function(){return gs},geoRectangularPolyconic:function(){return kf},geoRectangularPolyconicRaw:function(){return Qu},geoRobinson:function(){return Ds},geoRobinsonRaw:function(){return Xo},geoSatellite:function(){return Js},geoSatelliteRaw:function(){return Au},geoSinuMollweide:function(){return Ln},geoSinuMollweideRaw:function(){return wn},geoSinusoidal:function(){return $t},geoSinusoidalRaw:function(){return Kt},geoStitch:function(){return Xl},geoTimes:function(){return Ha},geoTimesRaw:function(){return zs},geoTwoPointAzimuthal:function(){return Eu},geoTwoPointAzimuthalRaw:function(){return qu},geoTwoPointAzimuthalUsa:function(){return $s},geoTwoPointEquidistant:function(){return Bf},geoTwoPointEquidistantRaw:function(){return Zl},geoTwoPointEquidistantUsa:function(){return Ic},geoVanDerGrinten:function(){return jl},geoVanDerGrinten2:function(){return Uf},geoVanDerGrinten2Raw:function(){return El},geoVanDerGrinten3:function(){return Fc},geoVanDerGrinten3Raw:function(){return ks},geoVanDerGrinten4:function(){return Kl},geoVanDerGrinten4Raw:function(){return To},geoVanDerGrintenRaw:function(){return lo},geoWagner:function(){return Os},geoWagner4:function(){return Hf},geoWagner4Raw:function(){return Cu},geoWagner6:function(){return ef},geoWagner6Raw:function(){return $l},geoWagner7:function(){return tf},geoWagnerRaw:function(){return xs},geoWiechel:function(){return rf},geoWiechelRaw:function(){return qs},geoWinkel3:function(){return Vf},geoWinkel3Raw:function(){return ql}});var g=t(87952),C=Math.abs,i=Math.atan,S=Math.atan2,x=Math.cos,v=Math.exp,p=Math.floor,r=Math.log,e=Math.max,a=Math.min,n=Math.pow,f=Math.round,c=Math.sign||function(qt){return qt>0?1:qt<0?-1:0},l=Math.sin,m=Math.tan,h=1e-6,b=1e-12,u=Math.PI,o=u/2,d=u/4,w=Math.SQRT1_2,A=z(2),_=z(u),y=u*2,E=180/u,T=u/180;function s(qt){return qt?qt/Math.sin(qt):1}function L(qt){return qt>1?o:qt<-1?-o:Math.asin(qt)}function M(qt){return qt>1?0:qt<-1?u:Math.acos(qt)}function z(qt){return qt>0?Math.sqrt(qt):0}function D(qt){return qt=v(2*qt),(qt-1)/(qt+1)}function N(qt){return(v(qt)-v(-qt))/2}function I(qt){return(v(qt)+v(-qt))/2}function k(qt){return r(qt+z(qt*qt+1))}function B(qt){return r(qt+z(qt*qt-1))}function O(qt){var oe=m(qt/2),we=2*r(x(qt/2))/(oe*oe);function Me(Ue,ze){var Ge=x(Ue),gr=x(ze),br=l(ze),sr=gr*Ge,Mr=-((1-sr?r((1+sr)/2)/(1-sr):-.5)+we/(1+sr));return[Mr*gr*l(Ue),Mr*br]}return Me.invert=function(Ue,ze){var Ge=z(Ue*Ue+ze*ze),gr=-qt/2,br=50,sr;if(!Ge)return[0,0];do{var Mr=gr/2,Ir=x(Mr),Nr=l(Mr),en=Nr/Ir,yn=-r(C(Ir));gr-=sr=(2/en*yn-we*en-Ge)/(-yn/(Nr*Nr)+1-we/(2*Ir*Ir))*(Ir<0?.7:1)}while(C(sr)>h&&--br>0);var Rn=l(gr);return[S(Ue*Rn,Ge*x(gr)),L(ze*Rn/Ge)]},Me}function H(){var qt=o,oe=(0,g.U)(O),we=oe(qt);return we.radius=function(Me){return arguments.length?oe(qt=Me*T):qt*E},we.scale(179.976).clipAngle(147)}function Y(qt,oe){var we=x(oe),Me=s(M(we*x(qt/=2)));return[2*we*l(qt)*Me,l(oe)*Me]}Y.invert=function(qt,oe){if(!(qt*qt+4*oe*oe>u*u+h)){var we=qt,Me=oe,Ue=25;do{var ze=l(we),Ge=l(we/2),gr=x(we/2),br=l(Me),sr=x(Me),Mr=l(2*Me),Ir=br*br,Nr=sr*sr,en=Ge*Ge,yn=1-Nr*gr*gr,Rn=yn?M(sr*gr)*z(Dn=1/yn):Dn=0,Dn,Zn=2*Rn*sr*Ge-qt,Li=Rn*br-oe,Pi=Dn*(Nr*en+Rn*sr*gr*Ir),Ri=Dn*(.5*ze*Mr-Rn*2*br*Ge),zi=Dn*.25*(Mr*Ge-Rn*br*Nr*ze),Xi=Dn*(Ir*gr+Rn*en*sr),da=Ri*zi-Xi*Pi;if(!da)break;var Ia=(Li*Ri-Zn*Xi)/da,ft=(Zn*zi-Li*Pi)/da;we-=Ia,Me-=ft}while((C(Ia)>h||C(ft)>h)&&--Ue>0);return[we,Me]}};function j(){return(0,g.c)(Y).scale(152.63)}function et(qt){var oe=l(qt),we=x(qt),Me=qt>=0?1:-1,Ue=m(Me*qt),ze=(1+oe-we)/2;function Ge(gr,br){var sr=x(br),Mr=x(gr/=2);return[(1+sr)*l(gr),(Me*br>-S(Mr,Ue)-.001?0:-Me*10)+ze+l(br)*we-(1+sr)*oe*Mr]}return Ge.invert=function(gr,br){var sr=0,Mr=0,Ir=50;do{var Nr=x(sr),en=l(sr),yn=x(Mr),Rn=l(Mr),Dn=1+yn,Zn=Dn*en-gr,Li=ze+Rn*we-Dn*oe*Nr-br,Pi=Dn*Nr/2,Ri=-en*Rn,zi=oe*Dn*en/2,Xi=we*yn+oe*Nr*Rn,da=Ri*zi-Xi*Pi,Ia=(Li*Ri-Zn*Xi)/da/2,ft=(Zn*zi-Li*Pi)/da;C(ft)>2&&(ft/=2),sr-=Ia,Mr-=ft}while((C(Ia)>h||C(ft)>h)&&--Ir>0);return Me*Mr>-S(x(sr),Ue)-.001?[sr*2,Mr]:null},Ge}function it(){var qt=20*T,oe=qt>=0?1:-1,we=m(oe*qt),Me=(0,g.U)(et),Ue=Me(qt),ze=Ue.stream;return Ue.parallel=function(Ge){return arguments.length?(we=m((oe=(qt=Ge*T)>=0?1:-1)*qt),Me(qt)):qt*E},Ue.stream=function(Ge){var gr=Ue.rotate(),br=ze(Ge),sr=(Ue.rotate([0,0]),ze(Ge)),Mr=Ue.precision();return Ue.rotate(gr),br.sphere=function(){sr.polygonStart(),sr.lineStart();for(var Ir=oe*-180;oe*Ir<180;Ir+=oe*90)sr.point(Ir,oe*90);if(qt)for(;oe*(Ir-=3*oe*Mr)>=-180;)sr.point(Ir,oe*-S(x(Ir*T/2),we)*E);sr.lineEnd(),sr.polygonEnd()},br},Ue.scale(218.695).center([0,28.0974])}function ut(qt,oe){var we=m(oe/2),Me=z(1-we*we),Ue=1+Me*x(qt/=2),ze=l(qt)*Me/Ue,Ge=we/Ue,gr=ze*ze,br=Ge*Ge;return[1.3333333333333333*ze*(3+gr-3*br),1.3333333333333333*Ge*(3+3*gr-br)]}ut.invert=function(qt,oe){if(qt*=.375,oe*=.375,!qt&&C(oe)>1)return null;var we=qt*qt,Me=oe*oe,Ue=1+we+Me,ze=z((Ue-z(Ue*Ue-4*oe*oe))/2),Ge=L(ze)/3,gr=ze?B(C(oe/ze))/3:k(C(qt))/3,br=x(Ge),sr=I(gr),Mr=sr*sr-br*br;return[c(qt)*2*S(N(gr)*br,.25-Mr),c(oe)*2*S(sr*l(Ge),.25+Mr)]};function J(){return(0,g.c)(ut).scale(66.1603)}var X=z(8),tt=r(1+A);function V(qt,oe){var we=C(oe);return web&&--Me>0);return[qt/(x(we)*(X-1/l(we))),c(oe)*we]};function Q(){return(0,g.c)(V).scale(112.314)}var ot=t(69020);function $(qt){var oe=2*u/qt;function we(Me,Ue){var ze=(0,ot.O)(Me,Ue);if(C(Me)>o){var Ge=S(ze[1],ze[0]),gr=z(ze[0]*ze[0]+ze[1]*ze[1]),br=oe*f((Ge-o)/oe)+o,sr=S(l(Ge-=br),2-x(Ge));Ge=br+L(u/gr*l(sr))-sr,ze[0]=gr*x(Ge),ze[1]=gr*l(Ge)}return ze}return we.invert=function(Me,Ue){var ze=z(Me*Me+Ue*Ue);if(ze>o){var Ge=S(Ue,Me),gr=oe*f((Ge-o)/oe)+o,br=Ge>gr?-1:1,sr=ze*x(gr-Ge),Mr=1/m(br*M((sr-u)/z(u*(u-2*sr)+ze*ze)));Ge=gr+2*i((Mr+br*z(Mr*Mr-3))/3),Me=ze*x(Ge),Ue=ze*l(Ge)}return ot.O.invert(Me,Ue)},we}function Z(){var qt=5,oe=(0,g.U)($),we=oe(qt),Me=we.stream,Ue=.01,ze=-x(Ue*T),Ge=l(Ue*T);return we.lobes=function(gr){return arguments.length?oe(qt=+gr):qt},we.stream=function(gr){var br=we.rotate(),sr=Me(gr),Mr=(we.rotate([0,0]),Me(gr));return we.rotate(br),sr.sphere=function(){Mr.polygonStart(),Mr.lineStart();for(var Ir=0,Nr=360/qt,en=2*u/qt,yn=90-180/qt,Rn=o;Ir0&&C(Ue)>h);return Me<0?NaN:we}function wt(qt,oe,we){return oe===void 0&&(oe=40),we===void 0&&(we=b),function(Me,Ue,ze,Ge){var gr,br,sr;ze=ze===void 0?0:+ze,Ge=Ge===void 0?0:+Ge;for(var Mr=0;Mrgr){ze-=br/=2,Ge-=sr/=2;continue}gr=yn;var Rn=(ze>0?-1:1)*we,Dn=(Ge>0?-1:1)*we,Zn=qt(ze+Rn,Ge),Li=qt(ze,Ge+Dn),Pi=(Zn[0]-Ir[0])/Rn,Ri=(Zn[1]-Ir[1])/Rn,zi=(Li[0]-Ir[0])/Dn,Xi=(Li[1]-Ir[1])/Dn,da=Xi*Pi-Ri*zi,Ia=(C(da)<.5?.5:1)/da;if(br=(en*zi-Nr*Xi)*Ia,sr=(Nr*Ri-en*Pi)*Ia,ze+=br,Ge+=sr,C(br)0&&(gr[1]*=1+br/1.5*gr[0]*gr[0]),gr}return Me.invert=wt(Me),Me}function bt(){return(0,g.c)(Rt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function At(qt,oe){var we=qt*l(oe),Me=30,Ue;do oe-=Ue=(oe+l(oe)-we)/(1+x(oe));while(C(Ue)>h&&--Me>0);return oe/2}function mt(qt,oe,we){function Me(Ue,ze){return[qt*Ue*x(ze=At(we,ze)),oe*l(ze)]}return Me.invert=function(Ue,ze){return ze=L(ze/oe),[Ue/(qt*x(ze)),L((2*ze+l(2*ze))/we)]},Me}var Lt=mt(A/o,A,u);function Ht(){return(0,g.c)(Lt).scale(169.529)}var Ut=2.00276,kt=1.11072;function Vt(qt,oe){var we=At(u,oe);return[Ut*qt/(1/x(oe)+kt/x(we)),(oe+A*l(we))/Ut]}Vt.invert=function(qt,oe){var we=Ut*oe,Me=oe<0?-d:d,Ue=25,ze,Ge;do Ge=we-A*l(Me),Me-=ze=(l(2*Me)+2*Me-u*l(Ge))/(2*x(2*Me)+2+u*x(Ge)*A*x(Me));while(C(ze)>h&&--Ue>0);return Ge=we-A*l(Me),[qt*(1/x(Ge)+kt/x(Me))/Ut,Ge]};function It(){return(0,g.c)(Vt).scale(160.857)}function re(qt){var oe=0,we=(0,g.U)(qt),Me=we(oe);return Me.parallel=function(Ue){return arguments.length?we(oe=Ue*T):oe*E},Me}function Kt(qt,oe){return[qt*x(oe),oe]}Kt.invert=function(qt,oe){return[qt/x(oe),oe]};function $t(){return(0,g.c)(Kt).scale(152.63)}function le(qt){if(!qt)return Kt;var oe=1/m(qt);function we(Me,Ue){var ze=oe+qt-Ue,Ge=ze&&Me*x(Ue)/ze;return[ze*l(Ge),oe-ze*x(Ge)]}return we.invert=function(Me,Ue){var ze=z(Me*Me+(Ue=oe-Ue)*Ue),Ge=oe+qt-ze;return[ze/x(Ge)*S(Me,Ue),Ge]},we}function he(){return re(le).scale(123.082).center([0,26.1441]).parallel(45)}function de(qt){function oe(we,Me){var Ue=o-Me,ze=Ue&&we*qt*l(Ue)/Ue;return[Ue*l(ze)/qt,o-Ue*x(ze)]}return oe.invert=function(we,Me){var Ue=we*qt,ze=o-Me,Ge=z(Ue*Ue+ze*ze),gr=S(Ue,ze);return[(Ge?Ge/l(Ge):1)*gr/qt,o-Ge]},oe}function xe(){var qt=.5,oe=(0,g.U)(de),we=oe(qt);return we.fraction=function(Me){return arguments.length?oe(qt=+Me):qt},we.scale(158.837)}var Se=mt(1,4/u,u);function ne(){return(0,g.c)(Se).scale(152.63)}var zt=t(24052),Xt=t(92992);function Jt(qt,oe,we,Me,Ue,ze){var Ge=x(ze),gr;if(C(qt)>1||C(ze)>1)gr=M(we*Ue+oe*Me*Ge);else{var br=l(qt/2),sr=l(ze/2);gr=2*L(z(br*br+oe*Me*sr*sr))}return C(gr)>h?[gr,S(Me*l(ze),oe*Ue-we*Me*Ge)]:[0,0]}function Wt(qt,oe,we){return M((qt*qt+oe*oe-we*we)/(2*qt*oe))}function Ft(qt){return qt-2*u*p((qt+u)/(2*u))}function xt(qt,oe,we){for(var Me=[[qt[0],qt[1],l(qt[1]),x(qt[1])],[oe[0],oe[1],l(oe[1]),x(oe[1])],[we[0],we[1],l(we[1]),x(we[1])]],Ue=Me[2],ze,Ge=0;Ge<3;++Ge,Ue=ze)ze=Me[Ge],Ue.v=Jt(ze[1]-Ue[1],Ue[3],Ue[2],ze[3],ze[2],ze[0]-Ue[0]),Ue.point=[0,0];var gr=Wt(Me[0].v[0],Me[2].v[0],Me[1].v[0]),br=Wt(Me[0].v[0],Me[1].v[0],Me[2].v[0]),sr=u-gr;Me[2].point[1]=0,Me[0].point[0]=-(Me[1].point[0]=Me[0].v[0]/2);var Mr=[Me[2].point[0]=Me[0].point[0]+Me[2].v[0]*x(gr),2*(Me[0].point[1]=Me[1].point[1]=Me[2].v[0]*l(gr))];function Ir(Nr,en){var yn=l(en),Rn=x(en),Dn=new Array(3),Zn;for(Zn=0;Zn<3;++Zn){var Li=Me[Zn];if(Dn[Zn]=Jt(en-Li[1],Li[3],Li[2],Rn,yn,Nr-Li[0]),!Dn[Zn][0])return Li.point;Dn[Zn][1]=Ft(Dn[Zn][1]-Li.v[1])}var Pi=Mr.slice();for(Zn=0;Zn<3;++Zn){var Ri=Zn==2?0:Zn+1,zi=Wt(Me[Zn].v[0],Dn[Zn][0],Dn[Ri][0]);Dn[Zn][1]<0&&(zi=-zi),Zn?Zn==1?(zi=br-zi,Pi[0]-=Dn[Zn][0]*x(zi),Pi[1]-=Dn[Zn][0]*l(zi)):(zi=sr-zi,Pi[0]+=Dn[Zn][0]*x(zi),Pi[1]+=Dn[Zn][0]*l(zi)):(Pi[0]+=Dn[Zn][0]*x(zi),Pi[1]-=Dn[Zn][0]*l(zi))}return Pi[0]/=3,Pi[1]/=3,Pi}return Ir}function yt(qt){return qt[0]*=T,qt[1]*=T,qt}function Et(){return Mt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Mt(qt,oe,we){var Me=(0,zt.c)({type:"MultiPoint",coordinates:[qt,oe,we]}),Ue=[-Me[0],-Me[1]],ze=(0,Xt.c)(Ue),Ge=xt(yt(ze(qt)),yt(ze(oe)),yt(ze(we)));Ge.invert=wt(Ge);var gr=(0,g.c)(Ge).rotate(Ue),br=gr.center;return delete gr.rotate,gr.center=function(sr){return arguments.length?br(ze(sr)):ze.invert(br())},gr.clipAngle(90)}function Nt(qt,oe){var we=z(1-l(oe));return[2/_*qt*we,_*(1-we)]}Nt.invert=function(qt,oe){var we=(we=oe/_-1)*we;return[we>0?qt*z(u/we)/2:0,L(1-we)]};function jt(){return(0,g.c)(Nt).scale(95.6464).center([0,30])}function ie(qt){var oe=m(qt);function we(Me,Ue){return[Me,(Me?Me/l(Me):1)*(l(Ue)*x(Me)-oe*x(Ue))]}return we.invert=oe?function(Me,Ue){Me&&(Ue*=l(Me)/Me);var ze=x(Me);return[Me,2*S(z(ze*ze+oe*oe-Ue*Ue)-ze,oe-Ue)]}:function(Me,Ue){return[Me,L(Me?Ue*m(Me)/Me:Ue)]},we}function me(){return re(ie).scale(249.828).clipAngle(90)}var be=z(3);function ve(qt,oe){return[be*qt*(2*x(2*oe/3)-1)/_,be*_*l(oe/3)]}ve.invert=function(qt,oe){var we=3*L(oe/(be*_));return[_*qt/(be*(2*x(2*we/3)-1)),we]};function Le(){return(0,g.c)(ve).scale(156.19)}function ce(qt){var oe=x(qt);function we(Me,Ue){return[Me*oe,l(Ue)/oe]}return we.invert=function(Me,Ue){return[Me/oe,L(Ue*oe)]},we}function Te(){return re(ce).parallel(38.58).scale(195.044)}function Be(qt){var oe=x(qt);function we(Me,Ue){return[Me*oe,(1+oe)*m(Ue/2)]}return we.invert=function(Me,Ue){return[Me/oe,i(Ue/(1+oe))*2]},we}function ir(){return re(Be).scale(124.75)}function pe(qt,oe){var we=z(8/(3*u));return[we*qt*(1-C(oe)/u),we*oe]}pe.invert=function(qt,oe){var we=z(8/(3*u)),Me=oe/we;return[qt/(we*(1-C(Me)/u)),Me]};function Xe(){return(0,g.c)(pe).scale(165.664)}function Ke(qt,oe){var we=z(4-3*l(C(oe)));return[2/z(6*u)*qt*we,c(oe)*z(2*u/3)*(2-we)]}Ke.invert=function(qt,oe){var we=2-C(oe)/z(2*u/3);return[qt*z(6*u)/(2*we),c(oe)*L((4-we*we)/3)]};function or(){return(0,g.c)(Ke).scale(165.664)}function $e(qt,oe){var we=z(u*(4+u));return[2/we*qt*(1+z(1-4*oe*oe/(u*u))),4/we*oe]}$e.invert=function(qt,oe){var we=z(u*(4+u))/2;return[qt*we/(1+z(1-oe*oe*(4+u)/(4*u))),oe*we/2]};function ge(){return(0,g.c)($e).scale(180.739)}function se(qt,oe){var we=(2+o)*l(oe);oe/=2;for(var Me=0,Ue=1/0;Me<10&&C(Ue)>h;Me++){var ze=x(oe);oe-=Ue=(oe+l(oe)*(ze+2)-we)/(2*ze*(1+ze))}return[2/z(u*(4+u))*qt*(1+x(oe)),2*z(u/(4+u))*l(oe)]}se.invert=function(qt,oe){var we=oe*z((4+u)/u)/2,Me=L(we),Ue=x(Me);return[qt/(2/z(u*(4+u))*(1+Ue)),L((Me+we*(Ue+2))/(2+o))]};function Ae(){return(0,g.c)(se).scale(180.739)}function Ce(qt,oe){return[qt*(1+x(oe))/z(2+u),2*oe/z(2+u)]}Ce.invert=function(qt,oe){var we=z(2+u),Me=oe*we/2;return[we*qt/(1+x(Me)),Me]};function Ie(){return(0,g.c)(Ce).scale(173.044)}function Pe(qt,oe){for(var we=(1+o)*l(oe),Me=0,Ue=1/0;Me<10&&C(Ue)>h;Me++)oe-=Ue=(oe+l(oe)-we)/(1+x(oe));return we=z(2+u),[qt*(1+x(oe))/we,2*oe/we]}Pe.invert=function(qt,oe){var we=1+o,Me=z(we/2);return[qt*2*Me/(1+x(oe*=Me)),L((oe+l(oe))/we)]};function ke(){return(0,g.c)(Pe).scale(173.044)}var Ve=3+2*A;function Je(qt,oe){var we=l(qt/=2),Me=x(qt),Ue=z(x(oe)),ze=x(oe/=2),Ge=l(oe)/(ze+A*Me*Ue),gr=z(2/(1+Ge*Ge)),br=z((A*ze+(Me+we)*Ue)/(A*ze+(Me-we)*Ue));return[Ve*(gr*(br-1/br)-2*r(br)),Ve*(gr*Ge*(br+1/br)-2*i(Ge))]}Je.invert=function(qt,oe){if(!(ze=ut.invert(qt/1.2,oe*1.065)))return null;var we=ze[0],Me=ze[1],Ue=20,ze;qt/=Ve,oe/=Ve;do{var Ge=we/2,gr=Me/2,br=l(Ge),sr=x(Ge),Mr=l(gr),Ir=x(gr),Nr=x(Me),en=z(Nr),yn=Mr/(Ir+A*sr*en),Rn=yn*yn,Dn=z(2/(1+Rn)),Zn=A*Ir+(sr+br)*en,Li=A*Ir+(sr-br)*en,Pi=Zn/Li,Ri=z(Pi),zi=Ri-1/Ri,Xi=Ri+1/Ri,da=Dn*zi-2*r(Ri)-qt,Ia=Dn*yn*Xi-2*i(yn)-oe,ft=Mr&&w*en*br*Rn/Mr,Ct=(A*sr*Ir+en)/(2*(Ir+A*sr*en)*(Ir+A*sr*en)*en),Bt=-.5*yn*Dn*Dn*Dn,ee=Bt*ft,ae=Bt*Ct,fe=(fe=2*Ir+A*en*(sr-br))*fe*Ri,De=(A*sr*Ir*en+Nr)/fe,Ee=-(A*br*Mr)/(en*fe),Ye=zi*ee-2*De/Ri+Dn*(De+De/Pi),Ze=zi*ae-2*Ee/Ri+Dn*(Ee+Ee/Pi),nr=yn*Xi*ee-2*ft/(1+Rn)+Dn*Xi*ft+Dn*yn*(De-De/Pi),_r=yn*Xi*ae-2*Ct/(1+Rn)+Dn*Xi*Ct+Dn*yn*(Ee-Ee/Pi),Lr=Ze*nr-_r*Ye;if(!Lr)break;var Jr=(Ia*Ze-da*_r)/Lr,on=(da*nr-Ia*Ye)/Lr;we-=Jr,Me=e(-o,a(o,Me-on))}while((C(Jr)>h||C(on)>h)&&--Ue>0);return C(C(Me)-o)Me){var Ir=z(Mr),Nr=S(sr,br),en=we*f(Nr/we),yn=Nr-en,Rn=qt*x(yn),Dn=(qt*l(yn)-yn*l(Rn))/(o-Rn),Zn=xr(yn,Dn),Li=(u-qt)/pr(Zn,Rn,u);br=Ir;var Pi=50,Ri;do br-=Ri=(qt+pr(Zn,Rn,br)*Li-Ir)/(Zn(br)*Li);while(C(Ri)>h&&--Pi>0);sr=yn*l(br),brMe){var br=z(gr),sr=S(Ge,ze),Mr=we*f(sr/we),Ir=sr-Mr;ze=br*x(Ir),Ge=br*l(Ir);for(var Nr=ze-o,en=l(ze),yn=Ge/en,Rn=zeh||C(yn)>h)&&--Rn>0);return[Ir,Nr]},br}var Dr=Pr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function cn(){return(0,g.c)(Dr).scale(149.995)}var rn=Pr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Cn(){return(0,g.c)(rn).scale(153.93)}var En=Pr(5/6*u,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Tr(){return(0,g.c)(En).scale(130.945)}function Cr(qt,oe){var we=qt*qt,Me=oe*oe;return[qt*(1-.162388*Me)*(.87-952426e-9*we*we),oe*(1+Me/12)]}Cr.invert=function(qt,oe){var we=qt,Me=oe,Ue=50,ze;do{var Ge=Me*Me;Me-=ze=(Me*(1+Ge/12)-oe)/(1+Ge/4)}while(C(ze)>h&&--Ue>0);Ue=50,qt/=1-.162388*Ge;do{var gr=(gr=we*we)*gr;we-=ze=(we*(.87-952426e-9*gr)-qt)/(.87-.00476213*gr)}while(C(ze)>h&&--Ue>0);return[we,Me]};function Wr(){return(0,g.c)(Cr).scale(131.747)}var Ur=Pr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function an(){return(0,g.c)(Ur).scale(131.087)}function pn(qt){var oe=qt(o,0)[0]-qt(-o,0)[0];function we(Me,Ue){var ze=Me>0?-.5:.5,Ge=qt(Me+ze*u,Ue);return Ge[0]-=ze*oe,Ge}return qt.invert&&(we.invert=function(Me,Ue){var ze=Me>0?-.5:.5,Ge=qt.invert(Me+ze*oe,Ue),gr=Ge[0]-ze*u;return gr<-u?gr+=2*u:gr>u&&(gr-=2*u),Ge[0]=gr,Ge}),we}function gn(qt,oe){var we=c(qt),Me=c(oe),Ue=x(oe),ze=x(qt)*Ue,Ge=l(qt)*Ue,gr=l(Me*oe);qt=C(S(Ge,gr)),oe=L(ze),C(qt-o)>h&&(qt%=o);var br=_n(qt>u/4?o-qt:qt,oe);return qt>u/4&&(gr=br[0],br[0]=-br[1],br[1]=-gr),br[0]*=we,br[1]*=-Me,br}gn.invert=function(qt,oe){C(qt)>1&&(qt=c(qt)*2-qt),C(oe)>1&&(oe=c(oe)*2-oe);var we=c(qt),Me=c(oe),Ue=-we*qt,ze=-Me*oe,Ge=ze/Ue<1,gr=kn(Ge?ze:Ue,Ge?Ue:ze),br=gr[0],sr=gr[1],Mr=x(sr);return Ge&&(br=-o-br),[we*(S(l(br)*Mr,-l(sr))+u),Me*L(x(br)*Mr)]};function _n(qt,oe){if(oe===o)return[0,0];var we=l(oe),Me=we*we,Ue=Me*Me,ze=1+Ue,Ge=1+3*Ue,gr=1-Ue,br=L(1/z(ze)),sr=gr+Me*ze*br,Mr=(1-we)/sr,Ir=z(Mr),Nr=Mr*ze,en=z(Nr),yn=Ir*gr,Rn,Dn;if(qt===0)return[0,-(yn+Me*en)];var Zn=x(oe),Li=1/Zn,Pi=2*we*Zn,Ri=(-3*Me+br*Ge)*Pi,zi=(-sr*Zn-(1-we)*Ri)/(sr*sr),Xi=.5*zi/Ir,da=gr*Xi-2*Me*Ir*Pi,Ia=Me*ze*zi+Mr*Ge*Pi,ft=-Li*Pi,Ct=-Li*Ia,Bt=-2*Li*da,ee=4*qt/u,ae;if(qt>.222*u||oe.175*u){if(Rn=(yn+Me*z(Nr*(1+Ue)-yn*yn))/(1+Ue),qt>u/4)return[Rn,Rn];var fe=Rn,De=.5*Rn;Rn=.5*(De+fe),Dn=50;do{var Ee=z(Nr-Rn*Rn),Ye=Rn*(Bt+ft*Ee)+Ct*L(Rn/en)-ee;if(!Ye)break;Ye<0?De=Rn:fe=Rn,Rn=.5*(De+fe)}while(C(fe-De)>h&&--Dn>0)}else{Rn=h,Dn=25;do{var Ze=Rn*Rn,nr=z(Nr-Ze),_r=Bt+ft*nr,Lr=Rn*_r+Ct*L(Rn/en)-ee,Jr=_r+(Ct-ft*Ze)/nr;Rn-=ae=nr?Lr/Jr:0}while(C(ae)>h&&--Dn>0)}return[Rn,-yn-Me*z(Nr-Rn*Rn)]}function kn(qt,oe){for(var we=0,Me=1,Ue=.5,ze=50;;){var Ge=Ue*Ue,gr=z(Ue),br=L(1/z(1+Ge)),sr=1-Ge+Ue*(1+Ge)*br,Mr=(1-gr)/sr,Ir=z(Mr),Nr=Mr*(1+Ge),en=Ir*(1-Ge),yn=Nr-qt*qt,Rn=z(yn),Dn=oe+en+Ue*Rn;if(C(Me-we)0?we=Ue:Me=Ue,Ue=.5*(we+Me)}if(!ze)return null;var Zn=L(gr),Li=x(Zn),Pi=1/Li,Ri=2*gr*Li,zi=(-3*Ue+br*(1+3*Ge))*Ri,Xi=(-sr*Li-(1-gr)*zi)/(sr*sr),da=.5*Xi/Ir,Ia=(1-Ge)*da-2*Ue*Ir*Ri,ft=-2*Pi*Ia,Ct=-Pi*Ri,Bt=-Pi*(Ue*(1+Ge)*Xi+Mr*(1+3*Ge)*Ri);return[u/4*(qt*(ft+Ct*Rn)+Bt*L(qt/z(Nr))),Zn]}function ni(){return(0,g.c)(pn(gn)).scale(239.75)}function ci(qt,oe,we){var Me,Ue,ze;return qt?(Me=di(qt,we),oe?(Ue=di(oe,1-we),ze=Ue[1]*Ue[1]+we*Me[0]*Me[0]*Ue[0]*Ue[0],[[Me[0]*Ue[2]/ze,Me[1]*Me[2]*Ue[0]*Ue[1]/ze],[Me[1]*Ue[1]/ze,-Me[0]*Me[2]*Ue[0]*Ue[2]/ze],[Me[2]*Ue[1]*Ue[2]/ze,-we*Me[0]*Me[1]*Ue[0]/ze]]):[[Me[0],0],[Me[1],0],[Me[2],0]]):(Ue=di(oe,1-we),[[0,Ue[0]/Ue[1]],[1/Ue[1],0],[Ue[2]/Ue[1],0]])}function di(qt,oe){var we,Me,Ue,ze,Ge;if(oe=1-h)return we=(1-oe)/4,Me=I(qt),ze=D(qt),Ue=1/Me,Ge=Me*N(qt),[ze+we*(Ge-qt)/(Me*Me),Ue-we*ze*Ue*(Ge-qt),Ue+we*ze*Ue*(Ge+qt),2*i(v(qt))-o+we*(Ge-qt)/Me];var gr=[1,0,0,0,0,0,0,0,0],br=[z(oe),0,0,0,0,0,0,0,0],sr=0;for(Me=z(1-oe),Ge=1;C(br[sr]/gr[sr])>h&&sr<8;)we=gr[sr++],br[sr]=(we-Me)/2,gr[sr]=(we+Me)/2,Me=z(we*Me),Ge*=2;Ue=Ge*gr[sr]*qt;do ze=br[sr]*l(Me=Ue)/gr[sr],Ue=(L(ze)+Ue)/2;while(--sr);return[l(Ue),ze=x(Ue),ze/x(Ue-Me),Ue]}function li(qt,oe,we){var Me=C(qt),Ue=C(oe),ze=N(Ue);if(Me){var Ge=1/l(Me),gr=1/(m(Me)*m(Me)),br=-(gr+we*(ze*ze*Ge*Ge)-1+we),sr=(we-1)*gr,Mr=(-br+z(br*br-4*sr))/2;return[ri(i(1/z(Mr)),we)*c(qt),ri(i(z((Mr/gr-1)/we)),1-we)*c(oe)]}return[0,ri(i(ze),1-we)*c(oe)]}function ri(qt,oe){if(!oe)return qt;if(oe===1)return r(m(qt/2+d));for(var we=1,Me=z(1-oe),Ue=z(oe),ze=0;C(Ue)>h;ze++){if(qt%u){var Ge=i(Me*m(qt)/we);Ge<0&&(Ge+=u),qt+=Ge+~~(qt/u)*u}else qt+=qt;Ue=(we+Me)/2,Me=z(we*Me),Ue=((we=Ue)-Me)/2}return qt/(n(2,ze)*we)}function wr(qt,oe){var we=(A-1)/(A+1),Me=z(1-we*we),Ue=ri(o,Me*Me),ze=-1,Ge=r(m(u/4+C(oe)/2)),gr=v(ze*Ge)/z(we),br=nn(gr*x(ze*qt),gr*l(ze*qt)),sr=li(br[0],br[1],Me*Me);return[-sr[1],(oe>=0?1:-1)*(.5*Ue-sr[0])]}function nn(qt,oe){var we=qt*qt,Me=oe+1,Ue=1-we-oe*oe;return[.5*((qt>=0?o:-o)-S(Ue,2*qt)),-.25*r(Ue*Ue+4*we)+.5*r(Me*Me+we)]}function $r(qt,oe){var we=oe[0]*oe[0]+oe[1]*oe[1];return[(qt[0]*oe[0]+qt[1]*oe[1])/we,(qt[1]*oe[0]-qt[0]*oe[1])/we]}wr.invert=function(qt,oe){var we=(A-1)/(A+1),Me=z(1-we*we),Ue=ri(o,Me*Me),ze=-1,Ge=ci(.5*Ue-oe,-qt,Me*Me),gr=$r(Ge[0],Ge[1]),br=S(gr[1],gr[0])/ze;return[br,2*i(v(.5/ze*r(we*gr[0]*gr[0]+we*gr[1]*gr[1])))-o]};function dn(){return(0,g.c)(pn(wr)).scale(151.496)}var Vn=t(61780);function Tn(qt){var oe=l(qt),we=x(qt),Me=An(qt);Me.invert=An(-qt);function Ue(ze,Ge){var gr=Me(ze,Ge);ze=gr[0],Ge=gr[1];var br=l(Ge),sr=x(Ge),Mr=x(ze),Ir=M(oe*br+we*sr*Mr),Nr=l(Ir),en=C(Nr)>h?Ir/Nr:1;return[en*we*l(ze),(C(ze)>o?en:-en)*(oe*sr-we*br*Mr)]}return Ue.invert=function(ze,Ge){var gr=z(ze*ze+Ge*Ge),br=-l(gr),sr=x(gr),Mr=gr*sr,Ir=-Ge*br,Nr=gr*oe,en=z(Mr*Mr+Ir*Ir-Nr*Nr),yn=S(Mr*Nr+Ir*en,Ir*Nr-Mr*en),Rn=(gr>o?-1:1)*S(ze*br,gr*x(yn)*sr+Ge*l(yn)*br);return Me.invert(Rn,yn)},Ue}function An(qt){var oe=l(qt),we=x(qt);return function(Me,Ue){var ze=x(Ue),Ge=x(Me)*ze,gr=l(Me)*ze,br=l(Ue);return[S(gr,Ge*we-br*oe),L(br*we+Ge*oe)]}}function Bn(){var qt=0,oe=(0,g.U)(Tn),we=oe(qt),Me=we.rotate,Ue=we.stream,ze=(0,Vn.c)();return we.parallel=function(Ge){if(!arguments.length)return qt*E;var gr=we.rotate();return oe(qt=Ge*T).rotate(gr)},we.rotate=function(Ge){return arguments.length?(Me.call(we,[Ge[0],Ge[1]-qt*E]),ze.center([-Ge[0],-Ge[1]]),we):(Ge=Me.call(we),Ge[1]+=qt*E,Ge)},we.stream=function(Ge){return Ge=Ue(Ge),Ge.sphere=function(){Ge.polygonStart();var gr=.01,br=ze.radius(90-gr)().coordinates[0],sr=br.length-1,Mr=-1,Ir;for(Ge.lineStart();++Mr=0;)Ge.point((Ir=br[Mr])[0],Ir[1]);Ge.lineEnd(),Ge.polygonEnd()},Ge},we.scale(79.4187).parallel(45).clipAngle(179.999)}var Jn=t(84706),gi=t(16016),Di=3,Sr=L(1-1/Di)*E,kr=ce(0);function Ar(qt){var oe=Sr*T,we=Nt(u,oe)[0]-Nt(-u,oe)[0],Me=kr(0,oe)[1],Ue=Nt(0,oe)[1],ze=_-Ue,Ge=y/qt,gr=4/y,br=Me+ze*ze*4/y;function sr(Mr,Ir){var Nr,en=C(Ir);if(en>oe){var yn=a(qt-1,e(0,p((Mr+u)/Ge)));Mr+=u*(qt-1)/qt-yn*Ge,Nr=Nt(Mr,en),Nr[0]=Nr[0]*y/we-y*(qt-1)/(2*qt)+yn*y/qt,Nr[1]=Me+(Nr[1]-Ue)*4*ze/y,Ir<0&&(Nr[1]=-Nr[1])}else Nr=kr(Mr,Ir);return Nr[0]*=gr,Nr[1]/=br,Nr}return sr.invert=function(Mr,Ir){Mr/=gr,Ir*=br;var Nr=C(Ir);if(Nr>Me){var en=a(qt-1,e(0,p((Mr+u)/Ge)));Mr=(Mr+u*(qt-1)/qt-en*Ge)*we/y;var yn=Nt.invert(Mr,.25*(Nr-Me)*y/ze+Ue);return yn[0]-=u*(qt-1)/qt-en*Ge,Ir<0&&(yn[1]=-yn[1]),yn}return kr.invert(Mr,Ir)},sr}function Or(qt,oe){return[qt,oe&1?90-h:Sr]}function xn(qt,oe){return[qt,oe&1?-90+h:-Sr]}function In(qt){return[qt[0]*(1-h),qt[1]]}function hn(qt){var oe=[].concat((0,Jn.ik)(-180,180+qt/2,qt).map(Or),(0,Jn.ik)(180,-180-qt/2,-qt).map(xn));return{type:"Polygon",coordinates:[qt===180?oe.map(In):oe]}}function sn(){var qt=4,oe=(0,g.U)(Ar),we=oe(qt),Me=we.stream;return we.lobes=function(Ue){return arguments.length?oe(qt=+Ue):qt},we.stream=function(Ue){var ze=we.rotate(),Ge=Me(Ue),gr=(we.rotate([0,0]),Me(Ue));return we.rotate(ze),Ge.sphere=function(){(0,gi.c)(hn(180/qt),gr)},Ge},we.scale(239.75)}function Er(qt){var oe=1+qt,we=l(1/oe),Me=L(we),Ue=2*z(u/(ze=u+4*Me*oe)),ze,Ge=.5*Ue*(oe+z(qt*(2+qt))),gr=qt*qt,br=oe*oe;function sr(Mr,Ir){var Nr=1-l(Ir),en,yn;if(Nr&&Nr<2){var Rn=o-Ir,Dn=25,Zn;do{var Li=l(Rn),Pi=x(Rn),Ri=Me+S(Li,oe-Pi),zi=1+br-2*oe*Pi;Rn-=Zn=(Rn-gr*Me-oe*Li+zi*Ri-.5*Nr*ze)/(2*oe*Li*Ri)}while(C(Zn)>b&&--Dn>0);en=Ue*z(zi),yn=Mr*Ri/u}else en=Ue*(qt+Nr),yn=Mr*Me/u;return[en*l(yn),Ge-en*x(yn)]}return sr.invert=function(Mr,Ir){var Nr=Mr*Mr+(Ir-=Ge)*Ir,en=(1+br-Nr/(Ue*Ue))/(2*oe),yn=M(en),Rn=l(yn),Dn=Me+S(Rn,oe-en);return[L(Mr/z(Nr))*u/Dn,L(1-2*(yn-gr*Me-oe*Rn+(1+br-2*oe*en)*Dn)/ze)]},sr}function Zr(){var qt=1,oe=(0,g.U)(Er),we=oe(qt);return we.ratio=function(Me){return arguments.length?oe(qt=+Me):qt},we.scale(167.774).center([0,18.67])}var Hr=.7109889596207567,Qr=.0528035274542;function wn(qt,oe){return oe>-Hr?(qt=Lt(qt,oe),qt[1]+=Qr,qt):Kt(qt,oe)}wn.invert=function(qt,oe){return oe>-Hr?Lt.invert(qt,oe-Qr):Kt.invert(qt,oe)};function Ln(){return(0,g.c)(wn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Pn(qt,oe){return C(oe)>Hr?(qt=Lt(qt,oe),qt[1]-=oe>0?Qr:-Qr,qt):Kt(qt,oe)}Pn.invert=function(qt,oe){return C(oe)>Hr?Lt.invert(qt,oe+(oe>0?Qr:-Qr)):Kt.invert(qt,oe)};function Un(){return(0,g.c)(Pn).scale(152.63)}function On(qt,oe,we,Me){var Ue=z(4*u/(2*we+(1+qt-oe/2)*l(2*we)+(qt+oe)/2*l(4*we)+oe/2*l(6*we))),ze=z(Me*l(we)*z((1+qt*x(2*we)+oe*x(4*we))/(1+qt+oe))),Ge=we*br(1);function gr(Ir){return z(1+qt*x(2*Ir)+oe*x(4*Ir))}function br(Ir){var Nr=Ir*we;return(2*Nr+(1+qt-oe/2)*l(2*Nr)+(qt+oe)/2*l(4*Nr)+oe/2*l(6*Nr))/we}function sr(Ir){return gr(Ir)*l(Ir)}var Mr=function(Ir,Nr){var en=we*Tt(br,Ge*l(Nr)/we,Nr/u);isNaN(en)&&(en=we*c(Nr));var yn=Ue*gr(en);return[yn*ze*Ir/u*x(en),yn/ze*l(en)]};return Mr.invert=function(Ir,Nr){var en=Tt(sr,Nr*ze/Ue);return[Ir*u/(x(en)*Ue*ze*gr(en)),L(we*br(en/we)/Ge)]},we===0&&(Ue=z(Me/u),Mr=function(Ir,Nr){return[Ir*Ue,l(Nr)/Ue]},Mr.invert=function(Ir,Nr){return[Ir/Ue,L(Nr*Ue)]}),Mr}function mi(){var qt=1,oe=0,we=45*T,Me=2,Ue=(0,g.U)(On),ze=Ue(qt,oe,we,Me);return ze.a=function(Ge){return arguments.length?Ue(qt=+Ge,oe,we,Me):qt},ze.b=function(Ge){return arguments.length?Ue(qt,oe=+Ge,we,Me):oe},ze.psiMax=function(Ge){return arguments.length?Ue(qt,oe,we=+Ge*T,Me):we*E},ze.ratio=function(Ge){return arguments.length?Ue(qt,oe,we,Me=+Ge):Me},ze.scale(180.739)}function ai(qt,oe,we,Me,Ue,ze,Ge,gr,br,sr,Mr){if(Mr.nanEncountered)return NaN;var Ir,Nr,en,yn,Rn,Dn,Zn,Li,Pi,Ri;if(Ir=we-oe,Nr=qt(oe+Ir*.25),en=qt(we-Ir*.25),isNaN(Nr)){Mr.nanEncountered=!0;return}if(isNaN(en)){Mr.nanEncountered=!0;return}return yn=Ir*(Me+4*Nr+Ue)/12,Rn=Ir*(Ue+4*en+ze)/12,Dn=yn+Rn,Ri=(Dn-Ge)/15,sr>br?(Mr.maxDepthCount++,Dn+Ri):Math.abs(Ri)>1;do br[Dn]>en?Rn=Dn:yn=Dn,Dn=yn+Rn>>1;while(Dn>yn);var Zn=br[Dn+1]-br[Dn];return Zn&&(Zn=(en-br[Dn+1])/Zn),(Dn+1+Zn)/Ge}var Ir=2*Mr(1)/u*ze/we,Nr=function(en,yn){var Rn=Mr(C(l(yn))),Dn=Me(Rn)*en;return Rn/=Ir,[Dn,yn>=0?Rn:-Rn]};return Nr.invert=function(en,yn){var Rn;return yn*=Ir,C(yn)<1&&(Rn=c(yn)*L(Ue(C(yn))*ze)),[en/Me(C(yn)),Rn]},Nr}function pa(){var qt=0,oe=2.5,we=1.183136,Me=(0,g.U)(Ci),Ue=Me(qt,oe,we);return Ue.alpha=function(ze){return arguments.length?Me(qt=+ze,oe,we):qt},Ue.k=function(ze){return arguments.length?Me(qt,oe=+ze,we):oe},Ue.gamma=function(ze){return arguments.length?Me(qt,oe,we=+ze):we},Ue.scale(152.63)}function ea(qt,oe){return C(qt[0]-oe[0])=0;--br)we=qt[1][br],Me=we[0][0],Ue=we[0][1],ze=we[1][1],Ge=we[2][0],gr=we[2][1],oe.push(Eo([[Ge-h,gr-h],[Ge-h,ze+h],[Me+h,ze+h],[Me+h,Ue-h]],30));return{type:"Polygon",coordinates:[(0,Jn.Uf)(oe)]}}function Qa(qt,oe,we){var Me,Ue;function ze(br,sr){for(var Mr=sr<0?-1:1,Ir=oe[+(sr<0)],Nr=0,en=Ir.length-1;NrIr[Nr][2][0];++Nr);var yn=qt(br-Ir[Nr][1][0],sr);return yn[0]+=qt(Ir[Nr][1][0],Mr*sr>Mr*Ir[Nr][0][1]?Ir[Nr][0][1]:sr)[0],yn}we?ze.invert=we(ze):qt.invert&&(ze.invert=function(br,sr){for(var Mr=Ue[+(sr<0)],Ir=oe[+(sr<0)],Nr=0,en=Mr.length;Nryn&&(Rn=en,en=yn,yn=Rn),[[Ir,en],[Nr,yn]]})}),Ge):oe.map(function(sr){return sr.map(function(Mr){return[[Mr[0][0]*E,Mr[0][1]*E],[Mr[1][0]*E,Mr[1][1]*E],[Mr[2][0]*E,Mr[2][1]*E]]})})},oe!=null&&Ge.lobes(oe),Ge}var sl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Bu(){return Qa(Vt,sl).scale(160.857)}var wf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function $i(){return Qa(Pn,wf).scale(152.63)}var Fl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Uu(){return Qa(Lt,Fl).scale(169.529)}var Xa=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function ho(){return Qa(Lt,Xa).scale(169.529).rotate([20,0])}var ll=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function vu(){return Qa(wn,ll,wt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Ra=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function ul(){return Qa(Kt,Ra).scale(152.63).rotate([-20,0])}function za(qt,oe){return[3/y*qt*z(u*u/3-oe*oe),oe]}za.invert=function(qt,oe){return[y/3*qt/z(u*u/3-oe*oe),oe]};function Ua(){return(0,g.c)(za).scale(158.837)}function fl(qt){function oe(we,Me){if(C(C(Me)-o)2)return null;we/=2,Me/=2;var ze=we*we,Ge=Me*Me,gr=2*Me/(1+ze+Ge);return gr=n((1+gr)/(1-gr),1/qt),[S(2*we,1-ze-Ge)/qt,L((gr-1)/(gr+1))]},oe}function $a(){var qt=.5,oe=(0,g.U)(fl),we=oe(qt);return we.spacing=function(Me){return arguments.length?oe(qt=+Me):qt},we.scale(124.75)}var qa=u/A;function _o(qt,oe){return[qt*(1+z(x(oe)))/2,oe/(x(oe/2)*x(qt/6))]}_o.invert=function(qt,oe){var we=C(qt),Me=C(oe),Ue=h,ze=o;Meh||C(Dn)>h)&&--Ue>0);return Ue&&[we,Me]};function yc(){return(0,g.c)(bo).scale(139.98)}function ts(qt,oe){return[l(qt)/x(oe),m(oe)*x(qt)]}ts.invert=function(qt,oe){var we=qt*qt,Me=oe*oe,Ue=Me+1,ze=we+Ue,Ge=qt?w*z((ze-z(ze*ze-4*we))/we):1/z(Ue);return[L(qt*Ge),c(oe)*M(Ge)]};function Za(){return(0,g.c)(ts).scale(144.049).clipAngle(89.999)}function Hu(qt){var oe=x(qt),we=m(d+qt/2);function Me(Ue,ze){var Ge=ze-qt,gr=C(Ge)=0;)Mr=qt[sr],Ir=Mr[0]+gr*(en=Ir)-br*Nr,Nr=Mr[1]+gr*Nr+br*en;return Ir=gr*(en=Ir)-br*Nr,Nr=gr*Nr+br*en,[Ir,Nr]}return we.invert=function(Me,Ue){var ze=20,Ge=Me,gr=Ue;do{for(var br=oe,sr=qt[br],Mr=sr[0],Ir=sr[1],Nr=0,en=0,yn;--br>=0;)sr=qt[br],Nr=Mr+Ge*(yn=Nr)-gr*en,en=Ir+Ge*en+gr*yn,Mr=sr[0]+Ge*(yn=Mr)-gr*Ir,Ir=sr[1]+Ge*Ir+gr*yn;Nr=Mr+Ge*(yn=Nr)-gr*en,en=Ir+Ge*en+gr*yn,Mr=Ge*(yn=Mr)-gr*Ir-Me,Ir=Ge*Ir+gr*yn-Ue;var Rn=Nr*Nr+en*en,Dn,Zn;Ge-=Dn=(Mr*Nr+Ir*en)/Rn,gr-=Zn=(Ir*Nr-Mr*en)/Rn}while(C(Dn)+C(Zn)>h*h&&--ze>0);if(ze){var Li=z(Ge*Ge+gr*gr),Pi=2*i(Li*.5),Ri=l(Pi);return[S(Ge*Ri,Li*x(Pi)),Li?L(gr*Ri/Li):0]}},we}var xc=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],du=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],bc=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],wc=[[.9245,0],[0,0],[.01943,0]],Tc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Gu(){return Xs(xc,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Ac(){return Xs(du,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mc(){return Xs(bc,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Mf(){return Xs(wc,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Sf(){return Xs(Tc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Xs(qt,oe){var we=(0,g.c)(Af(qt)).rotate(oe).clipAngle(90),Me=(0,Xt.c)(oe),Ue=we.center;return delete we.rotate,we.center=function(ze){return arguments.length?Ue(Me(ze)):Me.invert(Ue())},we}var cl=z(6),zl=z(7);function kl(qt,oe){var we=L(7*l(oe)/(3*cl));return[cl*qt*(2*x(2*we/3)-1)/zl,9*l(we/3)/zl]}kl.invert=function(qt,oe){var we=3*L(oe*zl/9);return[qt*zl/(cl*(2*x(2*we/3)-1)),L(l(we)*3*cl/7)]};function Ef(){return(0,g.c)(kl).scale(164.859)}function vs(qt,oe){for(var we=(1+w)*l(oe),Me=oe,Ue=0,ze;Ue<25&&(Me-=ze=(l(Me/2)+l(Me)-we)/(.5*x(Me/2)+x(Me)),!(C(ze)b&&--Me>0);return ze=we*we,Ge=ze*ze,gr=ze*Ge,[qt/(.84719-.13063*ze+gr*gr*(-.04515+.05494*ze-.02326*Ge+.00331*gr)),we]};function Uo(){return(0,g.c)(gu).scale(175.295)}function hl(qt,oe){return[qt*(1+x(oe))/2,2*(oe-m(oe/2))]}hl.invert=function(qt,oe){for(var we=oe/2,Me=0,Ue=1/0;Me<10&&C(Ue)>h;++Me){var ze=x(oe/2);oe-=Ue=(oe-m(oe/2)-we)/(1-.5/(ze*ze))}return[2*qt/(1+x(oe)),oe]};function Zs(){return(0,g.c)(hl).scale(152.63)}var Ol=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ls(){return Qa(nt(1/0),Ol).rotate([20,0]).scale(152.63)}function rs(qt,oe){var we=l(oe),Me=x(oe),Ue=c(qt);if(qt===0||C(oe)===o)return[0,oe];if(oe===0)return[qt,0];if(C(qt)===o)return[qt*Me,o*we];var ze=u/(2*qt)-2*qt/u,Ge=2*oe/u,gr=(1-Ge*Ge)/(we-Ge),br=ze*ze,sr=gr*gr,Mr=1+br/sr,Ir=1+sr/br,Nr=(ze*we/gr-ze/2)/Mr,en=(sr*we/br+gr/2)/Ir,yn=Nr*Nr+Me*Me/Mr,Rn=en*en-(sr*we*we/br+gr*we-1)/Ir;return[o*(Nr+z(yn)*Ue),o*(en+z(Rn<0?0:Rn)*c(-oe*ze)*Ue)]}rs.invert=function(qt,oe){qt/=o,oe/=o;var we=qt*qt,Me=oe*oe,Ue=we+Me,ze=u*u;return[qt?(Ue-1+z((1-Ue)*(1-Ue)+4*we))/(2*qt)*o:0,Tt(function(Ge){return Ue*(u*l(Ge)-2*Ge)*u+4*Ge*Ge*(oe-l(Ge))+2*u*Ge-ze*oe},0)]};function Wu(){return(0,g.c)(rs).scale(127.267)}var vl=1.0148,Ho=.23185,Ca=-.14499,Yu=.02406,Ec=vl,mu=5*Ho,dl=7*Ca,pl=9*Yu,wo=1.790857183;function yu(qt,oe){var we=oe*oe;return[qt,oe*(vl+we*we*(Ho+we*(Ca+Yu*we)))]}yu.invert=function(qt,oe){oe>wo?oe=wo:oe<-wo&&(oe=-wo);var we=oe,Me;do{var Ue=we*we;we-=Me=(we*(vl+Ue*Ue*(Ho+Ue*(Ca+Yu*Ue)))-oe)/(Ec+Ue*Ue*(mu+Ue*(dl+pl*Ue)))}while(C(Me)>h);return[qt,we]};function ml(){return(0,g.c)(yu).scale(139.319)}function xu(qt,oe){if(C(oe)h&&--Ue>0);return Ge=m(Me),[(C(oe)=0;)if(Me=oe[gr],we[0]===Me[0]&&we[1]===Me[1]){if(ze)return[ze,we];ze=we}}}function Ku(qt){for(var oe=qt.length,we=[],Me=qt[oe-1],Ue=0;Ue0?[-Me[0],0]:[180-Me[0],180])};var oe=Da.map(function(we){return{face:we,project:qt(we)}});return[-1,0,0,1,0,1,4,5].forEach(function(we,Me){var Ue=oe[we];Ue&&(Ue.children||(Ue.children=[])).push(oe[Me])}),ga(oe[0],function(we,Me){return oe[we<-u/2?Me<0?6:4:we<0?Me<0?2:0:weMe^en>Me&&we<(Nr-sr)*(Me-Mr)/(en-Mr)+sr&&(Ue=!Ue)}return Ue}function Pc(qt,oe){var we=oe.stream,Me;if(!we)throw new Error("invalid projection");switch(qt&&qt.type){case"Feature":Me=Ju;break;case"FeatureCollection":Me=Rc;break;default:Me=xl;break}return Me(qt,we)}function Rc(qt,oe){return{type:"FeatureCollection",features:qt.features.map(function(we){return Ju(we,oe)})}}function Ju(qt,oe){return{type:"Feature",id:qt.id,properties:qt.properties,geometry:xl(qt.geometry,oe)}}function Df(qt,oe){return{type:"GeometryCollection",geometries:qt.geometries.map(function(we){return xl(we,oe)})}}function xl(qt,oe){if(!qt)return null;if(qt.type==="GeometryCollection")return Df(qt,oe);var we;switch(qt.type){case"Point":we=bl;break;case"MultiPoint":we=bl;break;case"LineString":we=If;break;case"MultiLineString":we=If;break;case"Polygon":we=Hl;break;case"MultiPolygon":we=Hl;break;case"Sphere":we=Hl;break;default:return null}return(0,gi.c)(qt,oe(we)),we.result()}var ja=[],Co=[],bl={point:function(qt,oe){ja.push([qt,oe])},result:function(){var qt=ja.length?ja.length<2?{type:"Point",coordinates:ja[0]}:{type:"MultiPoint",coordinates:ja}:null;return ja=[],qt}},If={lineStart:Ul,point:function(qt,oe){ja.push([qt,oe])},lineEnd:function(){ja.length&&(Co.push(ja),ja=[])},result:function(){var qt=Co.length?Co.length<2?{type:"LineString",coordinates:Co[0]}:{type:"MultiLineString",coordinates:Co}:null;return Co=[],qt}},Hl={polygonStart:Ul,lineStart:Ul,point:function(qt,oe){ja.push([qt,oe])},lineEnd:function(){var qt=ja.length;if(qt){do ja.push(ja[0].slice());while(++qt<4);Co.push(ja),ja=[]}},polygonEnd:Ul,result:function(){if(!Co.length)return null;var qt=[],oe=[];return Co.forEach(function(we){Cc(we)?qt.push([we]):oe.push(we)}),oe.forEach(function(we){var Me=we[0];qt.some(function(Ue){if(Lc(Ue[0],Me))return Ue.push(we),!0})||qt.push([we])}),Co=[],qt.length?qt.length>1?{type:"MultiPolygon",coordinates:qt}:{type:"Polygon",coordinates:qt[0]}:null}};function gs(qt){var oe=qt(o,0)[0]-qt(-o,0)[0];function we(Me,Ue){var ze=C(Me)0?Me-u:Me+u,Ue),gr=(Ge[0]-Ge[1])*w,br=(Ge[0]+Ge[1])*w;if(ze)return[gr,br];var sr=oe*w,Mr=gr>0^br>0?-1:1;return[Mr*gr-c(br)*sr,Mr*br-c(gr)*sr]}return qt.invert&&(we.invert=function(Me,Ue){var ze=(Me+Ue)*w,Ge=(Ue-Me)*w,gr=C(ze)<.5*oe&&C(Ge)<.5*oe;if(!gr){var br=oe*w,sr=ze>0^Ge>0?-1:1,Mr=-sr*Me+(Ge>0?1:-1)*br,Ir=-sr*Ue+(ze>0?1:-1)*br;ze=(-Mr-Ir)*w,Ge=(Mr-Ir)*w}var Nr=qt.invert(ze,Ge);return gr||(Nr[0]+=ze>0?u:-u),Nr}),(0,g.c)(we).rotate([-90,-90,45]).clipAngle(179.999)}function Dc(){return gs(gn).scale(176.423)}function Ff(){return gs(wr).scale(111.48)}function zf(qt,oe){if(!(0<=(oe=+oe)&&oe<=20))throw new Error("invalid digits");function we(sr){var Mr=sr.length,Ir=2,Nr=new Array(Mr);for(Nr[0]=+sr[0].toFixed(oe),Nr[1]=+sr[1].toFixed(oe);Ir2||en[0]!=Mr[0]||en[1]!=Mr[1])&&(Ir.push(en),Mr=en)}return Ir.length===1&&sr.length>1&&Ir.push(we(sr[sr.length-1])),Ir}function ze(sr){return sr.map(Ue)}function Ge(sr){if(sr==null)return sr;var Mr;switch(sr.type){case"GeometryCollection":Mr={type:"GeometryCollection",geometries:sr.geometries.map(Ge)};break;case"Point":Mr={type:"Point",coordinates:we(sr.coordinates)};break;case"MultiPoint":Mr={type:sr.type,coordinates:Me(sr.coordinates)};break;case"LineString":Mr={type:sr.type,coordinates:Ue(sr.coordinates)};break;case"MultiLineString":case"Polygon":Mr={type:sr.type,coordinates:ze(sr.coordinates)};break;case"MultiPolygon":Mr={type:"MultiPolygon",coordinates:sr.coordinates.map(ze)};break;default:return sr}return sr.bbox!=null&&(Mr.bbox=sr.bbox),Mr}function gr(sr){var Mr={type:"Feature",properties:sr.properties,geometry:Ge(sr.geometry)};return sr.id!=null&&(Mr.id=sr.id),sr.bbox!=null&&(Mr.bbox=sr.bbox),Mr}if(qt!=null)switch(qt.type){case"Feature":return gr(qt);case"FeatureCollection":{var br={type:"FeatureCollection",features:qt.features.map(gr)};return qt.bbox!=null&&(br.bbox=qt.bbox),br}default:return Ge(qt)}return qt}function Qu(qt){var oe=l(qt);function we(Me,Ue){var ze=oe?m(Me*oe/2)/oe:Me/2;if(!Ue)return[2*ze,-qt];var Ge=2*i(ze*l(Ue)),gr=1/m(Ue);return[l(Ge)*gr,Ue+(1-x(Ge))*gr-qt]}return we.invert=function(Me,Ue){if(C(Ue+=qt)h&&--gr>0);var Nr=Me*(sr=m(Ge)),en=m(C(Ue)0?o:-o)*(br+Ue*(Mr-Ge)/2+Ue*Ue*(Mr-2*br+Ge)/2)]}Xo.invert=function(qt,oe){var we=oe/o,Me=we*90,Ue=a(18,C(Me/5)),ze=e(0,p(Ue));do{var Ge=vo[ze][1],gr=vo[ze+1][1],br=vo[a(19,ze+2)][1],sr=br-Ge,Mr=br-2*gr+Ge,Ir=2*(C(we)-gr)/sr,Nr=Mr/sr,en=Ir*(1-Nr*Ir*(1-2*Nr*Ir));if(en>=0||ze===1){Me=(oe>=0?5:-5)*(en+Ue);var yn=50,Rn;do Ue=a(18,C(Me)/5),ze=p(Ue),en=Ue-ze,Ge=vo[ze][1],gr=vo[ze+1][1],br=vo[a(19,ze+2)][1],Me-=(Rn=(oe>=0?o:-o)*(gr+en*(br-Ge)/2+en*en*(br-2*gr+Ge)/2)-oe)*E;while(C(Rn)>b&&--yn>0);break}}while(--ze>=0);var Dn=vo[ze][0],Zn=vo[ze+1][0],Li=vo[a(19,ze+2)][0];return[qt/(Zn+en*(Li-Dn)/2+en*en*(Li-2*Zn+Dn)/2),Me*T]};function Ds(){return(0,g.c)(Xo).scale(152.63)}function wl(qt){function oe(we,Me){var Ue=x(Me),ze=(qt-1)/(qt-Ue*x(we));return[ze*Ue*l(we),ze*l(Me)]}return oe.invert=function(we,Me){var Ue=we*we+Me*Me,ze=z(Ue),Ge=(qt-z(1-Ue*(qt+1)/(qt-1)))/((qt-1)/ze+ze/(qt-1));return[S(we*Ge,ze*z(1-Ge*Ge)),ze?L(Me*Ge/ze):0]},oe}function Au(qt,oe){var we=wl(qt);if(!oe)return we;var Me=x(oe),Ue=l(oe);function ze(Ge,gr){var br=we(Ge,gr),sr=br[1],Mr=sr*Ue/(qt-1)+Me;return[br[0]*Me/Mr,sr/Mr]}return ze.invert=function(Ge,gr){var br=(qt-1)/(qt-1-gr*Ue);return we.invert(br*Ge,br*gr*Me)},ze}function Js(){var qt=2,oe=0,we=(0,g.U)(Au),Me=we(qt,oe);return Me.distance=function(Ue){return arguments.length?we(qt=+Ue,oe):qt},Me.tilt=function(Ue){return arguments.length?we(qt,oe=Ue*T):oe*E},Me.scale(432.147).clipAngle(M(1/qt)*E-1e-6)}var Qs=1e-4,Of=1e4,ms=-180,Tl=ms+Qs,Is=180,ys=Is-Qs,Vl=-90,Al=Vl+Qs,va=90,Ml=va-Qs;function Mu(qt){return qt.length>0}function Nf(qt){return Math.floor(qt*Of)/Of}function Sl(qt){return qt===Vl||qt===va?[0,qt]:[ms,Nf(qt)]}function Gl(qt){var oe=qt[0],we=qt[1],Me=!1;return oe<=Tl?(oe=ms,Me=!0):oe>=ys&&(oe=Is,Me=!0),we<=Al?(we=Vl,Me=!0):we>=Ml&&(we=va,Me=!0),Me?[oe,we]:qt}function Su(qt){return qt.map(Gl)}function $u(qt,oe,we){for(var Me=0,Ue=qt.length;Me=ys||Mr<=Al||Mr>=Ml){ze[Ge]=Gl(br);for(var Ir=Ge+1;IrTl&&enAl&&yn=gr)break;we.push({index:-1,polygon:oe,ring:ze=ze.slice(Ir-1)}),ze[0]=Sl(ze[0][1]),Ge=-1,gr=ze.length}}}}function Wl(qt){var oe,we=qt.length,Me={},Ue={},ze,Ge,gr,br,sr;for(oe=0;oe0?u-gr:gr)*E],sr=(0,g.c)(qt(Ge)).rotate(br),Mr=(0,Xt.c)(br),Ir=sr.center;return delete sr.rotate,sr.center=function(Nr){return arguments.length?Ir(Mr(Nr)):Mr.invert(Ir())},sr.clipAngle(90)}function qu(qt){var oe=x(qt);function we(Me,Ue){var ze=(0,Ps.Y)(Me,Ue);return ze[0]*=oe,ze}return we.invert=function(Me,Ue){return Ps.Y.invert(Me/oe,Ue)},we}function $s(){return Eu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Eu(qt,oe){return ns(qu,qt,oe)}function Zl(qt){if(!(qt*=2))return ot.O;var oe=-qt/2,we=-oe,Me=qt*qt,Ue=m(we),ze=.5/l(we);function Ge(gr,br){var sr=M(x(br)*x(gr-oe)),Mr=M(x(br)*x(gr-we)),Ir=br<0?-1:1;return sr*=sr,Mr*=Mr,[(sr-Mr)/(2*qt),Ir*z(4*Me*Mr-(Me-sr+Mr)*(Me-sr+Mr))/(2*qt)]}return Ge.invert=function(gr,br){var sr=br*br,Mr=x(z(sr+(Nr=gr+oe)*Nr)),Ir=x(z(sr+(Nr=gr+we)*Nr)),Nr,en;return[S(en=Mr-Ir,Nr=(Mr+Ir)*Ue),(br<0?-1:1)*M(z(Nr*Nr+en*en)*ze)]},Ge}function Ic(){return Bf([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Bf(qt,oe){return ns(Zl,qt,oe)}function lo(qt,oe){if(C(oe)h&&--gr>0);return[c(qt)*(z(Ue*Ue+4)+Ue)*u/4,o*Ge]};function Kl(){return(0,g.c)(To).scale(127.16)}function _u(qt,oe,we,Me,Ue){function ze(Ge,gr){var br=we*l(Me*gr),sr=z(1-br*br),Mr=z(2/(1+sr*x(Ge*=Ue)));return[qt*sr*Mr*l(Ge),oe*br*Mr]}return ze.invert=function(Ge,gr){var br=Ge/qt,sr=gr/oe,Mr=z(br*br+sr*sr),Ir=2*L(Mr/2);return[S(Ge*m(Ir),qt*Mr)/Ue,Mr&&L(gr*l(Ir)/(oe*we*Mr))/Me]},ze}function xs(qt,oe,we,Me){var Ue=u/3;qt=e(qt,h),oe=e(oe,h),qt=a(qt,o),oe=a(oe,u-h),we=e(we,0),we=a(we,100-h),Me=e(Me,h);var ze=we/100+1,Ge=Me/100,gr=M(ze*x(Ue))/Ue,br=l(qt)/l(gr*o),sr=oe/u,Mr=z(Ge*l(qt/2)/l(oe/2)),Ir=Mr/z(sr*br*gr),Nr=1/(Mr*z(sr*br*gr));return _u(Ir,Nr,br,gr,sr)}function Os(){var qt=65*T,oe=60*T,we=20,Me=200,Ue=(0,g.U)(xs),ze=Ue(qt,oe,we,Me);return ze.poleline=function(Ge){return arguments.length?Ue(qt=+Ge*T,oe,we,Me):qt*E},ze.parallels=function(Ge){return arguments.length?Ue(qt,oe=+Ge*T,we,Me):oe*E},ze.inflation=function(Ge){return arguments.length?Ue(qt,oe,we=+Ge,Me):we},ze.ratio=function(Ge){return arguments.length?Ue(qt,oe,we,Me=+Ge):Me},ze.scale(163.775)}function tf(){return Os().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Jl=4*u+3*z(3),Ql=2*z(2*u*z(3)/Jl),Cu=mt(Ql*z(3)/u,Ql,Jl/6);function Hf(){return(0,g.c)(Cu).scale(176.84)}function $l(qt,oe){return[qt*z(1-3*oe*oe/(u*u)),oe]}$l.invert=function(qt,oe){return[qt/z(1-3*oe*oe/(u*u)),oe]};function ef(){return(0,g.c)($l).scale(152.63)}function qs(qt,oe){var we=x(oe),Me=x(qt)*we,Ue=1-Me,ze=x(qt=S(l(qt)*we,-l(oe))),Ge=l(qt);return we=z(1-Me*Me),[Ge*we-ze*Ue,-ze*we-Ge*Ue]}qs.invert=function(qt,oe){var we=(qt*qt+oe*oe)/-2,Me=z(-we*(2+we)),Ue=oe*we+qt*Me,ze=qt*we-oe*Me,Ge=z(ze*ze+Ue*Ue);return[S(Me*Ue,Ge*(1+we)),Ge?-L(Me*ze/Ge):0]};function rf(){return(0,g.c)(qs).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function ql(qt,oe){var we=Y(qt,oe);return[(we[0]+qt/o)/2,(we[1]+oe)/2]}ql.invert=function(qt,oe){var we=qt,Me=oe,Ue=25;do{var ze=x(Me),Ge=l(Me),gr=l(2*Me),br=Ge*Ge,sr=ze*ze,Mr=l(we),Ir=x(we/2),Nr=l(we/2),en=Nr*Nr,yn=1-sr*Ir*Ir,Rn=yn?M(ze*Ir)*z(Dn=1/yn):Dn=0,Dn,Zn=.5*(2*Rn*ze*Nr+we/o)-qt,Li=.5*(Rn*Ge+Me)-oe,Pi=.5*Dn*(sr*en+Rn*ze*Ir*br)+.5/o,Ri=Dn*(Mr*gr/4-Rn*Ge*Nr),zi=.125*Dn*(gr*Nr-Rn*Ge*sr*Mr),Xi=.5*Dn*(br*Ir+Rn*en*ze)+.5,da=Ri*zi-Xi*Pi,Ia=(Li*Ri-Zn*Xi)/da,ft=(Zn*zi-Li*Pi)/da;we-=Ia,Me-=ft}while((C(Ia)>h||C(ft)>h)&&--Ue>0);return[we,Me]};function Vf(){return(0,g.c)(ql).scale(158.837)}},88728:function(G,U,t){t.d(U,{c:function(){return g}});function g(){return new C}function C(){this.reset()}C.prototype={constructor:C,reset:function(){this.s=this.t=0},add:function(x){S(i,x,this.t),S(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new C;function S(x,v,p){var r=x.s=v+p,e=r-v,a=r-e;x.t=v-a+(p-e)}},95384:function(G,U,t){t.d(U,{cp:function(){return b},mQ:function(){return x},oB:function(){return f}});var g=t(88728),C=t(64528),i=t(70932),S=t(16016),x=(0,g.c)(),v=(0,g.c)(),p,r,e,a,n,f={point:i.c,lineStart:i.c,lineEnd:i.c,polygonStart:function(){x.reset(),f.lineStart=c,f.lineEnd=l},polygonEnd:function(){var u=+x;v.add(u<0?C.kD+u:u),this.lineStart=this.lineEnd=this.point=i.c},sphere:function(){v.add(C.kD)}};function c(){f.point=m}function l(){h(p,r)}function m(u,o){f.point=h,p=u,r=o,u*=C.qw,o*=C.qw,e=u,a=(0,C.W8)(o=o/2+C.wL),n=(0,C.g$)(o)}function h(u,o){u*=C.qw,o*=C.qw,o=o/2+C.wL;var d=u-e,w=d>=0?1:-1,A=w*d,_=(0,C.W8)(o),y=(0,C.g$)(o),E=n*y,T=a*_+E*(0,C.W8)(A),s=E*w*(0,C.g$)(A);x.add((0,C.WE)(s,T)),e=u,a=_,n=y}function b(u){return v.reset(),(0,S.c)(u,f),v*2}},13696:function(G,U,t){t.d(U,{c:function(){return L}});var g=t(88728),C=t(95384),i=t(84220),S=t(64528),x=t(16016),v,p,r,e,a,n,f,c,l=(0,g.c)(),m,h,b={point:u,lineStart:d,lineEnd:w,polygonStart:function(){b.point=A,b.lineStart=_,b.lineEnd=y,l.reset(),C.oB.polygonStart()},polygonEnd:function(){C.oB.polygonEnd(),b.point=u,b.lineStart=d,b.lineEnd=w,C.mQ<0?(v=-(r=180),p=-(e=90)):l>S.Gg?e=90:l<-S.Gg&&(p=-90),h[0]=v,h[1]=r},sphere:function(){v=-(r=180),p=-(e=90)}};function u(M,z){m.push(h=[v=M,r=M]),ze&&(e=z)}function o(M,z){var D=(0,i.ux)([M*S.qw,z*S.qw]);if(c){var N=(0,i.CW)(c,D),I=[N[1],-N[0],0],k=(0,i.CW)(I,N);(0,i.cJ)(k),k=(0,i.G)(k);var B=M-a,O=B>0?1:-1,H=k[0]*S.oh*O,Y,j=(0,S.a2)(B)>180;j^(O*ae&&(e=Y)):(H=(H+360)%360-180,j^(O*ae&&(e=z))),j?ME(v,r)&&(r=M):E(M,r)>E(v,r)&&(v=M):r>=v?(Mr&&(r=M)):M>a?E(v,M)>E(v,r)&&(r=M):E(M,r)>E(v,r)&&(v=M)}else m.push(h=[v=M,r=M]);ze&&(e=z),c=D,a=M}function d(){b.point=o}function w(){h[0]=v,h[1]=r,b.point=u,c=null}function A(M,z){if(c){var D=M-a;l.add((0,S.a2)(D)>180?D+(D>0?360:-360):D)}else n=M,f=z;C.oB.point(M,z),o(M,z)}function _(){C.oB.lineStart()}function y(){A(n,f),C.oB.lineEnd(),(0,S.a2)(l)>S.Gg&&(v=-(r=180)),h[0]=v,h[1]=r,c=null}function E(M,z){return(z-=M)<0?z+360:z}function T(M,z){return M[0]-z[0]}function s(M,z){return M[0]<=M[1]?M[0]<=z&&z<=M[1]:zE(N[0],N[1])&&(N[1]=I[1]),E(I[0],N[1])>E(N[0],N[1])&&(N[0]=I[0])):k.push(N=I);for(B=-1/0,D=k.length-1,z=0,N=k[D];z<=D;N=I,++z)I=k[z],(O=E(N[1],I[0]))>B&&(B=O,v=I[0],r=N[1])}return m=h=null,v===1/0||p===1/0?[[NaN,NaN],[NaN,NaN]]:[[v,p],[r,e]]}},84220:function(G,U,t){t.d(U,{CW:function(){return x},Ez:function(){return S},G:function(){return C},cJ:function(){return r},mg:function(){return v},ux:function(){return i},wx:function(){return p}});var g=t(64528);function C(e){return[(0,g.WE)(e[1],e[0]),(0,g.qR)(e[2])]}function i(e){var a=e[0],n=e[1],f=(0,g.W8)(n);return[f*(0,g.W8)(a),f*(0,g.g$)(a),(0,g.g$)(n)]}function S(e,a){return e[0]*a[0]+e[1]*a[1]+e[2]*a[2]}function x(e,a){return[e[1]*a[2]-e[2]*a[1],e[2]*a[0]-e[0]*a[2],e[0]*a[1]-e[1]*a[0]]}function v(e,a){e[0]+=a[0],e[1]+=a[1],e[2]+=a[2]}function p(e,a){return[e[0]*a,e[1]*a,e[2]*a]}function r(e){var a=(0,g._I)(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=a,e[1]/=a,e[2]/=a}},24052:function(G,U,t){t.d(U,{c:function(){return D}});var g=t(64528),C=t(70932),i=t(16016),S,x,v,p,r,e,a,n,f,c,l,m,h,b,u,o,d={sphere:C.c,point:w,lineStart:_,lineEnd:T,polygonStart:function(){d.lineStart=s,d.lineEnd=L},polygonEnd:function(){d.lineStart=_,d.lineEnd=T}};function w(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I);A(k*(0,g.W8)(N),k*(0,g.g$)(N),(0,g.g$)(I))}function A(N,I,k){++S,v+=(N-v)/S,p+=(I-p)/S,r+=(k-r)/S}function _(){d.point=y}function y(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I);b=k*(0,g.W8)(N),u=k*(0,g.g$)(N),o=(0,g.g$)(I),d.point=E,A(b,u,o)}function E(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I),B=k*(0,g.W8)(N),O=k*(0,g.g$)(N),H=(0,g.g$)(I),Y=(0,g.WE)((0,g._I)((Y=u*H-o*O)*Y+(Y=o*B-b*H)*Y+(Y=b*O-u*B)*Y),b*B+u*O+o*H);x+=Y,e+=Y*(b+(b=B)),a+=Y*(u+(u=O)),n+=Y*(o+(o=H)),A(b,u,o)}function T(){d.point=w}function s(){d.point=M}function L(){z(m,h),d.point=w}function M(N,I){m=N,h=I,N*=g.qw,I*=g.qw,d.point=z;var k=(0,g.W8)(I);b=k*(0,g.W8)(N),u=k*(0,g.g$)(N),o=(0,g.g$)(I),A(b,u,o)}function z(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I),B=k*(0,g.W8)(N),O=k*(0,g.g$)(N),H=(0,g.g$)(I),Y=u*H-o*O,j=o*B-b*H,et=b*O-u*B,it=(0,g._I)(Y*Y+j*j+et*et),ut=(0,g.qR)(it),J=it&&-ut/it;f+=J*Y,c+=J*j,l+=J*et,x+=ut,e+=ut*(b+(b=B)),a+=ut*(u+(u=O)),n+=ut*(o+(o=H)),A(b,u,o)}function D(N){S=x=v=p=r=e=a=n=f=c=l=0,(0,i.c)(N,d);var I=f,k=c,B=l,O=I*I+k*k+B*B;return O0?fc)&&(f+=n*i.kD));for(var b,u=f;n>0?u>c:u0?C.pi:-C.pi,l=(0,C.a2)(n-p);(0,C.a2)(l-C.pi)0?C.or:-C.or),v.point(e,r),v.lineEnd(),v.lineStart(),v.point(c,r),v.point(n,r),a=0):e!==c&&l>=C.pi&&((0,C.a2)(p-e)C.Gg?(0,C.MQ)(((0,C.g$)(p)*(n=(0,C.W8)(e))*(0,C.g$)(r)-(0,C.g$)(e)*(a=(0,C.W8)(p))*(0,C.g$)(v))/(a*n*f)):(p+e)/2}function x(v,p,r,e){var a;if(v==null)a=r*C.or,e.point(-C.pi,a),e.point(0,a),e.point(C.pi,a),e.point(C.pi,0),e.point(C.pi,-a),e.point(0,-a),e.point(-C.pi,-a),e.point(-C.pi,0),e.point(-C.pi,a);else if((0,C.a2)(v[0]-p[0])>C.Gg){var n=v[0]1&&i.push(i.pop().concat(i.shift()))},result:function(){var x=i;return i=[],S=null,x}}}},2728:function(G,U,t){t.d(U,{c:function(){return v}});var g=t(84220),C=t(61780),i=t(64528),S=t(41860),x=t(14229);function v(p){var r=(0,i.W8)(p),e=6*i.qw,a=r>0,n=(0,i.a2)(r)>i.Gg;function f(b,u,o,d){(0,C.Q)(d,p,e,o,b,u)}function c(b,u){return(0,i.W8)(b)*(0,i.W8)(u)>r}function l(b){var u,o,d,w,A;return{lineStart:function(){w=d=!1,A=1},point:function(_,y){var E=[_,y],T,s=c(_,y),L=a?s?0:h(_,y):s?h(_+(_<0?i.pi:-i.pi),y):0;if(!u&&(w=d=s)&&b.lineStart(),s!==d&&(T=m(u,E),(!T||(0,S.c)(u,T)||(0,S.c)(E,T))&&(E[2]=1)),s!==d)A=0,s?(b.lineStart(),T=m(E,u),b.point(T[0],T[1])):(T=m(u,E),b.point(T[0],T[1],2),b.lineEnd()),u=T;else if(n&&u&&a^s){var M;!(L&o)&&(M=m(E,u,!0))&&(A=0,a?(b.lineStart(),b.point(M[0][0],M[0][1]),b.point(M[1][0],M[1][1]),b.lineEnd()):(b.point(M[1][0],M[1][1]),b.lineEnd(),b.lineStart(),b.point(M[0][0],M[0][1],3)))}s&&(!u||!(0,S.c)(u,E))&&b.point(E[0],E[1]),u=E,d=s,o=L},lineEnd:function(){d&&b.lineEnd(),u=null},clean:function(){return A|(w&&d)<<1}}}function m(b,u,o){var d=(0,g.ux)(b),w=(0,g.ux)(u),A=[1,0,0],_=(0,g.CW)(d,w),y=(0,g.Ez)(_,_),E=_[0],T=y-E*E;if(!T)return!o&&b;var s=r*y/T,L=-r*E/T,M=(0,g.CW)(A,_),z=(0,g.wx)(A,s),D=(0,g.wx)(_,L);(0,g.mg)(z,D);var N=M,I=(0,g.Ez)(z,N),k=(0,g.Ez)(N,N),B=I*I-k*((0,g.Ez)(z,z)-1);if(!(B<0)){var O=(0,i._I)(B),H=(0,g.wx)(N,(-I-O)/k);if((0,g.mg)(H,z),H=(0,g.G)(H),!o)return H;var Y=b[0],j=u[0],et=b[1],it=u[1],ut;j0^H[1]<((0,i.a2)(H[0]-Y)i.pi^(Y<=H[0]&&H[0]<=j)){var V=(0,g.wx)(N,(-I+O)/k);return(0,g.mg)(V,z),[H,(0,g.G)(V)]}}}function h(b,u){var o=a?p:i.pi-p,d=0;return b<-o?d|=1:b>o&&(d|=2),u<-o?d|=4:u>o&&(d|=8),d}return(0,x.c)(c,l,f,a?[0,-p]:[-i.pi,p-i.pi])}},14229:function(G,U,t){t.d(U,{c:function(){return v}});var g=t(97208),C=t(32232),i=t(64528),S=t(58196),x=t(84706);function v(e,a,n,f){return function(c){var l=a(c),m=(0,g.c)(),h=a(m),b=!1,u,o,d,w={point:A,lineStart:y,lineEnd:E,polygonStart:function(){w.point=T,w.lineStart=s,w.lineEnd=L,o=[],u=[]},polygonEnd:function(){w.point=A,w.lineStart=y,w.lineEnd=E,o=(0,x.Uf)(o);var M=(0,S.c)(u,f);o.length?(b||(c.polygonStart(),b=!0),(0,C.c)(o,r,M,n,c)):M&&(b||(c.polygonStart(),b=!0),c.lineStart(),n(null,null,1,c),c.lineEnd()),b&&(c.polygonEnd(),b=!1),o=u=null},sphere:function(){c.polygonStart(),c.lineStart(),n(null,null,1,c),c.lineEnd(),c.polygonEnd()}};function A(M,z){e(M,z)&&c.point(M,z)}function _(M,z){l.point(M,z)}function y(){w.point=_,l.lineStart()}function E(){w.point=A,l.lineEnd()}function T(M,z){d.push([M,z]),h.point(M,z)}function s(){h.lineStart(),d=[]}function L(){T(d[0][0],d[0][1]),h.lineEnd();var M=h.clean(),z=m.result(),D,N=z.length,I,k,B;if(d.pop(),u.push(d),d=null,!!N){if(M&1){if(k=z[0],(I=k.length-1)>0){for(b||(c.polygonStart(),b=!0),c.lineStart(),D=0;D1&&M&2&&z.push(z.pop().concat(z.shift())),o.push(z.filter(p))}}return w}}function p(e){return e.length>1}function r(e,a){return((e=e.x)[0]<0?e[1]-i.or-i.Gg:i.or-e[1])-((a=a.x)[0]<0?a[1]-i.or-i.Gg:i.or-a[1])}},21676:function(G,U,t){t.d(U,{c:function(){return r}});var g=t(64528),C=t(97208);function i(e,a,n,f,c,l){var m=e[0],h=e[1],b=a[0],u=a[1],o=0,d=1,w=b-m,A=u-h,_;if(_=n-m,!(!w&&_>0)){if(_/=w,w<0){if(_0){if(_>d)return;_>o&&(o=_)}if(_=c-m,!(!w&&_<0)){if(_/=w,w<0){if(_>d)return;_>o&&(o=_)}else if(w>0){if(_0)){if(_/=A,A<0){if(_0){if(_>d)return;_>o&&(o=_)}if(_=l-h,!(!A&&_<0)){if(_/=A,A<0){if(_>d)return;_>o&&(o=_)}else if(A>0){if(_0&&(e[0]=m+o*w,e[1]=h+o*A),d<1&&(a[0]=m+d*w,a[1]=h+d*A),!0}}}}}var S=t(32232),x=t(84706),v=1e9,p=-v;function r(e,a,n,f){function c(u,o){return e<=u&&u<=n&&a<=o&&o<=f}function l(u,o,d,w){var A=0,_=0;if(u==null||(A=m(u,d))!==(_=m(o,d))||b(u,o)<0^d>0)do w.point(A===0||A===3?e:n,A>1?f:a);while((A=(A+d+4)%4)!==_);else w.point(o[0],o[1])}function m(u,o){return(0,g.a2)(u[0]-e)0?0:3:(0,g.a2)(u[0]-n)0?2:1:(0,g.a2)(u[1]-a)0?1:0:o>0?3:2}function h(u,o){return b(u.x,o.x)}function b(u,o){var d=m(u,1),w=m(o,1);return d!==w?d-w:d===0?o[1]-u[1]:d===1?u[0]-o[0]:d===2?u[1]-o[1]:o[0]-u[0]}return function(u){var o=u,d=(0,C.c)(),w,A,_,y,E,T,s,L,M,z,D,N={point:I,lineStart:H,lineEnd:Y,polygonStart:B,polygonEnd:O};function I(et,it){c(et,it)&&o.point(et,it)}function k(){for(var et=0,it=0,ut=A.length;itf&&($-Q)*(f-ot)>(Z-ot)*(e-Q)&&++et:Z<=f&&($-Q)*(f-ot)<(Z-ot)*(e-Q)&&--et;return et}function B(){o=d,w=[],A=[],D=!0}function O(){var et=k(),it=D&&et,ut=(w=(0,x.Uf)(w)).length;(it||ut)&&(u.polygonStart(),it&&(u.lineStart(),l(null,null,1,u),u.lineEnd()),ut&&(0,S.c)(w,h,et,l,u),u.polygonEnd()),o=u,w=A=_=null}function H(){N.point=j,A&&A.push(_=[]),z=!0,M=!1,s=L=NaN}function Y(){w&&(j(y,E),T&&M&&d.rejoin(),w.push(d.result())),N.point=I,M&&o.lineEnd()}function j(et,it){var ut=c(et,it);if(A&&_.push([et,it]),z)y=et,E=it,T=ut,z=!1,ut&&(o.lineStart(),o.point(et,it));else if(ut&&M)o.point(et,it);else{var J=[s=Math.max(p,Math.min(v,s)),L=Math.max(p,Math.min(v,L))],X=[et=Math.max(p,Math.min(v,et)),it=Math.max(p,Math.min(v,it))];i(J,X,e,a,n,f)?(M||(o.lineStart(),o.point(J[0],J[1])),o.point(X[0],X[1]),ut||o.lineEnd(),D=!1):ut&&(o.lineStart(),o.point(et,it),D=!1)}s=et,L=it,M=ut}return N}}},32232:function(G,U,t){t.d(U,{c:function(){return S}});var g=t(41860),C=t(64528);function i(v,p,r,e){this.x=v,this.z=p,this.o=r,this.e=e,this.v=!1,this.n=this.p=null}function S(v,p,r,e,a){var n=[],f=[],c,l;if(v.forEach(function(d){if(!((w=d.length-1)<=0)){var w,A=d[0],_=d[w],y;if((0,g.c)(A,_)){if(!A[2]&&!_[2]){for(a.lineStart(),c=0;c=0;--c)a.point((b=h[c])[0],b[1]);else e(u.x,u.p.x,-1,a);u=u.p}u=u.o,h=u.z,o=!o}while(!u.v);a.lineEnd()}}}function x(v){if(p=v.length){for(var p,r=0,e=v[0],a;++r0&&(an=T(Tr[pn],Tr[pn-1]),an>0&&Wr<=an&&Ur<=an&&(Wr+Ur-an)*(1-Math.pow((Wr-Ur)/an,2))n.Gg}).map(li)).concat((0,O.ik)((0,n.Km)(pn/ni)*ni,an,ni).filter(function(Tn){return(0,n.a2)(Tn%di)>n.Gg}).map(ri))}return dn.lines=function(){return Vn().map(function(Tn){return{type:"LineString",coordinates:Tn}})},dn.outline=function(){return{type:"Polygon",coordinates:[wr(Ur).concat(nn(gn).slice(1),wr(Wr).reverse().slice(1),nn(_n).reverse().slice(1))]}},dn.extent=function(Tn){return arguments.length?dn.extentMajor(Tn).extentMinor(Tn):dn.extentMinor()},dn.extentMajor=function(Tn){return arguments.length?(Ur=+Tn[0][0],Wr=+Tn[1][0],_n=+Tn[0][1],gn=+Tn[1][1],Ur>Wr&&(Tn=Ur,Ur=Wr,Wr=Tn),_n>gn&&(Tn=_n,_n=gn,gn=Tn),dn.precision($r)):[[Ur,_n],[Wr,gn]]},dn.extentMinor=function(Tn){return arguments.length?(Cr=+Tn[0][0],Tr=+Tn[1][0],pn=+Tn[0][1],an=+Tn[1][1],Cr>Tr&&(Tn=Cr,Cr=Tr,Tr=Tn),pn>an&&(Tn=pn,pn=an,an=Tn),dn.precision($r)):[[Cr,pn],[Tr,an]]},dn.step=function(Tn){return arguments.length?dn.stepMajor(Tn).stepMinor(Tn):dn.stepMinor()},dn.stepMajor=function(Tn){return arguments.length?(ci=+Tn[0],di=+Tn[1],dn):[ci,di]},dn.stepMinor=function(Tn){return arguments.length?(kn=+Tn[0],ni=+Tn[1],dn):[kn,ni]},dn.precision=function(Tn){return arguments.length?($r=+Tn,li=H(pn,an,90),ri=Y(Cr,Tr,$r),wr=H(_n,gn,90),nn=Y(Ur,Wr,$r),dn):$r},dn.extentMajor([[-180,-90+n.Gg],[180,90-n.Gg]]).extentMinor([[-180,-80-n.Gg],[180,80+n.Gg]])}function et(){return j()()}var it=t(27284),ut=t(7376),J=(0,a.c)(),X=(0,a.c)(),tt,V,Q,ot,$={point:f.c,lineStart:f.c,lineEnd:f.c,polygonStart:function(){$.lineStart=Z,$.lineEnd=ct},polygonEnd:function(){$.lineStart=$.lineEnd=$.point=f.c,J.add((0,n.a2)(X)),X.reset()},result:function(){var Tr=J/2;return J.reset(),Tr}};function Z(){$.point=st}function st(Tr,Cr){$.point=nt,tt=Q=Tr,V=ot=Cr}function nt(Tr,Cr){X.add(ot*Tr-Q*Cr),Q=Tr,ot=Cr}function ct(){nt(tt,V)}var gt=$,Tt=t(73784),wt=0,Rt=0,bt=0,At=0,mt=0,Lt=0,Ht=0,Ut=0,kt=0,Vt,It,re,Kt,$t={point:le,lineStart:he,lineEnd:Se,polygonStart:function(){$t.lineStart=ne,$t.lineEnd=zt},polygonEnd:function(){$t.point=le,$t.lineStart=he,$t.lineEnd=Se},result:function(){var Tr=kt?[Ht/kt,Ut/kt]:Lt?[At/Lt,mt/Lt]:bt?[wt/bt,Rt/bt]:[NaN,NaN];return wt=Rt=bt=At=mt=Lt=Ht=Ut=kt=0,Tr}};function le(Tr,Cr){wt+=Tr,Rt+=Cr,++bt}function he(){$t.point=de}function de(Tr,Cr){$t.point=xe,le(re=Tr,Kt=Cr)}function xe(Tr,Cr){var Wr=Tr-re,Ur=Cr-Kt,an=(0,n._I)(Wr*Wr+Ur*Ur);At+=an*(re+Tr)/2,mt+=an*(Kt+Cr)/2,Lt+=an,le(re=Tr,Kt=Cr)}function Se(){$t.point=le}function ne(){$t.point=Xt}function zt(){Jt(Vt,It)}function Xt(Tr,Cr){$t.point=Jt,le(Vt=re=Tr,It=Kt=Cr)}function Jt(Tr,Cr){var Wr=Tr-re,Ur=Cr-Kt,an=(0,n._I)(Wr*Wr+Ur*Ur);At+=an*(re+Tr)/2,mt+=an*(Kt+Cr)/2,Lt+=an,an=Kt*Tr-re*Cr,Ht+=an*(re+Tr),Ut+=an*(Kt+Cr),kt+=an*3,le(re=Tr,Kt=Cr)}var Wt=$t;function Ft(Tr){this._context=Tr}Ft.prototype={_radius:4.5,pointRadius:function(Tr){return this._radius=Tr,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Tr,Cr){switch(this._point){case 0:{this._context.moveTo(Tr,Cr),this._point=1;break}case 1:{this._context.lineTo(Tr,Cr);break}default:{this._context.moveTo(Tr+this._radius,Cr),this._context.arc(Tr,Cr,this._radius,0,n.kD);break}}},result:f.c};var xt=(0,a.c)(),yt,Et,Mt,Nt,jt,ie={point:f.c,lineStart:function(){ie.point=me},lineEnd:function(){yt&&be(Et,Mt),ie.point=f.c},polygonStart:function(){yt=!0},polygonEnd:function(){yt=null},result:function(){var Tr=+xt;return xt.reset(),Tr}};function me(Tr,Cr){ie.point=be,Et=Nt=Tr,Mt=jt=Cr}function be(Tr,Cr){Nt-=Tr,jt-=Cr,xt.add((0,n._I)(Nt*Nt+jt*jt)),Nt=Tr,jt=Cr}var ve=ie;function Le(){this._string=[]}Le.prototype={_radius:4.5,_circle:ce(4.5),pointRadius:function(Tr){return(Tr=+Tr)!==this._radius&&(this._radius=Tr,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Tr,Cr){switch(this._point){case 0:{this._string.push("M",Tr,",",Cr),this._point=1;break}case 1:{this._string.push("L",Tr,",",Cr);break}default:{this._circle==null&&(this._circle=ce(this._radius)),this._string.push("M",Tr,",",Cr,this._circle);break}}},result:function(){if(this._string.length){var Tr=this._string.join("");return this._string=[],Tr}else return null}};function ce(Tr){return"m0,"+Tr+"a"+Tr+","+Tr+" 0 1,1 0,"+-2*Tr+"a"+Tr+","+Tr+" 0 1,1 0,"+2*Tr+"z"}function Te(Tr,Cr){var Wr=4.5,Ur,an;function pn(gn){return gn&&(typeof Wr=="function"&&an.pointRadius(+Wr.apply(this,arguments)),(0,c.c)(gn,Ur(an))),an.result()}return pn.area=function(gn){return(0,c.c)(gn,Ur(gt)),gt.result()},pn.measure=function(gn){return(0,c.c)(gn,Ur(ve)),ve.result()},pn.bounds=function(gn){return(0,c.c)(gn,Ur(Tt.c)),Tt.c.result()},pn.centroid=function(gn){return(0,c.c)(gn,Ur(Wt)),Wt.result()},pn.projection=function(gn){return arguments.length?(Ur=gn==null?(Tr=null,ut.c):(Tr=gn).stream,pn):Tr},pn.context=function(gn){return arguments.length?(an=gn==null?(Cr=null,new Le):new Ft(Cr=gn),typeof Wr!="function"&&an.pointRadius(Wr),pn):Cr},pn.pointRadius=function(gn){return arguments.length?(Wr=typeof gn=="function"?gn:(an.pointRadius(+gn),+gn),pn):Wr},pn.projection(Tr).context(Cr)}var Be=t(87952);function ir(Tr){var Cr=0,Wr=n.pi/3,Ur=(0,Be.U)(Tr),an=Ur(Cr,Wr);return an.parallels=function(pn){return arguments.length?Ur(Cr=pn[0]*n.qw,Wr=pn[1]*n.qw):[Cr*n.oh,Wr*n.oh]},an}function pe(Tr){var Cr=(0,n.W8)(Tr);function Wr(Ur,an){return[Ur*Cr,(0,n.g$)(an)/Cr]}return Wr.invert=function(Ur,an){return[Ur/Cr,(0,n.qR)(an*Cr)]},Wr}function Xe(Tr,Cr){var Wr=(0,n.g$)(Tr),Ur=(Wr+(0,n.g$)(Cr))/2;if((0,n.a2)(Ur)=.12&&$r<.234&&nn>=-.425&&nn<-.214?an:$r>=.166&&$r<.234&&nn>=-.214&&nn<-.115?gn:Wr).invert(li)},ci.stream=function(li){return Tr&&Cr===li?Tr:Tr=ge([Wr.stream(Cr=li),an.stream(li),gn.stream(li)])},ci.precision=function(li){return arguments.length?(Wr.precision(li),an.precision(li),gn.precision(li),di()):Wr.precision()},ci.scale=function(li){return arguments.length?(Wr.scale(li),an.scale(li*.35),gn.scale(li),ci.translate(Wr.translate())):Wr.scale()},ci.translate=function(li){if(!arguments.length)return Wr.translate();var ri=Wr.scale(),wr=+li[0],nn=+li[1];return Ur=Wr.translate(li).clipExtent([[wr-.455*ri,nn-.238*ri],[wr+.455*ri,nn+.238*ri]]).stream(ni),pn=an.translate([wr-.307*ri,nn+.201*ri]).clipExtent([[wr-.425*ri+n.Gg,nn+.12*ri+n.Gg],[wr-.214*ri-n.Gg,nn+.234*ri-n.Gg]]).stream(ni),_n=gn.translate([wr-.205*ri,nn+.212*ri]).clipExtent([[wr-.214*ri+n.Gg,nn+.166*ri+n.Gg],[wr-.115*ri-n.Gg,nn+.234*ri-n.Gg]]).stream(ni),di()},ci.fitExtent=function(li,ri){return(0,$e.QX)(ci,li,ri)},ci.fitSize=function(li,ri){return(0,$e.UV)(ci,li,ri)},ci.fitWidth=function(li,ri){return(0,$e.Qx)(ci,li,ri)},ci.fitHeight=function(li,ri){return(0,$e.OW)(ci,li,ri)};function di(){return Tr=Cr=null,ci}return ci.scale(1070)}var Ae=t(54724),Ce=t(69020),Ie=t(92992);function Pe(Tr,Cr){return[Tr,(0,n.Yz)((0,n.a6)((n.or+Cr)/2))]}Pe.invert=function(Tr,Cr){return[Tr,2*(0,n.MQ)((0,n.oN)(Cr))-n.or]};function ke(){return Ve(Pe).scale(961/n.kD)}function Ve(Tr){var Cr=(0,Be.c)(Tr),Wr=Cr.center,Ur=Cr.scale,an=Cr.translate,pn=Cr.clipExtent,gn=null,_n,kn,ni;Cr.scale=function(di){return arguments.length?(Ur(di),ci()):Ur()},Cr.translate=function(di){return arguments.length?(an(di),ci()):an()},Cr.center=function(di){return arguments.length?(Wr(di),ci()):Wr()},Cr.clipExtent=function(di){return arguments.length?(di==null?gn=_n=kn=ni=null:(gn=+di[0][0],_n=+di[0][1],kn=+di[1][0],ni=+di[1][1]),ci()):gn==null?null:[[gn,_n],[kn,ni]]};function ci(){var di=n.pi*Ur(),li=Cr((0,Ie.c)(Cr.rotate()).invert([0,0]));return pn(gn==null?[[li[0]-di,li[1]-di],[li[0]+di,li[1]+di]]:Tr===Pe?[[Math.max(li[0]-di,gn),_n],[Math.min(li[0]+di,kn),ni]]:[[gn,Math.max(li[1]-di,_n)],[kn,Math.min(li[1]+di,ni)]])}return ci()}function Je(Tr){return(0,n.a6)((n.or+Tr)/2)}function ur(Tr,Cr){var Wr=(0,n.W8)(Tr),Ur=Tr===Cr?(0,n.g$)(Tr):(0,n.Yz)(Wr/(0,n.W8)(Cr))/(0,n.Yz)(Je(Cr)/Je(Tr)),an=Wr*(0,n.g3)(Je(Tr),Ur)/Ur;if(!Ur)return Pe;function pn(gn,_n){an>0?_n<-n.or+n.Gg&&(_n=-n.or+n.Gg):_n>n.or-n.Gg&&(_n=n.or-n.Gg);var kn=an/(0,n.g3)(Je(_n),Ur);return[kn*(0,n.g$)(Ur*gn),an-kn*(0,n.W8)(Ur*gn)]}return pn.invert=function(gn,_n){var kn=an-_n,ni=(0,n.kq)(Ur)*(0,n._I)(gn*gn+kn*kn),ci=(0,n.WE)(gn,(0,n.a2)(kn))*(0,n.kq)(kn);return kn*Ur<0&&(ci-=n.pi*(0,n.kq)(gn)*(0,n.kq)(kn)),[ci/Ur,2*(0,n.MQ)((0,n.g3)(an/ni,1/Ur))-n.or]},pn}function hr(){return ir(ur).scale(109.5).parallels([30,30])}var vr=t(69604);function Yt(Tr,Cr){var Wr=(0,n.W8)(Tr),Ur=Tr===Cr?(0,n.g$)(Tr):(Wr-(0,n.W8)(Cr))/(Cr-Tr),an=Wr/Ur+Tr;if((0,n.a2)(Ur)2?Ur[2]+90:90]):(Ur=Wr(),[Ur[0],Ur[1],Ur[2]-90])},Wr([0,0,90]).scale(159.155)}},27284:function(G,U,t){t.d(U,{c:function(){return C}});var g=t(64528);function C(i,S){var x=i[0]*g.qw,v=i[1]*g.qw,p=S[0]*g.qw,r=S[1]*g.qw,e=(0,g.W8)(v),a=(0,g.g$)(v),n=(0,g.W8)(r),f=(0,g.g$)(r),c=e*(0,g.W8)(x),l=e*(0,g.g$)(x),m=n*(0,g.W8)(p),h=n*(0,g.g$)(p),b=2*(0,g.qR)((0,g._I)((0,g.SD)(r-v)+e*n*(0,g.SD)(p-x))),u=(0,g.g$)(b),o=b?function(d){var w=(0,g.g$)(d*=b)/u,A=(0,g.g$)(b-d)/u,_=A*c+w*m,y=A*l+w*h,E=A*a+w*f;return[(0,g.WE)(y,_)*g.oh,(0,g.WE)(E,(0,g._I)(_*_+y*y))*g.oh]}:function(){return[x*g.oh,v*g.oh]};return o.distance=b,o}},64528:function(G,U,t){t.d(U,{Gg:function(){return g},Km:function(){return c},MQ:function(){return a},SD:function(){return _},W8:function(){return f},WE:function(){return n},Yz:function(){return m},_I:function(){return o},a2:function(){return e},a6:function(){return d},a8:function(){return C},g$:function(){return b},g3:function(){return h},kD:function(){return v},kq:function(){return u},mE:function(){return w},oN:function(){return l},oh:function(){return p},or:function(){return S},pi:function(){return i},qR:function(){return A},qw:function(){return r},wL:function(){return x}});var g=1e-6,C=1e-12,i=Math.PI,S=i/2,x=i/4,v=i*2,p=180/i,r=i/180,e=Math.abs,a=Math.atan,n=Math.atan2,f=Math.cos,c=Math.ceil,l=Math.exp,m=Math.log,h=Math.pow,b=Math.sin,u=Math.sign||function(y){return y>0?1:y<0?-1:0},o=Math.sqrt,d=Math.tan;function w(y){return y>1?0:y<-1?i:Math.acos(y)}function A(y){return y>1?S:y<-1?-S:Math.asin(y)}function _(y){return(y=b(y/2))*y}},70932:function(G,U,t){t.d(U,{c:function(){return g}});function g(){}},73784:function(G,U,t){var g=t(70932),C=1/0,i=C,S=-C,x=S,v={point:p,lineStart:g.c,lineEnd:g.c,polygonStart:g.c,polygonEnd:g.c,result:function(){var r=[[C,i],[S,x]];return S=x=-(i=C=1/0),r}};function p(r,e){rS&&(S=r),ex&&(x=e)}U.c=v},41860:function(G,U,t){t.d(U,{c:function(){return C}});var g=t(64528);function C(i,S){return(0,g.a2)(i[0]-S[0])=0?1:-1,N=D*z,I=N>i.pi,k=A*L;if(S.add((0,i.WE)(k*D*(0,i.g$)(N),_*M+k*(0,i.W8)(N))),c+=I?z+D*i.kD:z,I^d>=e^T>=e){var B=(0,C.CW)((0,C.ux)(o),(0,C.ux)(E));(0,C.cJ)(B);var O=(0,C.CW)(f,B);(0,C.cJ)(O);var H=(I^z>=0?-1:1)*(0,i.qR)(O[2]);(a>H||a===H&&(B[0]||B[1]))&&(l+=I^z>=0?1:-1)}}return(c<-i.Gg||c4*_&&H--){var ut=L+k,J=M+B,X=z+O,tt=(0,v._I)(ut*ut+J*J+X*X),V=(0,v.qR)(X/=tt),Q=(0,v.a2)((0,v.a2)(X)-1)_||(0,v.a2)((j*st+et*nt)/it-.5)>.3||L*k+M*B+z*O2?ct[2]%360*v.qw:0,st()):[M*v.oh,z*v.oh,D*v.oh]},$.angle=function(ct){return arguments.length?(I=ct%360*v.qw,st()):I*v.oh},$.reflectX=function(ct){return arguments.length?(k=ct?-1:1,st()):k<0},$.reflectY=function(ct){return arguments.length?(B=ct?-1:1,st()):B<0},$.precision=function(ct){return arguments.length?(X=c(tt,J=ct*ct),nt()):(0,v._I)(J)},$.fitExtent=function(ct,gt){return(0,e.QX)($,ct,gt)},$.fitSize=function(ct,gt){return(0,e.UV)($,ct,gt)},$.fitWidth=function(ct,gt){return(0,e.Qx)($,ct,gt)},$.fitHeight=function(ct,gt){return(0,e.OW)($,ct,gt)};function st(){var ct=o(y,0,0,k,B,I).apply(null,_(s,L)),gt=(I?o:u)(y,E-ct[0],T-ct[1],k,B,I);return N=(0,p.O)(M,z,D),tt=(0,S.c)(_,gt),V=(0,S.c)(N,tt),X=c(tt,J),nt()}function nt(){return Q=ot=null,$}return function(){return _=A.apply(this,arguments),$.invert=_.invert&&Z,st()}}},47984:function(G,U,t){t.d(U,{c:function(){return S},g:function(){return i}});var g=t(87952),C=t(64528);function i(x,v){var p=v*v,r=p*p;return[x*(.8707-.131979*p+r*(-.013791+r*(.003971*p-.001529*r))),v*(1.007226+p*(.015085+r*(-.044475+.028874*p-.005916*r)))]}i.invert=function(x,v){var p=v,r=25,e;do{var a=p*p,n=a*a;p-=e=(p*(1.007226+a*(.015085+n*(-.044475+.028874*a-.005916*n)))-v)/(1.007226+a*(.045255+n*(-.311325+.259866*a-.06507600000000001*n)))}while((0,C.a2)(e)>C.Gg&&--r>0);return[x/(.8707+(a=p*p)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),p]};function S(){return(0,g.c)(i).scale(175.295)}},4888:function(G,U,t){t.d(U,{c:function(){return x},t:function(){return S}});var g=t(64528),C=t(62280),i=t(87952);function S(v,p){return[(0,g.W8)(p)*(0,g.g$)(v),(0,g.g$)(p)]}S.invert=(0,C.g)(g.qR);function x(){return(0,i.c)(S).scale(249.5).clipAngle(90+g.Gg)}},92992:function(G,U,t){t.d(U,{O:function(){return S},c:function(){return r}});var g=t(68120),C=t(64528);function i(e,a){return[(0,C.a2)(e)>C.pi?e+Math.round(-e/C.kD)*C.kD:e,a]}i.invert=i;function S(e,a,n){return(e%=C.kD)?a||n?(0,g.c)(v(e),p(a,n)):v(e):a||n?p(a,n):i}function x(e){return function(a,n){return a+=e,[a>C.pi?a-C.kD:a<-C.pi?a+C.kD:a,n]}}function v(e){var a=x(e);return a.invert=x(-e),a}function p(e,a){var n=(0,C.W8)(e),f=(0,C.g$)(e),c=(0,C.W8)(a),l=(0,C.g$)(a);function m(h,b){var u=(0,C.W8)(b),o=(0,C.W8)(h)*u,d=(0,C.g$)(h)*u,w=(0,C.g$)(b),A=w*n+o*f;return[(0,C.WE)(d*c-A*l,o*n-w*f),(0,C.qR)(A*c+d*l)]}return m.invert=function(h,b){var u=(0,C.W8)(b),o=(0,C.W8)(h)*u,d=(0,C.g$)(h)*u,w=(0,C.g$)(b),A=w*c-d*l;return[(0,C.WE)(d*c+w*l,o*n+A*f),(0,C.qR)(A*n-o*f)]},m}function r(e){e=S(e[0]*C.qw,e[1]*C.qw,e.length>2?e[2]*C.qw:0);function a(n){return n=e(n[0]*C.qw,n[1]*C.qw),n[0]*=C.oh,n[1]*=C.oh,n}return a.invert=function(n){return n=e.invert(n[0]*C.qw,n[1]*C.qw),n[0]*=C.oh,n[1]*=C.oh,n},a}},16016:function(G,U,t){t.d(U,{c:function(){return v}});function g(p,r){p&&i.hasOwnProperty(p.type)&&i[p.type](p,r)}var C={Feature:function(p,r){g(p.geometry,r)},FeatureCollection:function(p,r){for(var e=p.features,a=-1,n=e.length;++a=0;)xt+=yt[Et].value;Ft.value=xt}function a(){return this.eachAfter(e)}function n(Ft){var xt=this,yt,Et=[xt],Mt,Nt,jt;do for(yt=Et.reverse(),Et=[];xt=yt.pop();)if(Ft(xt),Mt=xt.children,Mt)for(Nt=0,jt=Mt.length;Nt=0;--Mt)yt.push(Et[Mt]);return this}function c(Ft){for(var xt=this,yt=[xt],Et=[],Mt,Nt,jt;xt=yt.pop();)if(Et.push(xt),Mt=xt.children,Mt)for(Nt=0,jt=Mt.length;Nt=0;)yt+=Et[Mt].value;xt.value=yt})}function m(Ft){return this.eachBefore(function(xt){xt.children&&xt.children.sort(Ft)})}function h(Ft){for(var xt=this,yt=b(xt,Ft),Et=[xt];xt!==yt;)xt=xt.parent,Et.push(xt);for(var Mt=Et.length;Ft!==yt;)Et.splice(Mt,0,Ft),Ft=Ft.parent;return Et}function b(Ft,xt){if(Ft===xt)return Ft;var yt=Ft.ancestors(),Et=xt.ancestors(),Mt=null;for(Ft=yt.pop(),xt=Et.pop();Ft===xt;)Mt=Ft,Ft=yt.pop(),xt=Et.pop();return Mt}function u(){for(var Ft=this,xt=[Ft];Ft=Ft.parent;)xt.push(Ft);return xt}function o(){var Ft=[];return this.each(function(xt){Ft.push(xt)}),Ft}function d(){var Ft=[];return this.eachBefore(function(xt){xt.children||Ft.push(xt)}),Ft}function w(){var Ft=this,xt=[];return Ft.each(function(yt){yt!==Ft&&xt.push({source:yt.parent,target:yt})}),xt}function A(Ft,xt){var yt=new s(Ft),Et=+Ft.value&&(yt.value=Ft.value),Mt,Nt=[yt],jt,ie,me,be;for(xt==null&&(xt=y);Mt=Nt.pop();)if(Et&&(Mt.value=+Mt.data.value),(ie=xt(Mt.data))&&(be=ie.length))for(Mt.children=new Array(be),me=be-1;me>=0;--me)Nt.push(jt=Mt.children[me]=new s(ie[me])),jt.parent=Mt,jt.depth=Mt.depth+1;return yt.eachBefore(T)}function _(){return A(this).eachBefore(E)}function y(Ft){return Ft.children}function E(Ft){Ft.data=Ft.data.data}function T(Ft){var xt=0;do Ft.height=xt;while((Ft=Ft.parent)&&Ft.height<++xt)}function s(Ft){this.data=Ft,this.depth=this.height=0,this.parent=null}s.prototype=A.prototype={constructor:s,count:a,each:n,eachAfter:c,eachBefore:f,sum:l,sort:m,path:h,ancestors:u,descendants:o,leaves:d,links:w,copy:_};var L=Array.prototype.slice;function M(Ft){for(var xt=Ft.length,yt,Et;xt;)Et=Math.random()*xt--|0,yt=Ft[xt],Ft[xt]=Ft[Et],Ft[Et]=yt;return Ft}function z(Ft){for(var xt=0,yt=(Ft=M(L.call(Ft))).length,Et=[],Mt,Nt;xt0&&yt*yt>Et*Et+Mt*Mt}function k(Ft,xt){for(var yt=0;ytme?(Mt=(be+me-Nt)/(2*be),ie=Math.sqrt(Math.max(0,me/be-Mt*Mt)),yt.x=Ft.x-Mt*Et-ie*jt,yt.y=Ft.y-Mt*jt+ie*Et):(Mt=(be+Nt-me)/(2*be),ie=Math.sqrt(Math.max(0,Nt/be-Mt*Mt)),yt.x=xt.x+Mt*Et-ie*jt,yt.y=xt.y+Mt*jt+ie*Et)):(yt.x=xt.x+yt.r,yt.y=xt.y)}function et(Ft,xt){var yt=Ft.r+xt.r-1e-6,Et=xt.x-Ft.x,Mt=xt.y-Ft.y;return yt>0&&yt*yt>Et*Et+Mt*Mt}function it(Ft){var xt=Ft._,yt=Ft.next._,Et=xt.r+yt.r,Mt=(xt.x*yt.r+yt.x*xt.r)/Et,Nt=(xt.y*yt.r+yt.y*xt.r)/Et;return Mt*Mt+Nt*Nt}function ut(Ft){this._=Ft,this.next=null,this.previous=null}function J(Ft){if(!(Mt=Ft.length))return 0;var xt,yt,Et,Mt,Nt,jt,ie,me,be,ve,Le;if(xt=Ft[0],xt.x=0,xt.y=0,!(Mt>1))return xt.r;if(yt=Ft[1],xt.x=-yt.r,yt.x=xt.r,yt.y=0,!(Mt>2))return xt.r+yt.r;j(yt,xt,Et=Ft[2]),xt=new ut(xt),yt=new ut(yt),Et=new ut(Et),xt.next=Et.previous=yt,yt.next=xt.previous=Et,Et.next=yt.previous=xt;t:for(ie=3;ie0)throw new Error("cycle");return ie}return yt.id=function(Et){return arguments.length?(Ft=V(Et),yt):Ft},yt.parentId=function(Et){return arguments.length?(xt=V(Et),yt):xt},yt}function Ut(Ft,xt){return Ft.parent===xt.parent?1:2}function kt(Ft){var xt=Ft.children;return xt?xt[0]:Ft.t}function Vt(Ft){var xt=Ft.children;return xt?xt[xt.length-1]:Ft.t}function It(Ft,xt,yt){var Et=yt/(xt.i-Ft.i);xt.c-=Et,xt.s+=yt,Ft.c+=Et,xt.z+=yt,xt.m+=yt}function re(Ft){for(var xt=0,yt=0,Et=Ft.children,Mt=Et.length,Nt;--Mt>=0;)Nt=Et[Mt],Nt.z+=xt,Nt.m+=xt,xt+=Nt.s+(yt+=Nt.c)}function Kt(Ft,xt,yt){return Ft.a.parent===xt.parent?Ft.a:yt}function $t(Ft,xt){this._=Ft,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=xt}$t.prototype=Object.create(s.prototype);function le(Ft){for(var xt=new $t(Ft,0),yt,Et=[xt],Mt,Nt,jt,ie;yt=Et.pop();)if(Nt=yt._.children)for(yt.children=new Array(ie=Nt.length),jt=ie-1;jt>=0;--jt)Et.push(Mt=yt.children[jt]=new $t(Nt[jt],jt)),Mt.parent=yt;return(xt.parent=new $t(null,0)).children=[xt],xt}function he(){var Ft=Ut,xt=1,yt=1,Et=null;function Mt(be){var ve=le(be);if(ve.eachAfter(Nt),ve.parent.m=-ve.z,ve.eachBefore(jt),Et)be.eachBefore(me);else{var Le=be,ce=be,Te=be;be.eachBefore(function(Ke){Ke.xce.x&&(ce=Ke),Ke.depth>Te.depth&&(Te=Ke)});var Be=Le===ce?1:Ft(Le,ce)/2,ir=Be-Le.x,pe=xt/(ce.x+Be+ir),Xe=yt/(Te.depth||1);be.eachBefore(function(Ke){Ke.x=(Ke.x+ir)*pe,Ke.y=Ke.depth*Xe})}return be}function Nt(be){var ve=be.children,Le=be.parent.children,ce=be.i?Le[be.i-1]:null;if(ve){re(be);var Te=(ve[0].z+ve[ve.length-1].z)/2;ce?(be.z=ce.z+Ft(be._,ce._),be.m=be.z-Te):be.z=Te}else ce&&(be.z=ce.z+Ft(be._,ce._));be.parent.A=ie(be,ce,be.parent.A||Le[0])}function jt(be){be._.x=be.z+be.parent.m,be.m+=be.parent.m}function ie(be,ve,Le){if(ve){for(var ce=be,Te=be,Be=ve,ir=ce.parent.children[0],pe=ce.m,Xe=Te.m,Ke=Be.m,or=ir.m,$e;Be=Vt(Be),ce=kt(ce),Be&&ce;)ir=kt(ir),Te=Vt(Te),Te.a=be,$e=Be.z+Ke-ce.z-pe+Ft(Be._,ce._),$e>0&&(It(Kt(Be,be,Le),be,$e),pe+=$e,Xe+=$e),Ke+=Be.m,pe+=ce.m,or+=ir.m,Xe+=Te.m;Be&&!Vt(Te)&&(Te.t=Be,Te.m+=Ke-Xe),ce&&!kt(ir)&&(ir.t=ce,ir.m+=pe-or,Le=be)}return Le}function me(be){be.x*=xt,be.y=be.depth*yt}return Mt.separation=function(be){return arguments.length?(Ft=be,Mt):Ft},Mt.size=function(be){return arguments.length?(Et=!1,xt=+be[0],yt=+be[1],Mt):Et?null:[xt,yt]},Mt.nodeSize=function(be){return arguments.length?(Et=!0,xt=+be[0],yt=+be[1],Mt):Et?[xt,yt]:null},Mt}function de(Ft,xt,yt,Et,Mt){for(var Nt=Ft.children,jt,ie=-1,me=Nt.length,be=Ft.value&&(Mt-yt)/Ft.value;++ieKe&&(Ke=be),se=pe*pe*ge,or=Math.max(Ke/se,se/Xe),or>$e){pe-=be;break}$e=or}jt.push(me={value:pe,dice:Te1?Et:1)},yt}(xe);function zt(){var Ft=ne,xt=!1,yt=1,Et=1,Mt=[0],Nt=Q,jt=Q,ie=Q,me=Q,be=Q;function ve(ce){return ce.x0=ce.y0=0,ce.x1=yt,ce.y1=Et,ce.eachBefore(Le),Mt=[0],xt&&ce.eachBefore(gt),ce}function Le(ce){var Te=Mt[ce.depth],Be=ce.x0+Te,ir=ce.y0+Te,pe=ce.x1-Te,Xe=ce.y1-Te;pe=ce-1){var Ke=Nt[Le];Ke.x0=Be,Ke.y0=ir,Ke.x1=pe,Ke.y1=Xe;return}for(var or=be[Le],$e=Te/2+or,ge=Le+1,se=ce-1;ge>>1;be[Ae]<$e?ge=Ae+1:se=Ae}$e-be[ge-1]Xe-ir){var Pe=(Be*Ie+pe*Ce)/Te;ve(Le,ge,Ce,Be,ir,Pe,Xe),ve(ge,ce,Ie,Pe,ir,pe,Xe)}else{var ke=(ir*Ie+Xe*Ce)/Te;ve(Le,ge,Ce,Be,ir,pe,ke),ve(ge,ce,Ie,Be,ke,pe,Xe)}}}function Jt(Ft,xt,yt,Et,Mt){(Ft.depth&1?de:Tt)(Ft,xt,yt,Et,Mt)}var Wt=function Ft(xt){function yt(Et,Mt,Nt,jt,ie){if((me=Et._squarify)&&me.ratio===xt)for(var me,be,ve,Le,ce=-1,Te,Be=me.length,ir=Et.value;++ce1?Et:1)},yt}(xe)},10132:function(G,U,t){t.d(U,{ak:function(){return h}});var g=Math.PI,C=2*g,i=1e-6,S=C-i;function x(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function v(){return new x}x.prototype=v.prototype={constructor:x,moveTo:function(b,u){this._+="M"+(this._x0=this._x1=+b)+","+(this._y0=this._y1=+u)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(b,u){this._+="L"+(this._x1=+b)+","+(this._y1=+u)},quadraticCurveTo:function(b,u,o,d){this._+="Q"+ +b+","+ +u+","+(this._x1=+o)+","+(this._y1=+d)},bezierCurveTo:function(b,u,o,d,w,A){this._+="C"+ +b+","+ +u+","+ +o+","+ +d+","+(this._x1=+w)+","+(this._y1=+A)},arcTo:function(b,u,o,d,w){b=+b,u=+u,o=+o,d=+d,w=+w;var A=this._x1,_=this._y1,y=o-b,E=d-u,T=A-b,s=_-u,L=T*T+s*s;if(w<0)throw new Error("negative radius: "+w);if(this._x1===null)this._+="M"+(this._x1=b)+","+(this._y1=u);else if(L>i)if(!(Math.abs(s*y-E*T)>i)||!w)this._+="L"+(this._x1=b)+","+(this._y1=u);else{var M=o-A,z=d-_,D=y*y+E*E,N=M*M+z*z,I=Math.sqrt(D),k=Math.sqrt(L),B=w*Math.tan((g-Math.acos((D+L-N)/(2*I*k)))/2),O=B/k,H=B/I;Math.abs(O-1)>i&&(this._+="L"+(b+O*T)+","+(u+O*s)),this._+="A"+w+","+w+",0,0,"+ +(s*M>T*z)+","+(this._x1=b+H*y)+","+(this._y1=u+H*E)}},arc:function(b,u,o,d,w,A){b=+b,u=+u,o=+o,A=!!A;var _=o*Math.cos(d),y=o*Math.sin(d),E=b+_,T=u+y,s=1^A,L=A?d-w:w-d;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+E+","+T:(Math.abs(this._x1-E)>i||Math.abs(this._y1-T)>i)&&(this._+="L"+E+","+T),o&&(L<0&&(L=L%C+C),L>S?this._+="A"+o+","+o+",0,1,"+s+","+(b-_)+","+(u-y)+"A"+o+","+o+",0,1,"+s+","+(this._x1=E)+","+(this._y1=T):L>i&&(this._+="A"+o+","+o+",0,"+ +(L>=g)+","+s+","+(this._x1=b+o*Math.cos(w))+","+(this._y1=u+o*Math.sin(w))))},rect:function(b,u,o,d){this._+="M"+(this._x0=this._x1=+b)+","+(this._y0=this._y1=+u)+"h"+ +o+"v"+ +d+"h"+-o+"Z"},toString:function(){return this._}};var p=v,r=Array.prototype.slice;function e(b){return function(){return b}}function a(b){return b[0]}function n(b){return b[1]}function f(b){return b.source}function c(b){return b.target}function l(b){var u=f,o=c,d=a,w=n,A=null;function _(){var y,E=r.call(arguments),T=u.apply(this,E),s=o.apply(this,E);if(A||(A=y=p()),b(A,+d.apply(this,(E[0]=T,E)),+w.apply(this,E),+d.apply(this,(E[0]=s,E)),+w.apply(this,E)),y)return A=null,y+""||null}return _.source=function(y){return arguments.length?(u=y,_):u},_.target=function(y){return arguments.length?(o=y,_):o},_.x=function(y){return arguments.length?(d=typeof y=="function"?y:e(+y),_):d},_.y=function(y){return arguments.length?(w=typeof y=="function"?y:e(+y),_):w},_.context=function(y){return arguments.length?(A=y??null,_):A},_}function m(b,u,o,d,w){b.moveTo(u,o),b.bezierCurveTo(u=(u+d)/2,o,u,w,d,w)}function h(){return l(m)}},94336:function(G,U,t){t.d(U,{Yn:function(){return Xt},m_:function(){return a},E9:function(){return Jt}});var g=t(8208),C=t(58931),i=t(46192),S=t(68936),x=t(32171),v=t(53528);function p(Ft){if(0<=Ft.y&&Ft.y<100){var xt=new Date(-1,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L);return xt.setFullYear(Ft.y),xt}return new Date(Ft.y,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L)}function r(Ft){if(0<=Ft.y&&Ft.y<100){var xt=new Date(Date.UTC(-1,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L));return xt.setUTCFullYear(Ft.y),xt}return new Date(Date.UTC(Ft.y,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L))}function e(Ft,xt,yt){return{y:Ft,m:xt,d:yt,H:0,M:0,S:0,L:0}}function a(Ft){var xt=Ft.dateTime,yt=Ft.date,Et=Ft.time,Mt=Ft.periods,Nt=Ft.days,jt=Ft.shortDays,ie=Ft.months,me=Ft.shortMonths,be=b(Mt),ve=u(Mt),Le=b(Nt),ce=u(Nt),Te=b(jt),Be=u(jt),ir=b(ie),pe=u(ie),Xe=b(me),Ke=u(me),or={a:Yt,A:Gt,b:Ne,B:Oe,c:null,d:j,e:j,f:X,H:et,I:it,j:ut,L:J,m:tt,M:V,p:Qe,q:er,Q:Se,s:ne,S:Q,u:ot,U:$,V:Z,w:st,W:nt,x:null,X:null,y:ct,Y:gt,Z:Tt,"%":xe},$e={a:fr,A:rr,b:He,B:dr,c:null,d:wt,e:wt,f:Lt,H:Rt,I:bt,j:At,L:mt,m:Ht,M:Ut,p:mr,q:xr,Q:Se,s:ne,S:kt,u:Vt,U:It,V:re,w:Kt,W:$t,x:null,X:null,y:le,Y:he,Z:de,"%":xe},ge={a:Pe,A:ke,b:Ve,B:Je,c:ur,d:M,e:M,f:B,H:D,I:D,j:z,L:k,m:L,M:N,p:Ie,q:s,Q:H,s:Y,S:I,u:d,U:w,V:A,w:o,W:_,x:hr,X:vr,y:E,Y:y,Z:T,"%":O};or.x=se(yt,or),or.X=se(Et,or),or.c=se(xt,or),$e.x=se(yt,$e),$e.X=se(Et,$e),$e.c=se(xt,$e);function se(pr,Gr){return function(Pr){var Dr=[],cn=-1,rn=0,Cn=pr.length,En,Tr,Cr;for(Pr instanceof Date||(Pr=new Date(+Pr));++cn53)return null;"w"in Dr||(Dr.w=1),"Z"in Dr?(rn=r(e(Dr.y,0,1)),Cn=rn.getUTCDay(),rn=Cn>4||Cn===0?g.ot.ceil(rn):(0,g.ot)(rn),rn=C.c.offset(rn,(Dr.V-1)*7),Dr.y=rn.getUTCFullYear(),Dr.m=rn.getUTCMonth(),Dr.d=rn.getUTCDate()+(Dr.w+6)%7):(rn=p(e(Dr.y,0,1)),Cn=rn.getDay(),rn=Cn>4||Cn===0?i.qT.ceil(rn):(0,i.qT)(rn),rn=S.c.offset(rn,(Dr.V-1)*7),Dr.y=rn.getFullYear(),Dr.m=rn.getMonth(),Dr.d=rn.getDate()+(Dr.w+6)%7)}else("W"in Dr||"U"in Dr)&&("w"in Dr||(Dr.w="u"in Dr?Dr.u%7:"W"in Dr?1:0),Cn="Z"in Dr?r(e(Dr.y,0,1)).getUTCDay():p(e(Dr.y,0,1)).getDay(),Dr.m=0,Dr.d="W"in Dr?(Dr.w+6)%7+Dr.W*7-(Cn+5)%7:Dr.w+Dr.U*7-(Cn+6)%7);return"Z"in Dr?(Dr.H+=Dr.Z/100|0,Dr.M+=Dr.Z%100,r(Dr)):p(Dr)}}function Ce(pr,Gr,Pr,Dr){for(var cn=0,rn=Gr.length,Cn=Pr.length,En,Tr;cn=Cn)return-1;if(En=Gr.charCodeAt(cn++),En===37){if(En=Gr.charAt(cn++),Tr=ge[En in n?Gr.charAt(cn++):En],!Tr||(Dr=Tr(pr,Pr,Dr))<0)return-1}else if(En!=Pr.charCodeAt(Dr++))return-1}return Dr}function Ie(pr,Gr,Pr){var Dr=be.exec(Gr.slice(Pr));return Dr?(pr.p=ve[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Pe(pr,Gr,Pr){var Dr=Te.exec(Gr.slice(Pr));return Dr?(pr.w=Be[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function ke(pr,Gr,Pr){var Dr=Le.exec(Gr.slice(Pr));return Dr?(pr.w=ce[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Ve(pr,Gr,Pr){var Dr=Xe.exec(Gr.slice(Pr));return Dr?(pr.m=Ke[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Je(pr,Gr,Pr){var Dr=ir.exec(Gr.slice(Pr));return Dr?(pr.m=pe[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function ur(pr,Gr,Pr){return Ce(pr,xt,Gr,Pr)}function hr(pr,Gr,Pr){return Ce(pr,yt,Gr,Pr)}function vr(pr,Gr,Pr){return Ce(pr,Et,Gr,Pr)}function Yt(pr){return jt[pr.getDay()]}function Gt(pr){return Nt[pr.getDay()]}function Ne(pr){return me[pr.getMonth()]}function Oe(pr){return ie[pr.getMonth()]}function Qe(pr){return Mt[+(pr.getHours()>=12)]}function er(pr){return 1+~~(pr.getMonth()/3)}function fr(pr){return jt[pr.getUTCDay()]}function rr(pr){return Nt[pr.getUTCDay()]}function He(pr){return me[pr.getUTCMonth()]}function dr(pr){return ie[pr.getUTCMonth()]}function mr(pr){return Mt[+(pr.getUTCHours()>=12)]}function xr(pr){return 1+~~(pr.getUTCMonth()/3)}return{format:function(pr){var Gr=se(pr+="",or);return Gr.toString=function(){return pr},Gr},parse:function(pr){var Gr=Ae(pr+="",!1);return Gr.toString=function(){return pr},Gr},utcFormat:function(pr){var Gr=se(pr+="",$e);return Gr.toString=function(){return pr},Gr},utcParse:function(pr){var Gr=Ae(pr+="",!0);return Gr.toString=function(){return pr},Gr}}}var n={"-":"",_:" ",0:"0"},f=/^\s*\d+/,c=/^%/,l=/[\\^$*+?|[\]().{}]/g;function m(Ft,xt,yt){var Et=Ft<0?"-":"",Mt=(Et?-Ft:Ft)+"",Nt=Mt.length;return Et+(Nt68?1900:2e3),yt+Et[0].length):-1}function T(Ft,xt,yt){var Et=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(xt.slice(yt,yt+6));return Et?(Ft.Z=Et[1]?0:-(Et[2]+(Et[3]||"00")),yt+Et[0].length):-1}function s(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+1));return Et?(Ft.q=Et[0]*3-3,yt+Et[0].length):-1}function L(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.m=Et[0]-1,yt+Et[0].length):-1}function M(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.d=+Et[0],yt+Et[0].length):-1}function z(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+3));return Et?(Ft.m=0,Ft.d=+Et[0],yt+Et[0].length):-1}function D(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.H=+Et[0],yt+Et[0].length):-1}function N(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.M=+Et[0],yt+Et[0].length):-1}function I(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.S=+Et[0],yt+Et[0].length):-1}function k(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+3));return Et?(Ft.L=+Et[0],yt+Et[0].length):-1}function B(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+6));return Et?(Ft.L=Math.floor(Et[0]/1e3),yt+Et[0].length):-1}function O(Ft,xt,yt){var Et=c.exec(xt.slice(yt,yt+1));return Et?yt+Et[0].length:-1}function H(Ft,xt,yt){var Et=f.exec(xt.slice(yt));return Et?(Ft.Q=+Et[0],yt+Et[0].length):-1}function Y(Ft,xt,yt){var Et=f.exec(xt.slice(yt));return Et?(Ft.s=+Et[0],yt+Et[0].length):-1}function j(Ft,xt){return m(Ft.getDate(),xt,2)}function et(Ft,xt){return m(Ft.getHours(),xt,2)}function it(Ft,xt){return m(Ft.getHours()%12||12,xt,2)}function ut(Ft,xt){return m(1+S.c.count((0,x.c)(Ft),Ft),xt,3)}function J(Ft,xt){return m(Ft.getMilliseconds(),xt,3)}function X(Ft,xt){return J(Ft,xt)+"000"}function tt(Ft,xt){return m(Ft.getMonth()+1,xt,2)}function V(Ft,xt){return m(Ft.getMinutes(),xt,2)}function Q(Ft,xt){return m(Ft.getSeconds(),xt,2)}function ot(Ft){var xt=Ft.getDay();return xt===0?7:xt}function $(Ft,xt){return m(i.uU.count((0,x.c)(Ft)-1,Ft),xt,2)}function Z(Ft,xt){var yt=Ft.getDay();return Ft=yt>=4||yt===0?(0,i.kD)(Ft):i.kD.ceil(Ft),m(i.kD.count((0,x.c)(Ft),Ft)+((0,x.c)(Ft).getDay()===4),xt,2)}function st(Ft){return Ft.getDay()}function nt(Ft,xt){return m(i.qT.count((0,x.c)(Ft)-1,Ft),xt,2)}function ct(Ft,xt){return m(Ft.getFullYear()%100,xt,2)}function gt(Ft,xt){return m(Ft.getFullYear()%1e4,xt,4)}function Tt(Ft){var xt=Ft.getTimezoneOffset();return(xt>0?"-":(xt*=-1,"+"))+m(xt/60|0,"0",2)+m(xt%60,"0",2)}function wt(Ft,xt){return m(Ft.getUTCDate(),xt,2)}function Rt(Ft,xt){return m(Ft.getUTCHours(),xt,2)}function bt(Ft,xt){return m(Ft.getUTCHours()%12||12,xt,2)}function At(Ft,xt){return m(1+C.c.count((0,v.c)(Ft),Ft),xt,3)}function mt(Ft,xt){return m(Ft.getUTCMilliseconds(),xt,3)}function Lt(Ft,xt){return mt(Ft,xt)+"000"}function Ht(Ft,xt){return m(Ft.getUTCMonth()+1,xt,2)}function Ut(Ft,xt){return m(Ft.getUTCMinutes(),xt,2)}function kt(Ft,xt){return m(Ft.getUTCSeconds(),xt,2)}function Vt(Ft){var xt=Ft.getUTCDay();return xt===0?7:xt}function It(Ft,xt){return m(g.EV.count((0,v.c)(Ft)-1,Ft),xt,2)}function re(Ft,xt){var yt=Ft.getUTCDay();return Ft=yt>=4||yt===0?(0,g.yA)(Ft):g.yA.ceil(Ft),m(g.yA.count((0,v.c)(Ft),Ft)+((0,v.c)(Ft).getUTCDay()===4),xt,2)}function Kt(Ft){return Ft.getUTCDay()}function $t(Ft,xt){return m(g.ot.count((0,v.c)(Ft)-1,Ft),xt,2)}function le(Ft,xt){return m(Ft.getUTCFullYear()%100,xt,2)}function he(Ft,xt){return m(Ft.getUTCFullYear()%1e4,xt,4)}function de(){return"+0000"}function xe(){return"%"}function Se(Ft){return+Ft}function ne(Ft){return Math.floor(+Ft/1e3)}var zt,Xt,Jt;Wt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Wt(Ft){return zt=a(Ft),Xt=zt.format,zt.parse,Jt=zt.utcFormat,zt.utcParse,zt}},68936:function(G,U,t){t.d(U,{m:function(){return S}});var g=t(81628),C=t(69792),i=(0,g.c)(function(x){x.setHours(0,0,0,0)},function(x,v){x.setDate(x.getDate()+v)},function(x,v){return(v-x-(v.getTimezoneOffset()-x.getTimezoneOffset())*C.iy)/C.SK},function(x){return x.getDate()-1});U.c=i;var S=i.range},69792:function(G,U,t){t.d(U,{KK:function(){return x},SK:function(){return S},cg:function(){return i},iy:function(){return C},yc:function(){return g}});var g=1e3,C=6e4,i=36e5,S=864e5,x=6048e5},73220:function(G,U,t){t.r(U),t.d(U,{timeDay:function(){return m.c},timeDays:function(){return m.m},timeFriday:function(){return h.iB},timeFridays:function(){return h.sJ},timeHour:function(){return c},timeHours:function(){return l},timeInterval:function(){return g.c},timeMillisecond:function(){return i},timeMilliseconds:function(){return S},timeMinute:function(){return a},timeMinutes:function(){return n},timeMonday:function(){return h.qT},timeMondays:function(){return h.QP},timeMonth:function(){return u},timeMonths:function(){return o},timeSaturday:function(){return h.Wc},timeSaturdays:function(){return h.aI},timeSecond:function(){return p},timeSeconds:function(){return r},timeSunday:function(){return h.uU},timeSundays:function(){return h.Ab},timeThursday:function(){return h.kD},timeThursdays:function(){return h.eC},timeTuesday:function(){return h.Mf},timeTuesdays:function(){return h.Oc},timeWednesday:function(){return h.eg},timeWednesdays:function(){return h.sn},timeWeek:function(){return h.uU},timeWeeks:function(){return h.Ab},timeYear:function(){return d.c},timeYears:function(){return d.Q},utcDay:function(){return s.c},utcDays:function(){return s.o},utcFriday:function(){return L.od},utcFridays:function(){return L.iG},utcHour:function(){return E},utcHours:function(){return T},utcMillisecond:function(){return i},utcMilliseconds:function(){return S},utcMinute:function(){return A},utcMinutes:function(){return _},utcMonday:function(){return L.ot},utcMondays:function(){return L.iO},utcMonth:function(){return z},utcMonths:function(){return D},utcSaturday:function(){return L.Ad},utcSaturdays:function(){return L.K8},utcSecond:function(){return p},utcSeconds:function(){return r},utcSunday:function(){return L.EV},utcSundays:function(){return L.Wq},utcThursday:function(){return L.yA},utcThursdays:function(){return L.ob},utcTuesday:function(){return L.sG},utcTuesdays:function(){return L.kl},utcWednesday:function(){return L._6},utcWednesdays:function(){return L.W_},utcWeek:function(){return L.EV},utcWeeks:function(){return L.Wq},utcYear:function(){return N.c},utcYears:function(){return N.i}});var g=t(81628),C=(0,g.c)(function(){},function(I,k){I.setTime(+I+k)},function(I,k){return k-I});C.every=function(I){return I=Math.floor(I),!isFinite(I)||!(I>0)?null:I>1?(0,g.c)(function(k){k.setTime(Math.floor(k/I)*I)},function(k,B){k.setTime(+k+B*I)},function(k,B){return(B-k)/I}):C};var i=C,S=C.range,x=t(69792),v=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds())},function(I,k){I.setTime(+I+k*x.yc)},function(I,k){return(k-I)/x.yc},function(I){return I.getUTCSeconds()}),p=v,r=v.range,e=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds()-I.getSeconds()*x.yc)},function(I,k){I.setTime(+I+k*x.iy)},function(I,k){return(k-I)/x.iy},function(I){return I.getMinutes()}),a=e,n=e.range,f=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds()-I.getSeconds()*x.yc-I.getMinutes()*x.iy)},function(I,k){I.setTime(+I+k*x.cg)},function(I,k){return(k-I)/x.cg},function(I){return I.getHours()}),c=f,l=f.range,m=t(68936),h=t(46192),b=(0,g.c)(function(I){I.setDate(1),I.setHours(0,0,0,0)},function(I,k){I.setMonth(I.getMonth()+k)},function(I,k){return k.getMonth()-I.getMonth()+(k.getFullYear()-I.getFullYear())*12},function(I){return I.getMonth()}),u=b,o=b.range,d=t(32171),w=(0,g.c)(function(I){I.setUTCSeconds(0,0)},function(I,k){I.setTime(+I+k*x.iy)},function(I,k){return(k-I)/x.iy},function(I){return I.getUTCMinutes()}),A=w,_=w.range,y=(0,g.c)(function(I){I.setUTCMinutes(0,0,0)},function(I,k){I.setTime(+I+k*x.cg)},function(I,k){return(k-I)/x.cg},function(I){return I.getUTCHours()}),E=y,T=y.range,s=t(58931),L=t(8208),M=(0,g.c)(function(I){I.setUTCDate(1),I.setUTCHours(0,0,0,0)},function(I,k){I.setUTCMonth(I.getUTCMonth()+k)},function(I,k){return k.getUTCMonth()-I.getUTCMonth()+(k.getUTCFullYear()-I.getUTCFullYear())*12},function(I){return I.getUTCMonth()}),z=M,D=M.range,N=t(53528)},81628:function(G,U,t){t.d(U,{c:function(){return i}});var g=new Date,C=new Date;function i(S,x,v,p){function r(e){return S(e=arguments.length===0?new Date:new Date(+e)),e}return r.floor=function(e){return S(e=new Date(+e)),e},r.ceil=function(e){return S(e=new Date(e-1)),x(e,1),S(e),e},r.round=function(e){var a=r(e),n=r.ceil(e);return e-a0))return f;do f.push(c=new Date(+e)),x(e,n),S(e);while(c=a)for(;S(a),!e(a);)a.setTime(a-1)},function(a,n){if(a>=a)if(n<0)for(;++n<=0;)for(;x(a,-1),!e(a););else for(;--n>=0;)for(;x(a,1),!e(a););})},v&&(r.count=function(e,a){return g.setTime(+e),C.setTime(+a),S(g),S(C),Math.floor(v(g,C))},r.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?r.filter(p?function(a){return p(a)%e===0}:function(a){return r.count(0,a)%e===0}):r}),r}},58931:function(G,U,t){t.d(U,{o:function(){return S}});var g=t(81628),C=t(69792),i=(0,g.c)(function(x){x.setUTCHours(0,0,0,0)},function(x,v){x.setUTCDate(x.getUTCDate()+v)},function(x,v){return(v-x)/C.SK},function(x){return x.getUTCDate()-1});U.c=i;var S=i.range},8208:function(G,U,t){t.d(U,{Ad:function(){return a},EV:function(){return S},K8:function(){return b},W_:function(){return l},Wq:function(){return n},_6:function(){return p},iG:function(){return h},iO:function(){return f},kl:function(){return c},ob:function(){return m},od:function(){return e},ot:function(){return x},sG:function(){return v},yA:function(){return r}});var g=t(81628),C=t(69792);function i(u){return(0,g.c)(function(o){o.setUTCDate(o.getUTCDate()-(o.getUTCDay()+7-u)%7),o.setUTCHours(0,0,0,0)},function(o,d){o.setUTCDate(o.getUTCDate()+d*7)},function(o,d){return(d-o)/C.KK})}var S=i(0),x=i(1),v=i(2),p=i(3),r=i(4),e=i(5),a=i(6),n=S.range,f=x.range,c=v.range,l=p.range,m=r.range,h=e.range,b=a.range},53528:function(G,U,t){t.d(U,{i:function(){return i}});var g=t(81628),C=(0,g.c)(function(S){S.setUTCMonth(0,1),S.setUTCHours(0,0,0,0)},function(S,x){S.setUTCFullYear(S.getUTCFullYear()+x)},function(S,x){return x.getUTCFullYear()-S.getUTCFullYear()},function(S){return S.getUTCFullYear()});C.every=function(S){return!isFinite(S=Math.floor(S))||!(S>0)?null:(0,g.c)(function(x){x.setUTCFullYear(Math.floor(x.getUTCFullYear()/S)*S),x.setUTCMonth(0,1),x.setUTCHours(0,0,0,0)},function(x,v){x.setUTCFullYear(x.getUTCFullYear()+v*S)})},U.c=C;var i=C.range},46192:function(G,U,t){t.d(U,{Ab:function(){return n},Mf:function(){return v},Oc:function(){return c},QP:function(){return f},Wc:function(){return a},aI:function(){return b},eC:function(){return m},eg:function(){return p},iB:function(){return e},kD:function(){return r},qT:function(){return x},sJ:function(){return h},sn:function(){return l},uU:function(){return S}});var g=t(81628),C=t(69792);function i(u){return(0,g.c)(function(o){o.setDate(o.getDate()-(o.getDay()+7-u)%7),o.setHours(0,0,0,0)},function(o,d){o.setDate(o.getDate()+d*7)},function(o,d){return(d-o-(d.getTimezoneOffset()-o.getTimezoneOffset())*C.iy)/C.KK})}var S=i(0),x=i(1),v=i(2),p=i(3),r=i(4),e=i(5),a=i(6),n=S.range,f=x.range,c=v.range,l=p.range,m=r.range,h=e.range,b=a.range},32171:function(G,U,t){t.d(U,{Q:function(){return i}});var g=t(81628),C=(0,g.c)(function(S){S.setMonth(0,1),S.setHours(0,0,0,0)},function(S,x){S.setFullYear(S.getFullYear()+x)},function(S,x){return x.getFullYear()-S.getFullYear()},function(S){return S.getFullYear()});C.every=function(S){return!isFinite(S=Math.floor(S))||!(S>0)?null:(0,g.c)(function(x){x.setFullYear(Math.floor(x.getFullYear()/S)*S),x.setMonth(0,1),x.setHours(0,0,0,0)},function(x,v){x.setFullYear(x.getFullYear()+v*S)})},U.c=C;var i=C.range},64348:function(G,U,t){var g=t(39640)(),C=t(53664),i=g&&C("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch{i=!1}var S=C("%SyntaxError%"),x=C("%TypeError%"),v=t(2304);G.exports=function(r,e,a){if(!r||typeof r!="object"&&typeof r!="function")throw new x("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new x("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new x("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new x("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new x("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new x("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,m=!!v&&v(r,e);if(i)i(r,e,{configurable:c===null&&m?m.configurable:!c,enumerable:n===null&&m?m.enumerable:!n,value:a,writable:f===null&&m?m.writable:!f});else if(l||!n&&!f&&!c)r[e]=a;else throw new S("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}},81288:function(G,U,t){var g=t(41820),C=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",i=Object.prototype.toString,S=Array.prototype.concat,x=Object.defineProperty,v=function(n){return typeof n=="function"&&i.call(n)==="[object Function]"},p=t(39640)(),r=x&&p,e=function(n,f,c,l){if(f in n){if(l===!0){if(n[f]===c)return}else if(!v(l)||!l())return}r?x(n,f,{configurable:!0,enumerable:!1,value:c,writable:!0}):n[f]=c},a=function(n,f){var c=arguments.length>2?arguments[2]:{},l=g(f);C&&(l=S.call(l,Object.getOwnPropertySymbols(f)));for(var m=0;mr*e){var l=(c-f)/r;v[n]=l*1e3}}return v}function i(S){for(var x=[],v=S[0];v<=S[1];v++)for(var p=String.fromCharCode(v),r=S[0];r"u"&&(i=0),typeof C){case"number":if(C>0)return t(C|0,i);break;case"object":if(typeof C.length=="number")return U(C,i,0);break}return[]}G.exports=g},28912:function(G){G.exports=U,G.exports.default=U;function U(D,N,I){I=I||2;var k=N&&N.length,B=k?N[0]*I:D.length,O=t(D,0,B,I,!0),H=[];if(!O||O.next===O.prev)return H;var Y,j,et,it,ut,J,X;if(k&&(O=p(D,N,O,I)),D.length>80*I){Y=et=D[0],j=it=D[1];for(var tt=I;ttet&&(et=ut),J>it&&(it=J);X=Math.max(et-Y,it-j),X=X!==0?1/X:0}return C(O,H,I,Y,j,X),H}function t(D,N,I,k,B){var O,H;if(B===z(D,N,I,k)>0)for(O=N;O=N;O-=k)H=s(O,D[O],D[O+1],H);return H&&o(H,H.next)&&(L(H),H=H.next),H}function g(D,N){if(!D)return D;N||(N=D);var I=D,k;do if(k=!1,!I.steiner&&(o(I,I.next)||u(I.prev,I,I.next)===0)){if(L(I),I=N=I.prev,I===I.next)break;k=!0}else I=I.next;while(k||I!==N);return N}function C(D,N,I,k,B,O,H){if(D){!H&&O&&f(D,k,B,O);for(var Y=D,j,et;D.prev!==D.next;){if(j=D.prev,et=D.next,O?S(D,k,B,O):i(D)){N.push(j.i/I),N.push(D.i/I),N.push(et.i/I),L(D),D=et.next,Y=et.next;continue}if(D=et,D===Y){H?H===1?(D=x(g(D),N,I),C(D,N,I,k,B,O,2)):H===2&&v(D,N,I,k,B,O):C(g(D),N,I,k,B,O,1);break}}}}function i(D){var N=D.prev,I=D,k=D.next;if(u(N,I,k)>=0)return!1;for(var B=D.next.next;B!==D.prev;){if(h(N.x,N.y,I.x,I.y,k.x,k.y,B.x,B.y)&&u(B.prev,B,B.next)>=0)return!1;B=B.next}return!0}function S(D,N,I,k){var B=D.prev,O=D,H=D.next;if(u(B,O,H)>=0)return!1;for(var Y=B.xO.x?B.x>H.x?B.x:H.x:O.x>H.x?O.x:H.x,it=B.y>O.y?B.y>H.y?B.y:H.y:O.y>H.y?O.y:H.y,ut=l(Y,j,N,I,k),J=l(et,it,N,I,k),X=D.prevZ,tt=D.nextZ;X&&X.z>=ut&&tt&&tt.z<=J;){if(X!==D.prev&&X!==D.next&&h(B.x,B.y,O.x,O.y,H.x,H.y,X.x,X.y)&&u(X.prev,X,X.next)>=0||(X=X.prevZ,tt!==D.prev&&tt!==D.next&&h(B.x,B.y,O.x,O.y,H.x,H.y,tt.x,tt.y)&&u(tt.prev,tt,tt.next)>=0))return!1;tt=tt.nextZ}for(;X&&X.z>=ut;){if(X!==D.prev&&X!==D.next&&h(B.x,B.y,O.x,O.y,H.x,H.y,X.x,X.y)&&u(X.prev,X,X.next)>=0)return!1;X=X.prevZ}for(;tt&&tt.z<=J;){if(tt!==D.prev&&tt!==D.next&&h(B.x,B.y,O.x,O.y,H.x,H.y,tt.x,tt.y)&&u(tt.prev,tt,tt.next)>=0)return!1;tt=tt.nextZ}return!0}function x(D,N,I){var k=D;do{var B=k.prev,O=k.next.next;!o(B,O)&&d(B,k,k.next,O)&&y(B,O)&&y(O,B)&&(N.push(B.i/I),N.push(k.i/I),N.push(O.i/I),L(k),L(k.next),k=D=O),k=k.next}while(k!==D);return g(k)}function v(D,N,I,k,B,O){var H=D;do{for(var Y=H.next.next;Y!==H.prev;){if(H.i!==Y.i&&b(H,Y)){var j=T(H,Y);H=g(H,H.next),j=g(j,j.next),C(H,N,I,k,B,O),C(j,N,I,k,B,O);return}Y=Y.next}H=H.next}while(H!==D)}function p(D,N,I,k){var B=[],O,H,Y,j,et;for(O=0,H=N.length;O=I.next.y&&I.next.y!==I.y){var Y=I.x+(B-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Y<=k&&Y>O){if(O=Y,Y===k){if(B===I.y)return I;if(B===I.next.y)return I.next}H=I.x=I.x&&I.x>=et&&k!==I.x&&h(BH.x||I.x===H.x&&n(H,I)))&&(H=I,ut=J)),I=I.next;while(I!==j);return H}function n(D,N){return u(D.prev,D,N.prev)<0&&u(N.next,D,D.next)<0}function f(D,N,I,k){var B=D;do B.z===null&&(B.z=l(B.x,B.y,N,I,k)),B.prevZ=B.prev,B.nextZ=B.next,B=B.next;while(B!==D);B.prevZ.nextZ=null,B.prevZ=null,c(B)}function c(D){var N,I,k,B,O,H,Y,j,et=1;do{for(I=D,D=null,O=null,H=0;I;){for(H++,k=I,Y=0,N=0;N0||j>0&&k;)Y!==0&&(j===0||!k||I.z<=k.z)?(B=I,I=I.nextZ,Y--):(B=k,k=k.nextZ,j--),O?O.nextZ=B:D=B,B.prevZ=O,O=B;I=k}O.nextZ=null,et*=2}while(H>1);return D}function l(D,N,I,k,B){return D=32767*(D-I)*B,N=32767*(N-k)*B,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,D|N<<1}function m(D){var N=D,I=D;do(N.x=0&&(D-H)*(k-Y)-(I-H)*(N-Y)>=0&&(I-H)*(O-Y)-(B-H)*(k-Y)>=0}function b(D,N){return D.next.i!==N.i&&D.prev.i!==N.i&&!_(D,N)&&(y(D,N)&&y(N,D)&&E(D,N)&&(u(D.prev,D,N.prev)||u(D,N.prev,N))||o(D,N)&&u(D.prev,D,D.next)>0&&u(N.prev,N,N.next)>0)}function u(D,N,I){return(N.y-D.y)*(I.x-N.x)-(N.x-D.x)*(I.y-N.y)}function o(D,N){return D.x===N.x&&D.y===N.y}function d(D,N,I,k){var B=A(u(D,N,I)),O=A(u(D,N,k)),H=A(u(I,k,D)),Y=A(u(I,k,N));return!!(B!==O&&H!==Y||B===0&&w(D,I,N)||O===0&&w(D,k,N)||H===0&&w(I,D,k)||Y===0&&w(I,N,k))}function w(D,N,I){return N.x<=Math.max(D.x,I.x)&&N.x>=Math.min(D.x,I.x)&&N.y<=Math.max(D.y,I.y)&&N.y>=Math.min(D.y,I.y)}function A(D){return D>0?1:D<0?-1:0}function _(D,N){var I=D;do{if(I.i!==D.i&&I.next.i!==D.i&&I.i!==N.i&&I.next.i!==N.i&&d(I,I.next,D,N))return!0;I=I.next}while(I!==D);return!1}function y(D,N){return u(D.prev,D,D.next)<0?u(D,N,D.next)>=0&&u(D,D.prev,N)>=0:u(D,N,D.prev)<0||u(D,D.next,N)<0}function E(D,N){var I=D,k=!1,B=(D.x+N.x)/2,O=(D.y+N.y)/2;do I.y>O!=I.next.y>O&&I.next.y!==I.y&&B<(I.next.x-I.x)*(O-I.y)/(I.next.y-I.y)+I.x&&(k=!k),I=I.next;while(I!==D);return k}function T(D,N){var I=new M(D.i,D.x,D.y),k=new M(N.i,N.x,N.y),B=D.next,O=N.prev;return D.next=N,N.prev=D,I.next=B,B.prev=I,k.next=I,I.prev=k,O.next=k,k.prev=O,k}function s(D,N,I,k){var B=new M(D,N,I);return k?(B.next=k.next,B.prev=k,k.next.prev=B,k.next=B):(B.prev=B,B.next=B),B}function L(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function M(D,N,I){this.i=D,this.x=N,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}U.deviation=function(D,N,I,k){var B=N&&N.length,O=B?N[0]*I:D.length,H=Math.abs(z(D,0,O,I));if(B)for(var Y=0,j=N.length;Y0&&(k+=D[B-1].length,I.holes.push(k))}return I}},6688:function(G,U,t){var g=t(78484);G.exports=function(i,S){var x=[],v=[],p=[],r={},e=[],a;function n(w){p[w]=!1,r.hasOwnProperty(w)&&Object.keys(r[w]).forEach(function(A){delete r[w][A],p[A]&&n(A)})}function f(w){var A=!1;v.push(w),p[w]=!0;var _,y;for(_=0;_=w})}function m(w){l(w);for(var A=i,_=g(A),y=_.components.filter(function(D){return D.length>1}),E=1/0,T,s=0;s=55296&&w<=56319&&(E+=c[++b])),E=l?a.call(l,m,E,u):E,h?(n.value=E,f(o,u,n)):o[u]=E,++u;d=u}}if(d===void 0)for(d=S(c.length),h&&(o=new h(d)),b=0;b0?1:-1}},96936:function(G,U,t){var g=t(85608),C=Math.abs,i=Math.floor;G.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:g(S)*i(C(S)))}},81304:function(G,U,t){var g=t(96936),C=Math.max;G.exports=function(i){return C(0,g(i))}},14428:function(G,U,t){var g=t(34044),C=t(9252),i=Function.prototype.bind,S=Function.prototype.call,x=Object.keys,v=Object.prototype.propertyIsEnumerable;G.exports=function(p,r){return function(e,a){var n,f=arguments[2],c=arguments[3];return e=Object(C(e)),g(a),n=x(e),c&&n.sort(typeof c=="function"?i.call(c,e):void 0),typeof p!="function"&&(p=n[p]),S.call(p,n,function(l,m){return v.call(e,l)?S.call(a,f,e[l],l,e,m):r})}}},38452:function(G,U,t){G.exports=t(96276)()?Object.assign:t(81892)},96276:function(G){G.exports=function(){var U=Object.assign,t;return typeof U!="function"?!1:(t={foo:"raz"},U(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},81892:function(G,U,t){var g=t(54768),C=t(9252),i=Math.max;G.exports=function(S,x){var v,p,r=i(arguments.length,2),e;for(S=Object(C(S)),e=function(a){try{S[a]=x[a]}catch(n){v||(v=n)}},p=1;p-1}},29768:function(G){var U=Object.prototype.toString,t=U.call("");G.exports=function(g){return typeof g=="string"||g&&typeof g=="object"&&(g instanceof String||U.call(g)===t)||!1}},82252:function(G){var U=Object.create(null),t=Math.random;G.exports=function(){var g;do g=t().toString(36).slice(2);while(U[g]);return g}},52104:function(G,U,t){var g=t(69932),C=t(71056),i=t(21092),S=t(92664),x=t(85512),v=Object.defineProperty,p;p=G.exports=function(r,e){if(!(this instanceof p))throw new TypeError("Constructor requires 'new'");x.call(this,r),e?C.call(e,"key+value")?e="key+value":C.call(e,"key")?e="key":e="value":e="value",v(this,"__kind__",i("",e))},g&&g(p,x),delete p.prototype.constructor,p.prototype=Object.create(x.prototype,{_resolve:i(function(r){return this.__kind__==="value"?this.__list__[r]:this.__kind__==="key+value"?[r,this.__list__[r]]:r})}),v(p.prototype,S.toStringTag,i("c","Array Iterator"))},76024:function(G,U,t){var g=t(60948),C=t(34044),i=t(29768),S=t(76252),x=Array.isArray,v=Function.prototype.call,p=Array.prototype.some;G.exports=function(r,e){var a,n=arguments[2],f,c,l,m,h,b,u;if(x(r)||g(r)?a="array":i(r)?a="string":r=S(r),C(e),c=function(){l=!0},a==="array"){p.call(r,function(o){return v.call(e,n,o,c),l});return}if(a==="string"){for(h=r.length,m=0;m=55296&&u<=56319&&(b+=r[++m])),v.call(e,n,b,c),!l);++m);return}for(f=r.next();!f.done;){if(v.call(e,n,f.value,c),l)return;f=r.next()}}},76252:function(G,U,t){var g=t(60948),C=t(29768),i=t(52104),S=t(80940),x=t(52891),v=t(92664).iterator;G.exports=function(p){return typeof x(p)[v]=="function"?p[v]():g(p)?new i(p):C(p)?new S(p):new i(p)}},85512:function(G,U,t){var g=t(41476),C=t(38452),i=t(34044),S=t(9252),x=t(21092),v=t(27940),p=t(92664),r=Object.defineProperty,e=Object.defineProperties,a;G.exports=a=function(n,f){if(!(this instanceof a))throw new TypeError("Constructor requires 'new'");e(this,{__list__:x("w",S(n)),__context__:x("w",f),__nextIndex__:x("w",0)}),f&&(i(f.on),f.on("_add",this._onAdd),f.on("_delete",this._onDelete),f.on("_clear",this._onClear))},delete a.prototype.constructor,e(a.prototype,C({_next:x(function(){var n;if(this.__list__){if(this.__redo__&&(n=this.__redo__.shift(),n!==void 0))return n;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){r(this,"__redo__",x("c",[n]));return}this.__redo__.forEach(function(f,c){f>=n&&(this.__redo__[c]=++f)},this),this.__redo__.push(n)}}),_onDelete:x(function(n){var f;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(f=this.__redo__.indexOf(n),f!==-1&&this.__redo__.splice(f,1),this.__redo__.forEach(function(c,l){c>n&&(this.__redo__[l]=--c)},this)))}),_onClear:x(function(){this.__redo__&&g.call(this.__redo__),this.__nextIndex__=0})}))),r(a.prototype,p.iterator,x(function(){return this}))},76368:function(G,U,t){var g=t(60948),C=t(42584),i=t(29768),S=t(92664).iterator,x=Array.isArray;G.exports=function(v){return C(v)?x(v)||i(v)||g(v)?!0:typeof v[S]=="function":!1}},80940:function(G,U,t){var g=t(69932),C=t(21092),i=t(92664),S=t(85512),x=Object.defineProperty,v;v=G.exports=function(p){if(!(this instanceof v))throw new TypeError("Constructor requires 'new'");p=String(p),S.call(this,p),x(this,"__length__",C("",p.length))},g&&g(v,S),delete v.prototype.constructor,v.prototype=Object.create(S.prototype,{_next:C(function(){if(this.__list__){if(this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r)})}),x(v.prototype,i.toStringTag,C("c","String Iterator"))},52891:function(G,U,t){var g=t(76368);G.exports=function(C){if(!g(C))throw new TypeError(C+" is not iterable");return C}},60964:function(G){function U(g,C){if(g==null)throw new TypeError("Cannot convert first argument to object");for(var i=Object(g),S=1;S0&&(E=w[0]),E instanceof Error)throw E;var T=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw T.context=E,T}var s=y[d];if(s===void 0)return!1;if(typeof s=="function")t(s,this,w);else for(var L=s.length,M=c(s,L),A=0;A0&&E.length>_&&!E.warned){E.warned=!0;var T=new Error("Possible EventEmitter memory leak detected. "+E.length+" "+String(d)+" listeners added. Use emitter.setMaxListeners() to increase limit");T.name="MaxListenersExceededWarning",T.emitter=o,T.type=d,T.count=E.length,C(T)}return o}S.prototype.addListener=function(d,w){return r(this,d,w,!1)},S.prototype.on=S.prototype.addListener,S.prototype.prependListener=function(d,w){return r(this,d,w,!0)};function e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function a(o,d,w){var A={fired:!1,wrapFn:void 0,target:o,type:d,listener:w},_=e.bind(A);return _.listener=w,A.wrapFn=_,_}S.prototype.once=function(d,w){return v(w),this.on(d,a(this,d,w)),this},S.prototype.prependOnceListener=function(d,w){return v(w),this.prependListener(d,a(this,d,w)),this},S.prototype.removeListener=function(d,w){var A,_,y,E,T;if(v(w),_=this._events,_===void 0)return this;if(A=_[d],A===void 0)return this;if(A===w||A.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete _[d],_.removeListener&&this.emit("removeListener",d,A.listener||w));else if(typeof A!="function"){for(y=-1,E=A.length-1;E>=0;E--)if(A[E]===w||A[E].listener===w){T=A[E].listener,y=E;break}if(y<0)return this;y===0?A.shift():l(A,y),A.length===1&&(_[d]=A[0]),_.removeListener!==void 0&&this.emit("removeListener",d,T||w)}return this},S.prototype.off=S.prototype.removeListener,S.prototype.removeAllListeners=function(d){var w,A,_;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[d]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[d]),this;if(arguments.length===0){var y=Object.keys(A),E;for(_=0;_=0;_--)this.removeListener(d,w[_]);return this};function n(o,d,w){var A=o._events;if(A===void 0)return[];var _=A[d];return _===void 0?[]:typeof _=="function"?w?[_.listener||_]:[_]:w?m(_):c(_,_.length)}S.prototype.listeners=function(d){return n(this,d,!0)},S.prototype.rawListeners=function(d){return n(this,d,!1)},S.listenerCount=function(o,d){return typeof o.listenerCount=="function"?o.listenerCount(d):f.call(o,d)},S.prototype.listenerCount=f;function f(o){var d=this._events;if(d!==void 0){var w=d[o];if(typeof w=="function")return 1;if(w!==void 0)return w.length}return 0}S.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]};function c(o,d){for(var w=new Array(d),A=0;Ax[0]-r[0]/2&&(l=r[0]/2,m+=r[1]);return v}},71920:function(G){G.exports=U,U.canvas=document.createElement("canvas"),U.cache={};function U(e,S){S||(S={}),(typeof e=="string"||Array.isArray(e))&&(S.family=e);var x=Array.isArray(S.family)?S.family.join(", "):S.family;if(!x)throw Error("`family` must be defined");var v=S.size||S.fontSize||S.em||48,p=S.weight||S.fontWeight||"",r=S.style||S.fontStyle||"",e=[r,p,v].join(" ")+"px "+x,a=S.origin||"top";if(U.cache[x]&&v<=U.cache[x].em)return t(U.cache[x],a);var n=S.canvas||U.canvas,f=n.getContext("2d"),c={upper:S.upper!==void 0?S.upper:"H",lower:S.lower!==void 0?S.lower:"x",descent:S.descent!==void 0?S.descent:"p",ascent:S.ascent!==void 0?S.ascent:"h",tittle:S.tittle!==void 0?S.tittle:"i",overshoot:S.overshoot!==void 0?S.overshoot:"O"},l=Math.ceil(v*1.5);n.height=l,n.width=l*.5,f.font=e;var m="H",h={top:0};f.clearRect(0,0,l,l),f.textBaseline="top",f.fillStyle="black",f.fillText(m,0,0);var b=g(f.getImageData(0,0,l,l));f.clearRect(0,0,l,l),f.textBaseline="bottom",f.fillText(m,0,l);var u=g(f.getImageData(0,0,l,l));h.lineHeight=h.bottom=l-u+b,f.clearRect(0,0,l,l),f.textBaseline="alphabetic",f.fillText(m,0,l);var o=g(f.getImageData(0,0,l,l)),d=l-o-1+b;h.baseline=h.alphabetic=d,f.clearRect(0,0,l,l),f.textBaseline="middle",f.fillText(m,0,l*.5);var w=g(f.getImageData(0,0,l,l));h.median=h.middle=l-w-1+b-l*.5,f.clearRect(0,0,l,l),f.textBaseline="hanging",f.fillText(m,0,l*.5);var A=g(f.getImageData(0,0,l,l));h.hanging=l-A-1+b-l*.5,f.clearRect(0,0,l,l),f.textBaseline="ideographic",f.fillText(m,0,l);var _=g(f.getImageData(0,0,l,l));if(h.ideographic=l-_-1+b,c.upper&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.upper,0,0),h.upper=g(f.getImageData(0,0,l,l)),h.capHeight=h.baseline-h.upper),c.lower&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.lower,0,0),h.lower=g(f.getImageData(0,0,l,l)),h.xHeight=h.baseline-h.lower),c.tittle&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.tittle,0,0),h.tittle=g(f.getImageData(0,0,l,l))),c.ascent&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.ascent,0,0),h.ascent=g(f.getImageData(0,0,l,l))),c.descent&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.descent,0,0),h.descent=C(f.getImageData(0,0,l,l))),c.overshoot){f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.overshoot,0,0);var y=C(f.getImageData(0,0,l,l));h.overshoot=y-d}for(var E in h)h[E]/=v;return h.em=v,U.cache[x]=h,t(h,a)}function t(i,S){var x={};typeof S=="string"&&(S=i[S]);for(var v in i)v!=="em"&&(x[v]=i[v]-S);return x}function g(i){for(var S=i.height,x=i.data,v=3;v0;v-=4)if(x[v]!==0)return Math.floor((v-3)*.25/S)}},46492:function(G,U,t){var g=t(90720),C=Object.prototype.toString,i=Object.prototype.hasOwnProperty,S=function(e,a,n){for(var f=0,c=e.length;f=3&&(f=n),C.call(e)==="[object Array]"?S(e,a,f):typeof e=="string"?x(e,a,f):v(e,a,f)};G.exports=p},74336:function(G){var U="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,g=Math.max,C="[object Function]",i=function(p,r){for(var e=[],a=0;a"u"&&!g.canvas)return null;var C=g.canvas||document.createElement("canvas");typeof g.width=="number"&&(C.width=g.width),typeof g.height=="number"&&(C.height=g.height);var i=g,S;try{var x=[t];t.indexOf("webgl")===0&&x.push("experimental-"+t);for(var v=0;v"u"||!n?g:n(Uint8Array),l={"%AggregateError%":typeof AggregateError>"u"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?g:ArrayBuffer,"%ArrayIteratorPrototype%":e&&n?n([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":typeof Atomics>"u"?g:Atomics,"%BigInt%":typeof BigInt>"u"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?g:Float32Array,"%Float64Array%":typeof Float64Array>"u"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?g:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":typeof Int8Array>"u"?g:Int8Array,"%Int16Array%":typeof Int16Array>"u"?g:Int16Array,"%Int32Array%":typeof Int32Array>"u"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":e&&n?n(n([][Symbol.iterator]())):g,"%JSON%":typeof JSON=="object"?JSON:g,"%Map%":typeof Map>"u"?g:Map,"%MapIteratorPrototype%":typeof Map>"u"||!e||!n?g:n(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?g:Promise,"%Proxy%":typeof Proxy>"u"?g:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?g:Set,"%SetIteratorPrototype%":typeof Set>"u"||!e||!n?g:n(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":e&&n?n(""[Symbol.iterator]()):g,"%Symbol%":e?Symbol:g,"%SyntaxError%":C,"%ThrowTypeError%":r,"%TypedArray%":c,"%TypeError%":S,"%Uint8Array%":typeof Uint8Array>"u"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?g:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?g:WeakMap,"%WeakRef%":typeof WeakRef>"u"?g:WeakRef,"%WeakSet%":typeof WeakSet>"u"?g:WeakSet};if(n)try{null.error}catch(M){var m=n(n(M));l["%Error.prototype%"]=m}var h=function M(z){var D;if(z==="%AsyncFunction%")D=x("async function () {}");else if(z==="%GeneratorFunction%")D=x("function* () {}");else if(z==="%AsyncGeneratorFunction%")D=x("async function* () {}");else if(z==="%AsyncGenerator%"){var N=M("%AsyncGeneratorFunction%");N&&(D=N.prototype)}else if(z==="%AsyncIteratorPrototype%"){var I=M("%AsyncGenerator%");I&&n&&(D=n(I.prototype))}return l[z]=D,D},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},u=t(8844),o=t(92064),d=u.call(Function.call,Array.prototype.concat),w=u.call(Function.apply,Array.prototype.splice),A=u.call(Function.call,String.prototype.replace),_=u.call(Function.call,String.prototype.slice),y=u.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,s=function(z){var D=_(z,0,1),N=_(z,-1);if(D==="%"&&N!=="%")throw new C("invalid intrinsic syntax, expected closing `%`");if(N==="%"&&D!=="%")throw new C("invalid intrinsic syntax, expected opening `%`");var I=[];return A(z,E,function(k,B,O,H){I[I.length]=O?A(H,T,"$1"):B||k}),I},L=function(z,D){var N=z,I;if(o(b,N)&&(I=b[N],N="%"+I[0]+"%"),o(l,N)){var k=l[N];if(k===f&&(k=h(N)),typeof k>"u"&&!D)throw new S("intrinsic "+z+" exists, but is not available. Please file an issue!");return{alias:I,name:N,value:k}}throw new C("intrinsic "+z+" does not exist!")};G.exports=function(z,D){if(typeof z!="string"||z.length===0)throw new S("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new S('"allowMissing" argument must be a boolean');if(y(/^%?[^%]*%?$/,z)===null)throw new C("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var N=s(z),I=N.length>0?N[0]:"",k=L("%"+I+"%",D),B=k.name,O=k.value,H=!1,Y=k.alias;Y&&(I=Y[0],w(N,d([0,1],Y)));for(var j=1,et=!0;j=N.length){var X=v(O,it);et=!!X,et&&"get"in X&&!("originalValue"in X.get)?O=X.get:O=O[it]}else et=o(O,it),O=O[it];et&&!H&&(l[B]=O)}}return O}},12408:function(G){G.exports=U;function U(t,g){var C=g[0],i=g[1],S=g[2],x=g[3],v=g[4],p=g[5],r=g[6],e=g[7],a=g[8],n=g[9],f=g[10],c=g[11],l=g[12],m=g[13],h=g[14],b=g[15];return t[0]=p*(f*b-c*h)-n*(r*b-e*h)+m*(r*c-e*f),t[1]=-(i*(f*b-c*h)-n*(S*b-x*h)+m*(S*c-x*f)),t[2]=i*(r*b-e*h)-p*(S*b-x*h)+m*(S*e-x*r),t[3]=-(i*(r*c-e*f)-p*(S*c-x*f)+n*(S*e-x*r)),t[4]=-(v*(f*b-c*h)-a*(r*b-e*h)+l*(r*c-e*f)),t[5]=C*(f*b-c*h)-a*(S*b-x*h)+l*(S*c-x*f),t[6]=-(C*(r*b-e*h)-v*(S*b-x*h)+l*(S*e-x*r)),t[7]=C*(r*c-e*f)-v*(S*c-x*f)+a*(S*e-x*r),t[8]=v*(n*b-c*m)-a*(p*b-e*m)+l*(p*c-e*n),t[9]=-(C*(n*b-c*m)-a*(i*b-x*m)+l*(i*c-x*n)),t[10]=C*(p*b-e*m)-v*(i*b-x*m)+l*(i*e-x*p),t[11]=-(C*(p*c-e*n)-v*(i*c-x*n)+a*(i*e-x*p)),t[12]=-(v*(n*h-f*m)-a*(p*h-r*m)+l*(p*f-r*n)),t[13]=C*(n*h-f*m)-a*(i*h-S*m)+l*(i*f-S*n),t[14]=-(C*(p*h-r*m)-v*(i*h-S*m)+l*(i*r-S*p)),t[15]=C*(p*f-r*n)-v*(i*f-S*n)+a*(i*r-S*p),t}},76860:function(G){G.exports=U;function U(t){var g=new Float32Array(16);return g[0]=t[0],g[1]=t[1],g[2]=t[2],g[3]=t[3],g[4]=t[4],g[5]=t[5],g[6]=t[6],g[7]=t[7],g[8]=t[8],g[9]=t[9],g[10]=t[10],g[11]=t[11],g[12]=t[12],g[13]=t[13],g[14]=t[14],g[15]=t[15],g}},64492:function(G){G.exports=U;function U(t,g){return t[0]=g[0],t[1]=g[1],t[2]=g[2],t[3]=g[3],t[4]=g[4],t[5]=g[5],t[6]=g[6],t[7]=g[7],t[8]=g[8],t[9]=g[9],t[10]=g[10],t[11]=g[11],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15],t}},54212:function(G){G.exports=U;function U(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},70800:function(G){G.exports=U;function U(t){var g=t[0],C=t[1],i=t[2],S=t[3],x=t[4],v=t[5],p=t[6],r=t[7],e=t[8],a=t[9],n=t[10],f=t[11],c=t[12],l=t[13],m=t[14],h=t[15],b=g*v-C*x,u=g*p-i*x,o=g*r-S*x,d=C*p-i*v,w=C*r-S*v,A=i*r-S*p,_=e*l-a*c,y=e*m-n*c,E=e*h-f*c,T=a*m-n*l,s=a*h-f*l,L=n*h-f*m;return b*L-u*s+o*T+d*E-w*y+A*_}},61784:function(G){G.exports=U;function U(t,g){var C=g[0],i=g[1],S=g[2],x=g[3],v=C+C,p=i+i,r=S+S,e=C*v,a=i*v,n=i*p,f=S*v,c=S*p,l=S*r,m=x*v,h=x*p,b=x*r;return t[0]=1-n-l,t[1]=a+b,t[2]=f-h,t[3]=0,t[4]=a-b,t[5]=1-e-l,t[6]=c+m,t[7]=0,t[8]=f+h,t[9]=c-m,t[10]=1-e-n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},91616:function(G){G.exports=U;function U(t,g,C){var i,S,x,v=C[0],p=C[1],r=C[2],e=Math.sqrt(v*v+p*p+r*r);return Math.abs(e)<1e-6?null:(e=1/e,v*=e,p*=e,r*=e,i=Math.sin(g),S=Math.cos(g),x=1-S,t[0]=v*v*x+S,t[1]=p*v*x+r*i,t[2]=r*v*x-p*i,t[3]=0,t[4]=v*p*x-r*i,t[5]=p*p*x+S,t[6]=r*p*x+v*i,t[7]=0,t[8]=v*r*x+p*i,t[9]=p*r*x-v*i,t[10]=r*r*x+S,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},51944:function(G){G.exports=U;function U(t,g,C){var i=g[0],S=g[1],x=g[2],v=g[3],p=i+i,r=S+S,e=x+x,a=i*p,n=i*r,f=i*e,c=S*r,l=S*e,m=x*e,h=v*p,b=v*r,u=v*e;return t[0]=1-(c+m),t[1]=n+u,t[2]=f-b,t[3]=0,t[4]=n-u,t[5]=1-(a+m),t[6]=l+h,t[7]=0,t[8]=f+b,t[9]=l-h,t[10]=1-(a+c),t[11]=0,t[12]=C[0],t[13]=C[1],t[14]=C[2],t[15]=1,t}},69444:function(G){G.exports=U;function U(t,g){return t[0]=g[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=g[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=g[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},48268:function(G){G.exports=U;function U(t,g){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=g[0],t[13]=g[1],t[14]=g[2],t[15]=1,t}},21856:function(G){G.exports=U;function U(t,g){var C=Math.sin(g),i=Math.cos(g);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=C,t[7]=0,t[8]=0,t[9]=-C,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},79216:function(G){G.exports=U;function U(t,g){var C=Math.sin(g),i=Math.cos(g);return t[0]=i,t[1]=0,t[2]=-C,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=C,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},57736:function(G){G.exports=U;function U(t,g){var C=Math.sin(g),i=Math.cos(g);return t[0]=i,t[1]=C,t[2]=0,t[3]=0,t[4]=-C,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},38848:function(G){G.exports=U;function U(t,g,C,i,S,x,v){var p=1/(C-g),r=1/(S-i),e=1/(x-v);return t[0]=x*2*p,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=x*2*r,t[6]=0,t[7]=0,t[8]=(C+g)*p,t[9]=(S+i)*r,t[10]=(v+x)*e,t[11]=-1,t[12]=0,t[13]=0,t[14]=v*x*2*e,t[15]=0,t}},36635:function(G){G.exports=U;function U(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},36524:function(G,U,t){G.exports={create:t(54212),clone:t(76860),copy:t(64492),identity:t(36635),transpose:t(86520),invert:t(4308),adjoint:t(12408),determinant:t(70800),multiply:t(80944),translate:t(35176),scale:t(68152),rotate:t(30016),rotateX:t(15456),rotateY:t(64840),rotateZ:t(4192),fromRotation:t(91616),fromRotationTranslation:t(51944),fromScaling:t(69444),fromTranslation:t(48268),fromXRotation:t(21856),fromYRotation:t(79216),fromZRotation:t(57736),fromQuat:t(61784),frustum:t(38848),perspective:t(51296),perspectiveFromFieldOfView:t(63688),ortho:t(97688),lookAt:t(56508),str:t(89412)}},4308:function(G){G.exports=U;function U(t,g){var C=g[0],i=g[1],S=g[2],x=g[3],v=g[4],p=g[5],r=g[6],e=g[7],a=g[8],n=g[9],f=g[10],c=g[11],l=g[12],m=g[13],h=g[14],b=g[15],u=C*p-i*v,o=C*r-S*v,d=C*e-x*v,w=i*r-S*p,A=i*e-x*p,_=S*e-x*r,y=a*m-n*l,E=a*h-f*l,T=a*b-c*l,s=n*h-f*m,L=n*b-c*m,M=f*b-c*h,z=u*M-o*L+d*s+w*T-A*E+_*y;return z?(z=1/z,t[0]=(p*M-r*L+e*s)*z,t[1]=(S*L-i*M-x*s)*z,t[2]=(m*_-h*A+b*w)*z,t[3]=(f*A-n*_-c*w)*z,t[4]=(r*T-v*M-e*E)*z,t[5]=(C*M-S*T+x*E)*z,t[6]=(h*d-l*_-b*o)*z,t[7]=(a*_-f*d+c*o)*z,t[8]=(v*L-p*T+e*y)*z,t[9]=(i*T-C*L-x*y)*z,t[10]=(l*A-m*d+b*u)*z,t[11]=(n*d-a*A-c*u)*z,t[12]=(p*E-v*s-r*y)*z,t[13]=(C*s-i*E+S*y)*z,t[14]=(m*o-l*w-h*u)*z,t[15]=(a*w-n*o+f*u)*z,t):null}},56508:function(G,U,t){var g=t(36635);G.exports=C;function C(i,S,x,v){var p,r,e,a,n,f,c,l,m,h,b=S[0],u=S[1],o=S[2],d=v[0],w=v[1],A=v[2],_=x[0],y=x[1],E=x[2];return Math.abs(b-_)<1e-6&&Math.abs(u-y)<1e-6&&Math.abs(o-E)<1e-6?g(i):(c=b-_,l=u-y,m=o-E,h=1/Math.sqrt(c*c+l*l+m*m),c*=h,l*=h,m*=h,p=w*m-A*l,r=A*c-d*m,e=d*l-w*c,h=Math.sqrt(p*p+r*r+e*e),h?(h=1/h,p*=h,r*=h,e*=h):(p=0,r=0,e=0),a=l*e-m*r,n=m*p-c*e,f=c*r-l*p,h=Math.sqrt(a*a+n*n+f*f),h?(h=1/h,a*=h,n*=h,f*=h):(a=0,n=0,f=0),i[0]=p,i[1]=a,i[2]=c,i[3]=0,i[4]=r,i[5]=n,i[6]=l,i[7]=0,i[8]=e,i[9]=f,i[10]=m,i[11]=0,i[12]=-(p*b+r*u+e*o),i[13]=-(a*b+n*u+f*o),i[14]=-(c*b+l*u+m*o),i[15]=1,i)}},80944:function(G){G.exports=U;function U(t,g,C){var i=g[0],S=g[1],x=g[2],v=g[3],p=g[4],r=g[5],e=g[6],a=g[7],n=g[8],f=g[9],c=g[10],l=g[11],m=g[12],h=g[13],b=g[14],u=g[15],o=C[0],d=C[1],w=C[2],A=C[3];return t[0]=o*i+d*p+w*n+A*m,t[1]=o*S+d*r+w*f+A*h,t[2]=o*x+d*e+w*c+A*b,t[3]=o*v+d*a+w*l+A*u,o=C[4],d=C[5],w=C[6],A=C[7],t[4]=o*i+d*p+w*n+A*m,t[5]=o*S+d*r+w*f+A*h,t[6]=o*x+d*e+w*c+A*b,t[7]=o*v+d*a+w*l+A*u,o=C[8],d=C[9],w=C[10],A=C[11],t[8]=o*i+d*p+w*n+A*m,t[9]=o*S+d*r+w*f+A*h,t[10]=o*x+d*e+w*c+A*b,t[11]=o*v+d*a+w*l+A*u,o=C[12],d=C[13],w=C[14],A=C[15],t[12]=o*i+d*p+w*n+A*m,t[13]=o*S+d*r+w*f+A*h,t[14]=o*x+d*e+w*c+A*b,t[15]=o*v+d*a+w*l+A*u,t}},97688:function(G){G.exports=U;function U(t,g,C,i,S,x,v){var p=1/(g-C),r=1/(i-S),e=1/(x-v);return t[0]=-2*p,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*e,t[11]=0,t[12]=(g+C)*p,t[13]=(S+i)*r,t[14]=(v+x)*e,t[15]=1,t}},51296:function(G){G.exports=U;function U(t,g,C,i,S){var x=1/Math.tan(g/2),v=1/(i-S);return t[0]=x/C,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=x,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(S+i)*v,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*S*i*v,t[15]=0,t}},63688:function(G){G.exports=U;function U(t,g,C,i){var S=Math.tan(g.upDegrees*Math.PI/180),x=Math.tan(g.downDegrees*Math.PI/180),v=Math.tan(g.leftDegrees*Math.PI/180),p=Math.tan(g.rightDegrees*Math.PI/180),r=2/(v+p),e=2/(S+x);return t[0]=r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=-((v-p)*r*.5),t[9]=(S-x)*e*.5,t[10]=i/(C-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*C/(C-i),t[15]=0,t}},30016:function(G){G.exports=U;function U(t,g,C,i){var S=i[0],x=i[1],v=i[2],p=Math.sqrt(S*S+x*x+v*v),r,e,a,n,f,c,l,m,h,b,u,o,d,w,A,_,y,E,T,s,L,M,z,D;return Math.abs(p)<1e-6?null:(p=1/p,S*=p,x*=p,v*=p,r=Math.sin(C),e=Math.cos(C),a=1-e,n=g[0],f=g[1],c=g[2],l=g[3],m=g[4],h=g[5],b=g[6],u=g[7],o=g[8],d=g[9],w=g[10],A=g[11],_=S*S*a+e,y=x*S*a+v*r,E=v*S*a-x*r,T=S*x*a-v*r,s=x*x*a+e,L=v*x*a+S*r,M=S*v*a+x*r,z=x*v*a-S*r,D=v*v*a+e,t[0]=n*_+m*y+o*E,t[1]=f*_+h*y+d*E,t[2]=c*_+b*y+w*E,t[3]=l*_+u*y+A*E,t[4]=n*T+m*s+o*L,t[5]=f*T+h*s+d*L,t[6]=c*T+b*s+w*L,t[7]=l*T+u*s+A*L,t[8]=n*M+m*z+o*D,t[9]=f*M+h*z+d*D,t[10]=c*M+b*z+w*D,t[11]=l*M+u*z+A*D,g!==t&&(t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t)}},15456:function(G){G.exports=U;function U(t,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[4],v=g[5],p=g[6],r=g[7],e=g[8],a=g[9],n=g[10],f=g[11];return g!==t&&(t[0]=g[0],t[1]=g[1],t[2]=g[2],t[3]=g[3],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t[4]=x*S+e*i,t[5]=v*S+a*i,t[6]=p*S+n*i,t[7]=r*S+f*i,t[8]=e*S-x*i,t[9]=a*S-v*i,t[10]=n*S-p*i,t[11]=f*S-r*i,t}},64840:function(G){G.exports=U;function U(t,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[0],v=g[1],p=g[2],r=g[3],e=g[8],a=g[9],n=g[10],f=g[11];return g!==t&&(t[4]=g[4],t[5]=g[5],t[6]=g[6],t[7]=g[7],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t[0]=x*S-e*i,t[1]=v*S-a*i,t[2]=p*S-n*i,t[3]=r*S-f*i,t[8]=x*i+e*S,t[9]=v*i+a*S,t[10]=p*i+n*S,t[11]=r*i+f*S,t}},4192:function(G){G.exports=U;function U(t,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[0],v=g[1],p=g[2],r=g[3],e=g[4],a=g[5],n=g[6],f=g[7];return g!==t&&(t[8]=g[8],t[9]=g[9],t[10]=g[10],t[11]=g[11],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t[0]=x*S+e*i,t[1]=v*S+a*i,t[2]=p*S+n*i,t[3]=r*S+f*i,t[4]=e*S-x*i,t[5]=a*S-v*i,t[6]=n*S-p*i,t[7]=f*S-r*i,t}},68152:function(G){G.exports=U;function U(t,g,C){var i=C[0],S=C[1],x=C[2];return t[0]=g[0]*i,t[1]=g[1]*i,t[2]=g[2]*i,t[3]=g[3]*i,t[4]=g[4]*S,t[5]=g[5]*S,t[6]=g[6]*S,t[7]=g[7]*S,t[8]=g[8]*x,t[9]=g[9]*x,t[10]=g[10]*x,t[11]=g[11]*x,t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15],t}},89412:function(G){G.exports=U;function U(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},35176:function(G){G.exports=U;function U(t,g,C){var i=C[0],S=C[1],x=C[2],v,p,r,e,a,n,f,c,l,m,h,b;return g===t?(t[12]=g[0]*i+g[4]*S+g[8]*x+g[12],t[13]=g[1]*i+g[5]*S+g[9]*x+g[13],t[14]=g[2]*i+g[6]*S+g[10]*x+g[14],t[15]=g[3]*i+g[7]*S+g[11]*x+g[15]):(v=g[0],p=g[1],r=g[2],e=g[3],a=g[4],n=g[5],f=g[6],c=g[7],l=g[8],m=g[9],h=g[10],b=g[11],t[0]=v,t[1]=p,t[2]=r,t[3]=e,t[4]=a,t[5]=n,t[6]=f,t[7]=c,t[8]=l,t[9]=m,t[10]=h,t[11]=b,t[12]=v*i+a*S+l*x+g[12],t[13]=p*i+n*S+m*x+g[13],t[14]=r*i+f*S+h*x+g[14],t[15]=e*i+c*S+b*x+g[15]),t}},86520:function(G){G.exports=U;function U(t,g){if(t===g){var C=g[1],i=g[2],S=g[3],x=g[6],v=g[7],p=g[11];t[1]=g[4],t[2]=g[8],t[3]=g[12],t[4]=C,t[6]=g[9],t[7]=g[13],t[8]=i,t[9]=x,t[11]=g[14],t[12]=S,t[13]=v,t[14]=p}else t[0]=g[0],t[1]=g[4],t[2]=g[8],t[3]=g[12],t[4]=g[1],t[5]=g[5],t[6]=g[9],t[7]=g[13],t[8]=g[2],t[9]=g[6],t[10]=g[10],t[11]=g[14],t[12]=g[3],t[13]=g[7],t[14]=g[11],t[15]=g[15];return t}},23352:function(G,U,t){var g=t(42771),C=t(55616),i=t(28624),S=t(55212),x=t(60463),v=t(72160),p=t(33888),r=t(14144),e=t(51160),a=t(58908),n=t(65819),f=t(23464),c=t(63768),l=t(50896),m=t(71920),h=t(47520),b=t(308),u=b.nextPow2,o=new x,d=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(d=!0),document.body.removeChild(w)}var A=function(E){_(E)?(E={regl:E},this.gl=E.regl._gl):this.gl=S(E),this.shader=o.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=E.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),o.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(a(E)?E:{})};A.prototype.createShader=function(){var E=this.regl,T=E({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:E.prop("count"),offset:E.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:E.this("sizeBuffer")},width:{offset:0,stride:8,buffer:E.this("sizeBuffer")},char:E.this("charBuffer"),position:E.this("position")},uniforms:{atlasSize:function(L,M){return[M.atlas.width,M.atlas.height]},atlasDim:function(L,M){return[M.atlas.cols,M.atlas.rows]},atlas:function(L,M){return M.atlas.texture},charStep:function(L,M){return M.atlas.step},em:function(L,M){return M.atlas.em},color:E.prop("color"),opacity:E.prop("opacity"),viewport:E.this("viewportArray"),scale:E.this("scale"),align:E.prop("align"),baseline:E.prop("baseline"),translate:E.this("translate"),positionOffset:E.prop("positionOffset")},primitive:"points",viewport:E.this("viewport"),vert:` + */function k(At,mt){if(At===mt)return 0;for(var Lt=At.length,Ht=mt.length,Ut=0,kt=Math.min(Lt,Ht);Ut"u"?[]:new Uint8Array(256),i=0;i>2],a+=g[(p[r]&3)<<4|p[r+1]>>4],a+=g[(p[r+1]&15)<<2|p[r+2]>>6],a+=g[p[r+2]&63];return e%3===2?a=a.substring(0,a.length-1)+"=":e%3===1&&(a=a.substring(0,a.length-2)+"=="),a},x=function(h){var p=h.length*.75,r=h.length,e,a=0,n,f,c,l;h[h.length-1]==="="&&(p--,h[h.length-2]==="="&&p--);var m=new ArrayBuffer(p),v=new Uint8Array(m);for(e=0;e>4,v[a++]=(f&15)<<4|c>>2,v[a++]=(c&3)<<6|l&63;return m}},59968:function(G,U){U.byteLength=p,U.toByteArray=e,U.fromByteArray=f;for(var t=[],g=[],C=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=0,x=i.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var m=c.indexOf("=");m===-1&&(m=l);var v=m===l?0:4-m%4;return[m,v]}function p(c){var l=h(c),m=l[0],v=l[1];return(m+v)*3/4-v}function r(c,l,m){return(l+m)*3/4-m}function e(c){var l,m=h(c),v=m[0],b=m[1],u=new C(r(c,v,b)),o=0,d=b>0?v-4:v,w;for(w=0;w>16&255,u[o++]=l>>8&255,u[o++]=l&255;return b===2&&(l=g[c.charCodeAt(w)]<<2|g[c.charCodeAt(w+1)]>>4,u[o++]=l&255),b===1&&(l=g[c.charCodeAt(w)]<<10|g[c.charCodeAt(w+1)]<<4|g[c.charCodeAt(w+2)]>>2,u[o++]=l>>8&255,u[o++]=l&255),u}function a(c){return t[c>>18&63]+t[c>>12&63]+t[c>>6&63]+t[c&63]}function n(c,l,m){for(var v,b=[],u=l;ud?d:o+u));return v===1?(l=c[m-1],b.push(t[l>>2]+t[l<<4&63]+"==")):v===2&&(l=(c[m-2]<<8)+c[m-1],b.push(t[l>>10]+t[l>>4&63]+t[l<<2&63]+"=")),b.join("")}},64928:function(G){function U(x,h,p,r,e){for(var a=e+1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,h):f-h;c>=0?(a=n,e=n-1):r=n+1}return a}function t(x,h,p,r,e){for(var a=e+1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,h):f-h;c>0?(a=n,e=n-1):r=n+1}return a}function g(x,h,p,r,e){for(var a=r-1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,h):f-h;c<0?(a=n,r=n+1):e=n-1}return a}function C(x,h,p,r,e){for(var a=r-1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,h):f-h;c<=0?(a=n,r=n+1):e=n-1}return a}function i(x,h,p,r,e){for(;r<=e;){var a=r+e>>>1,n=x[a],f=p!==void 0?p(n,h):n-h;if(f===0)return a;f<=0?r=a+1:e=a-1}return-1}function S(x,h,p,r,e,a){return typeof p=="function"?a(x,h,p,r===void 0?0:r|0,e===void 0?x.length-1:e|0):a(x,h,void 0,p===void 0?0:p|0,r===void 0?x.length-1:r|0)}G.exports={ge:function(x,h,p,r,e){return S(x,h,p,r,e,U)},gt:function(x,h,p,r,e){return S(x,h,p,r,e,t)},lt:function(x,h,p,r,e){return S(x,h,p,r,e,g)},le:function(x,h,p,r,e){return S(x,h,p,r,e,C)},eq:function(x,h,p,r,e){return S(x,h,p,r,e,i)}}},308:function(G,U){"use restrict";var t=32;U.INT_BITS=t,U.INT_MAX=2147483647,U.INT_MIN=-1<0)-(i<0)},U.abs=function(i){var S=i>>t-1;return(i^S)-S},U.min=function(i,S){return S^(i^S)&-(i65535)<<4,i>>>=S,x=(i>255)<<3,i>>>=x,S|=x,x=(i>15)<<2,i>>>=x,S|=x,x=(i>3)<<1,i>>>=x,S|=x,S|i>>1},U.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},U.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function g(i){var S=32;return i&=-i,i&&S--,i&65535&&(S-=16),i&16711935&&(S-=8),i&252645135&&(S-=4),i&858993459&&(S-=2),i&1431655765&&(S-=1),S}U.countTrailingZeros=g,U.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},U.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},U.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var C=new Array(256);(function(i){for(var S=0;S<256;++S){var x=S,h=S,p=7;for(x>>>=1;x;x>>>=1)h<<=1,h|=x&1,--p;i[S]=h<>>8&255]<<16|C[i>>>16&255]<<8|C[i>>>24&255]},U.interleave2=function(i,S){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,i|S<<1},U.deinterleave2=function(i,S){return i=i>>>S&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},U.interleave3=function(i,S,x){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,i|=S<<1,x&=1023,x=(x|x<<16)&4278190335,x=(x|x<<8)&251719695,x=(x|x<<4)&3272356035,x=(x|x<<2)&1227133513,i|x<<2},U.deinterleave3=function(i,S){return i=i>>>S&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},U.nextCombination=function(i){var S=i|i-1;return S+1|(~S&-~S)-1>>>g(i)+1}},29620:function(G,U,t){var g=t(32420);G.exports=i;var C=1e20;function i(h,p){p||(p={});var r=p.cutoff==null?.25:p.cutoff,e=p.radius==null?8:p.radius,a=p.channel||0,n,f,c,l,m,v,b,u,o,d,w;if(ArrayBuffer.isView(h)||Array.isArray(h)){if(!p.width||!p.height)throw Error("For raw data width and height should be provided by options");n=p.width,f=p.height,l=h,p.stride?v=p.stride:v=Math.floor(h.length/n/f)}else window.HTMLCanvasElement&&h instanceof window.HTMLCanvasElement?(u=h,b=u.getContext("2d"),n=u.width,f=u.height,o=b.getImageData(0,0,n,f),l=o.data,v=4):window.CanvasRenderingContext2D&&h instanceof window.CanvasRenderingContext2D?(u=h.canvas,b=h,n=u.width,f=u.height,o=b.getImageData(0,0,n,f),l=o.data,v=4):window.ImageData&&h instanceof window.ImageData&&(o=h,n=h.width,f=h.height,l=o.data,v=4);if(c=Math.max(n,f),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(m=l,l=Array(n*f),d=0,w=m.length;d-1?C(p):p}},57916:function(G,U,t){var g=t(8844),C=t(53664),i=t(14500),S=C("%TypeError%"),x=C("%Function.prototype.apply%"),h=C("%Function.prototype.call%"),p=C("%Reflect.apply%",!0)||g.call(h,x),r=C("%Object.defineProperty%",!0),e=C("%Math.max%");if(r)try{r({},"a",{value:1})}catch{r=null}G.exports=function(f){if(typeof f!="function")throw new S("a function is required");var c=p(g,h,arguments);return i(c,1+e(0,f.length-(arguments.length-1)),!0)};var a=function(){return p(g,x,arguments)};r?r(G.exports,"apply",{value:a}):G.exports.apply=a},32420:function(G){G.exports=U;function U(t,g,C){return gC?C:t:tg?g:t}},3808:function(G,U,t){var g=t(32420);G.exports=C,G.exports.to=C,G.exports.from=i;function C(S,x){x==null&&(x=!0);var h=S[0],p=S[1],r=S[2],e=S[3];e==null&&(e=x?1:255),x&&(h*=255,p*=255,r*=255,e*=255),h=g(h,0,255)&255,p=g(p,0,255)&255,r=g(r,0,255)&255,e=g(e,0,255)&255;var a=h*16777216+(p<<16)+(r<<8)+e;return a}function i(S,x){S=+S;var h=S>>>24,p=(S&16711680)>>>16,r=(S&65280)>>>8,e=S&255;return x===!1?[h,p,r,e]:[h/255,p/255,r/255,e/255]}},17592:function(G){G.exports={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]}},72160:function(G,U,t){var g=t(96824),C=t(32420),i=t(72512);G.exports=function(h,p){(p==="float"||!p)&&(p="array"),p==="uint"&&(p="uint8"),p==="uint_clamped"&&(p="uint8_clamped");var r=i(p),e=new r(4),a=p!=="uint8"&&p!=="uint8_clamped";return(!h.length||typeof h=="string")&&(h=g(h),h[0]/=255,h[1]/=255,h[2]/=255),S(h)?(e[0]=h[0],e[1]=h[1],e[2]=h[2],e[3]=h[3]!=null?h[3]:255,a&&(e[0]/=255,e[1]/=255,e[2]/=255,e[3]/=255),e):(a?(e[0]=h[0],e[1]=h[1],e[2]=h[2],e[3]=h[3]!=null?h[3]:1):(e[0]=C(Math.floor(h[0]*255),0,255),e[1]=C(Math.floor(h[1]*255),0,255),e[2]=C(Math.floor(h[2]*255),0,255),e[3]=h[3]==null?255:C(Math.floor(h[3]*255),0,255)),e)};function S(x){return!!(x instanceof Uint8Array||x instanceof Uint8ClampedArray||Array.isArray(x)&&(x[0]>1||x[0]===0)&&(x[1]>1||x[1]===0)&&(x[2]>1||x[2]===0)&&(!x[3]||x[3]>1))}},96824:function(G,U,t){var g=t(95532),C=t(53576),i=t(32420);G.exports=function(x){var h,p=g(x);return p.space?(h=Array(3),h[0]=i(p.values[0],0,255),h[1]=i(p.values[1],0,255),h[2]=i(p.values[2],0,255),p.space[0]==="h"&&(h=C.rgb(h)),h.push(i(p.alpha,0,1)),h):[]}},95532:function(G,U,t){var g=t(17592);G.exports=i;var C={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function i(S){var x,h=[],p=1,r;if(typeof S=="string")if(S=S.toLowerCase(),g[S])h=g[S].slice(),r="rgb";else if(S==="transparent")p=0,r="rgb",h=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var e=S.slice(1),a=e.length,n=a<=4;p=1,n?(h=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],a===4&&(p=parseInt(e[3]+e[3],16)/255)):(h=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],a===8&&(p=parseInt(e[6]+e[7],16)/255)),h[0]||(h[0]=0),h[1]||(h[1]=0),h[2]||(h[2]=0),r="rgb"}else if(x=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var f=x[1],c=f==="rgb",e=f.replace(/a$/,"");r=e;var a=e==="cmyk"?4:e==="gray"?1:3;h=x[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,b){if(/%$/.test(v))return b===a?parseFloat(v)/100:e==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(e[b]==="h"){if(/deg$/.test(v))return parseFloat(v);if(C[v]!==void 0)return C[v]}return parseFloat(v)}),f===e&&h.push(1),p=c||h[a]===void 0?1:h[a],h=h.slice(0,a)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(h=S.match(/([0-9]+)/g).map(function(l){return parseFloat(l)}),r=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(h=[S[0],S[1],S[2]],r="rgb",p=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(r="rgb",h=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(r="hsl",h=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),p=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(p/=100)):(r="rgb",h=[S>>>16,(S&65280)>>>8,S&255]);return{space:r,values:h,alpha:p}}},53576:function(G,U,t){var g=t(19336);G.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(C){var i=C[0]/360,S=C[1]/100,x=C[2]/100,h,p,r,e,a;if(S===0)return a=x*255,[a,a,a];x<.5?p=x*(1+S):p=x+S-x*S,h=2*x-p,e=[0,0,0];for(var n=0;n<3;n++)r=i+.3333333333333333*-(n-1),r<0?r++:r>1&&r--,6*r<1?a=h+(p-h)*6*r:2*r<1?a=p:3*r<2?a=h+(p-h)*(.6666666666666666-r)*6:a=h,e[n]=a*255;return e}},g.hsl=function(C){var i=C[0]/255,S=C[1]/255,x=C[2]/255,h=Math.min(i,S,x),p=Math.max(i,S,x),r=p-h,e,a,n;return p===h?e=0:i===p?e=(S-x)/r:S===p?e=2+(x-i)/r:x===p&&(e=4+(i-S)/r),e=Math.min(e*60,360),e<0&&(e+=360),n=(h+p)/2,p===h?a=0:n<=.5?a=r/(p+h):a=r/(2-p-h),[e,a*100,n*100]}},19336:function(G){G.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116:function(G){G.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},42771:function(G,U,t){G.exports={parse:t(46416),stringify:t(49395)}},8744:function(G,U,t){var g=t(30584);G.exports={isSize:function(i){return/^[\d\.]/.test(i)||i.indexOf("/")!==-1||g.indexOf(i)!==-1}}},46416:function(G,U,t){var g=t(92384),C=t(68194),i=t(3748),S=t(2904),x=t(47916),h=t(7294),p=t(39956),r=t(8744).isSize;G.exports=a;var e=a.cache={};function a(f){if(typeof f!="string")throw new Error("Font argument must be a string.");if(e[f])return e[f];if(f==="")throw new Error("Cannot parse an empty string.");if(i.indexOf(f)!==-1)return e[f]={system:f};for(var c={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},l=p(f,/\s+/),m;m=l.shift();){if(C.indexOf(m)!==-1)return["style","variant","weight","stretch"].forEach(function(b){c[b]=m}),e[f]=c;if(x.indexOf(m)!==-1){c.style=m;continue}if(m==="normal"||m==="small-caps"){c.variant=m;continue}if(h.indexOf(m)!==-1){c.stretch=m;continue}if(S.indexOf(m)!==-1){c.weight=m;continue}if(r(m)){var v=p(m,"/");if(c.size=v[0],v[1]!=null?c.lineHeight=n(v[1]):l[0]==="/"&&(l.shift(),c.lineHeight=n(l.shift())),!l.length)throw new Error("Missing required font-family.");return c.family=p(l.join(" "),/\s*,\s*/).map(g),e[f]=c}throw new Error("Unknown or unsupported font token: "+m)}throw new Error("Missing required font-size.")}function n(f){var c=parseFloat(f);return c.toString()===f?c:f}},49395:function(G,U,t){var g=t(55616),C=t(8744).isSize,i=f(t(68194)),S=f(t(3748)),x=f(t(2904)),h=f(t(47916)),p=f(t(7294)),r={normal:1,"small-caps":1},e={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},a={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};G.exports=function(l){if(l=g(l,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),l.system)return l.system&&n(l.system,S),l.system;if(n(l.style,h),n(l.variant,r),n(l.weight,x),n(l.stretch,p),l.size==null&&(l.size=a.size),typeof l.size=="number"&&(l.size+="px"),!C)throw Error("Bad size value `"+l.size+"`");l.family||(l.family=a.family),Array.isArray(l.family)&&(l.family.length||(l.family=[a.family]),l.family=l.family.map(function(v){return e[v]?v:'"'+v+'"'}).join(", "));var m=[];return m.push(l.style),l.variant!==l.style&&m.push(l.variant),l.weight!==l.variant&&l.weight!==l.style&&m.push(l.weight),l.stretch!==l.weight&&l.stretch!==l.variant&&l.stretch!==l.style&&m.push(l.stretch),m.push(l.size+(l.lineHeight==null||l.lineHeight==="normal"||l.lineHeight+""=="1"?"":"/"+l.lineHeight)),m.push(l.family),m.filter(Boolean).join(" ")};function n(c,l){if(c&&!l[c]&&!i[c])throw Error("Unknown keyword `"+c+"`");return c}function f(c){for(var l={},m=0;mf?1:n>=f?0:NaN}function C(n){return n.length===1&&(n=i(n)),{left:function(f,c,l,m){for(l==null&&(l=0),m==null&&(m=f.length);l>>1;n(f[v],c)<0?l=v+1:m=v}return l},right:function(f,c,l,m){for(l==null&&(l=0),m==null&&(m=f.length);l>>1;n(f[v],c)>0?m=v:l=v+1}return l}}}function i(n){return function(f,c){return g(n(f),c)}}C(g);function S(n,f){var c=n.length,l=-1,m,v;if(f==null){for(;++l=m)for(v=m;++lv&&(v=m)}else for(;++l=m)for(v=m;++lv&&(v=m);return v}function x(n){return n===null?NaN:+n}function h(n,f){var c=n.length,l=c,m=-1,v,b=0;if(f==null)for(;++m=0;)for(b=n[f],c=b.length;--c>=0;)v[--m]=b[c];return v}function r(n,f){var c=n.length,l=-1,m,v;if(f==null){for(;++l=m)for(v=m;++lm&&(v=m)}else for(;++l=m)for(v=m;++lm&&(v=m);return v}function e(n,f,c){n=+n,f=+f,c=(m=arguments.length)<2?(f=n,n=0,1):m<3?1:+c;for(var l=-1,m=Math.max(0,Math.ceil((f-n)/c))|0,v=new Array(m);++l=f.length)return l!=null&&o.sort(l),m!=null?m(o):o;for(var _=-1,y=o.length,E=f[d++],T,s,L=S(),M,z=w();++_f.length)return o;var w,A=c[d-1];return m!=null&&d>=f.length?w=o.entries():(w=[],o.each(function(_,y){w.push({key:y,values:u(_,d)})})),A!=null?w.sort(function(_,y){return A(_.key,y.key)}):w}return v={object:function(o){return b(o,0,h,p)},map:function(o){return b(o,0,r,e)},entries:function(o){return u(b(o,0,r,e),0)},key:function(o){return f.push(o),v},sortKeys:function(o){return c[f.length-1]=o,v},sortValues:function(o){return l=o,v},rollup:function(o){return m=o,v}}}function h(){return{}}function p(f,c,l){f[c]=l}function r(){return S()}function e(f,c,l){f.set(c,l)}function a(){}var n=S.prototype;a.prototype={constructor:a,has:n.has,add:function(f){return f+="",this[g+f]=f,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49812:function(G,U,t){t.r(U),t.d(U,{forceCenter:function(){return g},forceCollide:function(){return L},forceLink:function(){return N},forceManyBody:function(){return Vt},forceRadial:function(){return It},forceSimulation:function(){return kt},forceX:function(){return re},forceY:function(){return Kt}});function g($t,le){var he;$t==null&&($t=0),le==null&&(le=0);function de(){var xe,Se=he.length,ne,zt=0,Xt=0;for(xe=0;xe=(Ft=(zt+Jt)/2))?zt=Ft:Jt=Ft,(Nt=he>=(xt=(Xt+Wt)/2))?Xt=xt:Wt=xt,xe=Se,!(Se=Se[jt=Nt<<1|Mt]))return xe[jt]=ne,$t;if(yt=+$t._x.call(null,Se.data),Et=+$t._y.call(null,Se.data),le===yt&&he===Et)return ne.next=Se,xe?xe[jt]=ne:$t._root=ne,$t;do xe=xe?xe[jt]=new Array(4):$t._root=new Array(4),(Mt=le>=(Ft=(zt+Jt)/2))?zt=Ft:Jt=Ft,(Nt=he>=(xt=(Xt+Wt)/2))?Xt=xt:Wt=xt;while((jt=Nt<<1|Mt)===(ie=(Et>=xt)<<1|yt>=Ft));return xe[ie]=Se,xe[jt]=ne,$t}function h($t){var le,he,de=$t.length,xe,Se,ne=new Array(de),zt=new Array(de),Xt=1/0,Jt=1/0,Wt=-1/0,Ft=-1/0;for(he=0;heWt&&(Wt=xe),SeFt&&(Ft=Se));if(Xt>Wt||Jt>Ft)return this;for(this.cover(Xt,Jt).cover(Wt,Ft),he=0;he$t||$t>=xe||de>le||le>=Se;)switch(Jt=(leWt||(zt=Et.y0)>Ft||(Xt=Et.x1)=jt)<<1|$t>=Nt)&&(Et=xt[xt.length-1],xt[xt.length-1]=xt[xt.length-1-Mt],xt[xt.length-1-Mt]=Et)}else{var ie=$t-+this._x.call(null,yt.data),me=le-+this._y.call(null,yt.data),be=ie*ie+me*me;if(be=(xt=(ne+Xt)/2))?ne=xt:Xt=xt,(Mt=Ft>=(yt=(zt+Jt)/2))?zt=yt:Jt=yt,le=he,!(he=he[Nt=Mt<<1|Et]))return this;if(!he.length)break;(le[Nt+1&3]||le[Nt+2&3]||le[Nt+3&3])&&(de=le,jt=Nt)}for(;he.data!==$t;)if(xe=he,!(he=he.next))return this;return(Se=he.next)&&delete he.next,xe?(Se?xe.next=Se:delete xe.next,this):le?(Se?le[Nt]=Se:delete le[Nt],(he=le[0]||le[1]||le[2]||le[3])&&he===(le[3]||le[2]||le[1]||le[0])&&!he.length&&(de?de[jt]=he:this._root=he),this):(this._root=Se,this)}function c($t){for(var le=0,he=$t.length;leFt.index){var ir=xt-ce.x-ce.vx,pe=yt-ce.y-ce.vy,Xe=ir*ir+pe*pe;Xext+Be||veyt+Be||LeXt.r&&(Xt.r=Xt[Jt].r)}function zt(){if(le){var Xt,Jt=le.length,Wt;for(he=new Array(Jt),Xt=0;Xt=0&&(de=he.slice(xe+1),he=he.slice(0,xe)),he&&!le.hasOwnProperty(he))throw new Error("unknown type: "+he);return{type:he,name:de}})}B.prototype=k.prototype={constructor:B,on:function($t,le){var he=this._,de=O($t+"",he),xe,Se=-1,ne=de.length;if(arguments.length<2){for(;++Se0)for(var he=new Array(xe),de=0,xe,Se;de=0&&$t._call.call(null,le),$t=$t._next;--et}function wt(){Q=(V=$.now())+ot,et=it=0;try{Tt()}finally{et=0,bt(),Q=0}}function Rt(){var $t=$.now(),le=$t-V;le>J&&(ot-=le,V=$t)}function bt(){for(var $t,le=X,he,de=1/0;le;)le._call?(de>le._time&&(de=le._time),$t=le,le=le._next):(he=le._next,le._next=null,le=$t?$t._next=he:X=he);tt=$t,At(de)}function At($t){if(!et){it&&(it=clearTimeout(it));var le=$t-Q;le>24?($t<1/0&&(it=setTimeout(wt,$t-$.now()-ot)),ut&&(ut=clearInterval(ut))):(ut||(V=$.now(),ut=setInterval(Rt,J)),et=1,Z(wt))}}function mt($t){return $t.x}function Lt($t){return $t.y}var Ht=10,Ut=Math.PI*(3-Math.sqrt(5));function kt($t){var le,he=1,de=.001,xe=1-Math.pow(de,1/300),Se=0,ne=.6,zt=(0,M.kH)(),Xt=gt(Wt),Jt=j("tick","end");$t==null&&($t=[]);function Wt(){Ft(),Jt.call("tick",le),he1?(Mt==null?zt.remove(Et):zt.set(Et,yt(Mt)),le):zt.get(Et)},find:function(Et,Mt,Nt){var jt=0,ie=$t.length,me,be,ve,Le,ce;for(Nt==null?Nt=1/0:Nt*=Nt,jt=0;jt1?(Jt.on(Et,Mt),le):Jt.on(Et)}}}function Vt(){var $t,le,he,de=C(-30),xe,Se=1,ne=1/0,zt=.81;function Xt(xt){var yt,Et=$t.length,Mt=A($t,mt,Lt).visitAfter(Wt);for(he=xt,yt=0;yt=ne)return;(xt.data!==le||xt.next)&&(Nt===0&&(Nt=i(),me+=Nt*Nt),jt===0&&(jt=i(),me+=jt*jt),me=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function C(w,A){if((_=(w=A?w.toExponential(A-1):w.toExponential()).indexOf("e"))<0)return null;var _,y=w.slice(0,_);return[y.length>1?y[0]+y.slice(2):y,+w.slice(_+1)]}function i(w){return w=C(Math.abs(w)),w?w[1]:NaN}function S(w,A){return function(_,y){for(var E=_.length,T=[],s=0,L=w[0],M=0;E>0&&L>0&&(M+L+1>y&&(L=Math.max(1,y-M)),T.push(_.substring(E-=L,E+L)),!((M+=L+1)>y));)L=w[s=(s+1)%w.length];return T.reverse().join(A)}}function x(w){return function(A){return A.replace(/[0-9]/g,function(_){return w[+_]})}}var h=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function p(w){if(!(A=h.exec(w)))throw new Error("invalid format: "+w);var A;return new r({fill:A[1],align:A[2],sign:A[3],symbol:A[4],zero:A[5],width:A[6],comma:A[7],precision:A[8]&&A[8].slice(1),trim:A[9],type:A[10]})}p.prototype=r.prototype;function r(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function e(w){t:for(var A=w.length,_=1,y=-1,E;_0&&(y=0);break}return y>0?w.slice(0,y)+w.slice(E+1):w}var a;function n(w,A){var _=C(w,A);if(!_)return w+"";var y=_[0],E=_[1],T=E-(a=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,s=y.length;return T===s?y:T>s?y+new Array(T-s+1).join("0"):T>0?y.slice(0,T)+"."+y.slice(T):"0."+new Array(1-T).join("0")+C(w,Math.max(0,A+T-1))[0]}function f(w,A){var _=C(w,A);if(!_)return w+"";var y=_[0],E=_[1];return E<0?"0."+new Array(-E).join("0")+y:y.length>E+1?y.slice(0,E+1)+"."+y.slice(E+1):y+new Array(E-y.length+2).join("0")}var c={"%":function(w,A){return(w*100).toFixed(A)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:g,e:function(w,A){return w.toExponential(A)},f:function(w,A){return w.toFixed(A)},g:function(w,A){return w.toPrecision(A)},o:function(w){return Math.round(w).toString(8)},p:function(w,A){return f(w*100,A)},r:f,s:n,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function l(w){return w}var m=Array.prototype.map,v=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function b(w){var A=w.grouping===void 0||w.thousands===void 0?l:S(m.call(w.grouping,Number),w.thousands+""),_=w.currency===void 0?"":w.currency[0]+"",y=w.currency===void 0?"":w.currency[1]+"",E=w.decimal===void 0?".":w.decimal+"",T=w.numerals===void 0?l:x(m.call(w.numerals,String)),s=w.percent===void 0?"%":w.percent+"",L=w.minus===void 0?"-":w.minus+"",M=w.nan===void 0?"NaN":w.nan+"";function z(N){N=p(N);var I=N.fill,k=N.align,B=N.sign,O=N.symbol,H=N.zero,Y=N.width,j=N.comma,et=N.precision,it=N.trim,ut=N.type;ut==="n"?(j=!0,ut="g"):c[ut]||(et===void 0&&(et=12),it=!0,ut="g"),(H||I==="0"&&k==="=")&&(H=!0,I="0",k="=");var J=O==="$"?_:O==="#"&&/[boxX]/.test(ut)?"0"+ut.toLowerCase():"",X=O==="$"?y:/[%p]/.test(ut)?s:"",tt=c[ut],V=/[defgprs%]/.test(ut);et=et===void 0?6:/[gprs]/.test(ut)?Math.max(1,Math.min(21,et)):Math.max(0,Math.min(20,et));function Q(ot){var $=J,Z=X,st,nt,ct;if(ut==="c")Z=tt(ot)+Z,ot="";else{ot=+ot;var gt=ot<0||1/ot<0;if(ot=isNaN(ot)?M:tt(Math.abs(ot),et),it&&(ot=e(ot)),gt&&+ot==0&&B!=="+"&&(gt=!1),$=(gt?B==="("?B:L:B==="-"||B==="("?"":B)+$,Z=(ut==="s"?v[8+a/3]:"")+Z+(gt&&B==="("?")":""),V){for(st=-1,nt=ot.length;++stct||ct>57){Z=(ct===46?E+ot.slice(st+1):ot.slice(st))+Z,ot=ot.slice(0,st);break}}}j&&!H&&(ot=A(ot,1/0));var Tt=$.length+ot.length+Z.length,wt=Tt>1)+$+ot+Z+wt.slice(Tt);break;default:ot=wt+$+ot+Z;break}return T(ot)}return Q.toString=function(){return N+""},Q}function D(N,I){var k=z((N=p(N),N.type="f",N)),B=Math.max(-8,Math.min(8,Math.floor(i(I)/3)))*3,O=Math.pow(10,-B),H=v[8+B/3];return function(Y){return k(O*Y)+H}}return{format:z,formatPrefix:D}}var u,o;d({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function d(w){return u=b(w),o=u.format,u.formatPrefix,u}},87108:function(G,U,t){t.r(U),t.d(U,{geoAiry:function(){return H},geoAiryRaw:function(){return O},geoAitoff:function(){return j},geoAitoffRaw:function(){return Y},geoArmadillo:function(){return it},geoArmadilloRaw:function(){return et},geoAugust:function(){return J},geoAugustRaw:function(){return ut},geoBaker:function(){return Q},geoBakerRaw:function(){return V},geoBerghaus:function(){return Z},geoBerghausRaw:function(){return $},geoBertin1953:function(){return bt},geoBertin1953Raw:function(){return Rt},geoBoggs:function(){return It},geoBoggsRaw:function(){return Vt},geoBonne:function(){return he},geoBonneRaw:function(){return le},geoBottomley:function(){return xe},geoBottomleyRaw:function(){return de},geoBromley:function(){return ne},geoBromleyRaw:function(){return Se},geoChamberlin:function(){return Mt},geoChamberlinAfrica:function(){return Et},geoChamberlinRaw:function(){return xt},geoCollignon:function(){return jt},geoCollignonRaw:function(){return Nt},geoCraig:function(){return me},geoCraigRaw:function(){return ie},geoCraster:function(){return Le},geoCrasterRaw:function(){return ve},geoCylindricalEqualArea:function(){return Te},geoCylindricalEqualAreaRaw:function(){return ce},geoCylindricalStereographic:function(){return ir},geoCylindricalStereographicRaw:function(){return Be},geoEckert1:function(){return Xe},geoEckert1Raw:function(){return pe},geoEckert2:function(){return or},geoEckert2Raw:function(){return Ke},geoEckert3:function(){return ge},geoEckert3Raw:function(){return $e},geoEckert4:function(){return Ae},geoEckert4Raw:function(){return se},geoEckert5:function(){return Ie},geoEckert5Raw:function(){return Ce},geoEckert6:function(){return ke},geoEckert6Raw:function(){return Pe},geoEisenlohr:function(){return ur},geoEisenlohrRaw:function(){return Je},geoFahey:function(){return Yt},geoFaheyRaw:function(){return vr},geoFoucaut:function(){return Ne},geoFoucautRaw:function(){return Gt},geoFoucautSinusoidal:function(){return Qe},geoFoucautSinusoidalRaw:function(){return Oe},geoGilbert:function(){return dr},geoGingery:function(){return Gr},geoGingeryRaw:function(){return mr},geoGinzburg4:function(){return cn},geoGinzburg4Raw:function(){return Dr},geoGinzburg5:function(){return Cn},geoGinzburg5Raw:function(){return rn},geoGinzburg6:function(){return Tr},geoGinzburg6Raw:function(){return En},geoGinzburg8:function(){return Wr},geoGinzburg8Raw:function(){return Cr},geoGinzburg9:function(){return an},geoGinzburg9Raw:function(){return Ur},geoGringorten:function(){return ni},geoGringortenQuincuncial:function(){return Dc},geoGringortenRaw:function(){return gn},geoGuyou:function(){return dn},geoGuyouRaw:function(){return wr},geoHammer:function(){return gt},geoHammerRaw:function(){return nt},geoHammerRetroazimuthal:function(){return Bn},geoHammerRetroazimuthalRaw:function(){return Tn},geoHealpix:function(){return sn},geoHealpixRaw:function(){return Ar},geoHill:function(){return Zr},geoHillRaw:function(){return Er},geoHomolosine:function(){return Un},geoHomolosineRaw:function(){return Pn},geoHufnagel:function(){return mi},geoHufnagelRaw:function(){return On},geoHyperelliptical:function(){return pa},geoHyperellipticalRaw:function(){return Ci},geoInterrupt:function(){return Qa},geoInterruptedBoggs:function(){return Bu},geoInterruptedHomolosine:function(){return $i},geoInterruptedMollweide:function(){return Uu},geoInterruptedMollweideHemispheres:function(){return ho},geoInterruptedQuarticAuthalic:function(){return Ls},geoInterruptedSinuMollweide:function(){return vu},geoInterruptedSinusoidal:function(){return ul},geoKavrayskiy7:function(){return Ua},geoKavrayskiy7Raw:function(){return za},geoLagrange:function(){return $a},geoLagrangeRaw:function(){return fl},geoLarrivee:function(){return Tf},geoLarriveeRaw:function(){return _o},geoLaskowski:function(){return yc},geoLaskowskiRaw:function(){return bo},geoLittrow:function(){return Za},geoLittrowRaw:function(){return ts},geoLoximuthal:function(){return Cs},geoLoximuthalRaw:function(){return Hu},geoMiller:function(){return Vu},geoMillerRaw:function(){return es},geoModifiedStereographic:function(){return Xs},geoModifiedStereographicAlaska:function(){return Gu},geoModifiedStereographicGs48:function(){return Ac},geoModifiedStereographicGs50:function(){return Mc},geoModifiedStereographicLee:function(){return Sf},geoModifiedStereographicMiller:function(){return Mf},geoModifiedStereographicRaw:function(){return Af},geoMollweide:function(){return Ht},geoMollweideRaw:function(){return Lt},geoMtFlatPolarParabolic:function(){return Ef},geoMtFlatPolarParabolicRaw:function(){return kl},geoMtFlatPolarQuartic:function(){return Sc},geoMtFlatPolarQuarticRaw:function(){return vs},geoMtFlatPolarSinusoidal:function(){return _f},geoMtFlatPolarSinusoidalRaw:function(){return pu},geoNaturalEarth:function(){return Cf.c},geoNaturalEarth2:function(){return Uo},geoNaturalEarth2Raw:function(){return gu},geoNaturalEarthRaw:function(){return Cf.g},geoNellHammer:function(){return Zs},geoNellHammerRaw:function(){return hl},geoNicolosi:function(){return Wu},geoNicolosiRaw:function(){return rs},geoPatterson:function(){return ml},geoPattersonRaw:function(){return yu},geoPeirceQuincuncial:function(){return Ff},geoPierceQuincuncial:function(){return Ff},geoPolyconic:function(){return _c},geoPolyconicRaw:function(){return xu},geoPolyhedral:function(){return ga},geoPolyhedralButterfly:function(){return Bl},geoPolyhedralCollignon:function(){return Ks},geoPolyhedralWaterman:function(){return Rs},geoProject:function(){return Pc},geoQuantize:function(){return zf},geoQuincuncial:function(){return gs},geoRectangularPolyconic:function(){return kf},geoRectangularPolyconicRaw:function(){return Qu},geoRobinson:function(){return Ds},geoRobinsonRaw:function(){return Xo},geoSatellite:function(){return Js},geoSatelliteRaw:function(){return Au},geoSinuMollweide:function(){return Ln},geoSinuMollweideRaw:function(){return wn},geoSinusoidal:function(){return $t},geoSinusoidalRaw:function(){return Kt},geoStitch:function(){return Xl},geoTimes:function(){return Ha},geoTimesRaw:function(){return zs},geoTwoPointAzimuthal:function(){return Eu},geoTwoPointAzimuthalRaw:function(){return qu},geoTwoPointAzimuthalUsa:function(){return $s},geoTwoPointEquidistant:function(){return Bf},geoTwoPointEquidistantRaw:function(){return Zl},geoTwoPointEquidistantUsa:function(){return Ic},geoVanDerGrinten:function(){return jl},geoVanDerGrinten2:function(){return Uf},geoVanDerGrinten2Raw:function(){return El},geoVanDerGrinten3:function(){return Fc},geoVanDerGrinten3Raw:function(){return ks},geoVanDerGrinten4:function(){return Kl},geoVanDerGrinten4Raw:function(){return To},geoVanDerGrintenRaw:function(){return lo},geoWagner:function(){return Os},geoWagner4:function(){return Hf},geoWagner4Raw:function(){return Cu},geoWagner6:function(){return ef},geoWagner6Raw:function(){return $l},geoWagner7:function(){return tf},geoWagnerRaw:function(){return xs},geoWiechel:function(){return rf},geoWiechelRaw:function(){return qs},geoWinkel3:function(){return Vf},geoWinkel3Raw:function(){return ql}});var g=t(87952),C=Math.abs,i=Math.atan,S=Math.atan2,x=Math.cos,h=Math.exp,p=Math.floor,r=Math.log,e=Math.max,a=Math.min,n=Math.pow,f=Math.round,c=Math.sign||function(qt){return qt>0?1:qt<0?-1:0},l=Math.sin,m=Math.tan,v=1e-6,b=1e-12,u=Math.PI,o=u/2,d=u/4,w=Math.SQRT1_2,A=z(2),_=z(u),y=u*2,E=180/u,T=u/180;function s(qt){return qt?qt/Math.sin(qt):1}function L(qt){return qt>1?o:qt<-1?-o:Math.asin(qt)}function M(qt){return qt>1?0:qt<-1?u:Math.acos(qt)}function z(qt){return qt>0?Math.sqrt(qt):0}function D(qt){return qt=h(2*qt),(qt-1)/(qt+1)}function N(qt){return(h(qt)-h(-qt))/2}function I(qt){return(h(qt)+h(-qt))/2}function k(qt){return r(qt+z(qt*qt+1))}function B(qt){return r(qt+z(qt*qt-1))}function O(qt){var oe=m(qt/2),we=2*r(x(qt/2))/(oe*oe);function Me(Ue,ze){var Ge=x(Ue),gr=x(ze),br=l(ze),sr=gr*Ge,Mr=-((1-sr?r((1+sr)/2)/(1-sr):-.5)+we/(1+sr));return[Mr*gr*l(Ue),Mr*br]}return Me.invert=function(Ue,ze){var Ge=z(Ue*Ue+ze*ze),gr=-qt/2,br=50,sr;if(!Ge)return[0,0];do{var Mr=gr/2,Ir=x(Mr),Nr=l(Mr),en=Nr/Ir,yn=-r(C(Ir));gr-=sr=(2/en*yn-we*en-Ge)/(-yn/(Nr*Nr)+1-we/(2*Ir*Ir))*(Ir<0?.7:1)}while(C(sr)>v&&--br>0);var Rn=l(gr);return[S(Ue*Rn,Ge*x(gr)),L(ze*Rn/Ge)]},Me}function H(){var qt=o,oe=(0,g.U)(O),we=oe(qt);return we.radius=function(Me){return arguments.length?oe(qt=Me*T):qt*E},we.scale(179.976).clipAngle(147)}function Y(qt,oe){var we=x(oe),Me=s(M(we*x(qt/=2)));return[2*we*l(qt)*Me,l(oe)*Me]}Y.invert=function(qt,oe){if(!(qt*qt+4*oe*oe>u*u+v)){var we=qt,Me=oe,Ue=25;do{var ze=l(we),Ge=l(we/2),gr=x(we/2),br=l(Me),sr=x(Me),Mr=l(2*Me),Ir=br*br,Nr=sr*sr,en=Ge*Ge,yn=1-Nr*gr*gr,Rn=yn?M(sr*gr)*z(Dn=1/yn):Dn=0,Dn,Zn=2*Rn*sr*Ge-qt,Li=Rn*br-oe,Pi=Dn*(Nr*en+Rn*sr*gr*Ir),Ri=Dn*(.5*ze*Mr-Rn*2*br*Ge),zi=Dn*.25*(Mr*Ge-Rn*br*Nr*ze),Xi=Dn*(Ir*gr+Rn*en*sr),da=Ri*zi-Xi*Pi;if(!da)break;var Ia=(Li*Ri-Zn*Xi)/da,ft=(Zn*zi-Li*Pi)/da;we-=Ia,Me-=ft}while((C(Ia)>v||C(ft)>v)&&--Ue>0);return[we,Me]}};function j(){return(0,g.c)(Y).scale(152.63)}function et(qt){var oe=l(qt),we=x(qt),Me=qt>=0?1:-1,Ue=m(Me*qt),ze=(1+oe-we)/2;function Ge(gr,br){var sr=x(br),Mr=x(gr/=2);return[(1+sr)*l(gr),(Me*br>-S(Mr,Ue)-.001?0:-Me*10)+ze+l(br)*we-(1+sr)*oe*Mr]}return Ge.invert=function(gr,br){var sr=0,Mr=0,Ir=50;do{var Nr=x(sr),en=l(sr),yn=x(Mr),Rn=l(Mr),Dn=1+yn,Zn=Dn*en-gr,Li=ze+Rn*we-Dn*oe*Nr-br,Pi=Dn*Nr/2,Ri=-en*Rn,zi=oe*Dn*en/2,Xi=we*yn+oe*Nr*Rn,da=Ri*zi-Xi*Pi,Ia=(Li*Ri-Zn*Xi)/da/2,ft=(Zn*zi-Li*Pi)/da;C(ft)>2&&(ft/=2),sr-=Ia,Mr-=ft}while((C(Ia)>v||C(ft)>v)&&--Ir>0);return Me*Mr>-S(x(sr),Ue)-.001?[sr*2,Mr]:null},Ge}function it(){var qt=20*T,oe=qt>=0?1:-1,we=m(oe*qt),Me=(0,g.U)(et),Ue=Me(qt),ze=Ue.stream;return Ue.parallel=function(Ge){return arguments.length?(we=m((oe=(qt=Ge*T)>=0?1:-1)*qt),Me(qt)):qt*E},Ue.stream=function(Ge){var gr=Ue.rotate(),br=ze(Ge),sr=(Ue.rotate([0,0]),ze(Ge)),Mr=Ue.precision();return Ue.rotate(gr),br.sphere=function(){sr.polygonStart(),sr.lineStart();for(var Ir=oe*-180;oe*Ir<180;Ir+=oe*90)sr.point(Ir,oe*90);if(qt)for(;oe*(Ir-=3*oe*Mr)>=-180;)sr.point(Ir,oe*-S(x(Ir*T/2),we)*E);sr.lineEnd(),sr.polygonEnd()},br},Ue.scale(218.695).center([0,28.0974])}function ut(qt,oe){var we=m(oe/2),Me=z(1-we*we),Ue=1+Me*x(qt/=2),ze=l(qt)*Me/Ue,Ge=we/Ue,gr=ze*ze,br=Ge*Ge;return[1.3333333333333333*ze*(3+gr-3*br),1.3333333333333333*Ge*(3+3*gr-br)]}ut.invert=function(qt,oe){if(qt*=.375,oe*=.375,!qt&&C(oe)>1)return null;var we=qt*qt,Me=oe*oe,Ue=1+we+Me,ze=z((Ue-z(Ue*Ue-4*oe*oe))/2),Ge=L(ze)/3,gr=ze?B(C(oe/ze))/3:k(C(qt))/3,br=x(Ge),sr=I(gr),Mr=sr*sr-br*br;return[c(qt)*2*S(N(gr)*br,.25-Mr),c(oe)*2*S(sr*l(Ge),.25+Mr)]};function J(){return(0,g.c)(ut).scale(66.1603)}var X=z(8),tt=r(1+A);function V(qt,oe){var we=C(oe);return web&&--Me>0);return[qt/(x(we)*(X-1/l(we))),c(oe)*we]};function Q(){return(0,g.c)(V).scale(112.314)}var ot=t(69020);function $(qt){var oe=2*u/qt;function we(Me,Ue){var ze=(0,ot.O)(Me,Ue);if(C(Me)>o){var Ge=S(ze[1],ze[0]),gr=z(ze[0]*ze[0]+ze[1]*ze[1]),br=oe*f((Ge-o)/oe)+o,sr=S(l(Ge-=br),2-x(Ge));Ge=br+L(u/gr*l(sr))-sr,ze[0]=gr*x(Ge),ze[1]=gr*l(Ge)}return ze}return we.invert=function(Me,Ue){var ze=z(Me*Me+Ue*Ue);if(ze>o){var Ge=S(Ue,Me),gr=oe*f((Ge-o)/oe)+o,br=Ge>gr?-1:1,sr=ze*x(gr-Ge),Mr=1/m(br*M((sr-u)/z(u*(u-2*sr)+ze*ze)));Ge=gr+2*i((Mr+br*z(Mr*Mr-3))/3),Me=ze*x(Ge),Ue=ze*l(Ge)}return ot.O.invert(Me,Ue)},we}function Z(){var qt=5,oe=(0,g.U)($),we=oe(qt),Me=we.stream,Ue=.01,ze=-x(Ue*T),Ge=l(Ue*T);return we.lobes=function(gr){return arguments.length?oe(qt=+gr):qt},we.stream=function(gr){var br=we.rotate(),sr=Me(gr),Mr=(we.rotate([0,0]),Me(gr));return we.rotate(br),sr.sphere=function(){Mr.polygonStart(),Mr.lineStart();for(var Ir=0,Nr=360/qt,en=2*u/qt,yn=90-180/qt,Rn=o;Ir0&&C(Ue)>v);return Me<0?NaN:we}function wt(qt,oe,we){return oe===void 0&&(oe=40),we===void 0&&(we=b),function(Me,Ue,ze,Ge){var gr,br,sr;ze=ze===void 0?0:+ze,Ge=Ge===void 0?0:+Ge;for(var Mr=0;Mrgr){ze-=br/=2,Ge-=sr/=2;continue}gr=yn;var Rn=(ze>0?-1:1)*we,Dn=(Ge>0?-1:1)*we,Zn=qt(ze+Rn,Ge),Li=qt(ze,Ge+Dn),Pi=(Zn[0]-Ir[0])/Rn,Ri=(Zn[1]-Ir[1])/Rn,zi=(Li[0]-Ir[0])/Dn,Xi=(Li[1]-Ir[1])/Dn,da=Xi*Pi-Ri*zi,Ia=(C(da)<.5?.5:1)/da;if(br=(en*zi-Nr*Xi)*Ia,sr=(Nr*Ri-en*Pi)*Ia,ze+=br,Ge+=sr,C(br)0&&(gr[1]*=1+br/1.5*gr[0]*gr[0]),gr}return Me.invert=wt(Me),Me}function bt(){return(0,g.c)(Rt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function At(qt,oe){var we=qt*l(oe),Me=30,Ue;do oe-=Ue=(oe+l(oe)-we)/(1+x(oe));while(C(Ue)>v&&--Me>0);return oe/2}function mt(qt,oe,we){function Me(Ue,ze){return[qt*Ue*x(ze=At(we,ze)),oe*l(ze)]}return Me.invert=function(Ue,ze){return ze=L(ze/oe),[Ue/(qt*x(ze)),L((2*ze+l(2*ze))/we)]},Me}var Lt=mt(A/o,A,u);function Ht(){return(0,g.c)(Lt).scale(169.529)}var Ut=2.00276,kt=1.11072;function Vt(qt,oe){var we=At(u,oe);return[Ut*qt/(1/x(oe)+kt/x(we)),(oe+A*l(we))/Ut]}Vt.invert=function(qt,oe){var we=Ut*oe,Me=oe<0?-d:d,Ue=25,ze,Ge;do Ge=we-A*l(Me),Me-=ze=(l(2*Me)+2*Me-u*l(Ge))/(2*x(2*Me)+2+u*x(Ge)*A*x(Me));while(C(ze)>v&&--Ue>0);return Ge=we-A*l(Me),[qt*(1/x(Ge)+kt/x(Me))/Ut,Ge]};function It(){return(0,g.c)(Vt).scale(160.857)}function re(qt){var oe=0,we=(0,g.U)(qt),Me=we(oe);return Me.parallel=function(Ue){return arguments.length?we(oe=Ue*T):oe*E},Me}function Kt(qt,oe){return[qt*x(oe),oe]}Kt.invert=function(qt,oe){return[qt/x(oe),oe]};function $t(){return(0,g.c)(Kt).scale(152.63)}function le(qt){if(!qt)return Kt;var oe=1/m(qt);function we(Me,Ue){var ze=oe+qt-Ue,Ge=ze&&Me*x(Ue)/ze;return[ze*l(Ge),oe-ze*x(Ge)]}return we.invert=function(Me,Ue){var ze=z(Me*Me+(Ue=oe-Ue)*Ue),Ge=oe+qt-ze;return[ze/x(Ge)*S(Me,Ue),Ge]},we}function he(){return re(le).scale(123.082).center([0,26.1441]).parallel(45)}function de(qt){function oe(we,Me){var Ue=o-Me,ze=Ue&&we*qt*l(Ue)/Ue;return[Ue*l(ze)/qt,o-Ue*x(ze)]}return oe.invert=function(we,Me){var Ue=we*qt,ze=o-Me,Ge=z(Ue*Ue+ze*ze),gr=S(Ue,ze);return[(Ge?Ge/l(Ge):1)*gr/qt,o-Ge]},oe}function xe(){var qt=.5,oe=(0,g.U)(de),we=oe(qt);return we.fraction=function(Me){return arguments.length?oe(qt=+Me):qt},we.scale(158.837)}var Se=mt(1,4/u,u);function ne(){return(0,g.c)(Se).scale(152.63)}var zt=t(24052),Xt=t(92992);function Jt(qt,oe,we,Me,Ue,ze){var Ge=x(ze),gr;if(C(qt)>1||C(ze)>1)gr=M(we*Ue+oe*Me*Ge);else{var br=l(qt/2),sr=l(ze/2);gr=2*L(z(br*br+oe*Me*sr*sr))}return C(gr)>v?[gr,S(Me*l(ze),oe*Ue-we*Me*Ge)]:[0,0]}function Wt(qt,oe,we){return M((qt*qt+oe*oe-we*we)/(2*qt*oe))}function Ft(qt){return qt-2*u*p((qt+u)/(2*u))}function xt(qt,oe,we){for(var Me=[[qt[0],qt[1],l(qt[1]),x(qt[1])],[oe[0],oe[1],l(oe[1]),x(oe[1])],[we[0],we[1],l(we[1]),x(we[1])]],Ue=Me[2],ze,Ge=0;Ge<3;++Ge,Ue=ze)ze=Me[Ge],Ue.v=Jt(ze[1]-Ue[1],Ue[3],Ue[2],ze[3],ze[2],ze[0]-Ue[0]),Ue.point=[0,0];var gr=Wt(Me[0].v[0],Me[2].v[0],Me[1].v[0]),br=Wt(Me[0].v[0],Me[1].v[0],Me[2].v[0]),sr=u-gr;Me[2].point[1]=0,Me[0].point[0]=-(Me[1].point[0]=Me[0].v[0]/2);var Mr=[Me[2].point[0]=Me[0].point[0]+Me[2].v[0]*x(gr),2*(Me[0].point[1]=Me[1].point[1]=Me[2].v[0]*l(gr))];function Ir(Nr,en){var yn=l(en),Rn=x(en),Dn=new Array(3),Zn;for(Zn=0;Zn<3;++Zn){var Li=Me[Zn];if(Dn[Zn]=Jt(en-Li[1],Li[3],Li[2],Rn,yn,Nr-Li[0]),!Dn[Zn][0])return Li.point;Dn[Zn][1]=Ft(Dn[Zn][1]-Li.v[1])}var Pi=Mr.slice();for(Zn=0;Zn<3;++Zn){var Ri=Zn==2?0:Zn+1,zi=Wt(Me[Zn].v[0],Dn[Zn][0],Dn[Ri][0]);Dn[Zn][1]<0&&(zi=-zi),Zn?Zn==1?(zi=br-zi,Pi[0]-=Dn[Zn][0]*x(zi),Pi[1]-=Dn[Zn][0]*l(zi)):(zi=sr-zi,Pi[0]+=Dn[Zn][0]*x(zi),Pi[1]+=Dn[Zn][0]*l(zi)):(Pi[0]+=Dn[Zn][0]*x(zi),Pi[1]-=Dn[Zn][0]*l(zi))}return Pi[0]/=3,Pi[1]/=3,Pi}return Ir}function yt(qt){return qt[0]*=T,qt[1]*=T,qt}function Et(){return Mt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Mt(qt,oe,we){var Me=(0,zt.c)({type:"MultiPoint",coordinates:[qt,oe,we]}),Ue=[-Me[0],-Me[1]],ze=(0,Xt.c)(Ue),Ge=xt(yt(ze(qt)),yt(ze(oe)),yt(ze(we)));Ge.invert=wt(Ge);var gr=(0,g.c)(Ge).rotate(Ue),br=gr.center;return delete gr.rotate,gr.center=function(sr){return arguments.length?br(ze(sr)):ze.invert(br())},gr.clipAngle(90)}function Nt(qt,oe){var we=z(1-l(oe));return[2/_*qt*we,_*(1-we)]}Nt.invert=function(qt,oe){var we=(we=oe/_-1)*we;return[we>0?qt*z(u/we)/2:0,L(1-we)]};function jt(){return(0,g.c)(Nt).scale(95.6464).center([0,30])}function ie(qt){var oe=m(qt);function we(Me,Ue){return[Me,(Me?Me/l(Me):1)*(l(Ue)*x(Me)-oe*x(Ue))]}return we.invert=oe?function(Me,Ue){Me&&(Ue*=l(Me)/Me);var ze=x(Me);return[Me,2*S(z(ze*ze+oe*oe-Ue*Ue)-ze,oe-Ue)]}:function(Me,Ue){return[Me,L(Me?Ue*m(Me)/Me:Ue)]},we}function me(){return re(ie).scale(249.828).clipAngle(90)}var be=z(3);function ve(qt,oe){return[be*qt*(2*x(2*oe/3)-1)/_,be*_*l(oe/3)]}ve.invert=function(qt,oe){var we=3*L(oe/(be*_));return[_*qt/(be*(2*x(2*we/3)-1)),we]};function Le(){return(0,g.c)(ve).scale(156.19)}function ce(qt){var oe=x(qt);function we(Me,Ue){return[Me*oe,l(Ue)/oe]}return we.invert=function(Me,Ue){return[Me/oe,L(Ue*oe)]},we}function Te(){return re(ce).parallel(38.58).scale(195.044)}function Be(qt){var oe=x(qt);function we(Me,Ue){return[Me*oe,(1+oe)*m(Ue/2)]}return we.invert=function(Me,Ue){return[Me/oe,i(Ue/(1+oe))*2]},we}function ir(){return re(Be).scale(124.75)}function pe(qt,oe){var we=z(8/(3*u));return[we*qt*(1-C(oe)/u),we*oe]}pe.invert=function(qt,oe){var we=z(8/(3*u)),Me=oe/we;return[qt/(we*(1-C(Me)/u)),Me]};function Xe(){return(0,g.c)(pe).scale(165.664)}function Ke(qt,oe){var we=z(4-3*l(C(oe)));return[2/z(6*u)*qt*we,c(oe)*z(2*u/3)*(2-we)]}Ke.invert=function(qt,oe){var we=2-C(oe)/z(2*u/3);return[qt*z(6*u)/(2*we),c(oe)*L((4-we*we)/3)]};function or(){return(0,g.c)(Ke).scale(165.664)}function $e(qt,oe){var we=z(u*(4+u));return[2/we*qt*(1+z(1-4*oe*oe/(u*u))),4/we*oe]}$e.invert=function(qt,oe){var we=z(u*(4+u))/2;return[qt*we/(1+z(1-oe*oe*(4+u)/(4*u))),oe*we/2]};function ge(){return(0,g.c)($e).scale(180.739)}function se(qt,oe){var we=(2+o)*l(oe);oe/=2;for(var Me=0,Ue=1/0;Me<10&&C(Ue)>v;Me++){var ze=x(oe);oe-=Ue=(oe+l(oe)*(ze+2)-we)/(2*ze*(1+ze))}return[2/z(u*(4+u))*qt*(1+x(oe)),2*z(u/(4+u))*l(oe)]}se.invert=function(qt,oe){var we=oe*z((4+u)/u)/2,Me=L(we),Ue=x(Me);return[qt/(2/z(u*(4+u))*(1+Ue)),L((Me+we*(Ue+2))/(2+o))]};function Ae(){return(0,g.c)(se).scale(180.739)}function Ce(qt,oe){return[qt*(1+x(oe))/z(2+u),2*oe/z(2+u)]}Ce.invert=function(qt,oe){var we=z(2+u),Me=oe*we/2;return[we*qt/(1+x(Me)),Me]};function Ie(){return(0,g.c)(Ce).scale(173.044)}function Pe(qt,oe){for(var we=(1+o)*l(oe),Me=0,Ue=1/0;Me<10&&C(Ue)>v;Me++)oe-=Ue=(oe+l(oe)-we)/(1+x(oe));return we=z(2+u),[qt*(1+x(oe))/we,2*oe/we]}Pe.invert=function(qt,oe){var we=1+o,Me=z(we/2);return[qt*2*Me/(1+x(oe*=Me)),L((oe+l(oe))/we)]};function ke(){return(0,g.c)(Pe).scale(173.044)}var Ve=3+2*A;function Je(qt,oe){var we=l(qt/=2),Me=x(qt),Ue=z(x(oe)),ze=x(oe/=2),Ge=l(oe)/(ze+A*Me*Ue),gr=z(2/(1+Ge*Ge)),br=z((A*ze+(Me+we)*Ue)/(A*ze+(Me-we)*Ue));return[Ve*(gr*(br-1/br)-2*r(br)),Ve*(gr*Ge*(br+1/br)-2*i(Ge))]}Je.invert=function(qt,oe){if(!(ze=ut.invert(qt/1.2,oe*1.065)))return null;var we=ze[0],Me=ze[1],Ue=20,ze;qt/=Ve,oe/=Ve;do{var Ge=we/2,gr=Me/2,br=l(Ge),sr=x(Ge),Mr=l(gr),Ir=x(gr),Nr=x(Me),en=z(Nr),yn=Mr/(Ir+A*sr*en),Rn=yn*yn,Dn=z(2/(1+Rn)),Zn=A*Ir+(sr+br)*en,Li=A*Ir+(sr-br)*en,Pi=Zn/Li,Ri=z(Pi),zi=Ri-1/Ri,Xi=Ri+1/Ri,da=Dn*zi-2*r(Ri)-qt,Ia=Dn*yn*Xi-2*i(yn)-oe,ft=Mr&&w*en*br*Rn/Mr,Ct=(A*sr*Ir+en)/(2*(Ir+A*sr*en)*(Ir+A*sr*en)*en),Bt=-.5*yn*Dn*Dn*Dn,ee=Bt*ft,ae=Bt*Ct,fe=(fe=2*Ir+A*en*(sr-br))*fe*Ri,De=(A*sr*Ir*en+Nr)/fe,Ee=-(A*br*Mr)/(en*fe),Ye=zi*ee-2*De/Ri+Dn*(De+De/Pi),Ze=zi*ae-2*Ee/Ri+Dn*(Ee+Ee/Pi),nr=yn*Xi*ee-2*ft/(1+Rn)+Dn*Xi*ft+Dn*yn*(De-De/Pi),_r=yn*Xi*ae-2*Ct/(1+Rn)+Dn*Xi*Ct+Dn*yn*(Ee-Ee/Pi),Lr=Ze*nr-_r*Ye;if(!Lr)break;var Jr=(Ia*Ze-da*_r)/Lr,on=(da*nr-Ia*Ye)/Lr;we-=Jr,Me=e(-o,a(o,Me-on))}while((C(Jr)>v||C(on)>v)&&--Ue>0);return C(C(Me)-o)Me){var Ir=z(Mr),Nr=S(sr,br),en=we*f(Nr/we),yn=Nr-en,Rn=qt*x(yn),Dn=(qt*l(yn)-yn*l(Rn))/(o-Rn),Zn=xr(yn,Dn),Li=(u-qt)/pr(Zn,Rn,u);br=Ir;var Pi=50,Ri;do br-=Ri=(qt+pr(Zn,Rn,br)*Li-Ir)/(Zn(br)*Li);while(C(Ri)>v&&--Pi>0);sr=yn*l(br),brMe){var br=z(gr),sr=S(Ge,ze),Mr=we*f(sr/we),Ir=sr-Mr;ze=br*x(Ir),Ge=br*l(Ir);for(var Nr=ze-o,en=l(ze),yn=Ge/en,Rn=zev||C(yn)>v)&&--Rn>0);return[Ir,Nr]},br}var Dr=Pr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function cn(){return(0,g.c)(Dr).scale(149.995)}var rn=Pr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Cn(){return(0,g.c)(rn).scale(153.93)}var En=Pr(5/6*u,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Tr(){return(0,g.c)(En).scale(130.945)}function Cr(qt,oe){var we=qt*qt,Me=oe*oe;return[qt*(1-.162388*Me)*(.87-952426e-9*we*we),oe*(1+Me/12)]}Cr.invert=function(qt,oe){var we=qt,Me=oe,Ue=50,ze;do{var Ge=Me*Me;Me-=ze=(Me*(1+Ge/12)-oe)/(1+Ge/4)}while(C(ze)>v&&--Ue>0);Ue=50,qt/=1-.162388*Ge;do{var gr=(gr=we*we)*gr;we-=ze=(we*(.87-952426e-9*gr)-qt)/(.87-.00476213*gr)}while(C(ze)>v&&--Ue>0);return[we,Me]};function Wr(){return(0,g.c)(Cr).scale(131.747)}var Ur=Pr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function an(){return(0,g.c)(Ur).scale(131.087)}function pn(qt){var oe=qt(o,0)[0]-qt(-o,0)[0];function we(Me,Ue){var ze=Me>0?-.5:.5,Ge=qt(Me+ze*u,Ue);return Ge[0]-=ze*oe,Ge}return qt.invert&&(we.invert=function(Me,Ue){var ze=Me>0?-.5:.5,Ge=qt.invert(Me+ze*oe,Ue),gr=Ge[0]-ze*u;return gr<-u?gr+=2*u:gr>u&&(gr-=2*u),Ge[0]=gr,Ge}),we}function gn(qt,oe){var we=c(qt),Me=c(oe),Ue=x(oe),ze=x(qt)*Ue,Ge=l(qt)*Ue,gr=l(Me*oe);qt=C(S(Ge,gr)),oe=L(ze),C(qt-o)>v&&(qt%=o);var br=_n(qt>u/4?o-qt:qt,oe);return qt>u/4&&(gr=br[0],br[0]=-br[1],br[1]=-gr),br[0]*=we,br[1]*=-Me,br}gn.invert=function(qt,oe){C(qt)>1&&(qt=c(qt)*2-qt),C(oe)>1&&(oe=c(oe)*2-oe);var we=c(qt),Me=c(oe),Ue=-we*qt,ze=-Me*oe,Ge=ze/Ue<1,gr=kn(Ge?ze:Ue,Ge?Ue:ze),br=gr[0],sr=gr[1],Mr=x(sr);return Ge&&(br=-o-br),[we*(S(l(br)*Mr,-l(sr))+u),Me*L(x(br)*Mr)]};function _n(qt,oe){if(oe===o)return[0,0];var we=l(oe),Me=we*we,Ue=Me*Me,ze=1+Ue,Ge=1+3*Ue,gr=1-Ue,br=L(1/z(ze)),sr=gr+Me*ze*br,Mr=(1-we)/sr,Ir=z(Mr),Nr=Mr*ze,en=z(Nr),yn=Ir*gr,Rn,Dn;if(qt===0)return[0,-(yn+Me*en)];var Zn=x(oe),Li=1/Zn,Pi=2*we*Zn,Ri=(-3*Me+br*Ge)*Pi,zi=(-sr*Zn-(1-we)*Ri)/(sr*sr),Xi=.5*zi/Ir,da=gr*Xi-2*Me*Ir*Pi,Ia=Me*ze*zi+Mr*Ge*Pi,ft=-Li*Pi,Ct=-Li*Ia,Bt=-2*Li*da,ee=4*qt/u,ae;if(qt>.222*u||oe.175*u){if(Rn=(yn+Me*z(Nr*(1+Ue)-yn*yn))/(1+Ue),qt>u/4)return[Rn,Rn];var fe=Rn,De=.5*Rn;Rn=.5*(De+fe),Dn=50;do{var Ee=z(Nr-Rn*Rn),Ye=Rn*(Bt+ft*Ee)+Ct*L(Rn/en)-ee;if(!Ye)break;Ye<0?De=Rn:fe=Rn,Rn=.5*(De+fe)}while(C(fe-De)>v&&--Dn>0)}else{Rn=v,Dn=25;do{var Ze=Rn*Rn,nr=z(Nr-Ze),_r=Bt+ft*nr,Lr=Rn*_r+Ct*L(Rn/en)-ee,Jr=_r+(Ct-ft*Ze)/nr;Rn-=ae=nr?Lr/Jr:0}while(C(ae)>v&&--Dn>0)}return[Rn,-yn-Me*z(Nr-Rn*Rn)]}function kn(qt,oe){for(var we=0,Me=1,Ue=.5,ze=50;;){var Ge=Ue*Ue,gr=z(Ue),br=L(1/z(1+Ge)),sr=1-Ge+Ue*(1+Ge)*br,Mr=(1-gr)/sr,Ir=z(Mr),Nr=Mr*(1+Ge),en=Ir*(1-Ge),yn=Nr-qt*qt,Rn=z(yn),Dn=oe+en+Ue*Rn;if(C(Me-we)0?we=Ue:Me=Ue,Ue=.5*(we+Me)}if(!ze)return null;var Zn=L(gr),Li=x(Zn),Pi=1/Li,Ri=2*gr*Li,zi=(-3*Ue+br*(1+3*Ge))*Ri,Xi=(-sr*Li-(1-gr)*zi)/(sr*sr),da=.5*Xi/Ir,Ia=(1-Ge)*da-2*Ue*Ir*Ri,ft=-2*Pi*Ia,Ct=-Pi*Ri,Bt=-Pi*(Ue*(1+Ge)*Xi+Mr*(1+3*Ge)*Ri);return[u/4*(qt*(ft+Ct*Rn)+Bt*L(qt/z(Nr))),Zn]}function ni(){return(0,g.c)(pn(gn)).scale(239.75)}function ci(qt,oe,we){var Me,Ue,ze;return qt?(Me=di(qt,we),oe?(Ue=di(oe,1-we),ze=Ue[1]*Ue[1]+we*Me[0]*Me[0]*Ue[0]*Ue[0],[[Me[0]*Ue[2]/ze,Me[1]*Me[2]*Ue[0]*Ue[1]/ze],[Me[1]*Ue[1]/ze,-Me[0]*Me[2]*Ue[0]*Ue[2]/ze],[Me[2]*Ue[1]*Ue[2]/ze,-we*Me[0]*Me[1]*Ue[0]/ze]]):[[Me[0],0],[Me[1],0],[Me[2],0]]):(Ue=di(oe,1-we),[[0,Ue[0]/Ue[1]],[1/Ue[1],0],[Ue[2]/Ue[1],0]])}function di(qt,oe){var we,Me,Ue,ze,Ge;if(oe=1-v)return we=(1-oe)/4,Me=I(qt),ze=D(qt),Ue=1/Me,Ge=Me*N(qt),[ze+we*(Ge-qt)/(Me*Me),Ue-we*ze*Ue*(Ge-qt),Ue+we*ze*Ue*(Ge+qt),2*i(h(qt))-o+we*(Ge-qt)/Me];var gr=[1,0,0,0,0,0,0,0,0],br=[z(oe),0,0,0,0,0,0,0,0],sr=0;for(Me=z(1-oe),Ge=1;C(br[sr]/gr[sr])>v&&sr<8;)we=gr[sr++],br[sr]=(we-Me)/2,gr[sr]=(we+Me)/2,Me=z(we*Me),Ge*=2;Ue=Ge*gr[sr]*qt;do ze=br[sr]*l(Me=Ue)/gr[sr],Ue=(L(ze)+Ue)/2;while(--sr);return[l(Ue),ze=x(Ue),ze/x(Ue-Me),Ue]}function li(qt,oe,we){var Me=C(qt),Ue=C(oe),ze=N(Ue);if(Me){var Ge=1/l(Me),gr=1/(m(Me)*m(Me)),br=-(gr+we*(ze*ze*Ge*Ge)-1+we),sr=(we-1)*gr,Mr=(-br+z(br*br-4*sr))/2;return[ri(i(1/z(Mr)),we)*c(qt),ri(i(z((Mr/gr-1)/we)),1-we)*c(oe)]}return[0,ri(i(ze),1-we)*c(oe)]}function ri(qt,oe){if(!oe)return qt;if(oe===1)return r(m(qt/2+d));for(var we=1,Me=z(1-oe),Ue=z(oe),ze=0;C(Ue)>v;ze++){if(qt%u){var Ge=i(Me*m(qt)/we);Ge<0&&(Ge+=u),qt+=Ge+~~(qt/u)*u}else qt+=qt;Ue=(we+Me)/2,Me=z(we*Me),Ue=((we=Ue)-Me)/2}return qt/(n(2,ze)*we)}function wr(qt,oe){var we=(A-1)/(A+1),Me=z(1-we*we),Ue=ri(o,Me*Me),ze=-1,Ge=r(m(u/4+C(oe)/2)),gr=h(ze*Ge)/z(we),br=nn(gr*x(ze*qt),gr*l(ze*qt)),sr=li(br[0],br[1],Me*Me);return[-sr[1],(oe>=0?1:-1)*(.5*Ue-sr[0])]}function nn(qt,oe){var we=qt*qt,Me=oe+1,Ue=1-we-oe*oe;return[.5*((qt>=0?o:-o)-S(Ue,2*qt)),-.25*r(Ue*Ue+4*we)+.5*r(Me*Me+we)]}function $r(qt,oe){var we=oe[0]*oe[0]+oe[1]*oe[1];return[(qt[0]*oe[0]+qt[1]*oe[1])/we,(qt[1]*oe[0]-qt[0]*oe[1])/we]}wr.invert=function(qt,oe){var we=(A-1)/(A+1),Me=z(1-we*we),Ue=ri(o,Me*Me),ze=-1,Ge=ci(.5*Ue-oe,-qt,Me*Me),gr=$r(Ge[0],Ge[1]),br=S(gr[1],gr[0])/ze;return[br,2*i(h(.5/ze*r(we*gr[0]*gr[0]+we*gr[1]*gr[1])))-o]};function dn(){return(0,g.c)(pn(wr)).scale(151.496)}var Vn=t(61780);function Tn(qt){var oe=l(qt),we=x(qt),Me=An(qt);Me.invert=An(-qt);function Ue(ze,Ge){var gr=Me(ze,Ge);ze=gr[0],Ge=gr[1];var br=l(Ge),sr=x(Ge),Mr=x(ze),Ir=M(oe*br+we*sr*Mr),Nr=l(Ir),en=C(Nr)>v?Ir/Nr:1;return[en*we*l(ze),(C(ze)>o?en:-en)*(oe*sr-we*br*Mr)]}return Ue.invert=function(ze,Ge){var gr=z(ze*ze+Ge*Ge),br=-l(gr),sr=x(gr),Mr=gr*sr,Ir=-Ge*br,Nr=gr*oe,en=z(Mr*Mr+Ir*Ir-Nr*Nr),yn=S(Mr*Nr+Ir*en,Ir*Nr-Mr*en),Rn=(gr>o?-1:1)*S(ze*br,gr*x(yn)*sr+Ge*l(yn)*br);return Me.invert(Rn,yn)},Ue}function An(qt){var oe=l(qt),we=x(qt);return function(Me,Ue){var ze=x(Ue),Ge=x(Me)*ze,gr=l(Me)*ze,br=l(Ue);return[S(gr,Ge*we-br*oe),L(br*we+Ge*oe)]}}function Bn(){var qt=0,oe=(0,g.U)(Tn),we=oe(qt),Me=we.rotate,Ue=we.stream,ze=(0,Vn.c)();return we.parallel=function(Ge){if(!arguments.length)return qt*E;var gr=we.rotate();return oe(qt=Ge*T).rotate(gr)},we.rotate=function(Ge){return arguments.length?(Me.call(we,[Ge[0],Ge[1]-qt*E]),ze.center([-Ge[0],-Ge[1]]),we):(Ge=Me.call(we),Ge[1]+=qt*E,Ge)},we.stream=function(Ge){return Ge=Ue(Ge),Ge.sphere=function(){Ge.polygonStart();var gr=.01,br=ze.radius(90-gr)().coordinates[0],sr=br.length-1,Mr=-1,Ir;for(Ge.lineStart();++Mr=0;)Ge.point((Ir=br[Mr])[0],Ir[1]);Ge.lineEnd(),Ge.polygonEnd()},Ge},we.scale(79.4187).parallel(45).clipAngle(179.999)}var Jn=t(84706),gi=t(16016),Di=3,Sr=L(1-1/Di)*E,kr=ce(0);function Ar(qt){var oe=Sr*T,we=Nt(u,oe)[0]-Nt(-u,oe)[0],Me=kr(0,oe)[1],Ue=Nt(0,oe)[1],ze=_-Ue,Ge=y/qt,gr=4/y,br=Me+ze*ze*4/y;function sr(Mr,Ir){var Nr,en=C(Ir);if(en>oe){var yn=a(qt-1,e(0,p((Mr+u)/Ge)));Mr+=u*(qt-1)/qt-yn*Ge,Nr=Nt(Mr,en),Nr[0]=Nr[0]*y/we-y*(qt-1)/(2*qt)+yn*y/qt,Nr[1]=Me+(Nr[1]-Ue)*4*ze/y,Ir<0&&(Nr[1]=-Nr[1])}else Nr=kr(Mr,Ir);return Nr[0]*=gr,Nr[1]/=br,Nr}return sr.invert=function(Mr,Ir){Mr/=gr,Ir*=br;var Nr=C(Ir);if(Nr>Me){var en=a(qt-1,e(0,p((Mr+u)/Ge)));Mr=(Mr+u*(qt-1)/qt-en*Ge)*we/y;var yn=Nt.invert(Mr,.25*(Nr-Me)*y/ze+Ue);return yn[0]-=u*(qt-1)/qt-en*Ge,Ir<0&&(yn[1]=-yn[1]),yn}return kr.invert(Mr,Ir)},sr}function Or(qt,oe){return[qt,oe&1?90-v:Sr]}function xn(qt,oe){return[qt,oe&1?-90+v:-Sr]}function In(qt){return[qt[0]*(1-v),qt[1]]}function hn(qt){var oe=[].concat((0,Jn.ik)(-180,180+qt/2,qt).map(Or),(0,Jn.ik)(180,-180-qt/2,-qt).map(xn));return{type:"Polygon",coordinates:[qt===180?oe.map(In):oe]}}function sn(){var qt=4,oe=(0,g.U)(Ar),we=oe(qt),Me=we.stream;return we.lobes=function(Ue){return arguments.length?oe(qt=+Ue):qt},we.stream=function(Ue){var ze=we.rotate(),Ge=Me(Ue),gr=(we.rotate([0,0]),Me(Ue));return we.rotate(ze),Ge.sphere=function(){(0,gi.c)(hn(180/qt),gr)},Ge},we.scale(239.75)}function Er(qt){var oe=1+qt,we=l(1/oe),Me=L(we),Ue=2*z(u/(ze=u+4*Me*oe)),ze,Ge=.5*Ue*(oe+z(qt*(2+qt))),gr=qt*qt,br=oe*oe;function sr(Mr,Ir){var Nr=1-l(Ir),en,yn;if(Nr&&Nr<2){var Rn=o-Ir,Dn=25,Zn;do{var Li=l(Rn),Pi=x(Rn),Ri=Me+S(Li,oe-Pi),zi=1+br-2*oe*Pi;Rn-=Zn=(Rn-gr*Me-oe*Li+zi*Ri-.5*Nr*ze)/(2*oe*Li*Ri)}while(C(Zn)>b&&--Dn>0);en=Ue*z(zi),yn=Mr*Ri/u}else en=Ue*(qt+Nr),yn=Mr*Me/u;return[en*l(yn),Ge-en*x(yn)]}return sr.invert=function(Mr,Ir){var Nr=Mr*Mr+(Ir-=Ge)*Ir,en=(1+br-Nr/(Ue*Ue))/(2*oe),yn=M(en),Rn=l(yn),Dn=Me+S(Rn,oe-en);return[L(Mr/z(Nr))*u/Dn,L(1-2*(yn-gr*Me-oe*Rn+(1+br-2*oe*en)*Dn)/ze)]},sr}function Zr(){var qt=1,oe=(0,g.U)(Er),we=oe(qt);return we.ratio=function(Me){return arguments.length?oe(qt=+Me):qt},we.scale(167.774).center([0,18.67])}var Hr=.7109889596207567,Qr=.0528035274542;function wn(qt,oe){return oe>-Hr?(qt=Lt(qt,oe),qt[1]+=Qr,qt):Kt(qt,oe)}wn.invert=function(qt,oe){return oe>-Hr?Lt.invert(qt,oe-Qr):Kt.invert(qt,oe)};function Ln(){return(0,g.c)(wn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Pn(qt,oe){return C(oe)>Hr?(qt=Lt(qt,oe),qt[1]-=oe>0?Qr:-Qr,qt):Kt(qt,oe)}Pn.invert=function(qt,oe){return C(oe)>Hr?Lt.invert(qt,oe+(oe>0?Qr:-Qr)):Kt.invert(qt,oe)};function Un(){return(0,g.c)(Pn).scale(152.63)}function On(qt,oe,we,Me){var Ue=z(4*u/(2*we+(1+qt-oe/2)*l(2*we)+(qt+oe)/2*l(4*we)+oe/2*l(6*we))),ze=z(Me*l(we)*z((1+qt*x(2*we)+oe*x(4*we))/(1+qt+oe))),Ge=we*br(1);function gr(Ir){return z(1+qt*x(2*Ir)+oe*x(4*Ir))}function br(Ir){var Nr=Ir*we;return(2*Nr+(1+qt-oe/2)*l(2*Nr)+(qt+oe)/2*l(4*Nr)+oe/2*l(6*Nr))/we}function sr(Ir){return gr(Ir)*l(Ir)}var Mr=function(Ir,Nr){var en=we*Tt(br,Ge*l(Nr)/we,Nr/u);isNaN(en)&&(en=we*c(Nr));var yn=Ue*gr(en);return[yn*ze*Ir/u*x(en),yn/ze*l(en)]};return Mr.invert=function(Ir,Nr){var en=Tt(sr,Nr*ze/Ue);return[Ir*u/(x(en)*Ue*ze*gr(en)),L(we*br(en/we)/Ge)]},we===0&&(Ue=z(Me/u),Mr=function(Ir,Nr){return[Ir*Ue,l(Nr)/Ue]},Mr.invert=function(Ir,Nr){return[Ir/Ue,L(Nr*Ue)]}),Mr}function mi(){var qt=1,oe=0,we=45*T,Me=2,Ue=(0,g.U)(On),ze=Ue(qt,oe,we,Me);return ze.a=function(Ge){return arguments.length?Ue(qt=+Ge,oe,we,Me):qt},ze.b=function(Ge){return arguments.length?Ue(qt,oe=+Ge,we,Me):oe},ze.psiMax=function(Ge){return arguments.length?Ue(qt,oe,we=+Ge*T,Me):we*E},ze.ratio=function(Ge){return arguments.length?Ue(qt,oe,we,Me=+Ge):Me},ze.scale(180.739)}function ai(qt,oe,we,Me,Ue,ze,Ge,gr,br,sr,Mr){if(Mr.nanEncountered)return NaN;var Ir,Nr,en,yn,Rn,Dn,Zn,Li,Pi,Ri;if(Ir=we-oe,Nr=qt(oe+Ir*.25),en=qt(we-Ir*.25),isNaN(Nr)){Mr.nanEncountered=!0;return}if(isNaN(en)){Mr.nanEncountered=!0;return}return yn=Ir*(Me+4*Nr+Ue)/12,Rn=Ir*(Ue+4*en+ze)/12,Dn=yn+Rn,Ri=(Dn-Ge)/15,sr>br?(Mr.maxDepthCount++,Dn+Ri):Math.abs(Ri)>1;do br[Dn]>en?Rn=Dn:yn=Dn,Dn=yn+Rn>>1;while(Dn>yn);var Zn=br[Dn+1]-br[Dn];return Zn&&(Zn=(en-br[Dn+1])/Zn),(Dn+1+Zn)/Ge}var Ir=2*Mr(1)/u*ze/we,Nr=function(en,yn){var Rn=Mr(C(l(yn))),Dn=Me(Rn)*en;return Rn/=Ir,[Dn,yn>=0?Rn:-Rn]};return Nr.invert=function(en,yn){var Rn;return yn*=Ir,C(yn)<1&&(Rn=c(yn)*L(Ue(C(yn))*ze)),[en/Me(C(yn)),Rn]},Nr}function pa(){var qt=0,oe=2.5,we=1.183136,Me=(0,g.U)(Ci),Ue=Me(qt,oe,we);return Ue.alpha=function(ze){return arguments.length?Me(qt=+ze,oe,we):qt},Ue.k=function(ze){return arguments.length?Me(qt,oe=+ze,we):oe},Ue.gamma=function(ze){return arguments.length?Me(qt,oe,we=+ze):we},Ue.scale(152.63)}function ea(qt,oe){return C(qt[0]-oe[0])=0;--br)we=qt[1][br],Me=we[0][0],Ue=we[0][1],ze=we[1][1],Ge=we[2][0],gr=we[2][1],oe.push(Eo([[Ge-v,gr-v],[Ge-v,ze+v],[Me+v,ze+v],[Me+v,Ue-v]],30));return{type:"Polygon",coordinates:[(0,Jn.Uf)(oe)]}}function Qa(qt,oe,we){var Me,Ue;function ze(br,sr){for(var Mr=sr<0?-1:1,Ir=oe[+(sr<0)],Nr=0,en=Ir.length-1;NrIr[Nr][2][0];++Nr);var yn=qt(br-Ir[Nr][1][0],sr);return yn[0]+=qt(Ir[Nr][1][0],Mr*sr>Mr*Ir[Nr][0][1]?Ir[Nr][0][1]:sr)[0],yn}we?ze.invert=we(ze):qt.invert&&(ze.invert=function(br,sr){for(var Mr=Ue[+(sr<0)],Ir=oe[+(sr<0)],Nr=0,en=Mr.length;Nryn&&(Rn=en,en=yn,yn=Rn),[[Ir,en],[Nr,yn]]})}),Ge):oe.map(function(sr){return sr.map(function(Mr){return[[Mr[0][0]*E,Mr[0][1]*E],[Mr[1][0]*E,Mr[1][1]*E],[Mr[2][0]*E,Mr[2][1]*E]]})})},oe!=null&&Ge.lobes(oe),Ge}var sl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Bu(){return Qa(Vt,sl).scale(160.857)}var wf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function $i(){return Qa(Pn,wf).scale(152.63)}var Fl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Uu(){return Qa(Lt,Fl).scale(169.529)}var Xa=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function ho(){return Qa(Lt,Xa).scale(169.529).rotate([20,0])}var ll=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function vu(){return Qa(wn,ll,wt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Ra=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function ul(){return Qa(Kt,Ra).scale(152.63).rotate([-20,0])}function za(qt,oe){return[3/y*qt*z(u*u/3-oe*oe),oe]}za.invert=function(qt,oe){return[y/3*qt/z(u*u/3-oe*oe),oe]};function Ua(){return(0,g.c)(za).scale(158.837)}function fl(qt){function oe(we,Me){if(C(C(Me)-o)2)return null;we/=2,Me/=2;var ze=we*we,Ge=Me*Me,gr=2*Me/(1+ze+Ge);return gr=n((1+gr)/(1-gr),1/qt),[S(2*we,1-ze-Ge)/qt,L((gr-1)/(gr+1))]},oe}function $a(){var qt=.5,oe=(0,g.U)(fl),we=oe(qt);return we.spacing=function(Me){return arguments.length?oe(qt=+Me):qt},we.scale(124.75)}var qa=u/A;function _o(qt,oe){return[qt*(1+z(x(oe)))/2,oe/(x(oe/2)*x(qt/6))]}_o.invert=function(qt,oe){var we=C(qt),Me=C(oe),Ue=v,ze=o;Mev||C(Dn)>v)&&--Ue>0);return Ue&&[we,Me]};function yc(){return(0,g.c)(bo).scale(139.98)}function ts(qt,oe){return[l(qt)/x(oe),m(oe)*x(qt)]}ts.invert=function(qt,oe){var we=qt*qt,Me=oe*oe,Ue=Me+1,ze=we+Ue,Ge=qt?w*z((ze-z(ze*ze-4*we))/we):1/z(Ue);return[L(qt*Ge),c(oe)*M(Ge)]};function Za(){return(0,g.c)(ts).scale(144.049).clipAngle(89.999)}function Hu(qt){var oe=x(qt),we=m(d+qt/2);function Me(Ue,ze){var Ge=ze-qt,gr=C(Ge)=0;)Mr=qt[sr],Ir=Mr[0]+gr*(en=Ir)-br*Nr,Nr=Mr[1]+gr*Nr+br*en;return Ir=gr*(en=Ir)-br*Nr,Nr=gr*Nr+br*en,[Ir,Nr]}return we.invert=function(Me,Ue){var ze=20,Ge=Me,gr=Ue;do{for(var br=oe,sr=qt[br],Mr=sr[0],Ir=sr[1],Nr=0,en=0,yn;--br>=0;)sr=qt[br],Nr=Mr+Ge*(yn=Nr)-gr*en,en=Ir+Ge*en+gr*yn,Mr=sr[0]+Ge*(yn=Mr)-gr*Ir,Ir=sr[1]+Ge*Ir+gr*yn;Nr=Mr+Ge*(yn=Nr)-gr*en,en=Ir+Ge*en+gr*yn,Mr=Ge*(yn=Mr)-gr*Ir-Me,Ir=Ge*Ir+gr*yn-Ue;var Rn=Nr*Nr+en*en,Dn,Zn;Ge-=Dn=(Mr*Nr+Ir*en)/Rn,gr-=Zn=(Ir*Nr-Mr*en)/Rn}while(C(Dn)+C(Zn)>v*v&&--ze>0);if(ze){var Li=z(Ge*Ge+gr*gr),Pi=2*i(Li*.5),Ri=l(Pi);return[S(Ge*Ri,Li*x(Pi)),Li?L(gr*Ri/Li):0]}},we}var xc=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],du=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],bc=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],wc=[[.9245,0],[0,0],[.01943,0]],Tc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Gu(){return Xs(xc,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Ac(){return Xs(du,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mc(){return Xs(bc,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Mf(){return Xs(wc,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Sf(){return Xs(Tc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Xs(qt,oe){var we=(0,g.c)(Af(qt)).rotate(oe).clipAngle(90),Me=(0,Xt.c)(oe),Ue=we.center;return delete we.rotate,we.center=function(ze){return arguments.length?Ue(Me(ze)):Me.invert(Ue())},we}var cl=z(6),zl=z(7);function kl(qt,oe){var we=L(7*l(oe)/(3*cl));return[cl*qt*(2*x(2*we/3)-1)/zl,9*l(we/3)/zl]}kl.invert=function(qt,oe){var we=3*L(oe*zl/9);return[qt*zl/(cl*(2*x(2*we/3)-1)),L(l(we)*3*cl/7)]};function Ef(){return(0,g.c)(kl).scale(164.859)}function vs(qt,oe){for(var we=(1+w)*l(oe),Me=oe,Ue=0,ze;Ue<25&&(Me-=ze=(l(Me/2)+l(Me)-we)/(.5*x(Me/2)+x(Me)),!(C(ze)b&&--Me>0);return ze=we*we,Ge=ze*ze,gr=ze*Ge,[qt/(.84719-.13063*ze+gr*gr*(-.04515+.05494*ze-.02326*Ge+.00331*gr)),we]};function Uo(){return(0,g.c)(gu).scale(175.295)}function hl(qt,oe){return[qt*(1+x(oe))/2,2*(oe-m(oe/2))]}hl.invert=function(qt,oe){for(var we=oe/2,Me=0,Ue=1/0;Me<10&&C(Ue)>v;++Me){var ze=x(oe/2);oe-=Ue=(oe-m(oe/2)-we)/(1-.5/(ze*ze))}return[2*qt/(1+x(oe)),oe]};function Zs(){return(0,g.c)(hl).scale(152.63)}var Ol=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ls(){return Qa(nt(1/0),Ol).rotate([20,0]).scale(152.63)}function rs(qt,oe){var we=l(oe),Me=x(oe),Ue=c(qt);if(qt===0||C(oe)===o)return[0,oe];if(oe===0)return[qt,0];if(C(qt)===o)return[qt*Me,o*we];var ze=u/(2*qt)-2*qt/u,Ge=2*oe/u,gr=(1-Ge*Ge)/(we-Ge),br=ze*ze,sr=gr*gr,Mr=1+br/sr,Ir=1+sr/br,Nr=(ze*we/gr-ze/2)/Mr,en=(sr*we/br+gr/2)/Ir,yn=Nr*Nr+Me*Me/Mr,Rn=en*en-(sr*we*we/br+gr*we-1)/Ir;return[o*(Nr+z(yn)*Ue),o*(en+z(Rn<0?0:Rn)*c(-oe*ze)*Ue)]}rs.invert=function(qt,oe){qt/=o,oe/=o;var we=qt*qt,Me=oe*oe,Ue=we+Me,ze=u*u;return[qt?(Ue-1+z((1-Ue)*(1-Ue)+4*we))/(2*qt)*o:0,Tt(function(Ge){return Ue*(u*l(Ge)-2*Ge)*u+4*Ge*Ge*(oe-l(Ge))+2*u*Ge-ze*oe},0)]};function Wu(){return(0,g.c)(rs).scale(127.267)}var vl=1.0148,Ho=.23185,Ca=-.14499,Yu=.02406,Ec=vl,mu=5*Ho,dl=7*Ca,pl=9*Yu,wo=1.790857183;function yu(qt,oe){var we=oe*oe;return[qt,oe*(vl+we*we*(Ho+we*(Ca+Yu*we)))]}yu.invert=function(qt,oe){oe>wo?oe=wo:oe<-wo&&(oe=-wo);var we=oe,Me;do{var Ue=we*we;we-=Me=(we*(vl+Ue*Ue*(Ho+Ue*(Ca+Yu*Ue)))-oe)/(Ec+Ue*Ue*(mu+Ue*(dl+pl*Ue)))}while(C(Me)>v);return[qt,we]};function ml(){return(0,g.c)(yu).scale(139.319)}function xu(qt,oe){if(C(oe)v&&--Ue>0);return Ge=m(Me),[(C(oe)=0;)if(Me=oe[gr],we[0]===Me[0]&&we[1]===Me[1]){if(ze)return[ze,we];ze=we}}}function Ku(qt){for(var oe=qt.length,we=[],Me=qt[oe-1],Ue=0;Ue0?[-Me[0],0]:[180-Me[0],180])};var oe=Da.map(function(we){return{face:we,project:qt(we)}});return[-1,0,0,1,0,1,4,5].forEach(function(we,Me){var Ue=oe[we];Ue&&(Ue.children||(Ue.children=[])).push(oe[Me])}),ga(oe[0],function(we,Me){return oe[we<-u/2?Me<0?6:4:we<0?Me<0?2:0:weMe^en>Me&&we<(Nr-sr)*(Me-Mr)/(en-Mr)+sr&&(Ue=!Ue)}return Ue}function Pc(qt,oe){var we=oe.stream,Me;if(!we)throw new Error("invalid projection");switch(qt&&qt.type){case"Feature":Me=Ju;break;case"FeatureCollection":Me=Rc;break;default:Me=xl;break}return Me(qt,we)}function Rc(qt,oe){return{type:"FeatureCollection",features:qt.features.map(function(we){return Ju(we,oe)})}}function Ju(qt,oe){return{type:"Feature",id:qt.id,properties:qt.properties,geometry:xl(qt.geometry,oe)}}function Df(qt,oe){return{type:"GeometryCollection",geometries:qt.geometries.map(function(we){return xl(we,oe)})}}function xl(qt,oe){if(!qt)return null;if(qt.type==="GeometryCollection")return Df(qt,oe);var we;switch(qt.type){case"Point":we=bl;break;case"MultiPoint":we=bl;break;case"LineString":we=If;break;case"MultiLineString":we=If;break;case"Polygon":we=Hl;break;case"MultiPolygon":we=Hl;break;case"Sphere":we=Hl;break;default:return null}return(0,gi.c)(qt,oe(we)),we.result()}var ja=[],Co=[],bl={point:function(qt,oe){ja.push([qt,oe])},result:function(){var qt=ja.length?ja.length<2?{type:"Point",coordinates:ja[0]}:{type:"MultiPoint",coordinates:ja}:null;return ja=[],qt}},If={lineStart:Ul,point:function(qt,oe){ja.push([qt,oe])},lineEnd:function(){ja.length&&(Co.push(ja),ja=[])},result:function(){var qt=Co.length?Co.length<2?{type:"LineString",coordinates:Co[0]}:{type:"MultiLineString",coordinates:Co}:null;return Co=[],qt}},Hl={polygonStart:Ul,lineStart:Ul,point:function(qt,oe){ja.push([qt,oe])},lineEnd:function(){var qt=ja.length;if(qt){do ja.push(ja[0].slice());while(++qt<4);Co.push(ja),ja=[]}},polygonEnd:Ul,result:function(){if(!Co.length)return null;var qt=[],oe=[];return Co.forEach(function(we){Cc(we)?qt.push([we]):oe.push(we)}),oe.forEach(function(we){var Me=we[0];qt.some(function(Ue){if(Lc(Ue[0],Me))return Ue.push(we),!0})||qt.push([we])}),Co=[],qt.length?qt.length>1?{type:"MultiPolygon",coordinates:qt}:{type:"Polygon",coordinates:qt[0]}:null}};function gs(qt){var oe=qt(o,0)[0]-qt(-o,0)[0];function we(Me,Ue){var ze=C(Me)0?Me-u:Me+u,Ue),gr=(Ge[0]-Ge[1])*w,br=(Ge[0]+Ge[1])*w;if(ze)return[gr,br];var sr=oe*w,Mr=gr>0^br>0?-1:1;return[Mr*gr-c(br)*sr,Mr*br-c(gr)*sr]}return qt.invert&&(we.invert=function(Me,Ue){var ze=(Me+Ue)*w,Ge=(Ue-Me)*w,gr=C(ze)<.5*oe&&C(Ge)<.5*oe;if(!gr){var br=oe*w,sr=ze>0^Ge>0?-1:1,Mr=-sr*Me+(Ge>0?1:-1)*br,Ir=-sr*Ue+(ze>0?1:-1)*br;ze=(-Mr-Ir)*w,Ge=(Mr-Ir)*w}var Nr=qt.invert(ze,Ge);return gr||(Nr[0]+=ze>0?u:-u),Nr}),(0,g.c)(we).rotate([-90,-90,45]).clipAngle(179.999)}function Dc(){return gs(gn).scale(176.423)}function Ff(){return gs(wr).scale(111.48)}function zf(qt,oe){if(!(0<=(oe=+oe)&&oe<=20))throw new Error("invalid digits");function we(sr){var Mr=sr.length,Ir=2,Nr=new Array(Mr);for(Nr[0]=+sr[0].toFixed(oe),Nr[1]=+sr[1].toFixed(oe);Ir2||en[0]!=Mr[0]||en[1]!=Mr[1])&&(Ir.push(en),Mr=en)}return Ir.length===1&&sr.length>1&&Ir.push(we(sr[sr.length-1])),Ir}function ze(sr){return sr.map(Ue)}function Ge(sr){if(sr==null)return sr;var Mr;switch(sr.type){case"GeometryCollection":Mr={type:"GeometryCollection",geometries:sr.geometries.map(Ge)};break;case"Point":Mr={type:"Point",coordinates:we(sr.coordinates)};break;case"MultiPoint":Mr={type:sr.type,coordinates:Me(sr.coordinates)};break;case"LineString":Mr={type:sr.type,coordinates:Ue(sr.coordinates)};break;case"MultiLineString":case"Polygon":Mr={type:sr.type,coordinates:ze(sr.coordinates)};break;case"MultiPolygon":Mr={type:"MultiPolygon",coordinates:sr.coordinates.map(ze)};break;default:return sr}return sr.bbox!=null&&(Mr.bbox=sr.bbox),Mr}function gr(sr){var Mr={type:"Feature",properties:sr.properties,geometry:Ge(sr.geometry)};return sr.id!=null&&(Mr.id=sr.id),sr.bbox!=null&&(Mr.bbox=sr.bbox),Mr}if(qt!=null)switch(qt.type){case"Feature":return gr(qt);case"FeatureCollection":{var br={type:"FeatureCollection",features:qt.features.map(gr)};return qt.bbox!=null&&(br.bbox=qt.bbox),br}default:return Ge(qt)}return qt}function Qu(qt){var oe=l(qt);function we(Me,Ue){var ze=oe?m(Me*oe/2)/oe:Me/2;if(!Ue)return[2*ze,-qt];var Ge=2*i(ze*l(Ue)),gr=1/m(Ue);return[l(Ge)*gr,Ue+(1-x(Ge))*gr-qt]}return we.invert=function(Me,Ue){if(C(Ue+=qt)v&&--gr>0);var Nr=Me*(sr=m(Ge)),en=m(C(Ue)0?o:-o)*(br+Ue*(Mr-Ge)/2+Ue*Ue*(Mr-2*br+Ge)/2)]}Xo.invert=function(qt,oe){var we=oe/o,Me=we*90,Ue=a(18,C(Me/5)),ze=e(0,p(Ue));do{var Ge=vo[ze][1],gr=vo[ze+1][1],br=vo[a(19,ze+2)][1],sr=br-Ge,Mr=br-2*gr+Ge,Ir=2*(C(we)-gr)/sr,Nr=Mr/sr,en=Ir*(1-Nr*Ir*(1-2*Nr*Ir));if(en>=0||ze===1){Me=(oe>=0?5:-5)*(en+Ue);var yn=50,Rn;do Ue=a(18,C(Me)/5),ze=p(Ue),en=Ue-ze,Ge=vo[ze][1],gr=vo[ze+1][1],br=vo[a(19,ze+2)][1],Me-=(Rn=(oe>=0?o:-o)*(gr+en*(br-Ge)/2+en*en*(br-2*gr+Ge)/2)-oe)*E;while(C(Rn)>b&&--yn>0);break}}while(--ze>=0);var Dn=vo[ze][0],Zn=vo[ze+1][0],Li=vo[a(19,ze+2)][0];return[qt/(Zn+en*(Li-Dn)/2+en*en*(Li-2*Zn+Dn)/2),Me*T]};function Ds(){return(0,g.c)(Xo).scale(152.63)}function wl(qt){function oe(we,Me){var Ue=x(Me),ze=(qt-1)/(qt-Ue*x(we));return[ze*Ue*l(we),ze*l(Me)]}return oe.invert=function(we,Me){var Ue=we*we+Me*Me,ze=z(Ue),Ge=(qt-z(1-Ue*(qt+1)/(qt-1)))/((qt-1)/ze+ze/(qt-1));return[S(we*Ge,ze*z(1-Ge*Ge)),ze?L(Me*Ge/ze):0]},oe}function Au(qt,oe){var we=wl(qt);if(!oe)return we;var Me=x(oe),Ue=l(oe);function ze(Ge,gr){var br=we(Ge,gr),sr=br[1],Mr=sr*Ue/(qt-1)+Me;return[br[0]*Me/Mr,sr/Mr]}return ze.invert=function(Ge,gr){var br=(qt-1)/(qt-1-gr*Ue);return we.invert(br*Ge,br*gr*Me)},ze}function Js(){var qt=2,oe=0,we=(0,g.U)(Au),Me=we(qt,oe);return Me.distance=function(Ue){return arguments.length?we(qt=+Ue,oe):qt},Me.tilt=function(Ue){return arguments.length?we(qt,oe=Ue*T):oe*E},Me.scale(432.147).clipAngle(M(1/qt)*E-1e-6)}var Qs=1e-4,Of=1e4,ms=-180,Tl=ms+Qs,Is=180,ys=Is-Qs,Vl=-90,Al=Vl+Qs,va=90,Ml=va-Qs;function Mu(qt){return qt.length>0}function Nf(qt){return Math.floor(qt*Of)/Of}function Sl(qt){return qt===Vl||qt===va?[0,qt]:[ms,Nf(qt)]}function Gl(qt){var oe=qt[0],we=qt[1],Me=!1;return oe<=Tl?(oe=ms,Me=!0):oe>=ys&&(oe=Is,Me=!0),we<=Al?(we=Vl,Me=!0):we>=Ml&&(we=va,Me=!0),Me?[oe,we]:qt}function Su(qt){return qt.map(Gl)}function $u(qt,oe,we){for(var Me=0,Ue=qt.length;Me=ys||Mr<=Al||Mr>=Ml){ze[Ge]=Gl(br);for(var Ir=Ge+1;IrTl&&enAl&&yn=gr)break;we.push({index:-1,polygon:oe,ring:ze=ze.slice(Ir-1)}),ze[0]=Sl(ze[0][1]),Ge=-1,gr=ze.length}}}}function Wl(qt){var oe,we=qt.length,Me={},Ue={},ze,Ge,gr,br,sr;for(oe=0;oe0?u-gr:gr)*E],sr=(0,g.c)(qt(Ge)).rotate(br),Mr=(0,Xt.c)(br),Ir=sr.center;return delete sr.rotate,sr.center=function(Nr){return arguments.length?Ir(Mr(Nr)):Mr.invert(Ir())},sr.clipAngle(90)}function qu(qt){var oe=x(qt);function we(Me,Ue){var ze=(0,Ps.Y)(Me,Ue);return ze[0]*=oe,ze}return we.invert=function(Me,Ue){return Ps.Y.invert(Me/oe,Ue)},we}function $s(){return Eu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Eu(qt,oe){return ns(qu,qt,oe)}function Zl(qt){if(!(qt*=2))return ot.O;var oe=-qt/2,we=-oe,Me=qt*qt,Ue=m(we),ze=.5/l(we);function Ge(gr,br){var sr=M(x(br)*x(gr-oe)),Mr=M(x(br)*x(gr-we)),Ir=br<0?-1:1;return sr*=sr,Mr*=Mr,[(sr-Mr)/(2*qt),Ir*z(4*Me*Mr-(Me-sr+Mr)*(Me-sr+Mr))/(2*qt)]}return Ge.invert=function(gr,br){var sr=br*br,Mr=x(z(sr+(Nr=gr+oe)*Nr)),Ir=x(z(sr+(Nr=gr+we)*Nr)),Nr,en;return[S(en=Mr-Ir,Nr=(Mr+Ir)*Ue),(br<0?-1:1)*M(z(Nr*Nr+en*en)*ze)]},Ge}function Ic(){return Bf([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Bf(qt,oe){return ns(Zl,qt,oe)}function lo(qt,oe){if(C(oe)v&&--gr>0);return[c(qt)*(z(Ue*Ue+4)+Ue)*u/4,o*Ge]};function Kl(){return(0,g.c)(To).scale(127.16)}function _u(qt,oe,we,Me,Ue){function ze(Ge,gr){var br=we*l(Me*gr),sr=z(1-br*br),Mr=z(2/(1+sr*x(Ge*=Ue)));return[qt*sr*Mr*l(Ge),oe*br*Mr]}return ze.invert=function(Ge,gr){var br=Ge/qt,sr=gr/oe,Mr=z(br*br+sr*sr),Ir=2*L(Mr/2);return[S(Ge*m(Ir),qt*Mr)/Ue,Mr&&L(gr*l(Ir)/(oe*we*Mr))/Me]},ze}function xs(qt,oe,we,Me){var Ue=u/3;qt=e(qt,v),oe=e(oe,v),qt=a(qt,o),oe=a(oe,u-v),we=e(we,0),we=a(we,100-v),Me=e(Me,v);var ze=we/100+1,Ge=Me/100,gr=M(ze*x(Ue))/Ue,br=l(qt)/l(gr*o),sr=oe/u,Mr=z(Ge*l(qt/2)/l(oe/2)),Ir=Mr/z(sr*br*gr),Nr=1/(Mr*z(sr*br*gr));return _u(Ir,Nr,br,gr,sr)}function Os(){var qt=65*T,oe=60*T,we=20,Me=200,Ue=(0,g.U)(xs),ze=Ue(qt,oe,we,Me);return ze.poleline=function(Ge){return arguments.length?Ue(qt=+Ge*T,oe,we,Me):qt*E},ze.parallels=function(Ge){return arguments.length?Ue(qt,oe=+Ge*T,we,Me):oe*E},ze.inflation=function(Ge){return arguments.length?Ue(qt,oe,we=+Ge,Me):we},ze.ratio=function(Ge){return arguments.length?Ue(qt,oe,we,Me=+Ge):Me},ze.scale(163.775)}function tf(){return Os().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Jl=4*u+3*z(3),Ql=2*z(2*u*z(3)/Jl),Cu=mt(Ql*z(3)/u,Ql,Jl/6);function Hf(){return(0,g.c)(Cu).scale(176.84)}function $l(qt,oe){return[qt*z(1-3*oe*oe/(u*u)),oe]}$l.invert=function(qt,oe){return[qt/z(1-3*oe*oe/(u*u)),oe]};function ef(){return(0,g.c)($l).scale(152.63)}function qs(qt,oe){var we=x(oe),Me=x(qt)*we,Ue=1-Me,ze=x(qt=S(l(qt)*we,-l(oe))),Ge=l(qt);return we=z(1-Me*Me),[Ge*we-ze*Ue,-ze*we-Ge*Ue]}qs.invert=function(qt,oe){var we=(qt*qt+oe*oe)/-2,Me=z(-we*(2+we)),Ue=oe*we+qt*Me,ze=qt*we-oe*Me,Ge=z(ze*ze+Ue*Ue);return[S(Me*Ue,Ge*(1+we)),Ge?-L(Me*ze/Ge):0]};function rf(){return(0,g.c)(qs).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function ql(qt,oe){var we=Y(qt,oe);return[(we[0]+qt/o)/2,(we[1]+oe)/2]}ql.invert=function(qt,oe){var we=qt,Me=oe,Ue=25;do{var ze=x(Me),Ge=l(Me),gr=l(2*Me),br=Ge*Ge,sr=ze*ze,Mr=l(we),Ir=x(we/2),Nr=l(we/2),en=Nr*Nr,yn=1-sr*Ir*Ir,Rn=yn?M(ze*Ir)*z(Dn=1/yn):Dn=0,Dn,Zn=.5*(2*Rn*ze*Nr+we/o)-qt,Li=.5*(Rn*Ge+Me)-oe,Pi=.5*Dn*(sr*en+Rn*ze*Ir*br)+.5/o,Ri=Dn*(Mr*gr/4-Rn*Ge*Nr),zi=.125*Dn*(gr*Nr-Rn*Ge*sr*Mr),Xi=.5*Dn*(br*Ir+Rn*en*ze)+.5,da=Ri*zi-Xi*Pi,Ia=(Li*Ri-Zn*Xi)/da,ft=(Zn*zi-Li*Pi)/da;we-=Ia,Me-=ft}while((C(Ia)>v||C(ft)>v)&&--Ue>0);return[we,Me]};function Vf(){return(0,g.c)(ql).scale(158.837)}},88728:function(G,U,t){t.d(U,{c:function(){return g}});function g(){return new C}function C(){this.reset()}C.prototype={constructor:C,reset:function(){this.s=this.t=0},add:function(x){S(i,x,this.t),S(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new C;function S(x,h,p){var r=x.s=h+p,e=r-h,a=r-e;x.t=h-a+(p-e)}},95384:function(G,U,t){t.d(U,{cp:function(){return b},mQ:function(){return x},oB:function(){return f}});var g=t(88728),C=t(64528),i=t(70932),S=t(16016),x=(0,g.c)(),h=(0,g.c)(),p,r,e,a,n,f={point:i.c,lineStart:i.c,lineEnd:i.c,polygonStart:function(){x.reset(),f.lineStart=c,f.lineEnd=l},polygonEnd:function(){var u=+x;h.add(u<0?C.kD+u:u),this.lineStart=this.lineEnd=this.point=i.c},sphere:function(){h.add(C.kD)}};function c(){f.point=m}function l(){v(p,r)}function m(u,o){f.point=v,p=u,r=o,u*=C.qw,o*=C.qw,e=u,a=(0,C.W8)(o=o/2+C.wL),n=(0,C.g$)(o)}function v(u,o){u*=C.qw,o*=C.qw,o=o/2+C.wL;var d=u-e,w=d>=0?1:-1,A=w*d,_=(0,C.W8)(o),y=(0,C.g$)(o),E=n*y,T=a*_+E*(0,C.W8)(A),s=E*w*(0,C.g$)(A);x.add((0,C.WE)(s,T)),e=u,a=_,n=y}function b(u){return h.reset(),(0,S.c)(u,f),h*2}},13696:function(G,U,t){t.d(U,{c:function(){return L}});var g=t(88728),C=t(95384),i=t(84220),S=t(64528),x=t(16016),h,p,r,e,a,n,f,c,l=(0,g.c)(),m,v,b={point:u,lineStart:d,lineEnd:w,polygonStart:function(){b.point=A,b.lineStart=_,b.lineEnd=y,l.reset(),C.oB.polygonStart()},polygonEnd:function(){C.oB.polygonEnd(),b.point=u,b.lineStart=d,b.lineEnd=w,C.mQ<0?(h=-(r=180),p=-(e=90)):l>S.Gg?e=90:l<-S.Gg&&(p=-90),v[0]=h,v[1]=r},sphere:function(){h=-(r=180),p=-(e=90)}};function u(M,z){m.push(v=[h=M,r=M]),ze&&(e=z)}function o(M,z){var D=(0,i.ux)([M*S.qw,z*S.qw]);if(c){var N=(0,i.CW)(c,D),I=[N[1],-N[0],0],k=(0,i.CW)(I,N);(0,i.cJ)(k),k=(0,i.G)(k);var B=M-a,O=B>0?1:-1,H=k[0]*S.oh*O,Y,j=(0,S.a2)(B)>180;j^(O*ae&&(e=Y)):(H=(H+360)%360-180,j^(O*ae&&(e=z))),j?ME(h,r)&&(r=M):E(M,r)>E(h,r)&&(h=M):r>=h?(Mr&&(r=M)):M>a?E(h,M)>E(h,r)&&(r=M):E(M,r)>E(h,r)&&(h=M)}else m.push(v=[h=M,r=M]);ze&&(e=z),c=D,a=M}function d(){b.point=o}function w(){v[0]=h,v[1]=r,b.point=u,c=null}function A(M,z){if(c){var D=M-a;l.add((0,S.a2)(D)>180?D+(D>0?360:-360):D)}else n=M,f=z;C.oB.point(M,z),o(M,z)}function _(){C.oB.lineStart()}function y(){A(n,f),C.oB.lineEnd(),(0,S.a2)(l)>S.Gg&&(h=-(r=180)),v[0]=h,v[1]=r,c=null}function E(M,z){return(z-=M)<0?z+360:z}function T(M,z){return M[0]-z[0]}function s(M,z){return M[0]<=M[1]?M[0]<=z&&z<=M[1]:zE(N[0],N[1])&&(N[1]=I[1]),E(I[0],N[1])>E(N[0],N[1])&&(N[0]=I[0])):k.push(N=I);for(B=-1/0,D=k.length-1,z=0,N=k[D];z<=D;N=I,++z)I=k[z],(O=E(N[1],I[0]))>B&&(B=O,h=I[0],r=N[1])}return m=v=null,h===1/0||p===1/0?[[NaN,NaN],[NaN,NaN]]:[[h,p],[r,e]]}},84220:function(G,U,t){t.d(U,{CW:function(){return x},Ez:function(){return S},G:function(){return C},cJ:function(){return r},mg:function(){return h},ux:function(){return i},wx:function(){return p}});var g=t(64528);function C(e){return[(0,g.WE)(e[1],e[0]),(0,g.qR)(e[2])]}function i(e){var a=e[0],n=e[1],f=(0,g.W8)(n);return[f*(0,g.W8)(a),f*(0,g.g$)(a),(0,g.g$)(n)]}function S(e,a){return e[0]*a[0]+e[1]*a[1]+e[2]*a[2]}function x(e,a){return[e[1]*a[2]-e[2]*a[1],e[2]*a[0]-e[0]*a[2],e[0]*a[1]-e[1]*a[0]]}function h(e,a){e[0]+=a[0],e[1]+=a[1],e[2]+=a[2]}function p(e,a){return[e[0]*a,e[1]*a,e[2]*a]}function r(e){var a=(0,g._I)(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=a,e[1]/=a,e[2]/=a}},24052:function(G,U,t){t.d(U,{c:function(){return D}});var g=t(64528),C=t(70932),i=t(16016),S,x,h,p,r,e,a,n,f,c,l,m,v,b,u,o,d={sphere:C.c,point:w,lineStart:_,lineEnd:T,polygonStart:function(){d.lineStart=s,d.lineEnd=L},polygonEnd:function(){d.lineStart=_,d.lineEnd=T}};function w(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I);A(k*(0,g.W8)(N),k*(0,g.g$)(N),(0,g.g$)(I))}function A(N,I,k){++S,h+=(N-h)/S,p+=(I-p)/S,r+=(k-r)/S}function _(){d.point=y}function y(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I);b=k*(0,g.W8)(N),u=k*(0,g.g$)(N),o=(0,g.g$)(I),d.point=E,A(b,u,o)}function E(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I),B=k*(0,g.W8)(N),O=k*(0,g.g$)(N),H=(0,g.g$)(I),Y=(0,g.WE)((0,g._I)((Y=u*H-o*O)*Y+(Y=o*B-b*H)*Y+(Y=b*O-u*B)*Y),b*B+u*O+o*H);x+=Y,e+=Y*(b+(b=B)),a+=Y*(u+(u=O)),n+=Y*(o+(o=H)),A(b,u,o)}function T(){d.point=w}function s(){d.point=M}function L(){z(m,v),d.point=w}function M(N,I){m=N,v=I,N*=g.qw,I*=g.qw,d.point=z;var k=(0,g.W8)(I);b=k*(0,g.W8)(N),u=k*(0,g.g$)(N),o=(0,g.g$)(I),A(b,u,o)}function z(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I),B=k*(0,g.W8)(N),O=k*(0,g.g$)(N),H=(0,g.g$)(I),Y=u*H-o*O,j=o*B-b*H,et=b*O-u*B,it=(0,g._I)(Y*Y+j*j+et*et),ut=(0,g.qR)(it),J=it&&-ut/it;f+=J*Y,c+=J*j,l+=J*et,x+=ut,e+=ut*(b+(b=B)),a+=ut*(u+(u=O)),n+=ut*(o+(o=H)),A(b,u,o)}function D(N){S=x=h=p=r=e=a=n=f=c=l=0,(0,i.c)(N,d);var I=f,k=c,B=l,O=I*I+k*k+B*B;return O0?fc)&&(f+=n*i.kD));for(var b,u=f;n>0?u>c:u0?C.pi:-C.pi,l=(0,C.a2)(n-p);(0,C.a2)(l-C.pi)0?C.or:-C.or),h.point(e,r),h.lineEnd(),h.lineStart(),h.point(c,r),h.point(n,r),a=0):e!==c&&l>=C.pi&&((0,C.a2)(p-e)C.Gg?(0,C.MQ)(((0,C.g$)(p)*(n=(0,C.W8)(e))*(0,C.g$)(r)-(0,C.g$)(e)*(a=(0,C.W8)(p))*(0,C.g$)(h))/(a*n*f)):(p+e)/2}function x(h,p,r,e){var a;if(h==null)a=r*C.or,e.point(-C.pi,a),e.point(0,a),e.point(C.pi,a),e.point(C.pi,0),e.point(C.pi,-a),e.point(0,-a),e.point(-C.pi,-a),e.point(-C.pi,0),e.point(-C.pi,a);else if((0,C.a2)(h[0]-p[0])>C.Gg){var n=h[0]1&&i.push(i.pop().concat(i.shift()))},result:function(){var x=i;return i=[],S=null,x}}}},2728:function(G,U,t){t.d(U,{c:function(){return h}});var g=t(84220),C=t(61780),i=t(64528),S=t(41860),x=t(14229);function h(p){var r=(0,i.W8)(p),e=6*i.qw,a=r>0,n=(0,i.a2)(r)>i.Gg;function f(b,u,o,d){(0,C.Q)(d,p,e,o,b,u)}function c(b,u){return(0,i.W8)(b)*(0,i.W8)(u)>r}function l(b){var u,o,d,w,A;return{lineStart:function(){w=d=!1,A=1},point:function(_,y){var E=[_,y],T,s=c(_,y),L=a?s?0:v(_,y):s?v(_+(_<0?i.pi:-i.pi),y):0;if(!u&&(w=d=s)&&b.lineStart(),s!==d&&(T=m(u,E),(!T||(0,S.c)(u,T)||(0,S.c)(E,T))&&(E[2]=1)),s!==d)A=0,s?(b.lineStart(),T=m(E,u),b.point(T[0],T[1])):(T=m(u,E),b.point(T[0],T[1],2),b.lineEnd()),u=T;else if(n&&u&&a^s){var M;!(L&o)&&(M=m(E,u,!0))&&(A=0,a?(b.lineStart(),b.point(M[0][0],M[0][1]),b.point(M[1][0],M[1][1]),b.lineEnd()):(b.point(M[1][0],M[1][1]),b.lineEnd(),b.lineStart(),b.point(M[0][0],M[0][1],3)))}s&&(!u||!(0,S.c)(u,E))&&b.point(E[0],E[1]),u=E,d=s,o=L},lineEnd:function(){d&&b.lineEnd(),u=null},clean:function(){return A|(w&&d)<<1}}}function m(b,u,o){var d=(0,g.ux)(b),w=(0,g.ux)(u),A=[1,0,0],_=(0,g.CW)(d,w),y=(0,g.Ez)(_,_),E=_[0],T=y-E*E;if(!T)return!o&&b;var s=r*y/T,L=-r*E/T,M=(0,g.CW)(A,_),z=(0,g.wx)(A,s),D=(0,g.wx)(_,L);(0,g.mg)(z,D);var N=M,I=(0,g.Ez)(z,N),k=(0,g.Ez)(N,N),B=I*I-k*((0,g.Ez)(z,z)-1);if(!(B<0)){var O=(0,i._I)(B),H=(0,g.wx)(N,(-I-O)/k);if((0,g.mg)(H,z),H=(0,g.G)(H),!o)return H;var Y=b[0],j=u[0],et=b[1],it=u[1],ut;j0^H[1]<((0,i.a2)(H[0]-Y)i.pi^(Y<=H[0]&&H[0]<=j)){var V=(0,g.wx)(N,(-I+O)/k);return(0,g.mg)(V,z),[H,(0,g.G)(V)]}}}function v(b,u){var o=a?p:i.pi-p,d=0;return b<-o?d|=1:b>o&&(d|=2),u<-o?d|=4:u>o&&(d|=8),d}return(0,x.c)(c,l,f,a?[0,-p]:[-i.pi,p-i.pi])}},14229:function(G,U,t){t.d(U,{c:function(){return h}});var g=t(97208),C=t(32232),i=t(64528),S=t(58196),x=t(84706);function h(e,a,n,f){return function(c){var l=a(c),m=(0,g.c)(),v=a(m),b=!1,u,o,d,w={point:A,lineStart:y,lineEnd:E,polygonStart:function(){w.point=T,w.lineStart=s,w.lineEnd=L,o=[],u=[]},polygonEnd:function(){w.point=A,w.lineStart=y,w.lineEnd=E,o=(0,x.Uf)(o);var M=(0,S.c)(u,f);o.length?(b||(c.polygonStart(),b=!0),(0,C.c)(o,r,M,n,c)):M&&(b||(c.polygonStart(),b=!0),c.lineStart(),n(null,null,1,c),c.lineEnd()),b&&(c.polygonEnd(),b=!1),o=u=null},sphere:function(){c.polygonStart(),c.lineStart(),n(null,null,1,c),c.lineEnd(),c.polygonEnd()}};function A(M,z){e(M,z)&&c.point(M,z)}function _(M,z){l.point(M,z)}function y(){w.point=_,l.lineStart()}function E(){w.point=A,l.lineEnd()}function T(M,z){d.push([M,z]),v.point(M,z)}function s(){v.lineStart(),d=[]}function L(){T(d[0][0],d[0][1]),v.lineEnd();var M=v.clean(),z=m.result(),D,N=z.length,I,k,B;if(d.pop(),u.push(d),d=null,!!N){if(M&1){if(k=z[0],(I=k.length-1)>0){for(b||(c.polygonStart(),b=!0),c.lineStart(),D=0;D1&&M&2&&z.push(z.pop().concat(z.shift())),o.push(z.filter(p))}}return w}}function p(e){return e.length>1}function r(e,a){return((e=e.x)[0]<0?e[1]-i.or-i.Gg:i.or-e[1])-((a=a.x)[0]<0?a[1]-i.or-i.Gg:i.or-a[1])}},21676:function(G,U,t){t.d(U,{c:function(){return r}});var g=t(64528),C=t(97208);function i(e,a,n,f,c,l){var m=e[0],v=e[1],b=a[0],u=a[1],o=0,d=1,w=b-m,A=u-v,_;if(_=n-m,!(!w&&_>0)){if(_/=w,w<0){if(_0){if(_>d)return;_>o&&(o=_)}if(_=c-m,!(!w&&_<0)){if(_/=w,w<0){if(_>d)return;_>o&&(o=_)}else if(w>0){if(_0)){if(_/=A,A<0){if(_0){if(_>d)return;_>o&&(o=_)}if(_=l-v,!(!A&&_<0)){if(_/=A,A<0){if(_>d)return;_>o&&(o=_)}else if(A>0){if(_0&&(e[0]=m+o*w,e[1]=v+o*A),d<1&&(a[0]=m+d*w,a[1]=v+d*A),!0}}}}}var S=t(32232),x=t(84706),h=1e9,p=-h;function r(e,a,n,f){function c(u,o){return e<=u&&u<=n&&a<=o&&o<=f}function l(u,o,d,w){var A=0,_=0;if(u==null||(A=m(u,d))!==(_=m(o,d))||b(u,o)<0^d>0)do w.point(A===0||A===3?e:n,A>1?f:a);while((A=(A+d+4)%4)!==_);else w.point(o[0],o[1])}function m(u,o){return(0,g.a2)(u[0]-e)0?0:3:(0,g.a2)(u[0]-n)0?2:1:(0,g.a2)(u[1]-a)0?1:0:o>0?3:2}function v(u,o){return b(u.x,o.x)}function b(u,o){var d=m(u,1),w=m(o,1);return d!==w?d-w:d===0?o[1]-u[1]:d===1?u[0]-o[0]:d===2?u[1]-o[1]:o[0]-u[0]}return function(u){var o=u,d=(0,C.c)(),w,A,_,y,E,T,s,L,M,z,D,N={point:I,lineStart:H,lineEnd:Y,polygonStart:B,polygonEnd:O};function I(et,it){c(et,it)&&o.point(et,it)}function k(){for(var et=0,it=0,ut=A.length;itf&&($-Q)*(f-ot)>(Z-ot)*(e-Q)&&++et:Z<=f&&($-Q)*(f-ot)<(Z-ot)*(e-Q)&&--et;return et}function B(){o=d,w=[],A=[],D=!0}function O(){var et=k(),it=D&&et,ut=(w=(0,x.Uf)(w)).length;(it||ut)&&(u.polygonStart(),it&&(u.lineStart(),l(null,null,1,u),u.lineEnd()),ut&&(0,S.c)(w,v,et,l,u),u.polygonEnd()),o=u,w=A=_=null}function H(){N.point=j,A&&A.push(_=[]),z=!0,M=!1,s=L=NaN}function Y(){w&&(j(y,E),T&&M&&d.rejoin(),w.push(d.result())),N.point=I,M&&o.lineEnd()}function j(et,it){var ut=c(et,it);if(A&&_.push([et,it]),z)y=et,E=it,T=ut,z=!1,ut&&(o.lineStart(),o.point(et,it));else if(ut&&M)o.point(et,it);else{var J=[s=Math.max(p,Math.min(h,s)),L=Math.max(p,Math.min(h,L))],X=[et=Math.max(p,Math.min(h,et)),it=Math.max(p,Math.min(h,it))];i(J,X,e,a,n,f)?(M||(o.lineStart(),o.point(J[0],J[1])),o.point(X[0],X[1]),ut||o.lineEnd(),D=!1):ut&&(o.lineStart(),o.point(et,it),D=!1)}s=et,L=it,M=ut}return N}}},32232:function(G,U,t){t.d(U,{c:function(){return S}});var g=t(41860),C=t(64528);function i(h,p,r,e){this.x=h,this.z=p,this.o=r,this.e=e,this.v=!1,this.n=this.p=null}function S(h,p,r,e,a){var n=[],f=[],c,l;if(h.forEach(function(d){if(!((w=d.length-1)<=0)){var w,A=d[0],_=d[w],y;if((0,g.c)(A,_)){if(!A[2]&&!_[2]){for(a.lineStart(),c=0;c=0;--c)a.point((b=v[c])[0],b[1]);else e(u.x,u.p.x,-1,a);u=u.p}u=u.o,v=u.z,o=!o}while(!u.v);a.lineEnd()}}}function x(h){if(p=h.length){for(var p,r=0,e=h[0],a;++r0&&(an=T(Tr[pn],Tr[pn-1]),an>0&&Wr<=an&&Ur<=an&&(Wr+Ur-an)*(1-Math.pow((Wr-Ur)/an,2))n.Gg}).map(li)).concat((0,O.ik)((0,n.Km)(pn/ni)*ni,an,ni).filter(function(Tn){return(0,n.a2)(Tn%di)>n.Gg}).map(ri))}return dn.lines=function(){return Vn().map(function(Tn){return{type:"LineString",coordinates:Tn}})},dn.outline=function(){return{type:"Polygon",coordinates:[wr(Ur).concat(nn(gn).slice(1),wr(Wr).reverse().slice(1),nn(_n).reverse().slice(1))]}},dn.extent=function(Tn){return arguments.length?dn.extentMajor(Tn).extentMinor(Tn):dn.extentMinor()},dn.extentMajor=function(Tn){return arguments.length?(Ur=+Tn[0][0],Wr=+Tn[1][0],_n=+Tn[0][1],gn=+Tn[1][1],Ur>Wr&&(Tn=Ur,Ur=Wr,Wr=Tn),_n>gn&&(Tn=_n,_n=gn,gn=Tn),dn.precision($r)):[[Ur,_n],[Wr,gn]]},dn.extentMinor=function(Tn){return arguments.length?(Cr=+Tn[0][0],Tr=+Tn[1][0],pn=+Tn[0][1],an=+Tn[1][1],Cr>Tr&&(Tn=Cr,Cr=Tr,Tr=Tn),pn>an&&(Tn=pn,pn=an,an=Tn),dn.precision($r)):[[Cr,pn],[Tr,an]]},dn.step=function(Tn){return arguments.length?dn.stepMajor(Tn).stepMinor(Tn):dn.stepMinor()},dn.stepMajor=function(Tn){return arguments.length?(ci=+Tn[0],di=+Tn[1],dn):[ci,di]},dn.stepMinor=function(Tn){return arguments.length?(kn=+Tn[0],ni=+Tn[1],dn):[kn,ni]},dn.precision=function(Tn){return arguments.length?($r=+Tn,li=H(pn,an,90),ri=Y(Cr,Tr,$r),wr=H(_n,gn,90),nn=Y(Ur,Wr,$r),dn):$r},dn.extentMajor([[-180,-90+n.Gg],[180,90-n.Gg]]).extentMinor([[-180,-80-n.Gg],[180,80+n.Gg]])}function et(){return j()()}var it=t(27284),ut=t(7376),J=(0,a.c)(),X=(0,a.c)(),tt,V,Q,ot,$={point:f.c,lineStart:f.c,lineEnd:f.c,polygonStart:function(){$.lineStart=Z,$.lineEnd=ct},polygonEnd:function(){$.lineStart=$.lineEnd=$.point=f.c,J.add((0,n.a2)(X)),X.reset()},result:function(){var Tr=J/2;return J.reset(),Tr}};function Z(){$.point=st}function st(Tr,Cr){$.point=nt,tt=Q=Tr,V=ot=Cr}function nt(Tr,Cr){X.add(ot*Tr-Q*Cr),Q=Tr,ot=Cr}function ct(){nt(tt,V)}var gt=$,Tt=t(73784),wt=0,Rt=0,bt=0,At=0,mt=0,Lt=0,Ht=0,Ut=0,kt=0,Vt,It,re,Kt,$t={point:le,lineStart:he,lineEnd:Se,polygonStart:function(){$t.lineStart=ne,$t.lineEnd=zt},polygonEnd:function(){$t.point=le,$t.lineStart=he,$t.lineEnd=Se},result:function(){var Tr=kt?[Ht/kt,Ut/kt]:Lt?[At/Lt,mt/Lt]:bt?[wt/bt,Rt/bt]:[NaN,NaN];return wt=Rt=bt=At=mt=Lt=Ht=Ut=kt=0,Tr}};function le(Tr,Cr){wt+=Tr,Rt+=Cr,++bt}function he(){$t.point=de}function de(Tr,Cr){$t.point=xe,le(re=Tr,Kt=Cr)}function xe(Tr,Cr){var Wr=Tr-re,Ur=Cr-Kt,an=(0,n._I)(Wr*Wr+Ur*Ur);At+=an*(re+Tr)/2,mt+=an*(Kt+Cr)/2,Lt+=an,le(re=Tr,Kt=Cr)}function Se(){$t.point=le}function ne(){$t.point=Xt}function zt(){Jt(Vt,It)}function Xt(Tr,Cr){$t.point=Jt,le(Vt=re=Tr,It=Kt=Cr)}function Jt(Tr,Cr){var Wr=Tr-re,Ur=Cr-Kt,an=(0,n._I)(Wr*Wr+Ur*Ur);At+=an*(re+Tr)/2,mt+=an*(Kt+Cr)/2,Lt+=an,an=Kt*Tr-re*Cr,Ht+=an*(re+Tr),Ut+=an*(Kt+Cr),kt+=an*3,le(re=Tr,Kt=Cr)}var Wt=$t;function Ft(Tr){this._context=Tr}Ft.prototype={_radius:4.5,pointRadius:function(Tr){return this._radius=Tr,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Tr,Cr){switch(this._point){case 0:{this._context.moveTo(Tr,Cr),this._point=1;break}case 1:{this._context.lineTo(Tr,Cr);break}default:{this._context.moveTo(Tr+this._radius,Cr),this._context.arc(Tr,Cr,this._radius,0,n.kD);break}}},result:f.c};var xt=(0,a.c)(),yt,Et,Mt,Nt,jt,ie={point:f.c,lineStart:function(){ie.point=me},lineEnd:function(){yt&&be(Et,Mt),ie.point=f.c},polygonStart:function(){yt=!0},polygonEnd:function(){yt=null},result:function(){var Tr=+xt;return xt.reset(),Tr}};function me(Tr,Cr){ie.point=be,Et=Nt=Tr,Mt=jt=Cr}function be(Tr,Cr){Nt-=Tr,jt-=Cr,xt.add((0,n._I)(Nt*Nt+jt*jt)),Nt=Tr,jt=Cr}var ve=ie;function Le(){this._string=[]}Le.prototype={_radius:4.5,_circle:ce(4.5),pointRadius:function(Tr){return(Tr=+Tr)!==this._radius&&(this._radius=Tr,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Tr,Cr){switch(this._point){case 0:{this._string.push("M",Tr,",",Cr),this._point=1;break}case 1:{this._string.push("L",Tr,",",Cr);break}default:{this._circle==null&&(this._circle=ce(this._radius)),this._string.push("M",Tr,",",Cr,this._circle);break}}},result:function(){if(this._string.length){var Tr=this._string.join("");return this._string=[],Tr}else return null}};function ce(Tr){return"m0,"+Tr+"a"+Tr+","+Tr+" 0 1,1 0,"+-2*Tr+"a"+Tr+","+Tr+" 0 1,1 0,"+2*Tr+"z"}function Te(Tr,Cr){var Wr=4.5,Ur,an;function pn(gn){return gn&&(typeof Wr=="function"&&an.pointRadius(+Wr.apply(this,arguments)),(0,c.c)(gn,Ur(an))),an.result()}return pn.area=function(gn){return(0,c.c)(gn,Ur(gt)),gt.result()},pn.measure=function(gn){return(0,c.c)(gn,Ur(ve)),ve.result()},pn.bounds=function(gn){return(0,c.c)(gn,Ur(Tt.c)),Tt.c.result()},pn.centroid=function(gn){return(0,c.c)(gn,Ur(Wt)),Wt.result()},pn.projection=function(gn){return arguments.length?(Ur=gn==null?(Tr=null,ut.c):(Tr=gn).stream,pn):Tr},pn.context=function(gn){return arguments.length?(an=gn==null?(Cr=null,new Le):new Ft(Cr=gn),typeof Wr!="function"&&an.pointRadius(Wr),pn):Cr},pn.pointRadius=function(gn){return arguments.length?(Wr=typeof gn=="function"?gn:(an.pointRadius(+gn),+gn),pn):Wr},pn.projection(Tr).context(Cr)}var Be=t(87952);function ir(Tr){var Cr=0,Wr=n.pi/3,Ur=(0,Be.U)(Tr),an=Ur(Cr,Wr);return an.parallels=function(pn){return arguments.length?Ur(Cr=pn[0]*n.qw,Wr=pn[1]*n.qw):[Cr*n.oh,Wr*n.oh]},an}function pe(Tr){var Cr=(0,n.W8)(Tr);function Wr(Ur,an){return[Ur*Cr,(0,n.g$)(an)/Cr]}return Wr.invert=function(Ur,an){return[Ur/Cr,(0,n.qR)(an*Cr)]},Wr}function Xe(Tr,Cr){var Wr=(0,n.g$)(Tr),Ur=(Wr+(0,n.g$)(Cr))/2;if((0,n.a2)(Ur)=.12&&$r<.234&&nn>=-.425&&nn<-.214?an:$r>=.166&&$r<.234&&nn>=-.214&&nn<-.115?gn:Wr).invert(li)},ci.stream=function(li){return Tr&&Cr===li?Tr:Tr=ge([Wr.stream(Cr=li),an.stream(li),gn.stream(li)])},ci.precision=function(li){return arguments.length?(Wr.precision(li),an.precision(li),gn.precision(li),di()):Wr.precision()},ci.scale=function(li){return arguments.length?(Wr.scale(li),an.scale(li*.35),gn.scale(li),ci.translate(Wr.translate())):Wr.scale()},ci.translate=function(li){if(!arguments.length)return Wr.translate();var ri=Wr.scale(),wr=+li[0],nn=+li[1];return Ur=Wr.translate(li).clipExtent([[wr-.455*ri,nn-.238*ri],[wr+.455*ri,nn+.238*ri]]).stream(ni),pn=an.translate([wr-.307*ri,nn+.201*ri]).clipExtent([[wr-.425*ri+n.Gg,nn+.12*ri+n.Gg],[wr-.214*ri-n.Gg,nn+.234*ri-n.Gg]]).stream(ni),_n=gn.translate([wr-.205*ri,nn+.212*ri]).clipExtent([[wr-.214*ri+n.Gg,nn+.166*ri+n.Gg],[wr-.115*ri-n.Gg,nn+.234*ri-n.Gg]]).stream(ni),di()},ci.fitExtent=function(li,ri){return(0,$e.QX)(ci,li,ri)},ci.fitSize=function(li,ri){return(0,$e.UV)(ci,li,ri)},ci.fitWidth=function(li,ri){return(0,$e.Qx)(ci,li,ri)},ci.fitHeight=function(li,ri){return(0,$e.OW)(ci,li,ri)};function di(){return Tr=Cr=null,ci}return ci.scale(1070)}var Ae=t(54724),Ce=t(69020),Ie=t(92992);function Pe(Tr,Cr){return[Tr,(0,n.Yz)((0,n.a6)((n.or+Cr)/2))]}Pe.invert=function(Tr,Cr){return[Tr,2*(0,n.MQ)((0,n.oN)(Cr))-n.or]};function ke(){return Ve(Pe).scale(961/n.kD)}function Ve(Tr){var Cr=(0,Be.c)(Tr),Wr=Cr.center,Ur=Cr.scale,an=Cr.translate,pn=Cr.clipExtent,gn=null,_n,kn,ni;Cr.scale=function(di){return arguments.length?(Ur(di),ci()):Ur()},Cr.translate=function(di){return arguments.length?(an(di),ci()):an()},Cr.center=function(di){return arguments.length?(Wr(di),ci()):Wr()},Cr.clipExtent=function(di){return arguments.length?(di==null?gn=_n=kn=ni=null:(gn=+di[0][0],_n=+di[0][1],kn=+di[1][0],ni=+di[1][1]),ci()):gn==null?null:[[gn,_n],[kn,ni]]};function ci(){var di=n.pi*Ur(),li=Cr((0,Ie.c)(Cr.rotate()).invert([0,0]));return pn(gn==null?[[li[0]-di,li[1]-di],[li[0]+di,li[1]+di]]:Tr===Pe?[[Math.max(li[0]-di,gn),_n],[Math.min(li[0]+di,kn),ni]]:[[gn,Math.max(li[1]-di,_n)],[kn,Math.min(li[1]+di,ni)]])}return ci()}function Je(Tr){return(0,n.a6)((n.or+Tr)/2)}function ur(Tr,Cr){var Wr=(0,n.W8)(Tr),Ur=Tr===Cr?(0,n.g$)(Tr):(0,n.Yz)(Wr/(0,n.W8)(Cr))/(0,n.Yz)(Je(Cr)/Je(Tr)),an=Wr*(0,n.g3)(Je(Tr),Ur)/Ur;if(!Ur)return Pe;function pn(gn,_n){an>0?_n<-n.or+n.Gg&&(_n=-n.or+n.Gg):_n>n.or-n.Gg&&(_n=n.or-n.Gg);var kn=an/(0,n.g3)(Je(_n),Ur);return[kn*(0,n.g$)(Ur*gn),an-kn*(0,n.W8)(Ur*gn)]}return pn.invert=function(gn,_n){var kn=an-_n,ni=(0,n.kq)(Ur)*(0,n._I)(gn*gn+kn*kn),ci=(0,n.WE)(gn,(0,n.a2)(kn))*(0,n.kq)(kn);return kn*Ur<0&&(ci-=n.pi*(0,n.kq)(gn)*(0,n.kq)(kn)),[ci/Ur,2*(0,n.MQ)((0,n.g3)(an/ni,1/Ur))-n.or]},pn}function hr(){return ir(ur).scale(109.5).parallels([30,30])}var vr=t(69604);function Yt(Tr,Cr){var Wr=(0,n.W8)(Tr),Ur=Tr===Cr?(0,n.g$)(Tr):(Wr-(0,n.W8)(Cr))/(Cr-Tr),an=Wr/Ur+Tr;if((0,n.a2)(Ur)2?Ur[2]+90:90]):(Ur=Wr(),[Ur[0],Ur[1],Ur[2]-90])},Wr([0,0,90]).scale(159.155)}},27284:function(G,U,t){t.d(U,{c:function(){return C}});var g=t(64528);function C(i,S){var x=i[0]*g.qw,h=i[1]*g.qw,p=S[0]*g.qw,r=S[1]*g.qw,e=(0,g.W8)(h),a=(0,g.g$)(h),n=(0,g.W8)(r),f=(0,g.g$)(r),c=e*(0,g.W8)(x),l=e*(0,g.g$)(x),m=n*(0,g.W8)(p),v=n*(0,g.g$)(p),b=2*(0,g.qR)((0,g._I)((0,g.SD)(r-h)+e*n*(0,g.SD)(p-x))),u=(0,g.g$)(b),o=b?function(d){var w=(0,g.g$)(d*=b)/u,A=(0,g.g$)(b-d)/u,_=A*c+w*m,y=A*l+w*v,E=A*a+w*f;return[(0,g.WE)(y,_)*g.oh,(0,g.WE)(E,(0,g._I)(_*_+y*y))*g.oh]}:function(){return[x*g.oh,h*g.oh]};return o.distance=b,o}},64528:function(G,U,t){t.d(U,{Gg:function(){return g},Km:function(){return c},MQ:function(){return a},SD:function(){return _},W8:function(){return f},WE:function(){return n},Yz:function(){return m},_I:function(){return o},a2:function(){return e},a6:function(){return d},a8:function(){return C},g$:function(){return b},g3:function(){return v},kD:function(){return h},kq:function(){return u},mE:function(){return w},oN:function(){return l},oh:function(){return p},or:function(){return S},pi:function(){return i},qR:function(){return A},qw:function(){return r},wL:function(){return x}});var g=1e-6,C=1e-12,i=Math.PI,S=i/2,x=i/4,h=i*2,p=180/i,r=i/180,e=Math.abs,a=Math.atan,n=Math.atan2,f=Math.cos,c=Math.ceil,l=Math.exp,m=Math.log,v=Math.pow,b=Math.sin,u=Math.sign||function(y){return y>0?1:y<0?-1:0},o=Math.sqrt,d=Math.tan;function w(y){return y>1?0:y<-1?i:Math.acos(y)}function A(y){return y>1?S:y<-1?-S:Math.asin(y)}function _(y){return(y=b(y/2))*y}},70932:function(G,U,t){t.d(U,{c:function(){return g}});function g(){}},73784:function(G,U,t){var g=t(70932),C=1/0,i=C,S=-C,x=S,h={point:p,lineStart:g.c,lineEnd:g.c,polygonStart:g.c,polygonEnd:g.c,result:function(){var r=[[C,i],[S,x]];return S=x=-(i=C=1/0),r}};function p(r,e){rS&&(S=r),ex&&(x=e)}U.c=h},41860:function(G,U,t){t.d(U,{c:function(){return C}});var g=t(64528);function C(i,S){return(0,g.a2)(i[0]-S[0])=0?1:-1,N=D*z,I=N>i.pi,k=A*L;if(S.add((0,i.WE)(k*D*(0,i.g$)(N),_*M+k*(0,i.W8)(N))),c+=I?z+D*i.kD:z,I^d>=e^T>=e){var B=(0,C.CW)((0,C.ux)(o),(0,C.ux)(E));(0,C.cJ)(B);var O=(0,C.CW)(f,B);(0,C.cJ)(O);var H=(I^z>=0?-1:1)*(0,i.qR)(O[2]);(a>H||a===H&&(B[0]||B[1]))&&(l+=I^z>=0?1:-1)}}return(c<-i.Gg||c4*_&&H--){var ut=L+k,J=M+B,X=z+O,tt=(0,h._I)(ut*ut+J*J+X*X),V=(0,h.qR)(X/=tt),Q=(0,h.a2)((0,h.a2)(X)-1)_||(0,h.a2)((j*st+et*nt)/it-.5)>.3||L*k+M*B+z*O2?ct[2]%360*h.qw:0,st()):[M*h.oh,z*h.oh,D*h.oh]},$.angle=function(ct){return arguments.length?(I=ct%360*h.qw,st()):I*h.oh},$.reflectX=function(ct){return arguments.length?(k=ct?-1:1,st()):k<0},$.reflectY=function(ct){return arguments.length?(B=ct?-1:1,st()):B<0},$.precision=function(ct){return arguments.length?(X=c(tt,J=ct*ct),nt()):(0,h._I)(J)},$.fitExtent=function(ct,gt){return(0,e.QX)($,ct,gt)},$.fitSize=function(ct,gt){return(0,e.UV)($,ct,gt)},$.fitWidth=function(ct,gt){return(0,e.Qx)($,ct,gt)},$.fitHeight=function(ct,gt){return(0,e.OW)($,ct,gt)};function st(){var ct=o(y,0,0,k,B,I).apply(null,_(s,L)),gt=(I?o:u)(y,E-ct[0],T-ct[1],k,B,I);return N=(0,p.O)(M,z,D),tt=(0,S.c)(_,gt),V=(0,S.c)(N,tt),X=c(tt,J),nt()}function nt(){return Q=ot=null,$}return function(){return _=A.apply(this,arguments),$.invert=_.invert&&Z,st()}}},47984:function(G,U,t){t.d(U,{c:function(){return S},g:function(){return i}});var g=t(87952),C=t(64528);function i(x,h){var p=h*h,r=p*p;return[x*(.8707-.131979*p+r*(-.013791+r*(.003971*p-.001529*r))),h*(1.007226+p*(.015085+r*(-.044475+.028874*p-.005916*r)))]}i.invert=function(x,h){var p=h,r=25,e;do{var a=p*p,n=a*a;p-=e=(p*(1.007226+a*(.015085+n*(-.044475+.028874*a-.005916*n)))-h)/(1.007226+a*(.045255+n*(-.311325+.259866*a-.06507600000000001*n)))}while((0,C.a2)(e)>C.Gg&&--r>0);return[x/(.8707+(a=p*p)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),p]};function S(){return(0,g.c)(i).scale(175.295)}},4888:function(G,U,t){t.d(U,{c:function(){return x},t:function(){return S}});var g=t(64528),C=t(62280),i=t(87952);function S(h,p){return[(0,g.W8)(p)*(0,g.g$)(h),(0,g.g$)(p)]}S.invert=(0,C.g)(g.qR);function x(){return(0,i.c)(S).scale(249.5).clipAngle(90+g.Gg)}},92992:function(G,U,t){t.d(U,{O:function(){return S},c:function(){return r}});var g=t(68120),C=t(64528);function i(e,a){return[(0,C.a2)(e)>C.pi?e+Math.round(-e/C.kD)*C.kD:e,a]}i.invert=i;function S(e,a,n){return(e%=C.kD)?a||n?(0,g.c)(h(e),p(a,n)):h(e):a||n?p(a,n):i}function x(e){return function(a,n){return a+=e,[a>C.pi?a-C.kD:a<-C.pi?a+C.kD:a,n]}}function h(e){var a=x(e);return a.invert=x(-e),a}function p(e,a){var n=(0,C.W8)(e),f=(0,C.g$)(e),c=(0,C.W8)(a),l=(0,C.g$)(a);function m(v,b){var u=(0,C.W8)(b),o=(0,C.W8)(v)*u,d=(0,C.g$)(v)*u,w=(0,C.g$)(b),A=w*n+o*f;return[(0,C.WE)(d*c-A*l,o*n-w*f),(0,C.qR)(A*c+d*l)]}return m.invert=function(v,b){var u=(0,C.W8)(b),o=(0,C.W8)(v)*u,d=(0,C.g$)(v)*u,w=(0,C.g$)(b),A=w*c-d*l;return[(0,C.WE)(d*c+w*l,o*n+A*f),(0,C.qR)(A*n-o*f)]},m}function r(e){e=S(e[0]*C.qw,e[1]*C.qw,e.length>2?e[2]*C.qw:0);function a(n){return n=e(n[0]*C.qw,n[1]*C.qw),n[0]*=C.oh,n[1]*=C.oh,n}return a.invert=function(n){return n=e.invert(n[0]*C.qw,n[1]*C.qw),n[0]*=C.oh,n[1]*=C.oh,n},a}},16016:function(G,U,t){t.d(U,{c:function(){return h}});function g(p,r){p&&i.hasOwnProperty(p.type)&&i[p.type](p,r)}var C={Feature:function(p,r){g(p.geometry,r)},FeatureCollection:function(p,r){for(var e=p.features,a=-1,n=e.length;++a=0;)xt+=yt[Et].value;Ft.value=xt}function a(){return this.eachAfter(e)}function n(Ft){var xt=this,yt,Et=[xt],Mt,Nt,jt;do for(yt=Et.reverse(),Et=[];xt=yt.pop();)if(Ft(xt),Mt=xt.children,Mt)for(Nt=0,jt=Mt.length;Nt=0;--Mt)yt.push(Et[Mt]);return this}function c(Ft){for(var xt=this,yt=[xt],Et=[],Mt,Nt,jt;xt=yt.pop();)if(Et.push(xt),Mt=xt.children,Mt)for(Nt=0,jt=Mt.length;Nt=0;)yt+=Et[Mt].value;xt.value=yt})}function m(Ft){return this.eachBefore(function(xt){xt.children&&xt.children.sort(Ft)})}function v(Ft){for(var xt=this,yt=b(xt,Ft),Et=[xt];xt!==yt;)xt=xt.parent,Et.push(xt);for(var Mt=Et.length;Ft!==yt;)Et.splice(Mt,0,Ft),Ft=Ft.parent;return Et}function b(Ft,xt){if(Ft===xt)return Ft;var yt=Ft.ancestors(),Et=xt.ancestors(),Mt=null;for(Ft=yt.pop(),xt=Et.pop();Ft===xt;)Mt=Ft,Ft=yt.pop(),xt=Et.pop();return Mt}function u(){for(var Ft=this,xt=[Ft];Ft=Ft.parent;)xt.push(Ft);return xt}function o(){var Ft=[];return this.each(function(xt){Ft.push(xt)}),Ft}function d(){var Ft=[];return this.eachBefore(function(xt){xt.children||Ft.push(xt)}),Ft}function w(){var Ft=this,xt=[];return Ft.each(function(yt){yt!==Ft&&xt.push({source:yt.parent,target:yt})}),xt}function A(Ft,xt){var yt=new s(Ft),Et=+Ft.value&&(yt.value=Ft.value),Mt,Nt=[yt],jt,ie,me,be;for(xt==null&&(xt=y);Mt=Nt.pop();)if(Et&&(Mt.value=+Mt.data.value),(ie=xt(Mt.data))&&(be=ie.length))for(Mt.children=new Array(be),me=be-1;me>=0;--me)Nt.push(jt=Mt.children[me]=new s(ie[me])),jt.parent=Mt,jt.depth=Mt.depth+1;return yt.eachBefore(T)}function _(){return A(this).eachBefore(E)}function y(Ft){return Ft.children}function E(Ft){Ft.data=Ft.data.data}function T(Ft){var xt=0;do Ft.height=xt;while((Ft=Ft.parent)&&Ft.height<++xt)}function s(Ft){this.data=Ft,this.depth=this.height=0,this.parent=null}s.prototype=A.prototype={constructor:s,count:a,each:n,eachAfter:c,eachBefore:f,sum:l,sort:m,path:v,ancestors:u,descendants:o,leaves:d,links:w,copy:_};var L=Array.prototype.slice;function M(Ft){for(var xt=Ft.length,yt,Et;xt;)Et=Math.random()*xt--|0,yt=Ft[xt],Ft[xt]=Ft[Et],Ft[Et]=yt;return Ft}function z(Ft){for(var xt=0,yt=(Ft=M(L.call(Ft))).length,Et=[],Mt,Nt;xt0&&yt*yt>Et*Et+Mt*Mt}function k(Ft,xt){for(var yt=0;ytme?(Mt=(be+me-Nt)/(2*be),ie=Math.sqrt(Math.max(0,me/be-Mt*Mt)),yt.x=Ft.x-Mt*Et-ie*jt,yt.y=Ft.y-Mt*jt+ie*Et):(Mt=(be+Nt-me)/(2*be),ie=Math.sqrt(Math.max(0,Nt/be-Mt*Mt)),yt.x=xt.x+Mt*Et-ie*jt,yt.y=xt.y+Mt*jt+ie*Et)):(yt.x=xt.x+yt.r,yt.y=xt.y)}function et(Ft,xt){var yt=Ft.r+xt.r-1e-6,Et=xt.x-Ft.x,Mt=xt.y-Ft.y;return yt>0&&yt*yt>Et*Et+Mt*Mt}function it(Ft){var xt=Ft._,yt=Ft.next._,Et=xt.r+yt.r,Mt=(xt.x*yt.r+yt.x*xt.r)/Et,Nt=(xt.y*yt.r+yt.y*xt.r)/Et;return Mt*Mt+Nt*Nt}function ut(Ft){this._=Ft,this.next=null,this.previous=null}function J(Ft){if(!(Mt=Ft.length))return 0;var xt,yt,Et,Mt,Nt,jt,ie,me,be,ve,Le;if(xt=Ft[0],xt.x=0,xt.y=0,!(Mt>1))return xt.r;if(yt=Ft[1],xt.x=-yt.r,yt.x=xt.r,yt.y=0,!(Mt>2))return xt.r+yt.r;j(yt,xt,Et=Ft[2]),xt=new ut(xt),yt=new ut(yt),Et=new ut(Et),xt.next=Et.previous=yt,yt.next=xt.previous=Et,Et.next=yt.previous=xt;t:for(ie=3;ie0)throw new Error("cycle");return ie}return yt.id=function(Et){return arguments.length?(Ft=V(Et),yt):Ft},yt.parentId=function(Et){return arguments.length?(xt=V(Et),yt):xt},yt}function Ut(Ft,xt){return Ft.parent===xt.parent?1:2}function kt(Ft){var xt=Ft.children;return xt?xt[0]:Ft.t}function Vt(Ft){var xt=Ft.children;return xt?xt[xt.length-1]:Ft.t}function It(Ft,xt,yt){var Et=yt/(xt.i-Ft.i);xt.c-=Et,xt.s+=yt,Ft.c+=Et,xt.z+=yt,xt.m+=yt}function re(Ft){for(var xt=0,yt=0,Et=Ft.children,Mt=Et.length,Nt;--Mt>=0;)Nt=Et[Mt],Nt.z+=xt,Nt.m+=xt,xt+=Nt.s+(yt+=Nt.c)}function Kt(Ft,xt,yt){return Ft.a.parent===xt.parent?Ft.a:yt}function $t(Ft,xt){this._=Ft,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=xt}$t.prototype=Object.create(s.prototype);function le(Ft){for(var xt=new $t(Ft,0),yt,Et=[xt],Mt,Nt,jt,ie;yt=Et.pop();)if(Nt=yt._.children)for(yt.children=new Array(ie=Nt.length),jt=ie-1;jt>=0;--jt)Et.push(Mt=yt.children[jt]=new $t(Nt[jt],jt)),Mt.parent=yt;return(xt.parent=new $t(null,0)).children=[xt],xt}function he(){var Ft=Ut,xt=1,yt=1,Et=null;function Mt(be){var ve=le(be);if(ve.eachAfter(Nt),ve.parent.m=-ve.z,ve.eachBefore(jt),Et)be.eachBefore(me);else{var Le=be,ce=be,Te=be;be.eachBefore(function(Ke){Ke.xce.x&&(ce=Ke),Ke.depth>Te.depth&&(Te=Ke)});var Be=Le===ce?1:Ft(Le,ce)/2,ir=Be-Le.x,pe=xt/(ce.x+Be+ir),Xe=yt/(Te.depth||1);be.eachBefore(function(Ke){Ke.x=(Ke.x+ir)*pe,Ke.y=Ke.depth*Xe})}return be}function Nt(be){var ve=be.children,Le=be.parent.children,ce=be.i?Le[be.i-1]:null;if(ve){re(be);var Te=(ve[0].z+ve[ve.length-1].z)/2;ce?(be.z=ce.z+Ft(be._,ce._),be.m=be.z-Te):be.z=Te}else ce&&(be.z=ce.z+Ft(be._,ce._));be.parent.A=ie(be,ce,be.parent.A||Le[0])}function jt(be){be._.x=be.z+be.parent.m,be.m+=be.parent.m}function ie(be,ve,Le){if(ve){for(var ce=be,Te=be,Be=ve,ir=ce.parent.children[0],pe=ce.m,Xe=Te.m,Ke=Be.m,or=ir.m,$e;Be=Vt(Be),ce=kt(ce),Be&&ce;)ir=kt(ir),Te=Vt(Te),Te.a=be,$e=Be.z+Ke-ce.z-pe+Ft(Be._,ce._),$e>0&&(It(Kt(Be,be,Le),be,$e),pe+=$e,Xe+=$e),Ke+=Be.m,pe+=ce.m,or+=ir.m,Xe+=Te.m;Be&&!Vt(Te)&&(Te.t=Be,Te.m+=Ke-Xe),ce&&!kt(ir)&&(ir.t=ce,ir.m+=pe-or,Le=be)}return Le}function me(be){be.x*=xt,be.y=be.depth*yt}return Mt.separation=function(be){return arguments.length?(Ft=be,Mt):Ft},Mt.size=function(be){return arguments.length?(Et=!1,xt=+be[0],yt=+be[1],Mt):Et?null:[xt,yt]},Mt.nodeSize=function(be){return arguments.length?(Et=!0,xt=+be[0],yt=+be[1],Mt):Et?[xt,yt]:null},Mt}function de(Ft,xt,yt,Et,Mt){for(var Nt=Ft.children,jt,ie=-1,me=Nt.length,be=Ft.value&&(Mt-yt)/Ft.value;++ieKe&&(Ke=be),se=pe*pe*ge,or=Math.max(Ke/se,se/Xe),or>$e){pe-=be;break}$e=or}jt.push(me={value:pe,dice:Te1?Et:1)},yt}(xe);function zt(){var Ft=ne,xt=!1,yt=1,Et=1,Mt=[0],Nt=Q,jt=Q,ie=Q,me=Q,be=Q;function ve(ce){return ce.x0=ce.y0=0,ce.x1=yt,ce.y1=Et,ce.eachBefore(Le),Mt=[0],xt&&ce.eachBefore(gt),ce}function Le(ce){var Te=Mt[ce.depth],Be=ce.x0+Te,ir=ce.y0+Te,pe=ce.x1-Te,Xe=ce.y1-Te;pe=ce-1){var Ke=Nt[Le];Ke.x0=Be,Ke.y0=ir,Ke.x1=pe,Ke.y1=Xe;return}for(var or=be[Le],$e=Te/2+or,ge=Le+1,se=ce-1;ge>>1;be[Ae]<$e?ge=Ae+1:se=Ae}$e-be[ge-1]Xe-ir){var Pe=(Be*Ie+pe*Ce)/Te;ve(Le,ge,Ce,Be,ir,Pe,Xe),ve(ge,ce,Ie,Pe,ir,pe,Xe)}else{var ke=(ir*Ie+Xe*Ce)/Te;ve(Le,ge,Ce,Be,ir,pe,ke),ve(ge,ce,Ie,Be,ke,pe,Xe)}}}function Jt(Ft,xt,yt,Et,Mt){(Ft.depth&1?de:Tt)(Ft,xt,yt,Et,Mt)}var Wt=function Ft(xt){function yt(Et,Mt,Nt,jt,ie){if((me=Et._squarify)&&me.ratio===xt)for(var me,be,ve,Le,ce=-1,Te,Be=me.length,ir=Et.value;++ce1?Et:1)},yt}(xe)},10132:function(G,U,t){t.d(U,{ak:function(){return v}});var g=Math.PI,C=2*g,i=1e-6,S=C-i;function x(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function h(){return new x}x.prototype=h.prototype={constructor:x,moveTo:function(b,u){this._+="M"+(this._x0=this._x1=+b)+","+(this._y0=this._y1=+u)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(b,u){this._+="L"+(this._x1=+b)+","+(this._y1=+u)},quadraticCurveTo:function(b,u,o,d){this._+="Q"+ +b+","+ +u+","+(this._x1=+o)+","+(this._y1=+d)},bezierCurveTo:function(b,u,o,d,w,A){this._+="C"+ +b+","+ +u+","+ +o+","+ +d+","+(this._x1=+w)+","+(this._y1=+A)},arcTo:function(b,u,o,d,w){b=+b,u=+u,o=+o,d=+d,w=+w;var A=this._x1,_=this._y1,y=o-b,E=d-u,T=A-b,s=_-u,L=T*T+s*s;if(w<0)throw new Error("negative radius: "+w);if(this._x1===null)this._+="M"+(this._x1=b)+","+(this._y1=u);else if(L>i)if(!(Math.abs(s*y-E*T)>i)||!w)this._+="L"+(this._x1=b)+","+(this._y1=u);else{var M=o-A,z=d-_,D=y*y+E*E,N=M*M+z*z,I=Math.sqrt(D),k=Math.sqrt(L),B=w*Math.tan((g-Math.acos((D+L-N)/(2*I*k)))/2),O=B/k,H=B/I;Math.abs(O-1)>i&&(this._+="L"+(b+O*T)+","+(u+O*s)),this._+="A"+w+","+w+",0,0,"+ +(s*M>T*z)+","+(this._x1=b+H*y)+","+(this._y1=u+H*E)}},arc:function(b,u,o,d,w,A){b=+b,u=+u,o=+o,A=!!A;var _=o*Math.cos(d),y=o*Math.sin(d),E=b+_,T=u+y,s=1^A,L=A?d-w:w-d;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+E+","+T:(Math.abs(this._x1-E)>i||Math.abs(this._y1-T)>i)&&(this._+="L"+E+","+T),o&&(L<0&&(L=L%C+C),L>S?this._+="A"+o+","+o+",0,1,"+s+","+(b-_)+","+(u-y)+"A"+o+","+o+",0,1,"+s+","+(this._x1=E)+","+(this._y1=T):L>i&&(this._+="A"+o+","+o+",0,"+ +(L>=g)+","+s+","+(this._x1=b+o*Math.cos(w))+","+(this._y1=u+o*Math.sin(w))))},rect:function(b,u,o,d){this._+="M"+(this._x0=this._x1=+b)+","+(this._y0=this._y1=+u)+"h"+ +o+"v"+ +d+"h"+-o+"Z"},toString:function(){return this._}};var p=h,r=Array.prototype.slice;function e(b){return function(){return b}}function a(b){return b[0]}function n(b){return b[1]}function f(b){return b.source}function c(b){return b.target}function l(b){var u=f,o=c,d=a,w=n,A=null;function _(){var y,E=r.call(arguments),T=u.apply(this,E),s=o.apply(this,E);if(A||(A=y=p()),b(A,+d.apply(this,(E[0]=T,E)),+w.apply(this,E),+d.apply(this,(E[0]=s,E)),+w.apply(this,E)),y)return A=null,y+""||null}return _.source=function(y){return arguments.length?(u=y,_):u},_.target=function(y){return arguments.length?(o=y,_):o},_.x=function(y){return arguments.length?(d=typeof y=="function"?y:e(+y),_):d},_.y=function(y){return arguments.length?(w=typeof y=="function"?y:e(+y),_):w},_.context=function(y){return arguments.length?(A=y??null,_):A},_}function m(b,u,o,d,w){b.moveTo(u,o),b.bezierCurveTo(u=(u+d)/2,o,u,w,d,w)}function v(){return l(m)}},94336:function(G,U,t){t.d(U,{Yn:function(){return Xt},m_:function(){return a},E9:function(){return Jt}});var g=t(8208),C=t(58931),i=t(46192),S=t(68936),x=t(32171),h=t(53528);function p(Ft){if(0<=Ft.y&&Ft.y<100){var xt=new Date(-1,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L);return xt.setFullYear(Ft.y),xt}return new Date(Ft.y,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L)}function r(Ft){if(0<=Ft.y&&Ft.y<100){var xt=new Date(Date.UTC(-1,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L));return xt.setUTCFullYear(Ft.y),xt}return new Date(Date.UTC(Ft.y,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L))}function e(Ft,xt,yt){return{y:Ft,m:xt,d:yt,H:0,M:0,S:0,L:0}}function a(Ft){var xt=Ft.dateTime,yt=Ft.date,Et=Ft.time,Mt=Ft.periods,Nt=Ft.days,jt=Ft.shortDays,ie=Ft.months,me=Ft.shortMonths,be=b(Mt),ve=u(Mt),Le=b(Nt),ce=u(Nt),Te=b(jt),Be=u(jt),ir=b(ie),pe=u(ie),Xe=b(me),Ke=u(me),or={a:Yt,A:Gt,b:Ne,B:Oe,c:null,d:j,e:j,f:X,H:et,I:it,j:ut,L:J,m:tt,M:V,p:Qe,q:er,Q:Se,s:ne,S:Q,u:ot,U:$,V:Z,w:st,W:nt,x:null,X:null,y:ct,Y:gt,Z:Tt,"%":xe},$e={a:fr,A:rr,b:He,B:dr,c:null,d:wt,e:wt,f:Lt,H:Rt,I:bt,j:At,L:mt,m:Ht,M:Ut,p:mr,q:xr,Q:Se,s:ne,S:kt,u:Vt,U:It,V:re,w:Kt,W:$t,x:null,X:null,y:le,Y:he,Z:de,"%":xe},ge={a:Pe,A:ke,b:Ve,B:Je,c:ur,d:M,e:M,f:B,H:D,I:D,j:z,L:k,m:L,M:N,p:Ie,q:s,Q:H,s:Y,S:I,u:d,U:w,V:A,w:o,W:_,x:hr,X:vr,y:E,Y:y,Z:T,"%":O};or.x=se(yt,or),or.X=se(Et,or),or.c=se(xt,or),$e.x=se(yt,$e),$e.X=se(Et,$e),$e.c=se(xt,$e);function se(pr,Gr){return function(Pr){var Dr=[],cn=-1,rn=0,Cn=pr.length,En,Tr,Cr;for(Pr instanceof Date||(Pr=new Date(+Pr));++cn53)return null;"w"in Dr||(Dr.w=1),"Z"in Dr?(rn=r(e(Dr.y,0,1)),Cn=rn.getUTCDay(),rn=Cn>4||Cn===0?g.ot.ceil(rn):(0,g.ot)(rn),rn=C.c.offset(rn,(Dr.V-1)*7),Dr.y=rn.getUTCFullYear(),Dr.m=rn.getUTCMonth(),Dr.d=rn.getUTCDate()+(Dr.w+6)%7):(rn=p(e(Dr.y,0,1)),Cn=rn.getDay(),rn=Cn>4||Cn===0?i.qT.ceil(rn):(0,i.qT)(rn),rn=S.c.offset(rn,(Dr.V-1)*7),Dr.y=rn.getFullYear(),Dr.m=rn.getMonth(),Dr.d=rn.getDate()+(Dr.w+6)%7)}else("W"in Dr||"U"in Dr)&&("w"in Dr||(Dr.w="u"in Dr?Dr.u%7:"W"in Dr?1:0),Cn="Z"in Dr?r(e(Dr.y,0,1)).getUTCDay():p(e(Dr.y,0,1)).getDay(),Dr.m=0,Dr.d="W"in Dr?(Dr.w+6)%7+Dr.W*7-(Cn+5)%7:Dr.w+Dr.U*7-(Cn+6)%7);return"Z"in Dr?(Dr.H+=Dr.Z/100|0,Dr.M+=Dr.Z%100,r(Dr)):p(Dr)}}function Ce(pr,Gr,Pr,Dr){for(var cn=0,rn=Gr.length,Cn=Pr.length,En,Tr;cn=Cn)return-1;if(En=Gr.charCodeAt(cn++),En===37){if(En=Gr.charAt(cn++),Tr=ge[En in n?Gr.charAt(cn++):En],!Tr||(Dr=Tr(pr,Pr,Dr))<0)return-1}else if(En!=Pr.charCodeAt(Dr++))return-1}return Dr}function Ie(pr,Gr,Pr){var Dr=be.exec(Gr.slice(Pr));return Dr?(pr.p=ve[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Pe(pr,Gr,Pr){var Dr=Te.exec(Gr.slice(Pr));return Dr?(pr.w=Be[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function ke(pr,Gr,Pr){var Dr=Le.exec(Gr.slice(Pr));return Dr?(pr.w=ce[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Ve(pr,Gr,Pr){var Dr=Xe.exec(Gr.slice(Pr));return Dr?(pr.m=Ke[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Je(pr,Gr,Pr){var Dr=ir.exec(Gr.slice(Pr));return Dr?(pr.m=pe[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function ur(pr,Gr,Pr){return Ce(pr,xt,Gr,Pr)}function hr(pr,Gr,Pr){return Ce(pr,yt,Gr,Pr)}function vr(pr,Gr,Pr){return Ce(pr,Et,Gr,Pr)}function Yt(pr){return jt[pr.getDay()]}function Gt(pr){return Nt[pr.getDay()]}function Ne(pr){return me[pr.getMonth()]}function Oe(pr){return ie[pr.getMonth()]}function Qe(pr){return Mt[+(pr.getHours()>=12)]}function er(pr){return 1+~~(pr.getMonth()/3)}function fr(pr){return jt[pr.getUTCDay()]}function rr(pr){return Nt[pr.getUTCDay()]}function He(pr){return me[pr.getUTCMonth()]}function dr(pr){return ie[pr.getUTCMonth()]}function mr(pr){return Mt[+(pr.getUTCHours()>=12)]}function xr(pr){return 1+~~(pr.getUTCMonth()/3)}return{format:function(pr){var Gr=se(pr+="",or);return Gr.toString=function(){return pr},Gr},parse:function(pr){var Gr=Ae(pr+="",!1);return Gr.toString=function(){return pr},Gr},utcFormat:function(pr){var Gr=se(pr+="",$e);return Gr.toString=function(){return pr},Gr},utcParse:function(pr){var Gr=Ae(pr+="",!0);return Gr.toString=function(){return pr},Gr}}}var n={"-":"",_:" ",0:"0"},f=/^\s*\d+/,c=/^%/,l=/[\\^$*+?|[\]().{}]/g;function m(Ft,xt,yt){var Et=Ft<0?"-":"",Mt=(Et?-Ft:Ft)+"",Nt=Mt.length;return Et+(Nt68?1900:2e3),yt+Et[0].length):-1}function T(Ft,xt,yt){var Et=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(xt.slice(yt,yt+6));return Et?(Ft.Z=Et[1]?0:-(Et[2]+(Et[3]||"00")),yt+Et[0].length):-1}function s(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+1));return Et?(Ft.q=Et[0]*3-3,yt+Et[0].length):-1}function L(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.m=Et[0]-1,yt+Et[0].length):-1}function M(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.d=+Et[0],yt+Et[0].length):-1}function z(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+3));return Et?(Ft.m=0,Ft.d=+Et[0],yt+Et[0].length):-1}function D(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.H=+Et[0],yt+Et[0].length):-1}function N(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.M=+Et[0],yt+Et[0].length):-1}function I(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.S=+Et[0],yt+Et[0].length):-1}function k(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+3));return Et?(Ft.L=+Et[0],yt+Et[0].length):-1}function B(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+6));return Et?(Ft.L=Math.floor(Et[0]/1e3),yt+Et[0].length):-1}function O(Ft,xt,yt){var Et=c.exec(xt.slice(yt,yt+1));return Et?yt+Et[0].length:-1}function H(Ft,xt,yt){var Et=f.exec(xt.slice(yt));return Et?(Ft.Q=+Et[0],yt+Et[0].length):-1}function Y(Ft,xt,yt){var Et=f.exec(xt.slice(yt));return Et?(Ft.s=+Et[0],yt+Et[0].length):-1}function j(Ft,xt){return m(Ft.getDate(),xt,2)}function et(Ft,xt){return m(Ft.getHours(),xt,2)}function it(Ft,xt){return m(Ft.getHours()%12||12,xt,2)}function ut(Ft,xt){return m(1+S.c.count((0,x.c)(Ft),Ft),xt,3)}function J(Ft,xt){return m(Ft.getMilliseconds(),xt,3)}function X(Ft,xt){return J(Ft,xt)+"000"}function tt(Ft,xt){return m(Ft.getMonth()+1,xt,2)}function V(Ft,xt){return m(Ft.getMinutes(),xt,2)}function Q(Ft,xt){return m(Ft.getSeconds(),xt,2)}function ot(Ft){var xt=Ft.getDay();return xt===0?7:xt}function $(Ft,xt){return m(i.uU.count((0,x.c)(Ft)-1,Ft),xt,2)}function Z(Ft,xt){var yt=Ft.getDay();return Ft=yt>=4||yt===0?(0,i.kD)(Ft):i.kD.ceil(Ft),m(i.kD.count((0,x.c)(Ft),Ft)+((0,x.c)(Ft).getDay()===4),xt,2)}function st(Ft){return Ft.getDay()}function nt(Ft,xt){return m(i.qT.count((0,x.c)(Ft)-1,Ft),xt,2)}function ct(Ft,xt){return m(Ft.getFullYear()%100,xt,2)}function gt(Ft,xt){return m(Ft.getFullYear()%1e4,xt,4)}function Tt(Ft){var xt=Ft.getTimezoneOffset();return(xt>0?"-":(xt*=-1,"+"))+m(xt/60|0,"0",2)+m(xt%60,"0",2)}function wt(Ft,xt){return m(Ft.getUTCDate(),xt,2)}function Rt(Ft,xt){return m(Ft.getUTCHours(),xt,2)}function bt(Ft,xt){return m(Ft.getUTCHours()%12||12,xt,2)}function At(Ft,xt){return m(1+C.c.count((0,h.c)(Ft),Ft),xt,3)}function mt(Ft,xt){return m(Ft.getUTCMilliseconds(),xt,3)}function Lt(Ft,xt){return mt(Ft,xt)+"000"}function Ht(Ft,xt){return m(Ft.getUTCMonth()+1,xt,2)}function Ut(Ft,xt){return m(Ft.getUTCMinutes(),xt,2)}function kt(Ft,xt){return m(Ft.getUTCSeconds(),xt,2)}function Vt(Ft){var xt=Ft.getUTCDay();return xt===0?7:xt}function It(Ft,xt){return m(g.EV.count((0,h.c)(Ft)-1,Ft),xt,2)}function re(Ft,xt){var yt=Ft.getUTCDay();return Ft=yt>=4||yt===0?(0,g.yA)(Ft):g.yA.ceil(Ft),m(g.yA.count((0,h.c)(Ft),Ft)+((0,h.c)(Ft).getUTCDay()===4),xt,2)}function Kt(Ft){return Ft.getUTCDay()}function $t(Ft,xt){return m(g.ot.count((0,h.c)(Ft)-1,Ft),xt,2)}function le(Ft,xt){return m(Ft.getUTCFullYear()%100,xt,2)}function he(Ft,xt){return m(Ft.getUTCFullYear()%1e4,xt,4)}function de(){return"+0000"}function xe(){return"%"}function Se(Ft){return+Ft}function ne(Ft){return Math.floor(+Ft/1e3)}var zt,Xt,Jt;Wt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Wt(Ft){return zt=a(Ft),Xt=zt.format,zt.parse,Jt=zt.utcFormat,zt.utcParse,zt}},68936:function(G,U,t){t.d(U,{m:function(){return S}});var g=t(81628),C=t(69792),i=(0,g.c)(function(x){x.setHours(0,0,0,0)},function(x,h){x.setDate(x.getDate()+h)},function(x,h){return(h-x-(h.getTimezoneOffset()-x.getTimezoneOffset())*C.iy)/C.SK},function(x){return x.getDate()-1});U.c=i;var S=i.range},69792:function(G,U,t){t.d(U,{KK:function(){return x},SK:function(){return S},cg:function(){return i},iy:function(){return C},yc:function(){return g}});var g=1e3,C=6e4,i=36e5,S=864e5,x=6048e5},73220:function(G,U,t){t.r(U),t.d(U,{timeDay:function(){return m.c},timeDays:function(){return m.m},timeFriday:function(){return v.iB},timeFridays:function(){return v.sJ},timeHour:function(){return c},timeHours:function(){return l},timeInterval:function(){return g.c},timeMillisecond:function(){return i},timeMilliseconds:function(){return S},timeMinute:function(){return a},timeMinutes:function(){return n},timeMonday:function(){return v.qT},timeMondays:function(){return v.QP},timeMonth:function(){return u},timeMonths:function(){return o},timeSaturday:function(){return v.Wc},timeSaturdays:function(){return v.aI},timeSecond:function(){return p},timeSeconds:function(){return r},timeSunday:function(){return v.uU},timeSundays:function(){return v.Ab},timeThursday:function(){return v.kD},timeThursdays:function(){return v.eC},timeTuesday:function(){return v.Mf},timeTuesdays:function(){return v.Oc},timeWednesday:function(){return v.eg},timeWednesdays:function(){return v.sn},timeWeek:function(){return v.uU},timeWeeks:function(){return v.Ab},timeYear:function(){return d.c},timeYears:function(){return d.Q},utcDay:function(){return s.c},utcDays:function(){return s.o},utcFriday:function(){return L.od},utcFridays:function(){return L.iG},utcHour:function(){return E},utcHours:function(){return T},utcMillisecond:function(){return i},utcMilliseconds:function(){return S},utcMinute:function(){return A},utcMinutes:function(){return _},utcMonday:function(){return L.ot},utcMondays:function(){return L.iO},utcMonth:function(){return z},utcMonths:function(){return D},utcSaturday:function(){return L.Ad},utcSaturdays:function(){return L.K8},utcSecond:function(){return p},utcSeconds:function(){return r},utcSunday:function(){return L.EV},utcSundays:function(){return L.Wq},utcThursday:function(){return L.yA},utcThursdays:function(){return L.ob},utcTuesday:function(){return L.sG},utcTuesdays:function(){return L.kl},utcWednesday:function(){return L._6},utcWednesdays:function(){return L.W_},utcWeek:function(){return L.EV},utcWeeks:function(){return L.Wq},utcYear:function(){return N.c},utcYears:function(){return N.i}});var g=t(81628),C=(0,g.c)(function(){},function(I,k){I.setTime(+I+k)},function(I,k){return k-I});C.every=function(I){return I=Math.floor(I),!isFinite(I)||!(I>0)?null:I>1?(0,g.c)(function(k){k.setTime(Math.floor(k/I)*I)},function(k,B){k.setTime(+k+B*I)},function(k,B){return(B-k)/I}):C};var i=C,S=C.range,x=t(69792),h=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds())},function(I,k){I.setTime(+I+k*x.yc)},function(I,k){return(k-I)/x.yc},function(I){return I.getUTCSeconds()}),p=h,r=h.range,e=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds()-I.getSeconds()*x.yc)},function(I,k){I.setTime(+I+k*x.iy)},function(I,k){return(k-I)/x.iy},function(I){return I.getMinutes()}),a=e,n=e.range,f=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds()-I.getSeconds()*x.yc-I.getMinutes()*x.iy)},function(I,k){I.setTime(+I+k*x.cg)},function(I,k){return(k-I)/x.cg},function(I){return I.getHours()}),c=f,l=f.range,m=t(68936),v=t(46192),b=(0,g.c)(function(I){I.setDate(1),I.setHours(0,0,0,0)},function(I,k){I.setMonth(I.getMonth()+k)},function(I,k){return k.getMonth()-I.getMonth()+(k.getFullYear()-I.getFullYear())*12},function(I){return I.getMonth()}),u=b,o=b.range,d=t(32171),w=(0,g.c)(function(I){I.setUTCSeconds(0,0)},function(I,k){I.setTime(+I+k*x.iy)},function(I,k){return(k-I)/x.iy},function(I){return I.getUTCMinutes()}),A=w,_=w.range,y=(0,g.c)(function(I){I.setUTCMinutes(0,0,0)},function(I,k){I.setTime(+I+k*x.cg)},function(I,k){return(k-I)/x.cg},function(I){return I.getUTCHours()}),E=y,T=y.range,s=t(58931),L=t(8208),M=(0,g.c)(function(I){I.setUTCDate(1),I.setUTCHours(0,0,0,0)},function(I,k){I.setUTCMonth(I.getUTCMonth()+k)},function(I,k){return k.getUTCMonth()-I.getUTCMonth()+(k.getUTCFullYear()-I.getUTCFullYear())*12},function(I){return I.getUTCMonth()}),z=M,D=M.range,N=t(53528)},81628:function(G,U,t){t.d(U,{c:function(){return i}});var g=new Date,C=new Date;function i(S,x,h,p){function r(e){return S(e=arguments.length===0?new Date:new Date(+e)),e}return r.floor=function(e){return S(e=new Date(+e)),e},r.ceil=function(e){return S(e=new Date(e-1)),x(e,1),S(e),e},r.round=function(e){var a=r(e),n=r.ceil(e);return e-a0))return f;do f.push(c=new Date(+e)),x(e,n),S(e);while(c=a)for(;S(a),!e(a);)a.setTime(a-1)},function(a,n){if(a>=a)if(n<0)for(;++n<=0;)for(;x(a,-1),!e(a););else for(;--n>=0;)for(;x(a,1),!e(a););})},h&&(r.count=function(e,a){return g.setTime(+e),C.setTime(+a),S(g),S(C),Math.floor(h(g,C))},r.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?r.filter(p?function(a){return p(a)%e===0}:function(a){return r.count(0,a)%e===0}):r}),r}},58931:function(G,U,t){t.d(U,{o:function(){return S}});var g=t(81628),C=t(69792),i=(0,g.c)(function(x){x.setUTCHours(0,0,0,0)},function(x,h){x.setUTCDate(x.getUTCDate()+h)},function(x,h){return(h-x)/C.SK},function(x){return x.getUTCDate()-1});U.c=i;var S=i.range},8208:function(G,U,t){t.d(U,{Ad:function(){return a},EV:function(){return S},K8:function(){return b},W_:function(){return l},Wq:function(){return n},_6:function(){return p},iG:function(){return v},iO:function(){return f},kl:function(){return c},ob:function(){return m},od:function(){return e},ot:function(){return x},sG:function(){return h},yA:function(){return r}});var g=t(81628),C=t(69792);function i(u){return(0,g.c)(function(o){o.setUTCDate(o.getUTCDate()-(o.getUTCDay()+7-u)%7),o.setUTCHours(0,0,0,0)},function(o,d){o.setUTCDate(o.getUTCDate()+d*7)},function(o,d){return(d-o)/C.KK})}var S=i(0),x=i(1),h=i(2),p=i(3),r=i(4),e=i(5),a=i(6),n=S.range,f=x.range,c=h.range,l=p.range,m=r.range,v=e.range,b=a.range},53528:function(G,U,t){t.d(U,{i:function(){return i}});var g=t(81628),C=(0,g.c)(function(S){S.setUTCMonth(0,1),S.setUTCHours(0,0,0,0)},function(S,x){S.setUTCFullYear(S.getUTCFullYear()+x)},function(S,x){return x.getUTCFullYear()-S.getUTCFullYear()},function(S){return S.getUTCFullYear()});C.every=function(S){return!isFinite(S=Math.floor(S))||!(S>0)?null:(0,g.c)(function(x){x.setUTCFullYear(Math.floor(x.getUTCFullYear()/S)*S),x.setUTCMonth(0,1),x.setUTCHours(0,0,0,0)},function(x,h){x.setUTCFullYear(x.getUTCFullYear()+h*S)})},U.c=C;var i=C.range},46192:function(G,U,t){t.d(U,{Ab:function(){return n},Mf:function(){return h},Oc:function(){return c},QP:function(){return f},Wc:function(){return a},aI:function(){return b},eC:function(){return m},eg:function(){return p},iB:function(){return e},kD:function(){return r},qT:function(){return x},sJ:function(){return v},sn:function(){return l},uU:function(){return S}});var g=t(81628),C=t(69792);function i(u){return(0,g.c)(function(o){o.setDate(o.getDate()-(o.getDay()+7-u)%7),o.setHours(0,0,0,0)},function(o,d){o.setDate(o.getDate()+d*7)},function(o,d){return(d-o-(d.getTimezoneOffset()-o.getTimezoneOffset())*C.iy)/C.KK})}var S=i(0),x=i(1),h=i(2),p=i(3),r=i(4),e=i(5),a=i(6),n=S.range,f=x.range,c=h.range,l=p.range,m=r.range,v=e.range,b=a.range},32171:function(G,U,t){t.d(U,{Q:function(){return i}});var g=t(81628),C=(0,g.c)(function(S){S.setMonth(0,1),S.setHours(0,0,0,0)},function(S,x){S.setFullYear(S.getFullYear()+x)},function(S,x){return x.getFullYear()-S.getFullYear()},function(S){return S.getFullYear()});C.every=function(S){return!isFinite(S=Math.floor(S))||!(S>0)?null:(0,g.c)(function(x){x.setFullYear(Math.floor(x.getFullYear()/S)*S),x.setMonth(0,1),x.setHours(0,0,0,0)},function(x,h){x.setFullYear(x.getFullYear()+h*S)})},U.c=C;var i=C.range},64348:function(G,U,t){var g=t(39640)(),C=t(53664),i=g&&C("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch{i=!1}var S=C("%SyntaxError%"),x=C("%TypeError%"),h=t(2304);G.exports=function(r,e,a){if(!r||typeof r!="object"&&typeof r!="function")throw new x("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new x("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new x("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new x("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new x("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new x("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,m=!!h&&h(r,e);if(i)i(r,e,{configurable:c===null&&m?m.configurable:!c,enumerable:n===null&&m?m.enumerable:!n,value:a,writable:f===null&&m?m.writable:!f});else if(l||!n&&!f&&!c)r[e]=a;else throw new S("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}},81288:function(G,U,t){var g=t(41820),C=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",i=Object.prototype.toString,S=Array.prototype.concat,x=Object.defineProperty,h=function(n){return typeof n=="function"&&i.call(n)==="[object Function]"},p=t(39640)(),r=x&&p,e=function(n,f,c,l){if(f in n){if(l===!0){if(n[f]===c)return}else if(!h(l)||!l())return}r?x(n,f,{configurable:!0,enumerable:!1,value:c,writable:!0}):n[f]=c},a=function(n,f){var c=arguments.length>2?arguments[2]:{},l=g(f);C&&(l=S.call(l,Object.getOwnPropertySymbols(f)));for(var m=0;mr*e){var l=(c-f)/r;h[n]=l*1e3}}return h}function i(S){for(var x=[],h=S[0];h<=S[1];h++)for(var p=String.fromCharCode(h),r=S[0];r"u"&&(i=0),typeof C){case"number":if(C>0)return t(C|0,i);break;case"object":if(typeof C.length=="number")return U(C,i,0);break}return[]}G.exports=g},28912:function(G){G.exports=U,G.exports.default=U;function U(D,N,I){I=I||2;var k=N&&N.length,B=k?N[0]*I:D.length,O=t(D,0,B,I,!0),H=[];if(!O||O.next===O.prev)return H;var Y,j,et,it,ut,J,X;if(k&&(O=p(D,N,O,I)),D.length>80*I){Y=et=D[0],j=it=D[1];for(var tt=I;ttet&&(et=ut),J>it&&(it=J);X=Math.max(et-Y,it-j),X=X!==0?1/X:0}return C(O,H,I,Y,j,X),H}function t(D,N,I,k,B){var O,H;if(B===z(D,N,I,k)>0)for(O=N;O=N;O-=k)H=s(O,D[O],D[O+1],H);return H&&o(H,H.next)&&(L(H),H=H.next),H}function g(D,N){if(!D)return D;N||(N=D);var I=D,k;do if(k=!1,!I.steiner&&(o(I,I.next)||u(I.prev,I,I.next)===0)){if(L(I),I=N=I.prev,I===I.next)break;k=!0}else I=I.next;while(k||I!==N);return N}function C(D,N,I,k,B,O,H){if(D){!H&&O&&f(D,k,B,O);for(var Y=D,j,et;D.prev!==D.next;){if(j=D.prev,et=D.next,O?S(D,k,B,O):i(D)){N.push(j.i/I),N.push(D.i/I),N.push(et.i/I),L(D),D=et.next,Y=et.next;continue}if(D=et,D===Y){H?H===1?(D=x(g(D),N,I),C(D,N,I,k,B,O,2)):H===2&&h(D,N,I,k,B,O):C(g(D),N,I,k,B,O,1);break}}}}function i(D){var N=D.prev,I=D,k=D.next;if(u(N,I,k)>=0)return!1;for(var B=D.next.next;B!==D.prev;){if(v(N.x,N.y,I.x,I.y,k.x,k.y,B.x,B.y)&&u(B.prev,B,B.next)>=0)return!1;B=B.next}return!0}function S(D,N,I,k){var B=D.prev,O=D,H=D.next;if(u(B,O,H)>=0)return!1;for(var Y=B.xO.x?B.x>H.x?B.x:H.x:O.x>H.x?O.x:H.x,it=B.y>O.y?B.y>H.y?B.y:H.y:O.y>H.y?O.y:H.y,ut=l(Y,j,N,I,k),J=l(et,it,N,I,k),X=D.prevZ,tt=D.nextZ;X&&X.z>=ut&&tt&&tt.z<=J;){if(X!==D.prev&&X!==D.next&&v(B.x,B.y,O.x,O.y,H.x,H.y,X.x,X.y)&&u(X.prev,X,X.next)>=0||(X=X.prevZ,tt!==D.prev&&tt!==D.next&&v(B.x,B.y,O.x,O.y,H.x,H.y,tt.x,tt.y)&&u(tt.prev,tt,tt.next)>=0))return!1;tt=tt.nextZ}for(;X&&X.z>=ut;){if(X!==D.prev&&X!==D.next&&v(B.x,B.y,O.x,O.y,H.x,H.y,X.x,X.y)&&u(X.prev,X,X.next)>=0)return!1;X=X.prevZ}for(;tt&&tt.z<=J;){if(tt!==D.prev&&tt!==D.next&&v(B.x,B.y,O.x,O.y,H.x,H.y,tt.x,tt.y)&&u(tt.prev,tt,tt.next)>=0)return!1;tt=tt.nextZ}return!0}function x(D,N,I){var k=D;do{var B=k.prev,O=k.next.next;!o(B,O)&&d(B,k,k.next,O)&&y(B,O)&&y(O,B)&&(N.push(B.i/I),N.push(k.i/I),N.push(O.i/I),L(k),L(k.next),k=D=O),k=k.next}while(k!==D);return g(k)}function h(D,N,I,k,B,O){var H=D;do{for(var Y=H.next.next;Y!==H.prev;){if(H.i!==Y.i&&b(H,Y)){var j=T(H,Y);H=g(H,H.next),j=g(j,j.next),C(H,N,I,k,B,O),C(j,N,I,k,B,O);return}Y=Y.next}H=H.next}while(H!==D)}function p(D,N,I,k){var B=[],O,H,Y,j,et;for(O=0,H=N.length;O=I.next.y&&I.next.y!==I.y){var Y=I.x+(B-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Y<=k&&Y>O){if(O=Y,Y===k){if(B===I.y)return I;if(B===I.next.y)return I.next}H=I.x=I.x&&I.x>=et&&k!==I.x&&v(BH.x||I.x===H.x&&n(H,I)))&&(H=I,ut=J)),I=I.next;while(I!==j);return H}function n(D,N){return u(D.prev,D,N.prev)<0&&u(N.next,D,D.next)<0}function f(D,N,I,k){var B=D;do B.z===null&&(B.z=l(B.x,B.y,N,I,k)),B.prevZ=B.prev,B.nextZ=B.next,B=B.next;while(B!==D);B.prevZ.nextZ=null,B.prevZ=null,c(B)}function c(D){var N,I,k,B,O,H,Y,j,et=1;do{for(I=D,D=null,O=null,H=0;I;){for(H++,k=I,Y=0,N=0;N0||j>0&&k;)Y!==0&&(j===0||!k||I.z<=k.z)?(B=I,I=I.nextZ,Y--):(B=k,k=k.nextZ,j--),O?O.nextZ=B:D=B,B.prevZ=O,O=B;I=k}O.nextZ=null,et*=2}while(H>1);return D}function l(D,N,I,k,B){return D=32767*(D-I)*B,N=32767*(N-k)*B,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,D|N<<1}function m(D){var N=D,I=D;do(N.x=0&&(D-H)*(k-Y)-(I-H)*(N-Y)>=0&&(I-H)*(O-Y)-(B-H)*(k-Y)>=0}function b(D,N){return D.next.i!==N.i&&D.prev.i!==N.i&&!_(D,N)&&(y(D,N)&&y(N,D)&&E(D,N)&&(u(D.prev,D,N.prev)||u(D,N.prev,N))||o(D,N)&&u(D.prev,D,D.next)>0&&u(N.prev,N,N.next)>0)}function u(D,N,I){return(N.y-D.y)*(I.x-N.x)-(N.x-D.x)*(I.y-N.y)}function o(D,N){return D.x===N.x&&D.y===N.y}function d(D,N,I,k){var B=A(u(D,N,I)),O=A(u(D,N,k)),H=A(u(I,k,D)),Y=A(u(I,k,N));return!!(B!==O&&H!==Y||B===0&&w(D,I,N)||O===0&&w(D,k,N)||H===0&&w(I,D,k)||Y===0&&w(I,N,k))}function w(D,N,I){return N.x<=Math.max(D.x,I.x)&&N.x>=Math.min(D.x,I.x)&&N.y<=Math.max(D.y,I.y)&&N.y>=Math.min(D.y,I.y)}function A(D){return D>0?1:D<0?-1:0}function _(D,N){var I=D;do{if(I.i!==D.i&&I.next.i!==D.i&&I.i!==N.i&&I.next.i!==N.i&&d(I,I.next,D,N))return!0;I=I.next}while(I!==D);return!1}function y(D,N){return u(D.prev,D,D.next)<0?u(D,N,D.next)>=0&&u(D,D.prev,N)>=0:u(D,N,D.prev)<0||u(D,D.next,N)<0}function E(D,N){var I=D,k=!1,B=(D.x+N.x)/2,O=(D.y+N.y)/2;do I.y>O!=I.next.y>O&&I.next.y!==I.y&&B<(I.next.x-I.x)*(O-I.y)/(I.next.y-I.y)+I.x&&(k=!k),I=I.next;while(I!==D);return k}function T(D,N){var I=new M(D.i,D.x,D.y),k=new M(N.i,N.x,N.y),B=D.next,O=N.prev;return D.next=N,N.prev=D,I.next=B,B.prev=I,k.next=I,I.prev=k,O.next=k,k.prev=O,k}function s(D,N,I,k){var B=new M(D,N,I);return k?(B.next=k.next,B.prev=k,k.next.prev=B,k.next=B):(B.prev=B,B.next=B),B}function L(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function M(D,N,I){this.i=D,this.x=N,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}U.deviation=function(D,N,I,k){var B=N&&N.length,O=B?N[0]*I:D.length,H=Math.abs(z(D,0,O,I));if(B)for(var Y=0,j=N.length;Y0&&(k+=D[B-1].length,I.holes.push(k))}return I}},6688:function(G,U,t){var g=t(78484);G.exports=function(i,S){var x=[],h=[],p=[],r={},e=[],a;function n(w){p[w]=!1,r.hasOwnProperty(w)&&Object.keys(r[w]).forEach(function(A){delete r[w][A],p[A]&&n(A)})}function f(w){var A=!1;h.push(w),p[w]=!0;var _,y;for(_=0;_=w})}function m(w){l(w);for(var A=i,_=g(A),y=_.components.filter(function(D){return D.length>1}),E=1/0,T,s=0;s=55296&&w<=56319&&(E+=c[++b])),E=l?a.call(l,m,E,u):E,v?(n.value=E,f(o,u,n)):o[u]=E,++u;d=u}}if(d===void 0)for(d=S(c.length),v&&(o=new v(d)),b=0;b0?1:-1}},96936:function(G,U,t){var g=t(85608),C=Math.abs,i=Math.floor;G.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:g(S)*i(C(S)))}},81304:function(G,U,t){var g=t(96936),C=Math.max;G.exports=function(i){return C(0,g(i))}},14428:function(G,U,t){var g=t(34044),C=t(9252),i=Function.prototype.bind,S=Function.prototype.call,x=Object.keys,h=Object.prototype.propertyIsEnumerable;G.exports=function(p,r){return function(e,a){var n,f=arguments[2],c=arguments[3];return e=Object(C(e)),g(a),n=x(e),c&&n.sort(typeof c=="function"?i.call(c,e):void 0),typeof p!="function"&&(p=n[p]),S.call(p,n,function(l,m){return h.call(e,l)?S.call(a,f,e[l],l,e,m):r})}}},38452:function(G,U,t){G.exports=t(96276)()?Object.assign:t(81892)},96276:function(G){G.exports=function(){var U=Object.assign,t;return typeof U!="function"?!1:(t={foo:"raz"},U(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},81892:function(G,U,t){var g=t(54768),C=t(9252),i=Math.max;G.exports=function(S,x){var h,p,r=i(arguments.length,2),e;for(S=Object(C(S)),e=function(a){try{S[a]=x[a]}catch(n){h||(h=n)}},p=1;p-1}},29768:function(G){var U=Object.prototype.toString,t=U.call("");G.exports=function(g){return typeof g=="string"||g&&typeof g=="object"&&(g instanceof String||U.call(g)===t)||!1}},82252:function(G){var U=Object.create(null),t=Math.random;G.exports=function(){var g;do g=t().toString(36).slice(2);while(U[g]);return g}},52104:function(G,U,t){var g=t(69932),C=t(71056),i=t(21092),S=t(92664),x=t(85512),h=Object.defineProperty,p;p=G.exports=function(r,e){if(!(this instanceof p))throw new TypeError("Constructor requires 'new'");x.call(this,r),e?C.call(e,"key+value")?e="key+value":C.call(e,"key")?e="key":e="value":e="value",h(this,"__kind__",i("",e))},g&&g(p,x),delete p.prototype.constructor,p.prototype=Object.create(x.prototype,{_resolve:i(function(r){return this.__kind__==="value"?this.__list__[r]:this.__kind__==="key+value"?[r,this.__list__[r]]:r})}),h(p.prototype,S.toStringTag,i("c","Array Iterator"))},76024:function(G,U,t){var g=t(60948),C=t(34044),i=t(29768),S=t(76252),x=Array.isArray,h=Function.prototype.call,p=Array.prototype.some;G.exports=function(r,e){var a,n=arguments[2],f,c,l,m,v,b,u;if(x(r)||g(r)?a="array":i(r)?a="string":r=S(r),C(e),c=function(){l=!0},a==="array"){p.call(r,function(o){return h.call(e,n,o,c),l});return}if(a==="string"){for(v=r.length,m=0;m=55296&&u<=56319&&(b+=r[++m])),h.call(e,n,b,c),!l);++m);return}for(f=r.next();!f.done;){if(h.call(e,n,f.value,c),l)return;f=r.next()}}},76252:function(G,U,t){var g=t(60948),C=t(29768),i=t(52104),S=t(80940),x=t(52891),h=t(92664).iterator;G.exports=function(p){return typeof x(p)[h]=="function"?p[h]():g(p)?new i(p):C(p)?new S(p):new i(p)}},85512:function(G,U,t){var g=t(41476),C=t(38452),i=t(34044),S=t(9252),x=t(21092),h=t(27940),p=t(92664),r=Object.defineProperty,e=Object.defineProperties,a;G.exports=a=function(n,f){if(!(this instanceof a))throw new TypeError("Constructor requires 'new'");e(this,{__list__:x("w",S(n)),__context__:x("w",f),__nextIndex__:x("w",0)}),f&&(i(f.on),f.on("_add",this._onAdd),f.on("_delete",this._onDelete),f.on("_clear",this._onClear))},delete a.prototype.constructor,e(a.prototype,C({_next:x(function(){var n;if(this.__list__){if(this.__redo__&&(n=this.__redo__.shift(),n!==void 0))return n;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){r(this,"__redo__",x("c",[n]));return}this.__redo__.forEach(function(f,c){f>=n&&(this.__redo__[c]=++f)},this),this.__redo__.push(n)}}),_onDelete:x(function(n){var f;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(f=this.__redo__.indexOf(n),f!==-1&&this.__redo__.splice(f,1),this.__redo__.forEach(function(c,l){c>n&&(this.__redo__[l]=--c)},this)))}),_onClear:x(function(){this.__redo__&&g.call(this.__redo__),this.__nextIndex__=0})}))),r(a.prototype,p.iterator,x(function(){return this}))},76368:function(G,U,t){var g=t(60948),C=t(42584),i=t(29768),S=t(92664).iterator,x=Array.isArray;G.exports=function(h){return C(h)?x(h)||i(h)||g(h)?!0:typeof h[S]=="function":!1}},80940:function(G,U,t){var g=t(69932),C=t(21092),i=t(92664),S=t(85512),x=Object.defineProperty,h;h=G.exports=function(p){if(!(this instanceof h))throw new TypeError("Constructor requires 'new'");p=String(p),S.call(this,p),x(this,"__length__",C("",p.length))},g&&g(h,S),delete h.prototype.constructor,h.prototype=Object.create(S.prototype,{_next:C(function(){if(this.__list__){if(this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r)})}),x(h.prototype,i.toStringTag,C("c","String Iterator"))},52891:function(G,U,t){var g=t(76368);G.exports=function(C){if(!g(C))throw new TypeError(C+" is not iterable");return C}},60964:function(G){function U(g,C){if(g==null)throw new TypeError("Cannot convert first argument to object");for(var i=Object(g),S=1;S0&&(E=w[0]),E instanceof Error)throw E;var T=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw T.context=E,T}var s=y[d];if(s===void 0)return!1;if(typeof s=="function")t(s,this,w);else for(var L=s.length,M=c(s,L),A=0;A0&&E.length>_&&!E.warned){E.warned=!0;var T=new Error("Possible EventEmitter memory leak detected. "+E.length+" "+String(d)+" listeners added. Use emitter.setMaxListeners() to increase limit");T.name="MaxListenersExceededWarning",T.emitter=o,T.type=d,T.count=E.length,C(T)}return o}S.prototype.addListener=function(d,w){return r(this,d,w,!1)},S.prototype.on=S.prototype.addListener,S.prototype.prependListener=function(d,w){return r(this,d,w,!0)};function e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function a(o,d,w){var A={fired:!1,wrapFn:void 0,target:o,type:d,listener:w},_=e.bind(A);return _.listener=w,A.wrapFn=_,_}S.prototype.once=function(d,w){return h(w),this.on(d,a(this,d,w)),this},S.prototype.prependOnceListener=function(d,w){return h(w),this.prependListener(d,a(this,d,w)),this},S.prototype.removeListener=function(d,w){var A,_,y,E,T;if(h(w),_=this._events,_===void 0)return this;if(A=_[d],A===void 0)return this;if(A===w||A.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete _[d],_.removeListener&&this.emit("removeListener",d,A.listener||w));else if(typeof A!="function"){for(y=-1,E=A.length-1;E>=0;E--)if(A[E]===w||A[E].listener===w){T=A[E].listener,y=E;break}if(y<0)return this;y===0?A.shift():l(A,y),A.length===1&&(_[d]=A[0]),_.removeListener!==void 0&&this.emit("removeListener",d,T||w)}return this},S.prototype.off=S.prototype.removeListener,S.prototype.removeAllListeners=function(d){var w,A,_;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[d]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[d]),this;if(arguments.length===0){var y=Object.keys(A),E;for(_=0;_=0;_--)this.removeListener(d,w[_]);return this};function n(o,d,w){var A=o._events;if(A===void 0)return[];var _=A[d];return _===void 0?[]:typeof _=="function"?w?[_.listener||_]:[_]:w?m(_):c(_,_.length)}S.prototype.listeners=function(d){return n(this,d,!0)},S.prototype.rawListeners=function(d){return n(this,d,!1)},S.listenerCount=function(o,d){return typeof o.listenerCount=="function"?o.listenerCount(d):f.call(o,d)},S.prototype.listenerCount=f;function f(o){var d=this._events;if(d!==void 0){var w=d[o];if(typeof w=="function")return 1;if(w!==void 0)return w.length}return 0}S.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]};function c(o,d){for(var w=new Array(d),A=0;Ax[0]-r[0]/2&&(l=r[0]/2,m+=r[1]);return h}},71920:function(G){G.exports=U,U.canvas=document.createElement("canvas"),U.cache={};function U(e,S){S||(S={}),(typeof e=="string"||Array.isArray(e))&&(S.family=e);var x=Array.isArray(S.family)?S.family.join(", "):S.family;if(!x)throw Error("`family` must be defined");var h=S.size||S.fontSize||S.em||48,p=S.weight||S.fontWeight||"",r=S.style||S.fontStyle||"",e=[r,p,h].join(" ")+"px "+x,a=S.origin||"top";if(U.cache[x]&&h<=U.cache[x].em)return t(U.cache[x],a);var n=S.canvas||U.canvas,f=n.getContext("2d"),c={upper:S.upper!==void 0?S.upper:"H",lower:S.lower!==void 0?S.lower:"x",descent:S.descent!==void 0?S.descent:"p",ascent:S.ascent!==void 0?S.ascent:"h",tittle:S.tittle!==void 0?S.tittle:"i",overshoot:S.overshoot!==void 0?S.overshoot:"O"},l=Math.ceil(h*1.5);n.height=l,n.width=l*.5,f.font=e;var m="H",v={top:0};f.clearRect(0,0,l,l),f.textBaseline="top",f.fillStyle="black",f.fillText(m,0,0);var b=g(f.getImageData(0,0,l,l));f.clearRect(0,0,l,l),f.textBaseline="bottom",f.fillText(m,0,l);var u=g(f.getImageData(0,0,l,l));v.lineHeight=v.bottom=l-u+b,f.clearRect(0,0,l,l),f.textBaseline="alphabetic",f.fillText(m,0,l);var o=g(f.getImageData(0,0,l,l)),d=l-o-1+b;v.baseline=v.alphabetic=d,f.clearRect(0,0,l,l),f.textBaseline="middle",f.fillText(m,0,l*.5);var w=g(f.getImageData(0,0,l,l));v.median=v.middle=l-w-1+b-l*.5,f.clearRect(0,0,l,l),f.textBaseline="hanging",f.fillText(m,0,l*.5);var A=g(f.getImageData(0,0,l,l));v.hanging=l-A-1+b-l*.5,f.clearRect(0,0,l,l),f.textBaseline="ideographic",f.fillText(m,0,l);var _=g(f.getImageData(0,0,l,l));if(v.ideographic=l-_-1+b,c.upper&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.upper,0,0),v.upper=g(f.getImageData(0,0,l,l)),v.capHeight=v.baseline-v.upper),c.lower&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.lower,0,0),v.lower=g(f.getImageData(0,0,l,l)),v.xHeight=v.baseline-v.lower),c.tittle&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.tittle,0,0),v.tittle=g(f.getImageData(0,0,l,l))),c.ascent&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.ascent,0,0),v.ascent=g(f.getImageData(0,0,l,l))),c.descent&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.descent,0,0),v.descent=C(f.getImageData(0,0,l,l))),c.overshoot){f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.overshoot,0,0);var y=C(f.getImageData(0,0,l,l));v.overshoot=y-d}for(var E in v)v[E]/=h;return v.em=h,U.cache[x]=v,t(v,a)}function t(i,S){var x={};typeof S=="string"&&(S=i[S]);for(var h in i)h!=="em"&&(x[h]=i[h]-S);return x}function g(i){for(var S=i.height,x=i.data,h=3;h0;h-=4)if(x[h]!==0)return Math.floor((h-3)*.25/S)}},46492:function(G,U,t){var g=t(90720),C=Object.prototype.toString,i=Object.prototype.hasOwnProperty,S=function(e,a,n){for(var f=0,c=e.length;f=3&&(f=n),C.call(e)==="[object Array]"?S(e,a,f):typeof e=="string"?x(e,a,f):h(e,a,f)};G.exports=p},74336:function(G){var U="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,g=Math.max,C="[object Function]",i=function(p,r){for(var e=[],a=0;a"u"&&!g.canvas)return null;var C=g.canvas||document.createElement("canvas");typeof g.width=="number"&&(C.width=g.width),typeof g.height=="number"&&(C.height=g.height);var i=g,S;try{var x=[t];t.indexOf("webgl")===0&&x.push("experimental-"+t);for(var h=0;h"u"||!n?g:n(Uint8Array),l={"%AggregateError%":typeof AggregateError>"u"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?g:ArrayBuffer,"%ArrayIteratorPrototype%":e&&n?n([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":typeof Atomics>"u"?g:Atomics,"%BigInt%":typeof BigInt>"u"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?g:Float32Array,"%Float64Array%":typeof Float64Array>"u"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?g:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":typeof Int8Array>"u"?g:Int8Array,"%Int16Array%":typeof Int16Array>"u"?g:Int16Array,"%Int32Array%":typeof Int32Array>"u"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":e&&n?n(n([][Symbol.iterator]())):g,"%JSON%":typeof JSON=="object"?JSON:g,"%Map%":typeof Map>"u"?g:Map,"%MapIteratorPrototype%":typeof Map>"u"||!e||!n?g:n(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?g:Promise,"%Proxy%":typeof Proxy>"u"?g:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?g:Set,"%SetIteratorPrototype%":typeof Set>"u"||!e||!n?g:n(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":e&&n?n(""[Symbol.iterator]()):g,"%Symbol%":e?Symbol:g,"%SyntaxError%":C,"%ThrowTypeError%":r,"%TypedArray%":c,"%TypeError%":S,"%Uint8Array%":typeof Uint8Array>"u"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?g:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?g:WeakMap,"%WeakRef%":typeof WeakRef>"u"?g:WeakRef,"%WeakSet%":typeof WeakSet>"u"?g:WeakSet};if(n)try{null.error}catch(M){var m=n(n(M));l["%Error.prototype%"]=m}var v=function M(z){var D;if(z==="%AsyncFunction%")D=x("async function () {}");else if(z==="%GeneratorFunction%")D=x("function* () {}");else if(z==="%AsyncGeneratorFunction%")D=x("async function* () {}");else if(z==="%AsyncGenerator%"){var N=M("%AsyncGeneratorFunction%");N&&(D=N.prototype)}else if(z==="%AsyncIteratorPrototype%"){var I=M("%AsyncGenerator%");I&&n&&(D=n(I.prototype))}return l[z]=D,D},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},u=t(8844),o=t(92064),d=u.call(Function.call,Array.prototype.concat),w=u.call(Function.apply,Array.prototype.splice),A=u.call(Function.call,String.prototype.replace),_=u.call(Function.call,String.prototype.slice),y=u.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,s=function(z){var D=_(z,0,1),N=_(z,-1);if(D==="%"&&N!=="%")throw new C("invalid intrinsic syntax, expected closing `%`");if(N==="%"&&D!=="%")throw new C("invalid intrinsic syntax, expected opening `%`");var I=[];return A(z,E,function(k,B,O,H){I[I.length]=O?A(H,T,"$1"):B||k}),I},L=function(z,D){var N=z,I;if(o(b,N)&&(I=b[N],N="%"+I[0]+"%"),o(l,N)){var k=l[N];if(k===f&&(k=v(N)),typeof k>"u"&&!D)throw new S("intrinsic "+z+" exists, but is not available. Please file an issue!");return{alias:I,name:N,value:k}}throw new C("intrinsic "+z+" does not exist!")};G.exports=function(z,D){if(typeof z!="string"||z.length===0)throw new S("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new S('"allowMissing" argument must be a boolean');if(y(/^%?[^%]*%?$/,z)===null)throw new C("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var N=s(z),I=N.length>0?N[0]:"",k=L("%"+I+"%",D),B=k.name,O=k.value,H=!1,Y=k.alias;Y&&(I=Y[0],w(N,d([0,1],Y)));for(var j=1,et=!0;j=N.length){var X=h(O,it);et=!!X,et&&"get"in X&&!("originalValue"in X.get)?O=X.get:O=O[it]}else et=o(O,it),O=O[it];et&&!H&&(l[B]=O)}}return O}},12408:function(G){G.exports=U;function U(t,g){var C=g[0],i=g[1],S=g[2],x=g[3],h=g[4],p=g[5],r=g[6],e=g[7],a=g[8],n=g[9],f=g[10],c=g[11],l=g[12],m=g[13],v=g[14],b=g[15];return t[0]=p*(f*b-c*v)-n*(r*b-e*v)+m*(r*c-e*f),t[1]=-(i*(f*b-c*v)-n*(S*b-x*v)+m*(S*c-x*f)),t[2]=i*(r*b-e*v)-p*(S*b-x*v)+m*(S*e-x*r),t[3]=-(i*(r*c-e*f)-p*(S*c-x*f)+n*(S*e-x*r)),t[4]=-(h*(f*b-c*v)-a*(r*b-e*v)+l*(r*c-e*f)),t[5]=C*(f*b-c*v)-a*(S*b-x*v)+l*(S*c-x*f),t[6]=-(C*(r*b-e*v)-h*(S*b-x*v)+l*(S*e-x*r)),t[7]=C*(r*c-e*f)-h*(S*c-x*f)+a*(S*e-x*r),t[8]=h*(n*b-c*m)-a*(p*b-e*m)+l*(p*c-e*n),t[9]=-(C*(n*b-c*m)-a*(i*b-x*m)+l*(i*c-x*n)),t[10]=C*(p*b-e*m)-h*(i*b-x*m)+l*(i*e-x*p),t[11]=-(C*(p*c-e*n)-h*(i*c-x*n)+a*(i*e-x*p)),t[12]=-(h*(n*v-f*m)-a*(p*v-r*m)+l*(p*f-r*n)),t[13]=C*(n*v-f*m)-a*(i*v-S*m)+l*(i*f-S*n),t[14]=-(C*(p*v-r*m)-h*(i*v-S*m)+l*(i*r-S*p)),t[15]=C*(p*f-r*n)-h*(i*f-S*n)+a*(i*r-S*p),t}},76860:function(G){G.exports=U;function U(t){var g=new Float32Array(16);return g[0]=t[0],g[1]=t[1],g[2]=t[2],g[3]=t[3],g[4]=t[4],g[5]=t[5],g[6]=t[6],g[7]=t[7],g[8]=t[8],g[9]=t[9],g[10]=t[10],g[11]=t[11],g[12]=t[12],g[13]=t[13],g[14]=t[14],g[15]=t[15],g}},64492:function(G){G.exports=U;function U(t,g){return t[0]=g[0],t[1]=g[1],t[2]=g[2],t[3]=g[3],t[4]=g[4],t[5]=g[5],t[6]=g[6],t[7]=g[7],t[8]=g[8],t[9]=g[9],t[10]=g[10],t[11]=g[11],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15],t}},54212:function(G){G.exports=U;function U(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},70800:function(G){G.exports=U;function U(t){var g=t[0],C=t[1],i=t[2],S=t[3],x=t[4],h=t[5],p=t[6],r=t[7],e=t[8],a=t[9],n=t[10],f=t[11],c=t[12],l=t[13],m=t[14],v=t[15],b=g*h-C*x,u=g*p-i*x,o=g*r-S*x,d=C*p-i*h,w=C*r-S*h,A=i*r-S*p,_=e*l-a*c,y=e*m-n*c,E=e*v-f*c,T=a*m-n*l,s=a*v-f*l,L=n*v-f*m;return b*L-u*s+o*T+d*E-w*y+A*_}},61784:function(G){G.exports=U;function U(t,g){var C=g[0],i=g[1],S=g[2],x=g[3],h=C+C,p=i+i,r=S+S,e=C*h,a=i*h,n=i*p,f=S*h,c=S*p,l=S*r,m=x*h,v=x*p,b=x*r;return t[0]=1-n-l,t[1]=a+b,t[2]=f-v,t[3]=0,t[4]=a-b,t[5]=1-e-l,t[6]=c+m,t[7]=0,t[8]=f+v,t[9]=c-m,t[10]=1-e-n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},91616:function(G){G.exports=U;function U(t,g,C){var i,S,x,h=C[0],p=C[1],r=C[2],e=Math.sqrt(h*h+p*p+r*r);return Math.abs(e)<1e-6?null:(e=1/e,h*=e,p*=e,r*=e,i=Math.sin(g),S=Math.cos(g),x=1-S,t[0]=h*h*x+S,t[1]=p*h*x+r*i,t[2]=r*h*x-p*i,t[3]=0,t[4]=h*p*x-r*i,t[5]=p*p*x+S,t[6]=r*p*x+h*i,t[7]=0,t[8]=h*r*x+p*i,t[9]=p*r*x-h*i,t[10]=r*r*x+S,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},51944:function(G){G.exports=U;function U(t,g,C){var i=g[0],S=g[1],x=g[2],h=g[3],p=i+i,r=S+S,e=x+x,a=i*p,n=i*r,f=i*e,c=S*r,l=S*e,m=x*e,v=h*p,b=h*r,u=h*e;return t[0]=1-(c+m),t[1]=n+u,t[2]=f-b,t[3]=0,t[4]=n-u,t[5]=1-(a+m),t[6]=l+v,t[7]=0,t[8]=f+b,t[9]=l-v,t[10]=1-(a+c),t[11]=0,t[12]=C[0],t[13]=C[1],t[14]=C[2],t[15]=1,t}},69444:function(G){G.exports=U;function U(t,g){return t[0]=g[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=g[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=g[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},48268:function(G){G.exports=U;function U(t,g){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=g[0],t[13]=g[1],t[14]=g[2],t[15]=1,t}},21856:function(G){G.exports=U;function U(t,g){var C=Math.sin(g),i=Math.cos(g);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=C,t[7]=0,t[8]=0,t[9]=-C,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},79216:function(G){G.exports=U;function U(t,g){var C=Math.sin(g),i=Math.cos(g);return t[0]=i,t[1]=0,t[2]=-C,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=C,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},57736:function(G){G.exports=U;function U(t,g){var C=Math.sin(g),i=Math.cos(g);return t[0]=i,t[1]=C,t[2]=0,t[3]=0,t[4]=-C,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},38848:function(G){G.exports=U;function U(t,g,C,i,S,x,h){var p=1/(C-g),r=1/(S-i),e=1/(x-h);return t[0]=x*2*p,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=x*2*r,t[6]=0,t[7]=0,t[8]=(C+g)*p,t[9]=(S+i)*r,t[10]=(h+x)*e,t[11]=-1,t[12]=0,t[13]=0,t[14]=h*x*2*e,t[15]=0,t}},36635:function(G){G.exports=U;function U(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},36524:function(G,U,t){G.exports={create:t(54212),clone:t(76860),copy:t(64492),identity:t(36635),transpose:t(86520),invert:t(4308),adjoint:t(12408),determinant:t(70800),multiply:t(80944),translate:t(35176),scale:t(68152),rotate:t(30016),rotateX:t(15456),rotateY:t(64840),rotateZ:t(4192),fromRotation:t(91616),fromRotationTranslation:t(51944),fromScaling:t(69444),fromTranslation:t(48268),fromXRotation:t(21856),fromYRotation:t(79216),fromZRotation:t(57736),fromQuat:t(61784),frustum:t(38848),perspective:t(51296),perspectiveFromFieldOfView:t(63688),ortho:t(97688),lookAt:t(56508),str:t(89412)}},4308:function(G){G.exports=U;function U(t,g){var C=g[0],i=g[1],S=g[2],x=g[3],h=g[4],p=g[5],r=g[6],e=g[7],a=g[8],n=g[9],f=g[10],c=g[11],l=g[12],m=g[13],v=g[14],b=g[15],u=C*p-i*h,o=C*r-S*h,d=C*e-x*h,w=i*r-S*p,A=i*e-x*p,_=S*e-x*r,y=a*m-n*l,E=a*v-f*l,T=a*b-c*l,s=n*v-f*m,L=n*b-c*m,M=f*b-c*v,z=u*M-o*L+d*s+w*T-A*E+_*y;return z?(z=1/z,t[0]=(p*M-r*L+e*s)*z,t[1]=(S*L-i*M-x*s)*z,t[2]=(m*_-v*A+b*w)*z,t[3]=(f*A-n*_-c*w)*z,t[4]=(r*T-h*M-e*E)*z,t[5]=(C*M-S*T+x*E)*z,t[6]=(v*d-l*_-b*o)*z,t[7]=(a*_-f*d+c*o)*z,t[8]=(h*L-p*T+e*y)*z,t[9]=(i*T-C*L-x*y)*z,t[10]=(l*A-m*d+b*u)*z,t[11]=(n*d-a*A-c*u)*z,t[12]=(p*E-h*s-r*y)*z,t[13]=(C*s-i*E+S*y)*z,t[14]=(m*o-l*w-v*u)*z,t[15]=(a*w-n*o+f*u)*z,t):null}},56508:function(G,U,t){var g=t(36635);G.exports=C;function C(i,S,x,h){var p,r,e,a,n,f,c,l,m,v,b=S[0],u=S[1],o=S[2],d=h[0],w=h[1],A=h[2],_=x[0],y=x[1],E=x[2];return Math.abs(b-_)<1e-6&&Math.abs(u-y)<1e-6&&Math.abs(o-E)<1e-6?g(i):(c=b-_,l=u-y,m=o-E,v=1/Math.sqrt(c*c+l*l+m*m),c*=v,l*=v,m*=v,p=w*m-A*l,r=A*c-d*m,e=d*l-w*c,v=Math.sqrt(p*p+r*r+e*e),v?(v=1/v,p*=v,r*=v,e*=v):(p=0,r=0,e=0),a=l*e-m*r,n=m*p-c*e,f=c*r-l*p,v=Math.sqrt(a*a+n*n+f*f),v?(v=1/v,a*=v,n*=v,f*=v):(a=0,n=0,f=0),i[0]=p,i[1]=a,i[2]=c,i[3]=0,i[4]=r,i[5]=n,i[6]=l,i[7]=0,i[8]=e,i[9]=f,i[10]=m,i[11]=0,i[12]=-(p*b+r*u+e*o),i[13]=-(a*b+n*u+f*o),i[14]=-(c*b+l*u+m*o),i[15]=1,i)}},80944:function(G){G.exports=U;function U(t,g,C){var i=g[0],S=g[1],x=g[2],h=g[3],p=g[4],r=g[5],e=g[6],a=g[7],n=g[8],f=g[9],c=g[10],l=g[11],m=g[12],v=g[13],b=g[14],u=g[15],o=C[0],d=C[1],w=C[2],A=C[3];return t[0]=o*i+d*p+w*n+A*m,t[1]=o*S+d*r+w*f+A*v,t[2]=o*x+d*e+w*c+A*b,t[3]=o*h+d*a+w*l+A*u,o=C[4],d=C[5],w=C[6],A=C[7],t[4]=o*i+d*p+w*n+A*m,t[5]=o*S+d*r+w*f+A*v,t[6]=o*x+d*e+w*c+A*b,t[7]=o*h+d*a+w*l+A*u,o=C[8],d=C[9],w=C[10],A=C[11],t[8]=o*i+d*p+w*n+A*m,t[9]=o*S+d*r+w*f+A*v,t[10]=o*x+d*e+w*c+A*b,t[11]=o*h+d*a+w*l+A*u,o=C[12],d=C[13],w=C[14],A=C[15],t[12]=o*i+d*p+w*n+A*m,t[13]=o*S+d*r+w*f+A*v,t[14]=o*x+d*e+w*c+A*b,t[15]=o*h+d*a+w*l+A*u,t}},97688:function(G){G.exports=U;function U(t,g,C,i,S,x,h){var p=1/(g-C),r=1/(i-S),e=1/(x-h);return t[0]=-2*p,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*e,t[11]=0,t[12]=(g+C)*p,t[13]=(S+i)*r,t[14]=(h+x)*e,t[15]=1,t}},51296:function(G){G.exports=U;function U(t,g,C,i,S){var x=1/Math.tan(g/2),h=1/(i-S);return t[0]=x/C,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=x,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(S+i)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*S*i*h,t[15]=0,t}},63688:function(G){G.exports=U;function U(t,g,C,i){var S=Math.tan(g.upDegrees*Math.PI/180),x=Math.tan(g.downDegrees*Math.PI/180),h=Math.tan(g.leftDegrees*Math.PI/180),p=Math.tan(g.rightDegrees*Math.PI/180),r=2/(h+p),e=2/(S+x);return t[0]=r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=-((h-p)*r*.5),t[9]=(S-x)*e*.5,t[10]=i/(C-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*C/(C-i),t[15]=0,t}},30016:function(G){G.exports=U;function U(t,g,C,i){var S=i[0],x=i[1],h=i[2],p=Math.sqrt(S*S+x*x+h*h),r,e,a,n,f,c,l,m,v,b,u,o,d,w,A,_,y,E,T,s,L,M,z,D;return Math.abs(p)<1e-6?null:(p=1/p,S*=p,x*=p,h*=p,r=Math.sin(C),e=Math.cos(C),a=1-e,n=g[0],f=g[1],c=g[2],l=g[3],m=g[4],v=g[5],b=g[6],u=g[7],o=g[8],d=g[9],w=g[10],A=g[11],_=S*S*a+e,y=x*S*a+h*r,E=h*S*a-x*r,T=S*x*a-h*r,s=x*x*a+e,L=h*x*a+S*r,M=S*h*a+x*r,z=x*h*a-S*r,D=h*h*a+e,t[0]=n*_+m*y+o*E,t[1]=f*_+v*y+d*E,t[2]=c*_+b*y+w*E,t[3]=l*_+u*y+A*E,t[4]=n*T+m*s+o*L,t[5]=f*T+v*s+d*L,t[6]=c*T+b*s+w*L,t[7]=l*T+u*s+A*L,t[8]=n*M+m*z+o*D,t[9]=f*M+v*z+d*D,t[10]=c*M+b*z+w*D,t[11]=l*M+u*z+A*D,g!==t&&(t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t)}},15456:function(G){G.exports=U;function U(t,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[4],h=g[5],p=g[6],r=g[7],e=g[8],a=g[9],n=g[10],f=g[11];return g!==t&&(t[0]=g[0],t[1]=g[1],t[2]=g[2],t[3]=g[3],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t[4]=x*S+e*i,t[5]=h*S+a*i,t[6]=p*S+n*i,t[7]=r*S+f*i,t[8]=e*S-x*i,t[9]=a*S-h*i,t[10]=n*S-p*i,t[11]=f*S-r*i,t}},64840:function(G){G.exports=U;function U(t,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[0],h=g[1],p=g[2],r=g[3],e=g[8],a=g[9],n=g[10],f=g[11];return g!==t&&(t[4]=g[4],t[5]=g[5],t[6]=g[6],t[7]=g[7],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t[0]=x*S-e*i,t[1]=h*S-a*i,t[2]=p*S-n*i,t[3]=r*S-f*i,t[8]=x*i+e*S,t[9]=h*i+a*S,t[10]=p*i+n*S,t[11]=r*i+f*S,t}},4192:function(G){G.exports=U;function U(t,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[0],h=g[1],p=g[2],r=g[3],e=g[4],a=g[5],n=g[6],f=g[7];return g!==t&&(t[8]=g[8],t[9]=g[9],t[10]=g[10],t[11]=g[11],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t[0]=x*S+e*i,t[1]=h*S+a*i,t[2]=p*S+n*i,t[3]=r*S+f*i,t[4]=e*S-x*i,t[5]=a*S-h*i,t[6]=n*S-p*i,t[7]=f*S-r*i,t}},68152:function(G){G.exports=U;function U(t,g,C){var i=C[0],S=C[1],x=C[2];return t[0]=g[0]*i,t[1]=g[1]*i,t[2]=g[2]*i,t[3]=g[3]*i,t[4]=g[4]*S,t[5]=g[5]*S,t[6]=g[6]*S,t[7]=g[7]*S,t[8]=g[8]*x,t[9]=g[9]*x,t[10]=g[10]*x,t[11]=g[11]*x,t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15],t}},89412:function(G){G.exports=U;function U(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},35176:function(G){G.exports=U;function U(t,g,C){var i=C[0],S=C[1],x=C[2],h,p,r,e,a,n,f,c,l,m,v,b;return g===t?(t[12]=g[0]*i+g[4]*S+g[8]*x+g[12],t[13]=g[1]*i+g[5]*S+g[9]*x+g[13],t[14]=g[2]*i+g[6]*S+g[10]*x+g[14],t[15]=g[3]*i+g[7]*S+g[11]*x+g[15]):(h=g[0],p=g[1],r=g[2],e=g[3],a=g[4],n=g[5],f=g[6],c=g[7],l=g[8],m=g[9],v=g[10],b=g[11],t[0]=h,t[1]=p,t[2]=r,t[3]=e,t[4]=a,t[5]=n,t[6]=f,t[7]=c,t[8]=l,t[9]=m,t[10]=v,t[11]=b,t[12]=h*i+a*S+l*x+g[12],t[13]=p*i+n*S+m*x+g[13],t[14]=r*i+f*S+v*x+g[14],t[15]=e*i+c*S+b*x+g[15]),t}},86520:function(G){G.exports=U;function U(t,g){if(t===g){var C=g[1],i=g[2],S=g[3],x=g[6],h=g[7],p=g[11];t[1]=g[4],t[2]=g[8],t[3]=g[12],t[4]=C,t[6]=g[9],t[7]=g[13],t[8]=i,t[9]=x,t[11]=g[14],t[12]=S,t[13]=h,t[14]=p}else t[0]=g[0],t[1]=g[4],t[2]=g[8],t[3]=g[12],t[4]=g[1],t[5]=g[5],t[6]=g[9],t[7]=g[13],t[8]=g[2],t[9]=g[6],t[10]=g[10],t[11]=g[14],t[12]=g[3],t[13]=g[7],t[14]=g[11],t[15]=g[15];return t}},23352:function(G,U,t){var g=t(42771),C=t(55616),i=t(28624),S=t(55212),x=t(60463),h=t(72160),p=t(33888),r=t(14144),e=t(51160),a=t(58908),n=t(65819),f=t(23464),c=t(63768),l=t(50896),m=t(71920),v=t(47520),b=t(308),u=b.nextPow2,o=new x,d=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(d=!0),document.body.removeChild(w)}var A=function(E){_(E)?(E={regl:E},this.gl=E.regl._gl):this.gl=S(E),this.shader=o.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=E.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),o.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(a(E)?E:{})};A.prototype.createShader=function(){var E=this.regl,T=E({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:E.prop("count"),offset:E.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:E.this("sizeBuffer")},width:{offset:0,stride:8,buffer:E.this("sizeBuffer")},char:E.this("charBuffer"),position:E.this("position")},uniforms:{atlasSize:function(L,M){return[M.atlas.width,M.atlas.height]},atlasDim:function(L,M){return[M.atlas.cols,M.atlas.rows]},atlas:function(L,M){return M.atlas.texture},charStep:function(L,M){return M.atlas.step},em:function(L,M){return M.atlas.em},color:E.prop("color"),opacity:E.prop("opacity"),viewport:E.this("viewportArray"),scale:E.this("scale"),align:E.prop("align"),baseline:E.prop("baseline"),translate:E.this("translate"),positionOffset:E.prop("positionOffset")},primitive:"points",viewport:E.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -7059,20 +7059,20 @@ should equal // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),s={};return{regl:E,draw:T,atlas:s}},A.prototype.update=function(E){var T=this;if(typeof E=="string")E={text:E};else if(!E)return;E=C(E,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),E.opacity!=null&&(Array.isArray(E.opacity)?this.opacity=E.opacity.map(function(kt){return parseFloat(kt)}):this.opacity=parseFloat(E.opacity)),E.viewport!=null&&(this.viewport=e(E.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),E.kerning!=null&&(this.kerning=E.kerning),E.offset!=null&&(typeof E.offset=="number"&&(E.offset=[E.offset,0]),this.positionOffset=h(E.offset)),E.direction&&(this.direction=E.direction),E.range&&(this.range=E.range,this.scale=[1/(E.range[2]-E.range[0]),1/(E.range[3]-E.range[1])],this.translate=[-E.range[0],-E.range[1]]),E.scale&&(this.scale=E.scale),E.translate&&(this.translate=E.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!E.font&&(E.font=A.baseFontSize+"px sans-serif");var s=!1,L=!1;if(E.font&&(Array.isArray(E.font)?E.font:[E.font]).forEach(function(kt,Vt){if(typeof kt=="string")try{kt=g.parse(kt)}catch{kt=g.parse(A.baseFontSize+"px "+kt)}else kt=g.parse(g.stringify(kt));var It=g.stringify({size:A.baseFontSize,family:kt.family,stretch:d?kt.stretch:void 0,variant:kt.variant,weight:kt.weight,style:kt.style}),re=n(kt.size),Kt=Math.round(re[0]*f(re[1]));if(Kt!==T.fontSize[Vt]&&(L=!0,T.fontSize[Vt]=Kt),(!T.font[Vt]||It!=T.font[Vt].baseString)&&(s=!0,T.font[Vt]=A.fonts[It],!T.font[Vt])){var $t=kt.family.join(", "),le=[kt.style];kt.style!=kt.variant&&le.push(kt.variant),kt.variant!=kt.weight&&le.push(kt.weight),d&&kt.weight!=kt.stretch&&le.push(kt.stretch),T.font[Vt]={baseString:It,family:$t,weight:kt.weight,stretch:kt.stretch,style:kt.style,variant:kt.variant,width:{},kerning:{},metrics:m($t,{origin:"top",fontSize:A.baseFontSize,fontStyle:le.join(" ")})},A.fonts[It]=T.font[Vt]}}),(s||L)&&this.font.forEach(function(kt,Vt){var It=g.stringify({size:T.fontSize[Vt],family:kt.family,stretch:d?kt.stretch:void 0,variant:kt.variant,weight:kt.weight,style:kt.style});if(T.fontAtlas[Vt]=T.shader.atlas[It],!T.fontAtlas[Vt]){var re=kt.metrics;T.shader.atlas[It]=T.fontAtlas[Vt]={fontString:It,step:Math.ceil(T.fontSize[Vt]*re.bottom*.5)*2,em:T.fontSize[Vt],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:T.regl.texture()}}E.text==null&&(E.text=T.text)}),typeof E.text=="string"&&E.position&&E.position.length>2){for(var M=Array(E.position.length*.5),z=0;z2){for(var I=!E.position[0].length,k=r.mallocFloat(this.count*2),B=0,O=0;B1?T.align[Vt]:T.align[0]:T.align;if(typeof It=="number")return It;switch(It){case"right":case"end":return-kt;case"center":case"centre":case"middle":return-kt*.5}return 0})),this.baseline==null&&E.baseline==null&&(E.baseline=0),E.baseline!=null&&(this.baseline=E.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(kt,Vt){var It=(T.font[Vt]||T.font[0]).metrics,re=0;return re+=It.bottom*.5,typeof kt=="number"?re+=kt-It.baseline:re+=-It[kt],re*=-1,re})),E.color!=null)if(E.color||(E.color="transparent"),typeof E.color=="string"||!isNaN(E.color))this.color=v(E.color,"uint8");else{var Tt;if(typeof E.color[0]=="number"&&E.color.length>this.counts.length){var wt=E.color.length;Tt=r.mallocUint8(wt);for(var Rt=(E.color.subarray||E.color.slice).bind(E.color),bt=0;bt4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Lt){var Ht=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(Ht);for(var Ut=0;Ut1?this.counts[Ut]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ut]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Ut*4,Ut*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ut]:this.opacity,baseline:this.baselineOffset[Ut]!=null?this.baselineOffset[Ut]:this.baselineOffset[0],align:this.align?this.alignOffset[Ut]!=null?this.alignOffset[Ut]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ut]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Ut*2,Ut*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},A.prototype.destroy=function(){},A.prototype.kerning=!0,A.prototype.position={constant:new Float32Array(2)},A.prototype.translate=null,A.prototype.scale=null,A.prototype.font=null,A.prototype.text="",A.prototype.positionOffset=[0,0],A.prototype.opacity=1,A.prototype.color=new Uint8Array([0,0,0,255]),A.prototype.alignOffset=[0,0],A.maxAtlasSize=1024,A.atlasCanvas=document.createElement("canvas"),A.atlasContext=A.atlasCanvas.getContext("2d",{alpha:!1}),A.baseFontSize=64,A.fonts={};function _(y){return typeof y=="function"&&y._gl&&y.prop&&y.texture&&y.buffer}G.exports=A},55212:function(G,U,t){var g=t(55616);G.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},i(r)?r={container:r}:S(r)?r={container:r}:x(r)?r={gl:r}:r=g(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=t.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var e=document.querySelector(r.container);if(!e)throw Error("Element "+r.container+" is not found");r.container=e}i(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=v(),r.container.appendChild(r.canvas),C(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=v(),r.container.appendChild(r.canvas),C(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{r.gl=r.canvas.getContext(a,r.attrs)}catch{}return r.gl}),r.gl};function C(p){if(p.container)if(p.container==document.body)document.body.style.width||(p.canvas.width=p.width||p.pixelRatio*t.g.innerWidth),document.body.style.height||(p.canvas.height=p.height||p.pixelRatio*t.g.innerHeight);else{var r=p.container.getBoundingClientRect();p.canvas.width=p.width||r.right-r.left,p.canvas.height=p.height||r.bottom-r.top}}function i(p){return typeof p.getContext=="function"&&"width"in p&&"height"in p}function S(p){return typeof p.nodeName=="string"&&typeof p.appendChild=="function"&&typeof p.getBoundingClientRect=="function"}function x(p){return typeof p.drawArrays=="function"||typeof p.drawElements=="function"}function v(){var p=document.createElement("canvas");return p.style.position="absolute",p.style.top=0,p.style.left=0,p}},26444:function(G){G.exports=function(U){typeof U=="string"&&(U=[U]);for(var t=[].slice.call(arguments,1),g=[],C=0;C */U.read=function(t,g,C,i,S){var x,v,p=S*8-i-1,r=(1<>1,a=-7,n=C?S-1:0,f=C?-1:1,c=t[g+n];for(n+=f,x=c&(1<<-a)-1,c>>=-a,a+=p;a>0;x=x*256+t[g+n],n+=f,a-=8);for(v=x&(1<<-a)-1,x>>=-a,a+=i;a>0;v=v*256+t[g+n],n+=f,a-=8);if(x===0)x=1-e;else{if(x===r)return v?NaN:(c?-1:1)*(1/0);v=v+Math.pow(2,i),x=x-e}return(c?-1:1)*v*Math.pow(2,x-i)},U.write=function(t,g,C,i,S,x){var v,p,r,e=x*8-S-1,a=(1<>1,f=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=i?0:x-1,l=i?1:-1,m=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(p=isNaN(g)?1:0,v=a):(v=Math.floor(Math.log(g)/Math.LN2),g*(r=Math.pow(2,-v))<1&&(v--,r*=2),v+n>=1?g+=f/r:g+=f*Math.pow(2,1-n),g*r>=2&&(v++,r/=2),v+n>=a?(p=0,v=a):v+n>=1?(p=(g*r-1)*Math.pow(2,S),v=v+n):(p=g*Math.pow(2,n-1)*Math.pow(2,S),v=0));S>=8;t[C+c]=p&255,c+=l,p/=256,S-=8);for(v=v<0;t[C+c]=v&255,c+=l,v/=256,e-=8);t[C+c-l]|=m*128}},6768:function(G){typeof Object.create=="function"?G.exports=function(t,g){g&&(t.super_=g,t.prototype=Object.create(g.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:G.exports=function(t,g){if(g){t.super_=g;var C=function(){};C.prototype=g.prototype,t.prototype=new C,t.prototype.constructor=t}}},91148:function(G,U,t){var g=t(46672)(),C=t(99676),i=C("Object.prototype.toString"),S=function(r){return g&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:i(r)==="[object Arguments]"},x=function(r){return S(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&i(r)!=="[object Array]"&&i(r.callee)==="[object Function]"},v=function(){return S(arguments)}();S.isLegacyArguments=x,G.exports=v?S:x},24200:function(G){G.exports=!0},90720:function(G){var U=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,g,C;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{g=Object.defineProperty({},"length",{get:function(){throw C}}),C={},t(function(){throw 42},null,g)}catch(b){b!==C&&(t=null)}else t=null;var i=/^\s*class\b/,S=function(u){try{var o=U.call(u);return i.test(o)}catch{return!1}},x=function(u){try{return S(u)?!1:(U.call(u),!0)}catch{return!1}},v=Object.prototype.toString,p="[object Object]",r="[object Function]",e="[object GeneratorFunction]",a="[object HTMLAllCollection]",n="[object HTML document.all class]",f="[object HTMLCollection]",c=typeof Symbol=="function"&&!!Symbol.toStringTag,l=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var h=document.all;v.call(h)===v.call(document.all)&&(m=function(u){if((l||!u)&&(typeof u>"u"||typeof u=="object"))try{var o=v.call(u);return(o===a||o===n||o===f||o===p)&&u("")==null}catch{}return!1})}G.exports=t?function(u){if(m(u))return!0;if(!u||typeof u!="function"&&typeof u!="object")return!1;try{t(u,null,g)}catch(o){if(o!==C)return!1}return!S(u)&&x(u)}:function(u){if(m(u))return!0;if(!u||typeof u!="function"&&typeof u!="object")return!1;if(c)return x(u);if(S(u))return!1;var o=v.call(u);return o!==r&&o!==e&&!/^\[object HTML/.test(o)?!1:x(u)}},84420:function(G,U,t){var g=Object.prototype.toString,C=Function.prototype.toString,i=/^\s*(?:function)?\*/,S=t(46672)(),x=Object.getPrototypeOf,v=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},p;G.exports=function(e){if(typeof e!="function")return!1;if(i.test(C.call(e)))return!0;if(!S){var a=g.call(e);return a==="[object GeneratorFunction]"}if(!x)return!1;if(typeof p>"u"){var n=v();p=n?x(n):!1}return x(e)===p}},96604:function(G){G.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(G){G.exports=function(t){return t!==t}},1560:function(G,U,t){var g=t(57916),C=t(81288),i=t(85992),S=t(57740),x=t(59736),v=g(S(),Number);C(v,{getPolyfill:S,implementation:i,shim:x}),G.exports=v},57740:function(G,U,t){var g=t(85992);G.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:g}},59736:function(G,U,t){var g=t(81288),C=t(57740);G.exports=function(){var S=C();return g(Number,{isNaN:S},{isNaN:function(){return Number.isNaN!==S}}),S}},18400:function(G){G.exports=function(U){var t=typeof U;return U!==null&&(t==="object"||t==="function")}},58908:function(G){var U=Object.prototype.toString;G.exports=function(t){var g;return U.call(t)==="[object Object]"&&(g=Object.getPrototypeOf(t),g===null||g===Object.getPrototypeOf({}))}},94576:function(G){G.exports=function(U){for(var t=U.length,g,C=0;C13)&&g!==32&&g!==133&&g!==160&&g!==5760&&g!==6158&&(g<8192||g>8205)&&g!==8232&&g!==8233&&g!==8239&&g!==8287&&g!==8288&&g!==12288&&g!==65279)return!1;return!0}},53520:function(G){G.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},7728:function(G,U,t){var g=t(46492),C=t(63436),i=t(99676),S=i("Object.prototype.toString"),x=t(46672)(),v=t(2304),p=typeof globalThis>"u"?t.g:globalThis,r=C(),e=i("Array.prototype.indexOf",!0)||function(m,h){for(var b=0;b-1}return v?c(m):!1}},76244:function(G){G.exports=Math.log2||function(U){return Math.log(U)*Math.LOG2E}},62644:function(G,U,t){G.exports=C;var g=t(93784);function C(i,S){S||(S=i,i=window);var x=0,v=0,p=0,r={shift:!1,alt:!1,control:!1,meta:!1},e=!1;function a(w){var A=!1;return"altKey"in w&&(A=A||w.altKey!==r.alt,r.alt=!!w.altKey),"shiftKey"in w&&(A=A||w.shiftKey!==r.shift,r.shift=!!w.shiftKey),"ctrlKey"in w&&(A=A||w.ctrlKey!==r.control,r.control=!!w.ctrlKey),"metaKey"in w&&(A=A||w.metaKey!==r.meta,r.meta=!!w.metaKey),A}function n(w,A){var _=g.x(A),y=g.y(A);"buttons"in A&&(w=A.buttons|0),(w!==x||_!==v||y!==p||a(A))&&(x=w|0,v=_||0,p=y||0,S&&S(x,v,p,r))}function f(w){n(0,w)}function c(){(x||v||p||r.shift||r.alt||r.meta||r.control)&&(v=p=0,x=0,r.shift=r.alt=r.control=r.meta=!1,S&&S(0,0,0,r))}function l(w){a(w)&&S&&S(x,v,p,r)}function m(w){g.buttons(w)===0?n(0,w):n(x,w)}function h(w){n(x|g.buttons(w),w)}function b(w){n(x&~g.buttons(w),w)}function u(){e||(e=!0,i.addEventListener("mousemove",m),i.addEventListener("mousedown",h),i.addEventListener("mouseup",b),i.addEventListener("mouseleave",f),i.addEventListener("mouseenter",f),i.addEventListener("mouseout",f),i.addEventListener("mouseover",f),i.addEventListener("blur",c),i.addEventListener("keyup",l),i.addEventListener("keydown",l),i.addEventListener("keypress",l),i!==window&&(window.addEventListener("blur",c),window.addEventListener("keyup",l),window.addEventListener("keydown",l),window.addEventListener("keypress",l)))}function o(){e&&(e=!1,i.removeEventListener("mousemove",m),i.removeEventListener("mousedown",h),i.removeEventListener("mouseup",b),i.removeEventListener("mouseleave",f),i.removeEventListener("mouseenter",f),i.removeEventListener("mouseout",f),i.removeEventListener("mouseover",f),i.removeEventListener("blur",c),i.removeEventListener("keyup",l),i.removeEventListener("keydown",l),i.removeEventListener("keypress",l),i!==window&&(window.removeEventListener("blur",c),window.removeEventListener("keyup",l),window.removeEventListener("keydown",l),window.removeEventListener("keypress",l)))}u();var d={element:i};return Object.defineProperties(d,{enabled:{get:function(){return e},set:function(w){w?u():o()},enumerable:!0},buttons:{get:function(){return x},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return r},enumerable:!0}}),d}},29128:function(G){var U={left:0,top:0};G.exports=t;function t(C,i,S){i=i||C.currentTarget||C.srcElement,Array.isArray(S)||(S=[0,0]);var x=C.clientX||0,v=C.clientY||0,p=g(i);return S[0]=x-p.left,S[1]=v-p.top,S}function g(C){return C===window||C===document||C===document.body?U:C.getBoundingClientRect()}},93784:function(G,U){function t(S){if(typeof S=="object"){if("buttons"in S)return S.buttons;if("which"in S){var x=S.which;if(x===2)return 4;if(x===3)return 2;if(x>0)return 1<=0)return 1<2){for(var M=Array(E.position.length*.5),z=0;z2){for(var I=!E.position[0].length,k=r.mallocFloat(this.count*2),B=0,O=0;B1?T.align[Vt]:T.align[0]:T.align;if(typeof It=="number")return It;switch(It){case"right":case"end":return-kt;case"center":case"centre":case"middle":return-kt*.5}return 0})),this.baseline==null&&E.baseline==null&&(E.baseline=0),E.baseline!=null&&(this.baseline=E.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(kt,Vt){var It=(T.font[Vt]||T.font[0]).metrics,re=0;return re+=It.bottom*.5,typeof kt=="number"?re+=kt-It.baseline:re+=-It[kt],re*=-1,re})),E.color!=null)if(E.color||(E.color="transparent"),typeof E.color=="string"||!isNaN(E.color))this.color=h(E.color,"uint8");else{var Tt;if(typeof E.color[0]=="number"&&E.color.length>this.counts.length){var wt=E.color.length;Tt=r.mallocUint8(wt);for(var Rt=(E.color.subarray||E.color.slice).bind(E.color),bt=0;bt4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Lt){var Ht=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(Ht);for(var Ut=0;Ut1?this.counts[Ut]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ut]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Ut*4,Ut*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ut]:this.opacity,baseline:this.baselineOffset[Ut]!=null?this.baselineOffset[Ut]:this.baselineOffset[0],align:this.align?this.alignOffset[Ut]!=null?this.alignOffset[Ut]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ut]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Ut*2,Ut*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},A.prototype.destroy=function(){},A.prototype.kerning=!0,A.prototype.position={constant:new Float32Array(2)},A.prototype.translate=null,A.prototype.scale=null,A.prototype.font=null,A.prototype.text="",A.prototype.positionOffset=[0,0],A.prototype.opacity=1,A.prototype.color=new Uint8Array([0,0,0,255]),A.prototype.alignOffset=[0,0],A.maxAtlasSize=1024,A.atlasCanvas=document.createElement("canvas"),A.atlasContext=A.atlasCanvas.getContext("2d",{alpha:!1}),A.baseFontSize=64,A.fonts={};function _(y){return typeof y=="function"&&y._gl&&y.prop&&y.texture&&y.buffer}G.exports=A},55212:function(G,U,t){var g=t(55616);G.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},i(r)?r={container:r}:S(r)?r={container:r}:x(r)?r={gl:r}:r=g(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=t.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var e=document.querySelector(r.container);if(!e)throw Error("Element "+r.container+" is not found");r.container=e}i(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=h(),r.container.appendChild(r.canvas),C(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=h(),r.container.appendChild(r.canvas),C(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{r.gl=r.canvas.getContext(a,r.attrs)}catch{}return r.gl}),r.gl};function C(p){if(p.container)if(p.container==document.body)document.body.style.width||(p.canvas.width=p.width||p.pixelRatio*t.g.innerWidth),document.body.style.height||(p.canvas.height=p.height||p.pixelRatio*t.g.innerHeight);else{var r=p.container.getBoundingClientRect();p.canvas.width=p.width||r.right-r.left,p.canvas.height=p.height||r.bottom-r.top}}function i(p){return typeof p.getContext=="function"&&"width"in p&&"height"in p}function S(p){return typeof p.nodeName=="string"&&typeof p.appendChild=="function"&&typeof p.getBoundingClientRect=="function"}function x(p){return typeof p.drawArrays=="function"||typeof p.drawElements=="function"}function h(){var p=document.createElement("canvas");return p.style.position="absolute",p.style.top=0,p.style.left=0,p}},26444:function(G){G.exports=function(U){typeof U=="string"&&(U=[U]);for(var t=[].slice.call(arguments,1),g=[],C=0;C */U.read=function(t,g,C,i,S){var x,h,p=S*8-i-1,r=(1<>1,a=-7,n=C?S-1:0,f=C?-1:1,c=t[g+n];for(n+=f,x=c&(1<<-a)-1,c>>=-a,a+=p;a>0;x=x*256+t[g+n],n+=f,a-=8);for(h=x&(1<<-a)-1,x>>=-a,a+=i;a>0;h=h*256+t[g+n],n+=f,a-=8);if(x===0)x=1-e;else{if(x===r)return h?NaN:(c?-1:1)*(1/0);h=h+Math.pow(2,i),x=x-e}return(c?-1:1)*h*Math.pow(2,x-i)},U.write=function(t,g,C,i,S,x){var h,p,r,e=x*8-S-1,a=(1<>1,f=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=i?0:x-1,l=i?1:-1,m=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(p=isNaN(g)?1:0,h=a):(h=Math.floor(Math.log(g)/Math.LN2),g*(r=Math.pow(2,-h))<1&&(h--,r*=2),h+n>=1?g+=f/r:g+=f*Math.pow(2,1-n),g*r>=2&&(h++,r/=2),h+n>=a?(p=0,h=a):h+n>=1?(p=(g*r-1)*Math.pow(2,S),h=h+n):(p=g*Math.pow(2,n-1)*Math.pow(2,S),h=0));S>=8;t[C+c]=p&255,c+=l,p/=256,S-=8);for(h=h<0;t[C+c]=h&255,c+=l,h/=256,e-=8);t[C+c-l]|=m*128}},6768:function(G){typeof Object.create=="function"?G.exports=function(t,g){g&&(t.super_=g,t.prototype=Object.create(g.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:G.exports=function(t,g){if(g){t.super_=g;var C=function(){};C.prototype=g.prototype,t.prototype=new C,t.prototype.constructor=t}}},91148:function(G,U,t){var g=t(46672)(),C=t(99676),i=C("Object.prototype.toString"),S=function(r){return g&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:i(r)==="[object Arguments]"},x=function(r){return S(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&i(r)!=="[object Array]"&&i(r.callee)==="[object Function]"},h=function(){return S(arguments)}();S.isLegacyArguments=x,G.exports=h?S:x},24200:function(G){G.exports=!0},90720:function(G){var U=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,g,C;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{g=Object.defineProperty({},"length",{get:function(){throw C}}),C={},t(function(){throw 42},null,g)}catch(b){b!==C&&(t=null)}else t=null;var i=/^\s*class\b/,S=function(u){try{var o=U.call(u);return i.test(o)}catch{return!1}},x=function(u){try{return S(u)?!1:(U.call(u),!0)}catch{return!1}},h=Object.prototype.toString,p="[object Object]",r="[object Function]",e="[object GeneratorFunction]",a="[object HTMLAllCollection]",n="[object HTML document.all class]",f="[object HTMLCollection]",c=typeof Symbol=="function"&&!!Symbol.toStringTag,l=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var v=document.all;h.call(v)===h.call(document.all)&&(m=function(u){if((l||!u)&&(typeof u>"u"||typeof u=="object"))try{var o=h.call(u);return(o===a||o===n||o===f||o===p)&&u("")==null}catch{}return!1})}G.exports=t?function(u){if(m(u))return!0;if(!u||typeof u!="function"&&typeof u!="object")return!1;try{t(u,null,g)}catch(o){if(o!==C)return!1}return!S(u)&&x(u)}:function(u){if(m(u))return!0;if(!u||typeof u!="function"&&typeof u!="object")return!1;if(c)return x(u);if(S(u))return!1;var o=h.call(u);return o!==r&&o!==e&&!/^\[object HTML/.test(o)?!1:x(u)}},84420:function(G,U,t){var g=Object.prototype.toString,C=Function.prototype.toString,i=/^\s*(?:function)?\*/,S=t(46672)(),x=Object.getPrototypeOf,h=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},p;G.exports=function(e){if(typeof e!="function")return!1;if(i.test(C.call(e)))return!0;if(!S){var a=g.call(e);return a==="[object GeneratorFunction]"}if(!x)return!1;if(typeof p>"u"){var n=h();p=n?x(n):!1}return x(e)===p}},96604:function(G){G.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(G){G.exports=function(t){return t!==t}},1560:function(G,U,t){var g=t(57916),C=t(81288),i=t(85992),S=t(57740),x=t(59736),h=g(S(),Number);C(h,{getPolyfill:S,implementation:i,shim:x}),G.exports=h},57740:function(G,U,t){var g=t(85992);G.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:g}},59736:function(G,U,t){var g=t(81288),C=t(57740);G.exports=function(){var S=C();return g(Number,{isNaN:S},{isNaN:function(){return Number.isNaN!==S}}),S}},18400:function(G){G.exports=function(U){var t=typeof U;return U!==null&&(t==="object"||t==="function")}},58908:function(G){var U=Object.prototype.toString;G.exports=function(t){var g;return U.call(t)==="[object Object]"&&(g=Object.getPrototypeOf(t),g===null||g===Object.getPrototypeOf({}))}},94576:function(G){G.exports=function(U){for(var t=U.length,g,C=0;C13)&&g!==32&&g!==133&&g!==160&&g!==5760&&g!==6158&&(g<8192||g>8205)&&g!==8232&&g!==8233&&g!==8239&&g!==8287&&g!==8288&&g!==12288&&g!==65279)return!1;return!0}},53520:function(G){G.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},7728:function(G,U,t){var g=t(46492),C=t(63436),i=t(99676),S=i("Object.prototype.toString"),x=t(46672)(),h=t(2304),p=typeof globalThis>"u"?t.g:globalThis,r=C(),e=i("Array.prototype.indexOf",!0)||function(m,v){for(var b=0;b-1}return h?c(m):!1}},76244:function(G){G.exports=Math.log2||function(U){return Math.log(U)*Math.LOG2E}},62644:function(G,U,t){G.exports=C;var g=t(93784);function C(i,S){S||(S=i,i=window);var x=0,h=0,p=0,r={shift:!1,alt:!1,control:!1,meta:!1},e=!1;function a(w){var A=!1;return"altKey"in w&&(A=A||w.altKey!==r.alt,r.alt=!!w.altKey),"shiftKey"in w&&(A=A||w.shiftKey!==r.shift,r.shift=!!w.shiftKey),"ctrlKey"in w&&(A=A||w.ctrlKey!==r.control,r.control=!!w.ctrlKey),"metaKey"in w&&(A=A||w.metaKey!==r.meta,r.meta=!!w.metaKey),A}function n(w,A){var _=g.x(A),y=g.y(A);"buttons"in A&&(w=A.buttons|0),(w!==x||_!==h||y!==p||a(A))&&(x=w|0,h=_||0,p=y||0,S&&S(x,h,p,r))}function f(w){n(0,w)}function c(){(x||h||p||r.shift||r.alt||r.meta||r.control)&&(h=p=0,x=0,r.shift=r.alt=r.control=r.meta=!1,S&&S(0,0,0,r))}function l(w){a(w)&&S&&S(x,h,p,r)}function m(w){g.buttons(w)===0?n(0,w):n(x,w)}function v(w){n(x|g.buttons(w),w)}function b(w){n(x&~g.buttons(w),w)}function u(){e||(e=!0,i.addEventListener("mousemove",m),i.addEventListener("mousedown",v),i.addEventListener("mouseup",b),i.addEventListener("mouseleave",f),i.addEventListener("mouseenter",f),i.addEventListener("mouseout",f),i.addEventListener("mouseover",f),i.addEventListener("blur",c),i.addEventListener("keyup",l),i.addEventListener("keydown",l),i.addEventListener("keypress",l),i!==window&&(window.addEventListener("blur",c),window.addEventListener("keyup",l),window.addEventListener("keydown",l),window.addEventListener("keypress",l)))}function o(){e&&(e=!1,i.removeEventListener("mousemove",m),i.removeEventListener("mousedown",v),i.removeEventListener("mouseup",b),i.removeEventListener("mouseleave",f),i.removeEventListener("mouseenter",f),i.removeEventListener("mouseout",f),i.removeEventListener("mouseover",f),i.removeEventListener("blur",c),i.removeEventListener("keyup",l),i.removeEventListener("keydown",l),i.removeEventListener("keypress",l),i!==window&&(window.removeEventListener("blur",c),window.removeEventListener("keyup",l),window.removeEventListener("keydown",l),window.removeEventListener("keypress",l)))}u();var d={element:i};return Object.defineProperties(d,{enabled:{get:function(){return e},set:function(w){w?u():o()},enumerable:!0},buttons:{get:function(){return x},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return r},enumerable:!0}}),d}},29128:function(G){var U={left:0,top:0};G.exports=t;function t(C,i,S){i=i||C.currentTarget||C.srcElement,Array.isArray(S)||(S=[0,0]);var x=C.clientX||0,h=C.clientY||0,p=g(i);return S[0]=x-p.left,S[1]=h-p.top,S}function g(C){return C===window||C===document||C===document.body?U:C.getBoundingClientRect()}},93784:function(G,U){function t(S){if(typeof S=="object"){if("buttons"in S)return S.buttons;if("which"in S){var x=S.which;if(x===2)return 4;if(x===3)return 2;if(x>0)return 1<=0)return 1<0&&r(a,w))}catch(A){c.call(new m(w),A)}}}function c(o){var d=this;d.triggered||(d.triggered=!0,d.def&&(d=d.def),d.msg=o,d.state=2,d.chain.length>0&&r(a,d))}function l(o,d,w,A){for(var _=0;_7&&(e.push(d.splice(0,7)),d.unshift("C"));break;case"S":var A=h,_=b;(r=="C"||r=="S")&&(A+=A-a,_+=_-n),d=["C",A,_,d[1],d[2],d[3],d[4]];break;case"T":r=="Q"||r=="T"?(l=h*2-l,m=b*2-m):(l=h,m=b),d=i(h,b,l,m,d[1],d[2]);break;case"Q":l=d[1],m=d[2],d=i(h,b,d[1],d[2],d[3],d[4]);break;case"L":d=C(h,b,d[1],d[2]);break;case"H":d=C(h,b,d[1],b);break;case"V":d=C(h,b,h,d[1]);break;case"Z":d=C(h,b,f,c);break}r=w,h=d[d.length-2],b=d[d.length-1],d.length>4?(a=d[d.length-4],n=d[d.length-3]):(a=h,n=b),e.push(d)}return e}function C(p,r,e,a){return["C",p,r,e,a,e,a]}function i(p,r,e,a,n,f){return["C",p/3+.6666666666666666*e,r/3+.6666666666666666*a,n/3+.6666666666666666*e,f/3+.6666666666666666*a,n,f]}function S(p,r,e,a,n,f,c,l,m,h){if(h)T=h[0],s=h[1],y=h[2],E=h[3];else{var b=x(p,r,-n);p=b.x,r=b.y,b=x(l,m,-n),l=b.x,m=b.y;var u=(p-l)/2,o=(r-m)/2,d=u*u/(e*e)+o*o/(a*a);d>1&&(d=Math.sqrt(d),e=d*e,a=d*a);var w=e*e,A=a*a,_=(f==c?-1:1)*Math.sqrt(Math.abs((w*A-w*o*o-A*u*u)/(w*o*o+A*u*u)));_==1/0&&(_=1);var y=_*e*o/a+(p+l)/2,E=_*-a*u/e+(r+m)/2,T=Math.asin(((r-E)/a).toFixed(9)),s=Math.asin(((m-E)/a).toFixed(9));T=ps&&(T=T-U*2),!c&&s>T&&(s=s-U*2)}if(Math.abs(s-T)>t){var L=s,M=l,z=m;s=T+t*(c&&s>T?1:-1),l=y+e*Math.cos(s),m=E+a*Math.sin(s);var D=S(l,m,e,a,n,0,c,M,z,[s,L,y,E])}var N=Math.tan((s-T)/4),I=4/3*e*N,k=4/3*a*N,B=[2*p-(p+I*Math.sin(T)),2*r-(r-k*Math.cos(T)),l+I*Math.sin(s),m-k*Math.cos(s),l,m];if(h)return B;D&&(B=B.concat(D));for(var O=0;O0&&r(a,w))}catch(A){c.call(new m(w),A)}}}function c(o){var d=this;d.triggered||(d.triggered=!0,d.def&&(d=d.def),d.msg=o,d.state=2,d.chain.length>0&&r(a,d))}function l(o,d,w,A){for(var _=0;_7&&(e.push(d.splice(0,7)),d.unshift("C"));break;case"S":var A=v,_=b;(r=="C"||r=="S")&&(A+=A-a,_+=_-n),d=["C",A,_,d[1],d[2],d[3],d[4]];break;case"T":r=="Q"||r=="T"?(l=v*2-l,m=b*2-m):(l=v,m=b),d=i(v,b,l,m,d[1],d[2]);break;case"Q":l=d[1],m=d[2],d=i(v,b,d[1],d[2],d[3],d[4]);break;case"L":d=C(v,b,d[1],d[2]);break;case"H":d=C(v,b,d[1],b);break;case"V":d=C(v,b,v,d[1]);break;case"Z":d=C(v,b,f,c);break}r=w,v=d[d.length-2],b=d[d.length-1],d.length>4?(a=d[d.length-4],n=d[d.length-3]):(a=v,n=b),e.push(d)}return e}function C(p,r,e,a){return["C",p,r,e,a,e,a]}function i(p,r,e,a,n,f){return["C",p/3+.6666666666666666*e,r/3+.6666666666666666*a,n/3+.6666666666666666*e,f/3+.6666666666666666*a,n,f]}function S(p,r,e,a,n,f,c,l,m,v){if(v)T=v[0],s=v[1],y=v[2],E=v[3];else{var b=x(p,r,-n);p=b.x,r=b.y,b=x(l,m,-n),l=b.x,m=b.y;var u=(p-l)/2,o=(r-m)/2,d=u*u/(e*e)+o*o/(a*a);d>1&&(d=Math.sqrt(d),e=d*e,a=d*a);var w=e*e,A=a*a,_=(f==c?-1:1)*Math.sqrt(Math.abs((w*A-w*o*o-A*u*u)/(w*o*o+A*u*u)));_==1/0&&(_=1);var y=_*e*o/a+(p+l)/2,E=_*-a*u/e+(r+m)/2,T=Math.asin(((r-E)/a).toFixed(9)),s=Math.asin(((m-E)/a).toFixed(9));T=ps&&(T=T-U*2),!c&&s>T&&(s=s-U*2)}if(Math.abs(s-T)>t){var L=s,M=l,z=m;s=T+t*(c&&s>T?1:-1),l=y+e*Math.cos(s),m=E+a*Math.sin(s);var D=S(l,m,e,a,n,0,c,M,z,[s,L,y,E])}var N=Math.tan((s-T)/4),I=4/3*e*N,k=4/3*a*N,B=[2*p-(p+I*Math.sin(T)),2*r-(r-k*Math.cos(T)),l+I*Math.sin(s),m-k*Math.cos(s),l,m];if(v)return B;D&&(B=B.concat(D));for(var O=0;O"u")return!1;for(var c in window)try{if(!a["$"+c]&&C.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{e(window[c])}catch{return!0}}catch{return!0}return!1}(),f=function(c){if(typeof window>"u"||!n)return e(c);try{return e(c)}catch{return!1}};g=function(l){var m=l!==null&&typeof l=="object",h=i.call(l)==="[object Function]",b=S(l),u=m&&i.call(l)==="[object String]",o=[];if(!m&&!h&&!b)throw new TypeError("Object.keys called on a non-object");var d=p&&h;if(u&&l.length>0&&!C.call(l,0))for(var w=0;w0)for(var A=0;A=0&&U.call(g.callee)==="[object Function]"),i}},32868:function(G){function U(C,i){if(typeof C!="string")return[C];var S=[C];typeof i=="string"||Array.isArray(i)?i={brackets:i}:i||(i={});var x=i.brackets?Array.isArray(i.brackets)?i.brackets:[i.brackets]:["{}","[]","()"],v=i.escape||"___",p=!!i.flat;x.forEach(function(a){var n=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),f=[];function c(l,m,h){var b=S.push(l.slice(a[0].length,-a[1].length))-1;return f.push(b),v+b+v}S.forEach(function(l,m){for(var h,b=0;l!=h;)if(h=l,l=l.replace(n,c),b++>1e4)throw Error("References have circular dependency. Please, check them.");S[m]=l}),f=f.reverse(),S=S.map(function(l){return f.forEach(function(m){l=l.replace(new RegExp("(\\"+v+m+"\\"+v+")","g"),a[0]+"$1"+a[1])}),l})});var r=new RegExp("\\"+v+"([0-9]+)\\"+v);function e(a,n,f){for(var c=[],l,m=0;l=r.exec(a);){if(m++>1e4)throw Error("Circular references in parenthesis");c.push(a.slice(0,l.index)),c.push(e(n[l[1]],n)),a=a.slice(l.index+l[0].length)}return c.push(a),c}return p?S:e(S[0],S)}function t(C,i){if(i&&i.flat){var S=i&&i.escape||"___",x=C[0],v;if(!x)return"";for(var p=new RegExp("\\"+S+"([0-9]+)\\"+S),r=0;x!=v;){if(r++>1e4)throw Error("Circular references in "+C);v=x,x=x.replace(p,e)}return x}return C.reduce(function a(n,f){return Array.isArray(f)&&(f=f.reduce(a,"")),n+f},"");function e(a,n){if(C[n]==null)throw Error("Reference "+n+"is undefined");return C[n]}}function g(C,i){return Array.isArray(C)?t(C,i):U(C,i)}g.parse=U,g.stringify=t,G.exports=g},51160:function(G,U,t){var g=t(55616);G.exports=C;function C(i){var S;return arguments.length>1&&(i=arguments),typeof i=="string"?i=i.split(/\s/).map(parseFloat):typeof i=="number"&&(i=[i]),i.length&&typeof i[0]=="number"?i.length===1?S={width:i[0],height:i[0],x:0,y:0}:i.length===2?S={width:i[0],height:i[1],x:0,y:0}:S={x:i[0],y:i[1],width:i[2]-i[0]||0,height:i[3]-i[1]||0}:i&&(i=g(i,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),S={x:i.left||0,y:i.top||0},i.width==null?i.right?S.width=i.right-S.x:S.width=0:S.width=i.width,i.height==null?i.bottom?S.height=i.bottom-S.y:S.height=0:S.height=i.height),S}},21984:function(G){G.exports=g;var U={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},t=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function g(S){var x=[];return S.replace(t,function(v,p,r){var e=p.toLowerCase();for(r=i(r),e=="m"&&r.length>2&&(x.push([p].concat(r.splice(0,2))),e="l",p=p=="m"?"l":"L");;){if(r.length==U[e])return r.unshift(p),x.push(r);if(r.lengthx!=c>x&&S<(f-a)*(x-n)/(c-n)+a;l&&(v=!v)}return v}},14756:function(G,U,t){/* +*/var U=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;function C(S){if(S==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(S)}function i(){try{if(!Object.assign)return!1;var S=new String("abc");if(S[5]="de",Object.getOwnPropertyNames(S)[0]==="5")return!1;for(var x={},h=0;h<10;h++)x["_"+String.fromCharCode(h)]=h;var p=Object.getOwnPropertyNames(x).map(function(e){return x[e]});if(p.join("")!=="0123456789")return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}G.exports=i()?Object.assign:function(S,x){for(var h,p=C(S),r,e=1;e"u")return!1;for(var c in window)try{if(!a["$"+c]&&C.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{e(window[c])}catch{return!0}}catch{return!0}return!1}(),f=function(c){if(typeof window>"u"||!n)return e(c);try{return e(c)}catch{return!1}};g=function(l){var m=l!==null&&typeof l=="object",v=i.call(l)==="[object Function]",b=S(l),u=m&&i.call(l)==="[object String]",o=[];if(!m&&!v&&!b)throw new TypeError("Object.keys called on a non-object");var d=p&&v;if(u&&l.length>0&&!C.call(l,0))for(var w=0;w0)for(var A=0;A=0&&U.call(g.callee)==="[object Function]"),i}},32868:function(G){function U(C,i){if(typeof C!="string")return[C];var S=[C];typeof i=="string"||Array.isArray(i)?i={brackets:i}:i||(i={});var x=i.brackets?Array.isArray(i.brackets)?i.brackets:[i.brackets]:["{}","[]","()"],h=i.escape||"___",p=!!i.flat;x.forEach(function(a){var n=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),f=[];function c(l,m,v){var b=S.push(l.slice(a[0].length,-a[1].length))-1;return f.push(b),h+b+h}S.forEach(function(l,m){for(var v,b=0;l!=v;)if(v=l,l=l.replace(n,c),b++>1e4)throw Error("References have circular dependency. Please, check them.");S[m]=l}),f=f.reverse(),S=S.map(function(l){return f.forEach(function(m){l=l.replace(new RegExp("(\\"+h+m+"\\"+h+")","g"),a[0]+"$1"+a[1])}),l})});var r=new RegExp("\\"+h+"([0-9]+)\\"+h);function e(a,n,f){for(var c=[],l,m=0;l=r.exec(a);){if(m++>1e4)throw Error("Circular references in parenthesis");c.push(a.slice(0,l.index)),c.push(e(n[l[1]],n)),a=a.slice(l.index+l[0].length)}return c.push(a),c}return p?S:e(S[0],S)}function t(C,i){if(i&&i.flat){var S=i&&i.escape||"___",x=C[0],h;if(!x)return"";for(var p=new RegExp("\\"+S+"([0-9]+)\\"+S),r=0;x!=h;){if(r++>1e4)throw Error("Circular references in "+C);h=x,x=x.replace(p,e)}return x}return C.reduce(function a(n,f){return Array.isArray(f)&&(f=f.reduce(a,"")),n+f},"");function e(a,n){if(C[n]==null)throw Error("Reference "+n+"is undefined");return C[n]}}function g(C,i){return Array.isArray(C)?t(C,i):U(C,i)}g.parse=U,g.stringify=t,G.exports=g},51160:function(G,U,t){var g=t(55616);G.exports=C;function C(i){var S;return arguments.length>1&&(i=arguments),typeof i=="string"?i=i.split(/\s/).map(parseFloat):typeof i=="number"&&(i=[i]),i.length&&typeof i[0]=="number"?i.length===1?S={width:i[0],height:i[0],x:0,y:0}:i.length===2?S={width:i[0],height:i[1],x:0,y:0}:S={x:i[0],y:i[1],width:i[2]-i[0]||0,height:i[3]-i[1]||0}:i&&(i=g(i,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),S={x:i.left||0,y:i.top||0},i.width==null?i.right?S.width=i.right-S.x:S.width=0:S.width=i.width,i.height==null?i.bottom?S.height=i.bottom-S.y:S.height=0:S.height=i.height),S}},21984:function(G){G.exports=g;var U={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},t=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function g(S){var x=[];return S.replace(t,function(h,p,r){var e=p.toLowerCase();for(r=i(r),e=="m"&&r.length>2&&(x.push([p].concat(r.splice(0,2))),e="l",p=p=="m"?"l":"L");;){if(r.length==U[e])return r.unshift(p),x.push(r);if(r.lengthx!=c>x&&S<(f-a)*(x-n)/(c-n)+a;l&&(h=!h)}return h}},14756:function(G,U,t){/* * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc * @license MIT * @preserve Project Home: https://github.com/voidqk/polybooljs - */var g=t(7688),C=t(28648),i=t(72200),S=t(11403),x=t(82368),v=t(17792),p=!1,r=C(),e;e={buildLog:function(n){return n===!0?p=g():n===!1&&(p=!1),p===!1?!1:p.list},epsilon:function(n){return r.epsilon(n)},segments:function(n){var f=i(!0,r,p);return n.regions.forEach(f.addRegion),{segments:f.calculate(n.inverted),inverted:n.inverted}},combine:function(n,f){var c=i(!1,r,p);return{combined:c.calculate(n.segments,n.inverted,f.segments,f.inverted),inverted1:n.inverted,inverted2:f.inverted}},selectUnion:function(n){return{segments:x.union(n.combined,p),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:x.intersect(n.combined,p),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:x.difference(n.combined,p),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:x.differenceRev(n.combined,p),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:x.xor(n.combined,p),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:S(n.segments,r,p),inverted:n.inverted}},polygonFromGeoJSON:function(n){return v.toPolygon(e,n)},polygonToGeoJSON:function(n){return v.fromPolygon(e,r,n)},union:function(n,f){return a(n,f,e.selectUnion)},intersect:function(n,f){return a(n,f,e.selectIntersect)},difference:function(n,f){return a(n,f,e.selectDifference)},differenceRev:function(n,f){return a(n,f,e.selectDifferenceRev)},xor:function(n,f){return a(n,f,e.selectXor)}};function a(n,f,c){var l=e.segments(n),m=e.segments(f),h=e.combine(l,m),b=c(h);return e.polygon(b)}typeof window=="object"&&(window.PolyBool=e),G.exports=e},7688:function(G){function U(){var t,g=0,C=!1;function i(S,x){return t.list.push({type:S,data:x?JSON.parse(JSON.stringify(x)):void 0}),t}return t={list:[],segmentId:function(){return g++},checkIntersection:function(S,x){return i("check",{seg1:S,seg2:x})},segmentChop:function(S,x){return i("div_seg",{seg:S,pt:x}),i("chop",{seg:S,pt:x})},statusRemove:function(S){return i("pop_seg",{seg:S})},segmentUpdate:function(S){return i("seg_update",{seg:S})},segmentNew:function(S,x){return i("new_seg",{seg:S,primary:x})},segmentRemove:function(S){return i("rem_seg",{seg:S})},tempStatus:function(S,x,v){return i("temp_status",{seg:S,above:x,below:v})},rewind:function(S){return i("rewind",{seg:S})},status:function(S,x,v){return i("status",{seg:S,above:x,below:v})},vert:function(S){return S===C?t:(C=S,i("vert",{x:S}))},log:function(S){return typeof S!="string"&&(S=JSON.stringify(S,!1," ")),i("log",{txt:S})},reset:function(){return i("reset")},selected:function(S){return i("selected",{segs:S})},chainStart:function(S){return i("chain_start",{seg:S})},chainRemoveHead:function(S,x){return i("chain_rem_head",{index:S,pt:x})},chainRemoveTail:function(S,x){return i("chain_rem_tail",{index:S,pt:x})},chainNew:function(S,x){return i("chain_new",{pt1:S,pt2:x})},chainMatch:function(S){return i("chain_match",{index:S})},chainClose:function(S){return i("chain_close",{index:S})},chainAddHead:function(S,x){return i("chain_add_head",{index:S,pt:x})},chainAddTail:function(S,x){return i("chain_add_tail",{index:S,pt:x})},chainConnect:function(S,x){return i("chain_con",{index1:S,index2:x})},chainReverse:function(S){return i("chain_rev",{index:S})},chainJoin:function(S,x){return i("chain_join",{index1:S,index2:x})},done:function(){return i("done")}},t}G.exports=U},28648:function(G){function U(t){typeof t!="number"&&(t=1e-10);var g={epsilon:function(C){return typeof C=="number"&&(t=C),t},pointAboveOrOnLine:function(C,i,S){var x=i[0],v=i[1],p=S[0],r=S[1],e=C[0],a=C[1];return(p-x)*(a-v)-(r-v)*(e-x)>=-t},pointBetween:function(C,i,S){var x=C[1]-i[1],v=S[0]-i[0],p=C[0]-i[0],r=S[1]-i[1],e=p*v+x*r;if(e-t)},pointsSameX:function(C,i){return Math.abs(C[0]-i[0])t!=p-x>t&&(v-a)*(x-n)/(p-n)+a-S>t&&(r=!r),v=a,p=n}return r}};return g}G.exports=U},17792:function(G){var U={toPolygon:function(t,g){function C(x){if(x.length<=0)return t.segments({inverted:!1,regions:[]});function v(e){var a=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[a]})}for(var p=v(x[0]),r=1;r0})}function A(I,k){var B=I.seg,O=k.seg,H=B.start,Y=B.end,j=O.start,et=O.end;x&&x.checkIntersection(B,O);var it=S.linesIntersect(H,Y,j,et);if(it===!1){if(!S.pointsCollinear(H,Y,j)||S.pointsSame(H,et)||S.pointsSame(Y,j))return!1;var ut=S.pointsSame(H,j),J=S.pointsSame(Y,et);if(ut&&J)return k;var X=!ut&&S.pointBetween(H,j,et),tt=!J&&S.pointBetween(Y,j,et);if(ut)return tt?m(k,Y):m(I,et),k;X&&(J||(tt?m(k,Y):m(I,et)),m(k,H))}else it.alongA===0&&(it.alongB===-1?m(I,j):it.alongB===0?m(I,it.pt):it.alongB===1&&m(I,et)),it.alongB===0&&(it.alongA===-1?m(k,H):it.alongA===0?m(k,it.pt):it.alongA===1&&m(k,Y));return!1}for(var _=[];!r.isEmpty();){var y=r.getHead();if(x&&x.vert(y.pt[0]),y.isStart){let I=function(){if(T){var k=A(y,T);if(k)return k}return s?A(y,s):!1};x&&x.segmentNew(y.seg,y.primary);var E=w(y),T=E.before?E.before.ev:null,s=E.after?E.after.ev:null;x&&x.tempStatus(y.seg,T?T.seg:!1,s?s.seg:!1);var L=I();if(L){if(i){var M;y.seg.myFill.below===null?M=!0:M=y.seg.myFill.above!==y.seg.myFill.below,M&&(L.seg.myFill.above=!L.seg.myFill.above)}else L.seg.otherFill=y.seg.myFill;x&&x.segmentUpdate(L.seg),y.other.remove(),y.remove()}if(r.getHead()!==y){x&&x.rewind(y.seg);continue}if(i){var M;y.seg.myFill.below===null?M=!0:M=y.seg.myFill.above!==y.seg.myFill.below,s?y.seg.myFill.below=s.seg.myFill.above:y.seg.myFill.below=b,M?y.seg.myFill.above=!y.seg.myFill.below:y.seg.myFill.above=y.seg.myFill.below}else if(y.seg.otherFill===null){var z;s?y.primary===s.primary?z=s.seg.otherFill.above:z=s.seg.myFill.above:z=y.primary?u:b,y.seg.otherFill={above:z,below:z}}x&&x.status(y.seg,T?T.seg:!1,s?s.seg:!1),y.other.status=E.insert(g.node({ev:y}))}else{var D=y.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(o.exists(D.prev)&&o.exists(D.next)&&A(D.prev.ev,D.next.ev),x&&x.statusRemove(D.ev.seg),D.remove(),!y.primary){var N=y.seg.myFill;y.seg.myFill=y.seg.otherFill,y.seg.otherFill=N}_.push(y.seg)}r.getHead().remove()}return x&&x.done(),_}return i?{addRegion:function(b){for(var u,o=b[b.length-1],d=0;d0&&!this.aborted;){var S=this.ifds_to_read.shift();S.offset&&this.scan_ifd(S.id,S.offset,C)}},g.prototype.read_uint16=function(C){var i=this.input;if(C+2>i.length)throw U("unexpected EOF","EBADDATA");return this.big_endian?i[C]*256+i[C+1]:i[C]+i[C+1]*256},g.prototype.read_uint32=function(C){var i=this.input;if(C+4>i.length)throw U("unexpected EOF","EBADDATA");return this.big_endian?i[C]*16777216+i[C+1]*65536+i[C+2]*256+i[C+3]:i[C]+i[C+1]*256+i[C+2]*65536+i[C+3]*16777216},g.prototype.is_subifd_link=function(C,i){return C===0&&i===34665||C===0&&i===34853||C===34665&&i===40965},g.prototype.exif_format_length=function(C){switch(C){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},g.prototype.exif_format_read=function(C,i){var S;switch(C){case 1:case 2:return S=this.input[i],S;case 6:return S=this.input[i],S|(S&128)*33554430;case 3:return S=this.read_uint16(i),S;case 8:return S=this.read_uint16(i),S|(S&32768)*131070;case 4:return S=this.read_uint32(i),S;case 9:return S=this.read_uint32(i),S|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},g.prototype.scan_ifd=function(C,i,S){var x=this.read_uint16(i);i+=2;for(var v=0;vthis.input.length)throw U("unexpected EOF","EBADDATA");for(var l=[],m=f,h=0;h0&&(this.ifds_to_read.push({id:p,offset:l[0]}),c=!0);var u={is_big_endian:this.big_endian,ifd:C,tag:p,format:r,count:e,entry_offset:i+this.start,data_length:n,data_offset:f+this.start,value:l,is_subifd_link:c};if(S(u)===!1){this.aborted=!0;return}i+=12}C===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(i)})},G.exports.ExifParser=g,G.exports.get_orientation=function(C){var i=0;try{return new g(C,0,C.length).each(function(S){if(S.ifd===0&&S.tag===274&&Array.isArray(S.value))return i=S.value[0],!1}),i}catch{return-1}}},44600:function(G,U,t){var g=t(9696).eW,C=t(9696).eI;function i(n,f){if(n.length<4+f)return null;var c=C(n,f);return n.length>4&15,l=n[4]&15,m=n[5]>>4&15,h=g(n,6),b=8,u=0;uh.width||m.width===h.width&&m.height>h.height?m:h}),c=n.reduce(function(m,h){return m.height>h.height||m.height===h.height&&m.width>h.width?m:h}),l;return f.width>c.height||f.width===c.height&&f.height>c.width?l=f:l=c,l}G.exports.readSizeFromMeta=function(n){var f={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(e(n,f),!!f.sizes.length){var c=a(f.sizes),l=1;f.transforms.forEach(function(h){var b={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},u={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(h.type==="imir"&&(h.value===0?l=u[l]:(l=u[l],l=b[l],l=b[l])),h.type==="irot")for(var o=0;o1&&(l.variants=c.variants),c.orientation&&(l.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=p.length){var m=i(p,c.exif_location.offset),h=p.slice(c.exif_location.offset+m+4,c.exif_location.offset+c.exif_location.length),b=x.get_orientation(h);b>0&&(l.orientation=b)}return l}}}}}}},38728:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).Bz,S=g("BM");G.exports=function(x){if(!(x.length<26)&&C(x,0,S))return{width:i(x,18),height:i(x,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).Bz,S=g("GIF87a"),x=g("GIF89a");G.exports=function(v){if(!(v.length<10)&&!(!C(v,0,S)&&!C(v,0,x)))return{width:i(v,6),height:i(v,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(G,U,t){var g=t(9696).Bz,C=0,i=1,S=16;G.exports=function(x){var v=g(x,0),p=g(x,2),r=g(x,4);if(!(v!==C||p!==i||!r)){for(var e=[],a={width:0,height:0},n=0;na.width||c>a.height)&&(a=l)}return{width:a.width,height:a.height,variants:e,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(G,U,t){var g=t(9696).eW,C=t(9696).wR,i=t(9696).gS,S=t(11688),x=C("Exif\0\0");G.exports=function(v){if(!(v.length<2)&&!(v[0]!==255||v[1]!==216||v[2]!==255))for(var p=2;;){for(;;){if(v.length-p<2)return;if(v[p++]===255)break}for(var r=v[p++],e;r===255;)r=v[p++];if(208<=r&&r<=217||r===1)e=0;else if(192<=r&&r<=254){if(v.length-p<2)return;e=g(v,p)-2,p+=2}else return;if(r===217||r===218)return;var a;if(r===225&&e>=10&&i(v,p,x)&&(a=S.get_orientation(v.slice(p+6,p+e))),e>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(v.length-p0&&(n.orientation=a),n}p+=e}}},37276:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).eI,S=g(`‰PNG\r + */var g=t(7688),C=t(28648),i=t(72200),S=t(11403),x=t(82368),h=t(17792),p=!1,r=C(),e;e={buildLog:function(n){return n===!0?p=g():n===!1&&(p=!1),p===!1?!1:p.list},epsilon:function(n){return r.epsilon(n)},segments:function(n){var f=i(!0,r,p);return n.regions.forEach(f.addRegion),{segments:f.calculate(n.inverted),inverted:n.inverted}},combine:function(n,f){var c=i(!1,r,p);return{combined:c.calculate(n.segments,n.inverted,f.segments,f.inverted),inverted1:n.inverted,inverted2:f.inverted}},selectUnion:function(n){return{segments:x.union(n.combined,p),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:x.intersect(n.combined,p),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:x.difference(n.combined,p),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:x.differenceRev(n.combined,p),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:x.xor(n.combined,p),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:S(n.segments,r,p),inverted:n.inverted}},polygonFromGeoJSON:function(n){return h.toPolygon(e,n)},polygonToGeoJSON:function(n){return h.fromPolygon(e,r,n)},union:function(n,f){return a(n,f,e.selectUnion)},intersect:function(n,f){return a(n,f,e.selectIntersect)},difference:function(n,f){return a(n,f,e.selectDifference)},differenceRev:function(n,f){return a(n,f,e.selectDifferenceRev)},xor:function(n,f){return a(n,f,e.selectXor)}};function a(n,f,c){var l=e.segments(n),m=e.segments(f),v=e.combine(l,m),b=c(v);return e.polygon(b)}typeof window=="object"&&(window.PolyBool=e),G.exports=e},7688:function(G){function U(){var t,g=0,C=!1;function i(S,x){return t.list.push({type:S,data:x?JSON.parse(JSON.stringify(x)):void 0}),t}return t={list:[],segmentId:function(){return g++},checkIntersection:function(S,x){return i("check",{seg1:S,seg2:x})},segmentChop:function(S,x){return i("div_seg",{seg:S,pt:x}),i("chop",{seg:S,pt:x})},statusRemove:function(S){return i("pop_seg",{seg:S})},segmentUpdate:function(S){return i("seg_update",{seg:S})},segmentNew:function(S,x){return i("new_seg",{seg:S,primary:x})},segmentRemove:function(S){return i("rem_seg",{seg:S})},tempStatus:function(S,x,h){return i("temp_status",{seg:S,above:x,below:h})},rewind:function(S){return i("rewind",{seg:S})},status:function(S,x,h){return i("status",{seg:S,above:x,below:h})},vert:function(S){return S===C?t:(C=S,i("vert",{x:S}))},log:function(S){return typeof S!="string"&&(S=JSON.stringify(S,!1," ")),i("log",{txt:S})},reset:function(){return i("reset")},selected:function(S){return i("selected",{segs:S})},chainStart:function(S){return i("chain_start",{seg:S})},chainRemoveHead:function(S,x){return i("chain_rem_head",{index:S,pt:x})},chainRemoveTail:function(S,x){return i("chain_rem_tail",{index:S,pt:x})},chainNew:function(S,x){return i("chain_new",{pt1:S,pt2:x})},chainMatch:function(S){return i("chain_match",{index:S})},chainClose:function(S){return i("chain_close",{index:S})},chainAddHead:function(S,x){return i("chain_add_head",{index:S,pt:x})},chainAddTail:function(S,x){return i("chain_add_tail",{index:S,pt:x})},chainConnect:function(S,x){return i("chain_con",{index1:S,index2:x})},chainReverse:function(S){return i("chain_rev",{index:S})},chainJoin:function(S,x){return i("chain_join",{index1:S,index2:x})},done:function(){return i("done")}},t}G.exports=U},28648:function(G){function U(t){typeof t!="number"&&(t=1e-10);var g={epsilon:function(C){return typeof C=="number"&&(t=C),t},pointAboveOrOnLine:function(C,i,S){var x=i[0],h=i[1],p=S[0],r=S[1],e=C[0],a=C[1];return(p-x)*(a-h)-(r-h)*(e-x)>=-t},pointBetween:function(C,i,S){var x=C[1]-i[1],h=S[0]-i[0],p=C[0]-i[0],r=S[1]-i[1],e=p*h+x*r;if(e-t)},pointsSameX:function(C,i){return Math.abs(C[0]-i[0])t!=p-x>t&&(h-a)*(x-n)/(p-n)+a-S>t&&(r=!r),h=a,p=n}return r}};return g}G.exports=U},17792:function(G){var U={toPolygon:function(t,g){function C(x){if(x.length<=0)return t.segments({inverted:!1,regions:[]});function h(e){var a=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[a]})}for(var p=h(x[0]),r=1;r0})}function A(I,k){var B=I.seg,O=k.seg,H=B.start,Y=B.end,j=O.start,et=O.end;x&&x.checkIntersection(B,O);var it=S.linesIntersect(H,Y,j,et);if(it===!1){if(!S.pointsCollinear(H,Y,j)||S.pointsSame(H,et)||S.pointsSame(Y,j))return!1;var ut=S.pointsSame(H,j),J=S.pointsSame(Y,et);if(ut&&J)return k;var X=!ut&&S.pointBetween(H,j,et),tt=!J&&S.pointBetween(Y,j,et);if(ut)return tt?m(k,Y):m(I,et),k;X&&(J||(tt?m(k,Y):m(I,et)),m(k,H))}else it.alongA===0&&(it.alongB===-1?m(I,j):it.alongB===0?m(I,it.pt):it.alongB===1&&m(I,et)),it.alongB===0&&(it.alongA===-1?m(k,H):it.alongA===0?m(k,it.pt):it.alongA===1&&m(k,Y));return!1}for(var _=[];!r.isEmpty();){var y=r.getHead();if(x&&x.vert(y.pt[0]),y.isStart){let I=function(){if(T){var k=A(y,T);if(k)return k}return s?A(y,s):!1};x&&x.segmentNew(y.seg,y.primary);var E=w(y),T=E.before?E.before.ev:null,s=E.after?E.after.ev:null;x&&x.tempStatus(y.seg,T?T.seg:!1,s?s.seg:!1);var L=I();if(L){if(i){var M;y.seg.myFill.below===null?M=!0:M=y.seg.myFill.above!==y.seg.myFill.below,M&&(L.seg.myFill.above=!L.seg.myFill.above)}else L.seg.otherFill=y.seg.myFill;x&&x.segmentUpdate(L.seg),y.other.remove(),y.remove()}if(r.getHead()!==y){x&&x.rewind(y.seg);continue}if(i){var M;y.seg.myFill.below===null?M=!0:M=y.seg.myFill.above!==y.seg.myFill.below,s?y.seg.myFill.below=s.seg.myFill.above:y.seg.myFill.below=b,M?y.seg.myFill.above=!y.seg.myFill.below:y.seg.myFill.above=y.seg.myFill.below}else if(y.seg.otherFill===null){var z;s?y.primary===s.primary?z=s.seg.otherFill.above:z=s.seg.myFill.above:z=y.primary?u:b,y.seg.otherFill={above:z,below:z}}x&&x.status(y.seg,T?T.seg:!1,s?s.seg:!1),y.other.status=E.insert(g.node({ev:y}))}else{var D=y.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(o.exists(D.prev)&&o.exists(D.next)&&A(D.prev.ev,D.next.ev),x&&x.statusRemove(D.ev.seg),D.remove(),!y.primary){var N=y.seg.myFill;y.seg.myFill=y.seg.otherFill,y.seg.otherFill=N}_.push(y.seg)}r.getHead().remove()}return x&&x.done(),_}return i?{addRegion:function(b){for(var u,o=b[b.length-1],d=0;d0&&!this.aborted;){var S=this.ifds_to_read.shift();S.offset&&this.scan_ifd(S.id,S.offset,C)}},g.prototype.read_uint16=function(C){var i=this.input;if(C+2>i.length)throw U("unexpected EOF","EBADDATA");return this.big_endian?i[C]*256+i[C+1]:i[C]+i[C+1]*256},g.prototype.read_uint32=function(C){var i=this.input;if(C+4>i.length)throw U("unexpected EOF","EBADDATA");return this.big_endian?i[C]*16777216+i[C+1]*65536+i[C+2]*256+i[C+3]:i[C]+i[C+1]*256+i[C+2]*65536+i[C+3]*16777216},g.prototype.is_subifd_link=function(C,i){return C===0&&i===34665||C===0&&i===34853||C===34665&&i===40965},g.prototype.exif_format_length=function(C){switch(C){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},g.prototype.exif_format_read=function(C,i){var S;switch(C){case 1:case 2:return S=this.input[i],S;case 6:return S=this.input[i],S|(S&128)*33554430;case 3:return S=this.read_uint16(i),S;case 8:return S=this.read_uint16(i),S|(S&32768)*131070;case 4:return S=this.read_uint32(i),S;case 9:return S=this.read_uint32(i),S|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},g.prototype.scan_ifd=function(C,i,S){var x=this.read_uint16(i);i+=2;for(var h=0;hthis.input.length)throw U("unexpected EOF","EBADDATA");for(var l=[],m=f,v=0;v0&&(this.ifds_to_read.push({id:p,offset:l[0]}),c=!0);var u={is_big_endian:this.big_endian,ifd:C,tag:p,format:r,count:e,entry_offset:i+this.start,data_length:n,data_offset:f+this.start,value:l,is_subifd_link:c};if(S(u)===!1){this.aborted=!0;return}i+=12}C===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(i)})},G.exports.ExifParser=g,G.exports.get_orientation=function(C){var i=0;try{return new g(C,0,C.length).each(function(S){if(S.ifd===0&&S.tag===274&&Array.isArray(S.value))return i=S.value[0],!1}),i}catch{return-1}}},44600:function(G,U,t){var g=t(9696).eW,C=t(9696).eI;function i(n,f){if(n.length<4+f)return null;var c=C(n,f);return n.length>4&15,l=n[4]&15,m=n[5]>>4&15,v=g(n,6),b=8,u=0;uv.width||m.width===v.width&&m.height>v.height?m:v}),c=n.reduce(function(m,v){return m.height>v.height||m.height===v.height&&m.width>v.width?m:v}),l;return f.width>c.height||f.width===c.height&&f.height>c.width?l=f:l=c,l}G.exports.readSizeFromMeta=function(n){var f={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(e(n,f),!!f.sizes.length){var c=a(f.sizes),l=1;f.transforms.forEach(function(v){var b={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},u={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?l=u[l]:(l=u[l],l=b[l],l=b[l])),v.type==="irot")for(var o=0;o1&&(l.variants=c.variants),c.orientation&&(l.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=p.length){var m=i(p,c.exif_location.offset),v=p.slice(c.exif_location.offset+m+4,c.exif_location.offset+c.exif_location.length),b=x.get_orientation(v);b>0&&(l.orientation=b)}return l}}}}}}},38728:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).Bz,S=g("BM");G.exports=function(x){if(!(x.length<26)&&C(x,0,S))return{width:i(x,18),height:i(x,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).Bz,S=g("GIF87a"),x=g("GIF89a");G.exports=function(h){if(!(h.length<10)&&!(!C(h,0,S)&&!C(h,0,x)))return{width:i(h,6),height:i(h,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(G,U,t){var g=t(9696).Bz,C=0,i=1,S=16;G.exports=function(x){var h=g(x,0),p=g(x,2),r=g(x,4);if(!(h!==C||p!==i||!r)){for(var e=[],a={width:0,height:0},n=0;na.width||c>a.height)&&(a=l)}return{width:a.width,height:a.height,variants:e,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(G,U,t){var g=t(9696).eW,C=t(9696).wR,i=t(9696).gS,S=t(11688),x=C("Exif\0\0");G.exports=function(h){if(!(h.length<2)&&!(h[0]!==255||h[1]!==216||h[2]!==255))for(var p=2;;){for(;;){if(h.length-p<2)return;if(h[p++]===255)break}for(var r=h[p++],e;r===255;)r=h[p++];if(208<=r&&r<=217||r===1)e=0;else if(192<=r&&r<=254){if(h.length-p<2)return;e=g(h,p)-2,p+=2}else return;if(r===217||r===218)return;var a;if(r===225&&e>=10&&i(h,p,x)&&(a=S.get_orientation(h.slice(p+6,p+e))),e>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(h.length-p0&&(n.orientation=a),n}p+=e}}},37276:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).eI,S=g(`‰PNG\r  -`),x=g("IHDR");G.exports=function(v){if(!(v.length<24)&&C(v,0,S)&&C(v,12,x))return{width:i(v,16),height:i(v,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},90328:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).eI,S=g("8BPS\0");G.exports=function(x){if(!(x.length<22)&&C(x,0,S))return{width:i(x,18),height:i(x,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},16024:function(G){function U(a){return a===32||a===9||a===13||a===10}function t(a){return typeof a=="number"&&isFinite(a)&&a>0}function g(a){var n=0,f=a.length;for(a[0]===239&&a[1]===187&&a[2]===191&&(n=3);n]*>/,i=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,S=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,x=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,v=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,p=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function r(a){var n=a.match(S),f=a.match(x),c=a.match(v);return{width:n&&(n[1]||n[2]),height:f&&(f[1]||f[2]),viewbox:c&&(c[1]||c[2])}}function e(a){return p.test(a)?a.match(p)[0]:"px"}G.exports=function(a){if(g(a)){for(var n="",f=0;f>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(n,f){return{width:(n[f+6]<<16|n[f+5]<<8|n[f+4])+1,height:(n[f+9]<n.length)){for(;f+8=10?c=c||r(n,f+8):h==="VP8L"&&b>=9?c=c||e(n,f+8):h==="VP8X"&&b>=10?c=c||a(n,f+8):h==="EXIF"&&(l=x.get_orientation(n.slice(f+8,f+8+b)),f=1/0),f+=8+b}if(c)return l>0&&(c.orientation=l),c}}}},87480:function(G,U,t){G.exports={avif:t(40528),bmp:t(38728),gif:t(5588),ico:t(41924),jpeg:t(87968),png:t(37276),psd:t(90328),svg:t(16024),tiff:t(98792),webp:t(20704)}},19480:function(G,U,t){var g=t(87480);function C(i){for(var S=Object.keys(g),x=0;x1)for(var h=1;h"u"?t.g:window,i=["moz","webkit"],S="AnimationFrame",x=C["request"+S],v=C["cancel"+S]||C["cancelRequest"+S],p=0;!x&&p0}function g(a){var n=0,f=a.length;for(a[0]===239&&a[1]===187&&a[2]===191&&(n=3);n]*>/,i=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,S=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,x=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,h=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,p=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function r(a){var n=a.match(S),f=a.match(x),c=a.match(h);return{width:n&&(n[1]||n[2]),height:f&&(f[1]||f[2]),viewbox:c&&(c[1]||c[2])}}function e(a){return p.test(a)?a.match(p)[0]:"px"}G.exports=function(a){if(g(a)){for(var n="",f=0;f>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(n,f){return{width:(n[f+6]<<16|n[f+5]<<8|n[f+4])+1,height:(n[f+9]<n.length)){for(;f+8=10?c=c||r(n,f+8):v==="VP8L"&&b>=9?c=c||e(n,f+8):v==="VP8X"&&b>=10?c=c||a(n,f+8):v==="EXIF"&&(l=x.get_orientation(n.slice(f+8,f+8+b)),f=1/0),f+=8+b}if(c)return l>0&&(c.orientation=l),c}}}},87480:function(G,U,t){G.exports={avif:t(40528),bmp:t(38728),gif:t(5588),ico:t(41924),jpeg:t(87968),png:t(37276),psd:t(90328),svg:t(16024),tiff:t(98792),webp:t(20704)}},19480:function(G,U,t){var g=t(87480);function C(i){for(var S=Object.keys(g),x=0;x1)for(var v=1;v"u"?t.g:window,i=["moz","webkit"],S="AnimationFrame",x=C["request"+S],h=C["cancel"+S]||C["cancelRequest"+S],p=0;!x&&p1&&(L.scaleRatio=[L.scale[0]*L.viewport.width,L.scale[1]*L.viewport.height],m(L),L.after&&L.after(L))}function T(L){if(L){L.length!=null?typeof L[0]=="number"&&(L=[{positions:L}]):Array.isArray(L)||(L=[L]);var M=0,z=0;if(_.groups=A=L.map(function(H,Y){var j=A[Y];if(H)typeof H=="function"?H={after:H}:typeof H[0]=="number"&&(H={positions:H});else return j;return H=S(H,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),j||(A[Y]=j={id:Y,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},H=x({},w,H)),i(j,H,[{lineWidth:function(et){return+et*.5},capSize:function(et){return+et*.5},opacity:parseFloat,errors:function(et){return et=v(et),z+=et.length,et},positions:function(et,it){return et=v(et,"float64"),it.count=Math.floor(et.length/2),it.bounds=g(et,2),it.offset=M,M+=it.count,et}},{color:function(et,it){var ut=it.count;if(et||(et="transparent"),!Array.isArray(et)||typeof et[0]=="number"){var J=et;et=Array(ut);for(var X=0;X1&&(L.scaleRatio=[L.scale[0]*L.viewport.width,L.scale[1]*L.viewport.height],m(L),L.after&&L.after(L))}function T(L){if(L){L.length!=null?typeof L[0]=="number"&&(L=[{positions:L}]):Array.isArray(L)||(L=[L]);var M=0,z=0;if(_.groups=A=L.map(function(H,Y){var j=A[Y];if(H)typeof H=="function"?H={after:H}:typeof H[0]=="number"&&(H={positions:H});else return j;return H=S(H,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),j||(A[Y]=j={id:Y,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},H=x({},w,H)),i(j,H,[{lineWidth:function(et){return+et*.5},capSize:function(et){return+et*.5},opacity:parseFloat,errors:function(et){return et=h(et),z+=et.length,et},positions:function(et,it){return et=h(et,"float64"),it.count=Math.floor(et.length/2),it.bounds=g(et,2),it.offset=M,M+=it.count,et}},{color:function(et,it){var ut=it.count;if(et||(et="transparent"),!Array.isArray(et)||typeof et[0]=="number"){var J=et;et=Array(ut);for(var X=0;X1&&y.opacity&&(w.regl._refresh(),y.fill&&y.triangles&&y.triangles.length>2&&w.shaders.fill(y),y.thickness&&(y.scale[0]*y.viewport.width>d.precisionThreshold||y.scale[1]*y.viewport.height>d.precisionThreshold||y.join==="rect"||!y.join&&(y.thickness<=2||y.count>=d.maxPoints)?w.shaders.rect(y):w.shaders.miter(y)))}),this},d.prototype.update=function(w){var A=this;if(w){w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);var _=this,y=_.regl,E=_.gl;if(w.forEach(function(z,D){var N=A.passes[D];if(z!==void 0){if(z===null){A.passes[D]=null;return}if(typeof z[0]=="number"&&(z={positions:z}),z=S(z,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),N||(A.passes[D]=N={id:D,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:y.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:y.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:y.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:y.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},z=i({},d.defaults,z)),z.thickness!=null&&(N.thickness=parseFloat(z.thickness)),z.opacity!=null&&(N.opacity=parseFloat(z.opacity)),z.miterLimit!=null&&(N.miterLimit=parseFloat(z.miterLimit)),z.overlay!=null&&(N.overlay=!!z.overlay,D=Z});Q=Q.slice(0,st),Q.push(Z)}for(var nt=function(Mt){var Nt=j.slice($*2,Q[Mt]*2).concat(Z?j.slice(Z*2):[]),jt=(N.hole||[]).map(function(me){return me-Z+(Q[Mt]-$)}),ie=v(Nt,jt);ie=ie.map(function(me){return me+$+(me+$s.length)&&(L=s.length);for(var M=0,z=new Array(L);M1&&y.opacity&&(w.regl._refresh(),y.fill&&y.triangles&&y.triangles.length>2&&w.shaders.fill(y),y.thickness&&(y.scale[0]*y.viewport.width>d.precisionThreshold||y.scale[1]*y.viewport.height>d.precisionThreshold||y.join==="rect"||!y.join&&(y.thickness<=2||y.count>=d.maxPoints)?w.shaders.rect(y):w.shaders.miter(y)))}),this},d.prototype.update=function(w){var A=this;if(w){w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);var _=this,y=_.regl,E=_.gl;if(w.forEach(function(z,D){var N=A.passes[D];if(z!==void 0){if(z===null){A.passes[D]=null;return}if(typeof z[0]=="number"&&(z={positions:z}),z=S(z,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),N||(A.passes[D]=N={id:D,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:y.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:y.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:y.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:y.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},z=i({},d.defaults,z)),z.thickness!=null&&(N.thickness=parseFloat(z.thickness)),z.opacity!=null&&(N.opacity=parseFloat(z.opacity)),z.miterLimit!=null&&(N.miterLimit=parseFloat(z.miterLimit)),z.overlay!=null&&(N.overlay=!!z.overlay,D=Z});Q=Q.slice(0,st),Q.push(Z)}for(var nt=function(Mt){var Nt=j.slice($*2,Q[Mt]*2).concat(Z?j.slice(Z*2):[]),jt=(N.hole||[]).map(function(me){return me-Z+(Q[Mt]-$)}),ie=h(Nt,jt);ie=ie.map(function(me){return me+$+(me+$s.length)&&(L=s.length);for(var M=0,z=new Array(L);MUt)?Lt.tree=l(mt,{bounds:Kt}):Ut&&Ut.length&&(Lt.tree=Ut),Lt.tree){var $t={primitive:"points",usage:"static",data:Lt.tree,type:"uint32"};Lt.elements?Lt.elements($t):Lt.elements=I.elements($t)}var le=w.float32(mt);kt({data:le,usage:"dynamic"});var he=w.fract32(mt,le);return Vt({data:he,usage:"dynamic"}),It({data:new Uint8Array(re),type:"uint8",usage:"stream"}),mt}},{marker:function(mt,Lt,Ht){var Ut=Lt.activation;if(Ut.forEach(function(he){return he&&he.destroy&&he.destroy()}),Ut.length=0,!mt||typeof mt[0]=="number"){var kt=s.addMarker(mt);Ut[kt]=!0}else{for(var Vt=[],It=0,re=Math.min(mt.length,Lt.count);It=0)return D;var N;if(s instanceof Uint8Array||s instanceof Uint8ClampedArray)N=s;else{N=new Uint8Array(s.length);for(var I=0,k=s.length;Iz*4&&(this.tooManyColors=!0),this.updatePalette(M),D.length===1?D[0]:D},y.prototype.updatePalette=function(s){if(!this.tooManyColors){var L=this.maxColors,M=this.paletteTexture,z=Math.ceil(s.length*.25/L);if(z>1){s=s.slice();for(var D=s.length*.25%L;Dz)&&!(!b.lower&&M2?(o[0],o[2],m=o[1],h=o[3]):o.length?(m=o[0],h=o[1]):(o.x,m=o.y,o.x+o.width,h=o.y+o.height),d.length>2?(b=d[0],u=d[2],d[1],d[3]):d.length?(b=d[0],u=d[1]):(b=d.x,d.y,u=d.x+d.width,d.y+d.height),[b,m,u,h]}function n(f){if(typeof f=="number")return[f,f,f,f];if(f.length===2)return[f[0],f[1],f[0],f[1]];var c=v(f);return[c.x,c.y,c.x+c.width,c.y+c.height]}},28624:function(G){(function(U,t){G.exports=t()})(this,function(){function U(pe,Xe){this.id=ct++,this.type=pe,this.data=Xe}function t(pe){if(pe.length===0)return[];var Xe=pe.charAt(0),Ke=pe.charAt(pe.length-1);if(1"u"?1:window.devicePixelRatio,Ie=!1,Pe={},ke=function(Je){},Ve=function(){};if(typeof Xe=="string"?Ke=document.querySelector(Xe):typeof Xe=="object"&&(typeof Xe.nodeName=="string"&&typeof Xe.appendChild=="function"&&typeof Xe.getBoundingClientRect=="function"?Ke=Xe:typeof Xe.drawArrays=="function"||typeof Xe.drawElements=="function"?(ge=Xe,$e=ge.canvas):("gl"in Xe?ge=Xe.gl:"canvas"in Xe?$e=p(Xe.canvas):"container"in Xe&&(or=p(Xe.container)),"attributes"in Xe&&(pe=Xe.attributes),"extensions"in Xe&&(se=v(Xe.extensions)),"optionalExtensions"in Xe&&(Ae=v(Xe.optionalExtensions)),"onDone"in Xe&&(ke=Xe.onDone),"profile"in Xe&&(Ie=!!Xe.profile),"pixelRatio"in Xe&&(Ce=+Xe.pixelRatio),"cachedCode"in Xe&&(Pe=Xe.cachedCode))),Ke&&(Ke.nodeName.toLowerCase()==="canvas"?$e=Ke:or=Ke),!ge){if(!$e){if(Ke=S(or||document.body,ke,Ce),!Ke)return null;$e=Ke.canvas,Ve=Ke.onDestroy}pe.premultipliedAlpha===void 0&&(pe.premultipliedAlpha=!0),ge=x($e,pe)}return ge?{gl:ge,canvas:$e,container:or,extensions:se,optionalExtensions:Ae,pixelRatio:Ce,profile:Ie,cachedCode:Pe,onDone:ke,onDestroy:Ve}:(Ve(),ke("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function e(pe,Xe){function Ke(se){se=se.toLowerCase();var Ae;try{Ae=or[se]=pe.getExtension(se)}catch{}return!!Ae}for(var or={},$e=0;$e>>=Xe,Ke=(255>>=Ke,Xe|=Ke,Ke=(15>>=Ke,Xe|=Ke,Ke=(3>>Ke>>1}function f(){function pe(or){t:{for(var $e=16;268435456>=$e;$e*=16)if(or<=$e){or=$e;break t}or=0}return $e=Ke[n(or)>>2],0<$e.length?$e.pop():new ArrayBuffer(or)}function Xe(or){Ke[n(or.byteLength)>>2].push(or)}var Ke=a(8,function(){return[]});return{alloc:pe,free:Xe,allocType:function(or,$e){var ge=null;switch(or){case 5120:ge=new Int8Array(pe($e),0,$e);break;case 5121:ge=new Uint8Array(pe($e),0,$e);break;case 5122:ge=new Int16Array(pe(2*$e),0,$e);break;case 5123:ge=new Uint16Array(pe(2*$e),0,$e);break;case 5124:ge=new Int32Array(pe(4*$e),0,$e);break;case 5125:ge=new Uint32Array(pe(4*$e),0,$e);break;case 5126:ge=new Float32Array(pe(4*$e),0,$e);break;default:return null}return ge.length!==$e?ge.subarray(0,$e):ge},freeType:function(or){Xe(or.buffer)}}}function c(pe){return!!pe&&typeof pe=="object"&&Array.isArray(pe.shape)&&Array.isArray(pe.stride)&&typeof pe.offset=="number"&&pe.shape.length===pe.stride.length&&(Array.isArray(pe.data)||At(pe.data))}function l(pe,Xe,Ke,or,$e,ge){for(var se=0;seVe&&(Ve=ke.buffer.byteLength,Gt===5123?Ve>>=1:Gt===5125&&(Ve>>=2)),ke.vertCount=Ve,Ve=ur,0>ur&&(Ve=4,ur=ke.buffer.dimension,ur===1&&(Ve=0),ur===2&&(Ve=1),ur===3&&(Ve=4)),ke.primType=Ve}function se(ke){or.elementsCount--,delete Ae[ke.id],ke.buffer.destroy(),ke.buffer=null}var Ae={},Ce=0,Ie={uint8:5121,uint16:5123};Xe.oes_element_index_uint&&(Ie.uint32=5125),$e.prototype.bind=function(){this.buffer.bind()};var Pe=[];return{create:function(ke,Ve){function Je(vr){if(vr)if(typeof vr=="number")ur(vr),hr.primType=4,hr.vertCount=vr|0,hr.type=5121;else{var Yt=null,Gt=35044,Ne=-1,Oe=-1,Qe=0,er=0;Array.isArray(vr)||At(vr)||c(vr)?Yt=vr:("data"in vr&&(Yt=vr.data),"usage"in vr&&(Gt=kt[vr.usage]),"primitive"in vr&&(Ne=Kt[vr.primitive]),"count"in vr&&(Oe=vr.count|0),"type"in vr&&(er=Ie[vr.type]),"length"in vr?Qe=vr.length|0:(Qe=Oe,er===5123||er===5122?Qe*=2:(er===5125||er===5124)&&(Qe*=4))),ge(hr,Yt,Gt,Ne,Oe,Qe,er)}else ur(),hr.primType=4,hr.vertCount=0,hr.type=5121;return Je}var ur=Ke.create(null,34963,!0),hr=new $e(ur._buffer);return or.elementsCount++,Je(ke),Je._reglType="elements",Je._elements=hr,Je.subdata=function(vr,Yt){return ur.subdata(vr,Yt),Je},Je.destroy=function(){se(hr)},Je},createStream:function(ke){var Ve=Pe.pop();return Ve||(Ve=new $e(Ke.create(null,34963,!0,!1)._buffer)),ge(Ve,ke,35040,-1,-1,0,0),Ve},destroyStream:function(ke){Pe.push(ke)},getElements:function(ke){return typeof ke=="function"&&ke._elements instanceof $e?ke._elements:null},clear:function(){mt(Ae).forEach(se)}}}function w(pe){for(var Xe=Rt.allocType(5123,pe.length),Ke=0;Ke>>31<<15,$e=(ge<<1>>>24)-127,ge=ge>>13&1023;Xe[Ke]=-24>$e?or:-14>$e?or+(ge+1024>>-14-$e):15<$e?or+31744:or+($e+15<<10)+ge}return Xe}function A(pe){return Array.isArray(pe)||At(pe)}function _(pe){return"[object "+pe+"]"}function y(pe){return Array.isArray(pe)&&(pe.length===0||typeof pe[0]=="number")}function E(pe){return!!(Array.isArray(pe)&&pe.length!==0&&A(pe[0]))}function T(pe){return Object.prototype.toString.call(pe)}function s(pe){if(!pe)return!1;var Xe=T(pe);return 0<=Ft.indexOf(Xe)?!0:y(pe)||E(pe)||c(pe)}function L(pe,Xe){pe.type===36193?(pe.data=w(Xe),Rt.freeType(Xe)):pe.data=Xe}function M(pe,Xe,Ke,or,$e,ge){if(pe=typeof yt[pe]<"u"?yt[pe]:xe[pe]*xt[Xe],ge&&(pe*=6),$e){for(or=0;1<=Ke;)or+=pe*Ke*Ke,Ke/=2;return or}return pe*Ke*or}function z(pe,Xe,Ke,or,$e,ge,se){function Ae(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function Ce(wr,nn){wr.internalformat=nn.internalformat,wr.format=nn.format,wr.type=nn.type,wr.compressed=nn.compressed,wr.premultiplyAlpha=nn.premultiplyAlpha,wr.flipY=nn.flipY,wr.unpackAlignment=nn.unpackAlignment,wr.colorSpace=nn.colorSpace,wr.width=nn.width,wr.height=nn.height,wr.channels=nn.channels}function Ie(wr,nn){if(typeof nn=="object"&&nn){"premultiplyAlpha"in nn&&(wr.premultiplyAlpha=nn.premultiplyAlpha),"flipY"in nn&&(wr.flipY=nn.flipY),"alignment"in nn&&(wr.unpackAlignment=nn.alignment),"colorSpace"in nn&&(wr.colorSpace=cn[nn.colorSpace]),"type"in nn&&(wr.type=rn[nn.type]);var $r=wr.width,dn=wr.height,Vn=wr.channels,Tn=!1;"shape"in nn?($r=nn.shape[0],dn=nn.shape[1],nn.shape.length===3&&(Vn=nn.shape[2],Tn=!0)):("radius"in nn&&($r=dn=nn.radius),"width"in nn&&($r=nn.width),"height"in nn&&(dn=nn.height),"channels"in nn&&(Vn=nn.channels,Tn=!0)),wr.width=$r|0,wr.height=dn|0,wr.channels=Vn|0,$r=!1,"format"in nn&&($r=nn.format,dn=wr.internalformat=Cn[$r],wr.format=_n[dn],$r in rn&&!("type"in nn)&&(wr.type=rn[$r]),$r in En&&(wr.compressed=!0),$r=!0),!Tn&&$r?wr.channels=xe[wr.format]:Tn&&!$r&&wr.channels!==de[wr.format]&&(wr.format=wr.internalformat=de[wr.channels])}}function Pe(wr){pe.pixelStorei(37440,wr.flipY),pe.pixelStorei(37441,wr.premultiplyAlpha),pe.pixelStorei(37443,wr.colorSpace),pe.pixelStorei(3317,wr.unpackAlignment)}function ke(){Ae.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ve(wr,nn){var $r=null;if(s(nn)?$r=nn:nn&&(Ie(wr,nn),"x"in nn&&(wr.xOffset=nn.x|0),"y"in nn&&(wr.yOffset=nn.y|0),s(nn.data)&&($r=nn.data)),nn.copy){var dn=$e.viewportWidth,Vn=$e.viewportHeight;wr.width=wr.width||dn-wr.xOffset,wr.height=wr.height||Vn-wr.yOffset,wr.needsCopy=!0}else if(!$r)wr.width=wr.width||1,wr.height=wr.height||1,wr.channels=wr.channels||4;else if(At($r))wr.channels=wr.channels||4,wr.data=$r,"type"in nn||wr.type!==5121||(wr.type=Ht[Object.prototype.toString.call($r)]|0);else if(y($r)){switch(wr.channels=wr.channels||4,dn=$r,Vn=dn.length,wr.type){case 5121:case 5123:case 5125:case 5126:Vn=Rt.allocType(wr.type,Vn),Vn.set(dn),wr.data=Vn;break;case 36193:wr.data=w(dn)}wr.alignment=1,wr.needsFree=!0}else if(c($r)){dn=$r.data,Array.isArray(dn)||wr.type!==5121||(wr.type=Ht[Object.prototype.toString.call(dn)]|0);var Vn=$r.shape,Tn=$r.stride,An,Bn,Jn,gi;Vn.length===3?(Jn=Vn[2],gi=Tn[2]):gi=Jn=1,An=Vn[0],Bn=Vn[1],Vn=Tn[0],Tn=Tn[1],wr.alignment=1,wr.width=An,wr.height=Bn,wr.channels=Jn,wr.format=wr.internalformat=de[Jn],wr.needsFree=!0,An=gi,$r=$r.offset,Jn=wr.width,gi=wr.height,Bn=wr.channels;for(var Di=Rt.allocType(wr.type===36193?5126:wr.type,Jn*gi*Bn),Sr=0,kr=0;kr>=Vn,$r.height>>=Vn,Ve($r,dn[Vn]),wr.mipmask|=1<nn;++nn)wr.images[nn]=null;return wr}function Qe(wr){for(var nn=wr.images,$r=0;$rwr){for(var nn=0;nn=--this.refCount&&xr(this)}}),se.profile&&(ge.getTotalTextureSize=function(){var wr=0;return Object.keys(di).forEach(function(nn){wr+=di[nn].stats.size}),wr}),{create2D:function(wr,nn){function $r(Vn,Tn){var An=dn.texInfo;er.call(An);var Bn=Oe();return typeof Vn=="number"?typeof Tn=="number"?Yt(Bn,Vn|0,Tn|0):Yt(Bn,Vn|0,Vn|0):Vn?(fr(An,Vn),Gt(Bn,Vn)):Yt(Bn,1,1),An.genMipmaps&&(Bn.mipmask=(Bn.width<<1)-1),dn.mipmask=Bn.mipmask,Ce(dn,Bn),dn.internalformat=Bn.internalformat,$r.width=Bn.width,$r.height=Bn.height,dr(dn),Ne(Bn,3553),rr(An,3553),mr(),Qe(Bn),se.profile&&(dn.stats.size=M(dn.internalformat,dn.type,Bn.width,Bn.height,An.genMipmaps,!1)),$r.format=Wr[dn.internalformat],$r.type=Ur[dn.type],$r.mag=an[An.magFilter],$r.min=pn[An.minFilter],$r.wrapS=gn[An.wrapS],$r.wrapT=gn[An.wrapT],$r}var dn=new He(3553);return di[dn.id]=dn,ge.textureCount++,$r(wr,nn),$r.subimage=function(Vn,Tn,An,Bn){Tn|=0,An|=0,Bn|=0;var Jn=ur();return Ce(Jn,dn),Jn.width=0,Jn.height=0,Ve(Jn,Vn),Jn.width=Jn.width||(dn.width>>Bn)-Tn,Jn.height=Jn.height||(dn.height>>Bn)-An,dr(dn),Je(Jn,3553,Tn,An,Bn),mr(),hr(Jn),$r},$r.resize=function(Vn,Tn){var An=Vn|0,Bn=Tn|0||An;if(An===dn.width&&Bn===dn.height)return $r;$r.width=dn.width=An,$r.height=dn.height=Bn,dr(dn);for(var Jn=0;dn.mipmask>>Jn;++Jn){var gi=An>>Jn,Di=Bn>>Jn;if(!gi||!Di)break;pe.texImage2D(3553,Jn,dn.format,gi,Di,0,dn.format,dn.type,null)}return mr(),se.profile&&(dn.stats.size=M(dn.internalformat,dn.type,An,Bn,!1,!1)),$r},$r._reglType="texture2d",$r._texture=dn,se.profile&&($r.stats=dn.stats),$r.destroy=function(){dn.decRef()},$r},createCube:function(wr,nn,$r,dn,Vn,Tn){function An(gi,Di,Sr,kr,Ar,Or){var xn,In=Bn.texInfo;for(er.call(In),xn=0;6>xn;++xn)Jn[xn]=Oe();if(typeof gi=="number"||!gi)for(gi=gi|0||1,xn=0;6>xn;++xn)Yt(Jn[xn],gi,gi);else if(typeof gi=="object")if(Di)Gt(Jn[0],gi),Gt(Jn[1],Di),Gt(Jn[2],Sr),Gt(Jn[3],kr),Gt(Jn[4],Ar),Gt(Jn[5],Or);else if(fr(In,gi),Ie(Bn,gi),"faces"in gi)for(gi=gi.faces,xn=0;6>xn;++xn)Ce(Jn[xn],Bn),Gt(Jn[xn],gi[xn]);else for(xn=0;6>xn;++xn)Gt(Jn[xn],gi);for(Ce(Bn,Jn[0]),Bn.mipmask=In.genMipmaps?(Jn[0].width<<1)-1:Jn[0].mipmask,Bn.internalformat=Jn[0].internalformat,An.width=Jn[0].width,An.height=Jn[0].height,dr(Bn),xn=0;6>xn;++xn)Ne(Jn[xn],34069+xn);for(rr(In,34067),mr(),se.profile&&(Bn.stats.size=M(Bn.internalformat,Bn.type,An.width,An.height,In.genMipmaps,!0)),An.format=Wr[Bn.internalformat],An.type=Ur[Bn.type],An.mag=an[In.magFilter],An.min=pn[In.minFilter],An.wrapS=gn[In.wrapS],An.wrapT=gn[In.wrapT],xn=0;6>xn;++xn)Qe(Jn[xn]);return An}var Bn=new He(34067);di[Bn.id]=Bn,ge.cubeCount++;var Jn=Array(6);return An(wr,nn,$r,dn,Vn,Tn),An.subimage=function(gi,Di,Sr,kr,Ar){Sr|=0,kr|=0,Ar|=0;var Or=ur();return Ce(Or,Bn),Or.width=0,Or.height=0,Ve(Or,Di),Or.width=Or.width||(Bn.width>>Ar)-Sr,Or.height=Or.height||(Bn.height>>Ar)-kr,dr(Bn),Je(Or,34069+gi,Sr,kr,Ar),mr(),hr(Or),An},An.resize=function(gi){if(gi|=0,gi!==Bn.width){An.width=Bn.width=gi,An.height=Bn.height=gi,dr(Bn);for(var Di=0;6>Di;++Di)for(var Sr=0;Bn.mipmask>>Sr;++Sr)pe.texImage2D(34069+Di,Sr,Bn.format,gi>>Sr,gi>>Sr,0,Bn.format,Bn.type,null);return mr(),se.profile&&(Bn.stats.size=M(Bn.internalformat,Bn.type,An.width,An.height,!1,!0)),An}},An._reglType="textureCube",An._texture=Bn,se.profile&&(An.stats=Bn.stats),An.destroy=function(){Bn.decRef()},An},clear:function(){for(var wr=0;wrdn;++dn)if($r.mipmask&1<>dn,$r.height>>dn,0,$r.internalformat,$r.type,null);else for(var Vn=0;6>Vn;++Vn)pe.texImage2D(34069+Vn,dn,$r.internalformat,$r.width>>dn,$r.height>>dn,0,$r.internalformat,$r.type,null);rr($r.texInfo,$r.target)})},refresh:function(){for(var wr=0;wrpr;++pr){for(rn=0;rnxr;++xr)mr[xr].resize(pr);return dr.width=dr.height=pr,dr},_reglType:"framebufferCube",destroy:function(){mr.forEach(function(xr){xr.destroy()})}})},clear:function(){mt(rr).forEach(vr)},restore:function(){Ne.cur=null,Ne.next=null,Ne.dirty=!0,mt(rr).forEach(function(He){He.framebuffer=pe.createFramebuffer(),Yt(He)})}})}function N(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function I(pe,Xe,Ke,or,$e,ge,se){function Ae(Yt){if(Yt!==vr.currentVAO){var Gt=Xe.oes_vertex_array_object;Yt?Gt.bindVertexArrayOES(Yt.vao):Gt.bindVertexArrayOES(null),vr.currentVAO=Yt}}function Ce(Yt){if(Yt!==vr.currentVAO){if(Yt)Yt.bindAttrs();else{for(var Gt=Xe.angle_instanced_arrays,Ne=0;Ne=dr.byteLength?mr.subdata(dr):(mr.destroy(),Ne.buffers[fr]=null)),Ne.buffers[fr]||(mr=Ne.buffers[fr]=$e.create(rr,34962,!1,!0)),He.buffer=$e.getBuffer(mr),He.size=He.buffer.dimension|0,He.normalized=!1,He.type=He.buffer.dtype,He.offset=0,He.stride=0,He.divisor=0,He.state=1,Oe[fr]=1}else $e.getBuffer(rr)?(He.buffer=$e.getBuffer(rr),He.size=He.buffer.dimension|0,He.normalized=!1,He.type=He.buffer.dtype,He.offset=0,He.stride=0,He.divisor=0,He.state=1):$e.getBuffer(rr.buffer)?(He.buffer=$e.getBuffer(rr.buffer),He.size=(+rr.size||He.buffer.dimension)|0,He.normalized=!!rr.normalized||!1,He.type="type"in rr?Ut[rr.type]:He.buffer.dtype,He.offset=(rr.offset||0)|0,He.stride=(rr.stride||0)|0,He.divisor=(rr.divisor||0)|0,He.state=1):"x"in rr&&(He.x=+rr.x||0,He.y=+rr.y||0,He.z=+rr.z||0,He.w=+rr.w||0,He.state=2)}for(mr=0;mrur&&(ur=hr.stats.uniformsCount)}),ur},Ke.getMaxAttributesCount=function(){var ur=0;return Ve.forEach(function(hr){hr.stats.attributesCount>ur&&(ur=hr.stats.attributesCount)}),ur}),{clear:function(){var ur=pe.deleteShader.bind(pe);mt(Ie).forEach(ur),Ie={},mt(Pe).forEach(ur),Pe={},Ve.forEach(function(hr){pe.deleteProgram(hr.program)}),Ve.length=0,ke={},Ke.shaderCount=0},program:function(ur,hr,vr,Yt){var Gt=ke[hr];Gt||(Gt=ke[hr]={});var Ne=Gt[ur];if(Ne&&(Ne.refCount++,!Yt))return Ne;var Oe=new Ae(hr,ur);return Ke.shaderCount++,Ce(Oe,vr,Yt),Ne||(Gt[ur]=Oe),Ve.push(Oe),nt(Oe,{destroy:function(){if(Oe.refCount--,0>=Oe.refCount){pe.deleteProgram(Oe.program);var Qe=Ve.indexOf(Oe);Ve.splice(Qe,1),Ke.shaderCount--}0>=Gt[Oe.vertId].refCount&&(pe.deleteShader(Pe[Oe.vertId]),delete Pe[Oe.vertId],delete ke[Oe.fragId][Oe.vertId]),Object.keys(ke[Oe.fragId]).length||(pe.deleteShader(Ie[Oe.fragId]),delete Ie[Oe.fragId],delete ke[Oe.fragId])}})},restore:function(){Ie={},Pe={};for(var ur=0;ur>2),or=0;or>5]|=(pe.charCodeAt(or/8)&255)<<24-or%32;var Ke=8*pe.length;pe=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var or=Array(64),$e,ge,se,Ae,Ce,Ie,Pe,ke,Ve,Je,ur;for(Xe[Ke>>5]|=128<<24-Ke%32,Xe[(Ke+64>>9<<4)+15]=Ke,ke=0;keVe;Ve++){if(16>Ve)or[Ve]=Xe[Ve+ke];else{Je=Ve,ur=or[Ve-2],ur=j(ur,17)^j(ur,19)^ur>>>10,ur=et(ur,or[Ve-7]);var hr;hr=or[Ve-15],hr=j(hr,7)^j(hr,18)^hr>>>3,or[Je]=et(et(ur,hr),or[Ve-16])}Je=Ae,Je=j(Je,6)^j(Je,11)^j(Je,25),Je=et(et(et(et(Pe,Je),Ae&Ce^~Ae&Ie),ie[Ve]),or[Ve]),Pe=Ke,Pe=j(Pe,2)^j(Pe,13)^j(Pe,22),ur=et(Pe,Ke&$e^Ke&ge^$e&ge),Pe=Ie,Ie=Ce,Ce=Ae,Ae=et(se,Je),se=ge,ge=$e,$e=Ke,Ke=et(Je,ur)}pe[0]=et(Ke,pe[0]),pe[1]=et($e,pe[1]),pe[2]=et(ge,pe[2]),pe[3]=et(se,pe[3]),pe[4]=et(Ae,pe[4]),pe[5]=et(Ce,pe[5]),pe[6]=et(Ie,pe[6]),pe[7]=et(Pe,pe[7])}for(Xe="",or=0;or<32*pe.length;or+=8)Xe+=String.fromCharCode(pe[or>>5]>>>24-or%32&255);return Xe}function H(pe){for(var Xe="",Ke,or=0;or>>4&15)+"0123456789abcdef".charAt(Ke&15);return Xe}function Y(pe){for(var Xe="",Ke=-1,or,$e;++Ke=or&&56320<=$e&&57343>=$e&&(or=65536+((or&1023)<<10)+($e&1023),Ke++),127>=or?Xe+=String.fromCharCode(or):2047>=or?Xe+=String.fromCharCode(192|or>>>6&31,128|or&63):65535>=or?Xe+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):2097151>=or&&(Xe+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return Xe}function j(pe,Xe){return pe>>>Xe|pe<<32-Xe}function et(pe,Xe){var Ke=(pe&65535)+(Xe&65535);return(pe>>16)+(Xe>>16)+(Ke>>16)<<16|Ke&65535}function it(pe){return Array.prototype.slice.call(pe)}function ut(pe){return it(pe).join("")}function J(pe){function Xe(){var Pe=[],ke=[];return nt(function(){Pe.push.apply(Pe,it(arguments))},{def:function(){var Ve="v"+$e++;return ke.push(Ve),0Ut)?Lt.tree=l(mt,{bounds:Kt}):Ut&&Ut.length&&(Lt.tree=Ut),Lt.tree){var $t={primitive:"points",usage:"static",data:Lt.tree,type:"uint32"};Lt.elements?Lt.elements($t):Lt.elements=I.elements($t)}var le=w.float32(mt);kt({data:le,usage:"dynamic"});var he=w.fract32(mt,le);return Vt({data:he,usage:"dynamic"}),It({data:new Uint8Array(re),type:"uint8",usage:"stream"}),mt}},{marker:function(mt,Lt,Ht){var Ut=Lt.activation;if(Ut.forEach(function(he){return he&&he.destroy&&he.destroy()}),Ut.length=0,!mt||typeof mt[0]=="number"){var kt=s.addMarker(mt);Ut[kt]=!0}else{for(var Vt=[],It=0,re=Math.min(mt.length,Lt.count);It=0)return D;var N;if(s instanceof Uint8Array||s instanceof Uint8ClampedArray)N=s;else{N=new Uint8Array(s.length);for(var I=0,k=s.length;Iz*4&&(this.tooManyColors=!0),this.updatePalette(M),D.length===1?D[0]:D},y.prototype.updatePalette=function(s){if(!this.tooManyColors){var L=this.maxColors,M=this.paletteTexture,z=Math.ceil(s.length*.25/L);if(z>1){s=s.slice();for(var D=s.length*.25%L;Dz)&&!(!b.lower&&M2?(o[0],o[2],m=o[1],v=o[3]):o.length?(m=o[0],v=o[1]):(o.x,m=o.y,o.x+o.width,v=o.y+o.height),d.length>2?(b=d[0],u=d[2],d[1],d[3]):d.length?(b=d[0],u=d[1]):(b=d.x,d.y,u=d.x+d.width,d.y+d.height),[b,m,u,v]}function n(f){if(typeof f=="number")return[f,f,f,f];if(f.length===2)return[f[0],f[1],f[0],f[1]];var c=h(f);return[c.x,c.y,c.x+c.width,c.y+c.height]}},28624:function(G){(function(U,t){G.exports=t()})(this,function(){function U(pe,Xe){this.id=ct++,this.type=pe,this.data=Xe}function t(pe){if(pe.length===0)return[];var Xe=pe.charAt(0),Ke=pe.charAt(pe.length-1);if(1"u"?1:window.devicePixelRatio,Ie=!1,Pe={},ke=function(Je){},Ve=function(){};if(typeof Xe=="string"?Ke=document.querySelector(Xe):typeof Xe=="object"&&(typeof Xe.nodeName=="string"&&typeof Xe.appendChild=="function"&&typeof Xe.getBoundingClientRect=="function"?Ke=Xe:typeof Xe.drawArrays=="function"||typeof Xe.drawElements=="function"?(ge=Xe,$e=ge.canvas):("gl"in Xe?ge=Xe.gl:"canvas"in Xe?$e=p(Xe.canvas):"container"in Xe&&(or=p(Xe.container)),"attributes"in Xe&&(pe=Xe.attributes),"extensions"in Xe&&(se=h(Xe.extensions)),"optionalExtensions"in Xe&&(Ae=h(Xe.optionalExtensions)),"onDone"in Xe&&(ke=Xe.onDone),"profile"in Xe&&(Ie=!!Xe.profile),"pixelRatio"in Xe&&(Ce=+Xe.pixelRatio),"cachedCode"in Xe&&(Pe=Xe.cachedCode))),Ke&&(Ke.nodeName.toLowerCase()==="canvas"?$e=Ke:or=Ke),!ge){if(!$e){if(Ke=S(or||document.body,ke,Ce),!Ke)return null;$e=Ke.canvas,Ve=Ke.onDestroy}pe.premultipliedAlpha===void 0&&(pe.premultipliedAlpha=!0),ge=x($e,pe)}return ge?{gl:ge,canvas:$e,container:or,extensions:se,optionalExtensions:Ae,pixelRatio:Ce,profile:Ie,cachedCode:Pe,onDone:ke,onDestroy:Ve}:(Ve(),ke("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function e(pe,Xe){function Ke(se){se=se.toLowerCase();var Ae;try{Ae=or[se]=pe.getExtension(se)}catch{}return!!Ae}for(var or={},$e=0;$e>>=Xe,Ke=(255>>=Ke,Xe|=Ke,Ke=(15>>=Ke,Xe|=Ke,Ke=(3>>Ke>>1}function f(){function pe(or){t:{for(var $e=16;268435456>=$e;$e*=16)if(or<=$e){or=$e;break t}or=0}return $e=Ke[n(or)>>2],0<$e.length?$e.pop():new ArrayBuffer(or)}function Xe(or){Ke[n(or.byteLength)>>2].push(or)}var Ke=a(8,function(){return[]});return{alloc:pe,free:Xe,allocType:function(or,$e){var ge=null;switch(or){case 5120:ge=new Int8Array(pe($e),0,$e);break;case 5121:ge=new Uint8Array(pe($e),0,$e);break;case 5122:ge=new Int16Array(pe(2*$e),0,$e);break;case 5123:ge=new Uint16Array(pe(2*$e),0,$e);break;case 5124:ge=new Int32Array(pe(4*$e),0,$e);break;case 5125:ge=new Uint32Array(pe(4*$e),0,$e);break;case 5126:ge=new Float32Array(pe(4*$e),0,$e);break;default:return null}return ge.length!==$e?ge.subarray(0,$e):ge},freeType:function(or){Xe(or.buffer)}}}function c(pe){return!!pe&&typeof pe=="object"&&Array.isArray(pe.shape)&&Array.isArray(pe.stride)&&typeof pe.offset=="number"&&pe.shape.length===pe.stride.length&&(Array.isArray(pe.data)||At(pe.data))}function l(pe,Xe,Ke,or,$e,ge){for(var se=0;seVe&&(Ve=ke.buffer.byteLength,Gt===5123?Ve>>=1:Gt===5125&&(Ve>>=2)),ke.vertCount=Ve,Ve=ur,0>ur&&(Ve=4,ur=ke.buffer.dimension,ur===1&&(Ve=0),ur===2&&(Ve=1),ur===3&&(Ve=4)),ke.primType=Ve}function se(ke){or.elementsCount--,delete Ae[ke.id],ke.buffer.destroy(),ke.buffer=null}var Ae={},Ce=0,Ie={uint8:5121,uint16:5123};Xe.oes_element_index_uint&&(Ie.uint32=5125),$e.prototype.bind=function(){this.buffer.bind()};var Pe=[];return{create:function(ke,Ve){function Je(vr){if(vr)if(typeof vr=="number")ur(vr),hr.primType=4,hr.vertCount=vr|0,hr.type=5121;else{var Yt=null,Gt=35044,Ne=-1,Oe=-1,Qe=0,er=0;Array.isArray(vr)||At(vr)||c(vr)?Yt=vr:("data"in vr&&(Yt=vr.data),"usage"in vr&&(Gt=kt[vr.usage]),"primitive"in vr&&(Ne=Kt[vr.primitive]),"count"in vr&&(Oe=vr.count|0),"type"in vr&&(er=Ie[vr.type]),"length"in vr?Qe=vr.length|0:(Qe=Oe,er===5123||er===5122?Qe*=2:(er===5125||er===5124)&&(Qe*=4))),ge(hr,Yt,Gt,Ne,Oe,Qe,er)}else ur(),hr.primType=4,hr.vertCount=0,hr.type=5121;return Je}var ur=Ke.create(null,34963,!0),hr=new $e(ur._buffer);return or.elementsCount++,Je(ke),Je._reglType="elements",Je._elements=hr,Je.subdata=function(vr,Yt){return ur.subdata(vr,Yt),Je},Je.destroy=function(){se(hr)},Je},createStream:function(ke){var Ve=Pe.pop();return Ve||(Ve=new $e(Ke.create(null,34963,!0,!1)._buffer)),ge(Ve,ke,35040,-1,-1,0,0),Ve},destroyStream:function(ke){Pe.push(ke)},getElements:function(ke){return typeof ke=="function"&&ke._elements instanceof $e?ke._elements:null},clear:function(){mt(Ae).forEach(se)}}}function w(pe){for(var Xe=Rt.allocType(5123,pe.length),Ke=0;Ke>>31<<15,$e=(ge<<1>>>24)-127,ge=ge>>13&1023;Xe[Ke]=-24>$e?or:-14>$e?or+(ge+1024>>-14-$e):15<$e?or+31744:or+($e+15<<10)+ge}return Xe}function A(pe){return Array.isArray(pe)||At(pe)}function _(pe){return"[object "+pe+"]"}function y(pe){return Array.isArray(pe)&&(pe.length===0||typeof pe[0]=="number")}function E(pe){return!!(Array.isArray(pe)&&pe.length!==0&&A(pe[0]))}function T(pe){return Object.prototype.toString.call(pe)}function s(pe){if(!pe)return!1;var Xe=T(pe);return 0<=Ft.indexOf(Xe)?!0:y(pe)||E(pe)||c(pe)}function L(pe,Xe){pe.type===36193?(pe.data=w(Xe),Rt.freeType(Xe)):pe.data=Xe}function M(pe,Xe,Ke,or,$e,ge){if(pe=typeof yt[pe]<"u"?yt[pe]:xe[pe]*xt[Xe],ge&&(pe*=6),$e){for(or=0;1<=Ke;)or+=pe*Ke*Ke,Ke/=2;return or}return pe*Ke*or}function z(pe,Xe,Ke,or,$e,ge,se){function Ae(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function Ce(wr,nn){wr.internalformat=nn.internalformat,wr.format=nn.format,wr.type=nn.type,wr.compressed=nn.compressed,wr.premultiplyAlpha=nn.premultiplyAlpha,wr.flipY=nn.flipY,wr.unpackAlignment=nn.unpackAlignment,wr.colorSpace=nn.colorSpace,wr.width=nn.width,wr.height=nn.height,wr.channels=nn.channels}function Ie(wr,nn){if(typeof nn=="object"&&nn){"premultiplyAlpha"in nn&&(wr.premultiplyAlpha=nn.premultiplyAlpha),"flipY"in nn&&(wr.flipY=nn.flipY),"alignment"in nn&&(wr.unpackAlignment=nn.alignment),"colorSpace"in nn&&(wr.colorSpace=cn[nn.colorSpace]),"type"in nn&&(wr.type=rn[nn.type]);var $r=wr.width,dn=wr.height,Vn=wr.channels,Tn=!1;"shape"in nn?($r=nn.shape[0],dn=nn.shape[1],nn.shape.length===3&&(Vn=nn.shape[2],Tn=!0)):("radius"in nn&&($r=dn=nn.radius),"width"in nn&&($r=nn.width),"height"in nn&&(dn=nn.height),"channels"in nn&&(Vn=nn.channels,Tn=!0)),wr.width=$r|0,wr.height=dn|0,wr.channels=Vn|0,$r=!1,"format"in nn&&($r=nn.format,dn=wr.internalformat=Cn[$r],wr.format=_n[dn],$r in rn&&!("type"in nn)&&(wr.type=rn[$r]),$r in En&&(wr.compressed=!0),$r=!0),!Tn&&$r?wr.channels=xe[wr.format]:Tn&&!$r&&wr.channels!==de[wr.format]&&(wr.format=wr.internalformat=de[wr.channels])}}function Pe(wr){pe.pixelStorei(37440,wr.flipY),pe.pixelStorei(37441,wr.premultiplyAlpha),pe.pixelStorei(37443,wr.colorSpace),pe.pixelStorei(3317,wr.unpackAlignment)}function ke(){Ae.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ve(wr,nn){var $r=null;if(s(nn)?$r=nn:nn&&(Ie(wr,nn),"x"in nn&&(wr.xOffset=nn.x|0),"y"in nn&&(wr.yOffset=nn.y|0),s(nn.data)&&($r=nn.data)),nn.copy){var dn=$e.viewportWidth,Vn=$e.viewportHeight;wr.width=wr.width||dn-wr.xOffset,wr.height=wr.height||Vn-wr.yOffset,wr.needsCopy=!0}else if(!$r)wr.width=wr.width||1,wr.height=wr.height||1,wr.channels=wr.channels||4;else if(At($r))wr.channels=wr.channels||4,wr.data=$r,"type"in nn||wr.type!==5121||(wr.type=Ht[Object.prototype.toString.call($r)]|0);else if(y($r)){switch(wr.channels=wr.channels||4,dn=$r,Vn=dn.length,wr.type){case 5121:case 5123:case 5125:case 5126:Vn=Rt.allocType(wr.type,Vn),Vn.set(dn),wr.data=Vn;break;case 36193:wr.data=w(dn)}wr.alignment=1,wr.needsFree=!0}else if(c($r)){dn=$r.data,Array.isArray(dn)||wr.type!==5121||(wr.type=Ht[Object.prototype.toString.call(dn)]|0);var Vn=$r.shape,Tn=$r.stride,An,Bn,Jn,gi;Vn.length===3?(Jn=Vn[2],gi=Tn[2]):gi=Jn=1,An=Vn[0],Bn=Vn[1],Vn=Tn[0],Tn=Tn[1],wr.alignment=1,wr.width=An,wr.height=Bn,wr.channels=Jn,wr.format=wr.internalformat=de[Jn],wr.needsFree=!0,An=gi,$r=$r.offset,Jn=wr.width,gi=wr.height,Bn=wr.channels;for(var Di=Rt.allocType(wr.type===36193?5126:wr.type,Jn*gi*Bn),Sr=0,kr=0;kr>=Vn,$r.height>>=Vn,Ve($r,dn[Vn]),wr.mipmask|=1<nn;++nn)wr.images[nn]=null;return wr}function Qe(wr){for(var nn=wr.images,$r=0;$rwr){for(var nn=0;nn=--this.refCount&&xr(this)}}),se.profile&&(ge.getTotalTextureSize=function(){var wr=0;return Object.keys(di).forEach(function(nn){wr+=di[nn].stats.size}),wr}),{create2D:function(wr,nn){function $r(Vn,Tn){var An=dn.texInfo;er.call(An);var Bn=Oe();return typeof Vn=="number"?typeof Tn=="number"?Yt(Bn,Vn|0,Tn|0):Yt(Bn,Vn|0,Vn|0):Vn?(fr(An,Vn),Gt(Bn,Vn)):Yt(Bn,1,1),An.genMipmaps&&(Bn.mipmask=(Bn.width<<1)-1),dn.mipmask=Bn.mipmask,Ce(dn,Bn),dn.internalformat=Bn.internalformat,$r.width=Bn.width,$r.height=Bn.height,dr(dn),Ne(Bn,3553),rr(An,3553),mr(),Qe(Bn),se.profile&&(dn.stats.size=M(dn.internalformat,dn.type,Bn.width,Bn.height,An.genMipmaps,!1)),$r.format=Wr[dn.internalformat],$r.type=Ur[dn.type],$r.mag=an[An.magFilter],$r.min=pn[An.minFilter],$r.wrapS=gn[An.wrapS],$r.wrapT=gn[An.wrapT],$r}var dn=new He(3553);return di[dn.id]=dn,ge.textureCount++,$r(wr,nn),$r.subimage=function(Vn,Tn,An,Bn){Tn|=0,An|=0,Bn|=0;var Jn=ur();return Ce(Jn,dn),Jn.width=0,Jn.height=0,Ve(Jn,Vn),Jn.width=Jn.width||(dn.width>>Bn)-Tn,Jn.height=Jn.height||(dn.height>>Bn)-An,dr(dn),Je(Jn,3553,Tn,An,Bn),mr(),hr(Jn),$r},$r.resize=function(Vn,Tn){var An=Vn|0,Bn=Tn|0||An;if(An===dn.width&&Bn===dn.height)return $r;$r.width=dn.width=An,$r.height=dn.height=Bn,dr(dn);for(var Jn=0;dn.mipmask>>Jn;++Jn){var gi=An>>Jn,Di=Bn>>Jn;if(!gi||!Di)break;pe.texImage2D(3553,Jn,dn.format,gi,Di,0,dn.format,dn.type,null)}return mr(),se.profile&&(dn.stats.size=M(dn.internalformat,dn.type,An,Bn,!1,!1)),$r},$r._reglType="texture2d",$r._texture=dn,se.profile&&($r.stats=dn.stats),$r.destroy=function(){dn.decRef()},$r},createCube:function(wr,nn,$r,dn,Vn,Tn){function An(gi,Di,Sr,kr,Ar,Or){var xn,In=Bn.texInfo;for(er.call(In),xn=0;6>xn;++xn)Jn[xn]=Oe();if(typeof gi=="number"||!gi)for(gi=gi|0||1,xn=0;6>xn;++xn)Yt(Jn[xn],gi,gi);else if(typeof gi=="object")if(Di)Gt(Jn[0],gi),Gt(Jn[1],Di),Gt(Jn[2],Sr),Gt(Jn[3],kr),Gt(Jn[4],Ar),Gt(Jn[5],Or);else if(fr(In,gi),Ie(Bn,gi),"faces"in gi)for(gi=gi.faces,xn=0;6>xn;++xn)Ce(Jn[xn],Bn),Gt(Jn[xn],gi[xn]);else for(xn=0;6>xn;++xn)Gt(Jn[xn],gi);for(Ce(Bn,Jn[0]),Bn.mipmask=In.genMipmaps?(Jn[0].width<<1)-1:Jn[0].mipmask,Bn.internalformat=Jn[0].internalformat,An.width=Jn[0].width,An.height=Jn[0].height,dr(Bn),xn=0;6>xn;++xn)Ne(Jn[xn],34069+xn);for(rr(In,34067),mr(),se.profile&&(Bn.stats.size=M(Bn.internalformat,Bn.type,An.width,An.height,In.genMipmaps,!0)),An.format=Wr[Bn.internalformat],An.type=Ur[Bn.type],An.mag=an[In.magFilter],An.min=pn[In.minFilter],An.wrapS=gn[In.wrapS],An.wrapT=gn[In.wrapT],xn=0;6>xn;++xn)Qe(Jn[xn]);return An}var Bn=new He(34067);di[Bn.id]=Bn,ge.cubeCount++;var Jn=Array(6);return An(wr,nn,$r,dn,Vn,Tn),An.subimage=function(gi,Di,Sr,kr,Ar){Sr|=0,kr|=0,Ar|=0;var Or=ur();return Ce(Or,Bn),Or.width=0,Or.height=0,Ve(Or,Di),Or.width=Or.width||(Bn.width>>Ar)-Sr,Or.height=Or.height||(Bn.height>>Ar)-kr,dr(Bn),Je(Or,34069+gi,Sr,kr,Ar),mr(),hr(Or),An},An.resize=function(gi){if(gi|=0,gi!==Bn.width){An.width=Bn.width=gi,An.height=Bn.height=gi,dr(Bn);for(var Di=0;6>Di;++Di)for(var Sr=0;Bn.mipmask>>Sr;++Sr)pe.texImage2D(34069+Di,Sr,Bn.format,gi>>Sr,gi>>Sr,0,Bn.format,Bn.type,null);return mr(),se.profile&&(Bn.stats.size=M(Bn.internalformat,Bn.type,An.width,An.height,!1,!0)),An}},An._reglType="textureCube",An._texture=Bn,se.profile&&(An.stats=Bn.stats),An.destroy=function(){Bn.decRef()},An},clear:function(){for(var wr=0;wrdn;++dn)if($r.mipmask&1<>dn,$r.height>>dn,0,$r.internalformat,$r.type,null);else for(var Vn=0;6>Vn;++Vn)pe.texImage2D(34069+Vn,dn,$r.internalformat,$r.width>>dn,$r.height>>dn,0,$r.internalformat,$r.type,null);rr($r.texInfo,$r.target)})},refresh:function(){for(var wr=0;wrpr;++pr){for(rn=0;rnxr;++xr)mr[xr].resize(pr);return dr.width=dr.height=pr,dr},_reglType:"framebufferCube",destroy:function(){mr.forEach(function(xr){xr.destroy()})}})},clear:function(){mt(rr).forEach(vr)},restore:function(){Ne.cur=null,Ne.next=null,Ne.dirty=!0,mt(rr).forEach(function(He){He.framebuffer=pe.createFramebuffer(),Yt(He)})}})}function N(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function I(pe,Xe,Ke,or,$e,ge,se){function Ae(Yt){if(Yt!==vr.currentVAO){var Gt=Xe.oes_vertex_array_object;Yt?Gt.bindVertexArrayOES(Yt.vao):Gt.bindVertexArrayOES(null),vr.currentVAO=Yt}}function Ce(Yt){if(Yt!==vr.currentVAO){if(Yt)Yt.bindAttrs();else{for(var Gt=Xe.angle_instanced_arrays,Ne=0;Ne=dr.byteLength?mr.subdata(dr):(mr.destroy(),Ne.buffers[fr]=null)),Ne.buffers[fr]||(mr=Ne.buffers[fr]=$e.create(rr,34962,!1,!0)),He.buffer=$e.getBuffer(mr),He.size=He.buffer.dimension|0,He.normalized=!1,He.type=He.buffer.dtype,He.offset=0,He.stride=0,He.divisor=0,He.state=1,Oe[fr]=1}else $e.getBuffer(rr)?(He.buffer=$e.getBuffer(rr),He.size=He.buffer.dimension|0,He.normalized=!1,He.type=He.buffer.dtype,He.offset=0,He.stride=0,He.divisor=0,He.state=1):$e.getBuffer(rr.buffer)?(He.buffer=$e.getBuffer(rr.buffer),He.size=(+rr.size||He.buffer.dimension)|0,He.normalized=!!rr.normalized||!1,He.type="type"in rr?Ut[rr.type]:He.buffer.dtype,He.offset=(rr.offset||0)|0,He.stride=(rr.stride||0)|0,He.divisor=(rr.divisor||0)|0,He.state=1):"x"in rr&&(He.x=+rr.x||0,He.y=+rr.y||0,He.z=+rr.z||0,He.w=+rr.w||0,He.state=2)}for(mr=0;mrur&&(ur=hr.stats.uniformsCount)}),ur},Ke.getMaxAttributesCount=function(){var ur=0;return Ve.forEach(function(hr){hr.stats.attributesCount>ur&&(ur=hr.stats.attributesCount)}),ur}),{clear:function(){var ur=pe.deleteShader.bind(pe);mt(Ie).forEach(ur),Ie={},mt(Pe).forEach(ur),Pe={},Ve.forEach(function(hr){pe.deleteProgram(hr.program)}),Ve.length=0,ke={},Ke.shaderCount=0},program:function(ur,hr,vr,Yt){var Gt=ke[hr];Gt||(Gt=ke[hr]={});var Ne=Gt[ur];if(Ne&&(Ne.refCount++,!Yt))return Ne;var Oe=new Ae(hr,ur);return Ke.shaderCount++,Ce(Oe,vr,Yt),Ne||(Gt[ur]=Oe),Ve.push(Oe),nt(Oe,{destroy:function(){if(Oe.refCount--,0>=Oe.refCount){pe.deleteProgram(Oe.program);var Qe=Ve.indexOf(Oe);Ve.splice(Qe,1),Ke.shaderCount--}0>=Gt[Oe.vertId].refCount&&(pe.deleteShader(Pe[Oe.vertId]),delete Pe[Oe.vertId],delete ke[Oe.fragId][Oe.vertId]),Object.keys(ke[Oe.fragId]).length||(pe.deleteShader(Ie[Oe.fragId]),delete Ie[Oe.fragId],delete ke[Oe.fragId])}})},restore:function(){Ie={},Pe={};for(var ur=0;ur>2),or=0;or>5]|=(pe.charCodeAt(or/8)&255)<<24-or%32;var Ke=8*pe.length;pe=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var or=Array(64),$e,ge,se,Ae,Ce,Ie,Pe,ke,Ve,Je,ur;for(Xe[Ke>>5]|=128<<24-Ke%32,Xe[(Ke+64>>9<<4)+15]=Ke,ke=0;keVe;Ve++){if(16>Ve)or[Ve]=Xe[Ve+ke];else{Je=Ve,ur=or[Ve-2],ur=j(ur,17)^j(ur,19)^ur>>>10,ur=et(ur,or[Ve-7]);var hr;hr=or[Ve-15],hr=j(hr,7)^j(hr,18)^hr>>>3,or[Je]=et(et(ur,hr),or[Ve-16])}Je=Ae,Je=j(Je,6)^j(Je,11)^j(Je,25),Je=et(et(et(et(Pe,Je),Ae&Ce^~Ae&Ie),ie[Ve]),or[Ve]),Pe=Ke,Pe=j(Pe,2)^j(Pe,13)^j(Pe,22),ur=et(Pe,Ke&$e^Ke&ge^$e&ge),Pe=Ie,Ie=Ce,Ce=Ae,Ae=et(se,Je),se=ge,ge=$e,$e=Ke,Ke=et(Je,ur)}pe[0]=et(Ke,pe[0]),pe[1]=et($e,pe[1]),pe[2]=et(ge,pe[2]),pe[3]=et(se,pe[3]),pe[4]=et(Ae,pe[4]),pe[5]=et(Ce,pe[5]),pe[6]=et(Ie,pe[6]),pe[7]=et(Pe,pe[7])}for(Xe="",or=0;or<32*pe.length;or+=8)Xe+=String.fromCharCode(pe[or>>5]>>>24-or%32&255);return Xe}function H(pe){for(var Xe="",Ke,or=0;or>>4&15)+"0123456789abcdef".charAt(Ke&15);return Xe}function Y(pe){for(var Xe="",Ke=-1,or,$e;++Ke=or&&56320<=$e&&57343>=$e&&(or=65536+((or&1023)<<10)+($e&1023),Ke++),127>=or?Xe+=String.fromCharCode(or):2047>=or?Xe+=String.fromCharCode(192|or>>>6&31,128|or&63):65535>=or?Xe+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):2097151>=or&&(Xe+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return Xe}function j(pe,Xe){return pe>>>Xe|pe<<32-Xe}function et(pe,Xe){var Ke=(pe&65535)+(Xe&65535);return(pe>>16)+(Xe>>16)+(Ke>>16)<<16|Ke&65535}function it(pe){return Array.prototype.slice.call(pe)}function ut(pe){return it(pe).join("")}function J(pe){function Xe(){var Pe=[],ke=[];return nt(function(){Pe.push.apply(Pe,it(arguments))},{def:function(){var Ve="v"+$e++;return ke.push(Ve),0"+pi+"?"+Hr+".constant["+pi+"]:0;"}).join(""),"}}else{","if(",wn,"(",Hr,".buffer)){",On,"=",Ln,".createStream(",34962,",",Hr,".buffer);","}else{",On,"=",Ln,".getBuffer(",Hr,".buffer);","}",mi,'="type" in ',Hr,"?",Qr.glTypes,"[",Hr,".type]:",On,".dtype;",Pn.normalized,"=!!",Hr,".normalized;"),Zr("size"),Zr("offset"),Zr("stride"),Zr("divisor"),Er("}}"),Er.exit("if(",Pn.isStream,"){",Ln,".destroyStream(",On,");","}"),Pn})}),xn}function pr(Sr){var kr=Sr.static,Ar=Sr.dynamic,Or={};return Object.keys(kr).forEach(function(xn){var In=kr[xn];Or[xn]=ot(function(hn,sn){return typeof In=="number"||typeof In=="boolean"?""+In:hn.link(In)})}),Object.keys(Ar).forEach(function(xn){var In=Ar[xn];Or[xn]=$(In,function(hn,sn){return hn.invoke(sn,In)})}),Or}function Gr(Sr,kr,Ar,Or,xn){function In(Un){var On=sn[Un];On&&(Zr[Un]=On)}var hn=fr(Sr,kr),wn=Qe(Sr),sn=er(Sr,wn),Er=He(Sr),Zr=dr(Sr),Hr=rr(Sr,xn,hn);In("viewport"),In(vr("scissor.box"));var Qr=0"u"?"Date.now()":"performance.now()"}function hn(Un){Ln=kr.def(),Un(Ln,"=",In(),";"),typeof xn=="string"?Un(Hr,".count+=",xn,";"):Un(Hr,".count++;"),Je&&(Or?(Pn=kr.def(),Un(Pn,"=",wn,".getNumPendingQueries();")):Un(wn,".beginQuery(",Hr,");"))}function sn(Un){Un(Hr,".cpuTime+=",In(),"-",Ln,";"),Je&&(Or?Un(wn,".pushScopeStats(",Pn,",",wn,".getNumPendingQueries(),",Hr,");"):Un(wn,".endQuery();"))}function Er(Un){var On=kr.def(Qr,".profile");kr(Qr,".profile=",Un,";"),kr.exit(Qr,".profile=",On,";")}var Zr=Sr.shared,Hr=Sr.stats,Qr=Zr.current,wn=Zr.timer;Ar=Ar.profile;var Ln,Pn;if(Ar){if(Q(Ar)){Ar.enable?(hn(kr),sn(kr.exit),Er("true")):Er("false");return}Ar=Ar.append(Sr,kr),Er(Ar)}else Ar=kr.def(Qr,".profile");Zr=Sr.block(),hn(Zr),kr("if(",Ar,"){",Zr,"}"),Sr=Sr.block(),sn(Sr),kr.exit("if(",Ar,"){",Sr,"}")}function Tr(Sr,kr,Ar,Or,xn){function In(Er){switch(Er){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}function hn(Er,Zr,Hr){function Qr(){kr("if(!",Un,".buffer){",Ln,".enableVertexAttribArray(",Pn,");}");var pi=Hr.type,Ci;Ci=Hr.size?kr.def(Hr.size,"||",Zr):Zr,kr("if(",Un,".type!==",pi,"||",Un,".size!==",Ci,"||",ai.map(function(pa){return Un+"."+pa+"!=="+Hr[pa]}).join("||"),"){",Ln,".bindBuffer(",34962,",",On,".buffer);",Ln,".vertexAttribPointer(",[Pn,Ci,pi,Hr.normalized,Hr.stride,Hr.offset],");",Un,".type=",pi,";",Un,".size=",Ci,";",ai.map(function(pa){return Un+"."+pa+"="+Hr[pa]+";"}).join(""),"}"),wr&&(pi=Hr.divisor,kr("if(",Un,".divisor!==",pi,"){",Sr.instancing,".vertexAttribDivisorANGLE(",[Pn,pi],");",Un,".divisor=",pi,";}"))}function wn(){kr("if(",Un,".buffer){",Ln,".disableVertexAttribArray(",Pn,");",Un,".buffer=null;","}if(",me.map(function(pi,Ci){return Un+"."+pi+"!=="+mi[Ci]}).join("||"),"){",Ln,".vertexAttrib4f(",Pn,",",mi,");",me.map(function(pi,Ci){return Un+"."+pi+"="+mi[Ci]+";"}).join(""),"}")}var Ln=sn.gl,Pn=kr.def(Er,".location"),Un=kr.def(sn.attributes,"[",Pn,"]");Er=Hr.state;var On=Hr.buffer,mi=[Hr.x,Hr.y,Hr.z,Hr.w],ai=["buffer","normalized","offset","stride"];Er===1?Qr():Er===2?wn():(kr("if(",Er,"===",1,"){"),Qr(),kr("}else{"),wn(),kr("}"))}var sn=Sr.shared;Or.forEach(function(Er){var Zr=Er.name,Hr=Ar.attributes[Zr],Qr;if(Hr){if(!xn(Hr))return;Qr=Hr.append(Sr,kr)}else{if(!xn(Be))return;var wn=Sr.scopeAttrib(Zr);Qr={},Object.keys(new li).forEach(function(Ln){Qr[Ln]=kr.def(wn,".",Ln)})}hn(Sr.link(Er),In(Er.info.type),Qr)})}function Cr(Sr,kr,Ar,Or,xn,In){for(var hn=Sr.shared,sn=hn.gl,Er,Zr=0;Zr>1)",Un],");")}function Ci(){Ar(On,".drawArraysInstancedANGLE(",[wn,Ln,Pn,Un],");")}Qr&&Qr!=="null"?ai?pi():(Ar("if(",Qr,"){"),pi(),Ar("}else{"),Ci(),Ar("}")):Ci()}function hn(){function pi(){Ar(Er+".drawElements("+[wn,Pn,mi,Ln+"<<(("+mi+"-5121)>>1)"]+");")}function Ci(){Ar(Er+".drawArrays("+[wn,Ln,Pn]+");")}Qr&&Qr!=="null"?ai?pi():(Ar("if(",Qr,"){"),pi(),Ar("}else{"),Ci(),Ar("}")):Ci()}var sn=Sr.shared,Er=sn.gl,Zr=sn.draw,Hr=Or.draw,Qr=function(){var pi=Hr.elements,Ci=kr;return pi?((pi.contextDep&&Or.contextDynamic||pi.propDep)&&(Ci=Ar),pi=pi.append(Sr,Ci),Hr.elementsActive&&Ci("if("+pi+")"+Er+".bindBuffer(34963,"+pi+".buffer.buffer);")):(pi=Ci.def(),Ci(pi,"=",Zr,".","elements",";","if(",pi,"){",Er,".bindBuffer(",34963,",",pi,".buffer.buffer);}","else if(",sn.vao,".currentVAO){",pi,"=",Sr.shared.elements+".getElements("+sn.vao,".currentVAO.elements);",$r?"":"if("+pi+")"+Er+".bindBuffer(34963,"+pi+".buffer.buffer);","}")),pi}(),wn=xn("primitive"),Ln=xn("offset"),Pn=function(){var pi=Hr.count,Ci=kr;return pi?((pi.contextDep&&Or.contextDynamic||pi.propDep)&&(Ci=Ar),pi=pi.append(Sr,Ci)):pi=Ci.def(Zr,".","count"),pi}();if(typeof Pn=="number"){if(Pn===0)return}else Ar("if(",Pn,"){"),Ar.exit("}");var Un,On;wr&&(Un=xn("instances"),On=Sr.instancing);var mi=Qr+".type",ai=Hr.elements&&Q(Hr.elements)&&!Hr.vaoActive;wr&&(typeof Un!="number"||0<=Un)?typeof Un=="string"?(Ar("if(",Un,">0){"),In(),Ar("}else if(",Un,"<0){"),hn(),Ar("}")):In():hn()}function Ur(Sr,kr,Ar,Or,xn){return kr=Ne(),xn=kr.proc("body",xn),wr&&(kr.instancing=xn.def(kr.shared.extensions,".angle_instanced_arrays")),Sr(kr,xn,Ar,Or),kr.compile().body}function an(Sr,kr,Ar,Or){Cn(Sr,kr),Ar.useVAO?Ar.drawVAO?kr(Sr.shared.vao,".setVAO(",Ar.drawVAO.append(Sr,kr),");"):kr(Sr.shared.vao,".setVAO(",Sr.shared.vao,".targetVAO);"):(kr(Sr.shared.vao,".setVAO(null);"),Tr(Sr,kr,Ar,Or.attributes,function(){return!0})),Cr(Sr,kr,Ar,Or.uniforms,function(){return!0},!1),Wr(Sr,kr,kr,Ar)}function pn(Sr,kr){var Ar=Sr.proc("draw",1);Cn(Sr,Ar),Pr(Sr,Ar,kr.context),Dr(Sr,Ar,kr.framebuffer),cn(Sr,Ar,kr),rn(Sr,Ar,kr.state),En(Sr,Ar,kr,!1,!0);var Or=kr.shader.progVar.append(Sr,Ar);if(Ar(Sr.shared.gl,".useProgram(",Or,".program);"),kr.shader.program)an(Sr,Ar,kr,kr.shader.program);else{Ar(Sr.shared.vao,".setVAO(null);");var xn=Sr.global.def("{}"),In=Ar.def(Or,".id"),hn=Ar.def(xn,"[",In,"]");Ar(Sr.cond(hn).then(hn,".call(this,a0);").else(hn,"=",xn,"[",In,"]=",Sr.link(function(sn){return Ur(an,Sr,kr,sn,1)}),"(",Or,");",hn,".call(this,a0);"))}0=--this.refCount&&se(this)},$e.profile&&(or.getTotalRenderbufferSize=function(){var ke=0;return Object.keys(Pe).forEach(function(Ve){ke+=Pe[Ve].stats.size}),ke}),{create:function(ke,Ve){function Je(hr,vr){var Yt=0,Gt=0,Ne=32854;if(typeof hr=="object"&&hr?("shape"in hr?(Gt=hr.shape,Yt=Gt[0]|0,Gt=Gt[1]|0):("radius"in hr&&(Yt=Gt=hr.radius|0),"width"in hr&&(Yt=hr.width|0),"height"in hr&&(Gt=hr.height|0)),"format"in hr&&(Ne=Ae[hr.format])):typeof hr=="number"?(Yt=hr|0,Gt=typeof vr=="number"?vr|0:Yt):hr||(Yt=Gt=1),Yt!==ur.width||Gt!==ur.height||Ne!==ur.format)return Je.width=ur.width=Yt,Je.height=ur.height=Gt,ur.format=Ne,pe.bindRenderbuffer(36161,ur.renderbuffer),pe.renderbufferStorage(36161,Ne,Yt,Gt),$e.profile&&(ur.stats.size=Et[ur.format]*ur.width*ur.height),Je.format=Ce[ur.format],Je}var ur=new ge(pe.createRenderbuffer());return Pe[ur.id]=ur,or.renderbufferCount++,Je(ke,Ve),Je.resize=function(hr,vr){var Yt=hr|0,Gt=vr|0||Yt;return Yt===ur.width&&Gt===ur.height||(Je.width=ur.width=Yt,Je.height=ur.height=Gt,pe.bindRenderbuffer(36161,ur.renderbuffer),pe.renderbufferStorage(36161,ur.format,Yt,Gt),$e.profile&&(ur.stats.size=Et[ur.format]*ur.width*ur.height)),Je},Je._reglType="renderbuffer",Je._renderbuffer=ur,$e.profile&&(Je.stats=ur.stats),Je.destroy=function(){ur.decRef()},Je},clear:function(){mt(Pe).forEach(se)},restore:function(){mt(Pe).forEach(function(ke){ke.renderbuffer=pe.createRenderbuffer(),pe.bindRenderbuffer(36161,ke.renderbuffer),pe.renderbufferStorage(36161,ke.format,ke.width,ke.height)}),pe.bindRenderbuffer(36161,null)}}},Nt=[];Nt[6408]=4,Nt[6407]=3;var jt=[];jt[5121]=1,jt[5126]=4,jt[36193]=2;var ie=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],me=["x","y","z","w"],be="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),ve={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Le={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ce={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Te={cw:2304,ccw:2305},Be=new V(!1,!1,!1,function(){}),ir=function(pe,Xe){function Ke(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function or(Pe,ke,Ve){var Je=se.pop()||new Ke;Je.startQueryIndex=Pe,Je.endQueryIndex=ke,Je.sum=0,Je.stats=Ve,Ae.push(Je)}if(!Xe.ext_disjoint_timer_query)return null;var $e=[],ge=[],se=[],Ae=[],Ce=[],Ie=[];return{beginQuery:function(Pe){var ke=$e.pop()||Xe.ext_disjoint_timer_query.createQueryEXT();Xe.ext_disjoint_timer_query.beginQueryEXT(35007,ke),ge.push(ke),or(ge.length-1,ge.length,Pe)},endQuery:function(){Xe.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:or,update:function(){var Pe,ke;if(Pe=ge.length,Pe!==0){Ie.length=Math.max(Ie.length,Pe+1),Ce.length=Math.max(Ce.length,Pe+1),Ce[0]=0;var Ve=Ie[0]=0;for(ke=Pe=0;ke=En.length&&or()}var _n=st(En,pn);En[_n]=gn}}}function Ie(){var pn=rn.viewport,gn=rn.scissor_box;pn[0]=pn[1]=gn[0]=gn[1]=0,er.viewportWidth=er.framebufferWidth=er.drawingBufferWidth=pn[2]=gn[2]=Je.drawingBufferWidth,er.viewportHeight=er.framebufferHeight=er.drawingBufferHeight=pn[3]=gn[3]=Je.drawingBufferHeight}function Pe(){er.tick+=1,er.time=Ve(),Ie(),Dr.procs.poll()}function ke(){pr.refresh(),Ie(),Dr.procs.refresh(),Ne&&Ne.update()}function Ve(){return(wt()-Oe)/1e3}if(pe=r(pe),!pe)return null;var Je=pe.gl,ur=Je.getContextAttributes();Je.isContextLost();var hr=e(Je,pe);if(!hr)return null;var cn=i(),vr={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Yt=pe.cachedCode||{},Gt=hr.extensions,Ne=ir(Je,Gt),Oe=wt(),fr=Je.drawingBufferWidth,Qe=Je.drawingBufferHeight,er={tick:0,time:0,viewportWidth:fr,viewportHeight:Qe,framebufferWidth:fr,framebufferHeight:Qe,drawingBufferWidth:fr,drawingBufferHeight:Qe,pixelRatio:pe.pixelRatio},fr={elements:null,primitive:4,count:-1,offset:0,instances:-1},rr=bt(Je,Gt),He=o(Je,vr,pe,function(pn){return mr.destroyBuffer(pn)}),dr=d(Je,Gt,He,vr),mr=I(Je,Gt,rr,vr,He,dr,fr),xr=k(Je,cn,vr,pe),pr=z(Je,Gt,rr,function(){Dr.procs.poll()},er,vr,pe),Gr=Mt(Je,Gt,rr,vr,pe),Pr=D(Je,Gt,rr,pr,Gr,vr),Dr=Z(Je,cn,Gt,rr,He,dr,pr,Pr,{},mr,xr,fr,er,Ne,Yt,pe),cn=B(Je,Pr,Dr.procs.poll,er),rn=Dr.next,Cn=Je.canvas,En=[],Tr=[],Cr=[],Wr=[pe.onDestroy],Ur=null;Cn&&(Cn.addEventListener("webglcontextlost",$e,!1),Cn.addEventListener("webglcontextrestored",ge,!1));var an=Pr.setFBO=se({framebuffer:gt.define.call(null,1,"framebuffer")});return ke(),ur=nt(se,{clear:function(pn){if("framebuffer"in pn)if(pn.framebuffer&&pn.framebuffer_reglType==="framebufferCube")for(var gn=0;6>gn;++gn)an(nt({framebuffer:pn.framebuffer.faces[gn]},pn),Ae);else an(pn,Ae);else Ae(null,pn)},prop:gt.define.bind(null,1),context:gt.define.bind(null,2),this:gt.define.bind(null,3),draw:se({}),buffer:function(pn){return He.create(pn,34962,!1,!1)},elements:function(pn){return dr.create(pn,!1)},texture:pr.create2D,cube:pr.createCube,renderbuffer:Gr.create,framebuffer:Pr.create,framebufferCube:Pr.createCube,vao:mr.createVAO,attributes:ur,frame:Ce,on:function(pn,gn){var _n;switch(pn){case"frame":return Ce(gn);case"lost":_n=Tr;break;case"restore":_n=Cr;break;case"destroy":_n=Wr}return _n.push(gn),{cancel:function(){for(var kn=0;kn<_n.length;++kn)if(_n[kn]===gn){_n[kn]=_n[_n.length-1],_n.pop();break}}}},limits:rr,hasExtension:function(pn){return 0<=rr.extensions.indexOf(pn.toLowerCase())},read:cn,destroy:function(){En.length=0,or(),Cn&&(Cn.removeEventListener("webglcontextlost",$e),Cn.removeEventListener("webglcontextrestored",ge)),xr.clear(),Pr.clear(),Gr.clear(),mr.clear(),pr.clear(),dr.clear(),He.clear(),Ne&&Ne.clear(),Wr.forEach(function(pn){pn()})},_gl:Je,_refresh:ke,poll:function(){Pe(),Ne&&Ne.update()},now:Ve,stats:vr,getCachedCode:function(){return Yt},preloadCachedCode:function(pn){Object.entries(pn).forEach(function(gn){Yt[gn[0]]=gn[1]})}}),pe.onDone(null,ur),ur}})},30456:function(G,U,t){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var g=t(33576),C=g.Buffer;function i(x,v){for(var p in x)v[p]=x[p]}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?G.exports=g:(i(g,U),U.Buffer=S);function S(x,v,p){return C(x,v,p)}S.prototype=Object.create(C.prototype),i(C,S),S.from=function(x,v,p){if(typeof x=="number")throw new TypeError("Argument must not be a number");return C(x,v,p)},S.alloc=function(x,v,p){if(typeof x!="number")throw new TypeError("Argument must be a number");var r=C(x);return v!==void 0?typeof p=="string"?r.fill(v,p):r.fill(v):r.fill(0),r},S.allocUnsafe=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return C(x)},S.allocUnsafeSlow=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return g.SlowBuffer(x)}},14500:function(G,U,t){var g=t(53664),C=t(64348),i=t(39640)(),S=t(2304),x=g("%TypeError%"),v=g("%Math.floor%");G.exports=function(r,e){if(typeof r!="function")throw new x("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||v(e)!==e)throw new x("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],n=!0,f=!0;if("length"in r&&S){var c=S(r,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(f=!1)}return(n||f||!a)&&(i?C(r,"length",e,!0,!0):C(r,"length",e)),r}},29936:function(G,U,t){G.exports=i;var g=t(61252).EventEmitter,C=t(6768);C(i,g),i.Readable=t(12348),i.Writable=t(11288),i.Duplex=t(15316),i.Transform=t(22477),i.PassThrough=t(27136),i.finished=t(15932),i.pipeline=t(38180),i.Stream=i;function i(){g.call(this)}i.prototype.pipe=function(S,x){var v=this;function p(l){S.writable&&S.write(l)===!1&&v.pause&&v.pause()}v.on("data",p);function r(){v.readable&&v.resume&&v.resume()}S.on("drain",r),!S._isStdio&&(!x||x.end!==!1)&&(v.on("end",a),v.on("close",n));var e=!1;function a(){e||(e=!0,S.end())}function n(){e||(e=!0,typeof S.destroy=="function"&&S.destroy())}function f(l){if(c(),g.listenerCount(this,"error")===0)throw l}v.on("error",f),S.on("error",f);function c(){v.removeListener("data",p),S.removeListener("drain",r),v.removeListener("end",a),v.removeListener("close",n),v.removeListener("error",f),S.removeListener("error",f),v.removeListener("end",c),v.removeListener("close",c),S.removeListener("close",c)}return v.on("end",c),v.on("close",c),S.on("close",c),S.emit("pipe",v),S}},92784:function(G){function U(v,p){v.prototype=Object.create(p.prototype),v.prototype.constructor=v,v.__proto__=p}var t={};function g(v,p,r){r||(r=Error);function e(n,f,c){return typeof p=="string"?p:p(n,f,c)}var a=function(n){U(f,n);function f(c,l,m){return n.call(this,e(c,l,m))||this}return f}(r);a.prototype.name=r.name,a.prototype.code=v,t[v]=a}function C(v,p){if(Array.isArray(v)){var r=v.length;return v=v.map(function(e){return String(e)}),r>2?"one of ".concat(p," ").concat(v.slice(0,r-1).join(", "),", or ")+v[r-1]:r===2?"one of ".concat(p," ").concat(v[0]," or ").concat(v[1]):"of ".concat(p," ").concat(v[0])}else return"of ".concat(p," ").concat(String(v))}function i(v,p,r){return v.substr(!r||r<0?0:+r,p.length)===p}function S(v,p,r){return(r===void 0||r>v.length)&&(r=v.length),v.substring(r-p.length,r)===p}function x(v,p,r){return typeof r!="number"&&(r=0),r+p.length>v.length?!1:v.indexOf(p,r)!==-1}g("ERR_INVALID_OPT_VALUE",function(v,p){return'The value "'+p+'" is invalid for option "'+v+'"'},TypeError),g("ERR_INVALID_ARG_TYPE",function(v,p,r){var e;typeof p=="string"&&i(p,"not ")?(e="must not be",p=p.replace(/^not /,"")):e="must be";var a;if(S(v," argument"))a="The ".concat(v," ").concat(e," ").concat(C(p,"type"));else{var n=x(v,".")?"property":"argument";a='The "'.concat(v,'" ').concat(n," ").concat(e," ").concat(C(p,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError),g("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),g("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),g("ERR_STREAM_PREMATURE_CLOSE","Premature close"),g("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),g("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),g("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),g("ERR_STREAM_WRITE_AFTER_END","write after end"),g("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),g("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),g("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),G.exports.i=t},15316:function(G,U,t){var g=t(4168),C=Object.keys||function(n){var f=[];for(var c in n)f.push(c);return f};G.exports=r;var i=t(12348),S=t(11288);t(6768)(r,i);for(var x=C(S.prototype),v=0;v0)if(typeof Z!="string"&&!gt.objectMode&&Object.getPrototypeOf(Z)!==x.prototype&&(Z=p(Z)),nt)gt.endEmitted?_($,new o):M($,gt,Z,!0);else if(gt.ended)_($,new b);else{if(gt.destroyed)return!1;gt.reading=!1,gt.decoder&&!st?(Z=gt.decoder.write(Z),gt.objectMode||Z.length!==0?M($,gt,Z,!1):H($,gt)):M($,gt,Z,!1)}else nt||(gt.reading=!1,H($,gt))}return!gt.ended&&(gt.length=D?$=D:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function I($,Z){return $<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:$!==$?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:($>Z.highWaterMark&&(Z.highWaterMark=N($)),$<=Z.length?$:Z.ended?Z.length:(Z.needReadable=!0,0))}s.prototype.read=function($){a("read",$),$=parseInt($,10);var Z=this._readableState,st=$;if($!==0&&(Z.emittedReadable=!1),$===0&&Z.needReadable&&((Z.highWaterMark!==0?Z.length>=Z.highWaterMark:Z.length>0)||Z.ended))return a("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?V(this):B(this),null;if($=I($,Z),$===0&&Z.ended)return Z.length===0&&V(this),null;var nt=Z.needReadable;a("need readable",nt),(Z.length===0||Z.length-$0?ct=tt($,Z):ct=null,ct===null?(Z.needReadable=Z.length<=Z.highWaterMark,$=0):(Z.length-=$,Z.awaitDrain=0),Z.length===0&&(Z.ended||(Z.needReadable=!0),st!==$&&Z.ended&&V(this)),ct!==null&&this.emit("data",ct),ct};function k($,Z){if(a("onEofChunk"),!Z.ended){if(Z.decoder){var st=Z.decoder.end();st&&st.length&&(Z.buffer.push(st),Z.length+=Z.objectMode?1:st.length)}Z.ended=!0,Z.sync?B($):(Z.needReadable=!1,Z.emittedReadable||(Z.emittedReadable=!0,O($)))}}function B($){var Z=$._readableState;a("emitReadable",Z.needReadable,Z.emittedReadable),Z.needReadable=!1,Z.emittedReadable||(a("emitReadable",Z.flowing),Z.emittedReadable=!0,g.nextTick(O,$))}function O($){var Z=$._readableState;a("emitReadable_",Z.destroyed,Z.length,Z.ended),!Z.destroyed&&(Z.length||Z.ended)&&($.emit("readable"),Z.emittedReadable=!1),Z.needReadable=!Z.flowing&&!Z.ended&&Z.length<=Z.highWaterMark,X($)}function H($,Z){Z.readingMore||(Z.readingMore=!0,g.nextTick(Y,$,Z))}function Y($,Z){for(;!Z.reading&&!Z.ended&&(Z.length1&&ot(nt.pipes,$)!==-1)&&!bt&&(a("false write response, pause",nt.awaitDrain),nt.awaitDrain++),st.pause())}function Lt(Vt){a("onerror",Vt),kt(),$.removeListener("error",Lt),i($,"error")===0&&_($,Vt)}E($,"error",Lt);function Ht(){$.removeListener("finish",Ut),kt()}$.once("close",Ht);function Ut(){a("onfinish"),$.removeListener("close",Ht),kt()}$.once("finish",Ut);function kt(){a("unpipe"),st.unpipe($)}return $.emit("pipe",st),nt.flowing||(a("pipe resume"),st.resume()),$};function j($){return function(){var st=$._readableState;a("pipeOnDrain",st.awaitDrain),st.awaitDrain&&st.awaitDrain--,st.awaitDrain===0&&i($,"data")&&(st.flowing=!0,X($))}}s.prototype.unpipe=function($){var Z=this._readableState,st={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return $&&$!==Z.pipes?this:($||($=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,$&&$.emit("unpipe",this,st),this);if(!$){var nt=Z.pipes,ct=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var gt=0;gt0,nt.flowing!==!1&&this.resume()):$==="readable"&&!nt.endEmitted&&!nt.readableListening&&(nt.readableListening=nt.needReadable=!0,nt.flowing=!1,nt.emittedReadable=!1,a("on readable",nt.length,nt.reading),nt.length?B(this):nt.reading||g.nextTick(it,this)),st},s.prototype.addListener=s.prototype.on,s.prototype.removeListener=function($,Z){var st=S.prototype.removeListener.call(this,$,Z);return $==="readable"&&g.nextTick(et,this),st},s.prototype.removeAllListeners=function($){var Z=S.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&g.nextTick(et,this),Z};function et($){var Z=$._readableState;Z.readableListening=$.listenerCount("readable")>0,Z.resumeScheduled&&!Z.paused?Z.flowing=!0:$.listenerCount("data")>0&&$.resume()}function it($){a("readable nexttick read 0"),$.read(0)}s.prototype.resume=function(){var $=this._readableState;return $.flowing||(a("resume"),$.flowing=!$.readableListening,ut(this,$)),$.paused=!1,this};function ut($,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,g.nextTick(J,$,Z))}function J($,Z){a("resume",Z.reading),Z.reading||$.read(0),Z.resumeScheduled=!1,$.emit("resume"),X($),Z.flowing&&!Z.reading&&$.read(0)}s.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X($){var Z=$._readableState;for(a("flow",Z.flowing);Z.flowing&&$.read()!==null;);}s.prototype.wrap=function($){var Z=this,st=this._readableState,nt=!1;$.on("end",function(){if(a("wrapped end"),st.decoder&&!st.ended){var Tt=st.decoder.end();Tt&&Tt.length&&Z.push(Tt)}Z.push(null)}),$.on("data",function(Tt){if(a("wrapped data"),st.decoder&&(Tt=st.decoder.write(Tt)),!(st.objectMode&&Tt==null)&&!(!st.objectMode&&(!Tt||!Tt.length))){var wt=Z.push(Tt);wt||(nt=!0,$.pause())}});for(var ct in $)this[ct]===void 0&&typeof $[ct]=="function"&&(this[ct]=function(wt){return function(){return $[wt].apply($,arguments)}}(ct));for(var gt=0;gt=Z.length?(Z.decoder?st=Z.buffer.join(""):Z.buffer.length===1?st=Z.buffer.first():st=Z.buffer.concat(Z.length),Z.buffer.clear()):st=Z.buffer.consume($,Z.decoder),st}function V($){var Z=$._readableState;a("endReadable",Z.endEmitted),Z.endEmitted||(Z.ended=!0,g.nextTick(Q,Z,$))}function Q($,Z){if(a("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,Z.readable=!1,Z.emit("end"),$.autoDestroy)){var st=Z._writableState;(!st||st.autoDestroy&&st.finished)&&Z.destroy()}}typeof Symbol=="function"&&(s.from=function($,Z){return A===void 0&&(A=t(90555)),A(s,$,Z)});function ot($,Z){for(var st=0,nt=$.length;st-1))throw new w(tt);return this._writableState.defaultEncoding=tt,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function M(X,tt,V){return!X.objectMode&&X.decodeStrings!==!1&&typeof tt=="string"&&(tt=v.from(tt,V)),tt}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(X,tt,V,Q,ot,$){if(!V){var Z=M(tt,Q,ot);Q!==Z&&(V=!0,ot="buffer",Q=Z)}var st=tt.objectMode?1:Q.length;tt.length+=st;var nt=tt.length0?this.tail.next=h:this.head=h,this.tail=h,++this.length}},{key:"unshift",value:function(m){var h={data:m,next:this.head};this.length===0&&(this.tail=h),this.head=h,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var h=this.head,b=""+h.data;h=h.next;)b+=m+h.data;return b}},{key:"concat",value:function(m){if(this.length===0)return r.alloc(0);for(var h=r.allocUnsafe(m>>>0),b=this.head,u=0;b;)f(b.data,h,u),u+=b.data.length,b=b.next;return h}},{key:"consume",value:function(m,h){var b;return mo.length?o.length:m;if(d===o.length?u+=o:u+=o.slice(0,m),m-=d,m===0){d===o.length?(++b,h.next?this.head=h.next:this.head=this.tail=null):(this.head=h,h.data=o.slice(d));break}++b}return this.length-=b,u}},{key:"_getBuffer",value:function(m){var h=r.allocUnsafe(m),b=this.head,u=1;for(b.data.copy(h),m-=b.data.length;b=b.next;){var o=b.data,d=m>o.length?o.length:m;if(o.copy(h,h.length-m,0,d),m-=d,m===0){d===o.length?(++u,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=o.slice(d));break}++u}return this.length-=u,h}},{key:n,value:function(m,h){return a(this,C({},h,{depth:0,customInspect:!1}))}}]),c}()},55324:function(G,U,t){var g=t(4168);function C(r,e){var a=this,n=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return n||f?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,g.nextTick(v,this,r)):g.nextTick(v,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(c){!e&&c?a._writableState?a._writableState.errorEmitted?g.nextTick(S,a):(a._writableState.errorEmitted=!0,g.nextTick(i,a,c)):g.nextTick(i,a,c):e?(g.nextTick(S,a),e(c)):g.nextTick(S,a)}),this)}function i(r,e){v(r,e),S(r)}function S(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function x(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function v(r,e){r.emit("error",e)}function p(r,e){var a=r._readableState,n=r._writableState;a&&a.autoDestroy||n&&n.autoDestroy?r.destroy(e):r.emit("error",e)}G.exports={destroy:C,undestroy:x,errorOrDestroy:p}},15932:function(G,U,t){var g=t(92784).i.ERR_STREAM_PREMATURE_CLOSE;function C(v){var p=!1;return function(){if(!p){p=!0;for(var r=arguments.length,e=new Array(r),a=0;a0;return r(o,w,A,function(_){b||(b=_),_&&u.forEach(e),!w&&(u.forEach(e),h(b))})});return l.reduce(a)}G.exports=f},24888:function(G,U,t){var g=t(92784).i.ERR_INVALID_OPT_VALUE;function C(S,x,v){return S.highWaterMark!=null?S.highWaterMark:x?S[v]:null}function i(S,x,v,p){var r=C(x,p,v);if(r!=null){if(!(isFinite(r)&&Math.floor(r)===r)||r<0){var e=p?v:"highWaterMark";throw new g(e,r)}return Math.floor(r)}return S.objectMode?16:16384}G.exports={getHighWaterMark:i}},4776:function(G,U,t){G.exports=t(61252).EventEmitter},86032:function(G,U,t){var g=t(30456).Buffer,C=g.isEncoding||function(u){switch(u=""+u,u&&u.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(u){if(!u)return"utf8";for(var o;;)switch(u){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return u;default:if(o)return;u=(""+u).toLowerCase(),o=!0}}function S(u){var o=i(u);if(typeof o!="string"&&(g.isEncoding===C||!C(u)))throw new Error("Unknown encoding: "+u);return o||u}U.o=x;function x(u){this.encoding=S(u);var o;switch(this.encoding){case"utf16le":this.text=f,this.end=c,o=4;break;case"utf8":this.fillLast=e,o=4;break;case"base64":this.text=l,this.end=m,o=3;break;default:this.write=h,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(o)}x.prototype.write=function(u){if(u.length===0)return"";var o,d;if(this.lastNeed){if(o=this.fillLast(u),o===void 0)return"";d=this.lastNeed,this.lastNeed=0}else d=0;return d>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function p(u,o,d){var w=o.length-1;if(w=0?(A>0&&(u.lastNeed=A-1),A):--w=0?(A>0&&(u.lastNeed=A-2),A):--w=0?(A>0&&(A===2?A=0:u.lastNeed=A-3),A):0))}function r(u,o,d){if((o[0]&192)!==128)return u.lastNeed=0,"�";if(u.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return u.lastNeed=1,"�";if(u.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return u.lastNeed=2,"�"}}function e(u){var o=this.lastTotal-this.lastNeed,d=r(this,u);if(d!==void 0)return d;if(this.lastNeed<=u.length)return u.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,o,0,u.length),this.lastNeed-=u.length}function a(u,o){var d=p(this,u,o);if(!this.lastNeed)return u.toString("utf8",o);this.lastTotal=d;var w=u.length-(d-this.lastNeed);return u.copy(this.lastChar,0,w),u.toString("utf8",o,w)}function n(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+"�":o}function f(u,o){if((u.length-o)%2===0){var d=u.toString("utf16le",o);if(d){var w=d.charCodeAt(d.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],d.slice(0,-1)}return d}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",o,u.length-1)}function c(u){var o=u&&u.length?this.write(u):"";if(this.lastNeed){var d=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,d)}return o}function l(u,o){var d=(u.length-o)%3;return d===0?u.toString("base64",o):(this.lastNeed=3-d,this.lastTotal=3,d===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",o,u.length-d))}function m(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function h(u){return u.toString(this.encoding)}function b(u){return u&&u.length?this.write(u):""}},55619:function(G,U,t){var g=t(45408),C=t(86844)("stream-parser");G.exports=p;var i=-1,S=0,x=1,v=2;function p(u){var o=u&&typeof u._transform=="function",d=u&&typeof u._write=="function";if(!o&&!d)throw new Error("must pass a Writable or Transform stream in");C("extending Parser into stream"),u._bytes=e,u._skipBytes=a,o&&(u._passthrough=n),o?u._transform=c:u._write=f}function r(u){C("initializing parser stream"),u._parserBytesLeft=0,u._parserBuffers=[],u._parserBuffered=0,u._parserState=i,u._parserCallback=null,typeof u.push=="function"&&(u._parserOutput=u.push.bind(u)),u._parserInit=!0}function e(u,o){g(!this._parserCallback,'there is already a "callback" set!'),g(isFinite(u)&&u>0,'can only buffer a finite number of bytes > 0, got "'+u+'"'),this._parserInit||r(this),C("buffering %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=S}function a(u,o){g(!this._parserCallback,'there is already a "callback" set!'),g(u>0,'can only skip > 0 bytes, got "'+u+'"'),this._parserInit||r(this),C("skipping %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=x}function n(u,o){g(!this._parserCallback,'There is already a "callback" set!'),g(u>0,'can only pass through > 0 bytes, got "'+u+'"'),this._parserInit||r(this),C("passing through %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=v}function f(u,o,d){this._parserInit||r(this),C("write(%o bytes)",u.length),typeof o=="function"&&(d=o),h(this,u,null,d)}function c(u,o,d){this._parserInit||r(this),C("transform(%o bytes)",u.length),typeof o!="function"&&(o=this._parserOutput),h(this,u,o,d)}function l(u,o,d,w){return u._parserBytesLeft<=0?w(new Error("got data but not currently parsing anything")):o.length<=u._parserBytesLeft?function(){return m(u,o,d,w)}:function(){var A=o.slice(0,u._parserBytesLeft);return m(u,A,d,function(_){if(_)return w(_);if(o.length>A.length)return function(){return l(u,o.slice(A.length),d,w)}})}}function m(u,o,d,w){if(u._parserBytesLeft-=o.length,C("%o bytes left for stream piece",u._parserBytesLeft),u._parserState===S?(u._parserBuffers.push(o),u._parserBuffered+=o.length):u._parserState===v&&d(o),u._parserBytesLeft===0){var A=u._parserCallback;if(A&&u._parserState===S&&u._parserBuffers.length>1&&(o=Buffer.concat(u._parserBuffers,u._parserBuffered)),u._parserState!==S&&(o=null),u._parserCallback=null,u._parserBuffered=0,u._parserState=i,u._parserBuffers.splice(0),A){var _=[];o&&_.push(o),d&&_.push(d);var y=A.length>_.length;y&&_.push(b(w));var E=A.apply(u,_);if(!y||w===E)return w}}else return w}var h=b(l);function b(u){return function(){for(var o=u.apply(this,arguments);typeof o=="function";)o=o();return o}}},86844:function(G,U,t){var g=t(4168);U=G.exports=t(89416),U.log=S,U.formatArgs=i,U.save=x,U.load=v,U.useColors=C,U.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:p(),U.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function C(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}U.formatters.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}};function i(r){var e=this.useColors;if(r[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+r[0]+(e?"%c ":" ")+"+"+U.humanize(this.diff),!!e){var a="color: "+this.color;r.splice(1,0,a,"color: inherit");var n=0,f=0;r[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(n++,c==="%c"&&(f=n))}),r.splice(f,0,a)}}function S(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function x(r){try{r==null?U.storage.removeItem("debug"):U.storage.debug=r}catch{}}function v(){var r;try{r=U.storage.debug}catch{}return!r&&typeof g<"u"&&"env"in g&&(r=g.env.DEBUG),r}U.enable(v());function p(){try{return window.localStorage}catch{}}},89416:function(G,U,t){U=G.exports=i.debug=i.default=i,U.coerce=p,U.disable=x,U.enable=S,U.enabled=v,U.humanize=t(93744),U.names=[],U.skips=[],U.formatters={};var g;function C(r){var e=0,a;for(a in r)e=(e<<5)-e+r.charCodeAt(a),e|=0;return U.colors[Math.abs(e)%U.colors.length]}function i(r){function e(){if(e.enabled){var a=e,n=+new Date,f=n-(g||n);a.diff=f,a.prev=g,a.curr=n,g=n;for(var c=new Array(arguments.length),l=0;l0)return S(r);if(a==="number"&&isNaN(r)===!1)return e.long?v(r):x(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function S(r){if(r=String(r),!(r.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(e){var a=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*C;case"hours":case"hour":case"hrs":case"hr":case"h":return a*g;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*U;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function x(r){return r>=C?Math.round(r/C)+"d":r>=g?Math.round(r/g)+"h":r>=t?Math.round(r/t)+"m":r>=U?Math.round(r/U)+"s":r+"ms"}function v(r){return p(r,C,"day")||p(r,g,"hour")||p(r,t,"minute")||p(r,U,"second")||r+" ms"}function p(r,e,a){if(!(r",'""',"''","``","“”","«»"]:(typeof x.ignore=="string"&&(x.ignore=[x.ignore]),x.ignore=x.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var v=g.parse(i,{flat:!0,brackets:x.ignore}),p=v[0],r=p.split(S);if(x.escape){for(var e=[],a=0;a0;){h=u[u.length-1];var o=t[h];if(x[h]=0&&p[h].push(v[w])}x[h]=d}else{if(i[h]===C[h]){for(var A=[],_=[],y=0,d=b.length-1;d>=0;--d){var E=b[d];if(S[E]=!1,A.push(E),_.push(p[E]),y+=p[E].length,v[E]=a.length,E===h){b.length=d;break}}a.push(A);for(var T=new Array(y),d=0;d<_.length;d++)for(var s=0;s<_[d].length;s++)T[--y]=_[d][s];n.push(T)}u.pop()}}}for(var r=0;r1&&(l=1),l<-1&&(l=-1),c*Math.acos(l)},v=function(e,a,n,f,c,l,m,h,b,u,o,d){var w=Math.pow(c,2),A=Math.pow(l,2),_=Math.pow(o,2),y=Math.pow(d,2),E=w*A-w*y-A*_;E<0&&(E=0),E/=w*y+A*_,E=Math.sqrt(E)*(m===h?-1:1);var T=E*c/l*d,s=E*-l/c*o,L=u*T-b*s+(e+n)/2,M=b*T+u*s+(a+f)/2,z=(o-T)/c,D=(d-s)/l,N=(-o-T)/c,I=(-d-s)/l,k=x(1,0,z,D),B=x(z,D,N,I);return h===0&&B>0&&(B-=C),h===1&&B<0&&(B+=C),[L,M,k,B]},p=function(e){var a=e.px,n=e.py,f=e.cx,c=e.cy,l=e.rx,m=e.ry,h=e.xAxisRotation,b=h===void 0?0:h,u=e.largeArcFlag,o=u===void 0?0:u,d=e.sweepFlag,w=d===void 0?0:d,A=[];if(l===0||m===0)return[];var _=Math.sin(b*C/360),y=Math.cos(b*C/360),E=y*(a-f)/2+_*(n-c)/2,T=-_*(a-f)/2+y*(n-c)/2;if(E===0&&T===0)return[];l=Math.abs(l),m=Math.abs(m);var s=Math.pow(E,2)/Math.pow(l,2)+Math.pow(T,2)/Math.pow(m,2);s>1&&(l*=Math.sqrt(s),m*=Math.sqrt(s));var L=v(a,n,f,c,l,m,o,w,_,y,E,T),M=g(L,4),z=M[0],D=M[1],N=M[2],I=M[3],k=Math.abs(I)/(C/4);Math.abs(1-k)<1e-7&&(k=1);var B=Math.max(Math.ceil(k),1);I/=B;for(var O=0;Or[2]&&(r[2]=n[f+0]),n[f+1]>r[3]&&(r[3]=n[f+1]);return r}},41976:function(G,U,t){G.exports=C;var g=t(92848);function C(x){for(var v,p=[],r=0,e=0,a=0,n=0,f=null,c=null,l=0,m=0,h=0,b=x.length;h4?(r=u[u.length-4],e=u[u.length-3]):(r=l,e=m),p.push(u)}return p}function i(x,v,p,r){return["C",x,v,p,r,p,r]}function S(x,v,p,r,e,a){return["C",x/3+.6666666666666666*p,v/3+.6666666666666666*r,e/3+.6666666666666666*p,a/3+.6666666666666666*r,e,a]}},20472:function(G,U,t){var g=t(74840),C=t(21984),i=t(22235),S=t(53520),x=t(29620),v=document.createElement("canvas"),p=v.getContext("2d");G.exports=r;function r(n,f){if(!S(n))throw Error("Argument should be valid svg path string");f||(f={});var c,l;f.shape?(c=f.shape[0],l=f.shape[1]):(c=v.width=f.w||f.width||200,l=v.height=f.h||f.height||200);var m=Math.min(c,l),h=f.stroke||0,b=f.viewbox||f.viewBox||g(n),u=[c/(b[2]-b[0]),l/(b[3]-b[1])],o=Math.min(u[0]||0,u[1]||0)/2;if(p.fillStyle="black",p.fillRect(0,0,c,l),p.fillStyle="white",h&&(typeof h!="number"&&(h=1),h>0?p.strokeStyle="white":p.strokeStyle="black",p.lineWidth=Math.abs(h)),p.translate(c*.5,l*.5),p.scale(o,o),a()){var d=new Path2D(n);p.fill(d),h&&p.stroke(d)}else{var w=C(n);i(p,w),p.fill(),h&&p.stroke()}p.setTransform(1,0,0,1,0,0);var A=x(p,{cutoff:f.cutoff!=null?f.cutoff:.5,radius:f.radius!=null?f.radius:m*.5});return A}var e;function a(){if(e!=null)return e;var n=document.createElement("canvas").getContext("2d");if(n.canvas.width=n.canvas.height=1,!window.Path2D)return e=!1;var f=new Path2D("M0,0h1v1h-1v-1Z");n.fillStyle="black",n.fill(f);var c=n.getImageData(0,0,1,1);return e=c&&c.data&&c.data[3]===255}},49760:function(G,U,t){var g;(function(C){var i=/^\s+/,S=/\s+$/,x=0,v=C.round,p=C.min,r=C.max,e=C.random;function a(Z,st){if(Z=Z||"",st=st||{},Z instanceof a)return Z;if(!(this instanceof a))return new a(Z,st);var nt=n(Z);this._originalInput=Z,this._r=nt.r,this._g=nt.g,this._b=nt.b,this._a=nt.a,this._roundA=v(100*this._a)/100,this._format=st.format||nt.format,this._gradientType=st.gradientType,this._r<1&&(this._r=v(this._r)),this._g<1&&(this._g=v(this._g)),this._b<1&&(this._b=v(this._b)),this._ok=nt.ok,this._tc_id=x++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Z=this.toRgb();return(Z.r*299+Z.g*587+Z.b*114)/1e3},getLuminance:function(){var Z=this.toRgb(),st,nt,ct,gt,Tt,wt;return st=Z.r/255,nt=Z.g/255,ct=Z.b/255,st<=.03928?gt=st/12.92:gt=C.pow((st+.055)/1.055,2.4),nt<=.03928?Tt=nt/12.92:Tt=C.pow((nt+.055)/1.055,2.4),ct<=.03928?wt=ct/12.92:wt=C.pow((ct+.055)/1.055,2.4),.2126*gt+.7152*Tt+.0722*wt},setAlpha:function(Z){return this._a=O(Z),this._roundA=v(100*this._a)/100,this},toHsv:function(){var Z=m(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,v:Z.v,a:this._a}},toHsvString:function(){var Z=m(this._r,this._g,this._b),st=v(Z.h*360),nt=v(Z.s*100),ct=v(Z.v*100);return this._a==1?"hsv("+st+", "+nt+"%, "+ct+"%)":"hsva("+st+", "+nt+"%, "+ct+"%, "+this._roundA+")"},toHsl:function(){var Z=c(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,l:Z.l,a:this._a}},toHslString:function(){var Z=c(this._r,this._g,this._b),st=v(Z.h*360),nt=v(Z.s*100),ct=v(Z.l*100);return this._a==1?"hsl("+st+", "+nt+"%, "+ct+"%)":"hsla("+st+", "+nt+"%, "+ct+"%, "+this._roundA+")"},toHex:function(Z){return b(this._r,this._g,this._b,Z)},toHexString:function(Z){return"#"+this.toHex(Z)},toHex8:function(Z){return u(this._r,this._g,this._b,this._a,Z)},toHex8String:function(Z){return"#"+this.toHex8(Z)},toRgb:function(){return{r:v(this._r),g:v(this._g),b:v(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+v(this._r)+", "+v(this._g)+", "+v(this._b)+")":"rgba("+v(this._r)+", "+v(this._g)+", "+v(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:v(H(this._r,255)*100)+"%",g:v(H(this._g,255)*100)+"%",b:v(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+v(H(this._r,255)*100)+"%, "+v(H(this._g,255)*100)+"%, "+v(H(this._b,255)*100)+"%)":"rgba("+v(H(this._r,255)*100)+"%, "+v(H(this._g,255)*100)+"%, "+v(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:k[b(this._r,this._g,this._b,!0)]||!1},toFilter:function(Z){var st="#"+o(this._r,this._g,this._b,this._a),nt=st,ct=this._gradientType?"GradientType = 1, ":"";if(Z){var gt=a(Z);nt="#"+o(gt._r,gt._g,gt._b,gt._a)}return"progid:DXImageTransform.Microsoft.gradient("+ct+"startColorstr="+st+",endColorstr="+nt+")"},toString:function(Z){var st=!!Z;Z=Z||this._format;var nt=!1,ct=this._a<1&&this._a>=0,gt=!st&&ct&&(Z==="hex"||Z==="hex6"||Z==="hex3"||Z==="hex4"||Z==="hex8"||Z==="name");return gt?Z==="name"&&this._a===0?this.toName():this.toRgbString():(Z==="rgb"&&(nt=this.toRgbString()),Z==="prgb"&&(nt=this.toPercentageRgbString()),(Z==="hex"||Z==="hex6")&&(nt=this.toHexString()),Z==="hex3"&&(nt=this.toHexString(!0)),Z==="hex4"&&(nt=this.toHex8String(!0)),Z==="hex8"&&(nt=this.toHex8String()),Z==="name"&&(nt=this.toName()),Z==="hsl"&&(nt=this.toHslString()),Z==="hsv"&&(nt=this.toHsvString()),nt||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(Z,st){var nt=Z.apply(null,[this].concat([].slice.call(st)));return this._r=nt._r,this._g=nt._g,this._b=nt._b,this.setAlpha(nt._a),this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(Z,st){return Z.apply(null,[this].concat([].slice.call(st)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(s,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},a.fromRatio=function(Z,st){if(typeof Z=="object"){var nt={};for(var ct in Z)Z.hasOwnProperty(ct)&&(ct==="a"?nt[ct]=Z[ct]:nt[ct]=J(Z[ct]));Z=nt}return a(Z,st)};function n(Z){var st={r:0,g:0,b:0},nt=1,ct=null,gt=null,Tt=null,wt=!1,Rt=!1;return typeof Z=="string"&&(Z=ot(Z)),typeof Z=="object"&&(Q(Z.r)&&Q(Z.g)&&Q(Z.b)?(st=f(Z.r,Z.g,Z.b),wt=!0,Rt=String(Z.r).substr(-1)==="%"?"prgb":"rgb"):Q(Z.h)&&Q(Z.s)&&Q(Z.v)?(ct=J(Z.s),gt=J(Z.v),st=h(Z.h,ct,gt),wt=!0,Rt="hsv"):Q(Z.h)&&Q(Z.s)&&Q(Z.l)&&(ct=J(Z.s),Tt=J(Z.l),st=l(Z.h,ct,Tt),wt=!0,Rt="hsl"),Z.hasOwnProperty("a")&&(nt=Z.a)),nt=O(nt),{ok:wt,format:Z.format||Rt,r:p(255,r(st.r,0)),g:p(255,r(st.g,0)),b:p(255,r(st.b,0)),a:nt}}function f(Z,st,nt){return{r:H(Z,255)*255,g:H(st,255)*255,b:H(nt,255)*255}}function c(Z,st,nt){Z=H(Z,255),st=H(st,255),nt=H(nt,255);var ct=r(Z,st,nt),gt=p(Z,st,nt),Tt,wt,Rt=(ct+gt)/2;if(ct==gt)Tt=wt=0;else{var bt=ct-gt;switch(wt=Rt>.5?bt/(2-ct-gt):bt/(ct+gt),ct){case Z:Tt=(st-nt)/bt+(st1&&(Lt-=1),Lt<.16666666666666666?At+(mt-At)*6*Lt:Lt<.5?mt:Lt<.6666666666666666?At+(mt-At)*(.6666666666666666-Lt)*6:At}if(st===0)ct=gt=Tt=nt;else{var Rt=nt<.5?nt*(1+st):nt+st-nt*st,bt=2*nt-Rt;ct=wt(bt,Rt,Z+.3333333333333333),gt=wt(bt,Rt,Z),Tt=wt(bt,Rt,Z-.3333333333333333)}return{r:ct*255,g:gt*255,b:Tt*255}}function m(Z,st,nt){Z=H(Z,255),st=H(st,255),nt=H(nt,255);var ct=r(Z,st,nt),gt=p(Z,st,nt),Tt,wt,Rt=ct,bt=ct-gt;if(wt=ct===0?0:bt/ct,ct==gt)Tt=0;else{switch(ct){case Z:Tt=(st-nt)/bt+(st>1)+720)%360;--st;)ct.h=(ct.h+gt)%360,Tt.push(a(ct));return Tt}function N(Z,st){st=st||6;for(var nt=a(Z).toHsv(),ct=nt.h,gt=nt.s,Tt=nt.v,wt=[],Rt=1/st;st--;)wt.push(a({h:ct,s:gt,v:Tt})),Tt=(Tt+Rt)%1;return wt}a.mix=function(Z,st,nt){nt=nt===0?0:nt||50;var ct=a(Z).toRgb(),gt=a(st).toRgb(),Tt=nt/100,wt={r:(gt.r-ct.r)*Tt+ct.r,g:(gt.g-ct.g)*Tt+ct.g,b:(gt.b-ct.b)*Tt+ct.b,a:(gt.a-ct.a)*Tt+ct.a};return a(wt)},a.readability=function(Z,st){var nt=a(Z),ct=a(st);return(C.max(nt.getLuminance(),ct.getLuminance())+.05)/(C.min(nt.getLuminance(),ct.getLuminance())+.05)},a.isReadable=function(Z,st,nt){var ct=a.readability(Z,st),gt,Tt;switch(Tt=!1,gt=$(nt),gt.level+gt.size){case"AAsmall":case"AAAlarge":Tt=ct>=4.5;break;case"AAlarge":Tt=ct>=3;break;case"AAAsmall":Tt=ct>=7;break}return Tt},a.mostReadable=function(Z,st,nt){var ct=null,gt=0,Tt,wt,Rt,bt;nt=nt||{},wt=nt.includeFallbackColors,Rt=nt.level,bt=nt.size;for(var At=0;Atgt&&(gt=Tt,ct=a(st[At]));return a.isReadable(Z,ct,{level:Rt,size:bt})||!wt?ct:(nt.includeFallbackColors=!1,a.mostReadable(Z,["#fff","#000"],nt))};var I=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=B(I);function B(Z){var st={};for(var nt in Z)Z.hasOwnProperty(nt)&&(st[Z[nt]]=nt);return st}function O(Z){return Z=parseFloat(Z),(isNaN(Z)||Z<0||Z>1)&&(Z=1),Z}function H(Z,st){et(Z)&&(Z="100%");var nt=it(Z);return Z=p(st,r(0,parseFloat(Z))),nt&&(Z=parseInt(Z*st,10)/100),C.abs(Z-st)<1e-6?1:Z%st/parseFloat(st)}function Y(Z){return p(1,r(0,Z))}function j(Z){return parseInt(Z,16)}function et(Z){return typeof Z=="string"&&Z.indexOf(".")!=-1&&parseFloat(Z)===1}function it(Z){return typeof Z=="string"&&Z.indexOf("%")!=-1}function ut(Z){return Z.length==1?"0"+Z:""+Z}function J(Z){return Z<=1&&(Z=Z*100+"%"),Z}function X(Z){return C.round(parseFloat(Z)*255).toString(16)}function tt(Z){return j(Z)/255}var V=function(){var Z="[-\\+]?\\d+%?",st="[-\\+]?\\d*\\.\\d+%?",nt="(?:"+st+")|(?:"+Z+")",ct="[\\s|\\(]+("+nt+")[,|\\s]+("+nt+")[,|\\s]+("+nt+")\\s*\\)?",gt="[\\s|\\(]+("+nt+")[,|\\s]+("+nt+")[,|\\s]+("+nt+")[,|\\s]+("+nt+")\\s*\\)?";return{CSS_UNIT:new RegExp(nt),rgb:new RegExp("rgb"+ct),rgba:new RegExp("rgba"+gt),hsl:new RegExp("hsl"+ct),hsla:new RegExp("hsla"+gt),hsv:new RegExp("hsv"+ct),hsva:new RegExp("hsva"+gt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Q(Z){return!!V.CSS_UNIT.exec(Z)}function ot(Z){Z=Z.replace(i,"").replace(S,"").toLowerCase();var st=!1;if(I[Z])Z=I[Z],st=!0;else if(Z=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var nt;return(nt=V.rgb.exec(Z))?{r:nt[1],g:nt[2],b:nt[3]}:(nt=V.rgba.exec(Z))?{r:nt[1],g:nt[2],b:nt[3],a:nt[4]}:(nt=V.hsl.exec(Z))?{h:nt[1],s:nt[2],l:nt[3]}:(nt=V.hsla.exec(Z))?{h:nt[1],s:nt[2],l:nt[3],a:nt[4]}:(nt=V.hsv.exec(Z))?{h:nt[1],s:nt[2],v:nt[3]}:(nt=V.hsva.exec(Z))?{h:nt[1],s:nt[2],v:nt[3],a:nt[4]}:(nt=V.hex8.exec(Z))?{r:j(nt[1]),g:j(nt[2]),b:j(nt[3]),a:tt(nt[4]),format:st?"name":"hex8"}:(nt=V.hex6.exec(Z))?{r:j(nt[1]),g:j(nt[2]),b:j(nt[3]),format:st?"name":"hex"}:(nt=V.hex4.exec(Z))?{r:j(nt[1]+""+nt[1]),g:j(nt[2]+""+nt[2]),b:j(nt[3]+""+nt[3]),a:tt(nt[4]+""+nt[4]),format:st?"name":"hex8"}:(nt=V.hex3.exec(Z))?{r:j(nt[1]+""+nt[1]),g:j(nt[2]+""+nt[2]),b:j(nt[3]+""+nt[3]),format:st?"name":"hex"}:!1}function $(Z){var st,nt;return Z=Z||{level:"AA",size:"small"},st=(Z.level||"AA").toUpperCase(),nt=(Z.size||"small").toLowerCase(),st!=="AA"&&st!=="AAA"&&(st="AA"),nt!=="small"&&nt!=="large"&&(nt="small"),{level:st,size:nt}}G.exports?G.exports=a:(g=(function(){return a}).call(U,t,U,G),g!==void 0&&(G.exports=g))})(Math)},37816:function(G){G.exports=g,G.exports.float32=G.exports.float=g,G.exports.fract32=G.exports.fract=t;var U=new Float32Array(1);function t(C,i){if(C.length){if(C instanceof Float32Array)return new Float32Array(C.length);i instanceof Float32Array||(i=g(C));for(var S=0,x=i.length;S":(S.length>100&&(S=S.slice(0,99)+"…"),S=S.replace(C,function(x){switch(x){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}},7328:function(G,U,t){var g=t(81680),C={object:!0,function:!0,undefined:!0};G.exports=function(i){return g(i)?hasOwnProperty.call(C,typeof i):!1}},87396:function(G,U,t){var g=t(57980),C=t(85488);G.exports=function(i){return C(i)?i:g(i,"%v is not a plain function",arguments[1])}},85488:function(G,U,t){var g=t(73384),C=/^\s*class[\s{/}]/,i=Function.prototype.toString;G.exports=function(S){return!(!g(S)||C.test(i.call(S)))}},54612:function(G,U,t){var g=t(7328);G.exports=function(C){if(!g(C))return!1;try{return C.constructor?C.constructor.prototype===C:!1}catch{return!1}}},33940:function(G,U,t){var g=t(81680),C=t(7328),i=Object.prototype.toString;G.exports=function(S){if(!g(S))return null;if(C(S)){var x=S.toString;if(typeof x!="function"||x===i)return null}try{return""+S}catch{return null}}},18496:function(G,U,t){var g=t(57980),C=t(81680);G.exports=function(i){return C(i)?i:g(i,"Cannot use %v",arguments[1])}},81680:function(G){var U=void 0;G.exports=function(t){return t!==U&&t!==null}},14144:function(G,U,t){var g=t(308),C=t(10352),i=t(33576).Buffer;t.g.__TYPEDARRAY_POOL||(t.g.__TYPEDARRAY_POOL={UINT8:C([32,0]),UINT16:C([32,0]),UINT32:C([32,0]),BIGUINT64:C([32,0]),INT8:C([32,0]),INT16:C([32,0]),INT32:C([32,0]),BIGINT64:C([32,0]),FLOAT:C([32,0]),DOUBLE:C([32,0]),DATA:C([32,0]),UINT8C:C([32,0]),BUFFER:C([32,0])});var S=typeof Uint8ClampedArray<"u",x=typeof BigUint64Array<"u",v=typeof BigInt64Array<"u",p=t.g.__TYPEDARRAY_POOL;p.UINT8C||(p.UINT8C=C([32,0])),p.BIGUINT64||(p.BIGUINT64=C([32,0])),p.BIGINT64||(p.BIGINT64=C([32,0])),p.BUFFER||(p.BUFFER=C([32,0]));var r=p.DATA,e=p.BUFFER;U.free=function(s){if(i.isBuffer(s))e[g.log2(s.length)].push(s);else{if(Object.prototype.toString.call(s)!=="[object ArrayBuffer]"&&(s=s.buffer),!s)return;var L=s.length||s.byteLength,M=g.log2(L)|0;r[M].push(s)}};function a(T){if(T){var s=T.length||T.byteLength,L=g.log2(s);r[L].push(T)}}function n(T){a(T.buffer)}U.freeUint8=U.freeUint16=U.freeUint32=U.freeBigUint64=U.freeInt8=U.freeInt16=U.freeInt32=U.freeBigInt64=U.freeFloat32=U.freeFloat=U.freeFloat64=U.freeDouble=U.freeUint8Clamped=U.freeDataView=n,U.freeArrayBuffer=a,U.freeBuffer=function(s){e[g.log2(s.length)].push(s)},U.malloc=function(s,L){if(L===void 0||L==="arraybuffer")return f(s);switch(L){case"uint8":return c(s);case"uint16":return l(s);case"uint32":return m(s);case"int8":return h(s);case"int16":return b(s);case"int32":return u(s);case"float":case"float32":return o(s);case"double":case"float64":return d(s);case"uint8_clamped":return w(s);case"bigint64":return _(s);case"biguint64":return A(s);case"buffer":return E(s);case"data":case"dataview":return y(s);default:return null}return null};function f(s){var s=g.nextPow2(s),L=g.log2(s),M=r[L];return M.length>0?M.pop():new ArrayBuffer(s)}U.mallocArrayBuffer=f;function c(T){return new Uint8Array(f(T),0,T)}U.mallocUint8=c;function l(T){return new Uint16Array(f(2*T),0,T)}U.mallocUint16=l;function m(T){return new Uint32Array(f(4*T),0,T)}U.mallocUint32=m;function h(T){return new Int8Array(f(T),0,T)}U.mallocInt8=h;function b(T){return new Int16Array(f(2*T),0,T)}U.mallocInt16=b;function u(T){return new Int32Array(f(4*T),0,T)}U.mallocInt32=u;function o(T){return new Float32Array(f(4*T),0,T)}U.mallocFloat32=U.mallocFloat=o;function d(T){return new Float64Array(f(8*T),0,T)}U.mallocFloat64=U.mallocDouble=d;function w(T){return S?new Uint8ClampedArray(f(T),0,T):c(T)}U.mallocUint8Clamped=w;function A(T){return x?new BigUint64Array(f(8*T),0,T):null}U.mallocBigUint64=A;function _(T){return v?new BigInt64Array(f(8*T),0,T):null}U.mallocBigInt64=_;function y(T){return new DataView(f(T),0,T)}U.mallocDataView=y;function E(T){T=g.nextPow2(T);var s=g.log2(T),L=e[s];return L.length>0?L.pop():new i(T)}U.mallocBuffer=E,U.clearCache=function(){for(var s=0;s<32;++s)p.UINT8[s].length=0,p.UINT16[s].length=0,p.UINT32[s].length=0,p.INT8[s].length=0,p.INT16[s].length=0,p.INT32[s].length=0,p.FLOAT[s].length=0,p.DOUBLE[s].length=0,p.BIGUINT64[s].length=0,p.BIGINT64[s].length=0,p.UINT8C[s].length=0,r[s].length=0,e[s].length=0}},92384:function(G){var U=/[\'\"]/;G.exports=function(g){return g?(U.test(g.charAt(0))&&(g=g.substr(1)),U.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}},45223:function(G){G.exports=function(t,g,C){Array.isArray(C)||(C=[].slice.call(arguments,2));for(var i=0,S=C.length;i"u"?!1:L.working?L(Tt):Tt instanceof Map}U.isMap=M;function z(Tt){return r(Tt)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function D(Tt){return typeof Set>"u"?!1:z.working?z(Tt):Tt instanceof Set}U.isSet=D;function N(Tt){return r(Tt)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function I(Tt){return typeof WeakMap>"u"?!1:N.working?N(Tt):Tt instanceof WeakMap}U.isWeakMap=I;function k(Tt){return r(Tt)==="[object WeakSet]"}k.working=typeof WeakSet<"u"&&k(new WeakSet);function B(Tt){return k(Tt)}U.isWeakSet=B;function O(Tt){return r(Tt)==="[object ArrayBuffer]"}O.working=typeof ArrayBuffer<"u"&&O(new ArrayBuffer);function H(Tt){return typeof ArrayBuffer>"u"?!1:O.working?O(Tt):Tt instanceof ArrayBuffer}U.isArrayBuffer=H;function Y(Tt){return r(Tt)==="[object DataView]"}Y.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Y(new DataView(new ArrayBuffer(1),0,1));function j(Tt){return typeof DataView>"u"?!1:Y.working?Y(Tt):Tt instanceof DataView}U.isDataView=j;var et=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function it(Tt){return r(Tt)==="[object SharedArrayBuffer]"}function ut(Tt){return typeof et>"u"?!1:(typeof it.working>"u"&&(it.working=it(new et)),it.working?it(Tt):Tt instanceof et)}U.isSharedArrayBuffer=ut;function J(Tt){return r(Tt)==="[object AsyncFunction]"}U.isAsyncFunction=J;function X(Tt){return r(Tt)==="[object Map Iterator]"}U.isMapIterator=X;function tt(Tt){return r(Tt)==="[object Set Iterator]"}U.isSetIterator=tt;function V(Tt){return r(Tt)==="[object Generator]"}U.isGeneratorObject=V;function Q(Tt){return r(Tt)==="[object WebAssembly.Module]"}U.isWebAssemblyCompiledModule=Q;function ot(Tt){return l(Tt,e)}U.isNumberObject=ot;function $(Tt){return l(Tt,a)}U.isStringObject=$;function Z(Tt){return l(Tt,n)}U.isBooleanObject=Z;function st(Tt){return v&&l(Tt,f)}U.isBigIntObject=st;function nt(Tt){return p&&l(Tt,c)}U.isSymbolObject=nt;function ct(Tt){return ot(Tt)||$(Tt)||Z(Tt)||st(Tt)||nt(Tt)}U.isBoxedPrimitive=ct;function gt(Tt){return typeof Uint8Array<"u"&&(H(Tt)||ut(Tt))}U.isAnyArrayBuffer=gt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Tt){Object.defineProperty(U,Tt,{enumerable:!1,value:function(){throw new Error(Tt+" is not supported in userland")}})})},35840:function(G,U,t){var g=t(4168),C=Object.getOwnPropertyDescriptors||function(et){for(var it=Object.keys(et),ut={},J=0;J=J)return V;switch(V){case"%s":return String(ut[it++]);case"%d":return Number(ut[it++]);case"%j":try{return JSON.stringify(ut[it++])}catch{return"[Circular]"}default:return V}}),tt=ut[it];it"u")return function(){return U.deprecate(j,et).apply(this,arguments)};var it=!1;function ut(){if(!it){if(g.throwDeprecation)throw new Error(et);g.traceDeprecation?console.trace(et):console.error(et),it=!0}return j.apply(this,arguments)}return ut};var S={},x=/^$/;if(g.env.NODE_DEBUG){var v=g.env.NODE_DEBUG;v=v.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),x=new RegExp("^"+v+"$","i")}U.debuglog=function(j){if(j=j.toUpperCase(),!S[j])if(x.test(j)){var et=g.pid;S[j]=function(){var it=U.format.apply(U,arguments);console.error("%s %d: %s",j,et,it)}}else S[j]=function(){};return S[j]};function p(j,et){var it={seen:[],stylize:e};return arguments.length>=3&&(it.depth=arguments[2]),arguments.length>=4&&(it.colors=arguments[3]),u(et)?it.showHidden=et:et&&U._extend(it,et),y(it.showHidden)&&(it.showHidden=!1),y(it.depth)&&(it.depth=2),y(it.colors)&&(it.colors=!1),y(it.customInspect)&&(it.customInspect=!0),it.colors&&(it.stylize=r),n(it,j,it.depth)}U.inspect=p,p.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},p.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(j,et){var it=p.styles[et];return it?"\x1B["+p.colors[it][0]+"m"+j+"\x1B["+p.colors[it][1]+"m":j}function e(j,et){return j}function a(j){var et={};return j.forEach(function(it,ut){et[it]=!0}),et}function n(j,et,it){if(j.customInspect&&et&&M(et.inspect)&&et.inspect!==U.inspect&&!(et.constructor&&et.constructor.prototype===et)){var ut=et.inspect(it,j);return A(ut)||(ut=n(j,ut,it)),ut}var J=f(j,et);if(J)return J;var X=Object.keys(et),tt=a(X);if(j.showHidden&&(X=Object.getOwnPropertyNames(et)),L(et)&&(X.indexOf("message")>=0||X.indexOf("description")>=0))return c(et);if(X.length===0){if(M(et)){var V=et.name?": "+et.name:"";return j.stylize("[Function"+V+"]","special")}if(E(et))return j.stylize(RegExp.prototype.toString.call(et),"regexp");if(s(et))return j.stylize(Date.prototype.toString.call(et),"date");if(L(et))return c(et)}var Q="",ot=!1,$=["{","}"];if(b(et)&&(ot=!0,$=["[","]"]),M(et)){var Z=et.name?": "+et.name:"";Q=" [Function"+Z+"]"}if(E(et)&&(Q=" "+RegExp.prototype.toString.call(et)),s(et)&&(Q=" "+Date.prototype.toUTCString.call(et)),L(et)&&(Q=" "+c(et)),X.length===0&&(!ot||et.length==0))return $[0]+Q+$[1];if(it<0)return E(et)?j.stylize(RegExp.prototype.toString.call(et),"regexp"):j.stylize("[Object]","special");j.seen.push(et);var st;return ot?st=l(j,et,it,tt,X):st=X.map(function(nt){return m(j,et,it,tt,nt,ot)}),j.seen.pop(),h(st,Q,$)}function f(j,et){if(y(et))return j.stylize("undefined","undefined");if(A(et)){var it="'"+JSON.stringify(et).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return j.stylize(it,"string")}if(w(et))return j.stylize(""+et,"number");if(u(et))return j.stylize(""+et,"boolean");if(o(et))return j.stylize("null","null")}function c(j){return"["+Error.prototype.toString.call(j)+"]"}function l(j,et,it,ut,J){for(var X=[],tt=0,V=et.length;tt"+pi+"?"+Hr+".constant["+pi+"]:0;"}).join(""),"}}else{","if(",wn,"(",Hr,".buffer)){",On,"=",Ln,".createStream(",34962,",",Hr,".buffer);","}else{",On,"=",Ln,".getBuffer(",Hr,".buffer);","}",mi,'="type" in ',Hr,"?",Qr.glTypes,"[",Hr,".type]:",On,".dtype;",Pn.normalized,"=!!",Hr,".normalized;"),Zr("size"),Zr("offset"),Zr("stride"),Zr("divisor"),Er("}}"),Er.exit("if(",Pn.isStream,"){",Ln,".destroyStream(",On,");","}"),Pn})}),xn}function pr(Sr){var kr=Sr.static,Ar=Sr.dynamic,Or={};return Object.keys(kr).forEach(function(xn){var In=kr[xn];Or[xn]=ot(function(hn,sn){return typeof In=="number"||typeof In=="boolean"?""+In:hn.link(In)})}),Object.keys(Ar).forEach(function(xn){var In=Ar[xn];Or[xn]=$(In,function(hn,sn){return hn.invoke(sn,In)})}),Or}function Gr(Sr,kr,Ar,Or,xn){function In(Un){var On=sn[Un];On&&(Zr[Un]=On)}var hn=fr(Sr,kr),wn=Qe(Sr),sn=er(Sr,wn),Er=He(Sr),Zr=dr(Sr),Hr=rr(Sr,xn,hn);In("viewport"),In(vr("scissor.box"));var Qr=0"u"?"Date.now()":"performance.now()"}function hn(Un){Ln=kr.def(),Un(Ln,"=",In(),";"),typeof xn=="string"?Un(Hr,".count+=",xn,";"):Un(Hr,".count++;"),Je&&(Or?(Pn=kr.def(),Un(Pn,"=",wn,".getNumPendingQueries();")):Un(wn,".beginQuery(",Hr,");"))}function sn(Un){Un(Hr,".cpuTime+=",In(),"-",Ln,";"),Je&&(Or?Un(wn,".pushScopeStats(",Pn,",",wn,".getNumPendingQueries(),",Hr,");"):Un(wn,".endQuery();"))}function Er(Un){var On=kr.def(Qr,".profile");kr(Qr,".profile=",Un,";"),kr.exit(Qr,".profile=",On,";")}var Zr=Sr.shared,Hr=Sr.stats,Qr=Zr.current,wn=Zr.timer;Ar=Ar.profile;var Ln,Pn;if(Ar){if(Q(Ar)){Ar.enable?(hn(kr),sn(kr.exit),Er("true")):Er("false");return}Ar=Ar.append(Sr,kr),Er(Ar)}else Ar=kr.def(Qr,".profile");Zr=Sr.block(),hn(Zr),kr("if(",Ar,"){",Zr,"}"),Sr=Sr.block(),sn(Sr),kr.exit("if(",Ar,"){",Sr,"}")}function Tr(Sr,kr,Ar,Or,xn){function In(Er){switch(Er){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}function hn(Er,Zr,Hr){function Qr(){kr("if(!",Un,".buffer){",Ln,".enableVertexAttribArray(",Pn,");}");var pi=Hr.type,Ci;Ci=Hr.size?kr.def(Hr.size,"||",Zr):Zr,kr("if(",Un,".type!==",pi,"||",Un,".size!==",Ci,"||",ai.map(function(pa){return Un+"."+pa+"!=="+Hr[pa]}).join("||"),"){",Ln,".bindBuffer(",34962,",",On,".buffer);",Ln,".vertexAttribPointer(",[Pn,Ci,pi,Hr.normalized,Hr.stride,Hr.offset],");",Un,".type=",pi,";",Un,".size=",Ci,";",ai.map(function(pa){return Un+"."+pa+"="+Hr[pa]+";"}).join(""),"}"),wr&&(pi=Hr.divisor,kr("if(",Un,".divisor!==",pi,"){",Sr.instancing,".vertexAttribDivisorANGLE(",[Pn,pi],");",Un,".divisor=",pi,";}"))}function wn(){kr("if(",Un,".buffer){",Ln,".disableVertexAttribArray(",Pn,");",Un,".buffer=null;","}if(",me.map(function(pi,Ci){return Un+"."+pi+"!=="+mi[Ci]}).join("||"),"){",Ln,".vertexAttrib4f(",Pn,",",mi,");",me.map(function(pi,Ci){return Un+"."+pi+"="+mi[Ci]+";"}).join(""),"}")}var Ln=sn.gl,Pn=kr.def(Er,".location"),Un=kr.def(sn.attributes,"[",Pn,"]");Er=Hr.state;var On=Hr.buffer,mi=[Hr.x,Hr.y,Hr.z,Hr.w],ai=["buffer","normalized","offset","stride"];Er===1?Qr():Er===2?wn():(kr("if(",Er,"===",1,"){"),Qr(),kr("}else{"),wn(),kr("}"))}var sn=Sr.shared;Or.forEach(function(Er){var Zr=Er.name,Hr=Ar.attributes[Zr],Qr;if(Hr){if(!xn(Hr))return;Qr=Hr.append(Sr,kr)}else{if(!xn(Be))return;var wn=Sr.scopeAttrib(Zr);Qr={},Object.keys(new li).forEach(function(Ln){Qr[Ln]=kr.def(wn,".",Ln)})}hn(Sr.link(Er),In(Er.info.type),Qr)})}function Cr(Sr,kr,Ar,Or,xn,In){for(var hn=Sr.shared,sn=hn.gl,Er,Zr=0;Zr>1)",Un],");")}function Ci(){Ar(On,".drawArraysInstancedANGLE(",[wn,Ln,Pn,Un],");")}Qr&&Qr!=="null"?ai?pi():(Ar("if(",Qr,"){"),pi(),Ar("}else{"),Ci(),Ar("}")):Ci()}function hn(){function pi(){Ar(Er+".drawElements("+[wn,Pn,mi,Ln+"<<(("+mi+"-5121)>>1)"]+");")}function Ci(){Ar(Er+".drawArrays("+[wn,Ln,Pn]+");")}Qr&&Qr!=="null"?ai?pi():(Ar("if(",Qr,"){"),pi(),Ar("}else{"),Ci(),Ar("}")):Ci()}var sn=Sr.shared,Er=sn.gl,Zr=sn.draw,Hr=Or.draw,Qr=function(){var pi=Hr.elements,Ci=kr;return pi?((pi.contextDep&&Or.contextDynamic||pi.propDep)&&(Ci=Ar),pi=pi.append(Sr,Ci),Hr.elementsActive&&Ci("if("+pi+")"+Er+".bindBuffer(34963,"+pi+".buffer.buffer);")):(pi=Ci.def(),Ci(pi,"=",Zr,".","elements",";","if(",pi,"){",Er,".bindBuffer(",34963,",",pi,".buffer.buffer);}","else if(",sn.vao,".currentVAO){",pi,"=",Sr.shared.elements+".getElements("+sn.vao,".currentVAO.elements);",$r?"":"if("+pi+")"+Er+".bindBuffer(34963,"+pi+".buffer.buffer);","}")),pi}(),wn=xn("primitive"),Ln=xn("offset"),Pn=function(){var pi=Hr.count,Ci=kr;return pi?((pi.contextDep&&Or.contextDynamic||pi.propDep)&&(Ci=Ar),pi=pi.append(Sr,Ci)):pi=Ci.def(Zr,".","count"),pi}();if(typeof Pn=="number"){if(Pn===0)return}else Ar("if(",Pn,"){"),Ar.exit("}");var Un,On;wr&&(Un=xn("instances"),On=Sr.instancing);var mi=Qr+".type",ai=Hr.elements&&Q(Hr.elements)&&!Hr.vaoActive;wr&&(typeof Un!="number"||0<=Un)?typeof Un=="string"?(Ar("if(",Un,">0){"),In(),Ar("}else if(",Un,"<0){"),hn(),Ar("}")):In():hn()}function Ur(Sr,kr,Ar,Or,xn){return kr=Ne(),xn=kr.proc("body",xn),wr&&(kr.instancing=xn.def(kr.shared.extensions,".angle_instanced_arrays")),Sr(kr,xn,Ar,Or),kr.compile().body}function an(Sr,kr,Ar,Or){Cn(Sr,kr),Ar.useVAO?Ar.drawVAO?kr(Sr.shared.vao,".setVAO(",Ar.drawVAO.append(Sr,kr),");"):kr(Sr.shared.vao,".setVAO(",Sr.shared.vao,".targetVAO);"):(kr(Sr.shared.vao,".setVAO(null);"),Tr(Sr,kr,Ar,Or.attributes,function(){return!0})),Cr(Sr,kr,Ar,Or.uniforms,function(){return!0},!1),Wr(Sr,kr,kr,Ar)}function pn(Sr,kr){var Ar=Sr.proc("draw",1);Cn(Sr,Ar),Pr(Sr,Ar,kr.context),Dr(Sr,Ar,kr.framebuffer),cn(Sr,Ar,kr),rn(Sr,Ar,kr.state),En(Sr,Ar,kr,!1,!0);var Or=kr.shader.progVar.append(Sr,Ar);if(Ar(Sr.shared.gl,".useProgram(",Or,".program);"),kr.shader.program)an(Sr,Ar,kr,kr.shader.program);else{Ar(Sr.shared.vao,".setVAO(null);");var xn=Sr.global.def("{}"),In=Ar.def(Or,".id"),hn=Ar.def(xn,"[",In,"]");Ar(Sr.cond(hn).then(hn,".call(this,a0);").else(hn,"=",xn,"[",In,"]=",Sr.link(function(sn){return Ur(an,Sr,kr,sn,1)}),"(",Or,");",hn,".call(this,a0);"))}0=--this.refCount&&se(this)},$e.profile&&(or.getTotalRenderbufferSize=function(){var ke=0;return Object.keys(Pe).forEach(function(Ve){ke+=Pe[Ve].stats.size}),ke}),{create:function(ke,Ve){function Je(hr,vr){var Yt=0,Gt=0,Ne=32854;if(typeof hr=="object"&&hr?("shape"in hr?(Gt=hr.shape,Yt=Gt[0]|0,Gt=Gt[1]|0):("radius"in hr&&(Yt=Gt=hr.radius|0),"width"in hr&&(Yt=hr.width|0),"height"in hr&&(Gt=hr.height|0)),"format"in hr&&(Ne=Ae[hr.format])):typeof hr=="number"?(Yt=hr|0,Gt=typeof vr=="number"?vr|0:Yt):hr||(Yt=Gt=1),Yt!==ur.width||Gt!==ur.height||Ne!==ur.format)return Je.width=ur.width=Yt,Je.height=ur.height=Gt,ur.format=Ne,pe.bindRenderbuffer(36161,ur.renderbuffer),pe.renderbufferStorage(36161,Ne,Yt,Gt),$e.profile&&(ur.stats.size=Et[ur.format]*ur.width*ur.height),Je.format=Ce[ur.format],Je}var ur=new ge(pe.createRenderbuffer());return Pe[ur.id]=ur,or.renderbufferCount++,Je(ke,Ve),Je.resize=function(hr,vr){var Yt=hr|0,Gt=vr|0||Yt;return Yt===ur.width&&Gt===ur.height||(Je.width=ur.width=Yt,Je.height=ur.height=Gt,pe.bindRenderbuffer(36161,ur.renderbuffer),pe.renderbufferStorage(36161,ur.format,Yt,Gt),$e.profile&&(ur.stats.size=Et[ur.format]*ur.width*ur.height)),Je},Je._reglType="renderbuffer",Je._renderbuffer=ur,$e.profile&&(Je.stats=ur.stats),Je.destroy=function(){ur.decRef()},Je},clear:function(){mt(Pe).forEach(se)},restore:function(){mt(Pe).forEach(function(ke){ke.renderbuffer=pe.createRenderbuffer(),pe.bindRenderbuffer(36161,ke.renderbuffer),pe.renderbufferStorage(36161,ke.format,ke.width,ke.height)}),pe.bindRenderbuffer(36161,null)}}},Nt=[];Nt[6408]=4,Nt[6407]=3;var jt=[];jt[5121]=1,jt[5126]=4,jt[36193]=2;var ie=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],me=["x","y","z","w"],be="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),ve={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Le={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ce={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Te={cw:2304,ccw:2305},Be=new V(!1,!1,!1,function(){}),ir=function(pe,Xe){function Ke(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function or(Pe,ke,Ve){var Je=se.pop()||new Ke;Je.startQueryIndex=Pe,Je.endQueryIndex=ke,Je.sum=0,Je.stats=Ve,Ae.push(Je)}if(!Xe.ext_disjoint_timer_query)return null;var $e=[],ge=[],se=[],Ae=[],Ce=[],Ie=[];return{beginQuery:function(Pe){var ke=$e.pop()||Xe.ext_disjoint_timer_query.createQueryEXT();Xe.ext_disjoint_timer_query.beginQueryEXT(35007,ke),ge.push(ke),or(ge.length-1,ge.length,Pe)},endQuery:function(){Xe.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:or,update:function(){var Pe,ke;if(Pe=ge.length,Pe!==0){Ie.length=Math.max(Ie.length,Pe+1),Ce.length=Math.max(Ce.length,Pe+1),Ce[0]=0;var Ve=Ie[0]=0;for(ke=Pe=0;ke=En.length&&or()}var _n=st(En,pn);En[_n]=gn}}}function Ie(){var pn=rn.viewport,gn=rn.scissor_box;pn[0]=pn[1]=gn[0]=gn[1]=0,er.viewportWidth=er.framebufferWidth=er.drawingBufferWidth=pn[2]=gn[2]=Je.drawingBufferWidth,er.viewportHeight=er.framebufferHeight=er.drawingBufferHeight=pn[3]=gn[3]=Je.drawingBufferHeight}function Pe(){er.tick+=1,er.time=Ve(),Ie(),Dr.procs.poll()}function ke(){pr.refresh(),Ie(),Dr.procs.refresh(),Ne&&Ne.update()}function Ve(){return(wt()-Oe)/1e3}if(pe=r(pe),!pe)return null;var Je=pe.gl,ur=Je.getContextAttributes();Je.isContextLost();var hr=e(Je,pe);if(!hr)return null;var cn=i(),vr={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Yt=pe.cachedCode||{},Gt=hr.extensions,Ne=ir(Je,Gt),Oe=wt(),fr=Je.drawingBufferWidth,Qe=Je.drawingBufferHeight,er={tick:0,time:0,viewportWidth:fr,viewportHeight:Qe,framebufferWidth:fr,framebufferHeight:Qe,drawingBufferWidth:fr,drawingBufferHeight:Qe,pixelRatio:pe.pixelRatio},fr={elements:null,primitive:4,count:-1,offset:0,instances:-1},rr=bt(Je,Gt),He=o(Je,vr,pe,function(pn){return mr.destroyBuffer(pn)}),dr=d(Je,Gt,He,vr),mr=I(Je,Gt,rr,vr,He,dr,fr),xr=k(Je,cn,vr,pe),pr=z(Je,Gt,rr,function(){Dr.procs.poll()},er,vr,pe),Gr=Mt(Je,Gt,rr,vr,pe),Pr=D(Je,Gt,rr,pr,Gr,vr),Dr=Z(Je,cn,Gt,rr,He,dr,pr,Pr,{},mr,xr,fr,er,Ne,Yt,pe),cn=B(Je,Pr,Dr.procs.poll,er),rn=Dr.next,Cn=Je.canvas,En=[],Tr=[],Cr=[],Wr=[pe.onDestroy],Ur=null;Cn&&(Cn.addEventListener("webglcontextlost",$e,!1),Cn.addEventListener("webglcontextrestored",ge,!1));var an=Pr.setFBO=se({framebuffer:gt.define.call(null,1,"framebuffer")});return ke(),ur=nt(se,{clear:function(pn){if("framebuffer"in pn)if(pn.framebuffer&&pn.framebuffer_reglType==="framebufferCube")for(var gn=0;6>gn;++gn)an(nt({framebuffer:pn.framebuffer.faces[gn]},pn),Ae);else an(pn,Ae);else Ae(null,pn)},prop:gt.define.bind(null,1),context:gt.define.bind(null,2),this:gt.define.bind(null,3),draw:se({}),buffer:function(pn){return He.create(pn,34962,!1,!1)},elements:function(pn){return dr.create(pn,!1)},texture:pr.create2D,cube:pr.createCube,renderbuffer:Gr.create,framebuffer:Pr.create,framebufferCube:Pr.createCube,vao:mr.createVAO,attributes:ur,frame:Ce,on:function(pn,gn){var _n;switch(pn){case"frame":return Ce(gn);case"lost":_n=Tr;break;case"restore":_n=Cr;break;case"destroy":_n=Wr}return _n.push(gn),{cancel:function(){for(var kn=0;kn<_n.length;++kn)if(_n[kn]===gn){_n[kn]=_n[_n.length-1],_n.pop();break}}}},limits:rr,hasExtension:function(pn){return 0<=rr.extensions.indexOf(pn.toLowerCase())},read:cn,destroy:function(){En.length=0,or(),Cn&&(Cn.removeEventListener("webglcontextlost",$e),Cn.removeEventListener("webglcontextrestored",ge)),xr.clear(),Pr.clear(),Gr.clear(),mr.clear(),pr.clear(),dr.clear(),He.clear(),Ne&&Ne.clear(),Wr.forEach(function(pn){pn()})},_gl:Je,_refresh:ke,poll:function(){Pe(),Ne&&Ne.update()},now:Ve,stats:vr,getCachedCode:function(){return Yt},preloadCachedCode:function(pn){Object.entries(pn).forEach(function(gn){Yt[gn[0]]=gn[1]})}}),pe.onDone(null,ur),ur}})},30456:function(G,U,t){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var g=t(33576),C=g.Buffer;function i(x,h){for(var p in x)h[p]=x[p]}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?G.exports=g:(i(g,U),U.Buffer=S);function S(x,h,p){return C(x,h,p)}S.prototype=Object.create(C.prototype),i(C,S),S.from=function(x,h,p){if(typeof x=="number")throw new TypeError("Argument must not be a number");return C(x,h,p)},S.alloc=function(x,h,p){if(typeof x!="number")throw new TypeError("Argument must be a number");var r=C(x);return h!==void 0?typeof p=="string"?r.fill(h,p):r.fill(h):r.fill(0),r},S.allocUnsafe=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return C(x)},S.allocUnsafeSlow=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return g.SlowBuffer(x)}},14500:function(G,U,t){var g=t(53664),C=t(64348),i=t(39640)(),S=t(2304),x=g("%TypeError%"),h=g("%Math.floor%");G.exports=function(r,e){if(typeof r!="function")throw new x("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||h(e)!==e)throw new x("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],n=!0,f=!0;if("length"in r&&S){var c=S(r,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(f=!1)}return(n||f||!a)&&(i?C(r,"length",e,!0,!0):C(r,"length",e)),r}},29936:function(G,U,t){G.exports=i;var g=t(61252).EventEmitter,C=t(6768);C(i,g),i.Readable=t(12348),i.Writable=t(11288),i.Duplex=t(15316),i.Transform=t(22477),i.PassThrough=t(27136),i.finished=t(15932),i.pipeline=t(38180),i.Stream=i;function i(){g.call(this)}i.prototype.pipe=function(S,x){var h=this;function p(l){S.writable&&S.write(l)===!1&&h.pause&&h.pause()}h.on("data",p);function r(){h.readable&&h.resume&&h.resume()}S.on("drain",r),!S._isStdio&&(!x||x.end!==!1)&&(h.on("end",a),h.on("close",n));var e=!1;function a(){e||(e=!0,S.end())}function n(){e||(e=!0,typeof S.destroy=="function"&&S.destroy())}function f(l){if(c(),g.listenerCount(this,"error")===0)throw l}h.on("error",f),S.on("error",f);function c(){h.removeListener("data",p),S.removeListener("drain",r),h.removeListener("end",a),h.removeListener("close",n),h.removeListener("error",f),S.removeListener("error",f),h.removeListener("end",c),h.removeListener("close",c),S.removeListener("close",c)}return h.on("end",c),h.on("close",c),S.on("close",c),S.emit("pipe",h),S}},92784:function(G){function U(h,p){h.prototype=Object.create(p.prototype),h.prototype.constructor=h,h.__proto__=p}var t={};function g(h,p,r){r||(r=Error);function e(n,f,c){return typeof p=="string"?p:p(n,f,c)}var a=function(n){U(f,n);function f(c,l,m){return n.call(this,e(c,l,m))||this}return f}(r);a.prototype.name=r.name,a.prototype.code=h,t[h]=a}function C(h,p){if(Array.isArray(h)){var r=h.length;return h=h.map(function(e){return String(e)}),r>2?"one of ".concat(p," ").concat(h.slice(0,r-1).join(", "),", or ")+h[r-1]:r===2?"one of ".concat(p," ").concat(h[0]," or ").concat(h[1]):"of ".concat(p," ").concat(h[0])}else return"of ".concat(p," ").concat(String(h))}function i(h,p,r){return h.substr(!r||r<0?0:+r,p.length)===p}function S(h,p,r){return(r===void 0||r>h.length)&&(r=h.length),h.substring(r-p.length,r)===p}function x(h,p,r){return typeof r!="number"&&(r=0),r+p.length>h.length?!1:h.indexOf(p,r)!==-1}g("ERR_INVALID_OPT_VALUE",function(h,p){return'The value "'+p+'" is invalid for option "'+h+'"'},TypeError),g("ERR_INVALID_ARG_TYPE",function(h,p,r){var e;typeof p=="string"&&i(p,"not ")?(e="must not be",p=p.replace(/^not /,"")):e="must be";var a;if(S(h," argument"))a="The ".concat(h," ").concat(e," ").concat(C(p,"type"));else{var n=x(h,".")?"property":"argument";a='The "'.concat(h,'" ').concat(n," ").concat(e," ").concat(C(p,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError),g("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),g("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),g("ERR_STREAM_PREMATURE_CLOSE","Premature close"),g("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),g("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),g("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),g("ERR_STREAM_WRITE_AFTER_END","write after end"),g("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),g("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),g("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),G.exports.i=t},15316:function(G,U,t){var g=t(4168),C=Object.keys||function(n){var f=[];for(var c in n)f.push(c);return f};G.exports=r;var i=t(12348),S=t(11288);t(6768)(r,i);for(var x=C(S.prototype),h=0;h0)if(typeof Z!="string"&&!gt.objectMode&&Object.getPrototypeOf(Z)!==x.prototype&&(Z=p(Z)),nt)gt.endEmitted?_($,new o):M($,gt,Z,!0);else if(gt.ended)_($,new b);else{if(gt.destroyed)return!1;gt.reading=!1,gt.decoder&&!st?(Z=gt.decoder.write(Z),gt.objectMode||Z.length!==0?M($,gt,Z,!1):H($,gt)):M($,gt,Z,!1)}else nt||(gt.reading=!1,H($,gt))}return!gt.ended&&(gt.length=D?$=D:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function I($,Z){return $<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:$!==$?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:($>Z.highWaterMark&&(Z.highWaterMark=N($)),$<=Z.length?$:Z.ended?Z.length:(Z.needReadable=!0,0))}s.prototype.read=function($){a("read",$),$=parseInt($,10);var Z=this._readableState,st=$;if($!==0&&(Z.emittedReadable=!1),$===0&&Z.needReadable&&((Z.highWaterMark!==0?Z.length>=Z.highWaterMark:Z.length>0)||Z.ended))return a("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?V(this):B(this),null;if($=I($,Z),$===0&&Z.ended)return Z.length===0&&V(this),null;var nt=Z.needReadable;a("need readable",nt),(Z.length===0||Z.length-$0?ct=tt($,Z):ct=null,ct===null?(Z.needReadable=Z.length<=Z.highWaterMark,$=0):(Z.length-=$,Z.awaitDrain=0),Z.length===0&&(Z.ended||(Z.needReadable=!0),st!==$&&Z.ended&&V(this)),ct!==null&&this.emit("data",ct),ct};function k($,Z){if(a("onEofChunk"),!Z.ended){if(Z.decoder){var st=Z.decoder.end();st&&st.length&&(Z.buffer.push(st),Z.length+=Z.objectMode?1:st.length)}Z.ended=!0,Z.sync?B($):(Z.needReadable=!1,Z.emittedReadable||(Z.emittedReadable=!0,O($)))}}function B($){var Z=$._readableState;a("emitReadable",Z.needReadable,Z.emittedReadable),Z.needReadable=!1,Z.emittedReadable||(a("emitReadable",Z.flowing),Z.emittedReadable=!0,g.nextTick(O,$))}function O($){var Z=$._readableState;a("emitReadable_",Z.destroyed,Z.length,Z.ended),!Z.destroyed&&(Z.length||Z.ended)&&($.emit("readable"),Z.emittedReadable=!1),Z.needReadable=!Z.flowing&&!Z.ended&&Z.length<=Z.highWaterMark,X($)}function H($,Z){Z.readingMore||(Z.readingMore=!0,g.nextTick(Y,$,Z))}function Y($,Z){for(;!Z.reading&&!Z.ended&&(Z.length1&&ot(nt.pipes,$)!==-1)&&!bt&&(a("false write response, pause",nt.awaitDrain),nt.awaitDrain++),st.pause())}function Lt(Vt){a("onerror",Vt),kt(),$.removeListener("error",Lt),i($,"error")===0&&_($,Vt)}E($,"error",Lt);function Ht(){$.removeListener("finish",Ut),kt()}$.once("close",Ht);function Ut(){a("onfinish"),$.removeListener("close",Ht),kt()}$.once("finish",Ut);function kt(){a("unpipe"),st.unpipe($)}return $.emit("pipe",st),nt.flowing||(a("pipe resume"),st.resume()),$};function j($){return function(){var st=$._readableState;a("pipeOnDrain",st.awaitDrain),st.awaitDrain&&st.awaitDrain--,st.awaitDrain===0&&i($,"data")&&(st.flowing=!0,X($))}}s.prototype.unpipe=function($){var Z=this._readableState,st={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return $&&$!==Z.pipes?this:($||($=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,$&&$.emit("unpipe",this,st),this);if(!$){var nt=Z.pipes,ct=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var gt=0;gt0,nt.flowing!==!1&&this.resume()):$==="readable"&&!nt.endEmitted&&!nt.readableListening&&(nt.readableListening=nt.needReadable=!0,nt.flowing=!1,nt.emittedReadable=!1,a("on readable",nt.length,nt.reading),nt.length?B(this):nt.reading||g.nextTick(it,this)),st},s.prototype.addListener=s.prototype.on,s.prototype.removeListener=function($,Z){var st=S.prototype.removeListener.call(this,$,Z);return $==="readable"&&g.nextTick(et,this),st},s.prototype.removeAllListeners=function($){var Z=S.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&g.nextTick(et,this),Z};function et($){var Z=$._readableState;Z.readableListening=$.listenerCount("readable")>0,Z.resumeScheduled&&!Z.paused?Z.flowing=!0:$.listenerCount("data")>0&&$.resume()}function it($){a("readable nexttick read 0"),$.read(0)}s.prototype.resume=function(){var $=this._readableState;return $.flowing||(a("resume"),$.flowing=!$.readableListening,ut(this,$)),$.paused=!1,this};function ut($,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,g.nextTick(J,$,Z))}function J($,Z){a("resume",Z.reading),Z.reading||$.read(0),Z.resumeScheduled=!1,$.emit("resume"),X($),Z.flowing&&!Z.reading&&$.read(0)}s.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X($){var Z=$._readableState;for(a("flow",Z.flowing);Z.flowing&&$.read()!==null;);}s.prototype.wrap=function($){var Z=this,st=this._readableState,nt=!1;$.on("end",function(){if(a("wrapped end"),st.decoder&&!st.ended){var Tt=st.decoder.end();Tt&&Tt.length&&Z.push(Tt)}Z.push(null)}),$.on("data",function(Tt){if(a("wrapped data"),st.decoder&&(Tt=st.decoder.write(Tt)),!(st.objectMode&&Tt==null)&&!(!st.objectMode&&(!Tt||!Tt.length))){var wt=Z.push(Tt);wt||(nt=!0,$.pause())}});for(var ct in $)this[ct]===void 0&&typeof $[ct]=="function"&&(this[ct]=function(wt){return function(){return $[wt].apply($,arguments)}}(ct));for(var gt=0;gt=Z.length?(Z.decoder?st=Z.buffer.join(""):Z.buffer.length===1?st=Z.buffer.first():st=Z.buffer.concat(Z.length),Z.buffer.clear()):st=Z.buffer.consume($,Z.decoder),st}function V($){var Z=$._readableState;a("endReadable",Z.endEmitted),Z.endEmitted||(Z.ended=!0,g.nextTick(Q,Z,$))}function Q($,Z){if(a("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,Z.readable=!1,Z.emit("end"),$.autoDestroy)){var st=Z._writableState;(!st||st.autoDestroy&&st.finished)&&Z.destroy()}}typeof Symbol=="function"&&(s.from=function($,Z){return A===void 0&&(A=t(90555)),A(s,$,Z)});function ot($,Z){for(var st=0,nt=$.length;st-1))throw new w(tt);return this._writableState.defaultEncoding=tt,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function M(X,tt,V){return!X.objectMode&&X.decodeStrings!==!1&&typeof tt=="string"&&(tt=h.from(tt,V)),tt}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(X,tt,V,Q,ot,$){if(!V){var Z=M(tt,Q,ot);Q!==Z&&(V=!0,ot="buffer",Q=Z)}var st=tt.objectMode?1:Q.length;tt.length+=st;var nt=tt.length0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(m){var v={data:m,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var v=this.head,b=""+v.data;v=v.next;)b+=m+v.data;return b}},{key:"concat",value:function(m){if(this.length===0)return r.alloc(0);for(var v=r.allocUnsafe(m>>>0),b=this.head,u=0;b;)f(b.data,v,u),u+=b.data.length,b=b.next;return v}},{key:"consume",value:function(m,v){var b;return mo.length?o.length:m;if(d===o.length?u+=o:u+=o.slice(0,m),m-=d,m===0){d===o.length?(++b,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=o.slice(d));break}++b}return this.length-=b,u}},{key:"_getBuffer",value:function(m){var v=r.allocUnsafe(m),b=this.head,u=1;for(b.data.copy(v),m-=b.data.length;b=b.next;){var o=b.data,d=m>o.length?o.length:m;if(o.copy(v,v.length-m,0,d),m-=d,m===0){d===o.length?(++u,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=o.slice(d));break}++u}return this.length-=u,v}},{key:n,value:function(m,v){return a(this,C({},v,{depth:0,customInspect:!1}))}}]),c}()},55324:function(G,U,t){var g=t(4168);function C(r,e){var a=this,n=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return n||f?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,g.nextTick(h,this,r)):g.nextTick(h,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(c){!e&&c?a._writableState?a._writableState.errorEmitted?g.nextTick(S,a):(a._writableState.errorEmitted=!0,g.nextTick(i,a,c)):g.nextTick(i,a,c):e?(g.nextTick(S,a),e(c)):g.nextTick(S,a)}),this)}function i(r,e){h(r,e),S(r)}function S(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function x(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function h(r,e){r.emit("error",e)}function p(r,e){var a=r._readableState,n=r._writableState;a&&a.autoDestroy||n&&n.autoDestroy?r.destroy(e):r.emit("error",e)}G.exports={destroy:C,undestroy:x,errorOrDestroy:p}},15932:function(G,U,t){var g=t(92784).i.ERR_STREAM_PREMATURE_CLOSE;function C(h){var p=!1;return function(){if(!p){p=!0;for(var r=arguments.length,e=new Array(r),a=0;a0;return r(o,w,A,function(_){b||(b=_),_&&u.forEach(e),!w&&(u.forEach(e),v(b))})});return l.reduce(a)}G.exports=f},24888:function(G,U,t){var g=t(92784).i.ERR_INVALID_OPT_VALUE;function C(S,x,h){return S.highWaterMark!=null?S.highWaterMark:x?S[h]:null}function i(S,x,h,p){var r=C(x,p,h);if(r!=null){if(!(isFinite(r)&&Math.floor(r)===r)||r<0){var e=p?h:"highWaterMark";throw new g(e,r)}return Math.floor(r)}return S.objectMode?16:16384}G.exports={getHighWaterMark:i}},4776:function(G,U,t){G.exports=t(61252).EventEmitter},86032:function(G,U,t){var g=t(30456).Buffer,C=g.isEncoding||function(u){switch(u=""+u,u&&u.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(u){if(!u)return"utf8";for(var o;;)switch(u){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return u;default:if(o)return;u=(""+u).toLowerCase(),o=!0}}function S(u){var o=i(u);if(typeof o!="string"&&(g.isEncoding===C||!C(u)))throw new Error("Unknown encoding: "+u);return o||u}U.o=x;function x(u){this.encoding=S(u);var o;switch(this.encoding){case"utf16le":this.text=f,this.end=c,o=4;break;case"utf8":this.fillLast=e,o=4;break;case"base64":this.text=l,this.end=m,o=3;break;default:this.write=v,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(o)}x.prototype.write=function(u){if(u.length===0)return"";var o,d;if(this.lastNeed){if(o=this.fillLast(u),o===void 0)return"";d=this.lastNeed,this.lastNeed=0}else d=0;return d>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function p(u,o,d){var w=o.length-1;if(w=0?(A>0&&(u.lastNeed=A-1),A):--w=0?(A>0&&(u.lastNeed=A-2),A):--w=0?(A>0&&(A===2?A=0:u.lastNeed=A-3),A):0))}function r(u,o,d){if((o[0]&192)!==128)return u.lastNeed=0,"�";if(u.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return u.lastNeed=1,"�";if(u.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return u.lastNeed=2,"�"}}function e(u){var o=this.lastTotal-this.lastNeed,d=r(this,u);if(d!==void 0)return d;if(this.lastNeed<=u.length)return u.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,o,0,u.length),this.lastNeed-=u.length}function a(u,o){var d=p(this,u,o);if(!this.lastNeed)return u.toString("utf8",o);this.lastTotal=d;var w=u.length-(d-this.lastNeed);return u.copy(this.lastChar,0,w),u.toString("utf8",o,w)}function n(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+"�":o}function f(u,o){if((u.length-o)%2===0){var d=u.toString("utf16le",o);if(d){var w=d.charCodeAt(d.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],d.slice(0,-1)}return d}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",o,u.length-1)}function c(u){var o=u&&u.length?this.write(u):"";if(this.lastNeed){var d=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,d)}return o}function l(u,o){var d=(u.length-o)%3;return d===0?u.toString("base64",o):(this.lastNeed=3-d,this.lastTotal=3,d===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",o,u.length-d))}function m(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function v(u){return u.toString(this.encoding)}function b(u){return u&&u.length?this.write(u):""}},55619:function(G,U,t){var g=t(45408),C=t(86844)("stream-parser");G.exports=p;var i=-1,S=0,x=1,h=2;function p(u){var o=u&&typeof u._transform=="function",d=u&&typeof u._write=="function";if(!o&&!d)throw new Error("must pass a Writable or Transform stream in");C("extending Parser into stream"),u._bytes=e,u._skipBytes=a,o&&(u._passthrough=n),o?u._transform=c:u._write=f}function r(u){C("initializing parser stream"),u._parserBytesLeft=0,u._parserBuffers=[],u._parserBuffered=0,u._parserState=i,u._parserCallback=null,typeof u.push=="function"&&(u._parserOutput=u.push.bind(u)),u._parserInit=!0}function e(u,o){g(!this._parserCallback,'there is already a "callback" set!'),g(isFinite(u)&&u>0,'can only buffer a finite number of bytes > 0, got "'+u+'"'),this._parserInit||r(this),C("buffering %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=S}function a(u,o){g(!this._parserCallback,'there is already a "callback" set!'),g(u>0,'can only skip > 0 bytes, got "'+u+'"'),this._parserInit||r(this),C("skipping %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=x}function n(u,o){g(!this._parserCallback,'There is already a "callback" set!'),g(u>0,'can only pass through > 0 bytes, got "'+u+'"'),this._parserInit||r(this),C("passing through %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=h}function f(u,o,d){this._parserInit||r(this),C("write(%o bytes)",u.length),typeof o=="function"&&(d=o),v(this,u,null,d)}function c(u,o,d){this._parserInit||r(this),C("transform(%o bytes)",u.length),typeof o!="function"&&(o=this._parserOutput),v(this,u,o,d)}function l(u,o,d,w){return u._parserBytesLeft<=0?w(new Error("got data but not currently parsing anything")):o.length<=u._parserBytesLeft?function(){return m(u,o,d,w)}:function(){var A=o.slice(0,u._parserBytesLeft);return m(u,A,d,function(_){if(_)return w(_);if(o.length>A.length)return function(){return l(u,o.slice(A.length),d,w)}})}}function m(u,o,d,w){if(u._parserBytesLeft-=o.length,C("%o bytes left for stream piece",u._parserBytesLeft),u._parserState===S?(u._parserBuffers.push(o),u._parserBuffered+=o.length):u._parserState===h&&d(o),u._parserBytesLeft===0){var A=u._parserCallback;if(A&&u._parserState===S&&u._parserBuffers.length>1&&(o=Buffer.concat(u._parserBuffers,u._parserBuffered)),u._parserState!==S&&(o=null),u._parserCallback=null,u._parserBuffered=0,u._parserState=i,u._parserBuffers.splice(0),A){var _=[];o&&_.push(o),d&&_.push(d);var y=A.length>_.length;y&&_.push(b(w));var E=A.apply(u,_);if(!y||w===E)return w}}else return w}var v=b(l);function b(u){return function(){for(var o=u.apply(this,arguments);typeof o=="function";)o=o();return o}}},86844:function(G,U,t){var g=t(4168);U=G.exports=t(89416),U.log=S,U.formatArgs=i,U.save=x,U.load=h,U.useColors=C,U.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:p(),U.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function C(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}U.formatters.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}};function i(r){var e=this.useColors;if(r[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+r[0]+(e?"%c ":" ")+"+"+U.humanize(this.diff),!!e){var a="color: "+this.color;r.splice(1,0,a,"color: inherit");var n=0,f=0;r[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(n++,c==="%c"&&(f=n))}),r.splice(f,0,a)}}function S(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function x(r){try{r==null?U.storage.removeItem("debug"):U.storage.debug=r}catch{}}function h(){var r;try{r=U.storage.debug}catch{}return!r&&typeof g<"u"&&"env"in g&&(r=g.env.DEBUG),r}U.enable(h());function p(){try{return window.localStorage}catch{}}},89416:function(G,U,t){U=G.exports=i.debug=i.default=i,U.coerce=p,U.disable=x,U.enable=S,U.enabled=h,U.humanize=t(93744),U.names=[],U.skips=[],U.formatters={};var g;function C(r){var e=0,a;for(a in r)e=(e<<5)-e+r.charCodeAt(a),e|=0;return U.colors[Math.abs(e)%U.colors.length]}function i(r){function e(){if(e.enabled){var a=e,n=+new Date,f=n-(g||n);a.diff=f,a.prev=g,a.curr=n,g=n;for(var c=new Array(arguments.length),l=0;l0)return S(r);if(a==="number"&&isNaN(r)===!1)return e.long?h(r):x(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function S(r){if(r=String(r),!(r.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(e){var a=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*C;case"hours":case"hour":case"hrs":case"hr":case"h":return a*g;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*U;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function x(r){return r>=C?Math.round(r/C)+"d":r>=g?Math.round(r/g)+"h":r>=t?Math.round(r/t)+"m":r>=U?Math.round(r/U)+"s":r+"ms"}function h(r){return p(r,C,"day")||p(r,g,"hour")||p(r,t,"minute")||p(r,U,"second")||r+" ms"}function p(r,e,a){if(!(r",'""',"''","``","“”","«»"]:(typeof x.ignore=="string"&&(x.ignore=[x.ignore]),x.ignore=x.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var h=g.parse(i,{flat:!0,brackets:x.ignore}),p=h[0],r=p.split(S);if(x.escape){for(var e=[],a=0;a0;){v=u[u.length-1];var o=t[v];if(x[v]=0&&p[v].push(h[w])}x[v]=d}else{if(i[v]===C[v]){for(var A=[],_=[],y=0,d=b.length-1;d>=0;--d){var E=b[d];if(S[E]=!1,A.push(E),_.push(p[E]),y+=p[E].length,h[E]=a.length,E===v){b.length=d;break}}a.push(A);for(var T=new Array(y),d=0;d<_.length;d++)for(var s=0;s<_[d].length;s++)T[--y]=_[d][s];n.push(T)}u.pop()}}}for(var r=0;r1&&(l=1),l<-1&&(l=-1),c*Math.acos(l)},h=function(e,a,n,f,c,l,m,v,b,u,o,d){var w=Math.pow(c,2),A=Math.pow(l,2),_=Math.pow(o,2),y=Math.pow(d,2),E=w*A-w*y-A*_;E<0&&(E=0),E/=w*y+A*_,E=Math.sqrt(E)*(m===v?-1:1);var T=E*c/l*d,s=E*-l/c*o,L=u*T-b*s+(e+n)/2,M=b*T+u*s+(a+f)/2,z=(o-T)/c,D=(d-s)/l,N=(-o-T)/c,I=(-d-s)/l,k=x(1,0,z,D),B=x(z,D,N,I);return v===0&&B>0&&(B-=C),v===1&&B<0&&(B+=C),[L,M,k,B]},p=function(e){var a=e.px,n=e.py,f=e.cx,c=e.cy,l=e.rx,m=e.ry,v=e.xAxisRotation,b=v===void 0?0:v,u=e.largeArcFlag,o=u===void 0?0:u,d=e.sweepFlag,w=d===void 0?0:d,A=[];if(l===0||m===0)return[];var _=Math.sin(b*C/360),y=Math.cos(b*C/360),E=y*(a-f)/2+_*(n-c)/2,T=-_*(a-f)/2+y*(n-c)/2;if(E===0&&T===0)return[];l=Math.abs(l),m=Math.abs(m);var s=Math.pow(E,2)/Math.pow(l,2)+Math.pow(T,2)/Math.pow(m,2);s>1&&(l*=Math.sqrt(s),m*=Math.sqrt(s));var L=h(a,n,f,c,l,m,o,w,_,y,E,T),M=g(L,4),z=M[0],D=M[1],N=M[2],I=M[3],k=Math.abs(I)/(C/4);Math.abs(1-k)<1e-7&&(k=1);var B=Math.max(Math.ceil(k),1);I/=B;for(var O=0;Or[2]&&(r[2]=n[f+0]),n[f+1]>r[3]&&(r[3]=n[f+1]);return r}},41976:function(G,U,t){G.exports=C;var g=t(92848);function C(x){for(var h,p=[],r=0,e=0,a=0,n=0,f=null,c=null,l=0,m=0,v=0,b=x.length;v4?(r=u[u.length-4],e=u[u.length-3]):(r=l,e=m),p.push(u)}return p}function i(x,h,p,r){return["C",x,h,p,r,p,r]}function S(x,h,p,r,e,a){return["C",x/3+.6666666666666666*p,h/3+.6666666666666666*r,e/3+.6666666666666666*p,a/3+.6666666666666666*r,e,a]}},20472:function(G,U,t){var g=t(74840),C=t(21984),i=t(22235),S=t(53520),x=t(29620),h=document.createElement("canvas"),p=h.getContext("2d");G.exports=r;function r(n,f){if(!S(n))throw Error("Argument should be valid svg path string");f||(f={});var c,l;f.shape?(c=f.shape[0],l=f.shape[1]):(c=h.width=f.w||f.width||200,l=h.height=f.h||f.height||200);var m=Math.min(c,l),v=f.stroke||0,b=f.viewbox||f.viewBox||g(n),u=[c/(b[2]-b[0]),l/(b[3]-b[1])],o=Math.min(u[0]||0,u[1]||0)/2;if(p.fillStyle="black",p.fillRect(0,0,c,l),p.fillStyle="white",v&&(typeof v!="number"&&(v=1),v>0?p.strokeStyle="white":p.strokeStyle="black",p.lineWidth=Math.abs(v)),p.translate(c*.5,l*.5),p.scale(o,o),a()){var d=new Path2D(n);p.fill(d),v&&p.stroke(d)}else{var w=C(n);i(p,w),p.fill(),v&&p.stroke()}p.setTransform(1,0,0,1,0,0);var A=x(p,{cutoff:f.cutoff!=null?f.cutoff:.5,radius:f.radius!=null?f.radius:m*.5});return A}var e;function a(){if(e!=null)return e;var n=document.createElement("canvas").getContext("2d");if(n.canvas.width=n.canvas.height=1,!window.Path2D)return e=!1;var f=new Path2D("M0,0h1v1h-1v-1Z");n.fillStyle="black",n.fill(f);var c=n.getImageData(0,0,1,1);return e=c&&c.data&&c.data[3]===255}},49760:function(G,U,t){var g;(function(C){var i=/^\s+/,S=/\s+$/,x=0,h=C.round,p=C.min,r=C.max,e=C.random;function a(Z,st){if(Z=Z||"",st=st||{},Z instanceof a)return Z;if(!(this instanceof a))return new a(Z,st);var nt=n(Z);this._originalInput=Z,this._r=nt.r,this._g=nt.g,this._b=nt.b,this._a=nt.a,this._roundA=h(100*this._a)/100,this._format=st.format||nt.format,this._gradientType=st.gradientType,this._r<1&&(this._r=h(this._r)),this._g<1&&(this._g=h(this._g)),this._b<1&&(this._b=h(this._b)),this._ok=nt.ok,this._tc_id=x++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Z=this.toRgb();return(Z.r*299+Z.g*587+Z.b*114)/1e3},getLuminance:function(){var Z=this.toRgb(),st,nt,ct,gt,Tt,wt;return st=Z.r/255,nt=Z.g/255,ct=Z.b/255,st<=.03928?gt=st/12.92:gt=C.pow((st+.055)/1.055,2.4),nt<=.03928?Tt=nt/12.92:Tt=C.pow((nt+.055)/1.055,2.4),ct<=.03928?wt=ct/12.92:wt=C.pow((ct+.055)/1.055,2.4),.2126*gt+.7152*Tt+.0722*wt},setAlpha:function(Z){return this._a=O(Z),this._roundA=h(100*this._a)/100,this},toHsv:function(){var Z=m(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,v:Z.v,a:this._a}},toHsvString:function(){var Z=m(this._r,this._g,this._b),st=h(Z.h*360),nt=h(Z.s*100),ct=h(Z.v*100);return this._a==1?"hsv("+st+", "+nt+"%, "+ct+"%)":"hsva("+st+", "+nt+"%, "+ct+"%, "+this._roundA+")"},toHsl:function(){var Z=c(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,l:Z.l,a:this._a}},toHslString:function(){var Z=c(this._r,this._g,this._b),st=h(Z.h*360),nt=h(Z.s*100),ct=h(Z.l*100);return this._a==1?"hsl("+st+", "+nt+"%, "+ct+"%)":"hsla("+st+", "+nt+"%, "+ct+"%, "+this._roundA+")"},toHex:function(Z){return b(this._r,this._g,this._b,Z)},toHexString:function(Z){return"#"+this.toHex(Z)},toHex8:function(Z){return u(this._r,this._g,this._b,this._a,Z)},toHex8String:function(Z){return"#"+this.toHex8(Z)},toRgb:function(){return{r:h(this._r),g:h(this._g),b:h(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+h(this._r)+", "+h(this._g)+", "+h(this._b)+")":"rgba("+h(this._r)+", "+h(this._g)+", "+h(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:h(H(this._r,255)*100)+"%",g:h(H(this._g,255)*100)+"%",b:h(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+h(H(this._r,255)*100)+"%, "+h(H(this._g,255)*100)+"%, "+h(H(this._b,255)*100)+"%)":"rgba("+h(H(this._r,255)*100)+"%, "+h(H(this._g,255)*100)+"%, "+h(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:k[b(this._r,this._g,this._b,!0)]||!1},toFilter:function(Z){var st="#"+o(this._r,this._g,this._b,this._a),nt=st,ct=this._gradientType?"GradientType = 1, ":"";if(Z){var gt=a(Z);nt="#"+o(gt._r,gt._g,gt._b,gt._a)}return"progid:DXImageTransform.Microsoft.gradient("+ct+"startColorstr="+st+",endColorstr="+nt+")"},toString:function(Z){var st=!!Z;Z=Z||this._format;var nt=!1,ct=this._a<1&&this._a>=0,gt=!st&&ct&&(Z==="hex"||Z==="hex6"||Z==="hex3"||Z==="hex4"||Z==="hex8"||Z==="name");return gt?Z==="name"&&this._a===0?this.toName():this.toRgbString():(Z==="rgb"&&(nt=this.toRgbString()),Z==="prgb"&&(nt=this.toPercentageRgbString()),(Z==="hex"||Z==="hex6")&&(nt=this.toHexString()),Z==="hex3"&&(nt=this.toHexString(!0)),Z==="hex4"&&(nt=this.toHex8String(!0)),Z==="hex8"&&(nt=this.toHex8String()),Z==="name"&&(nt=this.toName()),Z==="hsl"&&(nt=this.toHslString()),Z==="hsv"&&(nt=this.toHsvString()),nt||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(Z,st){var nt=Z.apply(null,[this].concat([].slice.call(st)));return this._r=nt._r,this._g=nt._g,this._b=nt._b,this.setAlpha(nt._a),this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(Z,st){return Z.apply(null,[this].concat([].slice.call(st)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(s,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},a.fromRatio=function(Z,st){if(typeof Z=="object"){var nt={};for(var ct in Z)Z.hasOwnProperty(ct)&&(ct==="a"?nt[ct]=Z[ct]:nt[ct]=J(Z[ct]));Z=nt}return a(Z,st)};function n(Z){var st={r:0,g:0,b:0},nt=1,ct=null,gt=null,Tt=null,wt=!1,Rt=!1;return typeof Z=="string"&&(Z=ot(Z)),typeof Z=="object"&&(Q(Z.r)&&Q(Z.g)&&Q(Z.b)?(st=f(Z.r,Z.g,Z.b),wt=!0,Rt=String(Z.r).substr(-1)==="%"?"prgb":"rgb"):Q(Z.h)&&Q(Z.s)&&Q(Z.v)?(ct=J(Z.s),gt=J(Z.v),st=v(Z.h,ct,gt),wt=!0,Rt="hsv"):Q(Z.h)&&Q(Z.s)&&Q(Z.l)&&(ct=J(Z.s),Tt=J(Z.l),st=l(Z.h,ct,Tt),wt=!0,Rt="hsl"),Z.hasOwnProperty("a")&&(nt=Z.a)),nt=O(nt),{ok:wt,format:Z.format||Rt,r:p(255,r(st.r,0)),g:p(255,r(st.g,0)),b:p(255,r(st.b,0)),a:nt}}function f(Z,st,nt){return{r:H(Z,255)*255,g:H(st,255)*255,b:H(nt,255)*255}}function c(Z,st,nt){Z=H(Z,255),st=H(st,255),nt=H(nt,255);var ct=r(Z,st,nt),gt=p(Z,st,nt),Tt,wt,Rt=(ct+gt)/2;if(ct==gt)Tt=wt=0;else{var bt=ct-gt;switch(wt=Rt>.5?bt/(2-ct-gt):bt/(ct+gt),ct){case Z:Tt=(st-nt)/bt+(st1&&(Lt-=1),Lt<.16666666666666666?At+(mt-At)*6*Lt:Lt<.5?mt:Lt<.6666666666666666?At+(mt-At)*(.6666666666666666-Lt)*6:At}if(st===0)ct=gt=Tt=nt;else{var Rt=nt<.5?nt*(1+st):nt+st-nt*st,bt=2*nt-Rt;ct=wt(bt,Rt,Z+.3333333333333333),gt=wt(bt,Rt,Z),Tt=wt(bt,Rt,Z-.3333333333333333)}return{r:ct*255,g:gt*255,b:Tt*255}}function m(Z,st,nt){Z=H(Z,255),st=H(st,255),nt=H(nt,255);var ct=r(Z,st,nt),gt=p(Z,st,nt),Tt,wt,Rt=ct,bt=ct-gt;if(wt=ct===0?0:bt/ct,ct==gt)Tt=0;else{switch(ct){case Z:Tt=(st-nt)/bt+(st>1)+720)%360;--st;)ct.h=(ct.h+gt)%360,Tt.push(a(ct));return Tt}function N(Z,st){st=st||6;for(var nt=a(Z).toHsv(),ct=nt.h,gt=nt.s,Tt=nt.v,wt=[],Rt=1/st;st--;)wt.push(a({h:ct,s:gt,v:Tt})),Tt=(Tt+Rt)%1;return wt}a.mix=function(Z,st,nt){nt=nt===0?0:nt||50;var ct=a(Z).toRgb(),gt=a(st).toRgb(),Tt=nt/100,wt={r:(gt.r-ct.r)*Tt+ct.r,g:(gt.g-ct.g)*Tt+ct.g,b:(gt.b-ct.b)*Tt+ct.b,a:(gt.a-ct.a)*Tt+ct.a};return a(wt)},a.readability=function(Z,st){var nt=a(Z),ct=a(st);return(C.max(nt.getLuminance(),ct.getLuminance())+.05)/(C.min(nt.getLuminance(),ct.getLuminance())+.05)},a.isReadable=function(Z,st,nt){var ct=a.readability(Z,st),gt,Tt;switch(Tt=!1,gt=$(nt),gt.level+gt.size){case"AAsmall":case"AAAlarge":Tt=ct>=4.5;break;case"AAlarge":Tt=ct>=3;break;case"AAAsmall":Tt=ct>=7;break}return Tt},a.mostReadable=function(Z,st,nt){var ct=null,gt=0,Tt,wt,Rt,bt;nt=nt||{},wt=nt.includeFallbackColors,Rt=nt.level,bt=nt.size;for(var At=0;Atgt&&(gt=Tt,ct=a(st[At]));return a.isReadable(Z,ct,{level:Rt,size:bt})||!wt?ct:(nt.includeFallbackColors=!1,a.mostReadable(Z,["#fff","#000"],nt))};var I=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=B(I);function B(Z){var st={};for(var nt in Z)Z.hasOwnProperty(nt)&&(st[Z[nt]]=nt);return st}function O(Z){return Z=parseFloat(Z),(isNaN(Z)||Z<0||Z>1)&&(Z=1),Z}function H(Z,st){et(Z)&&(Z="100%");var nt=it(Z);return Z=p(st,r(0,parseFloat(Z))),nt&&(Z=parseInt(Z*st,10)/100),C.abs(Z-st)<1e-6?1:Z%st/parseFloat(st)}function Y(Z){return p(1,r(0,Z))}function j(Z){return parseInt(Z,16)}function et(Z){return typeof Z=="string"&&Z.indexOf(".")!=-1&&parseFloat(Z)===1}function it(Z){return typeof Z=="string"&&Z.indexOf("%")!=-1}function ut(Z){return Z.length==1?"0"+Z:""+Z}function J(Z){return Z<=1&&(Z=Z*100+"%"),Z}function X(Z){return C.round(parseFloat(Z)*255).toString(16)}function tt(Z){return j(Z)/255}var V=function(){var Z="[-\\+]?\\d+%?",st="[-\\+]?\\d*\\.\\d+%?",nt="(?:"+st+")|(?:"+Z+")",ct="[\\s|\\(]+("+nt+")[,|\\s]+("+nt+")[,|\\s]+("+nt+")\\s*\\)?",gt="[\\s|\\(]+("+nt+")[,|\\s]+("+nt+")[,|\\s]+("+nt+")[,|\\s]+("+nt+")\\s*\\)?";return{CSS_UNIT:new RegExp(nt),rgb:new RegExp("rgb"+ct),rgba:new RegExp("rgba"+gt),hsl:new RegExp("hsl"+ct),hsla:new RegExp("hsla"+gt),hsv:new RegExp("hsv"+ct),hsva:new RegExp("hsva"+gt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Q(Z){return!!V.CSS_UNIT.exec(Z)}function ot(Z){Z=Z.replace(i,"").replace(S,"").toLowerCase();var st=!1;if(I[Z])Z=I[Z],st=!0;else if(Z=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var nt;return(nt=V.rgb.exec(Z))?{r:nt[1],g:nt[2],b:nt[3]}:(nt=V.rgba.exec(Z))?{r:nt[1],g:nt[2],b:nt[3],a:nt[4]}:(nt=V.hsl.exec(Z))?{h:nt[1],s:nt[2],l:nt[3]}:(nt=V.hsla.exec(Z))?{h:nt[1],s:nt[2],l:nt[3],a:nt[4]}:(nt=V.hsv.exec(Z))?{h:nt[1],s:nt[2],v:nt[3]}:(nt=V.hsva.exec(Z))?{h:nt[1],s:nt[2],v:nt[3],a:nt[4]}:(nt=V.hex8.exec(Z))?{r:j(nt[1]),g:j(nt[2]),b:j(nt[3]),a:tt(nt[4]),format:st?"name":"hex8"}:(nt=V.hex6.exec(Z))?{r:j(nt[1]),g:j(nt[2]),b:j(nt[3]),format:st?"name":"hex"}:(nt=V.hex4.exec(Z))?{r:j(nt[1]+""+nt[1]),g:j(nt[2]+""+nt[2]),b:j(nt[3]+""+nt[3]),a:tt(nt[4]+""+nt[4]),format:st?"name":"hex8"}:(nt=V.hex3.exec(Z))?{r:j(nt[1]+""+nt[1]),g:j(nt[2]+""+nt[2]),b:j(nt[3]+""+nt[3]),format:st?"name":"hex"}:!1}function $(Z){var st,nt;return Z=Z||{level:"AA",size:"small"},st=(Z.level||"AA").toUpperCase(),nt=(Z.size||"small").toLowerCase(),st!=="AA"&&st!=="AAA"&&(st="AA"),nt!=="small"&&nt!=="large"&&(nt="small"),{level:st,size:nt}}G.exports?G.exports=a:(g=(function(){return a}).call(U,t,U,G),g!==void 0&&(G.exports=g))})(Math)},37816:function(G){G.exports=g,G.exports.float32=G.exports.float=g,G.exports.fract32=G.exports.fract=t;var U=new Float32Array(1);function t(C,i){if(C.length){if(C instanceof Float32Array)return new Float32Array(C.length);i instanceof Float32Array||(i=g(C));for(var S=0,x=i.length;S":(S.length>100&&(S=S.slice(0,99)+"…"),S=S.replace(C,function(x){switch(x){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}},7328:function(G,U,t){var g=t(81680),C={object:!0,function:!0,undefined:!0};G.exports=function(i){return g(i)?hasOwnProperty.call(C,typeof i):!1}},87396:function(G,U,t){var g=t(57980),C=t(85488);G.exports=function(i){return C(i)?i:g(i,"%v is not a plain function",arguments[1])}},85488:function(G,U,t){var g=t(73384),C=/^\s*class[\s{/}]/,i=Function.prototype.toString;G.exports=function(S){return!(!g(S)||C.test(i.call(S)))}},54612:function(G,U,t){var g=t(7328);G.exports=function(C){if(!g(C))return!1;try{return C.constructor?C.constructor.prototype===C:!1}catch{return!1}}},33940:function(G,U,t){var g=t(81680),C=t(7328),i=Object.prototype.toString;G.exports=function(S){if(!g(S))return null;if(C(S)){var x=S.toString;if(typeof x!="function"||x===i)return null}try{return""+S}catch{return null}}},18496:function(G,U,t){var g=t(57980),C=t(81680);G.exports=function(i){return C(i)?i:g(i,"Cannot use %v",arguments[1])}},81680:function(G){var U=void 0;G.exports=function(t){return t!==U&&t!==null}},14144:function(G,U,t){var g=t(308),C=t(10352),i=t(33576).Buffer;t.g.__TYPEDARRAY_POOL||(t.g.__TYPEDARRAY_POOL={UINT8:C([32,0]),UINT16:C([32,0]),UINT32:C([32,0]),BIGUINT64:C([32,0]),INT8:C([32,0]),INT16:C([32,0]),INT32:C([32,0]),BIGINT64:C([32,0]),FLOAT:C([32,0]),DOUBLE:C([32,0]),DATA:C([32,0]),UINT8C:C([32,0]),BUFFER:C([32,0])});var S=typeof Uint8ClampedArray<"u",x=typeof BigUint64Array<"u",h=typeof BigInt64Array<"u",p=t.g.__TYPEDARRAY_POOL;p.UINT8C||(p.UINT8C=C([32,0])),p.BIGUINT64||(p.BIGUINT64=C([32,0])),p.BIGINT64||(p.BIGINT64=C([32,0])),p.BUFFER||(p.BUFFER=C([32,0]));var r=p.DATA,e=p.BUFFER;U.free=function(s){if(i.isBuffer(s))e[g.log2(s.length)].push(s);else{if(Object.prototype.toString.call(s)!=="[object ArrayBuffer]"&&(s=s.buffer),!s)return;var L=s.length||s.byteLength,M=g.log2(L)|0;r[M].push(s)}};function a(T){if(T){var s=T.length||T.byteLength,L=g.log2(s);r[L].push(T)}}function n(T){a(T.buffer)}U.freeUint8=U.freeUint16=U.freeUint32=U.freeBigUint64=U.freeInt8=U.freeInt16=U.freeInt32=U.freeBigInt64=U.freeFloat32=U.freeFloat=U.freeFloat64=U.freeDouble=U.freeUint8Clamped=U.freeDataView=n,U.freeArrayBuffer=a,U.freeBuffer=function(s){e[g.log2(s.length)].push(s)},U.malloc=function(s,L){if(L===void 0||L==="arraybuffer")return f(s);switch(L){case"uint8":return c(s);case"uint16":return l(s);case"uint32":return m(s);case"int8":return v(s);case"int16":return b(s);case"int32":return u(s);case"float":case"float32":return o(s);case"double":case"float64":return d(s);case"uint8_clamped":return w(s);case"bigint64":return _(s);case"biguint64":return A(s);case"buffer":return E(s);case"data":case"dataview":return y(s);default:return null}return null};function f(s){var s=g.nextPow2(s),L=g.log2(s),M=r[L];return M.length>0?M.pop():new ArrayBuffer(s)}U.mallocArrayBuffer=f;function c(T){return new Uint8Array(f(T),0,T)}U.mallocUint8=c;function l(T){return new Uint16Array(f(2*T),0,T)}U.mallocUint16=l;function m(T){return new Uint32Array(f(4*T),0,T)}U.mallocUint32=m;function v(T){return new Int8Array(f(T),0,T)}U.mallocInt8=v;function b(T){return new Int16Array(f(2*T),0,T)}U.mallocInt16=b;function u(T){return new Int32Array(f(4*T),0,T)}U.mallocInt32=u;function o(T){return new Float32Array(f(4*T),0,T)}U.mallocFloat32=U.mallocFloat=o;function d(T){return new Float64Array(f(8*T),0,T)}U.mallocFloat64=U.mallocDouble=d;function w(T){return S?new Uint8ClampedArray(f(T),0,T):c(T)}U.mallocUint8Clamped=w;function A(T){return x?new BigUint64Array(f(8*T),0,T):null}U.mallocBigUint64=A;function _(T){return h?new BigInt64Array(f(8*T),0,T):null}U.mallocBigInt64=_;function y(T){return new DataView(f(T),0,T)}U.mallocDataView=y;function E(T){T=g.nextPow2(T);var s=g.log2(T),L=e[s];return L.length>0?L.pop():new i(T)}U.mallocBuffer=E,U.clearCache=function(){for(var s=0;s<32;++s)p.UINT8[s].length=0,p.UINT16[s].length=0,p.UINT32[s].length=0,p.INT8[s].length=0,p.INT16[s].length=0,p.INT32[s].length=0,p.FLOAT[s].length=0,p.DOUBLE[s].length=0,p.BIGUINT64[s].length=0,p.BIGINT64[s].length=0,p.UINT8C[s].length=0,r[s].length=0,e[s].length=0}},92384:function(G){var U=/[\'\"]/;G.exports=function(g){return g?(U.test(g.charAt(0))&&(g=g.substr(1)),U.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}},45223:function(G){G.exports=function(t,g,C){Array.isArray(C)||(C=[].slice.call(arguments,2));for(var i=0,S=C.length;i"u"?!1:L.working?L(Tt):Tt instanceof Map}U.isMap=M;function z(Tt){return r(Tt)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function D(Tt){return typeof Set>"u"?!1:z.working?z(Tt):Tt instanceof Set}U.isSet=D;function N(Tt){return r(Tt)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function I(Tt){return typeof WeakMap>"u"?!1:N.working?N(Tt):Tt instanceof WeakMap}U.isWeakMap=I;function k(Tt){return r(Tt)==="[object WeakSet]"}k.working=typeof WeakSet<"u"&&k(new WeakSet);function B(Tt){return k(Tt)}U.isWeakSet=B;function O(Tt){return r(Tt)==="[object ArrayBuffer]"}O.working=typeof ArrayBuffer<"u"&&O(new ArrayBuffer);function H(Tt){return typeof ArrayBuffer>"u"?!1:O.working?O(Tt):Tt instanceof ArrayBuffer}U.isArrayBuffer=H;function Y(Tt){return r(Tt)==="[object DataView]"}Y.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Y(new DataView(new ArrayBuffer(1),0,1));function j(Tt){return typeof DataView>"u"?!1:Y.working?Y(Tt):Tt instanceof DataView}U.isDataView=j;var et=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function it(Tt){return r(Tt)==="[object SharedArrayBuffer]"}function ut(Tt){return typeof et>"u"?!1:(typeof it.working>"u"&&(it.working=it(new et)),it.working?it(Tt):Tt instanceof et)}U.isSharedArrayBuffer=ut;function J(Tt){return r(Tt)==="[object AsyncFunction]"}U.isAsyncFunction=J;function X(Tt){return r(Tt)==="[object Map Iterator]"}U.isMapIterator=X;function tt(Tt){return r(Tt)==="[object Set Iterator]"}U.isSetIterator=tt;function V(Tt){return r(Tt)==="[object Generator]"}U.isGeneratorObject=V;function Q(Tt){return r(Tt)==="[object WebAssembly.Module]"}U.isWebAssemblyCompiledModule=Q;function ot(Tt){return l(Tt,e)}U.isNumberObject=ot;function $(Tt){return l(Tt,a)}U.isStringObject=$;function Z(Tt){return l(Tt,n)}U.isBooleanObject=Z;function st(Tt){return h&&l(Tt,f)}U.isBigIntObject=st;function nt(Tt){return p&&l(Tt,c)}U.isSymbolObject=nt;function ct(Tt){return ot(Tt)||$(Tt)||Z(Tt)||st(Tt)||nt(Tt)}U.isBoxedPrimitive=ct;function gt(Tt){return typeof Uint8Array<"u"&&(H(Tt)||ut(Tt))}U.isAnyArrayBuffer=gt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Tt){Object.defineProperty(U,Tt,{enumerable:!1,value:function(){throw new Error(Tt+" is not supported in userland")}})})},35840:function(G,U,t){var g=t(4168),C=Object.getOwnPropertyDescriptors||function(et){for(var it=Object.keys(et),ut={},J=0;J=J)return V;switch(V){case"%s":return String(ut[it++]);case"%d":return Number(ut[it++]);case"%j":try{return JSON.stringify(ut[it++])}catch{return"[Circular]"}default:return V}}),tt=ut[it];it"u")return function(){return U.deprecate(j,et).apply(this,arguments)};var it=!1;function ut(){if(!it){if(g.throwDeprecation)throw new Error(et);g.traceDeprecation?console.trace(et):console.error(et),it=!0}return j.apply(this,arguments)}return ut};var S={},x=/^$/;if(g.env.NODE_DEBUG){var h=g.env.NODE_DEBUG;h=h.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),x=new RegExp("^"+h+"$","i")}U.debuglog=function(j){if(j=j.toUpperCase(),!S[j])if(x.test(j)){var et=g.pid;S[j]=function(){var it=U.format.apply(U,arguments);console.error("%s %d: %s",j,et,it)}}else S[j]=function(){};return S[j]};function p(j,et){var it={seen:[],stylize:e};return arguments.length>=3&&(it.depth=arguments[2]),arguments.length>=4&&(it.colors=arguments[3]),u(et)?it.showHidden=et:et&&U._extend(it,et),y(it.showHidden)&&(it.showHidden=!1),y(it.depth)&&(it.depth=2),y(it.colors)&&(it.colors=!1),y(it.customInspect)&&(it.customInspect=!0),it.colors&&(it.stylize=r),n(it,j,it.depth)}U.inspect=p,p.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},p.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(j,et){var it=p.styles[et];return it?"\x1B["+p.colors[it][0]+"m"+j+"\x1B["+p.colors[it][1]+"m":j}function e(j,et){return j}function a(j){var et={};return j.forEach(function(it,ut){et[it]=!0}),et}function n(j,et,it){if(j.customInspect&&et&&M(et.inspect)&&et.inspect!==U.inspect&&!(et.constructor&&et.constructor.prototype===et)){var ut=et.inspect(it,j);return A(ut)||(ut=n(j,ut,it)),ut}var J=f(j,et);if(J)return J;var X=Object.keys(et),tt=a(X);if(j.showHidden&&(X=Object.getOwnPropertyNames(et)),L(et)&&(X.indexOf("message")>=0||X.indexOf("description")>=0))return c(et);if(X.length===0){if(M(et)){var V=et.name?": "+et.name:"";return j.stylize("[Function"+V+"]","special")}if(E(et))return j.stylize(RegExp.prototype.toString.call(et),"regexp");if(s(et))return j.stylize(Date.prototype.toString.call(et),"date");if(L(et))return c(et)}var Q="",ot=!1,$=["{","}"];if(b(et)&&(ot=!0,$=["[","]"]),M(et)){var Z=et.name?": "+et.name:"";Q=" [Function"+Z+"]"}if(E(et)&&(Q=" "+RegExp.prototype.toString.call(et)),s(et)&&(Q=" "+Date.prototype.toUTCString.call(et)),L(et)&&(Q=" "+c(et)),X.length===0&&(!ot||et.length==0))return $[0]+Q+$[1];if(it<0)return E(et)?j.stylize(RegExp.prototype.toString.call(et),"regexp"):j.stylize("[Object]","special");j.seen.push(et);var st;return ot?st=l(j,et,it,tt,X):st=X.map(function(nt){return m(j,et,it,tt,nt,ot)}),j.seen.pop(),v(st,Q,$)}function f(j,et){if(y(et))return j.stylize("undefined","undefined");if(A(et)){var it="'"+JSON.stringify(et).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return j.stylize(it,"string")}if(w(et))return j.stylize(""+et,"number");if(u(et))return j.stylize(""+et,"boolean");if(o(et))return j.stylize("null","null")}function c(j){return"["+Error.prototype.toString.call(j)+"]"}function l(j,et,it,ut,J){for(var X=[],tt=0,V=et.length;tt-1&&(X?V=V.split(` `).map(function(ot){return" "+ot}).join(` `).slice(2):V=` `+V.split(` `).map(function(ot){return" "+ot}).join(` -`))):V=j.stylize("[Circular]","special")),y(tt)){if(X&&J.match(/^\d+$/))return V;tt=JSON.stringify(""+J),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=j.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=j.stylize(tt,"string"))}return tt+": "+V}function h(j,et,it){var ut=j.reduce(function(J,X){return X.indexOf(` +`))):V=j.stylize("[Circular]","special")),y(tt)){if(X&&J.match(/^\d+$/))return V;tt=JSON.stringify(""+J),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=j.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=j.stylize(tt,"string"))}return tt+": "+V}function v(j,et,it){var ut=j.reduce(function(J,X){return X.indexOf(` `)>=0,J+X.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ut>60?it[0]+(et===""?"":et+` `)+" "+j.join(`, - `)+" "+it[1]:it[0]+et+" "+j.join(", ")+" "+it[1]}U.types=t(41088);function b(j){return Array.isArray(j)}U.isArray=b;function u(j){return typeof j=="boolean"}U.isBoolean=u;function o(j){return j===null}U.isNull=o;function d(j){return j==null}U.isNullOrUndefined=d;function w(j){return typeof j=="number"}U.isNumber=w;function A(j){return typeof j=="string"}U.isString=A;function _(j){return typeof j=="symbol"}U.isSymbol=_;function y(j){return j===void 0}U.isUndefined=y;function E(j){return T(j)&&D(j)==="[object RegExp]"}U.isRegExp=E,U.types.isRegExp=E;function T(j){return typeof j=="object"&&j!==null}U.isObject=T;function s(j){return T(j)&&D(j)==="[object Date]"}U.isDate=s,U.types.isDate=s;function L(j){return T(j)&&(D(j)==="[object Error]"||j instanceof Error)}U.isError=L,U.types.isNativeError=L;function M(j){return typeof j=="function"}U.isFunction=M;function z(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||typeof j>"u"}U.isPrimitive=z,U.isBuffer=t(75272);function D(j){return Object.prototype.toString.call(j)}function N(j){return j<10?"0"+j.toString(10):j.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var j=new Date,et=[N(j.getHours()),N(j.getMinutes()),N(j.getSeconds())].join(":");return[j.getDate(),I[j.getMonth()],et].join(" ")}U.log=function(){console.log("%s - %s",k(),U.format.apply(U,arguments))},U.inherits=t(6768),U._extend=function(j,et){if(!et||!T(et))return j;for(var it=Object.keys(et),ut=it.length;ut--;)j[it[ut]]=et[it[ut]];return j};function B(j,et){return Object.prototype.hasOwnProperty.call(j,et)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;U.promisify=function(et){if(typeof et!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&et[O]){var it=et[O];if(typeof it!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(it,O,{value:it,enumerable:!1,writable:!1,configurable:!0}),it}function it(){for(var ut,J,X=new Promise(function(Q,ot){ut=Q,J=ot}),tt=[],V=0;V"u"?t.g:globalThis,e=C(),a=S("String.prototype.slice"),n=Object.getPrototypeOf,f=S("Array.prototype.indexOf",!0)||function(b,u){for(var o=0;o-1?u:u!=="Object"?!1:m(b)}return x?l(b):null}},67020:function(G,U,t){var g=t(38700),C=t(50896),i=g.instance();function S(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(c,l){if(typeof c=="string"){var m=c.match(v);return m?m[0]:""}var h=this._validateYear(c),b=c.month(),u=""+this.toChineseMonth(h,b);return l&&u.length<2&&(u="0"+u),this.isIntercalaryMonth(h,b)&&(u+="i"),u},monthNames:function(c){if(typeof c=="string"){var l=c.match(p);return l?l[0]:""}var m=this._validateYear(c),h=c.month(),b=this.toChineseMonth(m,h),u=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][b-1];return this.isIntercalaryMonth(m,h)&&(u="闰"+u),u},monthNamesShort:function(c){if(typeof c=="string"){var l=c.match(r);return l?l[0]:""}var m=this._validateYear(c),h=c.month(),b=this.toChineseMonth(m,h),u=["一","二","三","四","五","六","七","八","九","十","十一","十二"][b-1];return this.isIntercalaryMonth(m,h)&&(u="闰"+u),u},parseMonth:function(c,l){c=this._validateYear(c);var m=parseInt(l),h;if(isNaN(m))l[0]==="闰"&&(h=!0,l=l.substring(1)),l[l.length-1]==="月"&&(l=l.substring(0,l.length-1)),m=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(l);else{var b=l[l.length-1];h=b==="i"||b==="I"}var u=this.toMonthIndex(c,m,h);return u},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(c,l){if(c.year&&(c=c.year()),typeof c!="number"||c<1888||c>2111)throw l.replace(/\{0\}/,this.local.name);return c},toMonthIndex:function(c,l,m){var h=this.intercalaryMonth(c),b=m&&l!==h;if(b||l<1||l>12)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var u;return h?!m&&l<=h?u=l-1:u=l:u=l-1,u},toChineseMonth:function(c,l){c.year&&(c=c.year(),l=c.month());var m=this.intercalaryMonth(c),h=m?12:11;if(l<0||l>h)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var b;return m?l>13;return m},isIntercalaryMonth:function(c,l){c.year&&(c=c.year(),l=c.month());var m=this.intercalaryMonth(c);return!!m&&m===l},leapYear:function(c){return this.intercalaryMonth(c)!==0},weekOfYear:function(c,l,m){var h=this._validateYear(c,g.local.invalidyear),b=a[h-a[0]],u=b>>9&4095,o=b>>5&15,d=b&31,w;w=i.newDate(u,o,d),w.add(4-(w.dayOfWeek()||7),"d");var A=this.toJD(c,l,m)-w.toJD();return 1+Math.floor(A/7)},monthsInYear:function(c){return this.leapYear(c)?13:12},daysInMonth:function(c,l){c.year&&(l=c.month(),c=c.year()),c=this._validateYear(c);var m=e[c-e[0]],h=m>>13,b=h?12:11;if(l>b)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var u=m&1<<12-l?30:29;return u},weekDay:function(c,l,m){return(this.dayOfWeek(c,l,m)||7)<6},toJD:function(c,l,m){var h=this._validate(c,u,m,g.local.invalidDate);c=this._validateYear(h.year()),l=h.month(),m=h.day();var b=this.isIntercalaryMonth(c,l),u=this.toChineseMonth(c,l),o=f(c,u,m,b);return i.toJD(o.year,o.month,o.day)},fromJD:function(c){var l=i.fromJD(c),m=n(l.year(),l.month(),l.day()),h=this.toMonthIndex(m.year,m.month,m.isIntercalary);return this.newDate(m.year,h,m.day)},fromString:function(c){var l=c.match(x),m=this._validateYear(+l[1]),h=+l[2],b=!!l[3],u=this.toMonthIndex(m,h,b),o=+l[4];return this.newDate(m,u,o)},add:function(c,l,m){var h=c.year(),b=c.month(),u=this.isIntercalaryMonth(h,b),o=this.toChineseMonth(h,b),d=Object.getPrototypeOf(S.prototype).add.call(this,c,l,m);if(m==="y"){var w=d.year(),A=d.month(),_=this.isIntercalaryMonth(w,o),y=u&&_?this.toMonthIndex(w,o,!0):this.toMonthIndex(w,o,!1);y!==A&&d.month(y)}return d}});var x=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,v=/^\d?\d[iI]?/m,p=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;g.calendars.chinese=S;var e=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function n(c,l,m,h){var b,u;if(typeof c=="object")b=c,u=l||{};else{var o=typeof c=="number"&&c>=1888&&c<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var d=typeof l=="number"&&l>=1&&l<=12;if(!d)throw new Error("Solar month outside range 1 - 12");var w=typeof m=="number"&&m>=1&&m<=31;if(!w)throw new Error("Solar day outside range 1 - 31");b={year:c,month:l,day:m},u=h||{}}var A=a[b.year-a[0]],_=b.year<<9|b.month<<5|b.day;u.year=_>=A?b.year:b.year-1,A=a[u.year-a[0]];var y=A>>9&4095,E=A>>5&15,T=A&31,s,L=new Date(y,E-1,T),M=new Date(b.year,b.month-1,b.day);s=Math.round((M-L)/864e5);var z=e[u.year-e[0]],D;for(D=0;D<13;D++){var N=z&1<<12-D?30:29;if(s>13;return!I||D=1888&&c<=2111;if(!d)throw new Error("Lunar year outside range 1888-2111");var w=typeof l=="number"&&l>=1&&l<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var A=typeof m=="number"&&m>=1&&m<=30;if(!A)throw new Error("Lunar day outside range 1 - 30");var _;typeof h=="object"?(_=!1,u=h):(_=!!h,u=b||{}),o={year:c,month:l,day:m,isIntercalary:_}}var y;y=o.day-1;var E=e[o.year-e[0]],T=E>>13,s;T&&(o.month>T||o.isIntercalary)?s=o.month:s=o.month-1;for(var L=0;L>9&4095,N=z>>5&15,I=z&31,k=new Date(D,N-1,I+y);return u.year=k.getFullYear(),u.month=1+k.getMonth(),u.day=k.getDate(),u}},89792:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var x=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),v=x.year()+(x.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return(this.dayOfWeek(S,x,v)||7)<6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),S<0&&S++,p.day()+(p.month()-1)*30+(S-1)*365+Math.floor(S/4)+this.jdEpoch-1},fromJD:function(S){var x=Math.floor(S)+.5-this.jdEpoch,v=Math.floor((x-Math.floor((x+366)/1461))/365)+1;v<=0&&v--,x=Math.floor(S)+.5-this.newDate(v,1,1).toJD();var p=Math.floor(x/30)+1,r=x-(p-1)*30+1;return this.newDate(v,p,r)}}),g.calendars.coptic=i},55668:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),!1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),13},daysInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),400},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return(r.day()+1)%8},weekDay:function(x,v,p){var r=this.dayOfWeek(x,v,p);return r>=2&&r<=6},extraInfo:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return{century:S[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return x=r.year()+(r.year()<0?1:0),v=r.month(),p=r.day(),p+(v>1?16:0)+(v>2?(v-2)*32:0)+(x-1)*400+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x+.5)-Math.floor(this.jdEpoch)-1;var v=Math.floor(x/400)+1;x-=(v-1)*400,x+=x>15?16:0;var p=Math.floor(x/32)+1,r=x-(p-1)*32+1;return this.newDate(v<=0?v-1:v,p,r)}});var S={20:"Fruitbat",21:"Anchovy"};g.calendars.discworld=i},65168:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var x=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),v=x.year()+(x.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return(this.dayOfWeek(S,x,v)||7)<6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),S<0&&S++,p.day()+(p.month()-1)*30+(S-1)*365+Math.floor(S/4)+this.jdEpoch-1},fromJD:function(S){var x=Math.floor(S)+.5-this.jdEpoch,v=Math.floor((x-Math.floor((x+366)/1461))/365)+1;v<=0&&v--,x=Math.floor(S)+.5-this.newDate(v,1,1).toJD();var p=Math.floor(x/30)+1,r=x-(p-1)*30+1;return this.newDate(v,p,r)}}),g.calendars.ethiopian=i},2084:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return this._leapYear(v.year())},_leapYear:function(x){return x=x<0?x+1:x,S(x*7+1,19)<7},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),this._leapYear(x.year?x.year():x)?13:12},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return x=v.year(),this.toJD(x===-1?1:x+1,7,1)-this.toJD(x,7,1)},daysInMonth:function(x,v){return x.year&&(v=x.month(),x=x.year()),this._validate(x,v,this.minDay,g.local.invalidMonth),v===12&&this.leapYear(x)||v===8&&S(this.daysInYear(x),10)===5?30:v===9&&S(this.daysInYear(x),10)===3?29:this.daysPerMonth[v-1]},weekDay:function(x,v,p){return this.dayOfWeek(x,v,p)!==6},extraInfo:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);x=r.year(),v=r.month(),p=r.day();var e=x<=0?x+1:x,a=this.jdEpoch+this._delay1(e)+this._delay2(e)+p+1;if(v<7){for(var n=7;n<=this.monthsInYear(x);n++)a+=this.daysInMonth(x,n);for(var n=1;n=this.toJD(v===-1?1:v+1,7,1);)v++;for(var p=xthis.toJD(v,p,this.daysInMonth(v,p));)p++;var r=x-this.toJD(v,p,1)+1;return this.newDate(v,p,r)}});function S(x,v){return x-v*Math.floor(x/v)}g.calendars.hebrew=i},26368:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(S){var x=this._validate(S,this.minMonth,this.minDay,g.local.invalidYear);return(x.year()*11+14)%30<11},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(S){return this.leapYear(S)?355:354},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===12&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return this.dayOfWeek(S,x,v)!==5},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),x=p.month(),v=p.day(),S=S<=0?S+1:S,v+Math.ceil(29.5*(x-1))+(S-1)*354+Math.floor((3+11*S)/30)+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var x=Math.floor((30*(S-this.jdEpoch)+10646)/10631);x=x<=0?x-1:x;var v=Math.min(12,Math.ceil((S-29-this.toJD(x,1,1))/29.5)+1),p=S-this.toJD(x,v,1)+1;return this.newDate(x,v,p)}}),g.calendars.islamic=i},24747:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var x=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),v=x.year()<0?x.year()+1:x.year();return v%4===0},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(4-(p.dayOfWeek()||7),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===2&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return(this.dayOfWeek(S,x,v)||7)<6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),x=p.month(),v=p.day(),S<0&&S++,x<=2&&(S--,x+=12),Math.floor(365.25*(S+4716))+Math.floor(30.6001*(x+1))+v-1524.5},fromJD:function(S){var x=Math.floor(S+.5),v=x+1524,p=Math.floor((v-122.1)/365.25),r=Math.floor(365.25*p),e=Math.floor((v-r)/30.6001),a=e-Math.floor(e<14?1:13),n=p-Math.floor(a>2?4716:4715),f=v-r-Math.floor(30.6001*e);return n<=0&&n--,this.newDate(n,a,f)}}),g.calendars.julian=i},65616:function(G,U,t){var g=t(38700),C=t(50896);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),!1},formatYear:function(v){var p=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear);v=p.year();var r=Math.floor(v/400);v=v%400,v+=v<0?400:0;var e=Math.floor(v/20);return r+"."+e+"."+v%20},forYear:function(v){if(v=v.split("."),v.length<3)throw"Invalid Mayan year";for(var p=0,r=0;r19||r>0&&e<0)throw"Invalid Mayan year";p=p*20+e}return p},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),18},weekOfYear:function(v,p,r){return this._validate(v,p,r,g.local.invalidDate),0},daysInYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),360},daysInMonth:function(v,p){return this._validate(v,p,this.minDay,g.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(v,p,r){var e=this._validate(v,p,r,g.local.invalidDate);return e.day()},weekDay:function(v,p,r){return this._validate(v,p,r,g.local.invalidDate),!0},extraInfo:function(v,p,r){var e=this._validate(v,p,r,g.local.invalidDate),a=e.toJD(),n=this._toHaab(a),f=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[f[0]-1],tzolkinDay:f[0],tzolkinTrecena:f[1]}},_toHaab:function(v){v-=this.jdEpoch;var p=S(v+8+17*20,365);return[Math.floor(p/20)+1,S(p,20)]},_toTzolkin:function(v){return v-=this.jdEpoch,[x(v+20,20),x(v+4,13)]},toJD:function(v,p,r){var e=this._validate(v,p,r,g.local.invalidDate);return e.day()+e.month()*20+e.year()*360+this.jdEpoch},fromJD:function(v){v=Math.floor(v)+.5-this.jdEpoch;var p=Math.floor(v/360);v=v%360,v+=v<0?360:0;var r=Math.floor(v/20),e=v%20;return this.newDate(p,r,e)}});function S(v,p){return v-p*Math.floor(v/p)}function x(v,p){return S(v-1,p)+1}g.calendars.mayan=i},30632:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar;var S=g.instance("gregorian");C(i.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return S.leapYear(v.year()+(v.year()<1?1:0)+1469)},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return(this.dayOfWeek(x,v,p)||7)<6},toJD:function(e,v,p){var r=this._validate(e,v,p,g.local.invalidMonth),e=r.year();e<0&&e++;for(var a=r.day(),n=1;n=this.toJD(v+1,1,1);)v++;for(var p=x-Math.floor(this.toJD(v,1,1)+.5)+1,r=1;p>this.daysInMonth(v,r);)p-=this.daysInMonth(v,r),r++;return this.newDate(v,r,p)}}),g.calendars.nanakshahi=i},73040:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(S){return this.daysInYear(S)!==this.daysPerYear},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(S){var x=this._validate(S,this.minMonth,this.minDay,g.local.invalidYear);if(S=x.year(),typeof this.NEPALI_CALENDAR_DATA[S]>"u")return this.daysPerYear;for(var v=0,p=this.minMonth;p<=12;p++)v+=this.NEPALI_CALENDAR_DATA[S][p];return v},daysInMonth:function(S,x){return S.year&&(x=S.month(),S=S.year()),this._validate(S,x,this.minDay,g.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[S]>"u"?this.daysPerMonth[x-1]:this.NEPALI_CALENDAR_DATA[S][x]},weekDay:function(S,x,v){return this.dayOfWeek(S,x,v)!==6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);S=p.year(),x=p.month(),v=p.day();var r=g.instance(),e=0,a=x,n=S;this._createMissingCalendarData(S);var f=S-(a>9||a===9&&v>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(x!==9&&(e=v,a--);a!==9;)a<=0&&(a=12,n--),e+=this.NEPALI_CALENDAR_DATA[n][a],a--;return x===9?(e+=v-this.NEPALI_CALENDAR_DATA[n][0],e<0&&(e+=r.daysInYear(f))):e+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],r.newDate(f,1,1).add(e,"d").toJD()},fromJD:function(S){var x=g.instance(),v=x.fromJD(S),p=v.year(),r=v.dayOfYear(),e=p+56;this._createMissingCalendarData(e);for(var a=9,n=this.NEPALI_CALENDAR_DATA[e][0],f=this.NEPALI_CALENDAR_DATA[e][a]-n+1;r>f;)a++,a>12&&(a=1,e++),f+=this.NEPALI_CALENDAR_DATA[e][a];var c=this.NEPALI_CALENDAR_DATA[e][a]-(f-r);return this.newDate(e,a,c)},_createMissingCalendarData:function(S){var x=this.daysPerMonth.slice(0);x.unshift(17);for(var v=S-1;v"u"&&(this.NEPALI_CALENDAR_DATA[v]=x)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),g.calendars.nepali=i},1104:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return((v.year()-(v.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return this.dayOfWeek(x,v,p)!==5},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);x=r.year(),v=r.month(),p=r.day();var e=x-(x>=0?474:473),a=474+S(e,2820);return p+(v<=7?(v-1)*31:(v-1)*30+6)+Math.floor((a*682-110)/2816)+(a-1)*365+Math.floor(e/2820)*1029983+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var v=x-this.toJD(475,1,1),p=Math.floor(v/1029983),r=S(v,1029983),e=2820;if(r!==1029982){var a=Math.floor(r/366),n=S(r,366);e=Math.floor((2134*a+2816*n+2815)/1028522)+a+1}var f=e+2820*p+474;f=f<=0?f-1:f;var c=x-this.toJD(f,1,1)+1,l=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),m=x-this.toJD(f,l,1)+1;return this.newDate(f,l,m)}});function S(x,v){return x-v*Math.floor(x/v)}g.calendars.persian=i,g.calendars.jalali=i},51456:function(G,U,t){var g=t(38700),C=t(50896),i=g.instance();function S(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(p){var v=this._validate(p,this.minMonth,this.minDay,g.local.invalidYear),p=this._t2gYear(v.year());return i.leapYear(p)},weekOfYear:function(e,v,p){var r=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),e=this._t2gYear(r.year());return i.weekOfYear(e,r.month(),r.day())},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return(this.dayOfWeek(x,v,p)||7)<6},toJD:function(e,v,p){var r=this._validate(e,v,p,g.local.invalidDate),e=this._t2gYear(r.year());return i.toJD(e,r.month(),r.day())},fromJD:function(x){var v=i.fromJD(x),p=this._g2tYear(v.year());return this.newDate(p,v.month(),v.day())},_t2gYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)},_g2tYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)}}),g.calendars.taiwan=S},4592:function(G,U,t){var g=t(38700),C=t(50896),i=g.instance();function S(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(p){var v=this._validate(p,this.minMonth,this.minDay,g.local.invalidYear),p=this._t2gYear(v.year());return i.leapYear(p)},weekOfYear:function(e,v,p){var r=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),e=this._t2gYear(r.year());return i.weekOfYear(e,r.month(),r.day())},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return(this.dayOfWeek(x,v,p)||7)<6},toJD:function(e,v,p){var r=this._validate(e,v,p,g.local.invalidDate),e=this._t2gYear(r.year());return i.toJD(e,r.month(),r.day())},fromJD:function(x){var v=i.fromJD(x),p=this._g2tYear(v.year());return this.newDate(p,v.month(),v.day())},_t2gYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)},_g2tYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)}}),g.calendars.thai=S},45348:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return this.daysInYear(v.year())===355},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){for(var v=0,p=1;p<=12;p++)v+=this.daysInMonth(x,p);return v},daysInMonth:function(x,v){for(var p=this._validate(x,v,this.minDay,g.local.invalidMonth),r=p.toJD()-24e5+.5,e=0,a=0;ar)return S[e]-S[e-1];e++}return 30},weekDay:function(x,v,p){return this.dayOfWeek(x,v,p)!==5},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate),e=12*(r.year()-1)+r.month()-15292,a=r.day()+S[e-1]-1;return a+24e5-.5},fromJD:function(x){for(var v=x-24e5+.5,p=0,r=0;rv);r++)p++;var e=p+15292,a=Math.floor((e-1)/12),n=a+1,f=e-12*a,c=v-S[p-1]+1;return this.newDate(n,f,c)},isValid:function(x,v,p){var r=g.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(x=x.year!=null?x.year:x,r=x>=1276&&x<=1500),r},_validate:function(x,v,p,r){var e=g.baseCalendar.prototype._validate.apply(this,arguments);if(e.year<1276||e.year>1500)throw r.replace(/\{0\}/,this.local.name);return e}}),g.calendars.ummalqura=i;var S=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},38700:function(G,U,t){var g=t(50896);function C(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}g(C.prototype,{instance:function(r,e){r=(r||"gregorian").toLowerCase(),e=e||"";var a=this._localCals[r+"-"+e];if(!a&&this.calendars[r]&&(a=new this.calendars[r](e),this._localCals[r+"-"+e]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return a},newDate:function(r,e,a,n,f){return n=(r!=null&&r.year?r.calendar():typeof n=="string"?this.instance(n,f):n)||this.instance(),n.newDate(r,e,a)},substituteDigits:function(r){return function(e){return(e+"").replace(/[0-9]/g,function(a){return r[a]})}},substituteChineseDigits:function(r,e){return function(a){for(var n="",f=0;a>0;){var c=a%10;n=(c===0?"":r[c]+e[f])+n,f++,a=Math.floor(a/10)}return n.indexOf(r[1]+e[1])===0&&(n=n.substr(1)),n||r[0]}}});function i(r,e,a,n){if(this._calendar=r,this._year=e,this._month=a,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(r,e){return r=""+r,"000000".substring(0,e-r.length)+r}g(i.prototype,{newDate:function(r,e,a){return this._calendar.newDate(r??this,e,a)},year:function(r){return arguments.length===0?this._year:this.set(r,"y")},month:function(r){return arguments.length===0?this._month:this.set(r,"m")},day:function(r){return arguments.length===0?this._day:this.set(r,"d")},date:function(r,e,a){if(!this._calendar.isValid(r,e,a))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=e,this._day=a,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(r,e){return this._calendar.add(this,r,e)},set:function(r,e){return this._calendar.set(this,r,e)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(p.local.differentCalendars||p.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var e=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return e===0?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function x(){this.shortYearCutoff="+10"}g(x.prototype,{_validateLevel:0,newDate:function(r,e,a){return r==null?this.today():(r.year&&(this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),a=r.day(),e=r.month(),r=r.year()),new i(this,r,e,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){var e=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return e.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+S(Math.abs(e.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear),12},monthOfYear:function(r,e){var a=this._validate(r,e,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(r,e){var a=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,a,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth),a},daysInYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(r,e,a){var n=this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,e,a){var n=this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(r,e,a){return this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),{}},add:function(r,e,a){return this._validate(r,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,e,a),e,a)},_add:function(r,e,a){if(this._validateLevel++,a==="d"||a==="w"){var n=r.toJD()+e*(a==="w"?this.daysInWeek():1),f=r.calendar().fromJD(n);return this._validateLevel--,[f.year(),f.month(),f.day()]}try{var c=r.year()+(a==="y"?e:0),l=r.monthOfYear()+(a==="m"?e:0),f=r.day(),m=function(u){for(;lo-1+u.minMonth;)c++,l-=o,o=u.monthsInYear(c)};a==="y"?(r.month()!==this.fromMonthOfYear(c,l)&&(l=this.newDate(c,r.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(c)),f=Math.min(f,this.daysInMonth(c,this.fromMonthOfYear(c,l)))):a==="m"&&(m(this),f=Math.min(f,this.daysInMonth(c,this.fromMonthOfYear(c,l))));var h=[c,this.fromMonthOfYear(c,l),f];return this._validateLevel--,h}catch(b){throw this._validateLevel--,b}},_correctAdd:function(r,e,a,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(e[0]===0||r.year()>0!=e[0]>0)){var f={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],c=a<0?-1:1;e=this._add(r,a*f[0]+c*f[1],f[2])}return r.date(e[0],e[1],e[2])},set:function(r,e,a){this._validate(r,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate);var n=a==="y"?e:r.year(),f=a==="m"?e:r.month(),c=a==="d"?e:r.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(n,f))),r.date(n,f,c)},isValid:function(r,e,a){this._validateLevel++;var n=this.hasYearZero||r!==0;if(n){var f=this.newDate(r,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),b=f-(h>2.5?4716:4715);return b<=0&&b--,this.newDate(b,h,m)},toJSDate:function(r,e,a){var n=this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),f=new Date(n.year(),n.month()-1,n.day());return f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0),f.setHours(f.getHours()>12?f.getHours()+2:0),f},fromJSDate:function(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var p=G.exports=new C;p.cdate=i,p.baseCalendar=x,p.calendars.gregorian=v},15168:function(G,U,t){var g=t(50896),C=t(38700);g(C.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),C.local=C.regionalOptions[""],g(C.cdate.prototype,{formatDate:function(i,S){return typeof i!="string"&&(S=i,i=""),this._calendar.formatDate(i||"",this,S)}}),g(C.baseCalendar.prototype,{UNIX_EPOCH:C.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:C.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(i,S,x){if(typeof i!="string"&&(x=S,S=i,i=""),!S)return"";if(S.calendar()!==this)throw C.local.invalidFormat||C.regionalOptions[""].invalidFormat;i=i||this.local.dateFormat,x=x||{};var v=x.dayNamesShort||this.local.dayNamesShort,p=x.dayNames||this.local.dayNames,r=x.monthNumbers||this.local.monthNumbers,e=x.monthNamesShort||this.local.monthNamesShort,a=x.monthNames||this.local.monthNames;x.calculateWeek||this.local.calculateWeek;for(var n=function(A,_){for(var y=1;w+y1},f=function(A,_,y,E){var T=""+_;if(n(A,E))for(;T.length1},w=function(D,N){var I=d(D,N),k=[2,3,I?4:2,I?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],B=new RegExp("^-?\\d{1,"+k+"}"),O=S.substring(s).match(B);if(!O)throw(C.local.missingNumberAt||C.regionalOptions[""].missingNumberAt).replace(/\{0\}/,s);return s+=O[0].length,parseInt(O[0],10)},A=this,_=function(){if(typeof a=="function"){d("m");var D=a.call(A,S.substring(s));return s+=D.length,D}return w("m")},y=function(D,N,I,k){for(var B=d(D,k)?I:N,O=0;O-1){m=1,h=b;for(var z=this.daysInMonth(l,m);h>z;z=this.daysInMonth(l,m))m++,h-=z}return c>-1?this.fromJD(c):this.newDate(l,m,h)},determineDate:function(i,S,x,v,p){x&&typeof x!="object"&&(p=v,v=x,x=null),typeof v!="string"&&(p=v,v="");var r=this,e=function(a){try{return r.parseDate(v,a,p)}catch{}a=a.toLowerCase();for(var n=(a.match(/^c/)&&x?x.newDate():null)||r.today(),f=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=f.exec(a);c;)n.add(parseInt(c[1],10),c[2]||"d"),c=f.exec(a);return n};return S=S?S.newDate():null,i=i==null?S:typeof i=="string"?e(i):typeof i=="number"?isNaN(i)||i===1/0||i===-1/0?S:r.today().add(i,"d"):r.newDate(i),i}})},21576:function(){},19768:function(){},63436:function(G,U,t){var g=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],C=typeof globalThis>"u"?t.g:globalThis;G.exports=function(){for(var S=[],x=0;x>8&15|Lt>>4&240,Lt>>4&15|Lt&240,(Lt&15)<<4|Lt&15,1):Ht===8?_(Lt>>24&255,Lt>>16&255,Lt>>8&255,(Lt&255)/255):Ht===4?_(Lt>>12&15|Lt>>8&240,Lt>>8&15|Lt>>4&240,Lt>>4&15|Lt&240,((Lt&15)<<4|Lt&15)/255):null):(Lt=a.exec(mt))?new T(Lt[1],Lt[2],Lt[3],1):(Lt=n.exec(mt))?new T(Lt[1]*255/100,Lt[2]*255/100,Lt[3]*255/100,1):(Lt=f.exec(mt))?_(Lt[1],Lt[2],Lt[3],Lt[4]):(Lt=c.exec(mt))?_(Lt[1]*255/100,Lt[2]*255/100,Lt[3]*255/100,Lt[4]):(Lt=l.exec(mt))?I(Lt[1],Lt[2]/100,Lt[3]/100,1):(Lt=m.exec(mt))?I(Lt[1],Lt[2]/100,Lt[3]/100,Lt[4]):h.hasOwnProperty(mt)?A(h[mt]):mt==="transparent"?new T(NaN,NaN,NaN,0):null}function A(mt){return new T(mt>>16&255,mt>>8&255,mt&255,1)}function _(mt,Lt,Ht,Ut){return Ut<=0&&(mt=Lt=Ht=NaN),new T(mt,Lt,Ht,Ut)}function y(mt){return mt instanceof i||(mt=w(mt)),mt?(mt=mt.rgb(),new T(mt.r,mt.g,mt.b,mt.opacity)):new T}function E(mt,Lt,Ht,Ut){return arguments.length===1?y(mt):new T(mt,Lt,Ht,Ut??1)}function T(mt,Lt,Ht,Ut){this.r=+mt,this.g=+Lt,this.b=+Ht,this.opacity=+Ut}g(T,E,C(i,{brighter:function(Lt){return Lt=Lt==null?x:Math.pow(x,Lt),new T(this.r*Lt,this.g*Lt,this.b*Lt,this.opacity)},darker:function(Lt){return Lt=Lt==null?S:Math.pow(S,Lt),new T(this.r*Lt,this.g*Lt,this.b*Lt,this.opacity)},rgb:function(){return this},clamp:function(){return new T(D(this.r),D(this.g),D(this.b),z(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:s,formatHex:s,formatHex8:L,formatRgb:M,toString:M}));function s(){return"#".concat(N(this.r)).concat(N(this.g)).concat(N(this.b))}function L(){return"#".concat(N(this.r)).concat(N(this.g)).concat(N(this.b)).concat(N((isNaN(this.opacity)?1:this.opacity)*255))}function M(){var mt=z(this.opacity);return"".concat(mt===1?"rgb(":"rgba(").concat(D(this.r),", ").concat(D(this.g),", ").concat(D(this.b)).concat(mt===1?")":", ".concat(mt,")"))}function z(mt){return isNaN(mt)?1:Math.max(0,Math.min(1,mt))}function D(mt){return Math.max(0,Math.min(255,Math.round(mt)||0))}function N(mt){return mt=D(mt),(mt<16?"0":"")+mt.toString(16)}function I(mt,Lt,Ht,Ut){return Ut<=0?mt=Lt=Ht=NaN:Ht<=0||Ht>=1?mt=Lt=NaN:Lt<=0&&(mt=NaN),new O(mt,Lt,Ht,Ut)}function k(mt){if(mt instanceof O)return new O(mt.h,mt.s,mt.l,mt.opacity);if(mt instanceof i||(mt=w(mt)),!mt)return new O;if(mt instanceof O)return mt;mt=mt.rgb();var Lt=mt.r/255,Ht=mt.g/255,Ut=mt.b/255,kt=Math.min(Lt,Ht,Ut),Vt=Math.max(Lt,Ht,Ut),It=NaN,re=Vt-kt,Kt=(Vt+kt)/2;return re?(Lt===Vt?It=(Ht-Ut)/re+(Ht0&&Kt<1?0:It,new O(It,re,Kt,mt.opacity)}function B(mt,Lt,Ht,Ut){return arguments.length===1?k(mt):new O(mt,Lt,Ht,Ut??1)}function O(mt,Lt,Ht,Ut){this.h=+mt,this.s=+Lt,this.l=+Ht,this.opacity=+Ut}g(O,B,C(i,{brighter:function(Lt){return Lt=Lt==null?x:Math.pow(x,Lt),new O(this.h,this.s,this.l*Lt,this.opacity)},darker:function(Lt){return Lt=Lt==null?S:Math.pow(S,Lt),new O(this.h,this.s,this.l*Lt,this.opacity)},rgb:function(){var Lt=this.h%360+(this.h<0)*360,Ht=isNaN(Lt)||isNaN(this.s)?0:this.s,Ut=this.l,kt=Ut+(Ut<.5?Ut:1-Ut)*Ht,Vt=2*Ut-kt;return new T(j(Lt>=240?Lt-240:Lt+120,Vt,kt),j(Lt,Vt,kt),j(Lt<120?Lt+240:Lt-120,Vt,kt),this.opacity)},clamp:function(){return new O(H(this.h),Y(this.s),Y(this.l),z(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var Lt=z(this.opacity);return"".concat(Lt===1?"hsl(":"hsla(").concat(H(this.h),", ").concat(Y(this.s)*100,"%, ").concat(Y(this.l)*100,"%").concat(Lt===1?")":", ".concat(Lt,")"))}}));function H(mt){return mt=(mt||0)%360,mt<0?mt+360:mt}function Y(mt){return Math.max(0,Math.min(1,mt||0))}function j(mt,Lt,Ht){return(mt<60?Lt+(Ht-Lt)*mt/60:mt<180?Ht:mt<240?Lt+(Ht-Lt)*(240-mt)/60:Lt)*255}var et=function(mt){return function(){return mt}};function it(mt,Lt){return function(Ht){return mt+Ht*Lt}}function ut(mt,Lt,Ht){return mt=Math.pow(mt,Ht),Lt=Math.pow(Lt,Ht)-mt,Ht=1/Ht,function(Ut){return Math.pow(mt+Ut*Lt,Ht)}}function J(mt){return(mt=+mt)==1?X:function(Lt,Ht){return Ht-Lt?ut(Lt,Ht,mt):et(isNaN(Lt)?Ht:Lt)}}function X(mt,Lt){var Ht=Lt-mt;return Ht?it(mt,Ht):et(isNaN(mt)?Lt:mt)}var tt=function mt(Lt){var Ht=J(Lt);function Ut(kt,Vt){var It=Ht((kt=E(kt)).r,(Vt=E(Vt)).r),re=Ht(kt.g,Vt.g),Kt=Ht(kt.b,Vt.b),$t=X(kt.opacity,Vt.opacity);return function(le){return kt.r=It(le),kt.g=re(le),kt.b=Kt(le),kt.opacity=$t(le),kt+""}}return Ut.gamma=mt,Ut}(1);function V(mt,Lt){var Ht=Lt?Lt.length:0,Ut=mt?Math.min(Ht,mt.length):0,kt=new Array(Ut),Vt=new Array(Ht),It;for(It=0;ItHt&&(Vt=Lt.slice(Ht,Vt),re[It]?re[It]+=Vt:re[++It]=Vt),(Ut=Ut[0])===(kt=kt[0])?re[It]?re[It]+=kt:re[++It]=kt:(re[++It]=null,Kt.push({i:It,x:ot(Ut,kt)})),Ht=nt.lastIndex;return Htt+1e3&&(C.update(1e3*g/(x-t),100),t=x,g=0,S)){var v=performance.memory;S.update(v.usedJSHeapSize/1048576,v.jsHeapSizeLimit/1048576)}return x},update:function(){U=this.end()},domElement:G,setMode:Dt}};return q.Panel=function(lt,Dt,Zt){var G=1/0,U=0,t=Math.round,g=t(window.devicePixelRatio||1),C=80*g,i=48*g,S=3*g,x=2*g,v=3*g,p=15*g,r=74*g,e=30*g,a=document.createElement("canvas");a.width=C,a.height=i,a.style.cssText="width:80px;height:48px";var n=a.getContext("2d");return n.font="bold "+9*g+"px Helvetica,Arial,sans-serif",n.textBaseline="top",n.fillStyle=Zt,n.fillRect(0,0,C,i),n.fillStyle=Dt,n.fillText(lt,S,x),n.fillRect(v,p,r,e),n.fillStyle=Zt,n.globalAlpha=.9,n.fillRect(v,p,r,e),{dom:a,update:function(f,c){G=Math.min(G,f),U=Math.max(U,f),n.fillStyle=Zt,n.globalAlpha=1,n.fillRect(0,0,C,p),n.fillStyle=Dt,n.fillText(t(f)+" "+lt+" ("+t(G)+"-"+t(U)+")",S,x),n.drawImage(a,v+g,p,r-g,e,v,p,r-g,e),n.fillRect(v+r-g,p,g,e),n.fillStyle=Zt,n.globalAlpha=.9,n.fillRect(v+r-g,p,g,t((1-f/c)*e))}}},q})})(_1);var ES=_1.exports;const wp=Uy(ES),Oy={type:"change"},D0={type:"start"},Ny={type:"end"},np=new qv,By=new fc,_S=Math.cos(70*qw.DEG2RAD);class C1 extends nh{constructor(F,q){super(),this.object=F,this.domElement=q,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new bn,this.cursor=new bn,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Rh.ROTATE,MIDDLE:Rh.DOLLY,RIGHT:Rh.PAN},this.touches={ONE:Dh.ROTATE,TWO:Dh.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return U.phi},this.getAzimuthalAngle=function(){return U.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(It){It.addEventListener("keydown",wt),this._domElementKeyEvents=It},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",wt),this._domElementKeyEvents=null},this.saveState=function(){lt.target0.copy(lt.target),lt.position0.copy(lt.object.position),lt.zoom0=lt.object.zoom},this.reset=function(){lt.target.copy(lt.target0),lt.object.position.copy(lt.position0),lt.object.zoom=lt.zoom0,lt.object.updateProjectionMatrix(),lt.dispatchEvent(Oy),lt.update(),Zt=Dt.NONE},this.update=function(){const It=new bn,re=new ku().setFromUnitVectors(F.up,new bn(0,1,0)),Kt=re.clone().invert(),$t=new bn,le=new ku,he=new bn,de=2*Math.PI;return function(Se=null){const ne=lt.object.position;It.copy(ne).sub(lt.target),It.applyQuaternion(re),U.setFromVector3(It),lt.autoRotate&&Zt===Dt.NONE&&d(u(Se)),lt.enableDamping?(U.theta+=t.theta*lt.dampingFactor,U.phi+=t.phi*lt.dampingFactor):(U.theta+=t.theta,U.phi+=t.phi);let zt=lt.minAzimuthAngle,Xt=lt.maxAzimuthAngle;isFinite(zt)&&isFinite(Xt)&&(zt<-Math.PI?zt+=de:zt>Math.PI&&(zt-=de),Xt<-Math.PI?Xt+=de:Xt>Math.PI&&(Xt-=de),zt<=Xt?U.theta=Math.max(zt,Math.min(Xt,U.theta)):U.theta=U.theta>(zt+Xt)/2?Math.max(zt,U.theta):Math.min(Xt,U.theta)),U.phi=Math.max(lt.minPolarAngle,Math.min(lt.maxPolarAngle,U.phi)),U.makeSafe(),lt.enableDamping===!0?lt.target.addScaledVector(C,lt.dampingFactor):lt.target.add(C),lt.target.sub(lt.cursor),lt.target.clampLength(lt.minTargetRadius,lt.maxTargetRadius),lt.target.add(lt.cursor);let Jt=!1;if(lt.zoomToCursor&&l||lt.object.isOrthographicCamera)U.radius=L(U.radius);else{const Wt=U.radius;U.radius=L(U.radius*g),Jt=Wt!=U.radius}if(It.setFromSpherical(U),It.applyQuaternion(Kt),ne.copy(lt.target).add(It),lt.object.lookAt(lt.target),lt.enableDamping===!0?(t.theta*=1-lt.dampingFactor,t.phi*=1-lt.dampingFactor,C.multiplyScalar(1-lt.dampingFactor)):(t.set(0,0,0),C.set(0,0,0)),lt.zoomToCursor&&l){let Wt=null;if(lt.object.isPerspectiveCamera){const Ft=It.length();Wt=L(Ft*g);const xt=Ft-Wt;lt.object.position.addScaledVector(f,xt),lt.object.updateMatrixWorld(),Jt=!!xt}else if(lt.object.isOrthographicCamera){const Ft=new bn(c.x,c.y,0);Ft.unproject(lt.object);const xt=lt.object.zoom;lt.object.zoom=Math.max(lt.minZoom,Math.min(lt.maxZoom,lt.object.zoom/g)),lt.object.updateProjectionMatrix(),Jt=xt!==lt.object.zoom;const yt=new bn(c.x,c.y,0);yt.unproject(lt.object),lt.object.position.sub(yt).add(Ft),lt.object.updateMatrixWorld(),Wt=It.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),lt.zoomToCursor=!1;Wt!==null&&(this.screenSpacePanning?lt.target.set(0,0,-1).transformDirection(lt.object.matrix).multiplyScalar(Wt).add(lt.object.position):(np.origin.copy(lt.object.position),np.direction.set(0,0,-1).transformDirection(lt.object.matrix),Math.abs(lt.object.up.dot(np.direction))<_S?F.lookAt(lt.target):(By.setFromNormalAndCoplanarPoint(lt.object.up,lt.target),np.intersectPlane(By,lt.target))))}else if(lt.object.isOrthographicCamera){const Wt=lt.object.zoom;lt.object.zoom=Math.max(lt.minZoom,Math.min(lt.maxZoom,lt.object.zoom/g)),Wt!==lt.object.zoom&&(lt.object.updateProjectionMatrix(),Jt=!0)}return g=1,l=!1,Jt||$t.distanceToSquared(lt.object.position)>G||8*(1-le.dot(lt.object.quaternion))>G||he.distanceToSquared(lt.target)>G?(lt.dispatchEvent(Oy),$t.copy(lt.object.position),le.copy(lt.object.quaternion),he.copy(lt.target),!0):!1}}(),this.dispose=function(){lt.domElement.removeEventListener("contextmenu",At),lt.domElement.removeEventListener("pointerdown",Q),lt.domElement.removeEventListener("pointercancel",$),lt.domElement.removeEventListener("wheel",nt),lt.domElement.removeEventListener("pointermove",ot),lt.domElement.removeEventListener("pointerup",$),lt.domElement.getRootNode().removeEventListener("keydown",gt,{capture:!0}),lt._domElementKeyEvents!==null&&(lt._domElementKeyEvents.removeEventListener("keydown",wt),lt._domElementKeyEvents=null)};const lt=this,Dt={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let Zt=Dt.NONE;const G=1e-6,U=new zy,t=new zy;let g=1;const C=new bn,i=new Wi,S=new Wi,x=new Wi,v=new Wi,p=new Wi,r=new Wi,e=new Wi,a=new Wi,n=new Wi,f=new bn,c=new Wi;let l=!1;const m=[],h={};let b=!1;function u(It){return It!==null?2*Math.PI/60*lt.autoRotateSpeed*It:2*Math.PI/60/60*lt.autoRotateSpeed}function o(It){const re=Math.abs(It*.01);return Math.pow(.95,lt.zoomSpeed*re)}function d(It){t.theta-=It}function w(It){t.phi-=It}const A=function(){const It=new bn;return function(Kt,$t){It.setFromMatrixColumn($t,0),It.multiplyScalar(-Kt),C.add(It)}}(),_=function(){const It=new bn;return function(Kt,$t){lt.screenSpacePanning===!0?It.setFromMatrixColumn($t,1):(It.setFromMatrixColumn($t,0),It.crossVectors(lt.object.up,It)),It.multiplyScalar(Kt),C.add(It)}}(),y=function(){const It=new bn;return function(Kt,$t){const le=lt.domElement;if(lt.object.isPerspectiveCamera){const he=lt.object.position;It.copy(he).sub(lt.target);let de=It.length();de*=Math.tan(lt.object.fov/2*Math.PI/180),A(2*Kt*de/le.clientHeight,lt.object.matrix),_(2*$t*de/le.clientHeight,lt.object.matrix)}else lt.object.isOrthographicCamera?(A(Kt*(lt.object.right-lt.object.left)/lt.object.zoom/le.clientWidth,lt.object.matrix),_($t*(lt.object.top-lt.object.bottom)/lt.object.zoom/le.clientHeight,lt.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),lt.enablePan=!1)}}();function E(It){lt.object.isPerspectiveCamera||lt.object.isOrthographicCamera?g/=It:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),lt.enableZoom=!1)}function T(It){lt.object.isPerspectiveCamera||lt.object.isOrthographicCamera?g*=It:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),lt.enableZoom=!1)}function s(It,re){if(!lt.zoomToCursor)return;l=!0;const Kt=lt.domElement.getBoundingClientRect(),$t=It-Kt.left,le=re-Kt.top,he=Kt.width,de=Kt.height;c.x=$t/he*2-1,c.y=-(le/de)*2+1,f.set(c.x,c.y,1).unproject(lt.object).sub(lt.object.position).normalize()}function L(It){return Math.max(lt.minDistance,Math.min(lt.maxDistance,It))}function M(It){i.set(It.clientX,It.clientY)}function z(It){s(It.clientX,It.clientX),e.set(It.clientX,It.clientY)}function D(It){v.set(It.clientX,It.clientY)}function N(It){S.set(It.clientX,It.clientY),x.subVectors(S,i).multiplyScalar(lt.rotateSpeed);const re=lt.domElement;d(2*Math.PI*x.x/re.clientHeight),w(2*Math.PI*x.y/re.clientHeight),i.copy(S),lt.update()}function I(It){a.set(It.clientX,It.clientY),n.subVectors(a,e),n.y>0?E(o(n.y)):n.y<0&&T(o(n.y)),e.copy(a),lt.update()}function k(It){p.set(It.clientX,It.clientY),r.subVectors(p,v).multiplyScalar(lt.panSpeed),y(r.x,r.y),v.copy(p),lt.update()}function B(It){s(It.clientX,It.clientY),It.deltaY<0?T(o(It.deltaY)):It.deltaY>0&&E(o(It.deltaY)),lt.update()}function O(It){let re=!1;switch(It.code){case lt.keys.UP:It.ctrlKey||It.metaKey||It.shiftKey?w(2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(0,lt.keyPanSpeed),re=!0;break;case lt.keys.BOTTOM:It.ctrlKey||It.metaKey||It.shiftKey?w(-2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(0,-lt.keyPanSpeed),re=!0;break;case lt.keys.LEFT:It.ctrlKey||It.metaKey||It.shiftKey?d(2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(lt.keyPanSpeed,0),re=!0;break;case lt.keys.RIGHT:It.ctrlKey||It.metaKey||It.shiftKey?d(-2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(-lt.keyPanSpeed,0),re=!0;break}re&&(It.preventDefault(),lt.update())}function H(It){if(m.length===1)i.set(It.pageX,It.pageY);else{const re=kt(It),Kt=.5*(It.pageX+re.x),$t=.5*(It.pageY+re.y);i.set(Kt,$t)}}function Y(It){if(m.length===1)v.set(It.pageX,It.pageY);else{const re=kt(It),Kt=.5*(It.pageX+re.x),$t=.5*(It.pageY+re.y);v.set(Kt,$t)}}function j(It){const re=kt(It),Kt=It.pageX-re.x,$t=It.pageY-re.y,le=Math.sqrt(Kt*Kt+$t*$t);e.set(0,le)}function et(It){lt.enableZoom&&j(It),lt.enablePan&&Y(It)}function it(It){lt.enableZoom&&j(It),lt.enableRotate&&H(It)}function ut(It){if(m.length==1)S.set(It.pageX,It.pageY);else{const Kt=kt(It),$t=.5*(It.pageX+Kt.x),le=.5*(It.pageY+Kt.y);S.set($t,le)}x.subVectors(S,i).multiplyScalar(lt.rotateSpeed);const re=lt.domElement;d(2*Math.PI*x.x/re.clientHeight),w(2*Math.PI*x.y/re.clientHeight),i.copy(S)}function J(It){if(m.length===1)p.set(It.pageX,It.pageY);else{const re=kt(It),Kt=.5*(It.pageX+re.x),$t=.5*(It.pageY+re.y);p.set(Kt,$t)}r.subVectors(p,v).multiplyScalar(lt.panSpeed),y(r.x,r.y),v.copy(p)}function X(It){const re=kt(It),Kt=It.pageX-re.x,$t=It.pageY-re.y,le=Math.sqrt(Kt*Kt+$t*$t);a.set(0,le),n.set(0,Math.pow(a.y/e.y,lt.zoomSpeed)),E(n.y),e.copy(a);const he=(It.pageX+re.x)*.5,de=(It.pageY+re.y)*.5;s(he,de)}function tt(It){lt.enableZoom&&X(It),lt.enablePan&&J(It)}function V(It){lt.enableZoom&&X(It),lt.enableRotate&&ut(It)}function Q(It){lt.enabled!==!1&&(m.length===0&&(lt.domElement.setPointerCapture(It.pointerId),lt.domElement.addEventListener("pointermove",ot),lt.domElement.addEventListener("pointerup",$)),!Ht(It)&&(mt(It),It.pointerType==="touch"?Rt(It):Z(It)))}function ot(It){lt.enabled!==!1&&(It.pointerType==="touch"?bt(It):st(It))}function $(It){switch(Lt(It),m.length){case 0:lt.domElement.releasePointerCapture(It.pointerId),lt.domElement.removeEventListener("pointermove",ot),lt.domElement.removeEventListener("pointerup",$),lt.dispatchEvent(Ny),Zt=Dt.NONE;break;case 1:const re=m[0],Kt=h[re];Rt({pointerId:re,pageX:Kt.x,pageY:Kt.y});break}}function Z(It){let re;switch(It.button){case 0:re=lt.mouseButtons.LEFT;break;case 1:re=lt.mouseButtons.MIDDLE;break;case 2:re=lt.mouseButtons.RIGHT;break;default:re=-1}switch(re){case Rh.DOLLY:if(lt.enableZoom===!1)return;z(It),Zt=Dt.DOLLY;break;case Rh.ROTATE:if(It.ctrlKey||It.metaKey||It.shiftKey){if(lt.enablePan===!1)return;D(It),Zt=Dt.PAN}else{if(lt.enableRotate===!1)return;M(It),Zt=Dt.ROTATE}break;case Rh.PAN:if(It.ctrlKey||It.metaKey||It.shiftKey){if(lt.enableRotate===!1)return;M(It),Zt=Dt.ROTATE}else{if(lt.enablePan===!1)return;D(It),Zt=Dt.PAN}break;default:Zt=Dt.NONE}Zt!==Dt.NONE&<.dispatchEvent(D0)}function st(It){switch(Zt){case Dt.ROTATE:if(lt.enableRotate===!1)return;N(It);break;case Dt.DOLLY:if(lt.enableZoom===!1)return;I(It);break;case Dt.PAN:if(lt.enablePan===!1)return;k(It);break}}function nt(It){lt.enabled===!1||lt.enableZoom===!1||Zt!==Dt.NONE||(It.preventDefault(),lt.dispatchEvent(D0),B(ct(It)),lt.dispatchEvent(Ny))}function ct(It){const re=It.deltaMode,Kt={clientX:It.clientX,clientY:It.clientY,deltaY:It.deltaY};switch(re){case 1:Kt.deltaY*=16;break;case 2:Kt.deltaY*=100;break}return It.ctrlKey&&!b&&(Kt.deltaY*=10),Kt}function gt(It){It.key==="Control"&&(b=!0,lt.domElement.getRootNode().addEventListener("keyup",Tt,{passive:!0,capture:!0}))}function Tt(It){It.key==="Control"&&(b=!1,lt.domElement.getRootNode().removeEventListener("keyup",Tt,{passive:!0,capture:!0}))}function wt(It){lt.enabled===!1||lt.enablePan===!1||O(It)}function Rt(It){switch(Ut(It),m.length){case 1:switch(lt.touches.ONE){case Dh.ROTATE:if(lt.enableRotate===!1)return;H(It),Zt=Dt.TOUCH_ROTATE;break;case Dh.PAN:if(lt.enablePan===!1)return;Y(It),Zt=Dt.TOUCH_PAN;break;default:Zt=Dt.NONE}break;case 2:switch(lt.touches.TWO){case Dh.DOLLY_PAN:if(lt.enableZoom===!1&<.enablePan===!1)return;et(It),Zt=Dt.TOUCH_DOLLY_PAN;break;case Dh.DOLLY_ROTATE:if(lt.enableZoom===!1&<.enableRotate===!1)return;it(It),Zt=Dt.TOUCH_DOLLY_ROTATE;break;default:Zt=Dt.NONE}break;default:Zt=Dt.NONE}Zt!==Dt.NONE&<.dispatchEvent(D0)}function bt(It){switch(Ut(It),Zt){case Dt.TOUCH_ROTATE:if(lt.enableRotate===!1)return;ut(It),lt.update();break;case Dt.TOUCH_PAN:if(lt.enablePan===!1)return;J(It),lt.update();break;case Dt.TOUCH_DOLLY_PAN:if(lt.enableZoom===!1&<.enablePan===!1)return;tt(It),lt.update();break;case Dt.TOUCH_DOLLY_ROTATE:if(lt.enableZoom===!1&<.enableRotate===!1)return;V(It),lt.update();break;default:Zt=Dt.NONE}}function At(It){lt.enabled!==!1&&It.preventDefault()}function mt(It){m.push(It.pointerId)}function Lt(It){delete h[It.pointerId];for(let re=0;re=0?(p.material.opacity=1,a.material.opacity=.5):(p.material.opacity=.5,a.material.opacity=1),c.y>=0?(r.material.opacity=1,n.material.opacity=.5):(r.material.opacity=.5,n.material.opacity=1),c.z>=0?(e.material.opacity=1,f.material.opacity=.5):(e.material.opacity=.5,f.material.opacity=1);const T=q.offsetWidth-l;E.clearDepth(),E.getViewport(d),E.setViewport(T,0,l,l),E.render(this,C),E.setViewport(d.x,d.y,d.z,d.w)};const h=new bn,b=new ku,u=new ku,o=new ku,d=new No;let w=0;this.handleClick=function(E){if(this.animating===!0)return!1;const T=q.getBoundingClientRect(),s=T.left+(q.offsetWidth-l),L=T.top+(q.offsetHeight-l);t.x=(E.clientX-s)/(T.right-s)*2-1,t.y=-((E.clientY-L)/(T.bottom-L))*2+1,U.setFromCamera(t,C);const M=U.intersectObjects(G);if(M.length>0){const D=M[0].object;return A(D,this.center),this.animating=!0,!0}else return!1},this.update=function(E){const T=E*m;u.rotateTowards(o,T),F.position.set(0,0,1).applyQuaternion(u).multiplyScalar(w).add(this.center),F.quaternion.rotateTowards(b,T),u.angleTo(o)===0&&(this.animating=!1)},this.dispose=function(){i.dispose(),S.material.dispose(),x.material.dispose(),v.material.dispose(),p.material.map.dispose(),r.material.map.dispose(),e.material.map.dispose(),a.material.map.dispose(),n.material.map.dispose(),f.material.map.dispose(),p.material.dispose(),r.material.dispose(),e.material.dispose(),a.material.dispose(),n.material.dispose(),f.material.dispose()};function A(E,T){switch(E.userData.type){case"posX":h.set(1,0,0),b.setFromEuler(new Ss(0,Math.PI*.5,0));break;case"posY":h.set(0,1,0),b.setFromEuler(new Ss(-Math.PI*.5,0,0));break;case"posZ":h.set(0,0,1),b.setFromEuler(new Ss);break;case"negX":h.set(-1,0,0),b.setFromEuler(new Ss(0,-Math.PI*.5,0));break;case"negY":h.set(0,-1,0),b.setFromEuler(new Ss(Math.PI*.5,0,0));break;case"negZ":h.set(0,0,-1),b.setFromEuler(new Ss(0,Math.PI,0));break;default:console.error("ViewHelper: Invalid axis.")}w=F.position.distanceTo(T),h.multiplyScalar(w).add(T),g.position.copy(T),g.lookAt(F.position),u.copy(g.quaternion),g.lookAt(h),o.copy(g.quaternion)}function _(E){return new td({color:E,toneMapped:!1})}function y(E,T=null){const s=document.createElement("canvas");s.width=64,s.height=64;const L=s.getContext("2d");L.beginPath(),L.arc(32,32,16,0,2*Math.PI),L.closePath(),L.fillStyle=E.getStyle(),L.fill(),T!==null&&(L.font="24px Arial",L.textAlign="center",L.fillStyle="#000000",L.fillText(T,32,41));const M=new cS(s);return new x1({map:M,toneMapped:!1})}}}function cv(_t,F,q,lt,Dt){return F===q?(lt+Dt)/2:lt+(_t-F)/(q-F)*(Dt-lt)}class P1{constructor(F,q){this.data={x:[],y:[],mode:"markers",marker:{size:1,color:"white"}},this.data.marker.color=q,this.trailLength=0,this.maxTrailLength=F,this.trailInd=0}addTrail(F,q){this.trailLength{Zt===!1&&this.universeTrails.forEach(G=>G.popAllTrails()),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt){if(this.divId!==""){console.error(F,"Simulation already playing. Stop the current playtime before initiating a new one.");return}this.divId=F;let Dt=document.getElementById(F);if(Dt===null)return;let Zt=0,G=0,U=0,t=1/0;this.simulation.universes.forEach(n=>n.currState.bodies.forEach(f=>{Zt=Math.max(Zt,Math.abs(f.position.x)),G=Math.max(G,Math.abs(f.position.y)),t=Math.min(t,f.radius),U=Math.max(U,f.radius)}));const g=.5*Math.min(lt/G,q/Zt),C=.01*Math.min(lt,q),i=.05*Math.min(lt,q),S={paper_bgcolor:"#000000",plot_bgcolor:"#000000",font:{color:"#bfbfbf"},xaxis:{autorange:!1,range:[-(q/2)/g,q/2/g]},yaxis:{autorange:!1,range:[-(lt/2)/g,lt/2/g]},showlegend:!1,width:q,height:lt};this.simulation.controller==="ui"&&this.addControls(Dt),this.simulation.showDebugInfo&&(this.stats=new wp,this.stats.dom.style.position="absolute",this.stats.dom.style.bottom="0px",this.stats.dom.style.removeProperty("top"),Dt.appendChild(this.stats.dom));const x=this.simulation.universes.flatMap(n=>{const f=new P1(this.simulation.getMaxTrailLength(),typeof n.color=="string"?n.color:n.color[0]);this.universeTrails.push(f);const c={x:n.currState.bodies.map(l=>l.position.x),y:n.currState.bodies.map(l=>l.position.y),type:"scatter",mode:"markers",marker:{color:n.color,sizemin:C,size:n.currState.bodies.map(l=>cv(l.radius,t,U,C,i))}};return this.simulation.getShowTrails()?(n.currState.bodies.forEach(l=>{f.addTrail(l.position.x,l.position.y)}),[c,f.data]):[c,{x:[],y:[]}]});ov.newPlot(F,x,S,{scrollZoom:!0,modeBarButtonsToRemove:["lasso2d","select2d","toImage","resetScale2d"]});const v=1e3/this.simulation.maxFrameRate;let p=0,r=0;const e=n=>{this.simulation.simulateStep(this.simulation.controls.speed*Math.min(n-r,33.33)/1e3),r=n},a=n=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(a);return}if(e(n),v>0&&n-p{if(!this.simulation.getShowUniverse(c.label))return[{x:[],y:[]},{}];const m={x:c.currState.bodies.map(b=>b.position.x),y:c.currState.bodies.map(b=>b.position.y),hovertext:c.currState.bodies.map(b=>b.label),marker:{color:c.color,sizemin:C,size:c.currState.bodies.map(b=>cv(b.radius,t,U,C,i))},mode:"markers"};let h={};if(this.simulation.getShowTrails()){const b=this.universeTrails[l];c.currState.bodies.forEach(u=>{b.addTrail(u.position.x,u.position.y)}),h=b.data}return[m,h]});ov.react(F,f,S),this.simulation.showDebugInfo&&this.stats&&this.stats.update(),this.animationId=requestAnimationFrame(a)};this.animationId=requestAnimationFrame(a)}clearTrails(F){F===void 0?this.universeTrails.forEach(q=>q.popAllTrails()):this.universeTrails[F].popAllTrails()}stop(){var F;if(this.animationId!==null){cancelAnimationFrame(this.animationId),this.universeTrails=[],this.removeControls(),(F=this.stats)==null||F.dom.remove();try{ov.purge(this.divId)}catch{}}}}class R1{constructor(F,q,lt,Dt){const Zt=new Ys;Zt.setAttribute("position",new Ws(new Float32Array(0),3)),this.trails=new fS(Zt,new w1({color:q,size:.005*Dt})),lt.add(this.trails),this.trailInd=0,this.trailLength=0,this.maxTrailLength=F}addTrail(F){if(this.trailLength{},this.universeTrails=[],this.simulation=F}addControls(F){const q=new dv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const lt=this.simulation.controls;q.add(lt,"speed"),q.add(lt,"showTrails").onChange(Zt=>{Zt===!1&&this.universeTrails.forEach(G=>{G.popAllTrails()}),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt){if(this.scene!==void 0){console.error(F,"Simulation already playing. Stop the current playtime before initiating a new one.");return}let Dt=document.getElementById(F);if(Dt===null)return;Dt.style.position="relative";let Zt=0,G=0,U=1/0;this.simulation.universes.forEach(l=>l.currState.bodies.forEach(m=>{for(let h=0;h<3;h++)Zt=Math.max(Zt,Math.abs(m.position.getComponent(h)));U=Math.min(U,m.radius),G=Math.max(G,m.radius)}));const t=.5*Math.min(lt,q)/Zt,g=.015*Math.min(lt,q),C=.04*Math.min(lt,q);this.scene=new y1;const i=new gp(q/-2,q/2,lt/2,lt/-2,0,1e10);i.position.set(0,0,Math.max(q,lt));const S=new m1;S.setSize(q,lt),S.autoClear=!1,Dt.appendChild(S.domElement),this.simulation.showDebugInfo&&(this.stats=new wp,this.stats.dom.style.position="absolute",this.stats.dom.style.right="0px",this.stats.dom.style.removeProperty("left"),Dt.appendChild(this.stats.dom)),this.simulation.controller==="ui"&&this.addControls(Dt);const x=new C1(i,S.domElement);x.listenToKeyEvents(window),x.update();const v=new A1(q);this.scene.add(v);const p=new L1(i,S.domElement);let r=[];this.simulation.universes.forEach(l=>{this.universeTrails.push(new R1(this.simulation.maxTrailLength,typeof l.color=="string"?l.color:l.color[0],this.scene,t)),l.currState.bodies.forEach((m,h)=>{const b=new xp(cv(m.radius,U,G,g,C),12,12),u=new rv;u.add(new K0(new T1(b),new yp({color:new ha(typeof l.color=="string"?l.color:l.color[h]),transparent:!0,opacity:.4}))),u.add(new Vs(b,new td({color:new ha(typeof l.color=="string"?l.color:l.color[h]),transparent:!0,opacity:.5,side:Nu}))),this.scene.add(u),u.position.copy(m.position.clone().multiplyScalar(t)),r.push(u)})});const e=1e3/this.simulation.maxFrameRate;let a=performance.now(),n=performance.now();const f=l=>{this.simulation.simulateStep(this.simulation.controls.speed*Math.min(l-a,16.67)/1e3),a=l},c=l=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(c),S.clear(),S.render(this.scene,i),p.render(S),x.update();return}if(f(l),e>0&&l-n{this.simulation.controls.showUniverse[h.label]?h.currState.bodies.forEach(u=>{r[m].visible=!0,r[m].position.copy(u.position.clone().multiplyScalar(t)),this.simulation.controls.showTrails&&this.universeTrails[b].addTrail(r[m].position.clone()),m++}):h.currState.bodies.forEach(u=>{r[m].visible=!1,m++})}),this.animationId=requestAnimationFrame(c),S.clear(),S.render(this.scene,i),p.render(S),x.update()};this.clear=()=>{S.clear(),S.dispose(),r.forEach(l=>{l.children.forEach(m=>{m.geometry.dispose(),m.material.dispose()})}),S.domElement.remove()},this.animationId=requestAnimationFrame(c)}clearTrails(F){F===void 0?this.universeTrails.forEach(q=>q.popAllTrails()):this.universeTrails[F].popAllTrails()}stop(){var F,q;this.animationId!==null&&(cancelAnimationFrame(this.animationId),(F=this.scene)==null||F.clear(),this.scene=void 0,this.clear(),this.clear=()=>{},this.universeTrails.forEach(lt=>{lt.popAllTrails()}),this.universeTrails=[],this.removeControls(),(q=this.stats)==null||q.dom.remove())}}class PS{constructor(F){this.animationId=null,this.divId="",this.universeTrails=[],this.simulation=F}addControls(F){const q=new dv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const lt=this.simulation.controls;q.add(lt,"speed"),q.add(lt,"showTrails").onChange(Zt=>{Zt===!1&&this.universeTrails.forEach(G=>G.popAllTrails()),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt,Dt,Zt){if(this.divId!==""){console.error("Simulation already playing. Stop the current playtime before initiating a new one.");return}this.divId=F;let G=document.getElementById(F);if(G===null)return;let U=0,t=0,g=0,C=1/0;this.simulation.universes.forEach(f=>f.currState.bodies.forEach(c=>{U=Math.max(U,Math.abs(c.position.x)),t=Math.max(t,Math.abs(c.position.y)),C=Math.min(C,c.radius),g=Math.max(g,c.radius)}));const i=.5*Math.min(lt/t,q/U),S=.01*Math.min(lt,q),x=.05*Math.min(lt,q),v=[],p=this.simulation.maxFrameRate*Dt;let r=1;this.simulation.universes.forEach(f=>{v.push([f.currState.clone()])});for(let f=0;f{v[l].push(c.currState.clone())});const e={paper_bgcolor:"#000000",plot_bgcolor:"#000000",font:{color:"#bfbfbf"},xaxis:{autorange:!1,range:[-(q/2)/i,q/2/i]},yaxis:{autorange:!1,range:[-(lt/2)/i,lt/2/i]},showlegend:!1,width:q,height:lt};this.simulation.controller==="ui"&&this.addControls(G),this.simulation.showDebugInfo&&(this.stats=new wp,this.stats.dom.style.position="absolute",this.stats.dom.style.bottom="0px",this.stats.dom.style.removeProperty("top"),G.appendChild(this.stats.dom));const a=this.simulation.universes.flatMap(f=>{const c=new P1(this.simulation.getMaxTrailLength(),typeof f.color=="string"?f.color:f.color[0]);this.universeTrails.push(c);const l={x:f.currState.bodies.map(m=>m.position.x),y:f.currState.bodies.map(m=>m.position.y),type:"scatter",mode:"markers",marker:{color:f.color,sizemin:S,size:f.currState.bodies.map(m=>cv(m.radius,C,g,S,x))}};return this.simulation.getShowTrails()?(f.currState.bodies.forEach(m=>{c.addTrail(m.position.x,m.position.y)}),[l,c.data]):[l,{x:[],y:[]}]});ov.newPlot(F,a,e,{scrollZoom:!0,modeBarButtonsToRemove:["zoom2d","lasso2d","select2d","toImage","resetScale2d"]});const n=f=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(n);return}const c=Math.round(r),l=this.simulation.universes.flatMap((m,h)=>{if(!this.simulation.getShowUniverse(m.label))return[{x:[],y:[]},{}];const b=v[h][c],u={x:b.bodies.map(d=>d.position.x),y:b.bodies.map(d=>d.position.y),hovertext:b.bodies.map(d=>d.label),marker:{color:m.color,sizemin:S,size:m.currState.bodies.map(d=>cv(d.radius,C,g,S,x))},mode:"markers"};let o={};if(this.simulation.getShowTrails()){const d=this.universeTrails[h];b.bodies.forEach(w=>{d.addTrail(w.position.x,w.position.y)}),o=d.data}return[u,o]});ov.react(F,l,e),this.simulation.showDebugInfo&&this.stats&&this.stats.update(),r=Math.round(r+this.simulation.controls.speed),r<0?this.simulation.looped?r=(r%p+p)%p:r=0:r>=p&&(this.simulation.looped?r%=p:r=p-1),this.animationId=requestAnimationFrame(n)};this.animationId=requestAnimationFrame(n)}clearTrails(F){F===void 0?this.universeTrails.forEach(q=>q.popAllTrails()):this.universeTrails[F].popAllTrails()}stop(){var F;if(this.animationId!==null){cancelAnimationFrame(this.animationId),this.divId="",this.universeTrails=[];try{ov.purge(this.divId)}catch{}this.removeControls(),(F=this.stats)==null||F.dom.remove()}}}class RS{constructor(F){this.animationId=null,this.clear=()=>{},this.universeTrails=[],this.simulation=F}addControls(F){const q=new dv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const lt=this.simulation.controls;q.add(lt,"speed"),q.add(lt,"showTrails").onChange(Zt=>{Zt===!1&&this.universeTrails.forEach(G=>{G.popAllTrails()}),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt,Dt,Zt){if(this.scene!==void 0){console.error("Simulation already playing. Stop the current playtime before initiating a new one.");return}let G=document.getElementById(F);if(G===null)return;let U=0,t=0,g=1/0;this.simulation.universes.forEach(m=>m.currState.bodies.forEach(h=>{for(let b=0;b<3;b++)U=Math.max(U,Math.abs(h.position.getComponent(b)));g=Math.min(g,h.radius),t=Math.max(t,h.radius)}));const C=.5*Math.min(lt,q)/U,i=.015*Math.min(lt,q),S=.04*Math.min(lt,q);this.scene=new y1;const x=new gp(q/-2,q/2,lt/2,lt/-2,0,1e10);x.position.set(0,0,Math.max(q,lt));const v=new m1;v.setSize(q,lt),v.autoClear=!1,G.appendChild(v.domElement);const p=new C1(x,v.domElement);p.listenToKeyEvents(window),p.update();const r=new A1(q);this.scene.add(r);const e=new L1(x,v.domElement);let a=[];this.simulation.universes.forEach(m=>{this.universeTrails.push(new R1(this.simulation.maxTrailLength,typeof m.color=="string"?m.color:m.color[0],this.scene,C)),m.currState.bodies.forEach((h,b)=>{const u=new xp(cv(h.radius,g,t,i,S),12,12),o=new rv;o.add(new K0(new T1(u),new yp({color:new ha(typeof m.color=="string"?m.color:m.color[b]),transparent:!0,opacity:.4}))),o.add(new Vs(u,new td({color:new ha(typeof m.color=="string"?m.color:m.color[b]),transparent:!0,opacity:.5,side:Nu}))),this.scene.add(o),o.position.copy(h.position.clone().multiplyScalar(C)),a.push(o)})}),this.simulation.showDebugInfo&&(this.stats=new wp,this.stats.dom.style.position="absolute",this.stats.dom.style.right="0px",this.stats.dom.style.removeProperty("left"),G.appendChild(this.stats.dom));const n=[],f=this.simulation.maxFrameRate*Dt;let c=1;this.simulation.universes.forEach(m=>{n.push([m.currState.clone()])});for(let m=0;m{n[b].push(h.currState.clone())});this.simulation.controller==="ui"&&this.addControls(G);const l=m=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(l),v.clear(),v.render(this.scene,x),e.render(v),p.update();return}let h=0;this.simulation.universes.forEach((b,u)=>{this.simulation.controls.showUniverse[b.label]?n[u][c].bodies.forEach(d=>{a[h].visible=!0,a[h].position.copy(d.position.clone().multiplyScalar(C)),this.simulation.controls.showTrails&&this.universeTrails[u].addTrail(a[h].position.clone()),h++}):b.currState.bodies.forEach(()=>{a[h].visible=!1,h++})}),this.simulation.showDebugInfo&&this.stats&&this.stats.update(),c=Math.round(c+this.simulation.controls.speed),c<0?this.simulation.looped?c=(c%f+f)%f:c=0:c>=f&&(this.simulation.looped?c%=f:c=f-1),this.animationId=requestAnimationFrame(l),v.clear(),v.render(this.scene,x),e.render(v),p.update()};this.clear=()=>{v.clear(),v.dispose(),a.forEach(m=>{m.children.forEach(h=>{h.geometry.dispose(),h.material.dispose()})})},this.animationId=requestAnimationFrame(l)}clearTrails(F){F===void 0?this.universeTrails.forEach(q=>q.popAllTrails()):this.universeTrails[F].popAllTrails()}stop(){var F,q;this.animationId!==null&&(cancelAnimationFrame(this.animationId),(F=this.scene)==null||F.clear(),this.scene=void 0,this.clear(),this.clear=()=>{},this.universeTrails.forEach(lt=>{lt.popAllTrails()}),this.universeTrails=[],this.removeControls(),(q=this.stats)==null||q.dom.remove())}}class zS{constructor(F,{visType:q="2D",record:lt=!1,looped:Dt=!0,controller:Zt="none",showTrails:G=!1,showDebugInfo:U=!1,maxFrameRate:t=-1,maxTrailLength:g=100}){if(this.controls={speed:1,paused:!1,showTrails:!1,showUniverse:{}},this.universes=Array.isArray(F)?F:[F],this.universes.length>10)throw new Error("Too many universes");if(new Set(this.universes.map(i=>i.label)).size!==this.universes.length)throw new Error("Duplicate label in universes");this.controller=Zt,this.universes.forEach(i=>{this.controls.showUniverse[i.label]=!0}),this.controls.showTrails=G,this.showDebugInfo=U,this.maxFrameRate=t,this.maxTrailLength=g,this.looped=Dt,lt?(this.maxFrameRate=60,this.visualizer=q==="2D"?new PS(this):new RS(this)):this.visualizer=q==="2D"?new CS(this):new LS(this)}getSpeed(){return this.controls.speed}setSpeed(F){this.controller==="code"&&(this.controls.speed=F)}isPlaying(){return!this.controls.paused}pause(){this.controller==="code"&&(this.controls.paused=!0)}resume(){this.controller==="code"&&(this.controls.paused=!1)}getShowTrails(){return this.controls.showTrails}setShowTrails(F){this.controller==="code"&&(this.controls.showTrails=F,F||this.visualizer.clearTrails())}getShowUniverse(F){return this.controls.showUniverse[F]}setShowUniverse(F,q){if(this.controller==="code"){for(let lt=0;lt{q.simulateStep(F)})}start(F,q,lt,Dt=1,Zt=!1,G=1,U=1){if(G===void 0)throw new Error("recordFor must be defined if record is true");this.controls.paused=Zt,this.controls.speed=Dt,this.visualizer.start(F,q,lt,G,U)}stop(){this.visualizer.stop()}}class D1{constructor(F){if(F.currState===void 0)throw new Error("Missing Current State in Universe");if(F.simFunc===void 0)throw new Error("Missing Simulation Function in Universe");this.label=F.label===void 0?"Universe":F.label,this.prevState=F.prevState===void 0?F.currState:F.prevState,this.currState=F.currState,this.color=F.color===void 0?"rgba(255, 255, 255, 1)":F.color,this.simFunc=F.simFunc,this.transformations=F.transformations===void 0?[]:F.transformations}simulateStep(F){let q=this.simFunc.simulate(F,this.currState,this.prevState);this.prevState=this.currState,this.transformations.forEach(lt=>{q=lt.transform(q,F)}),this.currState=q}clone(){return new D1({prevState:this.prevState.clone(),currState:this.currState.clone(),color:this.color,label:this.label,simFunc:this.simFunc,transformations:this.transformations})}}export{M1 as C,S1 as G,FS as R,zS as S,D1 as U,bn as V,bp as a,IS as b}; + `)+" "+it[1]:it[0]+et+" "+j.join(", ")+" "+it[1]}U.types=t(41088);function b(j){return Array.isArray(j)}U.isArray=b;function u(j){return typeof j=="boolean"}U.isBoolean=u;function o(j){return j===null}U.isNull=o;function d(j){return j==null}U.isNullOrUndefined=d;function w(j){return typeof j=="number"}U.isNumber=w;function A(j){return typeof j=="string"}U.isString=A;function _(j){return typeof j=="symbol"}U.isSymbol=_;function y(j){return j===void 0}U.isUndefined=y;function E(j){return T(j)&&D(j)==="[object RegExp]"}U.isRegExp=E,U.types.isRegExp=E;function T(j){return typeof j=="object"&&j!==null}U.isObject=T;function s(j){return T(j)&&D(j)==="[object Date]"}U.isDate=s,U.types.isDate=s;function L(j){return T(j)&&(D(j)==="[object Error]"||j instanceof Error)}U.isError=L,U.types.isNativeError=L;function M(j){return typeof j=="function"}U.isFunction=M;function z(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||typeof j>"u"}U.isPrimitive=z,U.isBuffer=t(75272);function D(j){return Object.prototype.toString.call(j)}function N(j){return j<10?"0"+j.toString(10):j.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var j=new Date,et=[N(j.getHours()),N(j.getMinutes()),N(j.getSeconds())].join(":");return[j.getDate(),I[j.getMonth()],et].join(" ")}U.log=function(){console.log("%s - %s",k(),U.format.apply(U,arguments))},U.inherits=t(6768),U._extend=function(j,et){if(!et||!T(et))return j;for(var it=Object.keys(et),ut=it.length;ut--;)j[it[ut]]=et[it[ut]];return j};function B(j,et){return Object.prototype.hasOwnProperty.call(j,et)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;U.promisify=function(et){if(typeof et!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&et[O]){var it=et[O];if(typeof it!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(it,O,{value:it,enumerable:!1,writable:!1,configurable:!0}),it}function it(){for(var ut,J,X=new Promise(function(Q,ot){ut=Q,J=ot}),tt=[],V=0;V"u"?t.g:globalThis,e=C(),a=S("String.prototype.slice"),n=Object.getPrototypeOf,f=S("Array.prototype.indexOf",!0)||function(b,u){for(var o=0;o-1?u:u!=="Object"?!1:m(b)}return x?l(b):null}},67020:function(G,U,t){var g=t(38700),C=t(50896),i=g.instance();function S(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(c,l){if(typeof c=="string"){var m=c.match(h);return m?m[0]:""}var v=this._validateYear(c),b=c.month(),u=""+this.toChineseMonth(v,b);return l&&u.length<2&&(u="0"+u),this.isIntercalaryMonth(v,b)&&(u+="i"),u},monthNames:function(c){if(typeof c=="string"){var l=c.match(p);return l?l[0]:""}var m=this._validateYear(c),v=c.month(),b=this.toChineseMonth(m,v),u=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][b-1];return this.isIntercalaryMonth(m,v)&&(u="闰"+u),u},monthNamesShort:function(c){if(typeof c=="string"){var l=c.match(r);return l?l[0]:""}var m=this._validateYear(c),v=c.month(),b=this.toChineseMonth(m,v),u=["一","二","三","四","五","六","七","八","九","十","十一","十二"][b-1];return this.isIntercalaryMonth(m,v)&&(u="闰"+u),u},parseMonth:function(c,l){c=this._validateYear(c);var m=parseInt(l),v;if(isNaN(m))l[0]==="闰"&&(v=!0,l=l.substring(1)),l[l.length-1]==="月"&&(l=l.substring(0,l.length-1)),m=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(l);else{var b=l[l.length-1];v=b==="i"||b==="I"}var u=this.toMonthIndex(c,m,v);return u},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(c,l){if(c.year&&(c=c.year()),typeof c!="number"||c<1888||c>2111)throw l.replace(/\{0\}/,this.local.name);return c},toMonthIndex:function(c,l,m){var v=this.intercalaryMonth(c),b=m&&l!==v;if(b||l<1||l>12)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var u;return v?!m&&l<=v?u=l-1:u=l:u=l-1,u},toChineseMonth:function(c,l){c.year&&(c=c.year(),l=c.month());var m=this.intercalaryMonth(c),v=m?12:11;if(l<0||l>v)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var b;return m?l>13;return m},isIntercalaryMonth:function(c,l){c.year&&(c=c.year(),l=c.month());var m=this.intercalaryMonth(c);return!!m&&m===l},leapYear:function(c){return this.intercalaryMonth(c)!==0},weekOfYear:function(c,l,m){var v=this._validateYear(c,g.local.invalidyear),b=a[v-a[0]],u=b>>9&4095,o=b>>5&15,d=b&31,w;w=i.newDate(u,o,d),w.add(4-(w.dayOfWeek()||7),"d");var A=this.toJD(c,l,m)-w.toJD();return 1+Math.floor(A/7)},monthsInYear:function(c){return this.leapYear(c)?13:12},daysInMonth:function(c,l){c.year&&(l=c.month(),c=c.year()),c=this._validateYear(c);var m=e[c-e[0]],v=m>>13,b=v?12:11;if(l>b)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var u=m&1<<12-l?30:29;return u},weekDay:function(c,l,m){return(this.dayOfWeek(c,l,m)||7)<6},toJD:function(c,l,m){var v=this._validate(c,u,m,g.local.invalidDate);c=this._validateYear(v.year()),l=v.month(),m=v.day();var b=this.isIntercalaryMonth(c,l),u=this.toChineseMonth(c,l),o=f(c,u,m,b);return i.toJD(o.year,o.month,o.day)},fromJD:function(c){var l=i.fromJD(c),m=n(l.year(),l.month(),l.day()),v=this.toMonthIndex(m.year,m.month,m.isIntercalary);return this.newDate(m.year,v,m.day)},fromString:function(c){var l=c.match(x),m=this._validateYear(+l[1]),v=+l[2],b=!!l[3],u=this.toMonthIndex(m,v,b),o=+l[4];return this.newDate(m,u,o)},add:function(c,l,m){var v=c.year(),b=c.month(),u=this.isIntercalaryMonth(v,b),o=this.toChineseMonth(v,b),d=Object.getPrototypeOf(S.prototype).add.call(this,c,l,m);if(m==="y"){var w=d.year(),A=d.month(),_=this.isIntercalaryMonth(w,o),y=u&&_?this.toMonthIndex(w,o,!0):this.toMonthIndex(w,o,!1);y!==A&&d.month(y)}return d}});var x=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,h=/^\d?\d[iI]?/m,p=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;g.calendars.chinese=S;var e=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function n(c,l,m,v){var b,u;if(typeof c=="object")b=c,u=l||{};else{var o=typeof c=="number"&&c>=1888&&c<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var d=typeof l=="number"&&l>=1&&l<=12;if(!d)throw new Error("Solar month outside range 1 - 12");var w=typeof m=="number"&&m>=1&&m<=31;if(!w)throw new Error("Solar day outside range 1 - 31");b={year:c,month:l,day:m},u=v||{}}var A=a[b.year-a[0]],_=b.year<<9|b.month<<5|b.day;u.year=_>=A?b.year:b.year-1,A=a[u.year-a[0]];var y=A>>9&4095,E=A>>5&15,T=A&31,s,L=new Date(y,E-1,T),M=new Date(b.year,b.month-1,b.day);s=Math.round((M-L)/864e5);var z=e[u.year-e[0]],D;for(D=0;D<13;D++){var N=z&1<<12-D?30:29;if(s>13;return!I||D=1888&&c<=2111;if(!d)throw new Error("Lunar year outside range 1888-2111");var w=typeof l=="number"&&l>=1&&l<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var A=typeof m=="number"&&m>=1&&m<=30;if(!A)throw new Error("Lunar day outside range 1 - 30");var _;typeof v=="object"?(_=!1,u=v):(_=!!v,u=b||{}),o={year:c,month:l,day:m,isIntercalary:_}}var y;y=o.day-1;var E=e[o.year-e[0]],T=E>>13,s;T&&(o.month>T||o.isIntercalary)?s=o.month:s=o.month-1;for(var L=0;L>9&4095,N=z>>5&15,I=z&31,k=new Date(D,N-1,I+y);return u.year=k.getFullYear(),u.month=1+k.getMonth(),u.day=k.getDate(),u}},89792:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(h){var x=this._validate(h,this.minMonth,this.minDay,g.local.invalidYear),h=x.year()+(x.year()<0?1:0);return h%4===3||h%4===-1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(S,x,h){var p=this.newDate(S,x,h);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var h=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===13&&this.leapYear(h.year())?1:0)},weekDay:function(S,x,h){return(this.dayOfWeek(S,x,h)||7)<6},toJD:function(S,x,h){var p=this._validate(S,x,h,g.local.invalidDate);return S=p.year(),S<0&&S++,p.day()+(p.month()-1)*30+(S-1)*365+Math.floor(S/4)+this.jdEpoch-1},fromJD:function(S){var x=Math.floor(S)+.5-this.jdEpoch,h=Math.floor((x-Math.floor((x+366)/1461))/365)+1;h<=0&&h--,x=Math.floor(S)+.5-this.newDate(h,1,1).toJD();var p=Math.floor(x/30)+1,r=x-(p-1)*30+1;return this.newDate(h,p,r)}}),g.calendars.coptic=i},55668:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),!1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),13},daysInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),400},weekOfYear:function(x,h,p){var r=this.newDate(x,h,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(x,h){var p=this._validate(x,h,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(x,h,p){var r=this._validate(x,h,p,g.local.invalidDate);return(r.day()+1)%8},weekDay:function(x,h,p){var r=this.dayOfWeek(x,h,p);return r>=2&&r<=6},extraInfo:function(x,h,p){var r=this._validate(x,h,p,g.local.invalidDate);return{century:S[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(x,h,p){var r=this._validate(x,h,p,g.local.invalidDate);return x=r.year()+(r.year()<0?1:0),h=r.month(),p=r.day(),p+(h>1?16:0)+(h>2?(h-2)*32:0)+(x-1)*400+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x+.5)-Math.floor(this.jdEpoch)-1;var h=Math.floor(x/400)+1;x-=(h-1)*400,x+=x>15?16:0;var p=Math.floor(x/32)+1,r=x-(p-1)*32+1;return this.newDate(h<=0?h-1:h,p,r)}});var S={20:"Fruitbat",21:"Anchovy"};g.calendars.discworld=i},65168:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(h){var x=this._validate(h,this.minMonth,this.minDay,g.local.invalidYear),h=x.year()+(x.year()<0?1:0);return h%4===3||h%4===-1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(S,x,h){var p=this.newDate(S,x,h);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var h=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===13&&this.leapYear(h.year())?1:0)},weekDay:function(S,x,h){return(this.dayOfWeek(S,x,h)||7)<6},toJD:function(S,x,h){var p=this._validate(S,x,h,g.local.invalidDate);return S=p.year(),S<0&&S++,p.day()+(p.month()-1)*30+(S-1)*365+Math.floor(S/4)+this.jdEpoch-1},fromJD:function(S){var x=Math.floor(S)+.5-this.jdEpoch,h=Math.floor((x-Math.floor((x+366)/1461))/365)+1;h<=0&&h--,x=Math.floor(S)+.5-this.newDate(h,1,1).toJD();var p=Math.floor(x/30)+1,r=x-(p-1)*30+1;return this.newDate(h,p,r)}}),g.calendars.ethiopian=i},2084:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(x){var h=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return this._leapYear(h.year())},_leapYear:function(x){return x=x<0?x+1:x,S(x*7+1,19)<7},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),this._leapYear(x.year?x.year():x)?13:12},weekOfYear:function(x,h,p){var r=this.newDate(x,h,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){var h=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return x=h.year(),this.toJD(x===-1?1:x+1,7,1)-this.toJD(x,7,1)},daysInMonth:function(x,h){return x.year&&(h=x.month(),x=x.year()),this._validate(x,h,this.minDay,g.local.invalidMonth),h===12&&this.leapYear(x)||h===8&&S(this.daysInYear(x),10)===5?30:h===9&&S(this.daysInYear(x),10)===3?29:this.daysPerMonth[h-1]},weekDay:function(x,h,p){return this.dayOfWeek(x,h,p)!==6},extraInfo:function(x,h,p){var r=this._validate(x,h,p,g.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(x,h,p){var r=this._validate(x,h,p,g.local.invalidDate);x=r.year(),h=r.month(),p=r.day();var e=x<=0?x+1:x,a=this.jdEpoch+this._delay1(e)+this._delay2(e)+p+1;if(h<7){for(var n=7;n<=this.monthsInYear(x);n++)a+=this.daysInMonth(x,n);for(var n=1;n=this.toJD(h===-1?1:h+1,7,1);)h++;for(var p=xthis.toJD(h,p,this.daysInMonth(h,p));)p++;var r=x-this.toJD(h,p,1)+1;return this.newDate(h,p,r)}});function S(x,h){return x-h*Math.floor(x/h)}g.calendars.hebrew=i},26368:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(S){var x=this._validate(S,this.minMonth,this.minDay,g.local.invalidYear);return(x.year()*11+14)%30<11},weekOfYear:function(S,x,h){var p=this.newDate(S,x,h);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(S){return this.leapYear(S)?355:354},daysInMonth:function(S,x){var h=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===12&&this.leapYear(h.year())?1:0)},weekDay:function(S,x,h){return this.dayOfWeek(S,x,h)!==5},toJD:function(S,x,h){var p=this._validate(S,x,h,g.local.invalidDate);return S=p.year(),x=p.month(),h=p.day(),S=S<=0?S+1:S,h+Math.ceil(29.5*(x-1))+(S-1)*354+Math.floor((3+11*S)/30)+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var x=Math.floor((30*(S-this.jdEpoch)+10646)/10631);x=x<=0?x-1:x;var h=Math.min(12,Math.ceil((S-29-this.toJD(x,1,1))/29.5)+1),p=S-this.toJD(x,h,1)+1;return this.newDate(x,h,p)}}),g.calendars.islamic=i},24747:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(h){var x=this._validate(h,this.minMonth,this.minDay,g.local.invalidYear),h=x.year()<0?x.year()+1:x.year();return h%4===0},weekOfYear:function(S,x,h){var p=this.newDate(S,x,h);return p.add(4-(p.dayOfWeek()||7),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var h=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===2&&this.leapYear(h.year())?1:0)},weekDay:function(S,x,h){return(this.dayOfWeek(S,x,h)||7)<6},toJD:function(S,x,h){var p=this._validate(S,x,h,g.local.invalidDate);return S=p.year(),x=p.month(),h=p.day(),S<0&&S++,x<=2&&(S--,x+=12),Math.floor(365.25*(S+4716))+Math.floor(30.6001*(x+1))+h-1524.5},fromJD:function(S){var x=Math.floor(S+.5),h=x+1524,p=Math.floor((h-122.1)/365.25),r=Math.floor(365.25*p),e=Math.floor((h-r)/30.6001),a=e-Math.floor(e<14?1:13),n=p-Math.floor(a>2?4716:4715),f=h-r-Math.floor(30.6001*e);return n<=0&&n--,this.newDate(n,a,f)}}),g.calendars.julian=i},65616:function(G,U,t){var g=t(38700),C=t(50896);function i(h){this.local=this.regionalOptions[h||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(h){return this._validate(h,this.minMonth,this.minDay,g.local.invalidYear),!1},formatYear:function(h){var p=this._validate(h,this.minMonth,this.minDay,g.local.invalidYear);h=p.year();var r=Math.floor(h/400);h=h%400,h+=h<0?400:0;var e=Math.floor(h/20);return r+"."+e+"."+h%20},forYear:function(h){if(h=h.split("."),h.length<3)throw"Invalid Mayan year";for(var p=0,r=0;r19||r>0&&e<0)throw"Invalid Mayan year";p=p*20+e}return p},monthsInYear:function(h){return this._validate(h,this.minMonth,this.minDay,g.local.invalidYear),18},weekOfYear:function(h,p,r){return this._validate(h,p,r,g.local.invalidDate),0},daysInYear:function(h){return this._validate(h,this.minMonth,this.minDay,g.local.invalidYear),360},daysInMonth:function(h,p){return this._validate(h,p,this.minDay,g.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(h,p,r){var e=this._validate(h,p,r,g.local.invalidDate);return e.day()},weekDay:function(h,p,r){return this._validate(h,p,r,g.local.invalidDate),!0},extraInfo:function(h,p,r){var e=this._validate(h,p,r,g.local.invalidDate),a=e.toJD(),n=this._toHaab(a),f=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[f[0]-1],tzolkinDay:f[0],tzolkinTrecena:f[1]}},_toHaab:function(h){h-=this.jdEpoch;var p=S(h+8+17*20,365);return[Math.floor(p/20)+1,S(p,20)]},_toTzolkin:function(h){return h-=this.jdEpoch,[x(h+20,20),x(h+4,13)]},toJD:function(h,p,r){var e=this._validate(h,p,r,g.local.invalidDate);return e.day()+e.month()*20+e.year()*360+this.jdEpoch},fromJD:function(h){h=Math.floor(h)+.5-this.jdEpoch;var p=Math.floor(h/360);h=h%360,h+=h<0?360:0;var r=Math.floor(h/20),e=h%20;return this.newDate(p,r,e)}});function S(h,p){return h-p*Math.floor(h/p)}function x(h,p){return S(h-1,p)+1}g.calendars.mayan=i},30632:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar;var S=g.instance("gregorian");C(i.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(x){var h=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return S.leapYear(h.year()+(h.year()<1?1:0)+1469)},weekOfYear:function(x,h,p){var r=this.newDate(x,h,p);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,h){var p=this._validate(x,h,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(x,h,p){return(this.dayOfWeek(x,h,p)||7)<6},toJD:function(e,h,p){var r=this._validate(e,h,p,g.local.invalidMonth),e=r.year();e<0&&e++;for(var a=r.day(),n=1;n=this.toJD(h+1,1,1);)h++;for(var p=x-Math.floor(this.toJD(h,1,1)+.5)+1,r=1;p>this.daysInMonth(h,r);)p-=this.daysInMonth(h,r),r++;return this.newDate(h,r,p)}}),g.calendars.nanakshahi=i},73040:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(S){return this.daysInYear(S)!==this.daysPerYear},weekOfYear:function(S,x,h){var p=this.newDate(S,x,h);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(S){var x=this._validate(S,this.minMonth,this.minDay,g.local.invalidYear);if(S=x.year(),typeof this.NEPALI_CALENDAR_DATA[S]>"u")return this.daysPerYear;for(var h=0,p=this.minMonth;p<=12;p++)h+=this.NEPALI_CALENDAR_DATA[S][p];return h},daysInMonth:function(S,x){return S.year&&(x=S.month(),S=S.year()),this._validate(S,x,this.minDay,g.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[S]>"u"?this.daysPerMonth[x-1]:this.NEPALI_CALENDAR_DATA[S][x]},weekDay:function(S,x,h){return this.dayOfWeek(S,x,h)!==6},toJD:function(S,x,h){var p=this._validate(S,x,h,g.local.invalidDate);S=p.year(),x=p.month(),h=p.day();var r=g.instance(),e=0,a=x,n=S;this._createMissingCalendarData(S);var f=S-(a>9||a===9&&h>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(x!==9&&(e=h,a--);a!==9;)a<=0&&(a=12,n--),e+=this.NEPALI_CALENDAR_DATA[n][a],a--;return x===9?(e+=h-this.NEPALI_CALENDAR_DATA[n][0],e<0&&(e+=r.daysInYear(f))):e+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],r.newDate(f,1,1).add(e,"d").toJD()},fromJD:function(S){var x=g.instance(),h=x.fromJD(S),p=h.year(),r=h.dayOfYear(),e=p+56;this._createMissingCalendarData(e);for(var a=9,n=this.NEPALI_CALENDAR_DATA[e][0],f=this.NEPALI_CALENDAR_DATA[e][a]-n+1;r>f;)a++,a>12&&(a=1,e++),f+=this.NEPALI_CALENDAR_DATA[e][a];var c=this.NEPALI_CALENDAR_DATA[e][a]-(f-r);return this.newDate(e,a,c)},_createMissingCalendarData:function(S){var x=this.daysPerMonth.slice(0);x.unshift(17);for(var h=S-1;h"u"&&(this.NEPALI_CALENDAR_DATA[h]=x)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),g.calendars.nepali=i},1104:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(x){var h=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return((h.year()-(h.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(x,h,p){var r=this.newDate(x,h,p);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,h){var p=this._validate(x,h,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(x,h,p){return this.dayOfWeek(x,h,p)!==5},toJD:function(x,h,p){var r=this._validate(x,h,p,g.local.invalidDate);x=r.year(),h=r.month(),p=r.day();var e=x-(x>=0?474:473),a=474+S(e,2820);return p+(h<=7?(h-1)*31:(h-1)*30+6)+Math.floor((a*682-110)/2816)+(a-1)*365+Math.floor(e/2820)*1029983+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var h=x-this.toJD(475,1,1),p=Math.floor(h/1029983),r=S(h,1029983),e=2820;if(r!==1029982){var a=Math.floor(r/366),n=S(r,366);e=Math.floor((2134*a+2816*n+2815)/1028522)+a+1}var f=e+2820*p+474;f=f<=0?f-1:f;var c=x-this.toJD(f,1,1)+1,l=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),m=x-this.toJD(f,l,1)+1;return this.newDate(f,l,m)}});function S(x,h){return x-h*Math.floor(x/h)}g.calendars.persian=i,g.calendars.jalali=i},51456:function(G,U,t){var g=t(38700),C=t(50896),i=g.instance();function S(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(p){var h=this._validate(p,this.minMonth,this.minDay,g.local.invalidYear),p=this._t2gYear(h.year());return i.leapYear(p)},weekOfYear:function(e,h,p){var r=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),e=this._t2gYear(r.year());return i.weekOfYear(e,r.month(),r.day())},daysInMonth:function(x,h){var p=this._validate(x,h,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(x,h,p){return(this.dayOfWeek(x,h,p)||7)<6},toJD:function(e,h,p){var r=this._validate(e,h,p,g.local.invalidDate),e=this._t2gYear(r.year());return i.toJD(e,r.month(),r.day())},fromJD:function(x){var h=i.fromJD(x),p=this._g2tYear(h.year());return this.newDate(p,h.month(),h.day())},_t2gYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)},_g2tYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)}}),g.calendars.taiwan=S},4592:function(G,U,t){var g=t(38700),C=t(50896),i=g.instance();function S(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(p){var h=this._validate(p,this.minMonth,this.minDay,g.local.invalidYear),p=this._t2gYear(h.year());return i.leapYear(p)},weekOfYear:function(e,h,p){var r=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),e=this._t2gYear(r.year());return i.weekOfYear(e,r.month(),r.day())},daysInMonth:function(x,h){var p=this._validate(x,h,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(x,h,p){return(this.dayOfWeek(x,h,p)||7)<6},toJD:function(e,h,p){var r=this._validate(e,h,p,g.local.invalidDate),e=this._t2gYear(r.year());return i.toJD(e,r.month(),r.day())},fromJD:function(x){var h=i.fromJD(x),p=this._g2tYear(h.year());return this.newDate(p,h.month(),h.day())},_t2gYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)},_g2tYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)}}),g.calendars.thai=S},45348:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(x){var h=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return this.daysInYear(h.year())===355},weekOfYear:function(x,h,p){var r=this.newDate(x,h,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){for(var h=0,p=1;p<=12;p++)h+=this.daysInMonth(x,p);return h},daysInMonth:function(x,h){for(var p=this._validate(x,h,this.minDay,g.local.invalidMonth),r=p.toJD()-24e5+.5,e=0,a=0;ar)return S[e]-S[e-1];e++}return 30},weekDay:function(x,h,p){return this.dayOfWeek(x,h,p)!==5},toJD:function(x,h,p){var r=this._validate(x,h,p,g.local.invalidDate),e=12*(r.year()-1)+r.month()-15292,a=r.day()+S[e-1]-1;return a+24e5-.5},fromJD:function(x){for(var h=x-24e5+.5,p=0,r=0;rh);r++)p++;var e=p+15292,a=Math.floor((e-1)/12),n=a+1,f=e-12*a,c=h-S[p-1]+1;return this.newDate(n,f,c)},isValid:function(x,h,p){var r=g.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(x=x.year!=null?x.year:x,r=x>=1276&&x<=1500),r},_validate:function(x,h,p,r){var e=g.baseCalendar.prototype._validate.apply(this,arguments);if(e.year<1276||e.year>1500)throw r.replace(/\{0\}/,this.local.name);return e}}),g.calendars.ummalqura=i;var S=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},38700:function(G,U,t){var g=t(50896);function C(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}g(C.prototype,{instance:function(r,e){r=(r||"gregorian").toLowerCase(),e=e||"";var a=this._localCals[r+"-"+e];if(!a&&this.calendars[r]&&(a=new this.calendars[r](e),this._localCals[r+"-"+e]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return a},newDate:function(r,e,a,n,f){return n=(r!=null&&r.year?r.calendar():typeof n=="string"?this.instance(n,f):n)||this.instance(),n.newDate(r,e,a)},substituteDigits:function(r){return function(e){return(e+"").replace(/[0-9]/g,function(a){return r[a]})}},substituteChineseDigits:function(r,e){return function(a){for(var n="",f=0;a>0;){var c=a%10;n=(c===0?"":r[c]+e[f])+n,f++,a=Math.floor(a/10)}return n.indexOf(r[1]+e[1])===0&&(n=n.substr(1)),n||r[0]}}});function i(r,e,a,n){if(this._calendar=r,this._year=e,this._month=a,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(r,e){return r=""+r,"000000".substring(0,e-r.length)+r}g(i.prototype,{newDate:function(r,e,a){return this._calendar.newDate(r??this,e,a)},year:function(r){return arguments.length===0?this._year:this.set(r,"y")},month:function(r){return arguments.length===0?this._month:this.set(r,"m")},day:function(r){return arguments.length===0?this._day:this.set(r,"d")},date:function(r,e,a){if(!this._calendar.isValid(r,e,a))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=e,this._day=a,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(r,e){return this._calendar.add(this,r,e)},set:function(r,e){return this._calendar.set(this,r,e)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(p.local.differentCalendars||p.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var e=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return e===0?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function x(){this.shortYearCutoff="+10"}g(x.prototype,{_validateLevel:0,newDate:function(r,e,a){return r==null?this.today():(r.year&&(this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),a=r.day(),e=r.month(),r=r.year()),new i(this,r,e,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){var e=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return e.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+S(Math.abs(e.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear),12},monthOfYear:function(r,e){var a=this._validate(r,e,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(r,e){var a=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,a,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth),a},daysInYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(r,e,a){var n=this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,e,a){var n=this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(r,e,a){return this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),{}},add:function(r,e,a){return this._validate(r,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,e,a),e,a)},_add:function(r,e,a){if(this._validateLevel++,a==="d"||a==="w"){var n=r.toJD()+e*(a==="w"?this.daysInWeek():1),f=r.calendar().fromJD(n);return this._validateLevel--,[f.year(),f.month(),f.day()]}try{var c=r.year()+(a==="y"?e:0),l=r.monthOfYear()+(a==="m"?e:0),f=r.day(),m=function(u){for(;lo-1+u.minMonth;)c++,l-=o,o=u.monthsInYear(c)};a==="y"?(r.month()!==this.fromMonthOfYear(c,l)&&(l=this.newDate(c,r.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(c)),f=Math.min(f,this.daysInMonth(c,this.fromMonthOfYear(c,l)))):a==="m"&&(m(this),f=Math.min(f,this.daysInMonth(c,this.fromMonthOfYear(c,l))));var v=[c,this.fromMonthOfYear(c,l),f];return this._validateLevel--,v}catch(b){throw this._validateLevel--,b}},_correctAdd:function(r,e,a,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(e[0]===0||r.year()>0!=e[0]>0)){var f={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],c=a<0?-1:1;e=this._add(r,a*f[0]+c*f[1],f[2])}return r.date(e[0],e[1],e[2])},set:function(r,e,a){this._validate(r,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate);var n=a==="y"?e:r.year(),f=a==="m"?e:r.month(),c=a==="d"?e:r.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(n,f))),r.date(n,f,c)},isValid:function(r,e,a){this._validateLevel++;var n=this.hasYearZero||r!==0;if(n){var f=this.newDate(r,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),b=f-(v>2.5?4716:4715);return b<=0&&b--,this.newDate(b,v,m)},toJSDate:function(r,e,a){var n=this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),f=new Date(n.year(),n.month()-1,n.day());return f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0),f.setHours(f.getHours()>12?f.getHours()+2:0),f},fromJSDate:function(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var p=G.exports=new C;p.cdate=i,p.baseCalendar=x,p.calendars.gregorian=h},15168:function(G,U,t){var g=t(50896),C=t(38700);g(C.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),C.local=C.regionalOptions[""],g(C.cdate.prototype,{formatDate:function(i,S){return typeof i!="string"&&(S=i,i=""),this._calendar.formatDate(i||"",this,S)}}),g(C.baseCalendar.prototype,{UNIX_EPOCH:C.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:C.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(i,S,x){if(typeof i!="string"&&(x=S,S=i,i=""),!S)return"";if(S.calendar()!==this)throw C.local.invalidFormat||C.regionalOptions[""].invalidFormat;i=i||this.local.dateFormat,x=x||{};var h=x.dayNamesShort||this.local.dayNamesShort,p=x.dayNames||this.local.dayNames,r=x.monthNumbers||this.local.monthNumbers,e=x.monthNamesShort||this.local.monthNamesShort,a=x.monthNames||this.local.monthNames;x.calculateWeek||this.local.calculateWeek;for(var n=function(A,_){for(var y=1;w+y1},f=function(A,_,y,E){var T=""+_;if(n(A,E))for(;T.length1},w=function(D,N){var I=d(D,N),k=[2,3,I?4:2,I?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],B=new RegExp("^-?\\d{1,"+k+"}"),O=S.substring(s).match(B);if(!O)throw(C.local.missingNumberAt||C.regionalOptions[""].missingNumberAt).replace(/\{0\}/,s);return s+=O[0].length,parseInt(O[0],10)},A=this,_=function(){if(typeof a=="function"){d("m");var D=a.call(A,S.substring(s));return s+=D.length,D}return w("m")},y=function(D,N,I,k){for(var B=d(D,k)?I:N,O=0;O-1){m=1,v=b;for(var z=this.daysInMonth(l,m);v>z;z=this.daysInMonth(l,m))m++,v-=z}return c>-1?this.fromJD(c):this.newDate(l,m,v)},determineDate:function(i,S,x,h,p){x&&typeof x!="object"&&(p=h,h=x,x=null),typeof h!="string"&&(p=h,h="");var r=this,e=function(a){try{return r.parseDate(h,a,p)}catch{}a=a.toLowerCase();for(var n=(a.match(/^c/)&&x?x.newDate():null)||r.today(),f=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=f.exec(a);c;)n.add(parseInt(c[1],10),c[2]||"d"),c=f.exec(a);return n};return S=S?S.newDate():null,i=i==null?S:typeof i=="string"?e(i):typeof i=="number"?isNaN(i)||i===1/0||i===-1/0?S:r.today().add(i,"d"):r.newDate(i),i}})},21576:function(){},19768:function(){},63436:function(G,U,t){var g=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],C=typeof globalThis>"u"?t.g:globalThis;G.exports=function(){for(var S=[],x=0;x>8&15|Lt>>4&240,Lt>>4&15|Lt&240,(Lt&15)<<4|Lt&15,1):Ht===8?_(Lt>>24&255,Lt>>16&255,Lt>>8&255,(Lt&255)/255):Ht===4?_(Lt>>12&15|Lt>>8&240,Lt>>8&15|Lt>>4&240,Lt>>4&15|Lt&240,((Lt&15)<<4|Lt&15)/255):null):(Lt=a.exec(mt))?new T(Lt[1],Lt[2],Lt[3],1):(Lt=n.exec(mt))?new T(Lt[1]*255/100,Lt[2]*255/100,Lt[3]*255/100,1):(Lt=f.exec(mt))?_(Lt[1],Lt[2],Lt[3],Lt[4]):(Lt=c.exec(mt))?_(Lt[1]*255/100,Lt[2]*255/100,Lt[3]*255/100,Lt[4]):(Lt=l.exec(mt))?I(Lt[1],Lt[2]/100,Lt[3]/100,1):(Lt=m.exec(mt))?I(Lt[1],Lt[2]/100,Lt[3]/100,Lt[4]):v.hasOwnProperty(mt)?A(v[mt]):mt==="transparent"?new T(NaN,NaN,NaN,0):null}function A(mt){return new T(mt>>16&255,mt>>8&255,mt&255,1)}function _(mt,Lt,Ht,Ut){return Ut<=0&&(mt=Lt=Ht=NaN),new T(mt,Lt,Ht,Ut)}function y(mt){return mt instanceof i||(mt=w(mt)),mt?(mt=mt.rgb(),new T(mt.r,mt.g,mt.b,mt.opacity)):new T}function E(mt,Lt,Ht,Ut){return arguments.length===1?y(mt):new T(mt,Lt,Ht,Ut??1)}function T(mt,Lt,Ht,Ut){this.r=+mt,this.g=+Lt,this.b=+Ht,this.opacity=+Ut}g(T,E,C(i,{brighter:function(Lt){return Lt=Lt==null?x:Math.pow(x,Lt),new T(this.r*Lt,this.g*Lt,this.b*Lt,this.opacity)},darker:function(Lt){return Lt=Lt==null?S:Math.pow(S,Lt),new T(this.r*Lt,this.g*Lt,this.b*Lt,this.opacity)},rgb:function(){return this},clamp:function(){return new T(D(this.r),D(this.g),D(this.b),z(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:s,formatHex:s,formatHex8:L,formatRgb:M,toString:M}));function s(){return"#".concat(N(this.r)).concat(N(this.g)).concat(N(this.b))}function L(){return"#".concat(N(this.r)).concat(N(this.g)).concat(N(this.b)).concat(N((isNaN(this.opacity)?1:this.opacity)*255))}function M(){var mt=z(this.opacity);return"".concat(mt===1?"rgb(":"rgba(").concat(D(this.r),", ").concat(D(this.g),", ").concat(D(this.b)).concat(mt===1?")":", ".concat(mt,")"))}function z(mt){return isNaN(mt)?1:Math.max(0,Math.min(1,mt))}function D(mt){return Math.max(0,Math.min(255,Math.round(mt)||0))}function N(mt){return mt=D(mt),(mt<16?"0":"")+mt.toString(16)}function I(mt,Lt,Ht,Ut){return Ut<=0?mt=Lt=Ht=NaN:Ht<=0||Ht>=1?mt=Lt=NaN:Lt<=0&&(mt=NaN),new O(mt,Lt,Ht,Ut)}function k(mt){if(mt instanceof O)return new O(mt.h,mt.s,mt.l,mt.opacity);if(mt instanceof i||(mt=w(mt)),!mt)return new O;if(mt instanceof O)return mt;mt=mt.rgb();var Lt=mt.r/255,Ht=mt.g/255,Ut=mt.b/255,kt=Math.min(Lt,Ht,Ut),Vt=Math.max(Lt,Ht,Ut),It=NaN,re=Vt-kt,Kt=(Vt+kt)/2;return re?(Lt===Vt?It=(Ht-Ut)/re+(Ht0&&Kt<1?0:It,new O(It,re,Kt,mt.opacity)}function B(mt,Lt,Ht,Ut){return arguments.length===1?k(mt):new O(mt,Lt,Ht,Ut??1)}function O(mt,Lt,Ht,Ut){this.h=+mt,this.s=+Lt,this.l=+Ht,this.opacity=+Ut}g(O,B,C(i,{brighter:function(Lt){return Lt=Lt==null?x:Math.pow(x,Lt),new O(this.h,this.s,this.l*Lt,this.opacity)},darker:function(Lt){return Lt=Lt==null?S:Math.pow(S,Lt),new O(this.h,this.s,this.l*Lt,this.opacity)},rgb:function(){var Lt=this.h%360+(this.h<0)*360,Ht=isNaN(Lt)||isNaN(this.s)?0:this.s,Ut=this.l,kt=Ut+(Ut<.5?Ut:1-Ut)*Ht,Vt=2*Ut-kt;return new T(j(Lt>=240?Lt-240:Lt+120,Vt,kt),j(Lt,Vt,kt),j(Lt<120?Lt+240:Lt-120,Vt,kt),this.opacity)},clamp:function(){return new O(H(this.h),Y(this.s),Y(this.l),z(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var Lt=z(this.opacity);return"".concat(Lt===1?"hsl(":"hsla(").concat(H(this.h),", ").concat(Y(this.s)*100,"%, ").concat(Y(this.l)*100,"%").concat(Lt===1?")":", ".concat(Lt,")"))}}));function H(mt){return mt=(mt||0)%360,mt<0?mt+360:mt}function Y(mt){return Math.max(0,Math.min(1,mt||0))}function j(mt,Lt,Ht){return(mt<60?Lt+(Ht-Lt)*mt/60:mt<180?Ht:mt<240?Lt+(Ht-Lt)*(240-mt)/60:Lt)*255}var et=function(mt){return function(){return mt}};function it(mt,Lt){return function(Ht){return mt+Ht*Lt}}function ut(mt,Lt,Ht){return mt=Math.pow(mt,Ht),Lt=Math.pow(Lt,Ht)-mt,Ht=1/Ht,function(Ut){return Math.pow(mt+Ut*Lt,Ht)}}function J(mt){return(mt=+mt)==1?X:function(Lt,Ht){return Ht-Lt?ut(Lt,Ht,mt):et(isNaN(Lt)?Ht:Lt)}}function X(mt,Lt){var Ht=Lt-mt;return Ht?it(mt,Ht):et(isNaN(mt)?Lt:mt)}var tt=function mt(Lt){var Ht=J(Lt);function Ut(kt,Vt){var It=Ht((kt=E(kt)).r,(Vt=E(Vt)).r),re=Ht(kt.g,Vt.g),Kt=Ht(kt.b,Vt.b),$t=X(kt.opacity,Vt.opacity);return function(le){return kt.r=It(le),kt.g=re(le),kt.b=Kt(le),kt.opacity=$t(le),kt+""}}return Ut.gamma=mt,Ut}(1);function V(mt,Lt){var Ht=Lt?Lt.length:0,Ut=mt?Math.min(Ht,mt.length):0,kt=new Array(Ut),Vt=new Array(Ht),It;for(It=0;ItHt&&(Vt=Lt.slice(Ht,Vt),re[It]?re[It]+=Vt:re[++It]=Vt),(Ut=Ut[0])===(kt=kt[0])?re[It]?re[It]+=kt:re[++It]=kt:(re[++It]=null,Kt.push({i:It,x:ot(Ut,kt)})),Ht=nt.lastIndex;return Htt+1e3&&(C.update(1e3*g/(x-t),100),t=x,g=0,S)){var h=performance.memory;S.update(h.usedJSHeapSize/1048576,h.jsHeapSizeLimit/1048576)}return x},update:function(){U=this.end()},domElement:G,setMode:Dt}};return q.Panel=function(lt,Dt,Zt){var G=1/0,U=0,t=Math.round,g=t(window.devicePixelRatio||1),C=80*g,i=48*g,S=3*g,x=2*g,h=3*g,p=15*g,r=74*g,e=30*g,a=document.createElement("canvas");a.width=C,a.height=i,a.style.cssText="width:80px;height:48px";var n=a.getContext("2d");return n.font="bold "+9*g+"px Helvetica,Arial,sans-serif",n.textBaseline="top",n.fillStyle=Zt,n.fillRect(0,0,C,i),n.fillStyle=Dt,n.fillText(lt,S,x),n.fillRect(h,p,r,e),n.fillStyle=Zt,n.globalAlpha=.9,n.fillRect(h,p,r,e),{dom:a,update:function(f,c){G=Math.min(G,f),U=Math.max(U,f),n.fillStyle=Zt,n.globalAlpha=1,n.fillRect(0,0,C,p),n.fillStyle=Dt,n.fillText(t(f)+" "+lt+" ("+t(G)+"-"+t(U)+")",S,x),n.drawImage(a,h+g,p,r-g,e,h,p,r-g,e),n.fillRect(h+r-g,p,g,e),n.fillStyle=Zt,n.globalAlpha=.9,n.fillRect(h+r-g,p,g,t((1-f/c)*e))}}},q})})(E1);var SS=E1.exports;const bp=By(SS),ky={type:"change"},R0={type:"start"},Oy={type:"end"},rp=new $v,Ny=new fc,ES=Math.cos(70*$w.DEG2RAD);class _1 extends nh{constructor(F,q){super(),this.object=F,this.domElement=q,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new bn,this.cursor=new bn,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Rh.ROTATE,MIDDLE:Rh.DOLLY,RIGHT:Rh.PAN},this.touches={ONE:Dh.ROTATE,TWO:Dh.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return U.phi},this.getAzimuthalAngle=function(){return U.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(It){It.addEventListener("keydown",wt),this._domElementKeyEvents=It},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",wt),this._domElementKeyEvents=null},this.saveState=function(){lt.target0.copy(lt.target),lt.position0.copy(lt.object.position),lt.zoom0=lt.object.zoom},this.reset=function(){lt.target.copy(lt.target0),lt.object.position.copy(lt.position0),lt.object.zoom=lt.zoom0,lt.object.updateProjectionMatrix(),lt.dispatchEvent(ky),lt.update(),Zt=Dt.NONE},this.update=function(){const It=new bn,re=new ku().setFromUnitVectors(F.up,new bn(0,1,0)),Kt=re.clone().invert(),$t=new bn,le=new ku,he=new bn,de=2*Math.PI;return function(Se=null){const ne=lt.object.position;It.copy(ne).sub(lt.target),It.applyQuaternion(re),U.setFromVector3(It),lt.autoRotate&&Zt===Dt.NONE&&d(u(Se)),lt.enableDamping?(U.theta+=t.theta*lt.dampingFactor,U.phi+=t.phi*lt.dampingFactor):(U.theta+=t.theta,U.phi+=t.phi);let zt=lt.minAzimuthAngle,Xt=lt.maxAzimuthAngle;isFinite(zt)&&isFinite(Xt)&&(zt<-Math.PI?zt+=de:zt>Math.PI&&(zt-=de),Xt<-Math.PI?Xt+=de:Xt>Math.PI&&(Xt-=de),zt<=Xt?U.theta=Math.max(zt,Math.min(Xt,U.theta)):U.theta=U.theta>(zt+Xt)/2?Math.max(zt,U.theta):Math.min(Xt,U.theta)),U.phi=Math.max(lt.minPolarAngle,Math.min(lt.maxPolarAngle,U.phi)),U.makeSafe(),lt.enableDamping===!0?lt.target.addScaledVector(C,lt.dampingFactor):lt.target.add(C),lt.target.sub(lt.cursor),lt.target.clampLength(lt.minTargetRadius,lt.maxTargetRadius),lt.target.add(lt.cursor);let Jt=!1;if(lt.zoomToCursor&&l||lt.object.isOrthographicCamera)U.radius=L(U.radius);else{const Wt=U.radius;U.radius=L(U.radius*g),Jt=Wt!=U.radius}if(It.setFromSpherical(U),It.applyQuaternion(Kt),ne.copy(lt.target).add(It),lt.object.lookAt(lt.target),lt.enableDamping===!0?(t.theta*=1-lt.dampingFactor,t.phi*=1-lt.dampingFactor,C.multiplyScalar(1-lt.dampingFactor)):(t.set(0,0,0),C.set(0,0,0)),lt.zoomToCursor&&l){let Wt=null;if(lt.object.isPerspectiveCamera){const Ft=It.length();Wt=L(Ft*g);const xt=Ft-Wt;lt.object.position.addScaledVector(f,xt),lt.object.updateMatrixWorld(),Jt=!!xt}else if(lt.object.isOrthographicCamera){const Ft=new bn(c.x,c.y,0);Ft.unproject(lt.object);const xt=lt.object.zoom;lt.object.zoom=Math.max(lt.minZoom,Math.min(lt.maxZoom,lt.object.zoom/g)),lt.object.updateProjectionMatrix(),Jt=xt!==lt.object.zoom;const yt=new bn(c.x,c.y,0);yt.unproject(lt.object),lt.object.position.sub(yt).add(Ft),lt.object.updateMatrixWorld(),Wt=It.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),lt.zoomToCursor=!1;Wt!==null&&(this.screenSpacePanning?lt.target.set(0,0,-1).transformDirection(lt.object.matrix).multiplyScalar(Wt).add(lt.object.position):(rp.origin.copy(lt.object.position),rp.direction.set(0,0,-1).transformDirection(lt.object.matrix),Math.abs(lt.object.up.dot(rp.direction))G||8*(1-le.dot(lt.object.quaternion))>G||he.distanceToSquared(lt.target)>G?(lt.dispatchEvent(ky),$t.copy(lt.object.position),le.copy(lt.object.quaternion),he.copy(lt.target),!0):!1}}(),this.dispose=function(){lt.domElement.removeEventListener("contextmenu",At),lt.domElement.removeEventListener("pointerdown",Q),lt.domElement.removeEventListener("pointercancel",$),lt.domElement.removeEventListener("wheel",nt),lt.domElement.removeEventListener("pointermove",ot),lt.domElement.removeEventListener("pointerup",$),lt.domElement.getRootNode().removeEventListener("keydown",gt,{capture:!0}),lt._domElementKeyEvents!==null&&(lt._domElementKeyEvents.removeEventListener("keydown",wt),lt._domElementKeyEvents=null)};const lt=this,Dt={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let Zt=Dt.NONE;const G=1e-6,U=new Fy,t=new Fy;let g=1;const C=new bn,i=new Wi,S=new Wi,x=new Wi,h=new Wi,p=new Wi,r=new Wi,e=new Wi,a=new Wi,n=new Wi,f=new bn,c=new Wi;let l=!1;const m=[],v={};let b=!1;function u(It){return It!==null?2*Math.PI/60*lt.autoRotateSpeed*It:2*Math.PI/60/60*lt.autoRotateSpeed}function o(It){const re=Math.abs(It*.01);return Math.pow(.95,lt.zoomSpeed*re)}function d(It){t.theta-=It}function w(It){t.phi-=It}const A=function(){const It=new bn;return function(Kt,$t){It.setFromMatrixColumn($t,0),It.multiplyScalar(-Kt),C.add(It)}}(),_=function(){const It=new bn;return function(Kt,$t){lt.screenSpacePanning===!0?It.setFromMatrixColumn($t,1):(It.setFromMatrixColumn($t,0),It.crossVectors(lt.object.up,It)),It.multiplyScalar(Kt),C.add(It)}}(),y=function(){const It=new bn;return function(Kt,$t){const le=lt.domElement;if(lt.object.isPerspectiveCamera){const he=lt.object.position;It.copy(he).sub(lt.target);let de=It.length();de*=Math.tan(lt.object.fov/2*Math.PI/180),A(2*Kt*de/le.clientHeight,lt.object.matrix),_(2*$t*de/le.clientHeight,lt.object.matrix)}else lt.object.isOrthographicCamera?(A(Kt*(lt.object.right-lt.object.left)/lt.object.zoom/le.clientWidth,lt.object.matrix),_($t*(lt.object.top-lt.object.bottom)/lt.object.zoom/le.clientHeight,lt.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),lt.enablePan=!1)}}();function E(It){lt.object.isPerspectiveCamera||lt.object.isOrthographicCamera?g/=It:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),lt.enableZoom=!1)}function T(It){lt.object.isPerspectiveCamera||lt.object.isOrthographicCamera?g*=It:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),lt.enableZoom=!1)}function s(It,re){if(!lt.zoomToCursor)return;l=!0;const Kt=lt.domElement.getBoundingClientRect(),$t=It-Kt.left,le=re-Kt.top,he=Kt.width,de=Kt.height;c.x=$t/he*2-1,c.y=-(le/de)*2+1,f.set(c.x,c.y,1).unproject(lt.object).sub(lt.object.position).normalize()}function L(It){return Math.max(lt.minDistance,Math.min(lt.maxDistance,It))}function M(It){i.set(It.clientX,It.clientY)}function z(It){s(It.clientX,It.clientX),e.set(It.clientX,It.clientY)}function D(It){h.set(It.clientX,It.clientY)}function N(It){S.set(It.clientX,It.clientY),x.subVectors(S,i).multiplyScalar(lt.rotateSpeed);const re=lt.domElement;d(2*Math.PI*x.x/re.clientHeight),w(2*Math.PI*x.y/re.clientHeight),i.copy(S),lt.update()}function I(It){a.set(It.clientX,It.clientY),n.subVectors(a,e),n.y>0?E(o(n.y)):n.y<0&&T(o(n.y)),e.copy(a),lt.update()}function k(It){p.set(It.clientX,It.clientY),r.subVectors(p,h).multiplyScalar(lt.panSpeed),y(r.x,r.y),h.copy(p),lt.update()}function B(It){s(It.clientX,It.clientY),It.deltaY<0?T(o(It.deltaY)):It.deltaY>0&&E(o(It.deltaY)),lt.update()}function O(It){let re=!1;switch(It.code){case lt.keys.UP:It.ctrlKey||It.metaKey||It.shiftKey?w(2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(0,lt.keyPanSpeed),re=!0;break;case lt.keys.BOTTOM:It.ctrlKey||It.metaKey||It.shiftKey?w(-2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(0,-lt.keyPanSpeed),re=!0;break;case lt.keys.LEFT:It.ctrlKey||It.metaKey||It.shiftKey?d(2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(lt.keyPanSpeed,0),re=!0;break;case lt.keys.RIGHT:It.ctrlKey||It.metaKey||It.shiftKey?d(-2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(-lt.keyPanSpeed,0),re=!0;break}re&&(It.preventDefault(),lt.update())}function H(It){if(m.length===1)i.set(It.pageX,It.pageY);else{const re=kt(It),Kt=.5*(It.pageX+re.x),$t=.5*(It.pageY+re.y);i.set(Kt,$t)}}function Y(It){if(m.length===1)h.set(It.pageX,It.pageY);else{const re=kt(It),Kt=.5*(It.pageX+re.x),$t=.5*(It.pageY+re.y);h.set(Kt,$t)}}function j(It){const re=kt(It),Kt=It.pageX-re.x,$t=It.pageY-re.y,le=Math.sqrt(Kt*Kt+$t*$t);e.set(0,le)}function et(It){lt.enableZoom&&j(It),lt.enablePan&&Y(It)}function it(It){lt.enableZoom&&j(It),lt.enableRotate&&H(It)}function ut(It){if(m.length==1)S.set(It.pageX,It.pageY);else{const Kt=kt(It),$t=.5*(It.pageX+Kt.x),le=.5*(It.pageY+Kt.y);S.set($t,le)}x.subVectors(S,i).multiplyScalar(lt.rotateSpeed);const re=lt.domElement;d(2*Math.PI*x.x/re.clientHeight),w(2*Math.PI*x.y/re.clientHeight),i.copy(S)}function J(It){if(m.length===1)p.set(It.pageX,It.pageY);else{const re=kt(It),Kt=.5*(It.pageX+re.x),$t=.5*(It.pageY+re.y);p.set(Kt,$t)}r.subVectors(p,h).multiplyScalar(lt.panSpeed),y(r.x,r.y),h.copy(p)}function X(It){const re=kt(It),Kt=It.pageX-re.x,$t=It.pageY-re.y,le=Math.sqrt(Kt*Kt+$t*$t);a.set(0,le),n.set(0,Math.pow(a.y/e.y,lt.zoomSpeed)),E(n.y),e.copy(a);const he=(It.pageX+re.x)*.5,de=(It.pageY+re.y)*.5;s(he,de)}function tt(It){lt.enableZoom&&X(It),lt.enablePan&&J(It)}function V(It){lt.enableZoom&&X(It),lt.enableRotate&&ut(It)}function Q(It){lt.enabled!==!1&&(m.length===0&&(lt.domElement.setPointerCapture(It.pointerId),lt.domElement.addEventListener("pointermove",ot),lt.domElement.addEventListener("pointerup",$)),!Ht(It)&&(mt(It),It.pointerType==="touch"?Rt(It):Z(It)))}function ot(It){lt.enabled!==!1&&(It.pointerType==="touch"?bt(It):st(It))}function $(It){switch(Lt(It),m.length){case 0:lt.domElement.releasePointerCapture(It.pointerId),lt.domElement.removeEventListener("pointermove",ot),lt.domElement.removeEventListener("pointerup",$),lt.dispatchEvent(Oy),Zt=Dt.NONE;break;case 1:const re=m[0],Kt=v[re];Rt({pointerId:re,pageX:Kt.x,pageY:Kt.y});break}}function Z(It){let re;switch(It.button){case 0:re=lt.mouseButtons.LEFT;break;case 1:re=lt.mouseButtons.MIDDLE;break;case 2:re=lt.mouseButtons.RIGHT;break;default:re=-1}switch(re){case Rh.DOLLY:if(lt.enableZoom===!1)return;z(It),Zt=Dt.DOLLY;break;case Rh.ROTATE:if(It.ctrlKey||It.metaKey||It.shiftKey){if(lt.enablePan===!1)return;D(It),Zt=Dt.PAN}else{if(lt.enableRotate===!1)return;M(It),Zt=Dt.ROTATE}break;case Rh.PAN:if(It.ctrlKey||It.metaKey||It.shiftKey){if(lt.enableRotate===!1)return;M(It),Zt=Dt.ROTATE}else{if(lt.enablePan===!1)return;D(It),Zt=Dt.PAN}break;default:Zt=Dt.NONE}Zt!==Dt.NONE&<.dispatchEvent(R0)}function st(It){switch(Zt){case Dt.ROTATE:if(lt.enableRotate===!1)return;N(It);break;case Dt.DOLLY:if(lt.enableZoom===!1)return;I(It);break;case Dt.PAN:if(lt.enablePan===!1)return;k(It);break}}function nt(It){lt.enabled===!1||lt.enableZoom===!1||Zt!==Dt.NONE||(It.preventDefault(),lt.dispatchEvent(R0),B(ct(It)),lt.dispatchEvent(Oy))}function ct(It){const re=It.deltaMode,Kt={clientX:It.clientX,clientY:It.clientY,deltaY:It.deltaY};switch(re){case 1:Kt.deltaY*=16;break;case 2:Kt.deltaY*=100;break}return It.ctrlKey&&!b&&(Kt.deltaY*=10),Kt}function gt(It){It.key==="Control"&&(b=!0,lt.domElement.getRootNode().addEventListener("keyup",Tt,{passive:!0,capture:!0}))}function Tt(It){It.key==="Control"&&(b=!1,lt.domElement.getRootNode().removeEventListener("keyup",Tt,{passive:!0,capture:!0}))}function wt(It){lt.enabled===!1||lt.enablePan===!1||O(It)}function Rt(It){switch(Ut(It),m.length){case 1:switch(lt.touches.ONE){case Dh.ROTATE:if(lt.enableRotate===!1)return;H(It),Zt=Dt.TOUCH_ROTATE;break;case Dh.PAN:if(lt.enablePan===!1)return;Y(It),Zt=Dt.TOUCH_PAN;break;default:Zt=Dt.NONE}break;case 2:switch(lt.touches.TWO){case Dh.DOLLY_PAN:if(lt.enableZoom===!1&<.enablePan===!1)return;et(It),Zt=Dt.TOUCH_DOLLY_PAN;break;case Dh.DOLLY_ROTATE:if(lt.enableZoom===!1&<.enableRotate===!1)return;it(It),Zt=Dt.TOUCH_DOLLY_ROTATE;break;default:Zt=Dt.NONE}break;default:Zt=Dt.NONE}Zt!==Dt.NONE&<.dispatchEvent(R0)}function bt(It){switch(Ut(It),Zt){case Dt.TOUCH_ROTATE:if(lt.enableRotate===!1)return;ut(It),lt.update();break;case Dt.TOUCH_PAN:if(lt.enablePan===!1)return;J(It),lt.update();break;case Dt.TOUCH_DOLLY_PAN:if(lt.enableZoom===!1&<.enablePan===!1)return;tt(It),lt.update();break;case Dt.TOUCH_DOLLY_ROTATE:if(lt.enableZoom===!1&<.enableRotate===!1)return;V(It),lt.update();break;default:Zt=Dt.NONE}}function At(It){lt.enabled!==!1&&It.preventDefault()}function mt(It){m.push(It.pointerId)}function Lt(It){delete v[It.pointerId];for(let re=0;re=0?(p.material.opacity=1,a.material.opacity=.5):(p.material.opacity=.5,a.material.opacity=1),c.y>=0?(r.material.opacity=1,n.material.opacity=.5):(r.material.opacity=.5,n.material.opacity=1),c.z>=0?(e.material.opacity=1,f.material.opacity=.5):(e.material.opacity=.5,f.material.opacity=1);const T=q.offsetWidth-l;E.clearDepth(),E.getViewport(d),E.setViewport(T,0,l,l),E.render(this,C),E.setViewport(d.x,d.y,d.z,d.w)};const v=new bn,b=new ku,u=new ku,o=new ku,d=new No;let w=0;this.handleClick=function(E){if(this.animating===!0)return!1;const T=q.getBoundingClientRect(),s=T.left+(q.offsetWidth-l),L=T.top+(q.offsetHeight-l);t.x=(E.clientX-s)/(T.right-s)*2-1,t.y=-((E.clientY-L)/(T.bottom-L))*2+1,U.setFromCamera(t,C);const M=U.intersectObjects(G);if(M.length>0){const D=M[0].object;return A(D,this.center),this.animating=!0,!0}else return!1},this.update=function(E){const T=E*m;u.rotateTowards(o,T),F.position.set(0,0,1).applyQuaternion(u).multiplyScalar(w).add(this.center),F.quaternion.rotateTowards(b,T),u.angleTo(o)===0&&(this.animating=!1)},this.dispose=function(){i.dispose(),S.material.dispose(),x.material.dispose(),h.material.dispose(),p.material.map.dispose(),r.material.map.dispose(),e.material.map.dispose(),a.material.map.dispose(),n.material.map.dispose(),f.material.map.dispose(),p.material.dispose(),r.material.dispose(),e.material.dispose(),a.material.dispose(),n.material.dispose(),f.material.dispose()};function A(E,T){switch(E.userData.type){case"posX":v.set(1,0,0),b.setFromEuler(new Ss(0,Math.PI*.5,0));break;case"posY":v.set(0,1,0),b.setFromEuler(new Ss(-Math.PI*.5,0,0));break;case"posZ":v.set(0,0,1),b.setFromEuler(new Ss);break;case"negX":v.set(-1,0,0),b.setFromEuler(new Ss(0,-Math.PI*.5,0));break;case"negY":v.set(0,-1,0),b.setFromEuler(new Ss(Math.PI*.5,0,0));break;case"negZ":v.set(0,0,-1),b.setFromEuler(new Ss(0,Math.PI,0));break;default:console.error("ViewHelper: Invalid axis.")}w=F.position.distanceTo(T),v.multiplyScalar(w).add(T),g.position.copy(T),g.lookAt(F.position),u.copy(g.quaternion),g.lookAt(v),o.copy(g.quaternion)}function _(E){return new qv({color:E,toneMapped:!1})}function y(E,T=null){const s=document.createElement("canvas");s.width=64,s.height=64;const L=s.getContext("2d");L.beginPath(),L.arc(32,32,16,0,2*Math.PI),L.closePath(),L.fillStyle=E.getStyle(),L.fill(),T!==null&&(L.font="24px Arial",L.textAlign="center",L.fillStyle="#000000",L.fillText(T,32,41));const M=new fS(s);return new y1({map:M,toneMapped:!1})}}}class L1{constructor(F,q){this.data={x:[],y:[],mode:"markers",marker:{size:1,color:"white"}},this.data.marker.color=q,this.trailLength=0,this.maxTrailLength=F,this.trailInd=0}addTrail(F,q){this.trailLength{Zt===!1&&this.universeTrails.forEach(G=>G.popAllTrails()),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt){if(this.divId!==""){console.error(F,"Simulation already playing. Stop the current playtime before initiating a new one.");return}this.divId=F;let Dt=document.getElementById(F);if(Dt===null)return;let Zt=0,G=0;this.simulation.universes.forEach(p=>p.currState.bodies.forEach(r=>{Zt=Math.max(Zt,Math.abs(r.position.x)),G=Math.max(G,Math.abs(r.position.y))}));const U=.5*Math.min(lt/G,q/Zt),t={paper_bgcolor:"#000000",plot_bgcolor:"#000000",font:{color:"#bfbfbf"},xaxis:{autorange:!1,range:[-(q/2)/U,q/2/U]},yaxis:{autorange:!1,range:[-(lt/2)/U,lt/2/U]},showlegend:!1,width:q,height:lt};this.simulation.controller==="ui"&&this.addControls(Dt),this.simulation.showDebugInfo&&(this.stats=new bp,this.stats.dom.style.position="absolute",this.stats.dom.style.bottom="0px",this.stats.dom.style.removeProperty("top"),Dt.appendChild(this.stats.dom));const g=this.simulation.universes.flatMap(p=>{const r=new L1(this.simulation.getMaxTrailLength(),typeof p.color=="string"?p.color:p.color[0]);this.universeTrails.push(r);const e={x:p.currState.bodies.map(a=>a.position.x),y:p.currState.bodies.map(a=>a.position.y),type:"scatter",mode:"markers",marker:{color:p.color,sizemin:5,size:p.currState.bodies.map(a=>a.radius*p.radiusScale)}};return this.simulation.getShowTrails()?(p.currState.bodies.forEach(a=>{r.addTrail(a.position.x,a.position.y)}),[e,r.data]):[e,{x:[],y:[]}]});ov.newPlot(F,g,t,{scrollZoom:!0,modeBarButtonsToRemove:["lasso2d","select2d","toImage","resetScale2d"]});const C=1e3/this.simulation.maxFrameRate;let i=0,S=0;const x=p=>{this.simulation.simulateStep(this.simulation.controls.speed*Math.min(p-S,33.33)/1e3),S=p},h=p=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(h);return}if(x(p),C>0&&p-i{if(!this.simulation.getShowUniverse(e.label))return[{x:[],y:[]},{}];const n={x:e.currState.bodies.map(c=>c.position.x),y:e.currState.bodies.map(c=>c.position.y),hovertext:e.currState.bodies.map(c=>c.label),marker:{color:e.color,size:e.currState.bodies.map(c=>c.radius*e.radiusScale),sizemin:5},mode:"markers"};let f={};if(this.simulation.getShowTrails()){const c=this.universeTrails[a];e.currState.bodies.forEach(l=>{c.addTrail(l.position.x,l.position.y)}),f=c.data}return[n,f]});ov.react(F,r,t),this.simulation.showDebugInfo&&this.stats&&this.stats.update(),this.animationId=requestAnimationFrame(h)};this.animationId=requestAnimationFrame(h)}clearTrails(F){F===void 0?this.universeTrails.forEach(q=>q.popAllTrails()):this.universeTrails[F].popAllTrails()}stop(){var F;if(this.animationId!==null){cancelAnimationFrame(this.animationId),this.universeTrails=[],this.removeControls(),(F=this.stats)==null||F.dom.remove();try{ov.purge(this.divId)}catch{}}}}class P1{constructor(F,q,lt,Dt){const Zt=new Ys;Zt.setAttribute("position",new Ws(new Float32Array(0),3)),this.trails=new uS(Zt,new b1({color:q,size:.005*Dt})),lt.add(this.trails),this.trailInd=0,this.trailLength=0,this.maxTrailLength=F}addTrail(F){if(this.trailLength{},this.universeTrails=[],this.simulation=F}addControls(F){const q=new vv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const lt=this.simulation.controls;q.add(lt,"speed"),q.add(lt,"showTrails").onChange(Zt=>{Zt===!1&&this.universeTrails.forEach(G=>{G.popAllTrails()}),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt){if(this.scene!==void 0){console.error(F,"Simulation already playing. Stop the current playtime before initiating a new one.");return}let Dt=document.getElementById(F);if(Dt===null)return;Dt.style.position="relative";let Zt=0;this.simulation.universes.forEach(a=>a.currState.bodies.forEach(n=>{for(let f=0;f<3;f++)Zt=Math.max(Zt,Math.abs(n.position.getComponent(f)))}));const G=.5*Math.min(lt,q)/Zt;this.scene=new m1;const U=new pp(q/-2,q/2,lt/2,lt/-2,0,1e10);U.position.set(0,0,Math.max(q,lt));const t=new g1;t.setSize(q,lt),t.autoClear=!1,Dt.appendChild(t.domElement),this.simulation.showDebugInfo&&(this.stats=new bp,this.stats.dom.style.position="absolute",this.stats.dom.style.right="0px",this.stats.dom.style.removeProperty("left"),Dt.appendChild(this.stats.dom)),this.simulation.controller==="ui"&&this.addControls(Dt);const g=new _1(U,t.domElement);g.listenToKeyEvents(window),g.update();const C=new T1(q);this.scene.add(C);const i=new C1(U,t.domElement);let S=[];this.simulation.universes.forEach(a=>{this.universeTrails.push(new P1(this.simulation.maxTrailLength,typeof a.color=="string"?a.color:a.color[0],this.scene,G)),a.currState.bodies.forEach((n,f)=>{const c=new yp(n.radius*G*a.radiusScale,12,12),l=new rv;l.add(new j0(new w1(c),new mp({color:new ha(typeof a.color=="string"?a.color:a.color[f]),transparent:!0,opacity:.4}))),l.add(new Vs(c,new qv({color:new ha(typeof a.color=="string"?a.color:a.color[f]),transparent:!0,opacity:.5,side:Nu}))),this.scene.add(l),l.position.copy(n.position.clone().multiplyScalar(G)),S.push(l)})});const x=1e3/this.simulation.maxFrameRate;let h=performance.now(),p=performance.now();const r=a=>{this.simulation.simulateStep(this.simulation.controls.speed*Math.min(a-h,16.67)/1e3),h=a},e=a=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(e),t.clear(),t.render(this.scene,U),i.render(t),g.update();return}if(r(a),x>0&&a-p{this.simulation.controls.showUniverse[f.label]?f.currState.bodies.forEach(l=>{S[n].visible=!0,S[n].position.copy(l.position.clone().multiplyScalar(G)),this.simulation.controls.showTrails&&this.universeTrails[c].addTrail(S[n].position.clone()),n++}):f.currState.bodies.forEach(l=>{S[n].visible=!1,n++})}),this.animationId=requestAnimationFrame(e),t.clear(),t.render(this.scene,U),i.render(t),g.update()};this.clear=()=>{t.clear(),t.dispose(),S.forEach(a=>{a.children.forEach(n=>{n.geometry.dispose(),n.material.dispose()})}),t.domElement.remove()},this.animationId=requestAnimationFrame(e)}clearTrails(F){F===void 0?this.universeTrails.forEach(q=>q.popAllTrails()):this.universeTrails[F].popAllTrails()}stop(){var F,q;this.animationId!==null&&(cancelAnimationFrame(this.animationId),(F=this.scene)==null||F.clear(),this.scene=void 0,this.clear(),this.clear=()=>{},this.universeTrails.forEach(lt=>{lt.popAllTrails()}),this.universeTrails=[],this.removeControls(),(q=this.stats)==null||q.dom.remove())}}class LS{constructor(F){this.animationId=null,this.divId="",this.universeTrails=[],this.simulation=F}addControls(F){const q=new vv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const lt=this.simulation.controls;q.add(lt,"speed"),q.add(lt,"showTrails").onChange(Zt=>{Zt===!1&&this.universeTrails.forEach(G=>G.popAllTrails()),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt,Dt,Zt){if(this.divId!==""){console.error("Simulation already playing. Stop the current playtime before initiating a new one.");return}this.divId=F;let G=document.getElementById(F);if(G===null)return;let U=0,t=0;this.simulation.universes.forEach(r=>r.currState.bodies.forEach(e=>{U=Math.max(U,Math.abs(e.position.x)),t=Math.max(t,Math.abs(e.position.y))}));const g=.5*Math.min(lt/t,q/U),C=[],i=this.simulation.maxFrameRate*Dt;let S=1;this.simulation.universes.forEach(r=>{C.push([r.currState.clone()])});for(let r=0;r{C[a].push(e.currState.clone())});const x={paper_bgcolor:"#000000",plot_bgcolor:"#000000",font:{color:"#bfbfbf"},xaxis:{autorange:!1,range:[-(q/2)/g,q/2/g]},yaxis:{autorange:!1,range:[-(lt/2)/g,lt/2/g]},showlegend:!1,width:q,height:lt};this.simulation.controller==="ui"&&this.addControls(G),this.simulation.showDebugInfo&&(this.stats=new bp,this.stats.dom.style.position="absolute",this.stats.dom.style.bottom="0px",this.stats.dom.style.removeProperty("top"),G.appendChild(this.stats.dom));const h=this.simulation.universes.flatMap(r=>{const e=new L1(this.simulation.getMaxTrailLength(),typeof r.color=="string"?r.color:r.color[0]);this.universeTrails.push(e);const a={x:r.currState.bodies.map(n=>n.position.x),y:r.currState.bodies.map(n=>n.position.y),type:"scatter",mode:"markers",marker:{color:r.color,sizemin:5,size:r.currState.bodies.map(n=>n.radius*r.radiusScale)}};return this.simulation.getShowTrails()?(r.currState.bodies.forEach(n=>{e.addTrail(n.position.x,n.position.y)}),[a,e.data]):[a,{x:[],y:[]}]});ov.newPlot(F,h,x,{scrollZoom:!0,modeBarButtonsToRemove:["zoom2d","lasso2d","select2d","toImage","resetScale2d"]});const p=r=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(p);return}const e=Math.round(S),a=this.simulation.universes.flatMap((n,f)=>{if(!this.simulation.getShowUniverse(n.label))return[{x:[],y:[]},{}];const c=C[f][e],l={x:c.bodies.map(v=>v.position.x),y:c.bodies.map(v=>v.position.y),hovertext:c.bodies.map(v=>v.label),marker:{color:n.color,sizemin:5,size:n.currState.bodies.map(v=>v.radius*n.radiusScale)},mode:"markers"};let m={};if(this.simulation.getShowTrails()){const v=this.universeTrails[f];c.bodies.forEach(b=>{v.addTrail(b.position.x,b.position.y)}),m=v.data}return[l,m]});ov.react(F,a,x),this.simulation.showDebugInfo&&this.stats&&this.stats.update(),S=Math.round(S+this.simulation.controls.speed),S<0?this.simulation.looped?S=(S%i+i)%i:S=0:S>=i&&(this.simulation.looped?S%=i:S=i-1),this.animationId=requestAnimationFrame(p)};this.animationId=requestAnimationFrame(p)}clearTrails(F){F===void 0?this.universeTrails.forEach(q=>q.popAllTrails()):this.universeTrails[F].popAllTrails()}stop(){var F;if(this.animationId!==null){cancelAnimationFrame(this.animationId),this.divId="",this.universeTrails=[];try{ov.purge(this.divId)}catch{}this.removeControls(),(F=this.stats)==null||F.dom.remove()}}}class PS{constructor(F){this.animationId=null,this.clear=()=>{},this.universeTrails=[],this.simulation=F}addControls(F){const q=new vv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const lt=this.simulation.controls;q.add(lt,"speed"),q.add(lt,"showTrails").onChange(Zt=>{Zt===!1&&this.universeTrails.forEach(G=>{G.popAllTrails()}),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt,Dt,Zt){if(this.scene!==void 0){console.error("Simulation already playing. Stop the current playtime before initiating a new one.");return}let G=document.getElementById(F);if(G===null)return;let U=0;this.simulation.universes.forEach(n=>n.currState.bodies.forEach(f=>{for(let c=0;c<3;c++)U=Math.max(U,Math.abs(f.position.getComponent(c)))}));const t=.5*Math.min(lt,q)/U;this.scene=new m1;const g=new pp(q/-2,q/2,lt/2,lt/-2,0,1e10);g.position.set(0,0,Math.max(q,lt));const C=new g1;C.setSize(q,lt),C.autoClear=!1,G.appendChild(C.domElement);const i=new _1(g,C.domElement);i.listenToKeyEvents(window),i.update();const S=new T1(q);this.scene.add(S);const x=new C1(g,C.domElement);let h=[];this.simulation.universes.forEach(n=>{this.universeTrails.push(new P1(this.simulation.maxTrailLength,typeof n.color=="string"?n.color:n.color[0],this.scene,t)),n.currState.bodies.forEach((f,c)=>{const l=new yp(f.radius*t*n.radiusScale,12,12),m=new rv;m.add(new j0(new w1(l),new mp({color:new ha(typeof n.color=="string"?n.color:n.color[c]),transparent:!0,opacity:.4}))),m.add(new Vs(l,new qv({color:new ha(typeof n.color=="string"?n.color:n.color[c]),transparent:!0,opacity:.5,side:Nu}))),this.scene.add(m),m.position.copy(f.position.clone().multiplyScalar(t)),h.push(m)})}),this.simulation.showDebugInfo&&(this.stats=new bp,this.stats.dom.style.position="absolute",this.stats.dom.style.right="0px",this.stats.dom.style.removeProperty("left"),G.appendChild(this.stats.dom));const p=[],r=this.simulation.maxFrameRate*Dt;let e=1;this.simulation.universes.forEach(n=>{p.push([n.currState.clone()])});for(let n=0;n{p[c].push(f.currState.clone())});this.simulation.controller==="ui"&&this.addControls(G);const a=n=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(a),C.clear(),C.render(this.scene,g),x.render(C),i.update();return}let f=0;this.simulation.universes.forEach((c,l)=>{this.simulation.controls.showUniverse[c.label]?p[l][e].bodies.forEach(v=>{h[f].visible=!0,h[f].position.copy(v.position.clone().multiplyScalar(t)),this.simulation.controls.showTrails&&this.universeTrails[l].addTrail(h[f].position.clone()),f++}):c.currState.bodies.forEach(()=>{h[f].visible=!1,f++})}),this.simulation.showDebugInfo&&this.stats&&this.stats.update(),e=Math.round(e+this.simulation.controls.speed),e<0?this.simulation.looped?e=(e%r+r)%r:e=0:e>=r&&(this.simulation.looped?e%=r:e=r-1),this.animationId=requestAnimationFrame(a),C.clear(),C.render(this.scene,g),x.render(C),i.update()};this.clear=()=>{C.clear(),C.dispose(),h.forEach(n=>{n.children.forEach(f=>{f.geometry.dispose(),f.material.dispose()})}),C.domElement.remove()},this.animationId=requestAnimationFrame(a)}clearTrails(F){F===void 0?this.universeTrails.forEach(q=>q.popAllTrails()):this.universeTrails[F].popAllTrails()}stop(){var F,q;this.animationId!==null&&(cancelAnimationFrame(this.animationId),(F=this.scene)==null||F.clear(),this.scene=void 0,this.clear(),this.clear=()=>{},this.universeTrails.forEach(lt=>{lt.popAllTrails()}),this.universeTrails=[],this.removeControls(),(q=this.stats)==null||q.dom.remove())}}class FS{constructor(F,{visType:q="2D",record:lt=!1,looped:Dt=!0,controller:Zt="none",showTrails:G=!1,showDebugInfo:U=!1,maxFrameRate:t=-1,maxTrailLength:g=100}){if(this.controls={speed:1,paused:!1,showTrails:!1,showUniverse:{}},this.universes=Array.isArray(F)?F:[F],this.universes.length>10)throw new Error("Too many universes");if(new Set(this.universes.map(i=>i.label)).size!==this.universes.length)throw new Error("Duplicate label in universes");this.controller=Zt,this.universes.forEach(i=>{this.controls.showUniverse[i.label]=!0}),this.controls.showTrails=G,this.showDebugInfo=U,this.maxFrameRate=t,this.maxTrailLength=g,this.looped=Dt,lt?(this.maxFrameRate=60,this.visualizer=q==="2D"?new LS(this):new PS(this)):this.visualizer=q==="2D"?new _S(this):new CS(this)}getSpeed(){return this.controls.speed}setSpeed(F){this.controller==="code"&&(this.controls.speed=F)}isPlaying(){return!this.controls.paused}pause(){this.controller==="code"&&(this.controls.paused=!0)}resume(){this.controller==="code"&&(this.controls.paused=!1)}getShowTrails(){return this.controls.showTrails}setShowTrails(F){this.controller==="code"&&(this.controls.showTrails=F,F||this.visualizer.clearTrails())}getShowUniverse(F){return this.controls.showUniverse[F]}setShowUniverse(F,q){if(this.controller==="code"){for(let lt=0;lt{q.simulateStep(F)})}start(F,q,lt,Dt=1,Zt=!1,G=1,U=1){if(G===void 0)throw new Error("recordFor must be defined if record is true");this.controls.paused=Zt,this.controls.speed=Dt,this.visualizer.start(F,q,lt,G,U)}stop(){this.visualizer.stop()}}class R1{constructor(F){if(F.currState===void 0)throw new Error("Missing Current State in Universe");if(F.simFunc===void 0)throw new Error("Missing Simulation Function in Universe");this.label=F.label===void 0?"Universe":F.label,this.prevState=F.prevState===void 0?F.currState:F.prevState,this.currState=F.currState,this.color=F.color===void 0?"rgba(255, 255, 255, 1)":F.color,this.simFunc=F.simFunc,this.transformations=F.transformations===void 0?[]:F.transformations,this.radiusScale=F.radiusScale===void 0?1:F.radiusScale}simulateStep(F){let q=this.simFunc.simulate(F,this.currState,this.prevState);this.prevState=this.currState,this.transformations.forEach(lt=>{q=lt.transform(q,F)}),this.currState=q}clone(){return new R1({prevState:this.prevState.clone(),currState:this.currState.clone(),color:this.color,radiusScale:this.radiusScale,label:this.label,simFunc:this.simFunc,transformations:this.transformations})}}export{A1 as C,M1 as G,IS as R,xp as S,R1 as U,bn as V,FS as a,DS as b}; diff --git a/docs/assets/WithTooltip-Y7J54OF7-sl57NqOU.js b/docs/assets/WithTooltip-Y7J54OF7-rl9Zg1-v.js similarity index 56% rename from docs/assets/WithTooltip-Y7J54OF7-sl57NqOU.js rename to docs/assets/WithTooltip-Y7J54OF7-rl9Zg1-v.js index c5db5c6..08df978 100644 --- a/docs/assets/WithTooltip-Y7J54OF7-sl57NqOU.js +++ b/docs/assets/WithTooltip-Y7J54OF7-rl9Zg1-v.js @@ -1 +1 @@ -import{W as T,W as e,b as h}from"./index-SQMR4-IU.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";export{T as WithToolTipState,e as WithTooltip,h as WithTooltipPure}; +import{W as T,W as e,b as h}from"./index-DVskBQuG.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";export{T as WithToolTipState,e as WithTooltip,h as WithTooltipPure}; diff --git a/docs/assets/formatter-B5HCVTEV-CQftLZvn.js b/docs/assets/formatter-B5HCVTEV-B85ZHJKY.js similarity index 99% rename from docs/assets/formatter-B5HCVTEV-CQftLZvn.js rename to docs/assets/formatter-B5HCVTEV-B85ZHJKY.js index e88d4e1..b665d1a 100644 --- a/docs/assets/formatter-B5HCVTEV-CQftLZvn.js +++ b/docs/assets/formatter-B5HCVTEV-B85ZHJKY.js @@ -1,4 +1,4 @@ -var Qi=Object.defineProperty;var Zi=(e,t,r)=>t in e?Qi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _e=(e,t,r)=>(Zi(e,typeof t!="symbol"?t+"":t,r),r);import{m as ea}from"./index-SQMR4-IU.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";var ta=Object.defineProperty,pu=(e,t)=>{for(var r in t)ta(e,r,{get:t[r],enumerable:!0})},hu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},se=(e,t,r)=>(hu(e,t,"read from private field"),r?r.call(e):t.get(e)),ra=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},na=(e,t,r,n)=>(hu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),du={};pu(du,{languages:()=>Vl,options:()=>zl,parsers:()=>Gu,printers:()=>Gl});var ua=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},O=ua,Br="string",xr="array",Tr="cursor",Bt="indent",xt="align",Lr="trim",Ye="group",Tt="fill",Lt="if-break",Nt="indent-if-break",Nr="line-suffix",qr="line-suffix-boundary",be="line",Pr="label",qt="break-parent",Du=new Set([Tr,Bt,xt,Lr,Ye,Tt,Lt,Nt,Nr,qr,be,Pr,qt]);function ia(e){if(typeof e=="string")return Br;if(Array.isArray(e))return xr;if(!e)return;let{type:t}=e;if(Du.has(t))return t}var Ir=ia,aa=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function sa(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +var Qi=Object.defineProperty;var Zi=(e,t,r)=>t in e?Qi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _e=(e,t,r)=>(Zi(e,typeof t!="symbol"?t+"":t,r),r);import{m as ea}from"./index-DVskBQuG.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";var ta=Object.defineProperty,pu=(e,t)=>{for(var r in t)ta(e,r,{get:t[r],enumerable:!0})},hu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},se=(e,t,r)=>(hu(e,t,"read from private field"),r?r.call(e):t.get(e)),ra=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},na=(e,t,r,n)=>(hu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),du={};pu(du,{languages:()=>Vl,options:()=>zl,parsers:()=>Gu,printers:()=>Gl});var ua=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},O=ua,Br="string",xr="array",Tr="cursor",Bt="indent",xt="align",Lr="trim",Ye="group",Tt="fill",Lt="if-break",Nt="indent-if-break",Nr="line-suffix",qr="line-suffix-boundary",be="line",Pr="label",qt="break-parent",Du=new Set([Tr,Bt,xt,Lr,Ye,Tt,Lt,Nt,Nr,qr,be,Pr,qt]);function ia(e){if(typeof e=="string")return Br;if(Array.isArray(e))return xr;if(!e)return;let{type:t}=e;if(Du.has(t))return t}var Ir=ia,aa=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function sa(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', Expected it to be 'string' or 'object'.`;if(Ir(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=aa([...Du].map(u=>`'${u}'`));return`Unexpected doc.type '${e.type}'. Expected it to be ${n}.`}var oa=class extends Error{constructor(t){super(sa(t));_e(this,"name","InvalidDocError");this.doc=t}},fu=oa,la=()=>{},ca=la;function we(e){return{type:Bt,contents:e}}function mu(e,t){return{type:xt,contents:t,n:e}}function q(e,t={}){return ca(t.expandedStates),{type:Ye,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function pa(e){return mu(Number.NEGATIVE_INFINITY,e)}function ha(e){return mu({type:"root"},e)}function gu(e){return{type:Tt,parts:e}}function bt(e,t="",r={}){return{type:Lt,breakContents:e,flatContents:t,groupId:r.groupId}}function da(e,t){return{type:Nt,contents:e,groupId:t.groupId,negate:t.negate}}var Ze={type:qt},Da={type:be,hard:!0},fa={type:be,hard:!0,literal:!0},L={type:be},I={type:be,soft:!0},A=[Da,Ze],ma=[fa,Ze];function et(e,t){let r=[];for(let n=0;n{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Pt=ga;function Or(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let a=u(i);return r.set(i,a),a}function u(i){switch(Ir(i)){case xr:return t(i.map(n));case Tt:return t({...i,parts:i.parts.map(n)});case Lt:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Ye:{let{expandedStates:a,contents:s}=i;return a?(a=a.map(n),s=a[0]):s=n(s),t({...i,contents:s,expandedStates:a})}case xt:case Bt:case Nt:case Pr:case Nr:return t({...i,contents:n(i.contents)});case Br:case Tr:case Lr:case qr:case be:case qt:return t(i);default:throw new fu(i)}}}function Ca(e){switch(Ir(e)){case Tt:if(e.parts.every(t=>t===""))return"";break;case Ye:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Ye&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case xt:case Bt:case Nt:case Nr:if(!e.contents)return"";break;case Lt:if(!e.flatContents&&!e.breakContents)return"";break;case xr:{let t=[];for(let r of e){if(!r)continue;let[n,...u]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Pt(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...u)}return t.length===0?"":t.length===1?t[0]:t}case Br:case Tr:case Lr:case qr:case be:case Pr:case qt:break;default:throw new fu(e)}return e}function Fa(e){return Or(e,t=>Ca(t))}function G(e,t=ma){return Or(e,r=>typeof r=="string"?et(t,r.split(` `)):r)}var va=class extends Error{constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`);_e(this,"name","UnexpectedNodeError");this.node=t}},ya=va,lt="'",cn='"';function Ea(e,t){let r=t===!0||t===lt?lt:cn,n=r===lt?cn:lt,u=0,i=0;for(let a of e)a===r?u++:a===n&&i++;return u>i?n:r}var ba=Ea;function wa(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var U,Sa=class{constructor(e){ra(this,U,void 0),na(this,U,new Set(e))}getLeadingWhitespaceCount(e){let t=se(this,U),r=0;for(let n=0;n=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return se(this,U).has(e.charAt(0))}hasTrailingWhitespace(e){return se(this,U).has(Pt(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${wa([...se(this,U)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=se(this,U);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=se(this,U);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=se(this,U);return Array.prototype.every.call(e,r=>t.has(r))}};U=new WeakMap;var Aa=Sa,ka=[" ",` diff --git a/docs/assets/iframe-BaWYFvPh.js b/docs/assets/iframe-BaWYFvPh.js deleted file mode 100644 index dd4ce02..0000000 --- a/docs/assets/iframe-BaWYFvPh.js +++ /dev/null @@ -1,7 +0,0 @@ -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./Contribute-yBLKfplg.js","./jsx-runtime-DRTy3Uxn.js","./index-BBkUAzwr.js","./index-z5U8iC57.js","./index-SQMR4-IU.js","./index-PqR-_bA4.js","./index-DrlA5mbP.js","./index-DrFu-skq.js","./Force-DTafqWTE.js","./Intro-B2U0FUxS.js","./SimulateFunction-CJWYzgTw.js","./Transformation-DmH4Ckgw.js","./Install-BtFTPxYP.js","./Integration-pSV8N_ng.js","./Nbody-C63zXSRg.js","./QuickStart-CIINUVcg.js","./Dimension.stories-CKHnNJXJ.js","./Simulation-uzMF7En_.js","./Universe-DpKi-MhS.js","./Universe-BbLae_pC.js","./Analemma.stories-D2TdEEue.js","./Transformation-ClZa9c5r.js","./Intro-BnoMJX4N.js","./Sun-Earth-oVV_01QT.js","./Sun-Mars-DbXrLb1Y.js","./54509 YORP-DmjG74Ea.js","./HorseshoeOrbit.stories-qJLTP5dO.js","./HorseshoeOrbit-Dyztv9sW.js","./Intro-C7qiaaqG.js","./SolarSystem-DXcBp5jp.js","./SolarSystem.stories-B0JeMpZ-.js","./Controller-D4-sXF4l.js","./Controller.stories-BGawCMUp.js","./Debug-DQg37ZWr.js","./Debug.stories-B0zfNn6S.js","./Dimension-D0iQTbip.js","./Intro-CrXaUZRx.js","./Multiverse-WC3T8V7i.js","./Multiverse.stories-XPvVjQkJ.js","./Record-D-rP6dMC.js","./Record.stories-BALVDafM.js","./Trails-BexVBPOl.js","./Trails.stories-DPdDrx42.js","./entry-preview-kGuIN3g4.js","./react-18-B-OKcmzb.js","./entry-preview-docs-Db1JGYqY.js","./preview-CwqMn10d.js","./preview-BAz7FMXc.js"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} -import"../sb-preview/runtime.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))a(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const e of r.addedNodes)e.tagName==="LINK"&&e.rel==="modulepreload"&&a(e)}).observe(document,{childList:!0,subtree:!0});function m(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(t){if(t.ep)return;t.ep=!0;const r=m(t);fetch(t.href,r)}})();const y="modulepreload",R=function(_,n){return new URL(_,n).href},p={},o=function(n,m,a){let t=Promise.resolve();if(m&&m.length>0){const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),E=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));t=Promise.all(m.map(i=>{if(i=R(i,a),i in p)return;p[i]=!0;const u=i.endsWith(".css"),O=u?'[rel="stylesheet"]':"";if(!!a)for(let l=r.length-1;l>=0;l--){const c=r[l];if(c.href===i&&(!u||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${O}`))return;const s=document.createElement("link");if(s.rel=u?"stylesheet":y,u||(s.as="script",s.crossOrigin=""),s.href=i,E&&s.setAttribute("nonce",E),document.head.appendChild(s),u)return new Promise((l,c)=>{s.addEventListener("load",l),s.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})}))}return t.then(()=>n()).catch(r=>{const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r})},{createBrowserChannel:P}=__STORYBOOK_MODULE_CHANNELS__,{addons:T}=__STORYBOOK_MODULE_PREVIEW_API__,d=P({page:"preview"});T.setChannel(d);window.__STORYBOOK_ADDONS_CHANNEL__=d;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=d);const V={"./.storybook/stories/Contribute.mdx":async()=>o(()=>import("./Contribute-yBLKfplg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Force.mdx":async()=>o(()=>import("./Force-DTafqWTE.js"),__vite__mapDeps([8,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Intro.mdx":async()=>o(()=>import("./Intro-B2U0FUxS.js"),__vite__mapDeps([9,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/SimulateFunction.mdx":async()=>o(()=>import("./SimulateFunction-CJWYzgTw.js"),__vite__mapDeps([10,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Transformation.mdx":async()=>o(()=>import("./Transformation-DmH4Ckgw.js"),__vite__mapDeps([11,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Install.mdx":async()=>o(()=>import("./Install-BtFTPxYP.js"),__vite__mapDeps([12,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Integration.mdx":async()=>o(()=>import("./Integration-pSV8N_ng.js"),__vite__mapDeps([13,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Nbody.mdx":async()=>o(()=>import("./Nbody-C63zXSRg.js"),__vite__mapDeps([14,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/QuickStart.mdx":async()=>o(()=>import("./QuickStart-CIINUVcg.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,16,17,18,19]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx":async()=>o(()=>import("./Analemma.stories-D2TdEEue.js"),__vite__mapDeps([20,1,2,18,21]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Intro.mdx":async()=>o(()=>import("./Intro-BnoMJX4N.js"),__vite__mapDeps([22,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Sun-Earth.mdx":async()=>o(()=>import("./Sun-Earth-oVV_01QT.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,20,18,21]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Sun-Mars.mdx":async()=>o(()=>import("./Sun-Mars-DbXrLb1Y.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,20,18,21]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx":async()=>o(()=>import("./54509 YORP-DmjG74Ea.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,26,17,18,21]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.mdx":async()=>o(()=>import("./HorseshoeOrbit-Dyztv9sW.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,26,17,18,21]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx":async()=>o(()=>import("./HorseshoeOrbit.stories-qJLTP5dO.js"),__vite__mapDeps([26,17,1,2,18,21]),import.meta.url),"./.storybook/stories/Showcase/Intro.mdx":async()=>o(()=>import("./Intro-C7qiaaqG.js"),__vite__mapDeps([28,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Showcase/SolarSystem/SolarSystem.mdx":async()=>o(()=>import("./SolarSystem-DXcBp5jp.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,30,17,18,19]),import.meta.url),"./.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx":async()=>o(()=>import("./SolarSystem.stories-B0JeMpZ-.js"),__vite__mapDeps([30,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Controller/Controller.mdx":async()=>o(()=>import("./Controller-D4-sXF4l.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,32,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Controller/Controller.stories.tsx":async()=>o(()=>import("./Controller.stories-BGawCMUp.js"),__vite__mapDeps([32,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Debug Info/Debug.mdx":async()=>o(()=>import("./Debug-DQg37ZWr.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,34,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx":async()=>o(()=>import("./Debug.stories-B0zfNn6S.js"),__vite__mapDeps([34,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Dimension/Dimension.mdx":async()=>o(()=>import("./Dimension-D0iQTbip.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,16,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx":async()=>o(()=>import("./Dimension.stories-CKHnNJXJ.js"),__vite__mapDeps([16,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Intro.mdx":async()=>o(()=>import("./Intro-CrXaUZRx.js"),__vite__mapDeps([36,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Visualize/Multiverse/Multiverse.mdx":async()=>o(()=>import("./Multiverse-WC3T8V7i.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,38,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx":async()=>o(()=>import("./Multiverse.stories-XPvVjQkJ.js"),__vite__mapDeps([38,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Record/Record.mdx":async()=>o(()=>import("./Record-D-rP6dMC.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,40,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Record/Record.stories.tsx":async()=>o(()=>import("./Record.stories-BALVDafM.js"),__vite__mapDeps([40,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Trails/Trails.mdx":async()=>o(()=>import("./Trails-BexVBPOl.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,42,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Trails/Trails.stories.tsx":async()=>o(()=>import("./Trails.stories-DPdDrx42.js"),__vite__mapDeps([42,17,1,2,18,19]),import.meta.url)};async function v(_){return V[_]()}const{composeConfigs:D,PreviewWeb:I,ClientApi:b}=__STORYBOOK_MODULE_PREVIEW_API__,A=async()=>{const _=await Promise.all([o(()=>import("./entry-preview-kGuIN3g4.js"),__vite__mapDeps([43,2,44,5]),import.meta.url),o(()=>import("./entry-preview-docs-Db1JGYqY.js"),__vite__mapDeps([45,6,2,7]),import.meta.url),o(()=>import("./preview-zJw0zUcQ.js"),[],import.meta.url),o(()=>import("./preview-CwqMn10d.js"),__vite__mapDeps([46,7]),import.meta.url),o(()=>import("./preview-B4GcaC1c.js"),[],import.meta.url),o(()=>import("./preview-Db4Idchh.js"),[],import.meta.url),o(()=>import("./preview-BAz7FMXc.js"),__vite__mapDeps([47,7]),import.meta.url),o(()=>import("./preview-Cv3rAi2i.js"),[],import.meta.url),o(()=>import("./preview-m58XexFJ.js"),[],import.meta.url)]);return D(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new I(v,A);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{o as _}; diff --git a/docs/assets/iframe-Dx-CAhZM.js b/docs/assets/iframe-Dx-CAhZM.js new file mode 100644 index 0000000..355f3b7 --- /dev/null +++ b/docs/assets/iframe-Dx-CAhZM.js @@ -0,0 +1,7 @@ +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["./Contribute-Bc-KHGTv.js","./jsx-runtime-DRTy3Uxn.js","./index-BBkUAzwr.js","./index-z5U8iC57.js","./index-DVskBQuG.js","./index-PqR-_bA4.js","./index-DrlA5mbP.js","./index-DrFu-skq.js","./Force-DXiVH4_S.js","./Intro-DpzKoVyU.js","./SimulateFunction-Dd1xEf3Q.js","./Transformation-CqgN1WxT.js","./Install-bLWJ9yB5.js","./Integration-CHrxdkpP.js","./Nbody-D4jrnsgb.js","./QuickStart-BnN-jZlZ.js","./Dimension.stories-DocIpVtH.js","./Universe-DLuwJnRa.js","./Universe-PvbTHax1.js","./Analemma.stories-DzEVcYAe.js","./Transformation-DxaXQl0Q.js","./Intro-Co2sm1Va.js","./Sun-Earth-D4puCyOp.js","./Sun-Mars-DmrieDdh.js","./2010 SO16-wc34K9wy.js","./HorseshoeOrbit.stories-TS9WRF8U.js","./54509 YORP-BteM2NBY.js","./Intro-B30JA8MU.js","./Intro-D6N-Vi4T.js","./Recorded-GkJIRhaM.js","./SolarSystem.stories-2o-H9JCP.js","./Simulate-Dx6xa9RA.js","./Controller--RZSoFEm.js","./Controller.stories-L9ug8sr9.js","./Debug-DgjctTuI.js","./Debug.stories-CHzx19Py.js","./Dimension-D83_lvwA.js","./Intro-DCOanv0Z.js","./Multiverse-DvmSAK7U.js","./Multiverse.stories-Dk5x9o7J.js","./Record-DujQYAwf.js","./Record.stories-D-X9pPdt.js","./Trails-DH3u_s95.js","./Trails.stories-C5sFe_IA.js","./entry-preview-kGuIN3g4.js","./react-18-B-OKcmzb.js","./entry-preview-docs-Db1JGYqY.js","./preview-CwqMn10d.js","./preview-BAz7FMXc.js"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} +import"../sb-preview/runtime.js";(function(){const m=document.createElement("link").relList;if(m&&m.supports&&m.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))a(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const e of r.addedNodes)e.tagName==="LINK"&&e.rel==="modulepreload"&&a(e)}).observe(document,{childList:!0,subtree:!0});function n(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(t){if(t.ep)return;t.ep=!0;const r=n(t);fetch(t.href,r)}})();const y="modulepreload",R=function(_,m){return new URL(_,m).href},p={},o=function(m,n,a){let t=Promise.resolve();if(n&&n.length>0){const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),E=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));t=Promise.all(n.map(i=>{if(i=R(i,a),i in p)return;p[i]=!0;const u=i.endsWith(".css"),O=u?'[rel="stylesheet"]':"";if(!!a)for(let l=r.length-1;l>=0;l--){const c=r[l];if(c.href===i&&(!u||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${O}`))return;const s=document.createElement("link");if(s.rel=u?"stylesheet":y,u||(s.as="script",s.crossOrigin=""),s.href=i,E&&s.setAttribute("nonce",E),document.head.appendChild(s),u)return new Promise((l,c)=>{s.addEventListener("load",l),s.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})}))}return t.then(()=>m()).catch(r=>{const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r})},{createBrowserChannel:P}=__STORYBOOK_MODULE_CHANNELS__,{addons:T}=__STORYBOOK_MODULE_PREVIEW_API__,d=P({page:"preview"});T.setChannel(d);window.__STORYBOOK_ADDONS_CHANNEL__=d;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=d);const V={"./.storybook/stories/Contribute.mdx":async()=>o(()=>import("./Contribute-Bc-KHGTv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Force.mdx":async()=>o(()=>import("./Force-DXiVH4_S.js"),__vite__mapDeps([8,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Intro.mdx":async()=>o(()=>import("./Intro-DpzKoVyU.js"),__vite__mapDeps([9,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/SimulateFunction.mdx":async()=>o(()=>import("./SimulateFunction-Dd1xEf3Q.js"),__vite__mapDeps([10,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Transformation.mdx":async()=>o(()=>import("./Transformation-CqgN1WxT.js"),__vite__mapDeps([11,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Install.mdx":async()=>o(()=>import("./Install-bLWJ9yB5.js"),__vite__mapDeps([12,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Integration.mdx":async()=>o(()=>import("./Integration-CHrxdkpP.js"),__vite__mapDeps([13,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Nbody.mdx":async()=>o(()=>import("./Nbody-D4jrnsgb.js"),__vite__mapDeps([14,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/QuickStart.mdx":async()=>o(()=>import("./QuickStart-BnN-jZlZ.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,16,17,18]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx":async()=>o(()=>import("./Analemma.stories-DzEVcYAe.js"),__vite__mapDeps([19,1,2,18,20]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Intro.mdx":async()=>o(()=>import("./Intro-Co2sm1Va.js"),__vite__mapDeps([21,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Sun-Earth.mdx":async()=>o(()=>import("./Sun-Earth-D4puCyOp.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,19,18,20]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Sun-Mars.mdx":async()=>o(()=>import("./Sun-Mars-DmrieDdh.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,19,18,20]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/2010 SO16.mdx":async()=>o(()=>import("./2010 SO16-wc34K9wy.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,25,18,20]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx":async()=>o(()=>import("./54509 YORP-BteM2NBY.js"),__vite__mapDeps([26,1,2,3,4,5,6,7,25,18,20]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx":async()=>o(()=>import("./HorseshoeOrbit.stories-TS9WRF8U.js"),__vite__mapDeps([25,1,2,18,20]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/Intro.mdx":async()=>o(()=>import("./Intro-B30JA8MU.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,25,18,20]),import.meta.url),"./.storybook/stories/Showcase/Intro.mdx":async()=>o(()=>import("./Intro-D6N-Vi4T.js"),__vite__mapDeps([28,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Showcase/SolarSystem/Recorded.mdx":async()=>o(()=>import("./Recorded-GkJIRhaM.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,30,18,20]),import.meta.url),"./.storybook/stories/Showcase/SolarSystem/Simulate.mdx":async()=>o(()=>import("./Simulate-Dx6xa9RA.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,30,18,20]),import.meta.url),"./.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx":async()=>o(()=>import("./SolarSystem.stories-2o-H9JCP.js"),__vite__mapDeps([30,1,2,18,20]),import.meta.url),"./.storybook/stories/Visualize/Controller/Controller.mdx":async()=>o(()=>import("./Controller--RZSoFEm.js"),__vite__mapDeps([32,1,2,3,4,5,6,7,33,17,18]),import.meta.url),"./.storybook/stories/Visualize/Controller/Controller.stories.tsx":async()=>o(()=>import("./Controller.stories-L9ug8sr9.js"),__vite__mapDeps([33,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Debug Info/Debug.mdx":async()=>o(()=>import("./Debug-DgjctTuI.js"),__vite__mapDeps([34,1,2,3,4,5,6,7,35,17,18]),import.meta.url),"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx":async()=>o(()=>import("./Debug.stories-CHzx19Py.js"),__vite__mapDeps([35,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Dimension/Dimension.mdx":async()=>o(()=>import("./Dimension-D83_lvwA.js"),__vite__mapDeps([36,1,2,3,4,5,6,7,16,17,18]),import.meta.url),"./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx":async()=>o(()=>import("./Dimension.stories-DocIpVtH.js"),__vite__mapDeps([16,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Intro.mdx":async()=>o(()=>import("./Intro-DCOanv0Z.js"),__vite__mapDeps([37,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Visualize/Multiverse/Multiverse.mdx":async()=>o(()=>import("./Multiverse-DvmSAK7U.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,39,17,18]),import.meta.url),"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx":async()=>o(()=>import("./Multiverse.stories-Dk5x9o7J.js"),__vite__mapDeps([39,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Record/Record.mdx":async()=>o(()=>import("./Record-DujQYAwf.js"),__vite__mapDeps([40,1,2,3,4,5,6,7,41,17,18]),import.meta.url),"./.storybook/stories/Visualize/Record/Record.stories.tsx":async()=>o(()=>import("./Record.stories-D-X9pPdt.js"),__vite__mapDeps([41,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Trails/Trails.mdx":async()=>o(()=>import("./Trails-DH3u_s95.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,43,17,18]),import.meta.url),"./.storybook/stories/Visualize/Trails/Trails.stories.tsx":async()=>o(()=>import("./Trails.stories-C5sFe_IA.js"),__vite__mapDeps([43,17,1,2,18]),import.meta.url)};async function v(_){return V[_]()}const{composeConfigs:D,PreviewWeb:I,ClientApi:b}=__STORYBOOK_MODULE_PREVIEW_API__,A=async()=>{const _=await Promise.all([o(()=>import("./entry-preview-kGuIN3g4.js"),__vite__mapDeps([44,2,45,5]),import.meta.url),o(()=>import("./entry-preview-docs-Db1JGYqY.js"),__vite__mapDeps([46,6,2,7]),import.meta.url),o(()=>import("./preview-Mr6ODRJp.js"),[],import.meta.url),o(()=>import("./preview-CwqMn10d.js"),__vite__mapDeps([47,7]),import.meta.url),o(()=>import("./preview-B4GcaC1c.js"),[],import.meta.url),o(()=>import("./preview-Db4Idchh.js"),[],import.meta.url),o(()=>import("./preview-BAz7FMXc.js"),__vite__mapDeps([48,7]),import.meta.url),o(()=>import("./preview-Cv3rAi2i.js"),[],import.meta.url),o(()=>import("./preview-olxR6RxF.js"),[],import.meta.url)]);return D(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new I(v,A);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{o as _}; diff --git a/docs/assets/index-SQMR4-IU.js b/docs/assets/index-DVskBQuG.js similarity index 99% rename from docs/assets/index-SQMR4-IU.js rename to docs/assets/index-DVskBQuG.js index ffcd466..de589b3 100644 --- a/docs/assets/index-SQMR4-IU.js +++ b/docs/assets/index-DVskBQuG.js @@ -1,10 +1,10 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-JOJW2KGS-DwFAPbLs.js","./iframe-BaWYFvPh.js","./index-BBkUAzwr.js","./index-PqR-_bA4.js","./index-DrlA5mbP.js","./index-DrFu-skq.js","./formatter-B5HCVTEV-CQftLZvn.js","./WithTooltip-Y7J54OF7-sl57NqOU.js","./Color-RQJUDNI5-BFP5WZys.js"] + __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-JOJW2KGS-DTXLky6P.js","./iframe-Dx-CAhZM.js","./index-BBkUAzwr.js","./index-PqR-_bA4.js","./index-DrlA5mbP.js","./index-DrFu-skq.js","./formatter-B5HCVTEV-B85ZHJKY.js","./WithTooltip-Y7J54OF7-rl9Zg1-v.js","./Color-RQJUDNI5-B7GMeRbh.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as Ft}from"./iframe-BaWYFvPh.js";import{r as o,b as Tl,g as On,R as p,c as ta}from"./index-BBkUAzwr.js";import{r as E0,R as ed}from"./index-PqR-_bA4.js";import{q as S0,r as td,s as C0,t as rd,i as Tn,v as nd,w as ad,x as od,c as R0,y as I0,z as ld,A as A0,B as id,C as sd,D as cd,E as dd,F as ud,G as pd,H as _0,I as fd,J as hd,K as k0,_ as gd,L as md,M as vd,N as ho,d as O0,O as T0,P as M0,Q as bd,R as yd,U as wd,e as xd,S as Ml,k as ra}from"./index-DrlA5mbP.js";import{d as Ed}from"./index-DrFu-skq.js";var Fe=e=>`control-${e.replace(/\s+/g,"-")}`,Mn=e=>`set-${e.replace(/\s+/g,"-")}`;const{global:Sd}=__STORYBOOK_MODULE_GLOBAL__,{logger:Cd}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var Rd=Object.create,$0=Object.defineProperty,Id=Object.getOwnPropertyDescriptor,L0=Object.getOwnPropertyNames,Ad=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty,go=(e,t)=>function(){return t||(0,e[L0(e)[0]])((t={exports:{}}).exports,t),t.exports},kd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of L0(t))!_d.call(e,a)&&a!==r&&$0(e,a,{get:()=>t[a],enumerable:!(n=Id(t,a))||n.enumerable});return e},z0=(e,t,r)=>(r=e!=null?Rd(Ad(e)):{},kd(t||!e||!e.__esModule?$0(r,"default",{value:e,enumerable:!0}):r,e));function vt(){return vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sn(e,t,r){return $d()?sn=Reflect.construct.bind():sn=function(n,a,l){var i=[null];i.push.apply(i,a);var c=Function.bind.apply(n,i),s=new c;return l&&Ar(s,l.prototype),s},sn.apply(null,arguments)}function za(e){var t=typeof Map=="function"?new Map:void 0;return za=function(r){if(r===null||!Md(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return sn(r,arguments,La(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ar(n,r)},za(e)}var Ld={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }). +import{_ as Ft}from"./iframe-Dx-CAhZM.js";import{r as o,b as Tl,g as On,R as p,c as ta}from"./index-BBkUAzwr.js";import{r as E0,R as ed}from"./index-PqR-_bA4.js";import{q as S0,r as td,s as C0,t as rd,i as Tn,v as nd,w as ad,x as od,c as R0,y as I0,z as ld,A as A0,B as id,C as sd,D as cd,E as dd,F as ud,G as pd,H as _0,I as fd,J as hd,K as k0,_ as gd,L as md,M as vd,N as ho,d as O0,O as T0,P as M0,Q as bd,R as yd,U as wd,e as xd,S as Ml,k as ra}from"./index-DrlA5mbP.js";import{d as Ed}from"./index-DrFu-skq.js";var Fe=e=>`control-${e.replace(/\s+/g,"-")}`,Mn=e=>`set-${e.replace(/\s+/g,"-")}`;const{global:Sd}=__STORYBOOK_MODULE_GLOBAL__,{logger:Cd}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var Rd=Object.create,$0=Object.defineProperty,Id=Object.getOwnPropertyDescriptor,L0=Object.getOwnPropertyNames,Ad=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty,go=(e,t)=>function(){return t||(0,e[L0(e)[0]])((t={exports:{}}).exports,t),t.exports},kd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of L0(t))!_d.call(e,a)&&a!==r&&$0(e,a,{get:()=>t[a],enumerable:!(n=Id(t,a))||n.enumerable});return e},z0=(e,t,r)=>(r=e!=null?Rd(Ad(e)):{},kd(t||!e||!e.__esModule?$0(r,"default",{value:e,enumerable:!0}):r,e));function vt(){return vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sn(e,t,r){return $d()?sn=Reflect.construct.bind():sn=function(n,a,l){var i=[null];i.push.apply(i,a);var c=Function.bind.apply(n,i),s=new c;return l&&Ar(s,l.prototype),s},sn.apply(null,arguments)}function za(e){var t=typeof Map=="function"?new Map:void 0;return za=function(r){if(r===null||!Md(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return sn(r,arguments,La(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ar(n,r)},za(e)}var Ld={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }). `,2:`Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }). @@ -370,9 +370,9 @@ To pass a single animation please supply them in simple values, e.g. animation(' `,77:`remToPx expects a value in "rem" but you provided it in "%s". `,78:`base must be set in "px" or "%" but you set it in "%s". -`};function d3(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),i=1;i=0&&a<1?(c=l,s=i):a>=1&&a<2?(c=i,s=l):a>=2&&a<3?(s=l,d=i):a>=3&&a<4?(s=i,d=l):a>=4&&a<5?(c=i,d=l):a>=5&&a<6&&(c=l,d=i);var u=r-l/2,h=c+u,g=s+u,f=d+u;return n(h,g,f)}var Ei={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function p3(e){if(typeof e!="string")return e;var t=e.toLowerCase();return Ei[t]?"#"+Ei[t]:e}var f3=/^#[a-fA-F0-9]{6}$/,h3=/^#[a-fA-F0-9]{8}$/,g3=/^#[a-fA-F0-9]{3}$/,m3=/^#[a-fA-F0-9]{4}$/,ga=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,v3=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,b3=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,y3=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Yo(e){if(typeof e!="string")throw new tt(3);var t=p3(e);if(t.match(f3))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(h3)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(g3))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(m3)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var a=ga.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var l=v3.exec(t.substring(0,50));if(l)return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])};var i=b3.exec(t);if(i){var c=parseInt(""+i[1],10),s=parseInt(""+i[2],10)/100,d=parseInt(""+i[3],10)/100,u="rgb("+Pr(c,s,d)+")",h=ga.exec(u);if(!h)throw new tt(4,t,u);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10)}}var g=y3.exec(t.substring(0,50));if(g){var f=parseInt(""+g[1],10),v=parseInt(""+g[2],10)/100,m=parseInt(""+g[3],10)/100,E="rgb("+Pr(f,v,m)+")",x=ga.exec(E);if(!x)throw new tt(4,t,E);return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10),alpha:parseFloat(""+g[4])>1?parseFloat(""+g[4])/100:parseFloat(""+g[4])}}throw new tt(5)}function w3(e){var t=e.red/255,r=e.green/255,n=e.blue/255,a=Math.max(t,r,n),l=Math.min(t,r,n),i=(a+l)/2;if(a===l)return e.alpha!==void 0?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var c,s=a-l,d=i>.5?s/(2-a-l):s/(a+l);switch(a){case t:c=(r-n)/s+(r=1?Rn(e,t,r):"rgba("+Pr(e,t,r)+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Rn(e.hue,e.saturation,e.lightness):"rgba("+Pr(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new tt(2)}function Ja(e,t,r){if(typeof e=="number"&&typeof t=="number"&&typeof r=="number")return Za("#"+_t(e)+_t(t)+_t(r));if(typeof e=="object"&&t===void 0&&r===void 0)return Za("#"+_t(e.red)+_t(e.green)+_t(e.blue));throw new tt(6)}function In(e,t,r,n){if(typeof e=="string"&&typeof t=="number"){var a=Yo(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof r=="number"&&typeof n=="number")return n>=1?Ja(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Ja(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new tt(7)}var R3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},I3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},A3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},_3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function sc(e){if(typeof e!="object")throw new tt(8);if(I3(e))return In(e);if(R3(e))return Ja(e);if(_3(e))return C3(e);if(A3(e))return S3(e);throw new tt(8)}function cc(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):cc(e,t,n)}}function Ko(e){return cc(e,e.length,[])}function Xo(e,t,r){return Math.max(e,Math.min(t,r))}function k3(e,t){if(t==="transparent")return t;var r=ic(t);return sc(G({},r,{lightness:Xo(0,1,r.lightness-parseFloat(e))}))}var O3=Ko(k3),Zt=O3;function T3(e,t){if(t==="transparent")return t;var r=ic(t);return sc(G({},r,{lightness:Xo(0,1,r.lightness+parseFloat(e))}))}var M3=Ko(T3),Si=M3;function $3(e,t){if(t==="transparent")return t;var r=Yo(t),n=typeof r.alpha=="number"?r.alpha:1,a=G({},r,{alpha:Xo(0,1,+(n*100-parseFloat(e)*100).toFixed(2)/100)});return In(a)}var L3=Ko($3),Oe=L3,ur=({theme:e})=>({margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}}),ut=({theme:e})=>({lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?Oe(.1,e.color.defaultText):Oe(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border}),re=({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"}),Ut={margin:"16px 0"},z3=({href:e,...t})=>{let r=/^\//.test(e)?`./?path=${e}`:e,n=/^#.*/.test(e)?"_self":"_top";return p.createElement("a",{href:r,target:n,...t})},dc=A(z3)(re,({theme:e})=>({fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}})),uc=A.blockquote(re,Ut,({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})),B3=e=>typeof e=="string",P3=/[\n\r]/g,H3=A.code(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"inline-block",paddingLeft:2,paddingRight:2,verticalAlign:"baseline",color:"inherit"}),ut),F3=A(Po)(({theme:e})=>({fontFamily:e.typography.fonts.mono,fontSize:`${e.typography.size.s2-1}px`,lineHeight:"19px",margin:"25px 0 40px",borderRadius:e.appBorderRadius,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}})),Zo=({className:e,children:t,...r})=>{let n=(e||"").match(/lang-(\S+)/),a=o.Children.toArray(t);return a.filter(B3).some(l=>l.match(P3))?p.createElement(F3,{bordered:!0,copyable:!0,language:(n==null?void 0:n[1])??"text",format:!1,...r},t):p.createElement(H3,{...r,className:e},a)},pc=A.div(re),fc=A.dl(re,Ut,{padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}}),hc=A.h1(re,ur,({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold})),Jo=A.h2(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`})),Qo=A.h3(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m1}px`})),gc=A.h4(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s3}px`})),mc=A.h5(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`})),vc=A.h6(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark})),bc=A.hr(({theme:e})=>({border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0})),yc=A.img({maxWidth:"100%"}),wc=A.li(re,({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":ut({theme:e})})),j3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},xc=A.ol(re,Ut,j3,{listStyle:"decimal"}),Ec=A.p(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":ut({theme:e})})),Sc=A.pre(re,Ut,({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}})),Cc=A.span(re,({theme:e})=>({"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}})),Rc=A.table(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}})),Ic=A.title(ut),N3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},Ac=A.ul(re,Ut,N3,{listStyle:"disc"}),el=A.div(re),_c={h1:e=>p.createElement(hc,{...te(e,"h1")}),h2:e=>p.createElement(Jo,{...te(e,"h2")}),h3:e=>p.createElement(Qo,{...te(e,"h3")}),h4:e=>p.createElement(gc,{...te(e,"h4")}),h5:e=>p.createElement(mc,{...te(e,"h5")}),h6:e=>p.createElement(vc,{...te(e,"h6")}),pre:e=>p.createElement(Sc,{...te(e,"pre")}),a:e=>p.createElement(dc,{...te(e,"a")}),hr:e=>p.createElement(bc,{...te(e,"hr")}),dl:e=>p.createElement(fc,{...te(e,"dl")}),blockquote:e=>p.createElement(uc,{...te(e,"blockquote")}),table:e=>p.createElement(Rc,{...te(e,"table")}),img:e=>p.createElement(yc,{...te(e,"img")}),div:e=>p.createElement(pc,{...te(e,"div")}),span:e=>p.createElement(Cc,{...te(e,"span")}),li:e=>p.createElement(wc,{...te(e,"li")}),ul:e=>p.createElement(Ac,{...te(e,"ul")}),ol:e=>p.createElement(xc,{...te(e,"ol")}),p:e=>p.createElement(Ec,{...te(e,"p")}),code:e=>p.createElement(Zo,{...te(e,"code")}),tt:e=>p.createElement(Ic,{...te(e,"tt")}),resetwrapper:e=>p.createElement(el,{...te(e,"resetwrapper")})},D3=A.div(({theme:e})=>({display:"inline-block",fontSize:11,lineHeight:"12px",alignSelf:"center",padding:"4px 12px",borderRadius:"3em",fontWeight:e.typography.weight.bold}),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:"currentColor"}}},({theme:e,status:t})=>{switch(t){case"critical":return{color:e.color.critical,background:e.background.critical};case"negative":return{color:e.color.negativeText,background:e.background.negative,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.negativeText)}`:"none"};case"warning":return{color:e.color.warningText,background:e.background.warning,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.warningText)}`:"none"};case"neutral":return{color:e.color.dark,background:e.color.mediumlight,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.dark)}`:"none"};case"positive":return{color:e.color.positiveText,background:e.background.positive,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.positiveText)}`:"none"};default:return{}}}),V3=({...e})=>p.createElement(D3,{...e}),U3=0,W3=e=>e.button===U3&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,q3=(e,t)=>{W3(e)&&(e.preventDefault(),t(e))},G3=A.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),Y3=A.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:Zt(.07,e.color.secondary),"svg path:not([fill])":{fill:Zt(.07,e.color.secondary)}},"&:active":{color:Zt(.1,e.color.secondary),"svg path:not([fill])":{fill:Zt(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),Bt=({cancel:e=!0,children:t,onClick:r=void 0,withArrow:n=!1,containsIcon:a=!1,className:l=void 0,style:i=void 0,...c})=>p.createElement(Y3,{...c,onClick:r&&e?s=>q3(s,r):r,className:l},p.createElement(G3,{withArrow:n,containsIcon:a},t,n&&p.createElement(qo,null))),K3=A.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"span.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"span.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),Pt=[],lr=null,X3=o.lazy(async()=>{let{SyntaxHighlighter:e}=await Ft(()=>import("./syntaxhighlighter-JOJW2KGS-DwFAPbLs.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);return Pt.length>0&&(Pt.forEach(t=>{e.registerLanguage(...t)}),Pt=[]),lr===null&&(lr=e),{default:t=>p.createElement(e,{...t})}}),Z3=o.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([Ft(()=>import("./syntaxhighlighter-JOJW2KGS-DwFAPbLs.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Ft(()=>import("./formatter-B5HCVTEV-CQftLZvn.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url)]);return Pt.length>0&&(Pt.forEach(r=>{e.registerLanguage(...r)}),Pt=[]),lr===null&&(lr=e),{default:r=>p.createElement(e,{...r,formatter:t})}}),Wn=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},e.format!==!1?p.createElement(Z3,{...e}):p.createElement(X3,{...e}));Wn.registerLanguage=(...e)=>{if(lr!==null){lr.registerLanguage(...e);return}Pt.push(e)};var J3=e=>typeof e=="number"?e:Number(e),Q3=A.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${Da}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${Da}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),e7=({col:e,row:t,outer:r,children:n,...a})=>{let l=J3(typeof r=="number"||!r?r:e||t);return p.createElement(Q3,{col:e,row:t,outer:l,...a},n)},t7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),r7=A.div(),n7=A.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),a7=({children:e,...t})=>{let[r,n]=o.Children.toArray(e);return p.createElement(n7,{...t},p.createElement(t7,null,r),n&&p.createElement(r7,null,n))};function o7(e,t){var r=o.useRef(null),n=o.useRef(null);n.current=t;var a=o.useRef(null);o.useEffect(function(){l()});var l=o.useCallback(function(){var i=a.current,c=n.current,s=i||(c?c instanceof Element?c:c.current:null);r.current&&r.current.element===s&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:s,subscriber:e,cleanup:s?e(s):void 0})},[e]);return o.useEffect(function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}},[]),o.useCallback(function(i){a.current=i,l()},[l])}function Ci(e,t,r){return e[t]?e[t][0]?e[t][0][r]:e[t][r]:t==="contentBoxSize"?e.contentRect[r==="inlineSize"?"width":"height"]:void 0}function kc(e){e===void 0&&(e={});var t=e.onResize,r=o.useRef(void 0);r.current=t;var n=e.round||Math.round,a=o.useRef(),l=o.useState({width:void 0,height:void 0}),i=l[0],c=l[1],s=o.useRef(!1);o.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]);var d=o.useRef({width:void 0,height:void 0}),u=o7(o.useCallback(function(h){return(!a.current||a.current.box!==e.box||a.current.round!==n)&&(a.current={box:e.box,round:n,instance:new ResizeObserver(function(g){var f=g[0],v=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",m=Ci(f,v,"inlineSize"),E=Ci(f,v,"blockSize"),x=m?n(m):void 0,y=E?n(E):void 0;if(d.current.width!==x||d.current.height!==y){var b={width:x,height:y};d.current.width=x,d.current.height=y,r.current?r.current(b):s.current||c(b)}})}),a.current.instance.observe(h,{box:e.box}),function(){a.current&&a.current.instance.unobserve(h)}},[e.box,n]),e.ref);return o.useMemo(function(){return{ref:u,width:i.width,height:i.height}},[u,i.width,i.height])}var l7=A.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function i7({scale:e,children:t}){let r=o.useRef(null),[n,a]=o.useState(0),l=o.useCallback(({height:i})=>{i&&a(i/e)},[e]);return o.useEffect(()=>{r.current&&a(r.current.getBoundingClientRect().height)},[e]),kc({ref:r,onResize:l}),p.createElement(l7,{scale:e,elementHeight:n},p.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var s7=class extends o.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return p.createElement(p.Fragment,null,e)}},Oc={Element:i7,IFrame:s7},{document:c7}=n3,d7=A.strong(({theme:e})=>({color:e.color.orange})),u7=A.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Ri=A.em(({theme:e})=>({color:e.textMutedColor})),p7=/(Error): (.*)\n/,f7=/at (?:(.*) )?\(?(.+)\)?/,h7=/([^@]+)?(?:\/<)?@(.+)?/,g7=/([^@]+)?@(.+)?/,Tc=({error:e})=>{if(!e)return p.createElement(o.Fragment,null,"This error has no stack or message");if(!e.stack)return p.createElement(o.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} +`};function d3(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),i=1;i=0&&a<1?(c=l,s=i):a>=1&&a<2?(c=i,s=l):a>=2&&a<3?(s=l,d=i):a>=3&&a<4?(s=i,d=l):a>=4&&a<5?(c=i,d=l):a>=5&&a<6&&(c=l,d=i);var u=r-l/2,h=c+u,g=s+u,f=d+u;return n(h,g,f)}var Ei={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function p3(e){if(typeof e!="string")return e;var t=e.toLowerCase();return Ei[t]?"#"+Ei[t]:e}var f3=/^#[a-fA-F0-9]{6}$/,h3=/^#[a-fA-F0-9]{8}$/,g3=/^#[a-fA-F0-9]{3}$/,m3=/^#[a-fA-F0-9]{4}$/,ga=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,v3=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,b3=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,y3=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Yo(e){if(typeof e!="string")throw new tt(3);var t=p3(e);if(t.match(f3))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(h3)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(g3))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(m3)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var a=ga.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var l=v3.exec(t.substring(0,50));if(l)return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])};var i=b3.exec(t);if(i){var c=parseInt(""+i[1],10),s=parseInt(""+i[2],10)/100,d=parseInt(""+i[3],10)/100,u="rgb("+Pr(c,s,d)+")",h=ga.exec(u);if(!h)throw new tt(4,t,u);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10)}}var g=y3.exec(t.substring(0,50));if(g){var f=parseInt(""+g[1],10),v=parseInt(""+g[2],10)/100,m=parseInt(""+g[3],10)/100,E="rgb("+Pr(f,v,m)+")",x=ga.exec(E);if(!x)throw new tt(4,t,E);return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10),alpha:parseFloat(""+g[4])>1?parseFloat(""+g[4])/100:parseFloat(""+g[4])}}throw new tt(5)}function w3(e){var t=e.red/255,r=e.green/255,n=e.blue/255,a=Math.max(t,r,n),l=Math.min(t,r,n),i=(a+l)/2;if(a===l)return e.alpha!==void 0?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var c,s=a-l,d=i>.5?s/(2-a-l):s/(a+l);switch(a){case t:c=(r-n)/s+(r=1?Rn(e,t,r):"rgba("+Pr(e,t,r)+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Rn(e.hue,e.saturation,e.lightness):"rgba("+Pr(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new tt(2)}function Ja(e,t,r){if(typeof e=="number"&&typeof t=="number"&&typeof r=="number")return Za("#"+_t(e)+_t(t)+_t(r));if(typeof e=="object"&&t===void 0&&r===void 0)return Za("#"+_t(e.red)+_t(e.green)+_t(e.blue));throw new tt(6)}function In(e,t,r,n){if(typeof e=="string"&&typeof t=="number"){var a=Yo(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof r=="number"&&typeof n=="number")return n>=1?Ja(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Ja(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new tt(7)}var R3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},I3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},A3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},_3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function sc(e){if(typeof e!="object")throw new tt(8);if(I3(e))return In(e);if(R3(e))return Ja(e);if(_3(e))return C3(e);if(A3(e))return S3(e);throw new tt(8)}function cc(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):cc(e,t,n)}}function Ko(e){return cc(e,e.length,[])}function Xo(e,t,r){return Math.max(e,Math.min(t,r))}function k3(e,t){if(t==="transparent")return t;var r=ic(t);return sc(G({},r,{lightness:Xo(0,1,r.lightness-parseFloat(e))}))}var O3=Ko(k3),Zt=O3;function T3(e,t){if(t==="transparent")return t;var r=ic(t);return sc(G({},r,{lightness:Xo(0,1,r.lightness+parseFloat(e))}))}var M3=Ko(T3),Si=M3;function $3(e,t){if(t==="transparent")return t;var r=Yo(t),n=typeof r.alpha=="number"?r.alpha:1,a=G({},r,{alpha:Xo(0,1,+(n*100-parseFloat(e)*100).toFixed(2)/100)});return In(a)}var L3=Ko($3),Oe=L3,ur=({theme:e})=>({margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}}),ut=({theme:e})=>({lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?Oe(.1,e.color.defaultText):Oe(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border}),re=({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"}),Ut={margin:"16px 0"},z3=({href:e,...t})=>{let r=/^\//.test(e)?`./?path=${e}`:e,n=/^#.*/.test(e)?"_self":"_top";return p.createElement("a",{href:r,target:n,...t})},dc=A(z3)(re,({theme:e})=>({fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}})),uc=A.blockquote(re,Ut,({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})),B3=e=>typeof e=="string",P3=/[\n\r]/g,H3=A.code(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"inline-block",paddingLeft:2,paddingRight:2,verticalAlign:"baseline",color:"inherit"}),ut),F3=A(Po)(({theme:e})=>({fontFamily:e.typography.fonts.mono,fontSize:`${e.typography.size.s2-1}px`,lineHeight:"19px",margin:"25px 0 40px",borderRadius:e.appBorderRadius,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}})),Zo=({className:e,children:t,...r})=>{let n=(e||"").match(/lang-(\S+)/),a=o.Children.toArray(t);return a.filter(B3).some(l=>l.match(P3))?p.createElement(F3,{bordered:!0,copyable:!0,language:(n==null?void 0:n[1])??"text",format:!1,...r},t):p.createElement(H3,{...r,className:e},a)},pc=A.div(re),fc=A.dl(re,Ut,{padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}}),hc=A.h1(re,ur,({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold})),Jo=A.h2(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`})),Qo=A.h3(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m1}px`})),gc=A.h4(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s3}px`})),mc=A.h5(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`})),vc=A.h6(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark})),bc=A.hr(({theme:e})=>({border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0})),yc=A.img({maxWidth:"100%"}),wc=A.li(re,({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":ut({theme:e})})),j3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},xc=A.ol(re,Ut,j3,{listStyle:"decimal"}),Ec=A.p(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":ut({theme:e})})),Sc=A.pre(re,Ut,({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}})),Cc=A.span(re,({theme:e})=>({"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}})),Rc=A.table(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}})),Ic=A.title(ut),N3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},Ac=A.ul(re,Ut,N3,{listStyle:"disc"}),el=A.div(re),_c={h1:e=>p.createElement(hc,{...te(e,"h1")}),h2:e=>p.createElement(Jo,{...te(e,"h2")}),h3:e=>p.createElement(Qo,{...te(e,"h3")}),h4:e=>p.createElement(gc,{...te(e,"h4")}),h5:e=>p.createElement(mc,{...te(e,"h5")}),h6:e=>p.createElement(vc,{...te(e,"h6")}),pre:e=>p.createElement(Sc,{...te(e,"pre")}),a:e=>p.createElement(dc,{...te(e,"a")}),hr:e=>p.createElement(bc,{...te(e,"hr")}),dl:e=>p.createElement(fc,{...te(e,"dl")}),blockquote:e=>p.createElement(uc,{...te(e,"blockquote")}),table:e=>p.createElement(Rc,{...te(e,"table")}),img:e=>p.createElement(yc,{...te(e,"img")}),div:e=>p.createElement(pc,{...te(e,"div")}),span:e=>p.createElement(Cc,{...te(e,"span")}),li:e=>p.createElement(wc,{...te(e,"li")}),ul:e=>p.createElement(Ac,{...te(e,"ul")}),ol:e=>p.createElement(xc,{...te(e,"ol")}),p:e=>p.createElement(Ec,{...te(e,"p")}),code:e=>p.createElement(Zo,{...te(e,"code")}),tt:e=>p.createElement(Ic,{...te(e,"tt")}),resetwrapper:e=>p.createElement(el,{...te(e,"resetwrapper")})},D3=A.div(({theme:e})=>({display:"inline-block",fontSize:11,lineHeight:"12px",alignSelf:"center",padding:"4px 12px",borderRadius:"3em",fontWeight:e.typography.weight.bold}),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:"currentColor"}}},({theme:e,status:t})=>{switch(t){case"critical":return{color:e.color.critical,background:e.background.critical};case"negative":return{color:e.color.negativeText,background:e.background.negative,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.negativeText)}`:"none"};case"warning":return{color:e.color.warningText,background:e.background.warning,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.warningText)}`:"none"};case"neutral":return{color:e.color.dark,background:e.color.mediumlight,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.dark)}`:"none"};case"positive":return{color:e.color.positiveText,background:e.background.positive,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.positiveText)}`:"none"};default:return{}}}),V3=({...e})=>p.createElement(D3,{...e}),U3=0,W3=e=>e.button===U3&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,q3=(e,t)=>{W3(e)&&(e.preventDefault(),t(e))},G3=A.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),Y3=A.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:Zt(.07,e.color.secondary),"svg path:not([fill])":{fill:Zt(.07,e.color.secondary)}},"&:active":{color:Zt(.1,e.color.secondary),"svg path:not([fill])":{fill:Zt(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),Bt=({cancel:e=!0,children:t,onClick:r=void 0,withArrow:n=!1,containsIcon:a=!1,className:l=void 0,style:i=void 0,...c})=>p.createElement(Y3,{...c,onClick:r&&e?s=>q3(s,r):r,className:l},p.createElement(G3,{withArrow:n,containsIcon:a},t,n&&p.createElement(qo,null))),K3=A.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"span.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"span.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),Pt=[],lr=null,X3=o.lazy(async()=>{let{SyntaxHighlighter:e}=await Ft(()=>import("./syntaxhighlighter-JOJW2KGS-DTXLky6P.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);return Pt.length>0&&(Pt.forEach(t=>{e.registerLanguage(...t)}),Pt=[]),lr===null&&(lr=e),{default:t=>p.createElement(e,{...t})}}),Z3=o.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([Ft(()=>import("./syntaxhighlighter-JOJW2KGS-DTXLky6P.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Ft(()=>import("./formatter-B5HCVTEV-B85ZHJKY.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url)]);return Pt.length>0&&(Pt.forEach(r=>{e.registerLanguage(...r)}),Pt=[]),lr===null&&(lr=e),{default:r=>p.createElement(e,{...r,formatter:t})}}),Wn=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},e.format!==!1?p.createElement(Z3,{...e}):p.createElement(X3,{...e}));Wn.registerLanguage=(...e)=>{if(lr!==null){lr.registerLanguage(...e);return}Pt.push(e)};var J3=e=>typeof e=="number"?e:Number(e),Q3=A.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${Da}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${Da}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),e7=({col:e,row:t,outer:r,children:n,...a})=>{let l=J3(typeof r=="number"||!r?r:e||t);return p.createElement(Q3,{col:e,row:t,outer:l,...a},n)},t7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),r7=A.div(),n7=A.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),a7=({children:e,...t})=>{let[r,n]=o.Children.toArray(e);return p.createElement(n7,{...t},p.createElement(t7,null,r),n&&p.createElement(r7,null,n))};function o7(e,t){var r=o.useRef(null),n=o.useRef(null);n.current=t;var a=o.useRef(null);o.useEffect(function(){l()});var l=o.useCallback(function(){var i=a.current,c=n.current,s=i||(c?c instanceof Element?c:c.current:null);r.current&&r.current.element===s&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:s,subscriber:e,cleanup:s?e(s):void 0})},[e]);return o.useEffect(function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}},[]),o.useCallback(function(i){a.current=i,l()},[l])}function Ci(e,t,r){return e[t]?e[t][0]?e[t][0][r]:e[t][r]:t==="contentBoxSize"?e.contentRect[r==="inlineSize"?"width":"height"]:void 0}function kc(e){e===void 0&&(e={});var t=e.onResize,r=o.useRef(void 0);r.current=t;var n=e.round||Math.round,a=o.useRef(),l=o.useState({width:void 0,height:void 0}),i=l[0],c=l[1],s=o.useRef(!1);o.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]);var d=o.useRef({width:void 0,height:void 0}),u=o7(o.useCallback(function(h){return(!a.current||a.current.box!==e.box||a.current.round!==n)&&(a.current={box:e.box,round:n,instance:new ResizeObserver(function(g){var f=g[0],v=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",m=Ci(f,v,"inlineSize"),E=Ci(f,v,"blockSize"),x=m?n(m):void 0,y=E?n(E):void 0;if(d.current.width!==x||d.current.height!==y){var b={width:x,height:y};d.current.width=x,d.current.height=y,r.current?r.current(b):s.current||c(b)}})}),a.current.instance.observe(h,{box:e.box}),function(){a.current&&a.current.instance.unobserve(h)}},[e.box,n]),e.ref);return o.useMemo(function(){return{ref:u,width:i.width,height:i.height}},[u,i.width,i.height])}var l7=A.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function i7({scale:e,children:t}){let r=o.useRef(null),[n,a]=o.useState(0),l=o.useCallback(({height:i})=>{i&&a(i/e)},[e]);return o.useEffect(()=>{r.current&&a(r.current.getBoundingClientRect().height)},[e]),kc({ref:r,onResize:l}),p.createElement(l7,{scale:e,elementHeight:n},p.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var s7=class extends o.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return p.createElement(p.Fragment,null,e)}},Oc={Element:i7,IFrame:s7},{document:c7}=n3,d7=A.strong(({theme:e})=>({color:e.color.orange})),u7=A.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Ri=A.em(({theme:e})=>({color:e.textMutedColor})),p7=/(Error): (.*)\n/,f7=/at (?:(.*) )?\(?(.+)\)?/,h7=/([^@]+)?(?:\/<)?@(.+)?/,g7=/([^@]+)?@(.+)?/,Tc=({error:e})=>{if(!e)return p.createElement(o.Fragment,null,"This error has no stack or message");if(!e.stack)return p.createElement(o.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} -${t}`);let r=t.match(p7);if(!r)return p.createElement(o.Fragment,null,t);let[,n,a]=r,l=t.split(/\n/).slice(1),[,...i]=l.map(c=>{let s=c.match(f7)||c.match(h7)||c.match(g7);return s?{name:(s[1]||"").replace("/<",""),location:s[2].replace(c7.location.origin,"")}:null}).filter(Boolean);return p.createElement(o.Fragment,null,p.createElement("span",null,n),": ",p.createElement(d7,null,a),p.createElement("br",null),i.map((c,s)=>c.name?p.createElement(o.Fragment,{key:s}," ","at ",p.createElement(u7,null,c.name)," (",p.createElement(Ri,null,c.location),")",p.createElement("br",null)):p.createElement(o.Fragment,{key:s}," ","at ",p.createElement(Ri,null,c.location),p.createElement("br",null))))},wt=o.forwardRef(({asChild:e=!1,animation:t="none",size:r="small",variant:n="outline",padding:a="medium",disabled:l=!1,active:i=!1,onClick:c,...s},d)=>{let u="button";s.isLink&&(u="a"),e&&(u=ko);let h=n,g=r,[f,v]=o.useState(!1),m=E=>{c&&c(E),t!=="none"&&v(!0)};if(o.useEffect(()=>{let E=setTimeout(()=>{f&&v(!1)},1e3);return()=>clearTimeout(E)},[f]),s.primary&&(h="solid",g="medium"),(s.secondary||s.tertiary||s.gray||s.outline||s.inForm)&&(h="outline",g="medium"),s.small||s.isLink||s.primary||s.secondary||s.tertiary||s.gray||s.outline||s.inForm||s.containsIcon){let E=p.Children.toArray(s.children).filter(x=>typeof x=="string"&&x!=="");lc(`Use of deprecated props in the button ${E.length>0?`"${E.join(" ")}"`:"component"} detected, see the migration notes at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-ui-and-props-for-button-and-iconbutton-components`)}return p.createElement(m7,{as:u,ref:d,variant:h,size:g,padding:a,disabled:l,active:i,animating:f,animation:t,onClick:m,...s})});wt.displayName="Button";var m7=A("button",{shouldForwardProp:e=>vo(e)})(({theme:e,variant:t,size:r,disabled:n,active:a,animating:l,animation:i,padding:c})=>({border:0,cursor:n?"not-allowed":"pointer",display:"inline-flex",gap:"6px",alignItems:"center",justifyContent:"center",overflow:"hidden",padding:c==="small"&&r==="small"?"0 7px":c==="small"&&r==="medium"?"0 9px":r==="small"?"0 10px":r==="medium"?"0 12px":0,height:r==="small"?"28px":"32px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:n?.5:1,margin:0,fontSize:`${e.typography.size.s1}px`,fontWeight:e.typography.weight.bold,lineHeight:"1",background:t==="solid"?e.color.secondary:t==="outline"?e.button.background:t==="ghost"&&a?e.background.hoverable:"transparent",...t==="ghost"?{".sb-bar &":{background:a?Oe(.9,e.barTextColor):"transparent",color:a?e.barSelectedColor:e.barTextColor,"&:hover":{color:e.barHoverColor,background:Oe(.86,e.barHoverColor)},"&:active":{color:e.barSelectedColor,background:Oe(.9,e.barSelectedColor)},"&:focus":{boxShadow:`${In(e.barHoverColor,1)} 0 0 0 1px inset`,outline:"none"}}}:{},color:t==="solid"?e.color.lightest:t==="outline"?e.input.color:t==="ghost"&&a?e.color.secondary:t==="ghost"?e.color.mediumdark:e.input.color,boxShadow:t==="outline"?`${e.button.border} 0 0 0 1px inset`:"none",borderRadius:e.input.borderRadius,flexShrink:0,"&:hover":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?Oe(.86,e.color.secondary):e.base==="light"?Zt(.02,s):Si(.03,s)})()},"&:active":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?e.background.hoverable:e.base==="light"?Zt(.02,s):Si(.03,s)})()},"&:focus":{boxShadow:`${In(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"},"> svg":{animation:l&&i!=="none"?`${e.animation[i]} 1000ms ease-out`:""}})),Ht=o.forwardRef(({padding:e="small",variant:t="ghost",...r},n)=>p.createElement(wt,{padding:e,variant:t,ref:n,...r}));Ht.displayName="IconButton";var v7=A.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),b7=A.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),Mc=({label:e,children:t,...r})=>p.createElement(v7,{...r},e?p.createElement(b7,null,p.createElement("span",null,e)):null,t);Mc.defaultProps={label:void 0};var y7=o.useLayoutEffect,w7=y7,x7=function(e){var t=o.useRef(e);return w7(function(){t.current=e}),t},Ii=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},E7=function(e,t){var r=o.useRef();return o.useCallback(function(n){e.current=n,r.current&&Ii(r.current,null),r.current=t,t&&Ii(t,n)},[t])},S7=E7,Ai={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},C7=function(e){Object.keys(Ai).forEach(function(t){e.style.setProperty(t,Ai[t],"important")})},_i=C7,ye=null,ki=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function R7(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),ye||(ye=document.createElement("textarea"),ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),_i(ye)),ye.parentNode===null&&document.body.appendChild(ye);var a=e.paddingSize,l=e.borderSize,i=e.sizingStyle,c=i.boxSizing;Object.keys(i).forEach(function(g){var f=g;ye.style[f]=i[f]}),_i(ye),ye.value=t;var s=ki(ye,e);ye.value=t,s=ki(ye,e),ye.value="x";var d=ye.scrollHeight-a,u=d*r;c==="border-box"&&(u=u+a+l),s=Math.max(u,s);var h=d*n;return c==="border-box"&&(h=h+a+l),s=Math.min(h,s),[s,d]}var Oi=function(){},I7=function(e,t){return e.reduce(function(r,n){return r[n]=t[n],r},{})},A7=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],_7=!!document.documentElement.currentStyle,k7=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=I7(A7,t),n=r.boxSizing;if(n==="")return null;_7&&n==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:l}},O7=k7;function $c(e,t,r){var n=x7(r);o.useLayoutEffect(function(){var a=function(l){return n.current(l)};if(e)return e.addEventListener(t,a),function(){return e.removeEventListener(t,a)}},[])}var T7=function(e){$c(window,"resize",e)},M7=function(e){$c(document.fonts,"loadingdone",e)},$7=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],L7=function(e,t){var r=e.cacheMeasurements,n=e.maxRows,a=e.minRows,l=e.onChange,i=l===void 0?Oi:l,c=e.onHeightChange,s=c===void 0?Oi:c,d=Io(e,$7),u=d.value!==void 0,h=o.useRef(null),g=S7(h,t),f=o.useRef(0),v=o.useRef(),m=function(){var x=h.current,y=r&&v.current?v.current:O7(x);if(y){v.current=y;var b=R7(y,x.value||x.placeholder||"x",a,n),w=b[0],S=b[1];f.current!==w&&(f.current=w,x.style.setProperty("height",w+"px","important"),s(w,{rowHeight:S}))}},E=function(x){u||m(),i(x)};return o.useLayoutEffect(m),T7(m),M7(m),o.createElement("textarea",G({},d,{onChange:E,ref:g}))},z7=o.forwardRef(L7),B7={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},tl=({theme:e})=>({...B7,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),rl=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},Lc=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},nl=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},P7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement("input",{...n,ref:a})}))(tl,rl,Lc,nl,{minHeight:32}),{displayName:"Input"}),H7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement("select",{...n,ref:a})}))(tl,rl,nl,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),F7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement(z7,{...n,ref:a})}))(tl,rl,Lc,nl,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),Nt=Object.assign(A.form({boxSizing:"border-box",width:"100%"}),{Field:Mc,Input:P7,Select:H7,Textarea:F7,Button:wt}),j7=o.lazy(()=>Ft(()=>import("./WithTooltip-Y7J54OF7-sl57NqOU.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltip}))),N7=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(j7,{...e})),D7=o.lazy(()=>Ft(()=>import("./WithTooltip-Y7J54OF7-sl57NqOU.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),zc=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(D7,{...e})),V7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),U7=A.span(),W7=A.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),q7=A.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),G7=A.div({padding:15,width:280,boxSizing:"border-box"}),Bc=({title:e,desc:t,links:r})=>p.createElement(G7,null,p.createElement(q7,null,e&&p.createElement(V7,null,e),t&&p.createElement(U7,null,t)),r&&p.createElement(W7,null,r.map(({title:n,...a})=>p.createElement(Bt,{...a,key:n},n))));Bc.defaultProps={title:null,desc:null,links:null};var Y7=A.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),K7=({note:e,...t})=>p.createElement(Y7,{...t},e),X7=A(({active:e,loading:t,disabled:r,...n})=>p.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:Oe(.7,t.color.defaultText)}:{}),Z7=A.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),J7=A.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),Q7=A.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),eb=A.span(({active:e,theme:t})=>e?{color:t.color.secondary}:{},()=>({display:"flex",maxWidth:14})),tb=A.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),rb=Dt(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),Pc=({loading:e,title:t,center:r,right:n,icon:a,active:l,disabled:i,isIndented:c,href:s,onClick:d,LinkWrapper:u,...h})=>{let g=rb(d,s,u),f={active:l,disabled:i};return p.createElement(tb,{...f,...h,...g},a&&p.createElement(eb,{...f},a),t||r?p.createElement(J7,{isIndented:!a&&c},t&&p.createElement(X7,{...f,loading:e},t),r&&p.createElement(Q7,{...f},r)):null,n&&p.createElement(Z7,{...f},n))};Pc.defaultProps={loading:!1,title:p.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var al=Pc,nb=A.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),ab=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:a,...l}=e,{title:i,href:c,active:s}=l,d=o.useCallback(h=>{r(h,l)},[r]),u=!!r;return p.createElement(al,{title:i,active:s,href:c,id:`list-item-${n}`,LinkWrapper:t,isIndented:a,...l,...u?{onClick:d}:{}})},ol=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.icon);return p.createElement(nb,null,e.map(({isGatsby:n,...a})=>p.createElement(ab,{key:a.id,LinkWrapper:n?t:null,isIndented:r,...a})))};ol.defaultProps={LinkWrapper:al.defaultProps.LinkWrapper};var ob=e=>typeof e.props.href=="string",lb=e=>typeof e.props.href!="string";function ib({children:e,...t},r){let n={props:t,ref:r};if(ob(n))return p.createElement("a",{ref:n.ref,...n.props},e);if(lb(n))return p.createElement("button",{ref:n.ref,type:"button",...n.props},e);throw new Error("invalid props")}var Hc=o.forwardRef(ib);Hc.displayName="ButtonOrLink";var Gr=A(Hc,{shouldForwardProp:vo})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"},"&[hidden]":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.barSelectedColor}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent","&:hover":{color:r.barHoverColor}});Gr.displayName="TabButton";var sb=A.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),cb=A.div(()=>({marginTop:6,padding:7,height:28})),db=()=>p.createElement(cb,null,p.createElement(sb,null)),Qa=A.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});Qa.displayName="Side";var ub=({children:e,className:t,scrollable:r})=>r?p.createElement(Bo,{vertical:!1,className:t},e):p.createElement("div",{className:t},e),ll=A(ub)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});ll.displayName="Bar";var pb=A.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),qn=({children:e,backgroundColor:t,className:r,...n})=>{let[a,l]=o.Children.toArray(e);return p.createElement(ll,{className:`sb-bar ${r}`,...n},p.createElement(pb,{bgColor:t},p.createElement(Qa,{scrollable:n.scrollable,left:!0},a),l?p.createElement(Qa,{right:!0},l):null))};qn.displayName="FlexBar";var Fc=A.div(({active:e})=>e?{display:"block"}:{display:"none"}),Ti=e=>o.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:a}})=>{let l=Array.isArray(a)?a[0]:a;return{title:t,id:r,...n?{color:n}:{},render:typeof l=="function"?l:({active:i})=>p.createElement(Fc,{active:i,role:"tabpanel"},l)}}),fb=A.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),hb=A(Gr)(({active:e,theme:t,preActive:r})=>` +${t}`);let r=t.match(p7);if(!r)return p.createElement(o.Fragment,null,t);let[,n,a]=r,l=t.split(/\n/).slice(1),[,...i]=l.map(c=>{let s=c.match(f7)||c.match(h7)||c.match(g7);return s?{name:(s[1]||"").replace("/<",""),location:s[2].replace(c7.location.origin,"")}:null}).filter(Boolean);return p.createElement(o.Fragment,null,p.createElement("span",null,n),": ",p.createElement(d7,null,a),p.createElement("br",null),i.map((c,s)=>c.name?p.createElement(o.Fragment,{key:s}," ","at ",p.createElement(u7,null,c.name)," (",p.createElement(Ri,null,c.location),")",p.createElement("br",null)):p.createElement(o.Fragment,{key:s}," ","at ",p.createElement(Ri,null,c.location),p.createElement("br",null))))},wt=o.forwardRef(({asChild:e=!1,animation:t="none",size:r="small",variant:n="outline",padding:a="medium",disabled:l=!1,active:i=!1,onClick:c,...s},d)=>{let u="button";s.isLink&&(u="a"),e&&(u=ko);let h=n,g=r,[f,v]=o.useState(!1),m=E=>{c&&c(E),t!=="none"&&v(!0)};if(o.useEffect(()=>{let E=setTimeout(()=>{f&&v(!1)},1e3);return()=>clearTimeout(E)},[f]),s.primary&&(h="solid",g="medium"),(s.secondary||s.tertiary||s.gray||s.outline||s.inForm)&&(h="outline",g="medium"),s.small||s.isLink||s.primary||s.secondary||s.tertiary||s.gray||s.outline||s.inForm||s.containsIcon){let E=p.Children.toArray(s.children).filter(x=>typeof x=="string"&&x!=="");lc(`Use of deprecated props in the button ${E.length>0?`"${E.join(" ")}"`:"component"} detected, see the migration notes at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-ui-and-props-for-button-and-iconbutton-components`)}return p.createElement(m7,{as:u,ref:d,variant:h,size:g,padding:a,disabled:l,active:i,animating:f,animation:t,onClick:m,...s})});wt.displayName="Button";var m7=A("button",{shouldForwardProp:e=>vo(e)})(({theme:e,variant:t,size:r,disabled:n,active:a,animating:l,animation:i,padding:c})=>({border:0,cursor:n?"not-allowed":"pointer",display:"inline-flex",gap:"6px",alignItems:"center",justifyContent:"center",overflow:"hidden",padding:c==="small"&&r==="small"?"0 7px":c==="small"&&r==="medium"?"0 9px":r==="small"?"0 10px":r==="medium"?"0 12px":0,height:r==="small"?"28px":"32px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:n?.5:1,margin:0,fontSize:`${e.typography.size.s1}px`,fontWeight:e.typography.weight.bold,lineHeight:"1",background:t==="solid"?e.color.secondary:t==="outline"?e.button.background:t==="ghost"&&a?e.background.hoverable:"transparent",...t==="ghost"?{".sb-bar &":{background:a?Oe(.9,e.barTextColor):"transparent",color:a?e.barSelectedColor:e.barTextColor,"&:hover":{color:e.barHoverColor,background:Oe(.86,e.barHoverColor)},"&:active":{color:e.barSelectedColor,background:Oe(.9,e.barSelectedColor)},"&:focus":{boxShadow:`${In(e.barHoverColor,1)} 0 0 0 1px inset`,outline:"none"}}}:{},color:t==="solid"?e.color.lightest:t==="outline"?e.input.color:t==="ghost"&&a?e.color.secondary:t==="ghost"?e.color.mediumdark:e.input.color,boxShadow:t==="outline"?`${e.button.border} 0 0 0 1px inset`:"none",borderRadius:e.input.borderRadius,flexShrink:0,"&:hover":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?Oe(.86,e.color.secondary):e.base==="light"?Zt(.02,s):Si(.03,s)})()},"&:active":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?e.background.hoverable:e.base==="light"?Zt(.02,s):Si(.03,s)})()},"&:focus":{boxShadow:`${In(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"},"> svg":{animation:l&&i!=="none"?`${e.animation[i]} 1000ms ease-out`:""}})),Ht=o.forwardRef(({padding:e="small",variant:t="ghost",...r},n)=>p.createElement(wt,{padding:e,variant:t,ref:n,...r}));Ht.displayName="IconButton";var v7=A.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),b7=A.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),Mc=({label:e,children:t,...r})=>p.createElement(v7,{...r},e?p.createElement(b7,null,p.createElement("span",null,e)):null,t);Mc.defaultProps={label:void 0};var y7=o.useLayoutEffect,w7=y7,x7=function(e){var t=o.useRef(e);return w7(function(){t.current=e}),t},Ii=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},E7=function(e,t){var r=o.useRef();return o.useCallback(function(n){e.current=n,r.current&&Ii(r.current,null),r.current=t,t&&Ii(t,n)},[t])},S7=E7,Ai={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},C7=function(e){Object.keys(Ai).forEach(function(t){e.style.setProperty(t,Ai[t],"important")})},_i=C7,ye=null,ki=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function R7(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),ye||(ye=document.createElement("textarea"),ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),_i(ye)),ye.parentNode===null&&document.body.appendChild(ye);var a=e.paddingSize,l=e.borderSize,i=e.sizingStyle,c=i.boxSizing;Object.keys(i).forEach(function(g){var f=g;ye.style[f]=i[f]}),_i(ye),ye.value=t;var s=ki(ye,e);ye.value=t,s=ki(ye,e),ye.value="x";var d=ye.scrollHeight-a,u=d*r;c==="border-box"&&(u=u+a+l),s=Math.max(u,s);var h=d*n;return c==="border-box"&&(h=h+a+l),s=Math.min(h,s),[s,d]}var Oi=function(){},I7=function(e,t){return e.reduce(function(r,n){return r[n]=t[n],r},{})},A7=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],_7=!!document.documentElement.currentStyle,k7=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=I7(A7,t),n=r.boxSizing;if(n==="")return null;_7&&n==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:l}},O7=k7;function $c(e,t,r){var n=x7(r);o.useLayoutEffect(function(){var a=function(l){return n.current(l)};if(e)return e.addEventListener(t,a),function(){return e.removeEventListener(t,a)}},[])}var T7=function(e){$c(window,"resize",e)},M7=function(e){$c(document.fonts,"loadingdone",e)},$7=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],L7=function(e,t){var r=e.cacheMeasurements,n=e.maxRows,a=e.minRows,l=e.onChange,i=l===void 0?Oi:l,c=e.onHeightChange,s=c===void 0?Oi:c,d=Io(e,$7),u=d.value!==void 0,h=o.useRef(null),g=S7(h,t),f=o.useRef(0),v=o.useRef(),m=function(){var x=h.current,y=r&&v.current?v.current:O7(x);if(y){v.current=y;var b=R7(y,x.value||x.placeholder||"x",a,n),w=b[0],S=b[1];f.current!==w&&(f.current=w,x.style.setProperty("height",w+"px","important"),s(w,{rowHeight:S}))}},E=function(x){u||m(),i(x)};return o.useLayoutEffect(m),T7(m),M7(m),o.createElement("textarea",G({},d,{onChange:E,ref:g}))},z7=o.forwardRef(L7),B7={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},tl=({theme:e})=>({...B7,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),rl=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},Lc=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},nl=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},P7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement("input",{...n,ref:a})}))(tl,rl,Lc,nl,{minHeight:32}),{displayName:"Input"}),H7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement("select",{...n,ref:a})}))(tl,rl,nl,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),F7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement(z7,{...n,ref:a})}))(tl,rl,Lc,nl,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),Nt=Object.assign(A.form({boxSizing:"border-box",width:"100%"}),{Field:Mc,Input:P7,Select:H7,Textarea:F7,Button:wt}),j7=o.lazy(()=>Ft(()=>import("./WithTooltip-Y7J54OF7-rl9Zg1-v.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltip}))),N7=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(j7,{...e})),D7=o.lazy(()=>Ft(()=>import("./WithTooltip-Y7J54OF7-rl9Zg1-v.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),zc=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(D7,{...e})),V7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),U7=A.span(),W7=A.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),q7=A.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),G7=A.div({padding:15,width:280,boxSizing:"border-box"}),Bc=({title:e,desc:t,links:r})=>p.createElement(G7,null,p.createElement(q7,null,e&&p.createElement(V7,null,e),t&&p.createElement(U7,null,t)),r&&p.createElement(W7,null,r.map(({title:n,...a})=>p.createElement(Bt,{...a,key:n},n))));Bc.defaultProps={title:null,desc:null,links:null};var Y7=A.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),K7=({note:e,...t})=>p.createElement(Y7,{...t},e),X7=A(({active:e,loading:t,disabled:r,...n})=>p.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:Oe(.7,t.color.defaultText)}:{}),Z7=A.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),J7=A.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),Q7=A.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),eb=A.span(({active:e,theme:t})=>e?{color:t.color.secondary}:{},()=>({display:"flex",maxWidth:14})),tb=A.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),rb=Dt(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),Pc=({loading:e,title:t,center:r,right:n,icon:a,active:l,disabled:i,isIndented:c,href:s,onClick:d,LinkWrapper:u,...h})=>{let g=rb(d,s,u),f={active:l,disabled:i};return p.createElement(tb,{...f,...h,...g},a&&p.createElement(eb,{...f},a),t||r?p.createElement(J7,{isIndented:!a&&c},t&&p.createElement(X7,{...f,loading:e},t),r&&p.createElement(Q7,{...f},r)):null,n&&p.createElement(Z7,{...f},n))};Pc.defaultProps={loading:!1,title:p.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var al=Pc,nb=A.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),ab=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:a,...l}=e,{title:i,href:c,active:s}=l,d=o.useCallback(h=>{r(h,l)},[r]),u=!!r;return p.createElement(al,{title:i,active:s,href:c,id:`list-item-${n}`,LinkWrapper:t,isIndented:a,...l,...u?{onClick:d}:{}})},ol=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.icon);return p.createElement(nb,null,e.map(({isGatsby:n,...a})=>p.createElement(ab,{key:a.id,LinkWrapper:n?t:null,isIndented:r,...a})))};ol.defaultProps={LinkWrapper:al.defaultProps.LinkWrapper};var ob=e=>typeof e.props.href=="string",lb=e=>typeof e.props.href!="string";function ib({children:e,...t},r){let n={props:t,ref:r};if(ob(n))return p.createElement("a",{ref:n.ref,...n.props},e);if(lb(n))return p.createElement("button",{ref:n.ref,type:"button",...n.props},e);throw new Error("invalid props")}var Hc=o.forwardRef(ib);Hc.displayName="ButtonOrLink";var Gr=A(Hc,{shouldForwardProp:vo})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"},"&[hidden]":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.barSelectedColor}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent","&:hover":{color:r.barHoverColor}});Gr.displayName="TabButton";var sb=A.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),cb=A.div(()=>({marginTop:6,padding:7,height:28})),db=()=>p.createElement(cb,null,p.createElement(sb,null)),Qa=A.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});Qa.displayName="Side";var ub=({children:e,className:t,scrollable:r})=>r?p.createElement(Bo,{vertical:!1,className:t},e):p.createElement("div",{className:t},e),ll=A(ub)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});ll.displayName="Bar";var pb=A.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),qn=({children:e,backgroundColor:t,className:r,...n})=>{let[a,l]=o.Children.toArray(e);return p.createElement(ll,{className:`sb-bar ${r}`,...n},p.createElement(pb,{bgColor:t},p.createElement(Qa,{scrollable:n.scrollable,left:!0},a),l?p.createElement(Qa,{right:!0},l):null))};qn.displayName="FlexBar";var Fc=A.div(({active:e})=>e?{display:"block"}:{display:"none"}),Ti=e=>o.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:a}})=>{let l=Array.isArray(a)?a[0]:a;return{title:t,id:r,...n?{color:n}:{},render:typeof l=="function"?l:({active:i})=>p.createElement(Fc,{active:i,role:"tabpanel"},l)}}),fb=A.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),hb=A(Gr)(({active:e,theme:t,preActive:r})=>` color: ${r||e?t.barSelectedColor:t.barTextColor}; .addon-collapsible-icon { color: ${r||e?t.barSelectedColor:t.barTextColor}; @@ -463,7 +463,7 @@ ${t}`);let r=t.match(p7);if(!r)return p.createElement(o.Fragment,null,t);let[,n, ${Ye(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${Ot(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${Ot(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${Je(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),W1=A.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),eI=A(W1)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),tI=A.div({display:"flex",alignItems:"center",width:"100%"});function rI(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var nI=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:l=1,onBlur:i,onFocus:c})=>{let s=h=>{r(hR(h.target.value))},d=t!==void 0,u=o.useMemo(()=>rI(l),[l]);return p.createElement(tI,null,p.createElement(W1,null,n),p.createElement(QR,{id:Fe(e),type:"range",onChange:s,name:e,value:t,min:n,max:a,step:l,onFocus:c,onBlur:i}),p.createElement(eI,{numberOFDecimalsPlaces:u,max:a},d?t.toFixed(u):"--"," / ",a))},aI=A.label({display:"flex"}),oI=A.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),lI=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:l})=>{let i=h=>{r(h.target.value)},[c,s]=o.useState(!1),d=o.useCallback(()=>{r(""),s(!0)},[s]);if(t===void 0)return p.createElement(wt,{variant:"outline",size:"medium",id:Mn(e),onClick:d},"Set string");let u=typeof t=="string";return p.createElement(aI,null,p.createElement(Nt.Textarea,{id:Fe(e),maxLength:l,onChange:i,size:"flex",placeholder:"Edit string...",autoFocus:c,valid:u?null:"error",name:e,value:u?t:"",onFocus:n,onBlur:a}),l&&p.createElement(oI,{isMaxed:(t==null?void 0:t.length)===l},(t==null?void 0:t.length)??0," / ",l))},iI=A(Nt.Input)({padding:10});function sI(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var cI=({onChange:e,name:t,accept:r="image/*",value:n})=>{let a=o.useRef(null);function l(i){if(!i.target.files)return;let c=Array.from(i.target.files).map(s=>URL.createObjectURL(s));e(c),sI(n)}return o.useEffect(()=>{n==null&&a.current&&(a.current.value=null)},[n,t]),p.createElement(iI,{ref:a,id:Fe(t),type:"file",name:t,multiple:!0,onChange:l,accept:r,size:"flex"})},dI=o.lazy(()=>Ft(()=>import("./Color-RQJUDNI5-BFP5WZys.js"),__vite__mapDeps([8,2,4,1,3,5]),import.meta.url)),uI=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(dI,{...e})),pI={array:y0,object:y0,boolean:lR,color:uI,date:pR,number:gR,check:Kt,"inline-check":Kt,radio:Kt,"inline-radio":Kt,select:Kt,"multi-select":Kt,range:nI,text:lI,file:cI},w0=()=>p.createElement(p.Fragment,null,"-"),fI=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var m;let{key:a,control:l}=e,[i,c]=o.useState(!1),[s,d]=o.useState({value:t});o.useEffect(()=>{i||d({value:t})},[i,t]);let u=o.useCallback(E=>(d({value:E}),r({[a]:E}),E),[r,a]),h=o.useCallback(()=>c(!1),[]),g=o.useCallback(()=>c(!0),[]);if(!l||l.disable){let E=(l==null?void 0:l.disable)!==!0&&((m=e==null?void 0:e.type)==null?void 0:m.name)!=="function";return n&&E?p.createElement(Bt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):p.createElement(w0,null)}let f={name:a,argType:e,value:s.value,onChange:u,onBlur:h,onFocus:g},v=pI[l.type]||w0;return p.createElement(v,{...f,...l,controlType:l.type})},hI=A.span({fontWeight:"bold"}),gI=A.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),mI=A.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...ut({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),vI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?4:0})),bI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),yI=A.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),wI=e=>e&&{summary:typeof e=="string"?e:e.name},on=e=>{var m;let[t,r]=o.useState(!1),{row:n,updateArgs:a,compact:l,expandable:i,initialExpandedArgs:c}=e,{name:s,description:d}=n,u=n.table||{},h=u.type||wI(n.type),g=u.defaultValue||n.defaultValue,f=(m=n.type)==null?void 0:m.required,v=d!=null&&d!=="";return p.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},p.createElement(yI,{expandable:i},p.createElement(hI,null,s),f?p.createElement(gI,{title:"Required"},"*"):null),l?null:p.createElement("td",null,v&&p.createElement(mI,null,p.createElement(h1,null,d)),u.jsDocTags!=null?p.createElement(p.Fragment,null,p.createElement(bI,{hasDescription:v},p.createElement(Ta,{value:h,initialExpandedArgs:c})),p.createElement(GC,{tags:u.jsDocTags})):p.createElement(vI,{hasDescription:v},p.createElement(Ta,{value:h,initialExpandedArgs:c}))),l?null:p.createElement("td",null,p.createElement(Ta,{value:g,initialExpandedArgs:c})),a?p.createElement("td",null,p.createElement(fI,{...e,isHovered:t})):null)},xI=A(ec)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),EI=A(qo)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),SI=A.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),CI=A.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),RI=A.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),II=A.td(()=>({position:"relative"})),AI=A.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Ot(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),x0=A.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),$a=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[l,i]=o.useState(n),c=e==="subsection"?RI:CI,s=(r==null?void 0:r.length)||0,d=e==="subsection"?`${s} item${s!==1?"s":""}`:"",u=`${l?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return p.createElement(p.Fragment,null,p.createElement(AI,{title:u},p.createElement(c,{colSpan:1},p.createElement(x0,{onClick:h=>i(!l),tabIndex:0},u),p.createElement(SI,null,l?p.createElement(xI,null):p.createElement(EI,null),t)),p.createElement(II,{colSpan:a-1},p.createElement(x0,{onClick:h=>i(!l),tabIndex:-1,style:{outline:"none"}},u),l?null:d)),l?r:null)},ln=A.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),fe=A.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ie=A.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),he=[2,4,2,2],_I=()=>p.createElement(p.Fragment,null,p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"})))),kI=A.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),OI=A.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),TI=A.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),MI=({inAddonPanel:e})=>{let[t,r]=o.useState(!0);return o.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:p.createElement(kI,{inAddonPanel:e},p.createElement(il,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:p.createElement(p.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:p.createElement(OI,null,e&&p.createElement(p.Fragment,null,p.createElement(Bt,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},p.createElement(Xs,null)," Watch 5m video"),p.createElement(TI,null),p.createElement(Bt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Read docs")),!e&&p.createElement(Bt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Learn how to set that up"))}))},$I=A.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?ee(.25,e.color.defaultText):ee(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),LI=A(Ht)(({theme:e})=>({margin:"-4px -12px -4px 0"})),zI=A.span({display:"flex",justifyContent:"space-between"}),BI={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},PI=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([l,i])=>{let{category:c,subcategory:s}=(i==null?void 0:i.table)||{};if(c){let d=r.sections[c]||{ungrouped:[],subsections:{}};if(!s)d.ungrouped.push({key:l,...i});else{let u=d.subsections[s]||[];u.push({key:l,...i}),d.subsections[s]=u}r.sections[c]=d}else if(s){let d=r.ungroupedSubsections[s]||[];d.push({key:l,...i}),r.ungroupedSubsections[s]=d}else r.ungrouped.push({key:l,...i})});let n=BI[t],a=l=>n?Object.keys(l).reduce((i,c)=>({...i,[c]:l[c].sort(n)}),{}):l;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((l,i)=>({...l,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},HI=(e,t,r)=>{try{return r3(e,t,r)}catch(n){return mC.warn(n.message),!1}},uo=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:l,sort:i="none",isLoading:c}=e;if("error"in e){let{error:y}=e;return p.createElement(k1,null,y," ",p.createElement(Bt,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Read the docs"))}if(c)return p.createElement(_I,null);let{rows:s,args:d,globals:u}="rows"in e&&e,h=PI(E6(s,y=>{var b;return!((b=y==null?void 0:y.table)!=null&&b.disable)&&HI(y,d||{},u||{})}),i),g=h.ungrouped.length===0,f=Object.entries(h.sections).length===0,v=Object.entries(h.ungroupedSubsections).length===0;if(g&&f&&v)return p.createElement(MI,{inAddonPanel:a});let m=1;t&&(m+=1),n||(m+=2);let E=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:l};return p.createElement(el,null,p.createElement($I,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},p.createElement("thead",{className:"docblock-argstable-head"},p.createElement("tr",null,p.createElement("th",null,p.createElement("span",null,"Name")),n?null:p.createElement("th",null,p.createElement("span",null,"Description")),n?null:p.createElement("th",null,p.createElement("span",null,"Default")),t?p.createElement("th",null,p.createElement(zI,null,"Control"," ",!c&&r&&p.createElement(LI,{onClick:()=>r(),title:"Reset controls"},p.createElement(rc,{"aria-hidden":!0})))):null)),p.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(y=>p.createElement(on,{key:y.key,row:y,arg:d&&d[y.key],...x})),Object.entries(h.ungroupedSubsections).map(([y,b])=>p.createElement($a,{key:y,label:y,level:"subsection",colSpan:m},b.map(w=>p.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],expandable:E,...x})))),Object.entries(h.sections).map(([y,b])=>p.createElement($a,{key:y,label:y,level:"section",colSpan:m},b.ungrouped.map(w=>p.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(b.subsections).map(([w,S])=>p.createElement($a,{key:w,label:w,level:"subsection",colSpan:m},S.map(C=>p.createElement(on,{key:C.key,row:C,arg:d&&d[C.key],expandable:E,...x})))))))))},FI=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?p.createElement(uo,{...r[0][1],...t}):p.createElement(cl,null,r.map((n,a)=>{let[l,i]=n,c=`prop_table_div_${l}`,s="div",d=a===0?t:{sort:t.sort};return p.createElement(s,{key:c,id:c,title:l},({active:u})=>u?p.createElement(uo,{key:`prop_table_${l}`,...i,...d}):null)}))};A.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});A.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});A.div(re,({theme:e})=>({...Zn(e),margin:"25px 0 40px",padding:"30px 20px"}));A.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));A.div(({theme:e})=>({color:e.base==="light"?ee(.2,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});A.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));A.div({display:"flex",flexDirection:"row"});A.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));A.div(({theme:e})=>({...Zn(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));A.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});A.div({flex:1,display:"flex",flexDirection:"row"});A.div({display:"flex",alignItems:"flex-start"});A.div({flex:"0 0 30%"});A.div({flex:1});A.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));A.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));A.div(({theme:e})=>({...Zn(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));A.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});A.div({display:"flex",flexFlow:"row wrap"});var jI=e=>`anchor--${e}`,q1=({storyId:e,children:t})=>p.createElement("div",{id:jI(e),className:"sb-anchor"},t);Te&&Te.__DOCS_CONTEXT__===void 0&&(Te.__DOCS_CONTEXT__=o.createContext(null),Te.__DOCS_CONTEXT__.displayName="DocsContext");var Ae=Te?Te.__DOCS_CONTEXT__:o.createContext(null),Yr=(e,t)=>o.useContext(Ae).resolveOf(e,t),NI=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),DI=e=>{if(e)return typeof e=="string"?e.includes("-")?NI(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function VI(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function G1(e){return dC(e,{allowFunction:!1})}var Y1=o.createContext({sources:{}}),K1="--unknown--",UI=({children:e,channel:t})=>{let[r,n]=o.useState({});return o.useEffect(()=>{let a=(l,i=null,c=!1)=>{let{id:s,args:d=void 0,source:u,format:h}=typeof l=="string"?{id:l,source:i,format:c}:l,g=d?G1(d):K1;n(f=>({...f,[s]:{...f[s],[g]:{code:u,format:h}}}))};return t.on(Ml,a),()=>t.off(Ml,a)},[]),p.createElement(Y1.Provider,{value:{sources:r}},e)},WI=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[G1(t)])||(a==null?void 0:a[K1])||{code:""}},qI=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,d;let{__isArgsStory:a}=t.parameters,l=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||l.type||ra.AUTO;if(l.code!==void 0)return l.code;let c=i===ra.DYNAMIC||i===ra.AUTO&&e&&a?e:l.originalSource||"";return((d=n??l.transform)==null?void 0:d(c,t))||c},GI=(e,t,r)=>{var f,v,m,E;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let l=((v=(f=n==null?void 0:n.parameters)==null?void 0:f.docs)==null?void 0:v.source)||{},{code:i}=e,c=e.format??l.format,s=e.language??l.language??"jsx",d=e.dark??l.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:c,language:s,dark:d};let u=t.getStoryContext(n),h=e.__forceInitialArgs?u.initialArgs:u.unmappedArgs,g=WI(n.id,h,r);return c=g.format??((E=(m=n.parameters.docs)==null?void 0:m.source)==null?void 0:E.format)??!1,{code:qI({snippet:g.code,storyContext:{...u,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:c,language:s,dark:d}};function YI(e,t){let r=KI([e],t);return r&&r[0]}function KI(e,t){let[r,n]=o.useState({});return o.useEffect(()=>{Promise.all(e.map(async a=>{let l=await t.loadStory(a);n(i=>i[a]===l?i:{...i,[a]:l})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var XI=(e,t)=>{let{of:r,meta:n}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return n&&t.referenceMeta(n,!1),t.resolveOf(r||"story",["story"]).story.id},ZI=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,l=a.story||{};if(a.disable)return null;if(e.inline??l.inline??!1){let c=e.height??l.height,s=e.autoplay??l.autoplay??!1;return{story:t,inline:!0,height:c,autoplay:s,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??l.height??l.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},JI=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=o.useContext(Ae),r=XI(e,t),n=YI(r,t);if(!n)return p.createElement(T1,null);let a=ZI(e,n,t);return a?p.createElement(FC,{...a}):null},QI=e=>{var g,f,v,m,E,x,y,b,w,S;let t=o.useContext(Ae),r=o.useContext(Y1),{of:n,source:a}=e;if("of"in e&&n===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story:l}=Yr(n||"story",["story"]),i=GI({...a,...n&&{of:n}},t,r),c=e.layout??l.parameters.layout??((f=(g=l.parameters.docs)==null?void 0:g.canvas)==null?void 0:f.layout)??"padded",s=e.withToolbar??((m=(v=l.parameters.docs)==null?void 0:v.canvas)==null?void 0:m.withToolbar)??!1,d=e.additionalActions??((x=(E=l.parameters.docs)==null?void 0:E.canvas)==null?void 0:x.additionalActions),u=e.sourceState??((b=(y=l.parameters.docs)==null?void 0:y.canvas)==null?void 0:b.sourceState)??"hidden",h=e.className??((S=(w=l.parameters.docs)==null?void 0:w.canvas)==null?void 0:S.className);return p.createElement(M1,{withSource:u==="none"?void 0:i,isExpanded:u==="shown",withToolbar:s,additionalActions:d,className:h,layout:c},p.createElement(JI,{of:n||l.moduleExport,meta:e.meta,...e.story}))},eA=(e,t)=>{let r=t.getStoryContext(e),[n,a]=o.useState(r.globals);return o.useEffect(()=>{let l=i=>{a(i.globals)};return t.channel.on(c0,l),()=>t.channel.off(c0,l)},[t.channel]),[n]},tA=(e,t)=>{let r=rA(e,t);if(!r)throw new Error("No result when story was defined");return r},rA=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,l]=o.useState(r.args);o.useEffect(()=>{let s=d=>{d.storyId===n&&l(d.args)};return t.channel.on(d0,s),()=>t.channel.off(d0,s)},[n,t.channel]);let i=o.useCallback(s=>t.channel.emit(vC,{storyId:n,updatedArgs:s}),[n,t.channel]),c=o.useCallback(s=>t.channel.emit(bC,{storyId:n,argNames:s}),[n,t.channel]);return e&&[a,i,c]};function nA(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var aA=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=o.useContext(Ae),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:l,component:i,subcomponents:c}=n,s=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??s.include,u=e.exclude??s.exclude,h=e.sort??s.sort,[g,f,v]=tA(n,r),[m]=eA(n,r),E=s0(l,d,u);if(!(c&&Object.keys(c).length>0))return Object.keys(E).length>0||Object.keys(g).length>0?p.createElement(uo,{rows:E,sort:h,args:g,globals:m,updateArgs:f,resetArgs:v}):null;let x=DI(i),y=Object.fromEntries(Object.entries(c).map(([S,C])=>[S,{rows:s0(nA(C,a),d,u),sort:h}])),b={[x]:{rows:E,sort:h},...y};return p.createElement(FI,{tabs:b,sort:h,args:g,globals:m,updateArgs:f,resetArgs:v})},{document:X1}=Te,oA=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return p.createElement(Zo,null,t);let n=e&&e.split("-");return p.createElement(xl,{language:n&&n[1]||"text",format:!1,code:t,...r})};function Rl(e,t){e.channel.emit(yC,t)}var po=Dc.a,lA=({hash:e,children:t})=>{let r=o.useContext(Ae);return p.createElement(po,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);X1.getElementById(a)&&Rl(r,e)}},t)},iA=e=>{let{href:t,target:r,children:n,...a}=e,l=o.useContext(Ae);if(t){if(t.startsWith("#"))return p.createElement(lA,{hash:t},n);if(r!=="_blank"&&!t.startsWith("https://"))return p.createElement(po,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),Rl(l,i.currentTarget.getAttribute("href")))},target:r,...a},n)}return p.createElement(po,{...e})},Z1=["h1","h2","h3","h4","h5","h6"],sA=Z1.reduce((e,t)=>({...e,[t]:A(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),cA=A.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),dA=({as:e,id:t,children:r,...n})=>{let a=o.useContext(Ae),l=sA[e],i=`#${t}`;return p.createElement(l,{id:t,...n},p.createElement(cA,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:c=>{X1.getElementById(t)&&Rl(a,i)}},p.createElement(Qs,null)),r)},Il=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return p.createElement(dA,{as:t,id:r,...a},n);let l=t,{as:i,...c}=e;return p.createElement(l,{...te(c,t)})},uA=Z1.reduce((e,t)=>({...e,[t]:r=>p.createElement(Il,{as:t,...r})}),{}),pA=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(Ed`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' + ${Ot(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${Je(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),W1=A.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),eI=A(W1)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),tI=A.div({display:"flex",alignItems:"center",width:"100%"});function rI(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var nI=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:l=1,onBlur:i,onFocus:c})=>{let s=h=>{r(hR(h.target.value))},d=t!==void 0,u=o.useMemo(()=>rI(l),[l]);return p.createElement(tI,null,p.createElement(W1,null,n),p.createElement(QR,{id:Fe(e),type:"range",onChange:s,name:e,value:t,min:n,max:a,step:l,onFocus:c,onBlur:i}),p.createElement(eI,{numberOFDecimalsPlaces:u,max:a},d?t.toFixed(u):"--"," / ",a))},aI=A.label({display:"flex"}),oI=A.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),lI=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:l})=>{let i=h=>{r(h.target.value)},[c,s]=o.useState(!1),d=o.useCallback(()=>{r(""),s(!0)},[s]);if(t===void 0)return p.createElement(wt,{variant:"outline",size:"medium",id:Mn(e),onClick:d},"Set string");let u=typeof t=="string";return p.createElement(aI,null,p.createElement(Nt.Textarea,{id:Fe(e),maxLength:l,onChange:i,size:"flex",placeholder:"Edit string...",autoFocus:c,valid:u?null:"error",name:e,value:u?t:"",onFocus:n,onBlur:a}),l&&p.createElement(oI,{isMaxed:(t==null?void 0:t.length)===l},(t==null?void 0:t.length)??0," / ",l))},iI=A(Nt.Input)({padding:10});function sI(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var cI=({onChange:e,name:t,accept:r="image/*",value:n})=>{let a=o.useRef(null);function l(i){if(!i.target.files)return;let c=Array.from(i.target.files).map(s=>URL.createObjectURL(s));e(c),sI(n)}return o.useEffect(()=>{n==null&&a.current&&(a.current.value=null)},[n,t]),p.createElement(iI,{ref:a,id:Fe(t),type:"file",name:t,multiple:!0,onChange:l,accept:r,size:"flex"})},dI=o.lazy(()=>Ft(()=>import("./Color-RQJUDNI5-B7GMeRbh.js"),__vite__mapDeps([8,2,4,1,3,5]),import.meta.url)),uI=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(dI,{...e})),pI={array:y0,object:y0,boolean:lR,color:uI,date:pR,number:gR,check:Kt,"inline-check":Kt,radio:Kt,"inline-radio":Kt,select:Kt,"multi-select":Kt,range:nI,text:lI,file:cI},w0=()=>p.createElement(p.Fragment,null,"-"),fI=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var m;let{key:a,control:l}=e,[i,c]=o.useState(!1),[s,d]=o.useState({value:t});o.useEffect(()=>{i||d({value:t})},[i,t]);let u=o.useCallback(E=>(d({value:E}),r({[a]:E}),E),[r,a]),h=o.useCallback(()=>c(!1),[]),g=o.useCallback(()=>c(!0),[]);if(!l||l.disable){let E=(l==null?void 0:l.disable)!==!0&&((m=e==null?void 0:e.type)==null?void 0:m.name)!=="function";return n&&E?p.createElement(Bt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):p.createElement(w0,null)}let f={name:a,argType:e,value:s.value,onChange:u,onBlur:h,onFocus:g},v=pI[l.type]||w0;return p.createElement(v,{...f,...l,controlType:l.type})},hI=A.span({fontWeight:"bold"}),gI=A.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),mI=A.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...ut({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),vI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?4:0})),bI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),yI=A.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),wI=e=>e&&{summary:typeof e=="string"?e:e.name},on=e=>{var m;let[t,r]=o.useState(!1),{row:n,updateArgs:a,compact:l,expandable:i,initialExpandedArgs:c}=e,{name:s,description:d}=n,u=n.table||{},h=u.type||wI(n.type),g=u.defaultValue||n.defaultValue,f=(m=n.type)==null?void 0:m.required,v=d!=null&&d!=="";return p.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},p.createElement(yI,{expandable:i},p.createElement(hI,null,s),f?p.createElement(gI,{title:"Required"},"*"):null),l?null:p.createElement("td",null,v&&p.createElement(mI,null,p.createElement(h1,null,d)),u.jsDocTags!=null?p.createElement(p.Fragment,null,p.createElement(bI,{hasDescription:v},p.createElement(Ta,{value:h,initialExpandedArgs:c})),p.createElement(GC,{tags:u.jsDocTags})):p.createElement(vI,{hasDescription:v},p.createElement(Ta,{value:h,initialExpandedArgs:c}))),l?null:p.createElement("td",null,p.createElement(Ta,{value:g,initialExpandedArgs:c})),a?p.createElement("td",null,p.createElement(fI,{...e,isHovered:t})):null)},xI=A(ec)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),EI=A(qo)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),SI=A.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),CI=A.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),RI=A.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),II=A.td(()=>({position:"relative"})),AI=A.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Ot(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),x0=A.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),$a=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[l,i]=o.useState(n),c=e==="subsection"?RI:CI,s=(r==null?void 0:r.length)||0,d=e==="subsection"?`${s} item${s!==1?"s":""}`:"",u=`${l?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return p.createElement(p.Fragment,null,p.createElement(AI,{title:u},p.createElement(c,{colSpan:1},p.createElement(x0,{onClick:h=>i(!l),tabIndex:0},u),p.createElement(SI,null,l?p.createElement(xI,null):p.createElement(EI,null),t)),p.createElement(II,{colSpan:a-1},p.createElement(x0,{onClick:h=>i(!l),tabIndex:-1,style:{outline:"none"}},u),l?null:d)),l?r:null)},ln=A.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),fe=A.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ie=A.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),he=[2,4,2,2],_I=()=>p.createElement(p.Fragment,null,p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"})))),kI=A.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),OI=A.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),TI=A.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),MI=({inAddonPanel:e})=>{let[t,r]=o.useState(!0);return o.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:p.createElement(kI,{inAddonPanel:e},p.createElement(il,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:p.createElement(p.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:p.createElement(OI,null,e&&p.createElement(p.Fragment,null,p.createElement(Bt,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},p.createElement(Xs,null)," Watch 5m video"),p.createElement(TI,null),p.createElement(Bt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Read docs")),!e&&p.createElement(Bt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Learn how to set that up"))}))},$I=A.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?ee(.25,e.color.defaultText):ee(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),LI=A(Ht)(({theme:e})=>({margin:"-4px -12px -4px 0"})),zI=A.span({display:"flex",justifyContent:"space-between"}),BI={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},PI=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([l,i])=>{let{category:c,subcategory:s}=(i==null?void 0:i.table)||{};if(c){let d=r.sections[c]||{ungrouped:[],subsections:{}};if(!s)d.ungrouped.push({key:l,...i});else{let u=d.subsections[s]||[];u.push({key:l,...i}),d.subsections[s]=u}r.sections[c]=d}else if(s){let d=r.ungroupedSubsections[s]||[];d.push({key:l,...i}),r.ungroupedSubsections[s]=d}else r.ungrouped.push({key:l,...i})});let n=BI[t],a=l=>n?Object.keys(l).reduce((i,c)=>({...i,[c]:l[c].sort(n)}),{}):l;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((l,i)=>({...l,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},HI=(e,t,r)=>{try{return r3(e,t,r)}catch(n){return mC.warn(n.message),!1}},uo=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:l,sort:i="none",isLoading:c}=e;if("error"in e){let{error:y}=e;return p.createElement(k1,null,y," ",p.createElement(Bt,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Read the docs"))}if(c)return p.createElement(_I,null);let{rows:s,args:d,globals:u}="rows"in e&&e,h=PI(E6(s,y=>{var b;return!((b=y==null?void 0:y.table)!=null&&b.disable)&&HI(y,d||{},u||{})}),i),g=h.ungrouped.length===0,f=Object.entries(h.sections).length===0,v=Object.entries(h.ungroupedSubsections).length===0;if(g&&f&&v)return p.createElement(MI,{inAddonPanel:a});let m=1;t&&(m+=1),n||(m+=2);let E=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:l};return p.createElement(el,null,p.createElement($I,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},p.createElement("thead",{className:"docblock-argstable-head"},p.createElement("tr",null,p.createElement("th",null,p.createElement("span",null,"Name")),n?null:p.createElement("th",null,p.createElement("span",null,"Description")),n?null:p.createElement("th",null,p.createElement("span",null,"Default")),t?p.createElement("th",null,p.createElement(zI,null,"Control"," ",!c&&r&&p.createElement(LI,{onClick:()=>r(),title:"Reset controls"},p.createElement(rc,{"aria-hidden":!0})))):null)),p.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(y=>p.createElement(on,{key:y.key,row:y,arg:d&&d[y.key],...x})),Object.entries(h.ungroupedSubsections).map(([y,b])=>p.createElement($a,{key:y,label:y,level:"subsection",colSpan:m},b.map(w=>p.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],expandable:E,...x})))),Object.entries(h.sections).map(([y,b])=>p.createElement($a,{key:y,label:y,level:"section",colSpan:m},b.ungrouped.map(w=>p.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(b.subsections).map(([w,S])=>p.createElement($a,{key:w,label:w,level:"subsection",colSpan:m},S.map(C=>p.createElement(on,{key:C.key,row:C,arg:d&&d[C.key],expandable:E,...x})))))))))},FI=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?p.createElement(uo,{...r[0][1],...t}):p.createElement(cl,null,r.map((n,a)=>{let[l,i]=n,c=`prop_table_div_${l}`,s="div",d=a===0?t:{sort:t.sort};return p.createElement(s,{key:c,id:c,title:l},({active:u})=>u?p.createElement(uo,{key:`prop_table_${l}`,...i,...d}):null)}))};A.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});A.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});A.div(re,({theme:e})=>({...Zn(e),margin:"25px 0 40px",padding:"30px 20px"}));A.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));A.div(({theme:e})=>({color:e.base==="light"?ee(.2,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});A.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));A.div({display:"flex",flexDirection:"row"});A.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));A.div(({theme:e})=>({...Zn(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));A.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});A.div({flex:1,display:"flex",flexDirection:"row"});A.div({display:"flex",alignItems:"flex-start"});A.div({flex:"0 0 30%"});A.div({flex:1});A.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));A.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));A.div(({theme:e})=>({...Zn(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));A.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});A.div({display:"flex",flexFlow:"row wrap"});var jI=e=>`anchor--${e}`,q1=({storyId:e,children:t})=>p.createElement("div",{id:jI(e),className:"sb-anchor"},t);Te&&Te.__DOCS_CONTEXT__===void 0&&(Te.__DOCS_CONTEXT__=o.createContext(null),Te.__DOCS_CONTEXT__.displayName="DocsContext");var Ae=Te?Te.__DOCS_CONTEXT__:o.createContext(null),Yr=(e,t)=>o.useContext(Ae).resolveOf(e,t),NI=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),DI=e=>{if(e)return typeof e=="string"?e.includes("-")?NI(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function VI(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function G1(e){return dC(e,{allowFunction:!1})}var Y1=o.createContext({sources:{}}),K1="--unknown--",UI=({children:e,channel:t})=>{let[r,n]=o.useState({});return o.useEffect(()=>{let a=(l,i=null,c=!1)=>{let{id:s,args:d=void 0,source:u,format:h}=typeof l=="string"?{id:l,source:i,format:c}:l,g=d?G1(d):K1;n(f=>({...f,[s]:{...f[s],[g]:{code:u,format:h}}}))};return t.on(Ml,a),()=>t.off(Ml,a)},[]),p.createElement(Y1.Provider,{value:{sources:r}},e)},WI=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[G1(t)])||(a==null?void 0:a[K1])||{code:""}},qI=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,d;let{__isArgsStory:a}=t.parameters,l=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||l.type||ra.AUTO;if(l.code!==void 0)return l.code;let c=i===ra.DYNAMIC||i===ra.AUTO&&e&&a?e:l.originalSource||"";return((d=n??l.transform)==null?void 0:d(c,t))||c},GI=(e,t,r)=>{var f,v,m,E;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let l=((v=(f=n==null?void 0:n.parameters)==null?void 0:f.docs)==null?void 0:v.source)||{},{code:i}=e,c=e.format??l.format,s=e.language??l.language??"jsx",d=e.dark??l.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:c,language:s,dark:d};let u=t.getStoryContext(n),h=e.__forceInitialArgs?u.initialArgs:u.unmappedArgs,g=WI(n.id,h,r);return c=g.format??((E=(m=n.parameters.docs)==null?void 0:m.source)==null?void 0:E.format)??!1,{code:qI({snippet:g.code,storyContext:{...u,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:c,language:s,dark:d}};function YI(e,t){let r=KI([e],t);return r&&r[0]}function KI(e,t){let[r,n]=o.useState({});return o.useEffect(()=>{Promise.all(e.map(async a=>{let l=await t.loadStory(a);n(i=>i[a]===l?i:{...i,[a]:l})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var XI=(e,t)=>{let{of:r,meta:n}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return n&&t.referenceMeta(n,!1),t.resolveOf(r||"story",["story"]).story.id},ZI=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,l=a.story||{};if(a.disable)return null;if(e.inline??l.inline??!1){let c=e.height??l.height,s=e.autoplay??l.autoplay??!1;return{story:t,inline:!0,height:c,autoplay:s,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??l.height??l.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},JI=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=o.useContext(Ae),r=XI(e,t),n=YI(r,t);if(!n)return p.createElement(T1,null);let a=ZI(e,n,t);return a?p.createElement(FC,{...a}):null},QI=e=>{var g,f,v,m,E,x,y,b,w,S;let t=o.useContext(Ae),r=o.useContext(Y1),{of:n,source:a}=e;if("of"in e&&n===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story:l}=Yr(n||"story",["story"]),i=GI({...a,...n&&{of:n}},t,r),c=e.layout??l.parameters.layout??((f=(g=l.parameters.docs)==null?void 0:g.canvas)==null?void 0:f.layout)??"padded",s=e.withToolbar??((m=(v=l.parameters.docs)==null?void 0:v.canvas)==null?void 0:m.withToolbar)??!1,d=e.additionalActions??((x=(E=l.parameters.docs)==null?void 0:E.canvas)==null?void 0:x.additionalActions),u=e.sourceState??((b=(y=l.parameters.docs)==null?void 0:y.canvas)==null?void 0:b.sourceState)??"hidden",h=e.className??((S=(w=l.parameters.docs)==null?void 0:w.canvas)==null?void 0:S.className);return p.createElement(M1,{withSource:u==="none"?void 0:i,isExpanded:u==="shown",withToolbar:s,additionalActions:d,className:h,layout:c},p.createElement(JI,{of:n||l.moduleExport,meta:e.meta,...e.story}))},eA=(e,t)=>{let r=t.getStoryContext(e),[n,a]=o.useState(r.globals);return o.useEffect(()=>{let l=i=>{a(i.globals)};return t.channel.on(c0,l),()=>t.channel.off(c0,l)},[t.channel]),[n]},tA=(e,t)=>{let r=rA(e,t);if(!r)throw new Error("No result when story was defined");return r},rA=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,l]=o.useState(r.args);o.useEffect(()=>{let s=d=>{d.storyId===n&&l(d.args)};return t.channel.on(d0,s),()=>t.channel.off(d0,s)},[n,t.channel]);let i=o.useCallback(s=>t.channel.emit(vC,{storyId:n,updatedArgs:s}),[n,t.channel]),c=o.useCallback(s=>t.channel.emit(bC,{storyId:n,argNames:s}),[n,t.channel]);return e&&[a,i,c]};function nA(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var aA=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=o.useContext(Ae),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:l,component:i,subcomponents:c}=n,s=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??s.include,u=e.exclude??s.exclude,h=e.sort??s.sort,[g,f,v]=tA(n,r),[m]=eA(n,r),E=s0(l,d,u);if(!(c&&Object.keys(c).length>0))return Object.keys(E).length>0||Object.keys(g).length>0?p.createElement(uo,{rows:E,sort:h,args:g,globals:m,updateArgs:f,resetArgs:v}):null;let x=DI(i),y=Object.fromEntries(Object.entries(c).map(([S,C])=>[S,{rows:s0(nA(C,a),d,u),sort:h}])),b={[x]:{rows:E,sort:h},...y};return p.createElement(FI,{tabs:b,sort:h,args:g,globals:m,updateArgs:f,resetArgs:v})},{document:X1}=Te,oA=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return p.createElement(Zo,null,t);let n=e&&e.split("-");return p.createElement(xl,{language:n&&n[1]||"text",format:!1,code:t,...r})};function Rl(e,t){e.channel.emit(yC,t)}var po=Dc.a,lA=({hash:e,children:t})=>{let r=o.useContext(Ae);return p.createElement(po,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);X1.getElementById(a)&&Rl(r,e)}},t)},iA=e=>{let{href:t,target:r,children:n,...a}=e,l=o.useContext(Ae);if(t){if(t.startsWith("#"))return p.createElement(lA,{hash:t},n);if(r!=="_blank"&&!t.startsWith("https://"))return p.createElement(po,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),Rl(l,i.currentTarget.getAttribute("href")))},target:r,...a},n)}return p.createElement(po,{...e})},Z1=["h1","h2","h3","h4","h5","h6"],sA=Z1.reduce((e,t)=>({...e,[t]:A(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),cA=A.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),dA=({as:e,id:t,children:r,...n})=>{let a=o.useContext(Ae),l=sA[e],i=`#${t}`;return p.createElement(l,{id:t,...n},p.createElement(cA,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:c=>{X1.getElementById(t)&&Rl(a,i)}},p.createElement(Qs,null)),r)},Il=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return p.createElement(dA,{as:t,id:r,...a},n);let l=t,{as:i,...c}=e;return p.createElement(l,{...te(c,t)})},uA=Z1.reduce((e,t)=>({...e,[t]:r=>p.createElement(Il,{as:t,...r})}),{}),pA=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(Ed`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' This is often caused by not wrapping the child in a template string. This is invalid: diff --git a/docs/assets/preview-zJw0zUcQ.js b/docs/assets/preview-Mr6ODRJp.js similarity index 65% rename from docs/assets/preview-zJw0zUcQ.js rename to docs/assets/preview-Mr6ODRJp.js index 49d7e77..d9163f6 100644 --- a/docs/assets/preview-zJw0zUcQ.js +++ b/docs/assets/preview-Mr6ODRJp.js @@ -1,7 +1,7 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./DocsRenderer-K4EAMTCU-CjY85fLY.js","./iframe-BaWYFvPh.js","./index-BBkUAzwr.js","./react-18-B-OKcmzb.js","./index-PqR-_bA4.js","./index-SQMR4-IU.js","./index-DrlA5mbP.js","./index-DrFu-skq.js"] + __vite__mapDeps.viteFileDeps = ["./DocsRenderer-K4EAMTCU-D5GqcumZ.js","./iframe-Dx-CAhZM.js","./index-BBkUAzwr.js","./react-18-B-OKcmzb.js","./index-PqR-_bA4.js","./index-DVskBQuG.js","./index-DrlA5mbP.js","./index-DrFu-skq.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as a}from"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";const{global:s}=__STORYBOOK_MODULE_GLOBAL__;var _=Object.entries(s.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-K4EAMTCU-CjY85fLY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>_[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters}; +import{_ as a}from"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";const{global:s}=__STORYBOOK_MODULE_GLOBAL__;var _=Object.entries(s.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-K4EAMTCU-D5GqcumZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>_[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters}; diff --git a/docs/assets/preview-m58XexFJ.js b/docs/assets/preview-olxR6RxF.js similarity index 74% rename from docs/assets/preview-m58XexFJ.js rename to docs/assets/preview-olxR6RxF.js index 2de43b1..42a17f3 100644 --- a/docs/assets/preview-m58XexFJ.js +++ b/docs/assets/preview-olxR6RxF.js @@ -1 +1 @@ -const o={parameters:{controls:{matchers:{color:/(background|color)$/i,date:/Date$/i}},options:{storySort:{order:["nbody","Installation","Quick Start","Integration","Contribute","Define",["Intro","Force","Simulate Function","Transformation"],"Visualize",["Intro","Dimension","Multiverse","Record","Controller","Trails","Debug Info"],"Showcase",["Intro","Analemma",["Intro","Sun-Earth","Sun-Mars"],"HorseshoeOrbit",["Intro","54509 YORP"],"SolarSystem"]]}}}};export{o as default}; +const o={parameters:{controls:{matchers:{color:/(background|color)$/i,date:/Date$/i}},options:{storySort:{order:["nbody","Installation","Quick Start","Integration","Contribute","Define",["Intro","Force","Simulate Function","Transformation"],"Visualize",["Intro","Dimension","Multiverse","Record","Controller","Trails","Debug Info"],"Showcase",["Intro","Analemma",["Intro","Sun-Earth","Sun-Mars"],"Horseshoe Orbit",["Intro","2010 SO16","54509 YORP"],"Solar System",["Simulate","Recorded"]]]}}}};export{o as default}; diff --git a/docs/assets/syntaxhighlighter-JOJW2KGS-DwFAPbLs.js b/docs/assets/syntaxhighlighter-JOJW2KGS-DTXLky6P.js similarity index 62% rename from docs/assets/syntaxhighlighter-JOJW2KGS-DwFAPbLs.js rename to docs/assets/syntaxhighlighter-JOJW2KGS-DTXLky6P.js index 7c870cf..36ef7a1 100644 --- a/docs/assets/syntaxhighlighter-JOJW2KGS-DwFAPbLs.js +++ b/docs/assets/syntaxhighlighter-JOJW2KGS-DTXLky6P.js @@ -1 +1 @@ -import{S as s,c as g,s as n,a as u}from"./index-SQMR4-IU.js";import"./iframe-BaWYFvPh.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";export{s as SyntaxHighlighter,g as createCopyToClipboardFunction,n as default,u as supportedLanguages}; +import{S as s,c as g,s as n,a as u}from"./index-DVskBQuG.js";import"./iframe-Dx-CAhZM.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";export{s as SyntaxHighlighter,g as createCopyToClipboardFunction,n as default,u as supportedLanguages}; diff --git a/docs/iframe.html b/docs/iframe.html index c7cf328..44cc647 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -394,7 +394,7 @@ } - + diff --git a/docs/index.html b/docs/index.html index 87d0246..8097eac 100644 --- a/docs/index.html +++ b/docs/index.html @@ -41,6 +41,8 @@ + +